changeset 4751:ffb7e8093289 libavformat

Support raw TrueHD files
author ramiro
date Thu, 19 Mar 2009 21:46:56 +0000
parents 8c8a4e946d5c
children e04f51471c2a
files Makefile allformats.c avformat.h raw.c
diffstat 4 files changed, 34 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/Makefile	Thu Mar 19 21:23:39 2009 +0000
+++ b/Makefile	Thu Mar 19 21:46:56 2009 +0000
@@ -207,6 +207,8 @@
 OBJS-$(CONFIG_TGP_MUXER)                 += movenc.o riff.o isom.o avc.o
 OBJS-$(CONFIG_THP_DEMUXER)               += thp.o
 OBJS-$(CONFIG_TIERTEXSEQ_DEMUXER)        += tiertexseq.o
+OBJS-$(CONFIG_TRUEHD_DEMUXER)            += raw.o id3v2.o
+OBJS-$(CONFIG_TRUEHD_MUXER)              += raw.o
 OBJS-$(CONFIG_TTA_DEMUXER)               += tta.o
 OBJS-$(CONFIG_TXD_DEMUXER)               += txd.o
 OBJS-$(CONFIG_VC1_DEMUXER)               += raw.o
--- a/allformats.c	Thu Mar 19 21:23:39 2009 +0000
+++ b/allformats.c	Thu Mar 19 21:46:56 2009 +0000
@@ -182,6 +182,7 @@
     REGISTER_MUXER    (TGP, tgp);
     REGISTER_DEMUXER  (THP, thp);
     REGISTER_DEMUXER  (TIERTEXSEQ, tiertexseq);
+    REGISTER_MUXDEMUX (TRUEHD, truehd);
     REGISTER_DEMUXER  (TTA, tta);
     REGISTER_DEMUXER  (TXD, txd);
     REGISTER_DEMUXER  (VC1, vc1);
--- a/avformat.h	Thu Mar 19 21:23:39 2009 +0000
+++ b/avformat.h	Thu Mar 19 21:46:56 2009 +0000
@@ -22,8 +22,8 @@
 #define AVFORMAT_AVFORMAT_H
 
 #define LIBAVFORMAT_VERSION_MAJOR 52
-#define LIBAVFORMAT_VERSION_MINOR 31
-#define LIBAVFORMAT_VERSION_MICRO  1
+#define LIBAVFORMAT_VERSION_MINOR 32
+#define LIBAVFORMAT_VERSION_MICRO  0
 
 #define LIBAVFORMAT_VERSION_INT AV_VERSION_INT(LIBAVFORMAT_VERSION_MAJOR, \
                                                LIBAVFORMAT_VERSION_MINOR, \
--- a/raw.c	Thu Mar 19 21:23:39 2009 +0000
+++ b/raw.c	Thu Mar 19 21:46:56 2009 +0000
@@ -969,6 +969,35 @@
 };
 #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_TRUEHD_MUXER
+AVOutputFormat truehd_muxer = {
+    "truehd",
+    NULL_IF_CONFIG_SMALL("raw TrueHD"),
+    NULL,
+    "thd",
+    0,
+    CODEC_ID_TRUEHD,
+    CODEC_ID_NONE,
+    NULL,
+    raw_write_packet,
+    .flags= AVFMT_NOTIMESTAMPS,
+};
+#endif
+
 #if CONFIG_MPEG1VIDEO_MUXER
 AVOutputFormat mpeg1video_muxer = {
     "mpeg1video",