mirror of
https://github.com/asterisk/asterisk.git
synced 2025-11-15 22:38:08 +00:00
Bug #6109: Fix unprotected list in RTP, implement AST_LIST macros, update doxygen docs
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@7730 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -26,12 +26,13 @@
|
||||
#ifndef _ASTERISK_RTP_H
|
||||
#define _ASTERISK_RTP_H
|
||||
|
||||
#include <netinet/in.h>
|
||||
|
||||
#include "asterisk/frame.h"
|
||||
#include "asterisk/io.h"
|
||||
#include "asterisk/sched.h"
|
||||
#include "asterisk/channel.h"
|
||||
|
||||
#include <netinet/in.h>
|
||||
#include "asterisk/linkedlists.h"
|
||||
|
||||
#if defined(__cplusplus) || defined(c_plusplus)
|
||||
extern "C" {
|
||||
@@ -48,15 +49,15 @@ extern "C" {
|
||||
#define AST_RTP_MAX AST_RTP_CISCO_DTMF
|
||||
|
||||
struct ast_rtp_protocol {
|
||||
/* Get RTP struct, or NULL if unwilling to transfer */
|
||||
/*! Get RTP struct, or NULL if unwilling to transfer */
|
||||
struct ast_rtp *(* const get_rtp_info)(struct ast_channel *chan);
|
||||
/* Get RTP struct, or NULL if unwilling to transfer */
|
||||
/*! Get RTP struct, or NULL if unwilling to transfer */
|
||||
struct ast_rtp *(* const get_vrtp_info)(struct ast_channel *chan);
|
||||
/* Set RTP peer */
|
||||
/*! Set RTP peer */
|
||||
int (* const set_rtp_peer)(struct ast_channel *chan, struct ast_rtp *peer, struct ast_rtp *vpeer, int codecs, int nat_active);
|
||||
int (* const get_codec)(struct ast_channel *chan);
|
||||
const char * const type;
|
||||
struct ast_rtp_protocol *next;
|
||||
AST_LIST_ENTRY(ast_rtp_protocol) list;
|
||||
};
|
||||
|
||||
/*!
|
||||
@@ -124,25 +125,25 @@ int ast_rtp_sendcng(struct ast_rtp *rtp, int level);
|
||||
|
||||
int ast_rtp_settos(struct ast_rtp *rtp, int tos);
|
||||
|
||||
/* Setting RTP payload types from lines in a SDP description: */
|
||||
/*! \brief Setting RTP payload types from lines in a SDP description: */
|
||||
void ast_rtp_pt_clear(struct ast_rtp* rtp);
|
||||
/* Set payload types to defaults */
|
||||
/*! \brief Set payload types to defaults */
|
||||
void ast_rtp_pt_default(struct ast_rtp* rtp);
|
||||
void ast_rtp_set_m_type(struct ast_rtp* rtp, int pt);
|
||||
void ast_rtp_set_rtpmap_type(struct ast_rtp* rtp, int pt,
|
||||
char* mimeType, char* mimeSubtype);
|
||||
|
||||
/* Mapping between RTP payload format codes and Asterisk codes: */
|
||||
/*! \brief Mapping between RTP payload format codes and Asterisk codes: */
|
||||
struct rtpPayloadType ast_rtp_lookup_pt(struct ast_rtp* rtp, int pt);
|
||||
int ast_rtp_lookup_code(struct ast_rtp* rtp, int isAstFormat, int code);
|
||||
|
||||
void ast_rtp_get_current_formats(struct ast_rtp* rtp,
|
||||
int* astFormats, int* nonAstFormats);
|
||||
|
||||
/* Mapping an Asterisk code into a MIME subtype (string): */
|
||||
/*! \brief Mapping an Asterisk code into a MIME subtype (string): */
|
||||
char* ast_rtp_lookup_mime_subtype(int isAstFormat, int code);
|
||||
|
||||
/* Build a string of MIME subtype names from a capability list */
|
||||
/*! \brief Build a string of MIME subtype names from a capability list */
|
||||
char *ast_rtp_lookup_mime_multiple(char *buf, int size, const int capability, const int isAstFormat);
|
||||
|
||||
void ast_rtp_setnat(struct ast_rtp *rtp, int nat);
|
||||
|
||||
Reference in New Issue
Block a user