[SCM] libav/experimental: move dnxhd demuxer to its own file
siretart at users.alioth.debian.org
siretart at users.alioth.debian.org
Sun Jun 30 17:15:02 UTC 2013
The following commit has been merged in the experimental branch:
commit 66e35c5fc6174d7da3e3013340aa866163b98ca7
Author: Aurelien Jacobs <aurel at gnuage.org>
Date: Sun Aug 29 21:51:47 2010 +0000
move dnxhd demuxer to its own file
Originally committed as revision 24982 to svn://svn.ffmpeg.org/ffmpeg/trunk
diff --git a/libavformat/Makefile b/libavformat/Makefile
index 7ccc033..a2735e0 100644
--- a/libavformat/Makefile
+++ b/libavformat/Makefile
@@ -54,7 +54,7 @@ OBJS-$(CONFIG_DAUD_DEMUXER) += daud.o
OBJS-$(CONFIG_DAUD_MUXER) += daud.o
OBJS-$(CONFIG_DIRAC_DEMUXER) += diracdec.o raw.o
OBJS-$(CONFIG_DIRAC_MUXER) += raw.o
-OBJS-$(CONFIG_DNXHD_DEMUXER) += raw.o
+OBJS-$(CONFIG_DNXHD_DEMUXER) += dnxhddec.o raw.o
OBJS-$(CONFIG_DNXHD_MUXER) += raw.o
OBJS-$(CONFIG_DSICIN_DEMUXER) += dsicin.o
OBJS-$(CONFIG_DTS_DEMUXER) += dtsdec.o raw.o
diff --git a/libavformat/diracdec.c b/libavformat/dnxhddec.c
similarity index 55%
copy from libavformat/diracdec.c
copy to libavformat/dnxhddec.c
index 5293988..26e3969 100644
--- a/libavformat/diracdec.c
+++ b/libavformat/dnxhddec.c
@@ -1,6 +1,7 @@
/*
- * RAW Dirac demuxer
- * Copyright (c) 2007 Marco Gerards <marco at gnu.org>
+ * RAW DNxHD (SMPTE VC-3) demuxer
+ * Copyright (c) 2008 Baptiste Coudurier <baptiste.coudurier at gmail.com>
+ * Copyright (c) 2009 Reimar Döffinger <Reimar.Doeffinger at gmx.de>
*
* This file is part of FFmpeg.
*
@@ -23,21 +24,31 @@
#include "avformat.h"
#include "raw.h"
-static int dirac_probe(AVProbeData *p)
+static int dnxhd_probe(AVProbeData *p)
{
- if (AV_RL32(p->buf) == MKTAG('B', 'B', 'C', 'D'))
- return AVPROBE_SCORE_MAX;
- else
+ static const uint8_t header[] = {0x00,0x00,0x02,0x80,0x01};
+ int w, h, compression_id;
+ if (p->buf_size < 0x2c)
return 0;
+ if (memcmp(p->buf, header, 5))
+ return 0;
+ h = AV_RB16(p->buf + 0x18);
+ w = AV_RB16(p->buf + 0x1a);
+ if (!w || !h)
+ return 0;
+ compression_id = AV_RB32(p->buf + 0x28);
+ if (compression_id < 1237 || compression_id > 1253)
+ return 0;
+ return AVPROBE_SCORE_MAX;
}
-AVInputFormat dirac_demuxer = {
- "dirac",
- NULL_IF_CONFIG_SMALL("raw Dirac"),
+AVInputFormat dnxhd_demuxer = {
+ "dnxhd",
+ NULL_IF_CONFIG_SMALL("raw DNxHD (SMPTE VC-3)"),
0,
- dirac_probe,
+ dnxhd_probe,
ff_raw_video_read_header,
ff_raw_read_partial_packet,
.flags= AVFMT_GENERIC_INDEX,
- .value = CODEC_ID_DIRAC,
+ .value = CODEC_ID_DNXHD,
};
diff --git a/libavformat/raw.c b/libavformat/raw.c
index 2708e0e..7504b7e 100644
--- a/libavformat/raw.c
+++ b/libavformat/raw.c
@@ -241,26 +241,6 @@ int ff_raw_video_read_header(AVFormatContext *s,
}
#endif
-#if CONFIG_DNXHD_DEMUXER
-static int dnxhd_probe(AVProbeData *p)
-{
- static const uint8_t header[] = {0x00,0x00,0x02,0x80,0x01};
- int w, h, compression_id;
- if (p->buf_size < 0x2c)
- return 0;
- if (memcmp(p->buf, header, 5))
- return 0;
- h = AV_RB16(p->buf + 0x18);
- w = AV_RB16(p->buf + 0x1a);
- if (!w || !h)
- return 0;
- compression_id = AV_RB32(p->buf + 0x28);
- if (compression_id < 1237 || compression_id > 1253)
- return 0;
- return AVPROBE_SCORE_MAX;
-}
-#endif
-
#if CONFIG_AC3_DEMUXER || CONFIG_EAC3_DEMUXER
static int ac3_eac3_probe(AVProbeData *p, enum CodecID expected_codec_id)
{
@@ -363,19 +343,6 @@ AVOutputFormat dirac_muxer = {
};
#endif
-#if CONFIG_DNXHD_DEMUXER
-AVInputFormat dnxhd_demuxer = {
- "dnxhd",
- NULL_IF_CONFIG_SMALL("raw DNxHD (SMPTE VC-3)"),
- 0,
- dnxhd_probe,
- ff_raw_video_read_header,
- ff_raw_read_partial_packet,
- .flags= AVFMT_GENERIC_INDEX,
- .value = CODEC_ID_DNXHD,
-};
-#endif
-
#if CONFIG_DNXHD_MUXER
AVOutputFormat dnxhd_muxer = {
"dnxhd",
--
Libav/FFmpeg packaging
More information about the pkg-multimedia-commits
mailing list