mirror of
https://github.com/asterisk/asterisk.git
synced 2025-10-16 09:46:22 +00:00
Merge of the "sdpcleanup" branch. Thanks to John Martin for a lot of tests
and some patches (all disclaimed). - Don't change RTP properties if we reject a re-INVITE - Don't add video to an outbound channel if there's no video on the inbound channel - Don't include video in the "preferred codec" list for codec selection - Clean up and document code that parses and adds SDP attachments Since we do not transcode video, we can't handle video the same way as audio. This is a bug fix patch. In future releases, we need to work on a solution for video negotiation, not codecs but formats and framerates instead. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@32597 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
7
rtp.c
7
rtp.c
@@ -1350,7 +1350,7 @@ int ast_rtp_make_compatible(struct ast_channel *dest, struct ast_channel *src, i
|
||||
return 1;
|
||||
}
|
||||
|
||||
/*! \brief Make a note of a RTP paymoad type that was seen in a SDP "m=" line.
|
||||
/*! \brief Make a note of a RTP payload type that was seen in a SDP "m=" line.
|
||||
* By default, use the well-known value for this type (although it may
|
||||
* still be set to a different value by a subsequent "a=rtpmap:" line)
|
||||
*/
|
||||
@@ -1359,9 +1359,8 @@ void ast_rtp_set_m_type(struct ast_rtp* rtp, int pt)
|
||||
if (pt < 0 || pt > MAX_RTP_PT)
|
||||
return; /* bogus payload type */
|
||||
|
||||
if (static_RTP_PT[pt].code != 0) {
|
||||
if (static_RTP_PT[pt].code != 0)
|
||||
rtp->current_RTP_PT[pt] = static_RTP_PT[pt];
|
||||
}
|
||||
}
|
||||
|
||||
/*! \brief Make a note of a RTP payload type (with MIME type) that was seen in
|
||||
@@ -2245,7 +2244,7 @@ int ast_rtp_write(struct ast_rtp *rtp, struct ast_frame *_f)
|
||||
|
||||
/* Make sure we have enough space for RTP header */
|
||||
if ((_f->frametype != AST_FRAME_VOICE) && (_f->frametype != AST_FRAME_VIDEO)) {
|
||||
ast_log(LOG_WARNING, "RTP can only send voice\n");
|
||||
ast_log(LOG_WARNING, "RTP can only send voice and video\n");
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user