[FFmpeg-devel] [PATCH] Support raw TrueHD files

Ramiro Polla ramiro.polla
Thu Mar 19 03:00:10 CET 2009


Hi,

On Wed, Mar 18, 2009 at 6:35 PM, Michael Niedermayer <michaelni at gmx.at> wrote:
> On Wed, Mar 18, 2009 at 02:46:43PM -0300, Ramiro Polla wrote:
>> Hi,
>>
>> On Wed, Mar 18, 2009 at 4:25 AM, Diego Biurrun <diego at biurrun.de> wrote:
>> > On Tue, Mar 17, 2009 at 10:30:46PM -0300, ramiro at lisha.ufsc.br wrote:
>> >> From: Ramiro Polla <ramiro at ubuntu-8.10-macbook>
>> >>
>> >> --- a/libavformat/allformats.c
>> >> +++ b/libavformat/allformats.c
>> >> @@ -180,6 +180,7 @@ void av_register_all(void)
>> >> ? ? ?REGISTER_MUXER ? ?(TGP, tgp);
>> >> + ? ?REGISTER_MUXDEMUX (THD, thd);
>> >
>> > You called it TRUEHD in the other patch, which was better.
>>
>> The other patch was for the TrueHD decoder. This is for the raw TrueHD
>> (.thd) demuxer. I based myself on all the three-letter demuxers to
>> name it, but now I see that it's matroska instead of mkv, so maybe
>> truehd really is more consistent.
>>
>> Also in this updated patch I removed the muxer and left only the
>> demuxer, because there is no TrueHD encoder (yet =).
>>
> [...]
>> Index: libavformat/raw.c
>> ===================================================================
>> --- libavformat/raw.c (revision 18034)
>> +++ libavformat/raw.c (working copy)
>> @@ -969,6 +969,20 @@
>> ?};
>> ?#endif
>>
>> +#if CONFIG_TRUEHD_DEMUXER
>> +AVInputFormat truehd_demuxer = {
>> + ? ?"truehd",
>> + ? ?NULL_IF_CONFIG_SMALL("raw TrueHD"),
>> + ? ?0,
>> + ? ?NULL,
>> + ? ?audio_read_header,
>> + ? ?ff_raw_read_partial_packet,
>> + ? ?.flags= AVFMT_GENERIC_INDEX,
>> + ? ?.extensions = "thd",
>> + ? ?.value = CODEC_ID_TRUEHD,
>> +};
>> +#endif
>> +
>> ?#if CONFIG_MPEG1VIDEO_MUXER
>> ?AVOutputFormat mpeg1video_muxer = {
>> ? ? ?"mpeg1video",
>
> ok

Michael, sorry to bother you again, but I have updated the patch. I
took Ian's comments into consideration and put back the raw TrueHD
muxer.

>> Index: libavformat/allformats.c
>> ===================================================================
>> --- libavformat/allformats.c ?(revision 18034)
>> +++ libavformat/allformats.c ?(working copy)
>> @@ -180,6 +180,7 @@
>> ? ? ?REGISTER_MUXDEMUX (SWF, swf);
>> ? ? ?REGISTER_MUXER ? ?(TG2, tg2);
>> ? ? ?REGISTER_MUXER ? ?(TGP, tgp);
>> + ? ?REGISTER_DEMUXER ?(TRUEHD, truehd);
>> ? ? ?REGISTER_DEMUXER ?(THP, thp);
>> ? ? ?REGISTER_DEMUXER ?(TIERTEXSEQ, tiertexseq);
>> ? ? ?REGISTER_DEMUXER ?(TTA, tta);
>
> fine with me though not wth diego

Patch updated.

Ramiro Polla
-------------- next part --------------
A non-text attachment was scrubbed...
Name: truehd_muxdemux.diff
Type: text/x-diff
Size: 3065 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20090318/815b587f/attachment.diff>



More information about the ffmpeg-devel mailing list