[FFmpeg-devel] [PATCH 2/5] metadata: add new conversion API

Michael Niedermayer michaelni
Sun Oct 3 21:51:25 CEST 2010


On Sun, Oct 03, 2010 at 09:14:23PM +0200, Anton Khirnov wrote:
> From: Anton Khirnov <wyskas at gmail.com>
> 
> Track current metadata format in AVMetadata and add av_metadata_clone()
> function for copying/replacing metadata.
[...]
> index 362a056..a9fb39f 100644
> --- a/libavformat/avformat.h
> +++ b/libavformat/avformat.h
> @@ -198,6 +198,22 @@ void av_metadata_conv(struct AVFormatContext *ctx, const AVMetadataConv *d_conv,
>                                                     const AVMetadataConv *s_conv);
>  
>  /**
> + * Copy metadata from src to dst, converting between their respective formats.
> + * dst may be equal to src -- for in-place conversion -- or empty (i.e. a
> + * pointer to NULL), in both cases it is initialized to dst_fmt format.
> + * Otherwise dst_fmt is ignored. src may be a pointer to NULL, in which case
> + * dst is initialized, but nothing is copied.
> + *
> + * @param pattern Used to copy only some keys. If non-NULL, it is passed
> + *                directly to av_metadata_get().
> + * @param flags   Passed directly to av_metadata_get/set. If pattern is NULL,
> + *                defaults to AV_METADATA_IGNORE_SUFFIX|AV_METADATA_DONT_OVERWRITE.
> + * @return >= 0 on success otherwise an error code <0
> + */
> +int av_metadata_clone(AVMetadata **src, AVMetadata **dst, const AVMetadataConv *dst_fmt,
> +                      const char *pattern, int flags);

in all calls src==dst

where would that not be so?

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Everything should be made as simple as possible, but not simpler.
-- Albert Einstein
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20101003/0f5b07a8/attachment.pgp>



More information about the ffmpeg-devel mailing list