spring cleaning

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@4795 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
Anthony Minessale
2007-03-29 22:31:56 +00:00
parent a021945cef
commit 3a54126261
143 changed files with 22413 additions and 31567 deletions
+37 -45
View File
@@ -39,17 +39,13 @@
#define SWITCH_RTP_H
SWITCH_BEGIN_EXTERN_C
#define SWITCH_RTP_MAX_BUF_LEN 16384
///\defgroup rtp RTP (RealTime Transport Protocol)
///\ingroup core1
///\{
typedef void (*switch_rtp_invalid_handler_t)(switch_rtp_t *rtp_session,
switch_socket_t *sock,
void *data,
switch_size_t datalen,
switch_sockaddr_t *from_addr);
typedef void (*switch_rtp_invalid_handler_t) (switch_rtp_t *rtp_session,
switch_socket_t *sock,
void *data, switch_size_t datalen, switch_sockaddr_t *from_addr);
/*!
\brief Initilize the RTP System
@@ -77,15 +73,13 @@ SWITCH_DECLARE(switch_port_t) switch_rtp_request_port(void);
\param pool a memory pool to use for the session
\return the new RTP session or NULL on failure
*/
SWITCH_DECLARE(switch_status_t)switch_rtp_create(switch_rtp_t **new_rtp_session,
switch_payload_t payload,
uint32_t samples_per_interval,
uint32_t ms_per_packet,
switch_rtp_flag_t flags,
char *crypto_key,
char *timer_name,
const char **err,
switch_memory_pool_t *pool);
SWITCH_DECLARE(switch_status_t) switch_rtp_create(switch_rtp_t **new_rtp_session,
switch_payload_t payload,
uint32_t samples_per_interval,
uint32_t ms_per_packet,
switch_rtp_flag_t flags,
char *crypto_key,
char *timer_name, const char **err, switch_memory_pool_t *pool);
/*!
@@ -104,18 +98,16 @@ SWITCH_DECLARE(switch_status_t)switch_rtp_create(switch_rtp_t **new_rtp_session,
\param pool a memory pool to use for the session
\return the new RTP session or NULL on failure
*/
SWITCH_DECLARE(switch_rtp_t *)switch_rtp_new(char *rx_host,
switch_port_t rx_port,
char *tx_host,
switch_port_t tx_port,
switch_payload_t payload,
uint32_t samples_per_interval,
uint32_t ms_per_packet,
switch_rtp_flag_t flags,
char *crypto_key,
char *timer_name,
const char **err,
switch_memory_pool_t *pool);
SWITCH_DECLARE(switch_rtp_t *) switch_rtp_new(char *rx_host,
switch_port_t rx_port,
char *tx_host,
switch_port_t tx_port,
switch_payload_t payload,
uint32_t samples_per_interval,
uint32_t ms_per_packet,
switch_rtp_flag_t flags,
char *crypto_key,
char *timer_name, const char **err, switch_memory_pool_t *pool);
/*!
@@ -125,7 +117,8 @@ SWITCH_DECLARE(switch_rtp_t *)switch_rtp_new(char *rx_host,
\param port the remote port
\param err pointer for error messages
*/
SWITCH_DECLARE(switch_status_t) switch_rtp_set_remote_address(switch_rtp_t *rtp_session, char *host, switch_port_t port, const char **err);
SWITCH_DECLARE(switch_status_t) switch_rtp_set_remote_address(switch_rtp_t *rtp_session, char *host, switch_port_t port,
const char **err);
/*!
\brief Assign a local address to the RTP session
@@ -135,7 +128,8 @@ SWITCH_DECLARE(switch_status_t) switch_rtp_set_remote_address(switch_rtp_t *rtp_
\param err pointer for error messages
\note this call also binds the RTP session's socket to the new address
*/
SWITCH_DECLARE(switch_status_t) switch_rtp_set_local_address(switch_rtp_t *rtp_session, char *host, switch_port_t port, const char **err);
SWITCH_DECLARE(switch_status_t) switch_rtp_set_local_address(switch_rtp_t *rtp_session, char *host, switch_port_t port,
const char **err);
/*!
\brief Kill the socket on an existing RTP session
@@ -189,14 +183,15 @@ SWITCH_DECLARE(void) switch_rtp_clear_flag(switch_rtp_t *rtp_session, switch_rtp
\param rtp_session the RTP session to retrieve the socket from
\return the socket from the RTP session
*/
SWITCH_DECLARE(switch_socket_t *)switch_rtp_get_rtp_socket(switch_rtp_t *rtp_session);
SWITCH_DECLARE(switch_socket_t *) switch_rtp_get_rtp_socket(switch_rtp_t *rtp_session);
/*!
\brief Set the default samples per interval for a given RTP session
\param rtp_session the RTP session to set the samples per interval on
\param samples_per_interval the new default samples per interval
*/
SWITCH_DECLARE(void) switch_rtp_set_default_samples_per_interval(switch_rtp_t *rtp_session, uint16_t samples_per_interval);
SWITCH_DECLARE(void) switch_rtp_set_default_samples_per_interval(switch_rtp_t *rtp_session,
uint16_t samples_per_interval);
/*!
\brief Get the default samples per interval for a given RTP session
@@ -237,7 +232,8 @@ SWITCH_DECLARE(void) switch_rtp_set_invald_handler(switch_rtp_t *rtp_session, sw
\param flags flags
\return the number of bytes read
*/
SWITCH_DECLARE(switch_status_t) switch_rtp_read(switch_rtp_t *rtp_session, void *data, uint32_t *datalen, switch_payload_t *payload_type, switch_frame_flag_t *flags);
SWITCH_DECLARE(switch_status_t) switch_rtp_read(switch_rtp_t *rtp_session, void *data, uint32_t * datalen,
switch_payload_t *payload_type, switch_frame_flag_t *flags);
/*!
\brief Queue RFC2833 DTMF data into an RTP Session
@@ -282,9 +278,8 @@ SWITCH_DECLARE(switch_size_t) switch_rtp_dequeue_dtmf(switch_rtp_t *rtp_session,
*/
SWITCH_DECLARE(switch_status_t) switch_rtp_zerocopy_read(switch_rtp_t *rtp_session,
void **data,
uint32_t *datalen,
switch_payload_t *payload_type,
switch_frame_flag_t *flags);
uint32_t * datalen,
switch_payload_t *payload_type, switch_frame_flag_t *flags);
/*!
\brief Read data from a given RTP session without copying
@@ -303,7 +298,8 @@ SWITCH_DECLARE(switch_status_t) switch_rtp_zerocopy_read_frame(switch_rtp_t *rtp
\param flags frame flags
\return the number of bytes written
*/
SWITCH_DECLARE(int) switch_rtp_write(switch_rtp_t *rtp_session, void *data, uint32_t datalen, uint32_t ts, switch_frame_flag_t *flags);
SWITCH_DECLARE(int) switch_rtp_write(switch_rtp_t *rtp_session, void *data, uint32_t datalen, uint32_t ts,
switch_frame_flag_t *flags);
/*!
\brief Enable VAD on an RTP Session
@@ -313,7 +309,8 @@ SWITCH_DECLARE(int) switch_rtp_write(switch_rtp_t *rtp_session, void *data, uint
\param flags flags for control
\return SWITCH_STAUTS_SUCCESS on success
*/
SWITCH_DECLARE(switch_status_t) switch_rtp_enable_vad(switch_rtp_t *rtp_session, switch_core_session_t *session, switch_codec_t *codec, switch_vad_flag_t flags);
SWITCH_DECLARE(switch_status_t) switch_rtp_enable_vad(switch_rtp_t *rtp_session, switch_core_session_t *session,
switch_codec_t *codec, switch_vad_flag_t flags);
/*!
\brief Disable VAD on an RTP Session
@@ -349,10 +346,7 @@ SWITCH_DECLARE(int) switch_rtp_write_manual(switch_rtp_t *rtp_session,
uint16_t datalen,
uint8_t m,
switch_payload_t payload,
uint32_t ts,
uint16_t mseq,
uint32_t ssrc,
switch_frame_flag_t *flags);
uint32_t ts, uint16_t mseq, uint32_t ssrc, switch_frame_flag_t *flags);
/*!
\brief Retrieve the SSRC from a given RTP session
@@ -387,16 +381,14 @@ SWITCH_DECLARE(void) switch_rtp_set_cng_pt(switch_rtp_t *rtp_session, switch_pay
\param rtp_session the RTP session to retrieve the data from
\return the pointer to the private data
*/
SWITCH_DECLARE(void *)switch_rtp_get_private(switch_rtp_t *rtp_session);
SWITCH_DECLARE(void *) switch_rtp_get_private(switch_rtp_t *rtp_session);
/*!
\}
*/
SWITCH_END_EXTERN_C
#endif
/* For Emacs:
* Local Variables:
* mode:c