mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1234424. Part 1 - share the underlying value of MDSM::mSameOriginMedia with DecodedStream. r=roc.
This commit is contained in:
parent
135725019e
commit
b60a4316a7
@ -241,8 +241,6 @@ MediaDecoderStateMachine::MediaDecoderStateMachine(MediaDecoder* aDecoder,
|
||||
mSentFirstFrameLoadedEvent(false, "MediaDecoderStateMachine::mSentFirstFrameLoadedEvent"),
|
||||
mSentPlaybackEndedEvent(false),
|
||||
mOutputStreamManager(new OutputStreamManager()),
|
||||
mStreamSink(new DecodedStream(
|
||||
mTaskQueue, mAudioQueue, mVideoQueue, mOutputStreamManager)),
|
||||
mResource(aDecoder->GetResource()),
|
||||
mAudioOffloading(false),
|
||||
mBuffered(mTaskQueue, TimeIntervals(),
|
||||
@ -339,6 +337,9 @@ MediaDecoderStateMachine::InitializationTask(MediaDecoder* aDecoder)
|
||||
{
|
||||
MOZ_ASSERT(OnTaskQueue());
|
||||
|
||||
mStreamSink = new DecodedStream(mTaskQueue, mAudioQueue, mVideoQueue,
|
||||
mOutputStreamManager, mSameOriginMedia.Ref());
|
||||
|
||||
// Connect mirrors.
|
||||
mBuffered.Connect(mReader->CanonicalBuffered());
|
||||
mEstimatedDuration.Connect(aDecoder->CanonicalEstimatedDuration());
|
||||
|
@ -188,11 +188,12 @@ DecodedStreamData::SetPlaying(bool aPlaying)
|
||||
DecodedStream::DecodedStream(AbstractThread* aOwnerThread,
|
||||
MediaQueue<MediaData>& aAudioQueue,
|
||||
MediaQueue<MediaData>& aVideoQueue,
|
||||
OutputStreamManager* aOutputStreamManager)
|
||||
OutputStreamManager* aOutputStreamManager,
|
||||
const bool& aSameOrigin)
|
||||
: mOwnerThread(aOwnerThread)
|
||||
, mOutputStreamManager(aOutputStreamManager)
|
||||
, mPlaying(false)
|
||||
, mSameOrigin(false)
|
||||
, mSameOrigin(aSameOrigin)
|
||||
, mAudioQueue(aAudioQueue)
|
||||
, mVideoQueue(aVideoQueue)
|
||||
{
|
||||
|
@ -35,7 +35,8 @@ public:
|
||||
DecodedStream(AbstractThread* aOwnerThread,
|
||||
MediaQueue<MediaData>& aAudioQueue,
|
||||
MediaQueue<MediaData>& aVideoQueue,
|
||||
OutputStreamManager* aOutputStreamManager);
|
||||
OutputStreamManager* aOutputStreamManager,
|
||||
const bool& aSameOrigin);
|
||||
|
||||
// MediaSink functions.
|
||||
const PlaybackParams& GetPlaybackParams() const override;
|
||||
@ -98,7 +99,7 @@ private:
|
||||
RefPtr<GenericPromise> mFinishPromise;
|
||||
|
||||
bool mPlaying;
|
||||
bool mSameOrigin;
|
||||
const bool& mSameOrigin; // valid until Shutdown() is called.
|
||||
PlaybackParams mParams;
|
||||
|
||||
Maybe<int64_t> mStartTime;
|
||||
|
Loading…
Reference in New Issue
Block a user