[FFmpeg-devel] [PATCH] Add WebM to the Matroska demuxer name

Baptiste Coudurier baptiste.coudurier
Thu Jul 15 21:34:20 CEST 2010


On 07/15/2010 12:21 PM, M?ns Rullg?rd wrote:
> Baptiste Coudurier<baptiste.coudurier at gmail.com>  writes:
>
>> On 07/15/2010 11:57 AM, M?ns Rullg?rd wrote:
>>> Baptiste Coudurier<baptiste.coudurier at gmail.com>   writes:
>>>
>>>> On 07/15/2010 10:32 AM, M?ns Rullg?rd wrote:
>>>>> Reimar D?ffinger<Reimar.Doeffinger at gmx.de>    writes:
>>>>>
>>>>>> On Thu, Jul 15, 2010 at 01:58:58AM -0400, Alex Converse wrote:
>>>>>>> $subj
>>>>>>>
>>>>>>> Some users are getting confused. We do a similar thing for
>>>>>>> "mov,mp4,m4a,3gp,3g2,mj2."
>>>>>>
>>>>>> And I've always considered it a bad idea.
>>>>>> Changing this field means the value you need to use for -f changes
>>>>>> (and MPlayer actually also relies on this name), so strictly speaking
>>>>>> this would require a major version bump.
>>>>>
>>>>> -f matroska,webm would be nothing short of ridiculous.
>>>>
>>>> WTF, for demuxers, values are matched between commas. Mans, you even
>>>> reviewed that patch.
>>>
>>> I forgot about that, and now I come to think it was probably not such
>>> a good idea.  It will break any application which enumerates the
>>> demuxers and does something with the name, and as such this should be
>>> considered an ABI break.
>>>
>>> The correct solution is to make that field a proper array like we have
>>> for some other properties.  To avoid breaking ABI, we could even add
>>> a list of aliases at the end of the struct.  The single name field
>>> could be dropped at the next big break if we want to.
>>
>> IMHO the correct solution is to use av_find_input_format.
>
> Are you suggesting apps call av_find_input_format() with all possible
> strings and check which ones return something?  Doesn't sound very
> practical.

I don't see where your problem is.

Apps use av_probe_input_format, if apps want to force input format, they
can iterate over av_iformat_next and enumerate in a listbox if wanted, 
or use the format between the commas, AND they call 
av_find_input_format, the format between the commas only work with 
av_find_input_format, so using it will always work, and the full name 
will work as well.

Besides regarding the API (not ABI) break if the name changes.
Apps must use the format between commas ("mov" can be guaranteed to not 
be removed), that is not use a name with a comma in it, which is 
reasonable to me.

-- 
Baptiste COUDURIER
Key fingerprint                 8D77134D20CC9220201FC5DB0AC9325C5C1ABAAA
FFmpeg maintainer                                  http://www.ffmpeg.org



More information about the ffmpeg-devel mailing list