diff --git a/media/webrtc/signaling/src/peerconnection/MediaPipelineFactory.cpp b/media/webrtc/signaling/src/peerconnection/MediaPipelineFactory.cpp index 58eeed437d2b..7be26bdf7d8e 100644 --- a/media/webrtc/signaling/src/peerconnection/MediaPipelineFactory.cpp +++ b/media/webrtc/signaling/src/peerconnection/MediaPipelineFactory.cpp @@ -870,8 +870,11 @@ MediaPipelineFactory::ConfigureVideoCodecMode(const JsepTrack& aTrack, mPCMedia->GetLocalStreamByTrackId(aTrack.GetTrackId()); //get video track + RefPtr track = + stream->GetTrackById(aTrack.GetTrackId()); + RefPtr videotrack = - stream->GetVideoTrackByTrackId(aTrack.GetTrackId()); + track->AsVideoStreamTrack(); if (!videotrack) { MOZ_MTLOG(ML_ERROR, "video track not available"); diff --git a/media/webrtc/signaling/src/peerconnection/PeerConnectionMedia.cpp b/media/webrtc/signaling/src/peerconnection/PeerConnectionMedia.cpp index f317d697db79..8cbbecfe58e4 100644 --- a/media/webrtc/signaling/src/peerconnection/PeerConnectionMedia.cpp +++ b/media/webrtc/signaling/src/peerconnection/PeerConnectionMedia.cpp @@ -1495,26 +1495,6 @@ SourceStreamInfo::AnyCodecHasPluginID(uint64_t aPluginID) return false; } -#if !defined(MOZILLA_EXTERNAL_LINKAGE) -RefPtr -SourceStreamInfo::GetVideoTrackByTrackId(const std::string& trackId) -{ - nsTArray> videoTracks; - - mMediaStream->GetVideoTracks(videoTracks); - - for (size_t i = 0; i < videoTracks.Length(); ++i) { - nsString aTrackId; - videoTracks[i]->GetId(aTrackId); - if (aTrackId.EqualsIgnoreCase(trackId.c_str())) { - return videoTracks[i]; - } - } - - return nullptr; -} -#endif - nsresult SourceStreamInfo::StorePipeline( const std::string& trackId, diff --git a/media/webrtc/signaling/src/peerconnection/PeerConnectionMedia.h b/media/webrtc/signaling/src/peerconnection/PeerConnectionMedia.h index bda6ba812d49..fa97704e9558 100644 --- a/media/webrtc/signaling/src/peerconnection/PeerConnectionMedia.h +++ b/media/webrtc/signaling/src/peerconnection/PeerConnectionMedia.h @@ -115,9 +115,6 @@ public: void DetachTransport_s(); void DetachMedia_m(); bool AnyCodecHasPluginID(uint64_t aPluginID); -#if !defined(MOZILLA_EXTERNAL_LINKAGE) - RefPtr GetVideoTrackByTrackId(const std::string& trackId); -#endif protected: RefPtr mMediaStream; PeerConnectionMedia *mParent;