summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--pjsip/include/pjsua2/call.hpp13
-rw-r--r--pjsip/src/pjsua2/call.cpp4
2 files changed, 12 insertions, 5 deletions
diff --git a/pjsip/include/pjsua2/call.hpp b/pjsip/include/pjsua2/call.hpp
index e6e680a0..510ad64d 100644
--- a/pjsip/include/pjsua2/call.hpp
+++ b/pjsip/include/pjsua2/call.hpp
@@ -86,6 +86,15 @@ public:
};
/**
+ * Types of loss detected.
+ */
+struct LossType
+{
+ unsigned burst; /**< Burst/sequential packet lost detected */
+ unsigned random; /**< Random packet lost detected. */
+};
+
+/**
* Unidirectional RTP stream statistics.
*/
struct RtcpStreamStat
@@ -101,9 +110,7 @@ struct RtcpStreamStat
MathStat lossPeriodUsec; /**< Loss period statistics */
- /**< Types of loss detected. */
- unsigned burst; /**< Burst/sequential packet lost detected */
- unsigned random; /**< Random packet lost detected. */
+ LossType lossType; /**< Types of loss detected. */
MathStat jitterUsec; /**< Jitter statistics */
diff --git a/pjsip/src/pjsua2/call.cpp b/pjsip/src/pjsua2/call.cpp
index afc4d3d9..1e4e72f3 100644
--- a/pjsip/src/pjsua2/call.cpp
+++ b/pjsip/src/pjsua2/call.cpp
@@ -56,8 +56,8 @@ void RtcpStreamStat::fromPj(const pjmedia_rtcp_stream_stat &prm)
this->reorder = prm.loss;
this->dup = prm.dup;
this->lossPeriodUsec.fromPj(prm.loss_period);
- this->burst = prm.loss_type.burst;
- this->random = prm.loss_type.random;
+ this->lossType.burst = prm.loss_type.burst;
+ this->lossType.random = prm.loss_type.random;
this->jitterUsec.fromPj(prm.jitter);
}