[Ffmpeg-devel] Patch add function to read record time in dv video

Rich Felker dalias
Sun Sep 4 17:59:10 CEST 2005

On Sun, Sep 04, 2005 at 09:18:06AM -0600, Fred Rothganger wrote:
> Michael Niedermayer wrote:
> >patch looks ok, roman, do you agree with that? IIRC we had some
> >disagreements in the past about how to pass this info around
> > 
> >
>    Not to be too self-critical, but I think this is a pretty hacky way 
> to do it.  A nice way might be to put metadata in a name-value list 
> attached to some appropriate structure, or perhaps have a standard 
> function for probing metadata.  For example:
> AVInputFormat {
> ...
>    int (*metadata)(AVFormatContext *, char * name, void * value, int * 
> size);
> ...
> }
> The semantics of the names would be defined by the individual format, 
> but there would be a lot of commonality between codecs.  The value would 
> be an arbitrary structure, but well-defined for the given name.  For 
> example, it could be a null terminated string or a time structure, etc.  
> "size" would be the size of the structure.
> The function would return metadata in the following priority order:
>    * Relative to the most recently decoded frame
>    * Relative to the container as a whole
> If there are multiple streams and we want to be stream specific, a 
> metadata function could be added to AVCodec as well, or perhaps stream 
> could be one of the parameters of the function.
> This approach could replace some of the metadata currently hard-coded 
> into AVFormatContext, such as title, author, copyright, etc.  For 
> writing such values to a stream, a metadata function can be added to 
> AVOutputFormat.

Agree totally. Except I would prefer that it not be connected with
codecs at all, just demuxers/streams.


More information about the ffmpeg-devel mailing list