1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-23 12:43:46 +02:00

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@gmx.at>
This commit is contained in:
Dmitry Samonenko 2012-09-22 14:39:03 +04:00 committed by Michael Niedermayer
parent b024c41e1e
commit 697ea4fccf
4 changed files with 42 additions and 0 deletions

View File

@ -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

View File

@ -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);

View File

@ -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;

View File

@ -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,
};