summaryrefslogtreecommitdiff
path: root/pjmedia/include
diff options
context:
space:
mode:
authorNanang Izzuddin <nanang@teluu.com>2008-04-29 17:15:41 +0000
committerNanang Izzuddin <nanang@teluu.com>2008-04-29 17:15:41 +0000
commitdc883a480f6dcf1e7c7a389675e3fc312b3f8e24 (patch)
tree268d13b4166ce6802e85f51018f7f0579b8a5611 /pjmedia/include
parent97f581ac239ab2ef3689392d20ea705e5fde7a3a (diff)
More on ticket #513:
- Added RTCP XR print reports to streamutil.c - Added new API pjmedia_stream_get_stat_xr() - Added field rtcp_xr_enabled to stream info structure - Swapped the wrong RTCP XR statistic storage (encoding direction should be stored in TX, decoding direction in RX, it was the opposite) git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@1943 74dad513-b988-da41-8d7b-12977e46ad98
Diffstat (limited to 'pjmedia/include')
-rw-r--r--pjmedia/include/pjmedia/rtcp_xr.h12
-rw-r--r--pjmedia/include/pjmedia/stream.h17
2 files changed, 25 insertions, 4 deletions
diff --git a/pjmedia/include/pjmedia/rtcp_xr.h b/pjmedia/include/pjmedia/rtcp_xr.h
index d483366d..cdedc1dd 100644
--- a/pjmedia/include/pjmedia/rtcp_xr.h
+++ b/pjmedia/include/pjmedia/rtcp_xr.h
@@ -229,8 +229,10 @@ typedef struct pjmedia_rtcp_xr_pkt
typedef struct pjmedia_rtcp_xr_stream_stat
{
struct {
- pj_uint32_t begin_seq;
- pj_uint32_t end_seq;
+ pj_time_val update; /**< Time of last update. */
+
+ pj_uint32_t begin_seq; /**< Begin # seq of this interval. */
+ pj_uint32_t end_seq; /**< End # seq of this interval. */
unsigned count; /**< Number of packets. */
/**
@@ -263,6 +265,8 @@ typedef struct pjmedia_rtcp_xr_stream_stat
} stat_sum;
struct {
+ pj_time_val update; /**< Time of last update. */
+
pj_uint8_t loss_rate; /**< Packet loss rate */
pj_uint8_t discard_rate; /**< Packet discarded rate */
pj_uint8_t burst_den; /**< Burst density */
@@ -271,8 +275,8 @@ typedef struct pjmedia_rtcp_xr_stream_stat
pj_uint16_t gap_dur; /**< Gap duration */
pj_uint16_t rnd_trip_delay; /**< Round trip delay */
pj_uint16_t end_sys_delay; /**< End system delay */
- pj_uint8_t signal_lvl; /**< Signal level */
- pj_uint8_t noise_lvl; /**< Noise level */
+ pj_int8_t signal_lvl; /**< Signal level */
+ pj_int8_t noise_lvl; /**< Noise level */
pj_uint8_t rerl; /**< Residual Echo Return Loss */
pj_uint8_t gmin; /**< The gap threshold */
pj_uint8_t r_factor; /**< Voice quality metric carried
diff --git a/pjmedia/include/pjmedia/stream.h b/pjmedia/include/pjmedia/stream.h
index 64082a8b..159d03a1 100644
--- a/pjmedia/include/pjmedia/stream.h
+++ b/pjmedia/include/pjmedia/stream.h
@@ -95,6 +95,10 @@ struct pjmedia_stream_info
pj_sockaddr rem_rtcp; /**< Optional remote RTCP address. If
sin_family is zero, the RTP address
will be calculated from RTP. */
+#if defined(PJMEDIA_HAS_RTCP_XR) && (PJMEDIA_HAS_RTCP_XR != 0)
+ pj_bool_t rtcp_xr_enabled;
+ /**< Specify whether RTCP XR is enabled.*/
+#endif
pjmedia_codec_info fmt; /**< Incoming codec format info. */
pjmedia_codec_param *param; /**< Optional codec param. */
unsigned tx_pt; /**< Outgoing codec paylaod type. */
@@ -206,6 +210,19 @@ PJ_DECL(pj_status_t) pjmedia_stream_start(pjmedia_stream *stream);
PJ_DECL(pj_status_t) pjmedia_stream_get_stat( const pjmedia_stream *stream,
pjmedia_rtcp_stat *stat);
+#if defined(PJMEDIA_HAS_RTCP_XR) && (PJMEDIA_HAS_RTCP_XR != 0)
+/**
+ * Get the stream extended report statistics (RTCP XR).
+ *
+ * @param stream The media stream.
+ * @param stat Media stream extended report statistics.
+ *
+ * @return PJ_SUCCESS on success.
+ */
+PJ_DECL(pj_status_t) pjmedia_stream_get_stat_xr( const pjmedia_stream *stream,
+ pjmedia_rtcp_xr_stat *stat);
+#endif
+
/**
* Pause the individual channel in the stream.
*