[FFmpeg-devel] [PATCH]lavf/rawenc: Add a gsm muxer
Carl Eugen Hoyos
cehoyos at ag.or.at
Tue Apr 5 12:10:03 CEST 2016
On Saturday 02 April 2016 03:23:31 pm Michael Niedermayer wrote:
> On Sat, Apr 02, 2016 at 10:29:20AM +0200, Carl Eugen Hoyos wrote:
> > Hi!
> >
> > Attached is a probe function for gsm and a patch for a gsm muxer to allow
> > testing. The file format is for example supported by sox.
> >
> > Please comment, Carl Eugen
>
> breaks fate-gif-deal somehow
Cool effect, new muxer patch attached.
Thank you, Carl Eugen
-------------- next part --------------
diff --git a/libavformat/Makefile b/libavformat/Makefile
index a54e6cb..77b6730 100644
--- a/libavformat/Makefile
+++ b/libavformat/Makefile
@@ -180,6 +180,7 @@ OBJS-$(CONFIG_FSB_DEMUXER) += fsb.o
OBJS-$(CONFIG_GIF_MUXER) += gif.o
OBJS-$(CONFIG_GIF_DEMUXER) += gifdec.o
OBJS-$(CONFIG_GSM_DEMUXER) += gsmdec.o
+OBJS-$(CONFIG_GSM_MUXER) += rawenc.o
OBJS-$(CONFIG_GXF_DEMUXER) += gxf.o
OBJS-$(CONFIG_GXF_MUXER) += gxfenc.o audiointerleave.o
OBJS-$(CONFIG_G722_DEMUXER) += g722.o rawdec.o
diff --git a/libavformat/allformats.c b/libavformat/allformats.c
index 94f258d..80f6d28 100644
--- a/libavformat/allformats.c
+++ b/libavformat/allformats.c
@@ -138,7 +138,7 @@ void av_register_all(void)
REGISTER_DEMUXER (G729, g729);
REGISTER_DEMUXER (GENH, genh);
REGISTER_MUXDEMUX(GIF, gif);
- REGISTER_DEMUXER (GSM, gsm);
+ REGISTER_MUXDEMUX(GSM, gsm);
REGISTER_MUXDEMUX(GXF, gxf);
REGISTER_MUXDEMUX(H261, h261);
REGISTER_MUXDEMUX(H263, h263);
diff --git a/libavformat/rawenc.c b/libavformat/rawenc.c
index 358ee4e..14ba9fb 100644
--- a/libavformat/rawenc.c
+++ b/libavformat/rawenc.c
@@ -193,6 +193,20 @@ AVOutputFormat ff_g723_1_muxer = {
};
#endif
+#if CONFIG_GSM_MUXER
+AVOutputFormat ff_gsm_muxer = {
+ .name = "gsm",
+ .long_name = NULL_IF_CONFIG_SMALL("raw GSM"),
+ .mime_type = "audio/x-gsm",
+ .extensions = "gsm",
+ .audio_codec = AV_CODEC_ID_GSM,
+ .video_codec = AV_CODEC_ID_NONE,
+ .write_header = force_one_stream,
+ .write_packet = ff_raw_write_packet,
+ .flags = AVFMT_NOTIMESTAMPS,
+};
+#endif
+
#if CONFIG_H261_MUXER
AVOutputFormat ff_h261_muxer = {
.name = "h261",
More information about the ffmpeg-devel
mailing list