Loading media/libmediaplayerservice/nuplayer/NuPlayer.cpp +1 −0 Original line number Diff line number Diff line Loading @@ -2848,6 +2848,7 @@ void NuPlayer::sendIMSRxNotice(const sp<AMessage> &msg) { switch (payloadType) { case NuPlayer::RTPSource::RTCP_TSFB: // RTCP TSFB case NuPlayer::RTPSource::RTCP_PSFB: // RTCP PSFB case NuPlayer::RTPSource::RTP_AUTODOWN: { int32_t feedbackType, id; CHECK(msg->findInt32("feedback-type", &feedbackType)); Loading media/libmediaplayerservice/nuplayer/RTPSource.h +1 −0 Original line number Diff line number Diff line Loading @@ -57,6 +57,7 @@ struct NuPlayer::RTPSource : public NuPlayer::Source { RTCP_TSFB = 205, RTCP_PSFB = 206, RTP_CVO = 300, RTP_AUTODOWN = 400, }; virtual status_t getBufferingSettings( Loading media/libstagefright/rtsp/ARTPConnection.cpp +15 −0 Original line number Diff line number Diff line Loading @@ -416,6 +416,12 @@ void ARTPConnection::onPollStreams() { if (err == -ECONNRESET) { // socket failure, this stream is dead, Jim. sp<AMessage> notify = it->mNotifyMsg->dup(); notify->setInt32("IMS-Rx-notice", 1); notify->setInt32("payload-type", 400); notify->setInt32("feedback-type", 1); notify->setInt32("sender", it->mSources.valueAt(0)->getSelfID()); notify->post(); ALOGW("failed to receive RTP/RTCP datagram."); it = mStreams.erase(it); Loading Loading @@ -1016,8 +1022,17 @@ void ARTPConnection::checkRxBitrate(int64_t nowUs) { for (size_t i = 0; i < s->mSources.size(); ++i) { sp<ARTPSource> source = s->mSources.valueAt(i); source->setBitrateData(bitrate, nowUs); source->setTargetBitrate(); source->addTMMBR(buffer); if (source->isNeedToDowngrade()) { sp<AMessage> notify = s->mNotifyMsg->dup(); notify->setInt32("IMS-Rx-notice", 1); notify->setInt32("payload-type", 400); notify->setInt32("feedback-type", 1); notify->setInt32("sender", source->getSelfID()); notify->post(); } } if (buffer->size() > 0) { ALOGV("Sending TMMBR..."); Loading media/libstagefright/rtsp/ARTPSource.cpp +8 −0 Original line number Diff line number Diff line Loading @@ -379,6 +379,10 @@ void ARTPSource::setMinMaxBitrate(int32_t min, int32_t max) { mQualManager.setMinMaxBitrate(min, max); } void ARTPSource::setBitrateData(int32_t bitrate, int64_t time) { mQualManager.setBitrateData(bitrate, time); } void ARTPSource::setTargetBitrate() { uint8_t fraction = 0; Loading @@ -403,6 +407,10 @@ bool ARTPSource::isNeedToReport() { return (intervalReceived > 0) ? true : false; } bool ARTPSource::isNeedToDowngrade() { return mQualManager.isNeedToDowngrade(); } void ARTPSource::noticeAbandonBuffer(int cnt) { mNumBuffersReceived -= cnt; } Loading media/libstagefright/rtsp/ARTPSource.h +2 −0 Original line number Diff line number Diff line Loading @@ -50,9 +50,11 @@ struct ARTPSource : public RefBase { uint32_t getSelfID(); void setSelfID(const uint32_t selfID); void setMinMaxBitrate(int32_t min, int32_t max); void setBitrateData(int32_t bitrate, int64_t time); void setTargetBitrate(); bool isNeedToReport(); bool isNeedToDowngrade(); void noticeAbandonBuffer(int cnt=1); Loading Loading
media/libmediaplayerservice/nuplayer/NuPlayer.cpp +1 −0 Original line number Diff line number Diff line Loading @@ -2848,6 +2848,7 @@ void NuPlayer::sendIMSRxNotice(const sp<AMessage> &msg) { switch (payloadType) { case NuPlayer::RTPSource::RTCP_TSFB: // RTCP TSFB case NuPlayer::RTPSource::RTCP_PSFB: // RTCP PSFB case NuPlayer::RTPSource::RTP_AUTODOWN: { int32_t feedbackType, id; CHECK(msg->findInt32("feedback-type", &feedbackType)); Loading
media/libmediaplayerservice/nuplayer/RTPSource.h +1 −0 Original line number Diff line number Diff line Loading @@ -57,6 +57,7 @@ struct NuPlayer::RTPSource : public NuPlayer::Source { RTCP_TSFB = 205, RTCP_PSFB = 206, RTP_CVO = 300, RTP_AUTODOWN = 400, }; virtual status_t getBufferingSettings( Loading
media/libstagefright/rtsp/ARTPConnection.cpp +15 −0 Original line number Diff line number Diff line Loading @@ -416,6 +416,12 @@ void ARTPConnection::onPollStreams() { if (err == -ECONNRESET) { // socket failure, this stream is dead, Jim. sp<AMessage> notify = it->mNotifyMsg->dup(); notify->setInt32("IMS-Rx-notice", 1); notify->setInt32("payload-type", 400); notify->setInt32("feedback-type", 1); notify->setInt32("sender", it->mSources.valueAt(0)->getSelfID()); notify->post(); ALOGW("failed to receive RTP/RTCP datagram."); it = mStreams.erase(it); Loading Loading @@ -1016,8 +1022,17 @@ void ARTPConnection::checkRxBitrate(int64_t nowUs) { for (size_t i = 0; i < s->mSources.size(); ++i) { sp<ARTPSource> source = s->mSources.valueAt(i); source->setBitrateData(bitrate, nowUs); source->setTargetBitrate(); source->addTMMBR(buffer); if (source->isNeedToDowngrade()) { sp<AMessage> notify = s->mNotifyMsg->dup(); notify->setInt32("IMS-Rx-notice", 1); notify->setInt32("payload-type", 400); notify->setInt32("feedback-type", 1); notify->setInt32("sender", source->getSelfID()); notify->post(); } } if (buffer->size() > 0) { ALOGV("Sending TMMBR..."); Loading
media/libstagefright/rtsp/ARTPSource.cpp +8 −0 Original line number Diff line number Diff line Loading @@ -379,6 +379,10 @@ void ARTPSource::setMinMaxBitrate(int32_t min, int32_t max) { mQualManager.setMinMaxBitrate(min, max); } void ARTPSource::setBitrateData(int32_t bitrate, int64_t time) { mQualManager.setBitrateData(bitrate, time); } void ARTPSource::setTargetBitrate() { uint8_t fraction = 0; Loading @@ -403,6 +407,10 @@ bool ARTPSource::isNeedToReport() { return (intervalReceived > 0) ? true : false; } bool ARTPSource::isNeedToDowngrade() { return mQualManager.isNeedToDowngrade(); } void ARTPSource::noticeAbandonBuffer(int cnt) { mNumBuffersReceived -= cnt; } Loading
media/libstagefright/rtsp/ARTPSource.h +2 −0 Original line number Diff line number Diff line Loading @@ -50,9 +50,11 @@ struct ARTPSource : public RefBase { uint32_t getSelfID(); void setSelfID(const uint32_t selfID); void setMinMaxBitrate(int32_t min, int32_t max); void setBitrateData(int32_t bitrate, int64_t time); void setTargetBitrate(); bool isNeedToReport(); bool isNeedToDowngrade(); void noticeAbandonBuffer(int cnt=1); Loading