Skip to content

Commit

Permalink
Bug 1616875: Remove some unnecessary code. r=mjf
Browse files Browse the repository at this point in the history
Differential Revision: https://phabricator.services.mozilla.com/D64238

--HG--
extra : moz-landing-system : lando
  • Loading branch information
docfaraday committed Mar 19, 2020
1 parent 72efb61 commit 5b459b8
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 30 deletions.
19 changes: 10 additions & 9 deletions media/webrtc/signaling/src/peerconnection/PeerConnectionImpl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2649,19 +2649,20 @@ void PeerConnectionImpl::RecordConduitTelemetry() {
return;
}

nsTArray<RefPtr<MediaPipelineReceive>> pipelines;
nsTArray<RefPtr<VideoSessionConduit>> conduits;
for (const auto& transceiver : mMedia->GetTransceivers()) {
if (transceiver->IsValid()) {
pipelines.AppendElement(transceiver->GetReceivePipeline());
RefPtr<MediaSessionConduit> conduit = transceiver->GetConduit();
if (conduit) {
auto asVideo = conduit->AsVideoSessionConduit();
if (asVideo) {
conduits.AppendElement(asVideo.value());
}
}
}

mSTSThread->Dispatch(NS_NewRunnableFunction(__func__, [pipelines]() {
for (const auto& pipeline : pipelines) {
auto asVideo = pipeline->Conduit()->AsVideoSessionConduit();
if (asVideo) {
asVideo.value()->RecordTelemetry();
}
mSTSThread->Dispatch(NS_NewRunnableFunction(__func__, [conduits]() {
for (const auto& conduit : conduits) {
conduit->RecordTelemetry();
}
}));
}
Expand Down
17 changes: 0 additions & 17 deletions media/webrtc/signaling/src/peerconnection/TransceiverImpl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -479,19 +479,6 @@ void TransceiverImpl::InsertDTMFTone(int tone, uint32_t duration) {
conduit->InsertDTMFTone(0, tone, true, duration, 6);
}

bool TransceiverImpl::HasReceiveTrack(
const dom::MediaStreamTrack* aRecvTrack) const {
if (!mHaveStartedReceiving) {
return false;
}

if (!aRecvTrack) {
return true;
}

return mReceiveTrack == aRecvTrack;
}

JSObject* TransceiverImpl::WrapObject(JSContext* aCx,
JS::Handle<JSObject*> aGivenProto) {
return dom::TransceiverImpl_Binding::Wrap(aCx, this, aGivenProto);
Expand All @@ -503,10 +490,6 @@ RefPtr<MediaPipelineTransmit> TransceiverImpl::GetSendPipeline() {
return mTransmitPipeline;
}

RefPtr<MediaPipelineReceive> TransceiverImpl::GetReceivePipeline() {
return mReceivePipeline;
}

static nsresult JsepCodecDescToAudioCodecConfig(
const JsepCodecDescription& aCodec, UniquePtr<AudioCodecConfig>* aConfig) {
MOZ_ASSERT(aCodec.mType == SdpMediaSection::kAudio);
Expand Down
4 changes: 0 additions & 4 deletions media/webrtc/signaling/src/peerconnection/TransceiverImpl.h
Original file line number Diff line number Diff line change
Expand Up @@ -96,13 +96,9 @@ class TransceiverImpl : public nsISupports, public nsWrapperCache {

void InsertDTMFTone(int tone, uint32_t duration);

bool HasReceiveTrack(const dom::MediaStreamTrack* aReceiveTrack) const;

// TODO: These are for stats; try to find a cleaner way.
RefPtr<MediaPipelineTransmit> GetSendPipeline();

RefPtr<MediaPipelineReceive> GetReceivePipeline();

std::string GetTransportId() const {
return mJsepTransceiver->mTransport.mTransportId;
}
Expand Down

0 comments on commit 5b459b8

Please sign in to comment.