aboutsummaryrefslogtreecommitdiffstats
path: root/libavformat
diff options
context:
space:
mode:
authorMartin Storsjö <martin@martin.st>2010-09-09 19:27:41 +0000
committerMartin Storsjö <martin@martin.st>2010-09-09 19:27:41 +0000
commit9013560f13308642a00e6dab038b3cb5d820a81e (patch)
tree7c436cad32b762b2c201edff42a3108ac855d5d9 /libavformat
parent58e37eafce10bbcf10b111cafb7ba8586c76ef4b (diff)
downloadffmpeg-9013560f13308642a00e6dab038b3cb5d820a81e.tar.gz
Add a muxer and demuxer for raw G.722
Originally committed as revision 25087 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat')
-rw-r--r--libavformat/Makefile2
-rw-r--r--libavformat/allformats.c1
-rw-r--r--libavformat/avformat.h2
-rw-r--r--libavformat/rawdec.c14
-rw-r--r--libavformat/rawenc.c15
5 files changed, 33 insertions, 1 deletions
diff --git a/libavformat/Makefile b/libavformat/Makefile
index 7955b80893..50ff5deb60 100644
--- a/libavformat/Makefile
+++ b/libavformat/Makefile
@@ -85,6 +85,8 @@ OBJS-$(CONFIG_GIF_MUXER) += gif.o
OBJS-$(CONFIG_GSM_DEMUXER) += rawdec.o
OBJS-$(CONFIG_GXF_DEMUXER) += gxf.o
OBJS-$(CONFIG_GXF_MUXER) += gxfenc.o audiointerleave.o
+OBJS-$(CONFIG_G722_DEMUXER) += rawdec.o
+OBJS-$(CONFIG_G722_MUXER) += rawenc.o
OBJS-$(CONFIG_H261_DEMUXER) += h261dec.o rawdec.o
OBJS-$(CONFIG_H261_MUXER) += rawenc.o
OBJS-$(CONFIG_H263_DEMUXER) += h263dec.o rawdec.o
diff --git a/libavformat/allformats.c b/libavformat/allformats.c
index 6e73e825e2..f9407f0574 100644
--- a/libavformat/allformats.c
+++ b/libavformat/allformats.c
@@ -92,6 +92,7 @@ void av_register_all(void)
REGISTER_DEMUXER (FOURXM, fourxm);
REGISTER_MUXER (FRAMECRC, framecrc);
REGISTER_MUXER (FRAMEMD5, framemd5);
+ REGISTER_MUXDEMUX (G722, g722);
REGISTER_MUXER (GIF, gif);
REGISTER_DEMUXER (GSM, gsm);
REGISTER_MUXDEMUX (GXF, gxf);
diff --git a/libavformat/avformat.h b/libavformat/avformat.h
index b95aaa4685..441f807b80 100644
--- a/libavformat/avformat.h
+++ b/libavformat/avformat.h
@@ -23,7 +23,7 @@
#define LIBAVFORMAT_VERSION_MAJOR 52
#define LIBAVFORMAT_VERSION_MINOR 78
-#define LIBAVFORMAT_VERSION_MICRO 3
+#define LIBAVFORMAT_VERSION_MICRO 4
#define LIBAVFORMAT_VERSION_INT AV_VERSION_INT(LIBAVFORMAT_VERSION_MAJOR, \
LIBAVFORMAT_VERSION_MINOR, \
diff --git a/libavformat/rawdec.c b/libavformat/rawdec.c
index e093969414..fe25014950 100644
--- a/libavformat/rawdec.c
+++ b/libavformat/rawdec.c
@@ -137,6 +137,20 @@ int ff_raw_video_read_header(AVFormatContext *s,
/* Note: Do not forget to add new entries to the Makefile as well. */
+#if CONFIG_G722_DEMUXER
+AVInputFormat g722_demuxer = {
+ "g722",
+ NULL_IF_CONFIG_SMALL("raw G.722"),
+ 0,
+ NULL,
+ ff_raw_read_header,
+ ff_raw_read_partial_packet,
+ .flags= AVFMT_GENERIC_INDEX,
+ .extensions = "g722,722",
+ .value = CODEC_ID_ADPCM_G722,
+};
+#endif
+
#if CONFIG_GSM_DEMUXER
AVInputFormat gsm_demuxer = {
"gsm",
diff --git a/libavformat/rawenc.c b/libavformat/rawenc.c
index 119292d428..5a116b189e 100644
--- a/libavformat/rawenc.c
+++ b/libavformat/rawenc.c
@@ -107,6 +107,21 @@ AVOutputFormat eac3_muxer = {
};
#endif
+#if CONFIG_G722_MUXER
+AVOutputFormat g722_muxer = {
+ "g722",
+ NULL_IF_CONFIG_SMALL("raw G.722"),
+ "audio/G722",
+ "g722",
+ 0,
+ CODEC_ID_ADPCM_G722,
+ CODEC_ID_NONE,
+ NULL,
+ ff_raw_write_packet,
+ .flags= AVFMT_NOTIMESTAMPS,
+};
+#endif
+
#if CONFIG_H261_MUXER
AVOutputFormat h261_muxer = {
"h261",