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:
Olle Johansson
2006-06-06 16:09:33 +00:00
parent 016034115e
commit 479181951a
6 changed files with 459 additions and 237 deletions

View File

@@ -40,13 +40,13 @@ extern "C" {
/* Codes for RTP-specific data - not defined by our AST_FORMAT codes */
/*! DTMF (RFC2833) */
#define AST_RTP_DTMF (1 << 0)
#define AST_RTP_DTMF (1 << 0)
/*! 'Comfort Noise' (RFC3389) */
#define AST_RTP_CN (1 << 1)
#define AST_RTP_CN (1 << 1)
/*! DTMF (Cisco Proprietary) */
#define AST_RTP_CISCO_DTMF (1 << 2)
#define AST_RTP_CISCO_DTMF (1 << 2)
/*! Maximum RTP-specific code */
#define AST_RTP_MAX AST_RTP_CISCO_DTMF
#define AST_RTP_MAX AST_RTP_CISCO_DTMF
#define MAX_RTP_PT 256
@@ -62,6 +62,9 @@ struct ast_rtp_protocol {
AST_LIST_ENTRY(ast_rtp_protocol) list;
};
#define FLAG_3389_WARNING (1 << 0)
typedef int (*ast_rtp_callback)(struct ast_rtp *rtp, struct ast_frame *f, void *data);
@@ -71,7 +74,6 @@ typedef int (*ast_rtp_callback)(struct ast_rtp *rtp, struct ast_frame *f, void *
* RTP session is defined on page 9 of RFC 3550: "An association among a set of participants communicating with RTP. A participant may be involved in multiple RTP sessions at the same time [...]"
*
*/
/*! \brief The value of each payload format mapping: */
struct rtpPayloadType {
int isAstFormat; /*!< whether the following code is an AST_FORMAT */

View File

@@ -23,7 +23,8 @@
#ifndef _ASTERISK_TRANSLATE_H
#define _ASTERISK_TRANSLATE_H
#define MAX_FORMAT 32
//#define MAX_FORMAT 15 /* Do not include video here */
#define MAX_FORMAT 32 /* Do include video here */
#if defined(__cplusplus) || defined(c_plusplus)
extern "C" {