[FFmpeg-cvslog] r15674 - in trunk/libavformat: Makefile allformats.c avformat.h raw.c

bcoudurier subversion
Fri Oct 24 03:42:57 CEST 2008


Author: bcoudurier
Date: Fri Oct 24 03:42:57 2008
New Revision: 15674

Log:
raw dnxhd de/muxer

Modified:
   trunk/libavformat/Makefile
   trunk/libavformat/allformats.c
   trunk/libavformat/avformat.h
   trunk/libavformat/raw.c

Modified: trunk/libavformat/Makefile
==============================================================================
--- trunk/libavformat/Makefile	(original)
+++ trunk/libavformat/Makefile	Fri Oct 24 03:42:57 2008
@@ -38,6 +38,8 @@ OBJS-$(CONFIG_DAUD_DEMUXER)             
 OBJS-$(CONFIG_DAUD_MUXER)                += daud.o
 OBJS-$(CONFIG_DIRAC_DEMUXER)             += raw.o
 OBJS-$(CONFIG_DIRAC_MUXER)               += raw.o
+OBJS-$(CONFIG_DNXHD_DEMUXER)             += raw.o
+OBJS-$(CONFIG_DNXHD_MUXER)               += raw.o
 OBJS-$(CONFIG_DSICIN_DEMUXER)            += dsicin.o
 OBJS-$(CONFIG_DTS_DEMUXER)               += raw.o
 OBJS-$(CONFIG_DTS_MUXER)                 += raw.o

Modified: trunk/libavformat/allformats.c
==============================================================================
--- trunk/libavformat/allformats.c	(original)
+++ trunk/libavformat/allformats.c	Fri Oct 24 03:42:57 2008
@@ -72,6 +72,7 @@ void av_register_all(void)
     REGISTER_MUXER    (CRC, crc);
     REGISTER_MUXDEMUX (DAUD, daud);
     REGISTER_MUXDEMUX (DIRAC, dirac);
+    REGISTER_MUXDEMUX (DNXHD, dnxhd);
     REGISTER_DEMUXER  (DSICIN, dsicin);
     REGISTER_MUXDEMUX (DTS, dts);
     REGISTER_MUXDEMUX (DV, dv);

Modified: trunk/libavformat/avformat.h
==============================================================================
--- trunk/libavformat/avformat.h	(original)
+++ trunk/libavformat/avformat.h	Fri Oct 24 03:42:57 2008
@@ -22,7 +22,7 @@
 #define AVFORMAT_AVFORMAT_H
 
 #define LIBAVFORMAT_VERSION_MAJOR 52
-#define LIBAVFORMAT_VERSION_MINOR 22
+#define LIBAVFORMAT_VERSION_MINOR 23
 #define LIBAVFORMAT_VERSION_MICRO  1
 
 #define LIBAVFORMAT_VERSION_INT AV_VERSION_INT(LIBAVFORMAT_VERSION_MAJOR, \

Modified: trunk/libavformat/raw.c
==============================================================================
--- trunk/libavformat/raw.c	(original)
+++ trunk/libavformat/raw.c	Fri Oct 24 03:42:57 2008
@@ -505,6 +505,17 @@ static int dirac_probe(AVProbeData *p)
 }
 #endif
 
+#ifdef CONFIG_DNXHD_DEMUXER
+static int dnxhd_probe(AVProbeData *p)
+{
+    static const uint8_t header[] = {0x00,0x00,0x02,0x80,0x01};
+    if (!memcmp(p->buf, header, 5))
+        return AVPROBE_SCORE_MAX;
+    else
+        return 0;
+}
+#endif
+
 #if defined(CONFIG_AC3_DEMUXER) || defined(CONFIG_EAC3_DEMUXER)
 static int ac3_eac3_probe(AVProbeData *p, enum CodecID expected_codec_id)
 {
@@ -640,6 +651,34 @@ AVOutputFormat dirac_muxer = {
 };
 #endif
 
+#ifdef CONFIG_DNXHD_DEMUXER
+AVInputFormat dnxhd_demuxer = {
+    "dnxhd",
+    NULL_IF_CONFIG_SMALL("raw DNxHD (SMPTE VC-3)"),
+    0,
+    dnxhd_probe,
+    video_read_header,
+    raw_read_partial_packet,
+    .flags= AVFMT_GENERIC_INDEX,
+    .value = CODEC_ID_DNXHD,
+};
+#endif
+
+#ifdef CONFIG_DNXHD_MUXER
+AVOutputFormat dnxhd_muxer = {
+    "dnxhd",
+    NULL_IF_CONFIG_SMALL("raw DNxHD (SMPTE VC-3)"),
+    NULL,
+    "dnxhd",
+    0,
+    CODEC_ID_NONE,
+    CODEC_ID_DNXHD,
+    NULL,
+    raw_write_packet,
+    .flags= AVFMT_NOTIMESTAMPS,
+};
+#endif
+
 #ifdef CONFIG_DTS_DEMUXER
 AVInputFormat dts_demuxer = {
     "dts",




More information about the ffmpeg-cvslog mailing list