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.

> It looks very much un-metadata-like to me.

Those flags specify the behaviour a player might or might not decide to
take.

> It should also at least be documented somewhere, or we have yet another 
> obscure
> feature known to no one but its author.

I'll update patch with some documentation and push if is ok.




_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to