VT: Enhancements on RTP depacketizer
1) Do not merge FU pkts if rtptimes are different.
[Problem] There was a case that Fragmented Units of RTP be merged as
an one frame even Fragmented Units are has different timestamp.
[Solution] Added a condition to check rtptime between Fragmented Units.
2) Implementation of a new frame drop rule for p-frame.
[Problem] P-frame should be dropped only if FU packets damaged
more than half of amount of frame.
[Solution] Implemented a rule for p-frame drop.
3) Discards a rtp buffer that has unexpected ssrc.
[Problem] so many packet loss observed and video loss because about
4 different video stream coming at the same time.
[Solution] Allow only one stream that matched SSRC of first stream.
Bug: 165061754
Change-Id: If840df274a6fc4b04910f9201359b7c09fd2bc85
Signed-off-by: Byeongjo Park <bjo.park@samsung.com>
diff --git a/media/libmediaplayerservice/nuplayer/RTPSource.cpp b/media/libmediaplayerservice/nuplayer/RTPSource.cpp
index 3c3ad86..8072863 100644
--- a/media/libmediaplayerservice/nuplayer/RTPSource.cpp
+++ b/media/libmediaplayerservice/nuplayer/RTPSource.cpp
@@ -281,20 +281,19 @@
}
int32_t cvo;
- if ((*accessUnit) != NULL && (*accessUnit)->meta()->findInt32("cvo", &cvo)) {
- if (cvo != mLastCVOUpdated) {
- sp<AMessage> msg = new AMessage();
- msg->setInt32("payload-type", NuPlayer::RTPSource::RTP_CVO);
- msg->setInt32("cvo", cvo);
+ if ((*accessUnit) != NULL && (*accessUnit)->meta()->findInt32("cvo", &cvo) &&
+ cvo != mLastCVOUpdated) {
+ sp<AMessage> msg = new AMessage();
+ msg->setInt32("payload-type", NuPlayer::RTPSource::RTP_CVO);
+ msg->setInt32("cvo", cvo);
- sp<AMessage> notify = dupNotify();
- notify->setInt32("what", kWhatIMSRxNotice);
- notify->setMessage("message", msg);
- notify->post();
+ sp<AMessage> notify = dupNotify();
+ notify->setInt32("what", kWhatIMSRxNotice);
+ notify->setMessage("message", msg);
+ notify->post();
- ALOGV("notify cvo updated (%d)->(%d) to upper layer", mLastCVOUpdated, cvo);
- mLastCVOUpdated = cvo;
- }
+ ALOGV("notify cvo updated (%d)->(%d) to upper layer", mLastCVOUpdated, cvo);
+ mLastCVOUpdated = cvo;
}
return finalResult;