Bug 1271669 - Remove GetVideoTrackByTrackId(). r=bwc

We have GetTrackById() now that does essentially the same thing.
Also, GetVideoTrackByTrackId() was too focused on the owning MediaStream and
didn't work.

MozReview-Commit-ID: 9z3rg4FI9H8

--HG--
extra : rebase_source : 7e295dc19b41b62f809977b6b73d2729f127d08a
extra : histedit_source : 39ab0f08939825c341b136150760e02c92fac970
This commit is contained in:
Andreas Pehrson 2016-05-19 15:28:03 +02:00
Родитель f0637ecee9
Коммит 59ed044326
3 изменённых файлов: 4 добавлений и 24 удалений

Просмотреть файл

@ -870,8 +870,11 @@ MediaPipelineFactory::ConfigureVideoCodecMode(const JsepTrack& aTrack,
mPCMedia->GetLocalStreamByTrackId(aTrack.GetTrackId());
//get video track
RefPtr<mozilla::dom::MediaStreamTrack> track =
stream->GetTrackById(aTrack.GetTrackId());
RefPtr<mozilla::dom::VideoStreamTrack> videotrack =
stream->GetVideoTrackByTrackId(aTrack.GetTrackId());
track->AsVideoStreamTrack();
if (!videotrack) {
MOZ_MTLOG(ML_ERROR, "video track not available");

Просмотреть файл

@ -1495,26 +1495,6 @@ SourceStreamInfo::AnyCodecHasPluginID(uint64_t aPluginID)
return false;
}
#if !defined(MOZILLA_EXTERNAL_LINKAGE)
RefPtr<mozilla::dom::VideoStreamTrack>
SourceStreamInfo::GetVideoTrackByTrackId(const std::string& trackId)
{
nsTArray<RefPtr<mozilla::dom::VideoStreamTrack>> 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,

Просмотреть файл

@ -115,9 +115,6 @@ public:
void DetachTransport_s();
void DetachMedia_m();
bool AnyCodecHasPluginID(uint64_t aPluginID);
#if !defined(MOZILLA_EXTERNAL_LINKAGE)
RefPtr<mozilla::dom::VideoStreamTrack> GetVideoTrackByTrackId(const std::string& trackId);
#endif
protected:
RefPtr<DOMMediaStream> mMediaStream;
PeerConnectionMedia *mParent;