constify some function arg pointers
Change-Id: I7a7560fad96719da01f1ee30eea0be0e52c60e99
This commit is contained in:
parent
4c77e9b748
commit
8358c4ba07
|
@ -152,7 +152,7 @@ void mgcp_cleanup_e1_bridge_cb(struct mgcp_endpoint *endp, struct mgcp_conn *con
|
||||||
int mgcp_bind_net_rtp_port(struct mgcp_endpoint *endp, int rtp_port,
|
int mgcp_bind_net_rtp_port(struct mgcp_endpoint *endp, int rtp_port,
|
||||||
struct mgcp_conn_rtp *conn);
|
struct mgcp_conn_rtp *conn);
|
||||||
void mgcp_free_rtp_port(struct mgcp_rtp_end *end);
|
void mgcp_free_rtp_port(struct mgcp_rtp_end *end);
|
||||||
void mgcp_patch_and_count(struct mgcp_endpoint *endp,
|
void mgcp_patch_and_count(const struct mgcp_endpoint *endp,
|
||||||
struct mgcp_rtp_state *state,
|
struct mgcp_rtp_state *state,
|
||||||
struct mgcp_rtp_end *rtp_end,
|
struct mgcp_rtp_end *rtp_end,
|
||||||
struct osmo_sockaddr *addr, struct msgb *msg);
|
struct osmo_sockaddr *addr, struct msgb *msg);
|
||||||
|
@ -172,6 +172,6 @@ void mgcp_get_net_downlink_format_default(struct mgcp_endpoint *endp,
|
||||||
struct mgcp_conn_rtp *conn);
|
struct mgcp_conn_rtp *conn);
|
||||||
|
|
||||||
/* internal RTP Annex A counting */
|
/* internal RTP Annex A counting */
|
||||||
void mgcp_rtp_annex_count(struct mgcp_endpoint *endp, struct mgcp_rtp_state *state,
|
void mgcp_rtp_annex_count(const struct mgcp_endpoint *endp, struct mgcp_rtp_state *state,
|
||||||
const uint16_t seq, const int32_t transit,
|
const uint16_t seq, const int32_t transit,
|
||||||
const uint32_t ssrc);
|
const uint32_t ssrc);
|
||||||
|
|
|
@ -23,5 +23,5 @@ struct mgcp_rtp_end;
|
||||||
void mgcp_rtp_end_config(struct mgcp_endpoint *endp, int expect_ssrc_change,
|
void mgcp_rtp_end_config(struct mgcp_endpoint *endp, int expect_ssrc_change,
|
||||||
struct mgcp_rtp_end *rtp);
|
struct mgcp_rtp_end *rtp);
|
||||||
|
|
||||||
uint32_t mgcp_rtp_packet_duration(struct mgcp_endpoint *endp,
|
uint32_t mgcp_rtp_packet_duration(const struct mgcp_endpoint *endp,
|
||||||
struct mgcp_rtp_end *rtp);
|
const struct mgcp_rtp_end *rtp);
|
||||||
|
|
|
@ -240,7 +240,7 @@ failed:
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Compute timestamp alignment error */
|
/* Compute timestamp alignment error */
|
||||||
static int32_t ts_alignment_error(struct mgcp_rtp_stream_state *sstate,
|
static int32_t ts_alignment_error(const struct mgcp_rtp_stream_state *sstate,
|
||||||
int ptime, uint32_t timestamp)
|
int ptime, uint32_t timestamp)
|
||||||
{
|
{
|
||||||
int32_t timestamp_delta;
|
int32_t timestamp_delta;
|
||||||
|
@ -255,11 +255,11 @@ static int32_t ts_alignment_error(struct mgcp_rtp_stream_state *sstate,
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Check timestamp and sequence number for plausibility */
|
/* Check timestamp and sequence number for plausibility */
|
||||||
static int check_rtp_timestamp(struct mgcp_endpoint *endp,
|
static int check_rtp_timestamp(const struct mgcp_endpoint *endp,
|
||||||
struct mgcp_rtp_state *state,
|
const struct mgcp_rtp_state *state,
|
||||||
struct mgcp_rtp_stream_state *sstate,
|
const struct mgcp_rtp_stream_state *sstate,
|
||||||
struct mgcp_rtp_end *rtp_end,
|
const struct mgcp_rtp_end *rtp_end,
|
||||||
struct osmo_sockaddr *addr,
|
const struct osmo_sockaddr *addr,
|
||||||
uint16_t seq, uint32_t timestamp,
|
uint16_t seq, uint32_t timestamp,
|
||||||
const char *text, int32_t * tsdelta_out)
|
const char *text, int32_t * tsdelta_out)
|
||||||
{
|
{
|
||||||
|
@ -344,10 +344,10 @@ static int check_rtp_timestamp(struct mgcp_endpoint *endp,
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Set the timestamp offset according to the packet duration. */
|
/* Set the timestamp offset according to the packet duration. */
|
||||||
static int adjust_rtp_timestamp_offset(struct mgcp_endpoint *endp,
|
static int adjust_rtp_timestamp_offset(const struct mgcp_endpoint *endp,
|
||||||
struct mgcp_rtp_state *state,
|
struct mgcp_rtp_state *state,
|
||||||
struct mgcp_rtp_end *rtp_end,
|
const struct mgcp_rtp_end *rtp_end,
|
||||||
struct osmo_sockaddr *addr,
|
const struct osmo_sockaddr *addr,
|
||||||
int16_t delta_seq, uint32_t in_timestamp)
|
int16_t delta_seq, uint32_t in_timestamp)
|
||||||
{
|
{
|
||||||
int32_t tsdelta = state->packet_duration;
|
int32_t tsdelta = state->packet_duration;
|
||||||
|
@ -394,10 +394,10 @@ static int adjust_rtp_timestamp_offset(struct mgcp_endpoint *endp,
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Set the timestamp offset according to the packet duration. */
|
/* Set the timestamp offset according to the packet duration. */
|
||||||
static int align_rtp_timestamp_offset(struct mgcp_endpoint *endp,
|
static int align_rtp_timestamp_offset(const struct mgcp_endpoint *endp,
|
||||||
struct mgcp_rtp_state *state,
|
struct mgcp_rtp_state *state,
|
||||||
struct mgcp_rtp_end *rtp_end,
|
const struct mgcp_rtp_end *rtp_end,
|
||||||
struct osmo_sockaddr *addr,
|
const struct osmo_sockaddr *addr,
|
||||||
uint32_t timestamp)
|
uint32_t timestamp)
|
||||||
{
|
{
|
||||||
char ipbuf[INET6_ADDRSTRLEN];
|
char ipbuf[INET6_ADDRSTRLEN];
|
||||||
|
@ -475,7 +475,7 @@ void mgcp_get_net_downlink_format_default(struct mgcp_endpoint *endp,
|
||||||
*fmtp_extra = conn->end.fmtp_extra;
|
*fmtp_extra = conn->end.fmtp_extra;
|
||||||
}
|
}
|
||||||
|
|
||||||
void mgcp_rtp_annex_count(struct mgcp_endpoint *endp,
|
void mgcp_rtp_annex_count(const struct mgcp_endpoint *endp,
|
||||||
struct mgcp_rtp_state *state, const uint16_t seq,
|
struct mgcp_rtp_state *state, const uint16_t seq,
|
||||||
const int32_t transit, const uint32_t ssrc)
|
const int32_t transit, const uint32_t ssrc)
|
||||||
{
|
{
|
||||||
|
@ -556,7 +556,7 @@ static int mgcp_patch_pt(struct mgcp_conn_rtp *conn_src,
|
||||||
* is only one source.
|
* is only one source.
|
||||||
* There is also no probation period for new sources. Every RTP header
|
* There is also no probation period for new sources. Every RTP header
|
||||||
* we receive will be seen as a switch in streams. */
|
* we receive will be seen as a switch in streams. */
|
||||||
void mgcp_patch_and_count(struct mgcp_endpoint *endp,
|
void mgcp_patch_and_count(const struct mgcp_endpoint *endp,
|
||||||
struct mgcp_rtp_state *state,
|
struct mgcp_rtp_state *state,
|
||||||
struct mgcp_rtp_end *rtp_end,
|
struct mgcp_rtp_end *rtp_end,
|
||||||
struct osmo_sockaddr *addr, struct msgb *msg)
|
struct osmo_sockaddr *addr, struct msgb *msg)
|
||||||
|
|
|
@ -611,8 +611,8 @@ void mgcp_rtp_end_config(struct mgcp_endpoint *endp, int expect_ssrc_change,
|
||||||
rtp->force_constant_ssrc ? ", force constant ssrc" : "");
|
rtp->force_constant_ssrc ? ", force constant ssrc" : "");
|
||||||
}
|
}
|
||||||
|
|
||||||
uint32_t mgcp_rtp_packet_duration(struct mgcp_endpoint *endp,
|
uint32_t mgcp_rtp_packet_duration(const struct mgcp_endpoint *endp,
|
||||||
struct mgcp_rtp_end *rtp)
|
const struct mgcp_rtp_end *rtp)
|
||||||
{
|
{
|
||||||
int f = 0;
|
int f = 0;
|
||||||
|
|
||||||
|
|
|
@ -1261,11 +1261,6 @@ struct rtp_packet_info test_rtp_packets1[] = {
|
||||||
"\x01\x23\x45\x67\x89\xAB\xCD\xEF"},
|
"\x01\x23\x45\x67\x89\xAB\xCD\xEF"},
|
||||||
};
|
};
|
||||||
|
|
||||||
void mgcp_patch_and_count(struct mgcp_endpoint *endp,
|
|
||||||
struct mgcp_rtp_state *state,
|
|
||||||
struct mgcp_rtp_end *rtp_end,
|
|
||||||
struct osmo_sockaddr *addr, struct msgb *msg);
|
|
||||||
|
|
||||||
static void test_packet_error_detection(int patch_ssrc, int patch_ts)
|
static void test_packet_error_detection(int patch_ssrc, int patch_ts)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
|
|
Loading…
Reference in New Issue