summaryrefslogtreecommitdiffstats
path: root/media/webrtc/signaling
diff options
context:
space:
mode:
authorwolfbeast <mcwerewolf@wolfbeast.com>2019-11-10 11:39:27 +0100
committerwolfbeast <mcwerewolf@wolfbeast.com>2019-11-10 11:39:27 +0100
commit974a481d12bf430891725bd3662876358e57e11a (patch)
treecad011151456251fef2f1b8d02ef4b4e45fad61a /media/webrtc/signaling
parent6bd66b1728eeddb058066edda740aaeb2ceaec23 (diff)
parent736d25cbec4541186ed46c935c117ce4d1c7f3bb (diff)
downloadUXP-974a481d12bf430891725bd3662876358e57e11a.tar
UXP-974a481d12bf430891725bd3662876358e57e11a.tar.gz
UXP-974a481d12bf430891725bd3662876358e57e11a.tar.lz
UXP-974a481d12bf430891725bd3662876358e57e11a.tar.xz
UXP-974a481d12bf430891725bd3662876358e57e11a.zip
Merge branch 'master' into js-modules
# Conflicts: # modules/libpref/init/all.js
Diffstat (limited to 'media/webrtc/signaling')
-rwxr-xr-xmedia/webrtc/signaling/src/media-conduit/AudioConduit.cpp9
-rw-r--r--media/webrtc/signaling/src/media-conduit/CodecStatistics.cpp8
-rw-r--r--media/webrtc/signaling/src/peerconnection/PeerConnectionImpl.cpp127
-rw-r--r--media/webrtc/signaling/src/peerconnection/PeerConnectionImpl.h5
-rw-r--r--media/webrtc/signaling/src/peerconnection/WebrtcGlobalInformation.cpp16
5 files changed, 2 insertions, 163 deletions
diff --git a/media/webrtc/signaling/src/media-conduit/AudioConduit.cpp b/media/webrtc/signaling/src/media-conduit/AudioConduit.cpp
index 2c57431e7..e36b8b6cf 100755
--- a/media/webrtc/signaling/src/media-conduit/AudioConduit.cpp
+++ b/media/webrtc/signaling/src/media-conduit/AudioConduit.cpp
@@ -706,15 +706,6 @@ WebrtcAudioConduit::GetAudioFrame(int16_t speechData[],
if (GetAVStats(&jitter_buffer_delay_ms,
&playout_buffer_delay_ms,
&avsync_offset_ms)) {
-#if !defined(MOZILLA_EXTERNAL_LINKAGE)
- if (avsync_offset_ms < 0) {
- Telemetry::Accumulate(Telemetry::WEBRTC_AVSYNC_WHEN_VIDEO_LAGS_AUDIO_MS,
- -avsync_offset_ms);
- } else {
- Telemetry::Accumulate(Telemetry::WEBRTC_AVSYNC_WHEN_AUDIO_LAGS_VIDEO_MS,
- avsync_offset_ms);
- }
-#endif
CSFLogError(logTag,
"A/V sync: sync delta: %dms, audio jitter delay %dms, playout delay %dms",
avsync_offset_ms, jitter_buffer_delay_ms, playout_buffer_delay_ms);
diff --git a/media/webrtc/signaling/src/media-conduit/CodecStatistics.cpp b/media/webrtc/signaling/src/media-conduit/CodecStatistics.cpp
index eb03c0bf8..da40a59ea 100644
--- a/media/webrtc/signaling/src/media-conduit/CodecStatistics.cpp
+++ b/media/webrtc/signaling/src/media-conduit/CodecStatistics.cpp
@@ -124,8 +124,6 @@ void VideoCodecStatistics::ReceiveStateChange(const int aChannel,
TimeDuration timeDelta = TimeStamp::Now() - mReceiveFailureTime;
CSFLogError(logTag, "Video error duration: %u ms",
static_cast<uint32_t>(timeDelta.ToMilliseconds()));
- Telemetry::Accumulate(Telemetry::WEBRTC_VIDEO_ERROR_RECOVERY_MS,
- static_cast<uint32_t>(timeDelta.ToMilliseconds()));
mRecoveredLosses++; // to calculate losses per minute
mTotalLossTime += timeDelta; // To calculate % time in recovery
@@ -147,16 +145,10 @@ void VideoCodecStatistics::EndOfCallStats()
if (callDelta.ToSeconds() != 0) {
uint32_t recovered_per_min = mRecoveredBeforeLoss/(callDelta.ToSeconds()/60);
CSFLogError(logTag, "Video recovery before error per min %u", recovered_per_min);
- Telemetry::Accumulate(Telemetry::WEBRTC_VIDEO_RECOVERY_BEFORE_ERROR_PER_MIN,
- recovered_per_min);
uint32_t err_per_min = mRecoveredLosses/(callDelta.ToSeconds()/60);
CSFLogError(logTag, "Video recovery after error per min %u", err_per_min);
- Telemetry::Accumulate(Telemetry::WEBRTC_VIDEO_RECOVERY_AFTER_ERROR_PER_MIN,
- err_per_min);
float percent = (mTotalLossTime.ToSeconds()*100)/callDelta.ToSeconds();
CSFLogError(logTag, "Video error time percentage %f%%", percent);
- Telemetry::Accumulate(Telemetry::WEBRTC_VIDEO_DECODE_ERROR_TIME_PERMILLE,
- static_cast<uint32_t>(percent*10));
}
}
#endif
diff --git a/media/webrtc/signaling/src/peerconnection/PeerConnectionImpl.cpp b/media/webrtc/signaling/src/peerconnection/PeerConnectionImpl.cpp
index 33422ed7a..f31e2edb3 100644
--- a/media/webrtc/signaling/src/peerconnection/PeerConnectionImpl.cpp
+++ b/media/webrtc/signaling/src/peerconnection/PeerConnectionImpl.cpp
@@ -62,7 +62,6 @@
#include "nsDOMDataChannel.h"
#include "mozilla/dom/Performance.h"
#include "mozilla/TimeStamp.h"
-#include "mozilla/Telemetry.h"
#include "mozilla/Preferences.h"
#include "mozilla/PublicSSL.h"
#include "nsXULAppAPI.h"
@@ -2167,9 +2166,6 @@ PeerConnectionImpl::SetRemoteDescription(int32_t action, const char* aSDP)
RemoveOldRemoteTracks(pco);
pco->OnSetRemoteDescriptionSuccess(jrv);
-#if !defined(MOZILLA_EXTERNAL_LINKAGE)
- startCallTelem();
-#endif
}
UpdateSignalingState(sdpType == mozilla::kJsepSdpRollback);
@@ -2245,22 +2241,6 @@ PeerConnectionImpl::AddIceCandidate(const char* aCandidate, const char* aMid, un
CSFLogDebug(logTag, "AddIceCandidate: %s", aCandidate);
-#if !defined(MOZILLA_EXTERNAL_LINKAGE)
- // When remote candidates are added before our ICE ctx is up and running
- // (the transition to New is async through STS, so this is not impossible),
- // we won't record them as trickle candidates. Is this what we want?
- if(!mIceStartTime.IsNull()) {
- TimeDuration timeDelta = TimeStamp::Now() - mIceStartTime;
- if (mIceConnectionState == PCImplIceConnectionState::Failed) {
- Telemetry::Accumulate(Telemetry::WEBRTC_ICE_LATE_TRICKLE_ARRIVAL_TIME,
- timeDelta.ToMilliseconds());
- } else {
- Telemetry::Accumulate(Telemetry::WEBRTC_ICE_ON_TIME_TRICKLE_ARRIVAL_TIME,
- timeDelta.ToMilliseconds());
- }
- }
-#endif
-
nsresult res = mJsepSession->AddRemoteIceCandidate(aCandidate, aMid, aLevel);
if (NS_SUCCEEDED(res)) {
@@ -3008,54 +2988,6 @@ PeerConnectionImpl::PluginCrash(uint32_t aPluginID,
return true;
}
-void
-PeerConnectionImpl::RecordEndOfCallTelemetry() const
-{
- if (!mJsepSession) {
- return;
- }
-
-#if !defined(MOZILLA_EXTERNAL_LINKAGE)
- // Bitmask used for WEBRTC/LOOP_CALL_TYPE telemetry reporting
- static const uint32_t kAudioTypeMask = 1;
- static const uint32_t kVideoTypeMask = 2;
- static const uint32_t kDataChannelTypeMask = 4;
-
- // Report end-of-call Telemetry
- if (mJsepSession->GetNegotiations() > 0) {
- Telemetry::Accumulate(Telemetry::WEBRTC_RENEGOTIATIONS,
- mJsepSession->GetNegotiations()-1);
- }
- Telemetry::Accumulate(Telemetry::WEBRTC_MAX_VIDEO_SEND_TRACK,
- mMaxSending[SdpMediaSection::MediaType::kVideo]);
- Telemetry::Accumulate(Telemetry::WEBRTC_MAX_VIDEO_RECEIVE_TRACK,
- mMaxReceiving[SdpMediaSection::MediaType::kVideo]);
- Telemetry::Accumulate(Telemetry::WEBRTC_MAX_AUDIO_SEND_TRACK,
- mMaxSending[SdpMediaSection::MediaType::kAudio]);
- Telemetry::Accumulate(Telemetry::WEBRTC_MAX_AUDIO_RECEIVE_TRACK,
- mMaxReceiving[SdpMediaSection::MediaType::kAudio]);
- // DataChannels appear in both Sending and Receiving
- Telemetry::Accumulate(Telemetry::WEBRTC_DATACHANNEL_NEGOTIATED,
- mMaxSending[SdpMediaSection::MediaType::kApplication]);
- // Enumerated/bitmask: 1 = Audio, 2 = Video, 4 = DataChannel
- // A/V = 3, A/V/D = 7, etc
- uint32_t type = 0;
- if (mMaxSending[SdpMediaSection::MediaType::kAudio] ||
- mMaxReceiving[SdpMediaSection::MediaType::kAudio]) {
- type = kAudioTypeMask;
- }
- if (mMaxSending[SdpMediaSection::MediaType::kVideo] ||
- mMaxReceiving[SdpMediaSection::MediaType::kVideo]) {
- type |= kVideoTypeMask;
- }
- if (mMaxSending[SdpMediaSection::MediaType::kApplication]) {
- type |= kDataChannelTypeMask;
- }
- Telemetry::Accumulate(Telemetry::WEBRTC_CALL_TYPE,
- type);
-#endif
-}
-
nsresult
PeerConnectionImpl::CloseInt()
{
@@ -3072,7 +3004,6 @@ PeerConnectionImpl::CloseInt()
if (!mPrivateWindow) {
RecordLongtermICEStatistics();
}
- RecordEndOfCallTelemetry();
CSFLogInfo(logTag, "%s: Closing PeerConnectionImpl %s; "
"ending call", __FUNCTION__, mHandle.c_str());
if (mJsepSession) {
@@ -3109,13 +3040,6 @@ PeerConnectionImpl::ShutdownMedia()
pair.second->RemovePrincipalChangeObserver(this);
}
}
-
- // End of call to be recorded in Telemetry
- if (!mStartTime.IsNull()){
- TimeDuration timeDelta = TimeStamp::Now() - mStartTime;
- Telemetry::Accumulate(Telemetry::WEBRTC_CALL_DURATION,
- timeDelta.ToSeconds());
- }
#endif
// Forget the reference so that we can transfer it to
@@ -3175,9 +3099,6 @@ PeerConnectionImpl::SetSignalingState_m(PCImplSignalingState aSignalingState,
fireNegotiationNeeded = true;
}
- // Telemetry: record info on the current state of streams/renegotiations/etc
- // Note: this code gets run on rollbacks as well!
-
// Update the max channels used with each direction for each type
uint16_t receiving[SdpMediaSection::kMediaTypes];
uint16_t sending[SdpMediaSection::kMediaTypes];
@@ -3423,33 +3344,6 @@ void PeerConnectionImpl::IceConnectionStateChange(
return;
}
-#if !defined(MOZILLA_EXTERNAL_LINKAGE)
- if (!isDone(mIceConnectionState) && isDone(domState)) {
- // mIceStartTime can be null if going directly from New to Closed, in which
- // case we don't count it as a success or a failure.
- if (!mIceStartTime.IsNull()){
- TimeDuration timeDelta = TimeStamp::Now() - mIceStartTime;
- if (isSucceeded(domState)) {
- Telemetry::Accumulate(Telemetry::WEBRTC_ICE_SUCCESS_TIME,
- timeDelta.ToMilliseconds());
- } else if (isFailed(domState)) {
- Telemetry::Accumulate(Telemetry::WEBRTC_ICE_FAILURE_TIME,
- timeDelta.ToMilliseconds());
- }
- }
-
- if (isSucceeded(domState)) {
- Telemetry::Accumulate(
- Telemetry::WEBRTC_ICE_ADD_CANDIDATE_ERRORS_GIVEN_SUCCESS,
- mAddCandidateErrorCount);
- } else if (isFailed(domState)) {
- Telemetry::Accumulate(
- Telemetry::WEBRTC_ICE_ADD_CANDIDATE_ERRORS_GIVEN_FAILURE,
- mAddCandidateErrorCount);
- }
- }
-#endif
-
mIceConnectionState = domState;
if (mIceConnectionState == PCImplIceConnectionState::Connected ||
@@ -3467,10 +3361,6 @@ void PeerConnectionImpl::IceConnectionStateChange(
STAMP_TIMECARD(mTimeCard, "Ice state: new");
break;
case PCImplIceConnectionState::Checking:
-#if !defined(MOZILLA_EXTERNAL_LINKAGE)
- // For telemetry
- mIceStartTime = TimeStamp::Now();
-#endif
STAMP_TIMECARD(mTimeCard, "Ice state: checking");
break;
case PCImplIceConnectionState::Connected:
@@ -4063,23 +3953,6 @@ PeerConnectionImpl::IceStreamReady(NrIceMediaStream *aStream)
CSFLogDebug(logTag, "%s: %s", __FUNCTION__, aStream->name().c_str());
}
-#if !defined(MOZILLA_EXTERNAL_LINKAGE)
-//Telemetry for when calls start
-void
-PeerConnectionImpl::startCallTelem() {
- if (!mStartTime.IsNull()) {
- return;
- }
-
- // Start time for calls
- mStartTime = TimeStamp::Now();
-
- // Increment session call counter
- // If we want to track Loop calls independently here, we need two histograms.
- Telemetry::Accumulate(Telemetry::WEBRTC_CALL_COUNT_2, 1);
-}
-#endif
-
NS_IMETHODIMP
PeerConnectionImpl::GetLocalStreams(nsTArray<RefPtr<DOMMediaStream > >& result)
{
diff --git a/media/webrtc/signaling/src/peerconnection/PeerConnectionImpl.h b/media/webrtc/signaling/src/peerconnection/PeerConnectionImpl.h
index c29d08180..1dcc70519 100644
--- a/media/webrtc/signaling/src/peerconnection/PeerConnectionImpl.h
+++ b/media/webrtc/signaling/src/peerconnection/PeerConnectionImpl.h
@@ -594,8 +594,6 @@ public:
bool PluginCrash(uint32_t aPluginID,
const nsAString& aPluginName);
- void RecordEndOfCallTelemetry() const;
-
nsresult InitializeDataChannel();
NS_IMETHODIMP_TO_ERRORRESULT_RETREF(nsDOMDataChannel,
@@ -647,9 +645,6 @@ public:
bool HasMedia() const;
#if !defined(MOZILLA_EXTERNAL_LINKAGE)
- // initialize telemetry for when calls start
- void startCallTelem();
-
nsresult BuildStatsQuery_m(
mozilla::dom::MediaStreamTrack *aSelector,
RTCStatsQuery *query);
diff --git a/media/webrtc/signaling/src/peerconnection/WebrtcGlobalInformation.cpp b/media/webrtc/signaling/src/peerconnection/WebrtcGlobalInformation.cpp
index 96bdd5b70..f283d6111 100644
--- a/media/webrtc/signaling/src/peerconnection/WebrtcGlobalInformation.cpp
+++ b/media/webrtc/signaling/src/peerconnection/WebrtcGlobalInformation.cpp
@@ -1194,18 +1194,8 @@ static void GetStatsForLongTermStorage_s(
rate_limit_bit_pattern |= 2;
}
- if (query->failed) {
- Telemetry::Accumulate(
- Telemetry::WEBRTC_STUN_RATE_LIMIT_EXCEEDED_BY_TYPE_GIVEN_FAILURE,
- rate_limit_bit_pattern);
- } else {
- Telemetry::Accumulate(
- Telemetry::WEBRTC_STUN_RATE_LIMIT_EXCEEDED_BY_TYPE_GIVEN_SUCCESS,
- rate_limit_bit_pattern);
- }
-
- // Even if Telemetry::Accumulate is threadsafe, we still need to send the
- // query back to main, since that is where it must be destroyed.
+ // We still need to send the query back to main, since that is where
+ // it must be destroyed.
NS_DispatchToMainThread(
WrapRunnableNM(
&StoreLongTermICEStatisticsImpl_m,
@@ -1216,8 +1206,6 @@ static void GetStatsForLongTermStorage_s(
void WebrtcGlobalInformation::StoreLongTermICEStatistics(
PeerConnectionImpl& aPc) {
- Telemetry::Accumulate(Telemetry::WEBRTC_ICE_FINAL_CONNECTION_STATE,
- static_cast<uint32_t>(aPc.IceConnectionState()));
if (aPc.IceConnectionState() == PCImplIceConnectionState::New) {
// ICE has not started; we won't have any remote candidates, so recording