mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1163497. Part 3 - move stream connection code from MediaDecoder::RecreateDecodedStream() to DecodedStream::RecreateData(). r=roc.
This commit is contained in:
parent
c87ee2d488
commit
86430c011e
@ -231,7 +231,18 @@ DecodedStream::RecreateData(int64_t aInitialTime, SourceMediaStream* aStream)
|
||||
MOZ_ASSERT(NS_IsMainThread());
|
||||
GetReentrantMonitor().AssertCurrentThreadIn();
|
||||
MOZ_ASSERT(!mData);
|
||||
|
||||
mData.reset(new DecodedStreamData(aInitialTime, aStream));
|
||||
|
||||
// Note that the delay between removing ports in DestroyDecodedStream
|
||||
// and adding new ones won't cause a glitch since all graph operations
|
||||
// between main-thread stable states take effect atomically.
|
||||
auto& outputStreams = OutputStreams();
|
||||
for (int32_t i = outputStreams.Length() - 1; i >= 0; --i) {
|
||||
OutputStreamData& os = outputStreams[i];
|
||||
MOZ_ASSERT(!os.mStream->IsDestroyed(), "Should've been removed in DestroyData()");
|
||||
Connect(&os);
|
||||
}
|
||||
}
|
||||
|
||||
nsTArray<OutputStreamData>&
|
||||
|
@ -339,16 +339,6 @@ void MediaDecoder::RecreateDecodedStream(int64_t aStartTimeUSecs,
|
||||
mDecodedStream.DestroyData();
|
||||
mDecodedStream.RecreateData(aStartTimeUSecs, aGraph->CreateSourceStream(nullptr));
|
||||
|
||||
// Note that the delay between removing ports in DestroyDecodedStream
|
||||
// and adding new ones won't cause a glitch since all graph operations
|
||||
// between main-thread stable states take effect atomically.
|
||||
auto& outputStreams = OutputStreams();
|
||||
for (int32_t i = outputStreams.Length() - 1; i >= 0; --i) {
|
||||
OutputStreamData& os = outputStreams[i];
|
||||
MOZ_ASSERT(!os.mStream->IsDestroyed(),
|
||||
"Should've been removed in DestroyDecodedStream()");
|
||||
mDecodedStream.Connect(&os);
|
||||
}
|
||||
UpdateStreamBlockingForStateMachinePlaying();
|
||||
|
||||
GetDecodedStream()->mHaveBlockedForPlayState = mPlayState != PLAY_STATE_PLAYING;
|
||||
|
Loading…
Reference in New Issue
Block a user