mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-21 09:15:35 +00:00
Bug 1302379 - Remove FinishedOnInactive hack from DOMMediaStream. r=jib
It is no longer needed with captured tracks' lifetimes spanning across seek operations. Differential Revision: https://phabricator.services.mozilla.com/D52051 --HG-- extra : moz-landing-system : lando
This commit is contained in:
parent
11ff8de869
commit
3f1d369bbf
@ -1709,9 +1709,6 @@ NS_IMPL_CYCLE_COLLECTION_UNLINK_BEGIN_INHERITED(HTMLMediaElement,
|
||||
}
|
||||
NS_IMPL_CYCLE_COLLECTION_UNLINK(mAudioChannelWrapper)
|
||||
NS_IMPL_CYCLE_COLLECTION_UNLINK(mErrorSink->mError)
|
||||
for (OutputMediaStream& s : tmp->mOutputStreams) {
|
||||
s.mStream->SetFinishedOnInactive(true);
|
||||
}
|
||||
NS_IMPL_CYCLE_COLLECTION_UNLINK(mOutputStreams)
|
||||
NS_IMPL_CYCLE_COLLECTION_UNLINK(mOutputTrackSources)
|
||||
NS_IMPL_CYCLE_COLLECTION_UNLINK(mPlayed)
|
||||
@ -3320,7 +3317,6 @@ void HTMLMediaElement::UpdateOutputTrackSources() {
|
||||
LOG(LogLevel::Debug,
|
||||
("Playback ended or source changed. Discarding stream %p",
|
||||
mOutputStreams[i].mStream.get()));
|
||||
mOutputStreams[i].mStream->SetFinishedOnInactive(true);
|
||||
mOutputStreams.RemoveElementAt(i);
|
||||
if (mOutputStreams.IsEmpty()) {
|
||||
mTracksCaptured = nullptr;
|
||||
|
@ -456,20 +456,6 @@ void DOMMediaStream::UnregisterTrackListener(TrackListener* aListener) {
|
||||
mTrackListeners.RemoveElement(aListener);
|
||||
}
|
||||
|
||||
void DOMMediaStream::SetFinishedOnInactive(bool aFinishedOnInactive) {
|
||||
MOZ_ASSERT(NS_IsMainThread());
|
||||
|
||||
if (mFinishedOnInactive == aFinishedOnInactive) {
|
||||
return;
|
||||
}
|
||||
|
||||
mFinishedOnInactive = aFinishedOnInactive;
|
||||
|
||||
if (mFinishedOnInactive && !ContainsLiveTracks(mTracks)) {
|
||||
NotifyTrackRemoved(nullptr);
|
||||
}
|
||||
}
|
||||
|
||||
void DOMMediaStream::NotifyTrackAdded(const RefPtr<MediaStreamTrack>& aTrack) {
|
||||
MOZ_ASSERT(NS_IsMainThread());
|
||||
|
||||
@ -518,10 +504,6 @@ void DOMMediaStream::NotifyTrackRemoved(
|
||||
}
|
||||
}
|
||||
|
||||
if (!mFinishedOnInactive) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (mAudible) {
|
||||
// Check if we became inaudible.
|
||||
if (!ContainsLiveAudioTracks(mTracks)) {
|
||||
|
@ -189,10 +189,6 @@ class DOMMediaStream : public DOMEventTargetHelper,
|
||||
// a dead pointer. Main thread only.
|
||||
void UnregisterTrackListener(TrackListener* aListener);
|
||||
|
||||
// Tells this MediaStream whether it can go inactive as soon as no tracks
|
||||
// are live anymore.
|
||||
void SetFinishedOnInactive(bool aFinishedOnInactive);
|
||||
|
||||
protected:
|
||||
virtual ~DOMMediaStream();
|
||||
|
||||
@ -243,10 +239,6 @@ class DOMMediaStream : public DOMEventTargetHelper,
|
||||
|
||||
// True if this stream has live audio tracks.
|
||||
bool mAudible = false;
|
||||
|
||||
// For compatibility with mozCaptureStream, we in some cases do not go
|
||||
// inactive until the MediaDecoder lets us. (Remove this in Bug 1302379)
|
||||
bool mFinishedOnInactive = true;
|
||||
};
|
||||
|
||||
NS_DEFINE_STATIC_IID_ACCESSOR(DOMMediaStream, NS_DOMMEDIASTREAM_IID)
|
||||
|
Loading…
Reference in New Issue
Block a user