[FFmpeg-cvslog] Introducing speex RTP demuxing (RFC 5574)
Dmitry Samonenko
git at videolan.org
Sun Sep 23 14:24:59 CEST 2012
ffmpeg | branch: master | Dmitry Samonenko <shreddingwork at gmail.com> | Sat Sep 22 14:39:03 2012 +0400| [697ea4fccf093dec5684cae9a90e1651071474d6] | committer: Michael Niedermayer
Introducing speex RTP demuxing (RFC 5574)
RTPDynamicProtocolHandler for speex is added. Initial support for
speex depacketization from RTP stream comes with it.
Currently, only codec audio rate can be applied based on sdp:
* Narrowband ( 8K)
* Wideband (16K)
* Ultrawideband (32K)
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=697ea4fccf093dec5684cae9a90e1651071474d6
---
libavformat/Makefile | 1 +
libavformat/rtpdec.c | 1 +
libavformat/rtpdec_formats.h | 1 +
libavformat/rtpdec_speex.c | 39 +++++++++++++++++++++++++++++++++++++++
4 files changed, 42 insertions(+)
diff --git a/libavformat/Makefile b/libavformat/Makefile
index 1040446..d6f8a1a 100644
--- a/libavformat/Makefile
+++ b/libavformat/Makefile
@@ -299,6 +299,7 @@ OBJS-$(CONFIG_RTPDEC) += rdt.o \
rtpdec_qcelp.o \
rtpdec_qdm2.o \
rtpdec_qt.o \
+ rtpdec_speex.o \
rtpdec_svq3.o \
rtpdec_vp8.o \
rtpdec_xiph.o
diff --git a/libavformat/rtpdec.c b/libavformat/rtpdec.c
index e480115..67c273a 100644
--- a/libavformat/rtpdec.c
+++ b/libavformat/rtpdec.c
@@ -78,6 +78,7 @@ void av_register_rtp_dynamic_payload_handlers(void)
ff_register_dynamic_payload_handler(&ff_vp8_dynamic_handler);
ff_register_dynamic_payload_handler(&ff_qcelp_dynamic_handler);
ff_register_dynamic_payload_handler(&ff_realmedia_mp3_dynamic_handler);
+ ff_register_dynamic_payload_handler(&ff_speex_dynamic_handler);
ff_register_dynamic_payload_handler(&ff_ms_rtp_asf_pfv_handler);
ff_register_dynamic_payload_handler(&ff_ms_rtp_asf_pfa_handler);
diff --git a/libavformat/rtpdec_formats.h b/libavformat/rtpdec_formats.h
index 471888b..9798c5d 100644
--- a/libavformat/rtpdec_formats.h
+++ b/libavformat/rtpdec_formats.h
@@ -58,6 +58,7 @@ extern RTPDynamicProtocolHandler ff_qt_rtp_aud_handler;
extern RTPDynamicProtocolHandler ff_qt_rtp_vid_handler;
extern RTPDynamicProtocolHandler ff_quicktime_rtp_aud_handler;
extern RTPDynamicProtocolHandler ff_quicktime_rtp_vid_handler;
+extern RTPDynamicProtocolHandler ff_speex_dynamic_handler;
extern RTPDynamicProtocolHandler ff_svq3_dynamic_handler;
extern RTPDynamicProtocolHandler ff_theora_dynamic_handler;
extern RTPDynamicProtocolHandler ff_vorbis_dynamic_handler;
diff --git a/libavformat/rtpdec_speex.c b/libavformat/rtpdec_speex.c
new file mode 100644
index 0000000..4e23090
--- /dev/null
+++ b/libavformat/rtpdec_speex.c
@@ -0,0 +1,39 @@
+/*
+ * RTP SPEEX Depacketizer, RFC 5574
+ * Copyright (c) 2012 Dmitry Samonenko
+ *
+ * This file is part of FFmpeg.
+ *
+ * FFmpeg is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * FFmpeg is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with FFmpeg; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+#include "avformat.h"
+#include "rtpdec_formats.h"
+#include "libavutil/avstring.h"
+
+static int speex_parse_sdp_line(AVFormatContext *s, int st_index,
+ PayloadContext *data, const char *line)
+{
+ av_log(s, AV_LOG_WARNING, "fmtp line parsing is not implemented yet\n");
+
+ return 0;
+}
+
+RTPDynamicProtocolHandler ff_speex_dynamic_handler = {
+ .enc_name = "speex",
+ .codec_type = AVMEDIA_TYPE_AUDIO,
+ .codec_id = AV_CODEC_ID_SPEEX,
+ .parse_sdp_a_line = speex_parse_sdp_line,
+};
More information about the ffmpeg-cvslog
mailing list