[FFmpeg-devel] [PATCH] MTH demuxer (Gamecube format)

Michael Niedermayer michaelni
Fri Feb 6 14:22:03 CET 2009


On Fri, Feb 06, 2009 at 02:16:54AM -0500, Michael Montanye wrote:
> Jai Menon wrote:
>> Hi,
>>
>> On Fri, Feb 6, 2009 at 11:35 AM, Michael Montanye
>> <montanye at myfairpoint.net> wrote:
>>   
>>> Mike Melanson wrote:
>>>     
>>>> Diego Biurrun wrote:
>>>>
>>>>       
>>>>> On Thu, Feb 05, 2009 at 10:12:52AM +0100, Marc Mason wrote:
>>>>>
>>>>>         
>>>>>> Diego Biurrun wrote:
>>>>>>
>>>>>>
>>>>>>           
>>>>>>> Mike Melanson wrote:
>>>>>>>
>>>>>>>
>>>>>>>             
>>>>>>>> I decided to go with the file signature instead.
>>>>>>>>
>>>>>>>>               
>>>>>>> What do you mean by signature?
>>>>>>>
>>>>>>>             
>>>>>> Perhaps he meant
>>>>>>
>>>>>> http://en.wikipedia.org/wiki/File_format#Magic_number
>>>>>>
>>>>>> http://en.wikipedia.org/wiki/Magic_number_(programming)#Magic_numbers_in_files
>>>>>>
>>>>>>           
>>>>> I was basically wondering why it is called MTH in one place and MTHP in
>>>>> another.  IMO we should use only one description, otherwise we will 
>>>>> only
>>>>> generate confusion.  DV is not the same as DVD or DVB.
>>>>>
>>>>>         
>>>> I vote for MTHP as the consistent term. As mentioned, it's the file's
>>>> signature and thus the most consistent identifier. MTH is just to 
>>>> accomodate
>>>> the common convention of the 3-letter file extensions. This is 
>>>> consistent
>>>> with our reasoning for referring to MPEG rather than MPG.
>>>>
>>>>
>>>>       
>>> That makes sense, especially since I just found a GC game that uses no 
>>> file
>>> extensions at all, and the only way to find the FMVs was to look at the
>>> signature.  And it's trivial to change.  Changed, new patch attached.
>>>
>>> -Michael Montanye
>>>
>>> Index: Changelog
>>> ===================================================================
>>> --- Changelog   (revision 16909)
>>> +++ Changelog   (working copy)
>>> @@ -146,6 +146,7 @@
>>>  - hybrid WavPack support
>>>  - R3D REDCODE demuxer
>>>  - ALSA support for playback and record
>>> +- MTHP demuxer
>>>     
>>
>> Just a heads up, this won't apply to svn head. svn up and regenerate.
>>
>> [...]
>>
>>   
> Thanks.  Done and attached.
[...]
> +static int mthp_read_packet(AVFormatContext *s, AVPacket *pkt)
> +{
> +    int *next_framesz = s->priv_data;
> +    ByteIOContext *pb = s->pb;
> +    int size;
> +    int ret;
> +
> +    size = *next_framesz-4;
> +
> +    /* Locate the next frame and read out its size.  */

> +    av_free(next_framesz);
> +    *next_framesz  = get_be32(pb);

this does not look very good

also does seeking work if you add AVFMT_GENERIC_INDEX ?

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

I have never wished to cater to the crowd; for what I know they do not
approve, and what they approve I do not know. -- Epicurus
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20090206/65347809/attachment.pgp>



More information about the ffmpeg-devel mailing list