On 04/07/14 13:45, Anton Khirnov wrote: > > On Fri, 04 Jul 2014 13:26:24 +0200, Luca Barbato <[email protected]> wrote: >> On 04/07/14 08:11, Anton Khirnov wrote: >>> >>> On Wed, 2 Jul 2014 19:23:54 +0200, Luca Barbato <[email protected]> wrote: >>>> --- >>>> libavformat/movenc.c | 57 >>>> +++++++++++++++++++++++++++++++++++++++++++--------- >>>> 1 file changed, 47 insertions(+), 10 deletions(-) >>>> >>>> diff --git a/libavformat/movenc.c b/libavformat/movenc.c >>>> index f5c36fc..713949a 100644 >>>> --- a/libavformat/movenc.c >>>> +++ b/libavformat/movenc.c >>>> @@ -1314,11 +1314,16 @@ static int mov_write_hdlr_tag(AVIOContext *pb, >>>> MOVTrack *track) >>>> const char *hdlr, *descr = NULL, *hdlr_type = NULL; >>>> int64_t pos = avio_tell(pb); >>>> >>>> + uint32_t flags = 0, mask = 0; >>>> + >>>> hdlr = "dhlr"; >>>> hdlr_type = "url "; >>>> descr = "DataHandler"; >>>> >>>> if (track) { >>>> + AVStream *st = track->st; >>>> + AVDictionaryEntry *tag; >>>> + >>>> hdlr = (track->mode == MODE_MOV) ? "mhlr" : "\0\0\0\0"; >>>> if (track->enc->codec_type == AVMEDIA_TYPE_VIDEO) { >>>> hdlr_type = "vide"; >>>> @@ -1352,6 +1357,13 @@ static int mov_write_hdlr_tag(AVIOContext *pb, >>>> MOVTrack *track) >>>> "Unknown hldr_type for %s / 0x%04X, writing dummy >>>> values\n", >>>> tag_buf, track->enc->codec_tag); >>>> } >>>> + tag = av_dict_get(st->metadata, "mov-component-flags", NULL, 0); >>>> + if (tag) >>>> + flags = atoi(tag->value); >>>> + >>>> + tag = av_dict_get(st->metadata, "mov-component-mask", NULL, 0); >>>> + if (tag) >>>> + mask = atoi(tag->value); >>>> } >>>> >>>> avio_wb32(pb, 0); /* size */ >>> >>> Why is this treated as metadata? >> >> Because it must be user-editable. >> > > That does not imply it must be metadata.
We do not have anything else user-editable right now. >>> It looks very much un-metadata-like to me. >> >> Those flags specify the behaviour a player might or might not decide to >> take. > > Which is very much NOT what metadata is for. Metadata is additional information that might or might not presented to the user e.g. which language which stream is or if that picture is the album cover art or not. I can make another dictionary and duplicate all we have for the stream metadata, but the use is pretty much the same. For the alternate groups I could come up with something that is like AVProgram but different... Given the fringe-use of this I'm not sure is worth it. lu _______________________________________________ libav-devel mailing list [email protected] https://lists.libav.org/mailman/listinfo/libav-devel
