mirror of
https://github.com/signalwire/freeswitch.git
synced 2026-07-24 05:02:10 +00:00
Add optional packetization and VAD buster options to RTP
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@1090 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
@@ -73,16 +73,20 @@ SWITCH_DECLARE(switch_port_t) switch_rtp_request_port(void);
|
||||
\brief create a new RTP session handle
|
||||
\param new_rtp_session a poiter to aim at the new session
|
||||
\param payload the IANA payload number
|
||||
\param packet_size the default packet_size
|
||||
\param ms_per_packet time in microseconds per packet
|
||||
\param flags flags to control behaviour
|
||||
\param err a pointer to resolve error messages
|
||||
\param pool a memory pool to use for the session
|
||||
\return the new RTP session or NULL on failure
|
||||
*/
|
||||
SWITCH_DECLARE(switch_status)switch_rtp_create(switch_rtp **new_rtp_session,
|
||||
int payload,
|
||||
switch_rtp_flag_t flags,
|
||||
const char **err,
|
||||
switch_memory_pool *pool);
|
||||
int payload,
|
||||
switch_size_t packet_size,
|
||||
uint32_t ms_per_packet,
|
||||
switch_rtp_flag_t flags,
|
||||
const char **err,
|
||||
switch_memory_pool *pool);
|
||||
|
||||
|
||||
/*!
|
||||
@@ -92,6 +96,8 @@ SWITCH_DECLARE(switch_status)switch_rtp_create(switch_rtp **new_rtp_session,
|
||||
\param tx_host the remote address
|
||||
\param tx_port the remote port
|
||||
\param payload the IANA payload number
|
||||
\param packet_size the default packet_size
|
||||
\param ms_per_packet time in microseconds per packet
|
||||
\param flags flags to control behaviour
|
||||
\param err a pointer to resolve error messages
|
||||
\param pool a memory pool to use for the session
|
||||
@@ -102,6 +108,8 @@ SWITCH_DECLARE(switch_rtp *)switch_rtp_new(char *rx_host,
|
||||
char *tx_host,
|
||||
switch_port_t tx_port,
|
||||
int payload,
|
||||
switch_size_t packet_size,
|
||||
uint32_t ms_per_packet,
|
||||
switch_rtp_flag_t flags,
|
||||
const char **err,
|
||||
switch_memory_pool *pool);
|
||||
@@ -151,6 +159,20 @@ SWITCH_DECLARE(switch_status) switch_rtp_activate_ice(switch_rtp *rtp_session, c
|
||||
*/
|
||||
SWITCH_DECLARE(switch_socket_t *)switch_rtp_get_rtp_socket(switch_rtp *rtp_session);
|
||||
|
||||
/*!
|
||||
\brief Set the default packet size for a given RTP session
|
||||
\param rtp_session the RTP session to set the packet size on
|
||||
\param packet_size the new default packet size
|
||||
*/
|
||||
SWITCH_DECLARE(void) switch_rtp_set_default_packet_size(switch_rtp *rtp_session, uint32_t packet_size);
|
||||
|
||||
/*!
|
||||
\brief Get the default packet size for a given RTP session
|
||||
\param rtp_session the RTP session to get the packet size from
|
||||
\return the default packet_size of the RTP session
|
||||
*/
|
||||
SWITCH_DECLARE(uint32_t) switch_rtp_get_default_packet_size(switch_rtp *rtp_session);
|
||||
|
||||
/*!
|
||||
\brief Set the default payload number for a given RTP session
|
||||
\param rtp_session the RTP session to set the payload number on
|
||||
|
||||
@@ -98,13 +98,15 @@ SWITCH_DECLARE_DATA extern switch_directories SWITCH_GLOBAL_dirs;
|
||||
\enum switch_rtp_flag_t
|
||||
\brief RTP Related Flags
|
||||
<pre>
|
||||
SWITCH_RTP_NOBLOCK - Do not block
|
||||
SWITCH_RTP_FLAG_IO - IO is ready
|
||||
SWITCH_RTP_FLAG_NOBLOCK - Do not block
|
||||
SWITCH_RTP_FLAG_IO - IO is ready
|
||||
SWITCH_RTP_FLAG_USE_TIMER - Timeout Reads and replace with a CNG Frame
|
||||
</pre>
|
||||
*/
|
||||
typedef enum {
|
||||
SWITCH_RTP_NOBLOCK = ( 1 << 0),
|
||||
SWITCH_RTP_FLAG_IO = (1 << 1)
|
||||
SWITCH_RTP_FLAG_NOBLOCK = ( 1 << 0),
|
||||
SWITCH_RTP_FLAG_IO = (1 << 1),
|
||||
SWITCH_RTP_FLAG_USE_TIMER = (1 << 2)
|
||||
} switch_rtp_flag_t;
|
||||
|
||||
/*!
|
||||
|
||||
Reference in New Issue
Block a user