[asterisk-commits] oej: branch oej/tdd-sip r101270 - in /team/oej/tdd-sip: ./ include/asterisk/ ...
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Wed Jan 30 10:57:19 CST 2008
Author: oej
Date: Wed Jan 30 10:57:18 2008
New Revision: 101270
URL: http://svn.digium.com/view/asterisk?view=rev&rev=101270
Log:
Update
Modified:
team/oej/tdd-sip/ (props changed)
team/oej/tdd-sip/include/asterisk/rtp.h
team/oej/tdd-sip/main/rtp.c
Propchange: team/oej/tdd-sip/
------------------------------------------------------------------------------
--- svnmerge-integrated (original)
+++ svnmerge-integrated Wed Jan 30 10:57:18 2008
@@ -1,1 +1,1 @@
-/trunk:1-101254
+/trunk:1-101268
Modified: team/oej/tdd-sip/include/asterisk/rtp.h
URL: http://svn.digium.com/view/asterisk/team/oej/tdd-sip/include/asterisk/rtp.h?view=diff&rev=101270&r1=101269&r2=101270
==============================================================================
--- team/oej/tdd-sip/include/asterisk/rtp.h (original)
+++ team/oej/tdd-sip/include/asterisk/rtp.h Wed Jan 30 10:57:18 2008
@@ -262,13 +262,13 @@
int ast_rtp_reload(void); /*! reload rtp configuration */
void ast_rtp_new_init(struct ast_rtp *rtp);
-/*! Set codec preference */
-int ast_rtp_codec_setpref(struct ast_rtp *rtp, struct ast_codec_pref *prefs);
-
-/*! Get codec preference */
+/*! \brief Set codec preference */
+void ast_rtp_codec_setpref(struct ast_rtp *rtp, struct ast_codec_pref *prefs);
+
+/*! \brief Get codec preference */
struct ast_codec_pref *ast_rtp_codec_getpref(struct ast_rtp *rtp);
-/*! get format from predefined dynamic payload format */
+/*! \brief get format from predefined dynamic payload format */
int ast_rtp_codec_getformat(int pt);
/*! \brief Set rtp timeout */
Modified: team/oej/tdd-sip/main/rtp.c
URL: http://svn.digium.com/view/asterisk/team/oej/tdd-sip/main/rtp.c?view=diff&rev=101270&r1=101269&r2=101270
==============================================================================
--- team/oej/tdd-sip/main/rtp.c (original)
+++ team/oej/tdd-sip/main/rtp.c Wed Jan 30 10:57:18 2008
@@ -1798,7 +1798,6 @@
int ast_rtp_early_bridge(struct ast_channel *c0, struct ast_channel *c1)
{
- // dest = c0, src = c1
struct ast_rtp *destp = NULL, *srcp = NULL; /* Audio RTP Channels */
struct ast_rtp *vdestp = NULL, *vsrcp = NULL; /* Video RTP channels */
struct ast_rtp *tdestp = NULL, *tsrcp = NULL; /* Text RTP channels */
@@ -2034,8 +2033,6 @@
}
rtp_bridge_unlock(rtp);
-
- return;
}
struct rtpPayloadType ast_rtp_lookup_pt(struct ast_rtp* rtp, int pt)
@@ -2217,8 +2214,6 @@
rtp->seqno = ast_random() & 0xffff;
ast_set_flag(rtp, FLAG_HAS_DTMF);
rtp->strict_rtp_state = (strictrtp ? STRICT_RTP_LEARN : STRICT_RTP_OPEN);
-
- return;
}
struct ast_rtp *ast_rtp_new_with_bindaddr(struct sched_context *sched, struct io_context *io, int rtcpenable, int callbackmode, struct in_addr addr)
@@ -2610,10 +2605,10 @@
/* Setup packet to send */
rtpheader = (unsigned int *)data;
- rtpheader[0] = htonl((2 << 30) | (1 << 23) | (rtp->send_payload << 16) | (rtp->seqno));
- rtpheader[1] = htonl(rtp->lastdigitts);
- rtpheader[2] = htonl(rtp->ssrc);
- rtpheader[3] = htonl((rtp->send_digit << 24) | (0xa << 16) | (rtp->send_duration));
+ rtpheader[0] = htonl((2 << 30) | (1 << 23) | (rtp->send_payload << 16) | (rtp->seqno));
+ rtpheader[1] = htonl(rtp->lastdigitts);
+ rtpheader[2] = htonl(rtp->ssrc);
+ rtpheader[3] = htonl((rtp->send_digit << 24) | (0xa << 16) | (rtp->send_duration));
rtpheader[0] = htonl((2 << 30) | (rtp->send_payload << 16) | (rtp->seqno));
/* Transmit */
@@ -3059,7 +3054,7 @@
if (rtp->them.sin_port && rtp->them.sin_addr.s_addr) {
res = sendto(rtp->s, (void *)rtpheader, f->datalen + hdrlen, 0, (struct sockaddr *)&rtp->them, sizeof(rtp->them));
- if (res <0) {
+ if (res < 0) {
if (!rtp->nat || (rtp->nat && (ast_test_flag(rtp, FLAG_NAT_ACTIVE) == FLAG_NAT_ACTIVE))) {
ast_debug(1, "RTP Transmission error of packet %d to %s:%d: %s\n", rtp->seqno, ast_inet_ntoa(rtp->them.sin_addr), ntohs(rtp->them.sin_port), strerror(errno));
} else if (((ast_test_flag(rtp, FLAG_NAT_ACTIVE) == FLAG_NAT_INACTIVE) || rtpdebug) && !ast_test_flag(rtp, FLAG_NAT_INACTIVE_NOWARN)) {
@@ -3073,7 +3068,7 @@
rtp->txoctetcount +=(res - hdrlen);
if (rtp->rtcp && rtp->rtcp->schedid < 1)
- rtp->rtcp->schedid = ast_sched_add(rtp->sched, ast_rtcp_calc_interval(rtp), ast_rtcp_write, rtp);
+ rtp->rtcp->schedid = ast_sched_add(rtp->sched, ast_rtcp_calc_interval(rtp), ast_rtcp_write, rtp);
}
if (rtp_debug_test_addr(&rtp->them))
@@ -3086,7 +3081,7 @@
return 0;
}
-int ast_rtp_codec_setpref(struct ast_rtp *rtp, struct ast_codec_pref *prefs)
+void ast_rtp_codec_setpref(struct ast_rtp *rtp, struct ast_codec_pref *prefs)
{
int x;
for (x = 0; x < 32; x++) { /* Ugly way */
@@ -3096,7 +3091,6 @@
if (rtp->smoother)
ast_smoother_free(rtp->smoother);
rtp->smoother = NULL;
- return 0;
}
struct ast_codec_pref *ast_rtp_codec_getpref(struct ast_rtp *rtp)
@@ -3179,7 +3173,7 @@
while ((f = ast_smoother_read(rtp->smoother)) && (f->data))
ast_rtp_raw_write(rtp, f, codec);
} else {
- /* Don't buffer outgoing frames; send them one-per-packet: */
+ /* Don't buffer outgoing frames; send them one-per-packet: */
if (_f->offset < hdrlen)
f = ast_frdup(_f); /*! \bug XXX this might never be free'd. Why do we do this? */
else
@@ -3516,10 +3510,8 @@
static void p2p_set_bridge(struct ast_rtp *rtp0, struct ast_rtp *rtp1)
{
rtp_bridge_lock(rtp0);
- rtp0->bridged = rtp1;
+ rtp0->bridged = rtp1;
rtp_bridge_unlock(rtp0);
-
- return;
}
/*! \brief Bridge loop for partial native bridge (packet2packet)
More information about the asterisk-commits
mailing list