diff options
author | Dmitry Samonenko <shreddingwork@gmail.com> | 2012-09-22 14:32:37 +0400 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2012-09-23 14:08:48 +0200 |
commit | b024c41e1e915e810d4760254622bcc5c0612c6d (patch) | |
tree | d6b3a480f2d386efbb3082785ab8a1fef1b07722 | |
parent | fecfdf6e72bd29c90f6b98d5dbca631469b374ec (diff) | |
download | ffmpeg-streaming-b024c41e1e915e810d4760254622bcc5c0612c6d.zip ffmpeg-streaming-b024c41e1e915e810d4760254622bcc5c0612c6d.tar.gz |
Add initial support for speex RTP packetization (RFC 5574)
* libspeex audio codec is no longer considered unsupported
when using rtp as output format.
* SDP rtpmap is added for speex payload, formatted according to RFC
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r-- | libavformat/rtpenc.c | 1 | ||||
-rw-r--r-- | libavformat/sdp.c | 4 |
2 files changed, 5 insertions, 0 deletions
diff --git a/libavformat/rtpenc.c b/libavformat/rtpenc.c index dc905e6..3a3e3d8 100644 --- a/libavformat/rtpenc.c +++ b/libavformat/rtpenc.c @@ -75,6 +75,7 @@ static int is_supported(enum AVCodecID id) case AV_CODEC_ID_ADPCM_G722: case AV_CODEC_ID_ADPCM_G726: case AV_CODEC_ID_ILBC: + case AV_CODEC_ID_SPEEX: return 1; default: return 0; diff --git a/libavformat/sdp.c b/libavformat/sdp.c index 9d7dc0b..8ff4325 100644 --- a/libavformat/sdp.c +++ b/libavformat/sdp.c @@ -567,6 +567,10 @@ static char *sdp_write_media_attributes(char *buff, int size, AVCodecContext *c, payload_type, c->sample_rate, payload_type, c->block_align == 38 ? 20 : 30); break; + case AV_CODEC_ID_SPEEX: + av_strlcatf(buff, size, "a=rtpmap:%d speex/%d\r\n", + payload_type, c->sample_rate); + default: /* Nothing special to do here... */ break; |