зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1294605
- Notify MediaStreamTrackSource when ReadyState is overriden. r=jib
MozReview-Commit-ID: CSRWgYt4hqe
This commit is contained in:
Родитель
7e7913f113
Коммит
1b33cd6755
|
@ -387,6 +387,22 @@ MediaStreamTrack::Clone()
|
|||
return newStream->CloneDOMTrack(*this, mTrackID);
|
||||
}
|
||||
|
||||
void
|
||||
MediaStreamTrack::SetReadyState(MediaStreamTrackState aState)
|
||||
{
|
||||
MOZ_ASSERT(!(mReadyState == MediaStreamTrackState::Ended &&
|
||||
aState == MediaStreamTrackState::Live),
|
||||
"We don't support overriding the ready state from ended to live");
|
||||
|
||||
if (mReadyState == MediaStreamTrackState::Live &&
|
||||
aState == MediaStreamTrackState::Ended &&
|
||||
mSource) {
|
||||
mSource->UnregisterSink(this);
|
||||
}
|
||||
|
||||
mReadyState = aState;
|
||||
}
|
||||
|
||||
void
|
||||
MediaStreamTrack::NotifyEnded()
|
||||
{
|
||||
|
|
|
@ -297,7 +297,7 @@ public:
|
|||
* Forces the ready state to a particular value, for instance when we're
|
||||
* cloning an already ended track.
|
||||
*/
|
||||
void SetReadyState(MediaStreamTrackState aState) { mReadyState = aState; }
|
||||
void SetReadyState(MediaStreamTrackState aState);
|
||||
|
||||
/**
|
||||
* Notified by the MediaStreamGraph, through our owning MediaStream on the
|
||||
|
|
Загрузка…
Ссылка в новой задаче