Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e40c5df0 authored by Kim Sungyeon's avatar Kim Sungyeon Committed by Lajos Molnar
Browse files

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

Merged-in: I85bfa0c359a60b42bcdf062f8a158db2ce69aa5a
Change-Id: I85bfa0c359a60b42bcdf062f8a158db2ce69aa5a
Signed-off-by: default avatarKim Sungyeon <sy85.kim@samsung.com>
parent 8eab0ead
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -62,6 +62,7 @@ enum media_event_type {
    MEDIA_META_DATA         = 202,
    MEDIA_DRM_INFO          = 210,
    MEDIA_TIME_DISCONTINUITY = 211,
    MEDIA_IMS_RX_NOTICE     = 300,
    MEDIA_AUDIO_ROUTING_CHANGED = 10000,
};

+3 −0
Original line number Diff line number Diff line
@@ -959,6 +959,9 @@ void MediaPlayer::notify(int msg, int ext1, int ext2, const Parcel *obj)
    case MEDIA_META_DATA:
        ALOGV("Received timed metadata message");
        break;
    case MEDIA_IMS_RX_NOTICE:
        ALOGV("Received IMS Rx notice message");
        break;
    default:
        ALOGV("unrecognized message: (%d, %d, %d)", msg, ext1, ext2);
        break;
+40 −0
Original line number Diff line number Diff line
@@ -2727,6 +2727,14 @@ void NuPlayer::onSourceNotify(const sp<AMessage> &msg) {
            break;
        }

        case Source::kWhatIMSRxNotice:
        {
            sp<AMessage> IMSRxNotice;
            CHECK(msg->findMessage("message", &IMSRxNotice));
            sendIMSRxNotice(IMSRxNotice);
            break;
        }

        default:
            TRESPASS();
    }
@@ -2829,6 +2837,38 @@ void NuPlayer::sendTimedTextData(const sp<ABuffer> &buffer) {
    }
}

void NuPlayer::sendIMSRxNotice(const sp<AMessage> &msg) {
    int32_t notice, payloadType, feedbackType, id, bitrate;

    CHECK(msg->findInt32("IMS-Rx-notice", &notice));
    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:
+1 −0
Original line number Diff line number Diff line
@@ -337,6 +337,7 @@ private:
    void sendSubtitleData(const sp<ABuffer> &buffer, int32_t baseIndex);
    void sendTimedMetaData(const sp<ABuffer> &buffer);
    void sendTimedTextData(const sp<ABuffer> &buffer);
    void sendIMSRxNotice(const sp<AMessage> &msg);

    void writeTrackInfo(Parcel* reply, const sp<AMessage>& format) const;

+1 −0
Original line number Diff line number Diff line
@@ -58,6 +58,7 @@ struct NuPlayer::Source : public AHandler {
        kWhatInstantiateSecureDecoders,
        // Modular DRM
        kWhatDrmInfo,
        kWhatIMSRxNotice,
    };

    // The provides message is used to notify the player about various
Loading