[FFmpeg-cvslog] r25087 - in trunk/libavformat: Makefile allformats.c avformat.h rawdec.c rawenc.c

mstorsjo subversion
Thu Sep 9 21:27:42 CEST 2010


Author: mstorsjo
Date: Thu Sep  9 21:27:41 2010
New Revision: 25087

Log:
Add a muxer and demuxer for raw G.722

Modified:
   trunk/libavformat/Makefile
   trunk/libavformat/allformats.c
   trunk/libavformat/avformat.h
   trunk/libavformat/rawdec.c
   trunk/libavformat/rawenc.c

Modified: trunk/libavformat/Makefile
==============================================================================
--- trunk/libavformat/Makefile	Thu Sep  9 21:21:16 2010	(r25086)
+++ trunk/libavformat/Makefile	Thu Sep  9 21:27:41 2010	(r25087)
@@ -85,6 +85,8 @@ OBJS-$(CONFIG_GIF_MUXER)                
 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

Modified: trunk/libavformat/allformats.c
==============================================================================
--- trunk/libavformat/allformats.c	Thu Sep  9 21:21:16 2010	(r25086)
+++ trunk/libavformat/allformats.c	Thu Sep  9 21:27:41 2010	(r25087)
@@ -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);

Modified: trunk/libavformat/avformat.h
==============================================================================
--- trunk/libavformat/avformat.h	Thu Sep  9 21:21:16 2010	(r25086)
+++ trunk/libavformat/avformat.h	Thu Sep  9 21:27:41 2010	(r25087)
@@ -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, \

Modified: trunk/libavformat/rawdec.c
==============================================================================
--- trunk/libavformat/rawdec.c	Thu Sep  9 21:21:16 2010	(r25086)
+++ trunk/libavformat/rawdec.c	Thu Sep  9 21:27:41 2010	(r25087)
@@ -137,6 +137,20 @@ int ff_raw_video_read_header(AVFormatCon
 
 /* 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",

Modified: trunk/libavformat/rawenc.c
==============================================================================
--- trunk/libavformat/rawenc.c	Thu Sep  9 21:21:16 2010	(r25086)
+++ trunk/libavformat/rawenc.c	Thu Sep  9 21:27:41 2010	(r25087)
@@ -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",



More information about the ffmpeg-cvslog mailing list