mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-20 08:45:46 +00:00
Bug 1474658 - P2 - RTCRtpStreamStats.ssrc is now a unsigned long r=mjf
RTCRtpStreamStats.ssrc used to be a DOMString but is now an unsigned long. When gathering this stat it needs to be constructed accordingly. MozReview-Commit-ID: IOq9IQQxFVh --HG-- extra : rebase_source : 3c5fc6144f6fa0435fc1ccce1a3fa371b9ffc162
This commit is contained in:
parent
46cfffdfb9
commit
c8937fbffe
@ -3441,10 +3441,10 @@ PeerConnectionImpl::ExecuteStatsQuery_s(RTCStatsQuery *query) {
|
|||||||
case MediaPipeline::DirectionType::TRANSMIT: {
|
case MediaPipeline::DirectionType::TRANSMIT: {
|
||||||
nsString localId = NS_LITERAL_STRING("outbound_rtp_") + idstr;
|
nsString localId = NS_LITERAL_STRING("outbound_rtp_") + idstr;
|
||||||
nsString remoteId;
|
nsString remoteId;
|
||||||
nsString ssrc;
|
Maybe<uint32_t> ssrc;
|
||||||
std::vector<unsigned int> ssrcvals = mp.Conduit()->GetLocalSSRCs();
|
std::vector<unsigned int> ssrcvals = mp.Conduit()->GetLocalSSRCs();
|
||||||
if (!ssrcvals.empty()) {
|
if (!ssrcvals.empty()) {
|
||||||
ssrc.AppendInt(ssrcvals[0]);
|
ssrc = Some(ssrcvals[0]);
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
// First, fill in remote stat with rtcp receiver data, if present.
|
// First, fill in remote stat with rtcp receiver data, if present.
|
||||||
@ -3466,9 +3466,7 @@ PeerConnectionImpl::ExecuteStatsQuery_s(RTCStatsQuery *query) {
|
|||||||
s.mTimestamp.Construct(timestamp);
|
s.mTimestamp.Construct(timestamp);
|
||||||
s.mId.Construct(remoteId);
|
s.mId.Construct(remoteId);
|
||||||
s.mType.Construct(RTCStatsType::Inbound_rtp);
|
s.mType.Construct(RTCStatsType::Inbound_rtp);
|
||||||
if (ssrc.Length()) {
|
ssrc.apply([&s](uint32_t aSsrc){s.mSsrc.Construct(aSsrc);});
|
||||||
s.mSsrc.Construct(ssrc);
|
|
||||||
}
|
|
||||||
s.mMediaType.Construct(mediaType);
|
s.mMediaType.Construct(mediaType);
|
||||||
s.mJitter.Construct(double(jitterMs)/1000);
|
s.mJitter.Construct(double(jitterMs)/1000);
|
||||||
s.mRemoteId.Construct(localId);
|
s.mRemoteId.Construct(localId);
|
||||||
@ -3489,9 +3487,7 @@ PeerConnectionImpl::ExecuteStatsQuery_s(RTCStatsQuery *query) {
|
|||||||
s.mTimestamp.Construct(query->now);
|
s.mTimestamp.Construct(query->now);
|
||||||
s.mId.Construct(localId);
|
s.mId.Construct(localId);
|
||||||
s.mType.Construct(RTCStatsType::Outbound_rtp);
|
s.mType.Construct(RTCStatsType::Outbound_rtp);
|
||||||
if (ssrc.Length()) {
|
ssrc.apply([&s](uint32_t aSsrc){s.mSsrc.Construct(aSsrc);});
|
||||||
s.mSsrc.Construct(ssrc);
|
|
||||||
}
|
|
||||||
s.mMediaType.Construct(mediaType);
|
s.mMediaType.Construct(mediaType);
|
||||||
s.mRemoteId.Construct(remoteId);
|
s.mRemoteId.Construct(remoteId);
|
||||||
s.mIsRemote = false;
|
s.mIsRemote = false;
|
||||||
@ -3539,10 +3535,10 @@ PeerConnectionImpl::ExecuteStatsQuery_s(RTCStatsQuery *query) {
|
|||||||
case MediaPipeline::DirectionType::RECEIVE: {
|
case MediaPipeline::DirectionType::RECEIVE: {
|
||||||
nsString localId = NS_LITERAL_STRING("inbound_rtp_") + idstr;
|
nsString localId = NS_LITERAL_STRING("inbound_rtp_") + idstr;
|
||||||
nsString remoteId;
|
nsString remoteId;
|
||||||
nsString ssrc;
|
Maybe<uint32_t> ssrc;
|
||||||
unsigned int ssrcval;
|
unsigned int ssrcval;
|
||||||
if (mp.Conduit()->GetRemoteSSRC(&ssrcval)) {
|
if (mp.Conduit()->GetRemoteSSRC(&ssrcval)) {
|
||||||
ssrc.AppendInt(ssrcval);
|
ssrc = Some(ssrcval);
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
// First, fill in remote stat with rtcp sender data, if present.
|
// First, fill in remote stat with rtcp sender data, if present.
|
||||||
@ -3556,9 +3552,7 @@ PeerConnectionImpl::ExecuteStatsQuery_s(RTCStatsQuery *query) {
|
|||||||
s.mTimestamp.Construct(timestamp);
|
s.mTimestamp.Construct(timestamp);
|
||||||
s.mId.Construct(remoteId);
|
s.mId.Construct(remoteId);
|
||||||
s.mType.Construct(RTCStatsType::Outbound_rtp);
|
s.mType.Construct(RTCStatsType::Outbound_rtp);
|
||||||
if (ssrc.Length()) {
|
ssrc.apply([&s](uint32_t aSsrc){s.mSsrc.Construct(aSsrc);});
|
||||||
s.mSsrc.Construct(ssrc);
|
|
||||||
}
|
|
||||||
s.mMediaType.Construct(mediaType);
|
s.mMediaType.Construct(mediaType);
|
||||||
s.mRemoteId.Construct(localId);
|
s.mRemoteId.Construct(localId);
|
||||||
s.mIsRemote = true;
|
s.mIsRemote = true;
|
||||||
@ -3573,9 +3567,7 @@ PeerConnectionImpl::ExecuteStatsQuery_s(RTCStatsQuery *query) {
|
|||||||
s.mTimestamp.Construct(query->now);
|
s.mTimestamp.Construct(query->now);
|
||||||
s.mId.Construct(localId);
|
s.mId.Construct(localId);
|
||||||
s.mType.Construct(RTCStatsType::Inbound_rtp);
|
s.mType.Construct(RTCStatsType::Inbound_rtp);
|
||||||
if (ssrc.Length()) {
|
ssrc.apply([&s](uint32_t aSsrc){s.mSsrc.Construct(aSsrc);});
|
||||||
s.mSsrc.Construct(ssrc);
|
|
||||||
}
|
|
||||||
s.mMediaType.Construct(mediaType);
|
s.mMediaType.Construct(mediaType);
|
||||||
unsigned int jitterMs, packetsLost;
|
unsigned int jitterMs, packetsLost;
|
||||||
if (mp.Conduit()->GetRTPStats(&jitterMs, &packetsLost)) {
|
if (mp.Conduit()->GetRTPStats(&jitterMs, &packetsLost)) {
|
||||||
|
Loading…
Reference in New Issue
Block a user