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

Michael Niedermayer michaelni
Wed Mar 18 22:35:54 CET 2009


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


> 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

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

Dictatorship naturally arises out of democracy, and the most aggravated
form of tyranny and slavery out of the most extreme liberty. -- Plato
-------------- 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/20090318/384943f4/attachment.pgp>



More information about the ffmpeg-devel mailing list