mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-08-13 01:26:58 +00:00
standardize to some more specific int types for frame size and rate variables.
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@1095 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
@@ -67,7 +67,7 @@ struct switch_rtp {
|
||||
srtp_ctx_t *recv_ctx;
|
||||
|
||||
uint16_t seq;
|
||||
uint32_t payload;
|
||||
uint8_t payload;
|
||||
|
||||
switch_rtp_invalid_handler invalid_handler;
|
||||
void *private_data;
|
||||
@@ -80,7 +80,7 @@ struct switch_rtp {
|
||||
char *ice_user;
|
||||
char *user_ice;
|
||||
switch_time_t last_stun;
|
||||
switch_size_t packet_size;
|
||||
uint32_t packet_size;
|
||||
switch_time_t last_read;
|
||||
switch_time_t next_read;
|
||||
uint32_t ms_per_packet;
|
||||
@@ -240,8 +240,8 @@ SWITCH_DECLARE(switch_status) switch_rtp_set_remote_address(switch_rtp *rtp_sess
|
||||
}
|
||||
|
||||
SWITCH_DECLARE(switch_status) switch_rtp_create(switch_rtp **new_rtp_session,
|
||||
int payload,
|
||||
switch_size_t packet_size,
|
||||
uint8_t payload,
|
||||
uint32_t packet_size,
|
||||
uint32_t ms_per_packet,
|
||||
switch_rtp_flag_t flags,
|
||||
const char **err,
|
||||
@@ -327,8 +327,8 @@ SWITCH_DECLARE(switch_rtp *)switch_rtp_new(char *rx_host,
|
||||
switch_port_t rx_port,
|
||||
char *tx_host,
|
||||
switch_port_t tx_port,
|
||||
int payload,
|
||||
switch_size_t packet_size,
|
||||
uint8_t payload,
|
||||
uint32_t packet_size,
|
||||
uint32_t ms_per_packet,
|
||||
switch_rtp_flag_t flags,
|
||||
const char **err,
|
||||
@@ -391,7 +391,7 @@ SWITCH_DECLARE(switch_socket_t *)switch_rtp_get_rtp_socket(switch_rtp *rtp_sessi
|
||||
return rtp_session->sock;
|
||||
}
|
||||
|
||||
SWITCH_DECLARE(void) switch_rtp_set_default_packet_size(switch_rtp *rtp_session, uint32_t packet_size)
|
||||
SWITCH_DECLARE(void) switch_rtp_set_default_packet_size(switch_rtp *rtp_session, uint16_t packet_size)
|
||||
{
|
||||
rtp_session->packet_size = packet_size;
|
||||
}
|
||||
@@ -401,7 +401,7 @@ SWITCH_DECLARE(uint32_t) switch_rtp_get_default_packet_size(switch_rtp *rtp_sess
|
||||
return rtp_session->packet_size;
|
||||
}
|
||||
|
||||
SWITCH_DECLARE(void) switch_rtp_set_default_payload(switch_rtp *rtp_session, uint32_t payload)
|
||||
SWITCH_DECLARE(void) switch_rtp_set_default_payload(switch_rtp *rtp_session, uint8_t payload)
|
||||
{
|
||||
rtp_session->payload = payload;
|
||||
}
|
||||
@@ -501,7 +501,7 @@ SWITCH_DECLARE(int) switch_rtp_zerocopy_read(switch_rtp *rtp_session, void **dat
|
||||
return bytes;
|
||||
}
|
||||
|
||||
static int rtp_common_write(switch_rtp *rtp_session, void *data, int datalen, int payload)
|
||||
static int rtp_common_write(switch_rtp *rtp_session, void *data, uint32_t datalen, uint8_t payload)
|
||||
{
|
||||
switch_size_t bytes;
|
||||
|
||||
@@ -536,7 +536,7 @@ static int rtp_common_write(switch_rtp *rtp_session, void *data, int datalen, in
|
||||
|
||||
}
|
||||
|
||||
SWITCH_DECLARE(int) switch_rtp_write(switch_rtp *rtp_session, void *data, int datalen, uint32_t ts)
|
||||
SWITCH_DECLARE(int) switch_rtp_write(switch_rtp *rtp_session, void *data, uint32_t datalen, uint32_t ts)
|
||||
{
|
||||
|
||||
if (!switch_test_flag(rtp_session, SWITCH_RTP_FLAG_IO) || !rtp_session->remote_addr) {
|
||||
@@ -548,13 +548,13 @@ SWITCH_DECLARE(int) switch_rtp_write(switch_rtp *rtp_session, void *data, int da
|
||||
rtp_session->seq = htons(rtp_session->seq);
|
||||
rtp_session->send_msg.header.seq = rtp_session->seq;
|
||||
rtp_session->send_msg.header.ts = htonl(rtp_session->ts);
|
||||
rtp_session->payload = htonl(rtp_session->payload);
|
||||
rtp_session->payload = (uint8_t)htonl(rtp_session->payload);
|
||||
|
||||
return rtp_common_write(rtp_session, data, datalen, rtp_session->payload);
|
||||
|
||||
}
|
||||
|
||||
SWITCH_DECLARE(int) switch_rtp_write_payload(switch_rtp *rtp_session, void *data, int datalen, uint8_t payload, uint32_t ts, uint16_t mseq)
|
||||
SWITCH_DECLARE(int) switch_rtp_write_payload(switch_rtp *rtp_session, void *data, uint16_t datalen, uint8_t payload, uint32_t ts, uint16_t mseq)
|
||||
{
|
||||
|
||||
if (!switch_test_flag(rtp_session, SWITCH_RTP_FLAG_IO) || !rtp_session->remote_addr) {
|
||||
|
Reference in New Issue
Block a user