summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLiong Sauw Ming <ming@teluu.com>2012-05-12 07:18:09 +0000
committerLiong Sauw Ming <ming@teluu.com>2012-05-12 07:18:09 +0000
commit08ec20ea344b8f308cbd5fb322e55ab2a2996300 (patch)
treeadc3ca366852dce1e011a3398299058e9093c62d
parent3357b5f442e1666f69ab5f57fbb5180903d3d905 (diff)
Re #1508 (misc): Fixed compilation error if PJMEDIA_STREAM_ENABLE_KA is enabled.
This fix also disable the keep-alive feature in video stream. git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@4120 74dad513-b988-da41-8d7b-12977e46ad98
-rw-r--r--pjmedia/src/pjmedia/stream.c2
-rw-r--r--pjmedia/src/pjmedia/vid_stream.c18
2 files changed, 16 insertions, 4 deletions
diff --git a/pjmedia/src/pjmedia/stream.c b/pjmedia/src/pjmedia/stream.c
index 4db99de6..0ab6b1fc 100644
--- a/pjmedia/src/pjmedia/stream.c
+++ b/pjmedia/src/pjmedia/stream.c
@@ -1165,7 +1165,7 @@ static pj_status_t put_frame_imp( pjmedia_port *port,
dtx_duration = pj_timestamp_diff32(&stream->last_frm_ts_sent,
&frame->timestamp);
if (dtx_duration >
- PJMEDIA_STREAM_KA_INTERVAL * stream->port.info.clock_rate)
+ PJMEDIA_STREAM_KA_INTERVAL * PJMEDIA_PIA_SRATE(&stream->port.info))
{
send_keep_alive_packet(stream);
stream->last_frm_ts_sent = frame->timestamp;
diff --git a/pjmedia/src/pjmedia/vid_stream.c b/pjmedia/src/pjmedia/vid_stream.c
index b4bc3d40..fda39bea 100644
--- a/pjmedia/src/pjmedia/vid_stream.c
+++ b/pjmedia/src/pjmedia/vid_stream.c
@@ -68,6 +68,12 @@
# define PJMEDIA_VSTREAM_INC 1000
#endif
+/* Video stream keep-alive feature is currently disabled. */
+#if defined(PJMEDIA_STREAM_ENABLE_KA) && PJMEDIA_STREAM_ENABLE_KA != 0
+# undef PJMEDIA_STREAM_ENABLE_KA
+# define PJMEDIA_STREAM_ENABLE_KA 0
+#endif
+
/**
* Media channel.
@@ -401,6 +407,7 @@ static void send_keep_alive_packet(pjmedia_vid_stream *stream)
#if PJMEDIA_STREAM_ENABLE_KA == PJMEDIA_STREAM_KA_EMPTY_RTP
/* Keep-alive packet is empty RTP */
+ pjmedia_vid_channel *channel = (pjmedia_vid_channel *)stream;
pj_status_t status;
void *pkt;
int pkt_len;
@@ -422,11 +429,12 @@ static void send_keep_alive_packet(pjmedia_vid_stream *stream)
pkt_len);
/* Send RTCP */
- send_rtcp(stream, PJ_TRUE, PJ_FALSE, PJ_FALSE);
+ send_rtcp(stream, PJ_TRUE, PJ_FALSE);
#elif PJMEDIA_STREAM_ENABLE_KA == PJMEDIA_STREAM_KA_USER
/* Keep-alive packet is defined in PJMEDIA_STREAM_KA_USER_PKT */
+ pjmedia_vid_channel *channel = (pjmedia_vid_channel *)stream;
int pkt_len;
const pj_str_t str_ka = PJMEDIA_STREAM_KA_USER_PKT;
@@ -795,12 +803,16 @@ static pj_status_t put_frame(pjmedia_port *port,
dtx_duration = pj_timestamp_diff32(&stream->last_frm_ts_sent,
&frame->timestamp);
- if (dtx_duration >
- PJMEDIA_STREAM_KA_INTERVAL * channel->port.info.clock_rate)
+ /* Video stream keep-alive feature is currently disabled. */
+ /*
+ if (dtx_duration >
+ PJMEDIA_STREAM_KA_INTERVAL *
+ PJMEDIA_PIA_SRATE(&channel->port.info))
{
send_keep_alive_packet(stream);
stream->last_frm_ts_sent = frame->timestamp;
}
+ */
}
#endif