VT: Add RTCP feedback message(TSFB & PSFB) parser to RTP source
Parser for RTCP feedback messages (Refer RFC 4585 Ch.6)
1. Parser for TranSport layer FeedBack messages. (Refer RFC 5104 Ch.4)
Bitrate value in TMMBR & TMMBN must be passed on to Recorder(Tx) part for congestion control.
2. Parser for Payload-Specific FeedBack messages (Refer RFC 4585 Ch.6)
Supports PLI(Packet Loss Indication) notification.
The value & notification are passed through ARTPConnection -> RTPSource -> NuPlayer -> JAVA layer
Bug: 121230209
Change-Id: I85bfa0c359a60b42bcdf062f8a158db2ce69aa5a
Signed-off-by: Kim Sungyeon <sy85.kim@samsung.com>
diff --git a/media/libmediaplayerservice/nuplayer/NuPlayer.cpp b/media/libmediaplayerservice/nuplayer/NuPlayer.cpp
index 8b585b1..3c4a96b 100644
--- a/media/libmediaplayerservice/nuplayer/NuPlayer.cpp
+++ b/media/libmediaplayerservice/nuplayer/NuPlayer.cpp
@@ -2727,6 +2727,14 @@
break;
}
+ case Source::kWhatIMSRxNotice:
+ {
+ sp<AMessage> IMSRxNotice;
+ CHECK(msg->findMessage("message", &IMSRxNotice));
+ sendIMSRxNotice(IMSRxNotice);
+ break;
+ }
+
default:
TRESPASS();
}
@@ -2829,6 +2837,38 @@
}
}
+void NuPlayer::sendIMSRxNotice(const sp<AMessage> &msg) {
+ int32_t notice, payloadType, feedbackType, id, bitrate;
+
+ CHECK(msg->findInt32("IMS-Rx-notice", ¬ice));
+ CHECK(msg->findInt32("payload-type", &payloadType));
+ CHECK(msg->findInt32("feedback-type", &feedbackType));
+ CHECK(msg->findInt32("sender", &id));
+
+ Parcel in;
+ in.writeInt32(payloadType);
+ in.writeInt32(feedbackType);
+ in.writeInt32(id);
+
+ switch (payloadType) {
+ case 205: // TSFB
+ {
+ CHECK(msg->findInt32("bit-rate", &bitrate));
+ in.writeInt32(bitrate);
+ break;
+ }
+ case 206: // PSFB
+ {
+ // nothing to do yet
+ break;
+ }
+ default:
+ break;
+ }
+
+ notifyListener(MEDIA_IMS_RX_NOTICE, 0, 0, &in);
+}
+
const char *NuPlayer::getDataSourceType() {
switch (mDataSourceType) {
case DATA_SOURCE_TYPE_HTTP_LIVE: