comparison sdp.c @ 2958:b489d30f8685 libavformat

Add minimal support for H.264 video in the SDP generator
author lucabe
date Mon, 21 Jan 2008 11:09:06 +0000
parents c2588e541432
children b9a3b81c5eb8
comparison
equal deleted inserted replaced
2957:86702257e2cf 2958:b489d30f8685
135 static char *sdp_media_attributes(char *buff, int size, AVCodecContext *c, int payload_type) 135 static char *sdp_media_attributes(char *buff, int size, AVCodecContext *c, int payload_type)
136 { 136 {
137 char *config = NULL; 137 char *config = NULL;
138 138
139 switch (c->codec_id) { 139 switch (c->codec_id) {
140 case CODEC_ID_H264:
141 av_strlcatf(buff, size, "a=rtpmap:%d H264/90000\r\n"
142 "a=fmtp:%d packetization-mode=1%s\r\n",
143 payload_type,
144 payload_type, config ? config : "");
145 break;
140 case CODEC_ID_MPEG4: 146 case CODEC_ID_MPEG4:
141 if (c->extradata_size) { 147 if (c->extradata_size) {
142 config = extradata2config(c); 148 config = extradata2config(c);
143 } 149 }
144 av_strlcatf(buff, size, "a=rtpmap:%d MP4V-ES/90000\r\n" 150 av_strlcatf(buff, size, "a=rtpmap:%d MP4V-ES/90000\r\n"