diff options
author | Thomas Volkert <thomas@homer-conferencing.com> | 2014-12-06 19:54:07 +0100 |
---|---|---|
committer | Martin Storsjö <martin@martin.st> | 2014-12-18 23:11:37 +0200 |
commit | a505c0d7373336a4cc5aa2022111c46bdd388b1f (patch) | |
tree | 1209231eab3ba771201b13e40b97f36b9496e2e5 /libavformat/sdp.c | |
parent | adc214e6797750285a5e62634b8521db521162ad (diff) | |
download | ffmpeg-a505c0d7373336a4cc5aa2022111c46bdd388b1f.tar.gz |
rtp: Initial H.261 support
The packetizer only supports splitting at GOB headers - if
such aren't available frequently enough, it splits at any
random byte offset (not at a macroblock boundary either, which
would be allowed by the spec) and sends a payload header pretend
that it starts with a GOB header.
As long as a receiver doesn't try to handle such cases cleverly
but just drops broken frames, this shouldn't matter too much
in practice.
Signed-off-by: Martin Storsjö <martin@martin.st>
Diffstat (limited to 'libavformat/sdp.c')
-rw-r--r-- | libavformat/sdp.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/libavformat/sdp.c b/libavformat/sdp.c index a14a2392b5..fe43e04361 100644 --- a/libavformat/sdp.c +++ b/libavformat/sdp.c @@ -498,6 +498,20 @@ static char *sdp_write_media_attributes(char *buff, int size, AVCodecContext *c, payload_type, mode, config ? config : ""); break; } + case AV_CODEC_ID_H261: + { + const char *pic_fmt = NULL; + /* only QCIF and CIF are specified as supported in RFC 4587 */ + if (c->width == 176 && c->height == 144) + pic_fmt = "QCIF=1"; + else if (c->width == 352 && c->height == 288) + pic_fmt = "CIF=1"; + if (payload_type >= RTP_PT_PRIVATE) + av_strlcatf(buff, size, "a=rtpmap:%d H261/90000\r\n", payload_type); + if (pic_fmt) + av_strlcatf(buff, size, "a=fmtp:%d %s\r\n", payload_type, pic_fmt); + break; + } case AV_CODEC_ID_H263: case AV_CODEC_ID_H263P: /* a=framesize is required by 3GPP TS 26.234 (PSS). It |