Loading media/libmediaplayerservice/StagefrightRecorder.cpp +16 −0 Original line number Diff line number Diff line Loading @@ -129,6 +129,7 @@ StagefrightRecorder::StagefrightRecorder(const AttributionSourceState& client) mRTPCVOExtMap(-1), mRTPCVODegrees(0), mRTPSockDscp(0), mRTPSockOptEcn(0), mRTPSockNetwork(0), mLastSeqNo(0), mStarted(false), Loading Loading @@ -910,6 +911,13 @@ status_t StagefrightRecorder::setSocketNetwork(int64_t networkHandle) { return OK; } status_t StagefrightRecorder::setParamRtpEcn(int32_t ecn) { ALOGV("setParamRtpEcn: %d", ecn); mRTPSockOptEcn = ecn; return OK; } status_t StagefrightRecorder::requestIDRFrame() { status_t ret = BAD_VALUE; if (mVideoEncoderSource != NULL) { Loading Loading @@ -1091,6 +1099,11 @@ status_t StagefrightRecorder::setParameter( if (safe_strtoi32(value.string(), &dscp)) { return setParamRtpDscp(dscp); } } else if (key == "rtp-param-set-socket-ecn") { int32_t targetEcn; if (safe_strtoi32(value.string(), &targetEcn)) { return setParamRtpEcn(targetEcn); } } else if (key == "rtp-param-set-socket-network") { int64_t networkHandle; if (safe_strtoi64(value.string(), &networkHandle)) { Loading Loading @@ -1272,6 +1285,9 @@ status_t StagefrightRecorder::start() { if (mRTPSockDscp > 0) { meta->setInt32(kKeyRtpDscp, mRTPSockDscp); } if (mRTPSockOptEcn > 0) { meta->setInt32(kKeyRtpEcn, mRTPSockOptEcn); } status = mWriter->start(meta.get()); break; Loading media/libmediaplayerservice/StagefrightRecorder.h +2 −0 Original line number Diff line number Diff line Loading @@ -153,6 +153,7 @@ private: int32_t mRTPCVOExtMap; int32_t mRTPCVODegrees; int32_t mRTPSockDscp; int32_t mRTPSockOptEcn; int64_t mRTPSockNetwork; uint32_t mLastSeqNo; Loading Loading @@ -247,6 +248,7 @@ private: status_t setRTPCVOExtMap(int32_t extmap); status_t setRTPCVODegrees(int32_t cvoDegrees); status_t setParamRtpDscp(int32_t dscp); status_t setParamRtpEcn(int32_t ecn); status_t setSocketNetwork(int64_t networkHandle); status_t requestIDRFrame(); void clipVideoBitRate(); Loading media/libmediaplayerservice/nuplayer/RTPSource.cpp +5 −1 Original line number Diff line number Diff line Loading @@ -115,7 +115,7 @@ void NuPlayer::RTPSource::prepareAsync() { int sockRtp, sockRtcp; ARTPConnection::MakeRTPSocketPair(&sockRtp, &sockRtcp, info->mLocalIp, info->mRemoteIp, info->mLocalPort, info->mRemotePort, info->mSocketNetwork); info->mLocalPort, info->mRemotePort, info->mSocketNetwork, info->mRtpSockOptEcn); sp<AMessage> notify = new AMessage('accu', this); Loading @@ -125,6 +125,8 @@ void NuPlayer::RTPSource::prepareAsync() { mRTPConn->addStream(sockRtp, sockRtcp, desc, i + 1, notify, false); mRTPConn->setSelfID(info->mSelfID); mRTPConn->setStaticJitterTimeMs(info->mJbTimeMs); mRTPConn->setRtpSockOptEcn(info->mRtpSockOptEcn); mRTPConn->setIsIPv6(info->mLocalIp); unsigned long PT; AString formatDesc, formatParams; Loading Loading @@ -719,6 +721,8 @@ status_t NuPlayer::RTPSource::setParameter(const String8 &key, const String8 &va } else if (key == "rtp-param-set-socket-network") { int64_t networkHandle = atoll(value); setSocketNetwork(networkHandle); } else if (key == "rtp-param-set-socket-ecn") { info->mRtpSockOptEcn = atoi(value); } else if (key == "rtp-param-jitter-buffer-time") { // clamping min at 40, max at 3000 info->mJbTimeMs = std::min(std::max(40, atoi(value)), 3000); Loading media/libmediaplayerservice/nuplayer/include/nuplayer/RTPSource.h +2 −0 Original line number Diff line number Diff line Loading @@ -121,6 +121,8 @@ private: uint32_t mSelfID; /* extmap:<value> for CVO will be set to here */ int32_t mCVOExtMap; /* To check ECN is supported or not */ int32_t mRtpSockOptEcn; /* a copy of TrackInfo in RTSPSource */ sp<AnotherPacketSource> mSource; Loading media/libstagefright/include/media/stagefright/MetaDataBase.h +1 −0 Original line number Diff line number Diff line Loading @@ -267,6 +267,7 @@ enum { kKeyRtpExtMap = 'extm', // int32_t, rtp extension ID for cvo on RTP protocol. kKeyRtpCvoDegrees = 'cvod', // int32_t, rtp cvo degrees as per 3GPP 26.114. kKeyRtpDscp = 'dscp', // int32_t, DSCP(Differentiated services codepoint) of RFC 2474. kKeyRtpEcn = 'sEcn', // int32_t, ECN (Explicit Congestion Notification) of RFC 3168 kKeySocketNetwork = 'sNet', // int64_t, socket will be bound to network handle. // Slow-motion markers Loading Loading
media/libmediaplayerservice/StagefrightRecorder.cpp +16 −0 Original line number Diff line number Diff line Loading @@ -129,6 +129,7 @@ StagefrightRecorder::StagefrightRecorder(const AttributionSourceState& client) mRTPCVOExtMap(-1), mRTPCVODegrees(0), mRTPSockDscp(0), mRTPSockOptEcn(0), mRTPSockNetwork(0), mLastSeqNo(0), mStarted(false), Loading Loading @@ -910,6 +911,13 @@ status_t StagefrightRecorder::setSocketNetwork(int64_t networkHandle) { return OK; } status_t StagefrightRecorder::setParamRtpEcn(int32_t ecn) { ALOGV("setParamRtpEcn: %d", ecn); mRTPSockOptEcn = ecn; return OK; } status_t StagefrightRecorder::requestIDRFrame() { status_t ret = BAD_VALUE; if (mVideoEncoderSource != NULL) { Loading Loading @@ -1091,6 +1099,11 @@ status_t StagefrightRecorder::setParameter( if (safe_strtoi32(value.string(), &dscp)) { return setParamRtpDscp(dscp); } } else if (key == "rtp-param-set-socket-ecn") { int32_t targetEcn; if (safe_strtoi32(value.string(), &targetEcn)) { return setParamRtpEcn(targetEcn); } } else if (key == "rtp-param-set-socket-network") { int64_t networkHandle; if (safe_strtoi64(value.string(), &networkHandle)) { Loading Loading @@ -1272,6 +1285,9 @@ status_t StagefrightRecorder::start() { if (mRTPSockDscp > 0) { meta->setInt32(kKeyRtpDscp, mRTPSockDscp); } if (mRTPSockOptEcn > 0) { meta->setInt32(kKeyRtpEcn, mRTPSockOptEcn); } status = mWriter->start(meta.get()); break; Loading
media/libmediaplayerservice/StagefrightRecorder.h +2 −0 Original line number Diff line number Diff line Loading @@ -153,6 +153,7 @@ private: int32_t mRTPCVOExtMap; int32_t mRTPCVODegrees; int32_t mRTPSockDscp; int32_t mRTPSockOptEcn; int64_t mRTPSockNetwork; uint32_t mLastSeqNo; Loading Loading @@ -247,6 +248,7 @@ private: status_t setRTPCVOExtMap(int32_t extmap); status_t setRTPCVODegrees(int32_t cvoDegrees); status_t setParamRtpDscp(int32_t dscp); status_t setParamRtpEcn(int32_t ecn); status_t setSocketNetwork(int64_t networkHandle); status_t requestIDRFrame(); void clipVideoBitRate(); Loading
media/libmediaplayerservice/nuplayer/RTPSource.cpp +5 −1 Original line number Diff line number Diff line Loading @@ -115,7 +115,7 @@ void NuPlayer::RTPSource::prepareAsync() { int sockRtp, sockRtcp; ARTPConnection::MakeRTPSocketPair(&sockRtp, &sockRtcp, info->mLocalIp, info->mRemoteIp, info->mLocalPort, info->mRemotePort, info->mSocketNetwork); info->mLocalPort, info->mRemotePort, info->mSocketNetwork, info->mRtpSockOptEcn); sp<AMessage> notify = new AMessage('accu', this); Loading @@ -125,6 +125,8 @@ void NuPlayer::RTPSource::prepareAsync() { mRTPConn->addStream(sockRtp, sockRtcp, desc, i + 1, notify, false); mRTPConn->setSelfID(info->mSelfID); mRTPConn->setStaticJitterTimeMs(info->mJbTimeMs); mRTPConn->setRtpSockOptEcn(info->mRtpSockOptEcn); mRTPConn->setIsIPv6(info->mLocalIp); unsigned long PT; AString formatDesc, formatParams; Loading Loading @@ -719,6 +721,8 @@ status_t NuPlayer::RTPSource::setParameter(const String8 &key, const String8 &va } else if (key == "rtp-param-set-socket-network") { int64_t networkHandle = atoll(value); setSocketNetwork(networkHandle); } else if (key == "rtp-param-set-socket-ecn") { info->mRtpSockOptEcn = atoi(value); } else if (key == "rtp-param-jitter-buffer-time") { // clamping min at 40, max at 3000 info->mJbTimeMs = std::min(std::max(40, atoi(value)), 3000); Loading
media/libmediaplayerservice/nuplayer/include/nuplayer/RTPSource.h +2 −0 Original line number Diff line number Diff line Loading @@ -121,6 +121,8 @@ private: uint32_t mSelfID; /* extmap:<value> for CVO will be set to here */ int32_t mCVOExtMap; /* To check ECN is supported or not */ int32_t mRtpSockOptEcn; /* a copy of TrackInfo in RTSPSource */ sp<AnotherPacketSource> mSource; Loading
media/libstagefright/include/media/stagefright/MetaDataBase.h +1 −0 Original line number Diff line number Diff line Loading @@ -267,6 +267,7 @@ enum { kKeyRtpExtMap = 'extm', // int32_t, rtp extension ID for cvo on RTP protocol. kKeyRtpCvoDegrees = 'cvod', // int32_t, rtp cvo degrees as per 3GPP 26.114. kKeyRtpDscp = 'dscp', // int32_t, DSCP(Differentiated services codepoint) of RFC 2474. kKeyRtpEcn = 'sEcn', // int32_t, ECN (Explicit Congestion Notification) of RFC 3168 kKeySocketNetwork = 'sNet', // int64_t, socket will be bound to network handle. // Slow-motion markers Loading