[asterisk-commits] branch oej/test-this-branch r10735 - in
/team/oej/test-this-branch: ./ includ...
asterisk-commits at lists.digium.com
asterisk-commits at lists.digium.com
Wed Feb 22 10:29:36 MST 2006
Author: oej
Date: Wed Feb 22 11:29:31 2006
New Revision: 10735
URL: http://svn.digium.com/view/asterisk?rev=10735&view=rev
Log:
Fixes for compilation warnings in rtp.c (Thanks John Martin)
-- These needs to be backported to the rtcp branch --
Modified:
team/oej/test-this-branch/include/asterisk/rtp.h
team/oej/test-this-branch/rtp.c
Modified: team/oej/test-this-branch/include/asterisk/rtp.h
URL: http://svn.digium.com/view/asterisk/team/oej/test-this-branch/include/asterisk/rtp.h?rev=10735&r1=10734&r2=10735&view=diff
==============================================================================
--- team/oej/test-this-branch/include/asterisk/rtp.h (original)
+++ team/oej/test-this-branch/include/asterisk/rtp.h Wed Feb 22 11:29:31 2006
@@ -158,6 +158,9 @@
void ast_rtp_stop(struct ast_rtp *rtp);
+/*! \brief Return RTCP quality string */
+char *ast_rtp_get_qualify(struct ast_rtp *rtp);
+
void ast_rtp_init(void);
int ast_rtp_reload(void);
Modified: team/oej/test-this-branch/rtp.c
URL: http://svn.digium.com/view/asterisk/team/oej/test-this-branch/rtp.c?rev=10735&r1=10734&r2=10735&view=diff
==============================================================================
--- team/oej/test-this-branch/rtp.c (original)
+++ team/oej/test-this-branch/rtp.c Wed Feb 22 11:29:31 2006
@@ -88,7 +88,14 @@
#endif
/* Forward declarations */
-int ast_rtcp_write(void *data);
+static int ast_rtcp_write(void *data);
+static void timeval2ntp(struct timeval tv, unsigned int *msw, unsigned int *lsw);
+static int ast_rtcp_send_h261fur(void *data);
+static int ast_rtcp_write_sr(void *data);
+static int ast_rtcp_write_rr(void *data);
+char *ast_rtp_get_quality(struct ast_rtp *rtp);
+static void ast_rtp_offered_from_local(struct ast_rtp* rtp, int local);
+static unsigned int ast_rtcp_calc_interval(struct ast_rtp *rtp);
/*! \brief The value of each payload format mapping: */
struct rtpPayloadType {
@@ -197,7 +204,7 @@
/*! \brief List of current sessions */
static AST_LIST_HEAD_STATIC(protos, ast_rtp_protocol);
-void timeval2ntp(struct timeval tv, unsigned int *msw, unsigned int *lsw)
+static void timeval2ntp(struct timeval tv, unsigned int *msw, unsigned int *lsw)
{
unsigned int sec, usec, frac;
sec = tv.tv_sec + 2208988800u; /* Sec between 1900 and 1970 */
@@ -219,7 +226,7 @@
return -1;
}
-unsigned int ast_rtcp_calc_interval(struct ast_rtp *rtp)
+static unsigned int ast_rtcp_calc_interval(struct ast_rtp *rtp)
{
unsigned int interval;
/* TODO Do a more reasonable calculation on this one
@@ -1126,7 +1133,7 @@
}
}
-void ast_rtp_offered_from_local(struct ast_rtp* rtp, int local) {
+static void ast_rtp_offered_from_local(struct ast_rtp* rtp, int local) {
if (rtp)
rtp->rtp_offered_from_local = local;
else
@@ -1437,15 +1444,15 @@
char *ast_rtp_get_quality(struct ast_rtp *rtp)
{
- /*
- *ssrc our ssrc
- *themssrc their ssrc
- *lp lost packets
- *rxjitter our calculated jitter(rx)
- *rxcount no. received packets
- *txjitter reported jitter of the other end
- *txcount transmitted packets
- *rlp remote lost packets
+ /*!\note
+ * - ssrc our ssrc
+ * - themssrc their ssrc
+ * - lp lost packets
+ * - rxjitter our calculated jitter(rx)
+ * - rxcount no. received packets
+ * - txjitter reported jitter of the other end
+ * - txcount transmitted packets
+ * - rlp remote lost packets
*/
snprintf(rtp->rtcp->quality, sizeof(rtp->rtcp->quality), "ssrc=%u;themssrc=%u;lp=%u;rxjitter=%f;rxcount=%u;txjitter=%f;txcount=%u;rlp=%u;rtt=%f", rtp->ssrc, rtp->themssrc, rtp->rtcp->expected_prior - rtp->rtcp->received_prior, rtp->rxjitter, rtp->rxcount, (double)rtp->rtcp->reported_jitter/65536., rtp->txcount, rtp->rtcp->reported_lost, rtp->rtcp->rtt);
@@ -1595,18 +1602,18 @@
}
/* Send an H.261 fast update request, some devices need this rather than SIP XML */
-int ast_rtcp_send_h261fur(void *data)
+static int ast_rtcp_send_h261fur(void *data)
{
struct ast_rtp *rtp = data;
int res;
- rtp->rtcp->sendfur = 1;
+ rtp->rtcp->sendfur = 1;
res = ast_rtcp_write(data);
return res;
}
-int ast_rtcp_write_sr(void *data)
+static int ast_rtcp_write_sr(void *data)
{
struct ast_rtp *rtp = data;
int res;
@@ -1699,7 +1706,7 @@
gettimeofday(&rtp->rtcp->txlsr, NULL);
rtp->rtcp->sr_count++;
- rtp->rtcp->lastsrtxcount = rtp->txcount;
+ rtp->rtcp->lastsrtxcount = rtp->txcount;
if(rtcp_debug_test_addr(&rtp->rtcp->them)){
ast_verbose("Sent RTCP SR to %s:%d\n", ast_inet_ntoa(iabuf, sizeof(iabuf), rtp->rtcp->them.sin_addr), ntohs(rtp->rtcp->them.sin_port));
@@ -1718,7 +1725,7 @@
return res;
}
-int ast_rtcp_write_rr(void *data)
+static int ast_rtcp_write_rr(void *data)
{
struct ast_rtp *rtp = data;
int res;
@@ -1810,10 +1817,10 @@
return res;
}
-/* Write and RTCP packet to the far end */
-/* Decide if we are going to send an SR (with Reception Block) or RR */
-/* RR is sent if we have not sent any rtp packets in the previous interval */
-int ast_rtcp_write(void *data)
+/*! \brief Write and RTCP packet to the far end
+ * Decide if we are going to send an SR (with Reception Block) or RR
+ * RR is sent if we have not sent any rtp packets in the previous interval */
+static int ast_rtcp_write(void *data)
{
struct ast_rtp *rtp = data;
int res;
More information about the asterisk-commits
mailing list