summaryrefslogtreecommitdiff
path: root/pjmedia/include
diff options
context:
space:
mode:
authorBenny Prijono <bennylp@teluu.com>2009-07-29 12:14:21 +0000
committerBenny Prijono <bennylp@teluu.com>2009-07-29 12:14:21 +0000
commitaa3e2f264f921125ee102ff6691d2fc655f7d101 (patch)
treee66ddab9e81ac02f644018d4e0817c5fb0226eae /pjmedia/include
parenta7ef07a46af14800cffbebc0fc222c60b52b9e30 (diff)
Ticket #923: New API to retrieve current jitter buffer state from a stream/session
- added pjmedia_session_get_stream_stat_jbuf() and pjmedia_session_get_stream_stat_jbuf() - fixed const correctness in pjmedia_jbuf_get_state(), jb_framelist_size(), and pj_math_stat_get_stddev(), - modify the jitter buffer statistic log message printed by stream (it contains newlines) git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@2844 74dad513-b988-da41-8d7b-12977e46ad98
Diffstat (limited to 'pjmedia/include')
-rw-r--r--pjmedia/include/pjmedia/jbuf.h2
-rw-r--r--pjmedia/include/pjmedia/session.h16
-rw-r--r--pjmedia/include/pjmedia/stream.h17
3 files changed, 33 insertions, 2 deletions
diff --git a/pjmedia/include/pjmedia/jbuf.h b/pjmedia/include/pjmedia/jbuf.h
index 4088e359..cd5e9f13 100644
--- a/pjmedia/include/pjmedia/jbuf.h
+++ b/pjmedia/include/pjmedia/jbuf.h
@@ -300,7 +300,7 @@ PJ_DECL(void) pjmedia_jbuf_get_frame2(pjmedia_jbuf *jb,
*
* @return PJ_SUCCESS on success.
*/
-PJ_DECL(pj_status_t) pjmedia_jbuf_get_state( pjmedia_jbuf *jb,
+PJ_DECL(pj_status_t) pjmedia_jbuf_get_state( const pjmedia_jbuf *jb,
pjmedia_jb_state *state );
diff --git a/pjmedia/include/pjmedia/session.h b/pjmedia/include/pjmedia/session.h
index c235d13b..2fd7d1a2 100644
--- a/pjmedia/include/pjmedia/session.h
+++ b/pjmedia/include/pjmedia/session.h
@@ -269,6 +269,7 @@ PJ_DECL(pj_status_t) pjmedia_session_get_port( pjmedia_session *session,
/**
* Get session statistics. The stream statistic shows various
* indicators such as packet count, packet lost, jitter, delay, etc.
+ * See also #pjmedia_session_get_stream_stat_jbuf()
*
* @param session The media session.
* @param index Stream index.
@@ -301,6 +302,21 @@ PJ_DECL(pj_status_t) pjmedia_session_get_stream_stat_xr(
/**
+ * Get current jitter buffer state for the specified stream.
+ * See also #pjmedia_session_get_stream_stat()
+ *
+ * @param session The media session.
+ * @param index Stream index.
+ * @param state Jitter buffer state.
+ *
+ * @return PJ_SUCCESS on success.
+ */
+PJ_DECL(pj_status_t) pjmedia_session_get_stream_stat_jbuf(
+ pjmedia_session *session,
+ unsigned index,
+ pjmedia_jb_state *state);
+
+/**
* Dial DTMF digit to the stream, using RFC 2833 mechanism.
*
* @param session The media session.
diff --git a/pjmedia/include/pjmedia/stream.h b/pjmedia/include/pjmedia/stream.h
index 0227f645..94727e25 100644
--- a/pjmedia/include/pjmedia/stream.h
+++ b/pjmedia/include/pjmedia/stream.h
@@ -28,6 +28,7 @@
#include <pjmedia/codec.h>
#include <pjmedia/endpoint.h>
+#include <pjmedia/jbuf.h>
#include <pjmedia/port.h>
#include <pjmedia/rtcp.h>
#include <pjmedia/transport.h>
@@ -214,7 +215,8 @@ PJ_DECL(pj_status_t) pjmedia_stream_start(pjmedia_stream *stream);
/**
- * Get the stream statistics.
+ * Get the stream statistics. See also
+ * #pjmedia_stream_get_stat_jbuf()
*
* @param stream The media stream.
* @param stat Media stream statistics.
@@ -238,6 +240,19 @@ PJ_DECL(pj_status_t) pjmedia_stream_get_stat_xr( const pjmedia_stream *stream,
#endif
/**
+ * Get current jitter buffer state. See also
+ * #pjmedia_stream_get_stat()
+ *
+ * @param stream The media stream.
+ * @param state Jitter buffer state.
+ *
+ * @return PJ_SUCCESS on success.
+ */
+PJ_DECL(pj_status_t) pjmedia_stream_get_stat_jbuf(const pjmedia_stream *stream,
+ pjmedia_jb_state *state);
+
+
+/**
* Pause the individual channel in the stream.
*
* @param stream The media channel.