Bug 1423465. P1 - expose MDSM::OwnerThread() to the public.
This will be used by ChannelMediaDecoder to run some code off the main thread.
MozReview-Commit-ID: 7Ecej11GBvy
--- a/dom/media/MediaDecoderStateMachine.h
+++ b/dom/media/MediaDecoderStateMachine.h
@@ -188,16 +188,19 @@ public:
DECODER_STATE_DECODING_FIRSTFRAME,
DECODER_STATE_DECODING,
DECODER_STATE_SEEKING,
DECODER_STATE_BUFFERING,
DECODER_STATE_COMPLETED,
DECODER_STATE_SHUTDOWN
};
+ // Returns the state machine task queue.
+ TaskQueue* OwnerThread() const { return mTaskQueue; }
+
RefPtr<MediaDecoder::DebugInfoPromise> RequestDebugInfo();
void AddOutputStream(ProcessedMediaStream* aStream, bool aFinishWhenEnded);
// Remove an output stream added with AddOutputStream.
void RemoveOutputStream(MediaStream* aStream);
// Seeks to the decoder to aTarget asynchronously.
RefPtr<MediaDecoder::SeekPromise> InvokeSeek(const SeekTarget& aTarget);
@@ -329,19 +332,16 @@ private:
// Only called on the decoder thread. Must be called with
// the decode monitor held.
void UpdatePlaybackPosition(const media::TimeUnit& aTime);
bool HasAudio() const { return mInfo.ref().HasAudio(); }
bool HasVideo() const { return mInfo.ref().HasVideo(); }
const MediaInfo& Info() const { return mInfo.ref(); }
- // Returns the state machine task queue.
- TaskQueue* OwnerThread() const { return mTaskQueue; }
-
// Schedules the shared state machine thread to run the state machine.
void ScheduleStateMachine();
// Invokes ScheduleStateMachine to run in |aTime|,
// unless it's already scheduled to run earlier, in which case the
// request is discarded.
void ScheduleStateMachineIn(const media::TimeUnit& aTime);