Commit Graph

48 Commits

Author SHA1 Message Date
trav90 3cbf3e5e8a Fix indentation
No code changes. Followup to 2c9ac59.
2018-07-25 07:14:05 +08:00
trav90 759486911b Get rid of RefableThen and make Then return an nsRefPtr<Consumer> 2018-07-25 07:13:05 +08:00
trav90 770bc90898 Fix calculation of blockForStateMachineNotPlaying 2018-07-25 07:11:04 +08:00
trav90 2cae9fb888 Dispatch SetMinimizePrerollUntilPlabackStarts 2018-07-25 07:07:32 +08:00
trav90 fa32ae47df Dispatch SetAudioCaptured 2018-07-25 07:07:28 +08:00
trav90 7d4520f94f Mirror mPreservesPitch 2018-07-25 07:07:26 +08:00
trav90 05d14bdb99 Mirror mPlaybackRate 2018-07-25 07:07:23 +08:00
trav90 1aefd63963 Mirror mVolume 2018-07-25 07:07:20 +08:00
trav90 659022b636 Give WatchManager an owner thread and make sure everything happens there 2018-07-25 07:07:12 +08:00
trav90 032f6f5dc7 Switch mirror/canonical initialization to happen in the constructor
The goal here is to hoist all meaningful watcher/mirror/canonical manipulation onto the owner thread. But since that must necessarily happen asynchronously, we need to make sure that canonicals are in a sane state immediately upon creation, since otherwise a mirror from another thread may attempt to connect to a not-yet-initialized canonical.
2018-07-25 07:07:05 +08:00
trav90 717aade354 Explicitly initialize logging at the correct time 2018-07-25 07:06:32 +08:00
trav90 e640efcded Redesign state watching to use a manager 2018-07-25 07:05:53 +08:00
trav90 793ff3cd33 Revert change to MediaDecoder::NotifyDataArrived 2018-07-25 07:05:50 +08:00
trav90 0052fbc94e Stop manually notifying MediaDecoder::mReadyStateWatchTarget
If we've got our state graph set up properly, the watch target should be notified automatically whenever anything relevant changes.
2018-07-25 07:05:48 +08:00
trav90 41c67a91d8 Mirror mPlayState and mNextState to the state machine task queue and eliminate cross-thread access 2018-07-25 07:05:41 +08:00
trav90 6fa240db4e Re-land "Dispatch AudioSink notifications asynchronously"
Turns out that this is needed after all.
2018-07-25 07:04:46 +08:00
Moonchild 54c849b63d Revert "Re-land "Dispatch AudioSink notifications asynchronously" + fixes" 2018-07-25 07:04:08 +08:00
trav90 1a2fea0658 Re-land "Dispatch AudioSink notifications asynchronously"
This is needed by some new code that I am working on.
2018-07-25 07:03:56 +08:00
trav90 df074df1ee Use state mirroring for NextFrameStatus 2018-07-25 07:03:42 +08:00
trav90 1e249c36f8 Use state watching machinery for mReadyState updates 2018-07-25 07:03:38 +08:00
trav90 04513e7957 Force state machine setting to go through a setter
This is needed so that we can hook up the state mirroring in a subsequent commit.
2018-07-25 07:03:32 +08:00
trav90 b6bb9afb37 Move the GetCurrent TLS logic into AbstractThread 2018-07-25 06:57:47 +08:00
trav90 533987a47d Implement the ability to get the currently running task queue
This will be useful for asserting things.
2018-07-25 06:55:30 +08:00
trav90 3090135f8e Do static initialization explicitly 2018-07-25 06:55:27 +08:00
trav90 e1caa768c4 Handle playback ended in a consistent way for both file and stream case 2018-07-25 06:53:09 +08:00
trav90 a068fb2b80 Rework and simplify stream clock calculation in MediaDecoderStateMachine 2018-07-25 06:53:05 +08:00
trav90 b6cdd50380 Remove wrapper-style AbstractThreads for MediaTaskQueue and have callers pass an AbstractThread directly to promise APIs 2018-07-25 06:52:28 +08:00
trav90 702d802110 Add a convenience/efficiently routine to get an AbstractThread for the main thread 2018-07-25 06:52:23 +08:00
trav90 7ae60742ff Nuke remaining GStreamer code 2018-07-25 06:45:07 +08:00
trav90 227622835c Rename MediaDecoder::OnDecodeThread to MediaDecoder::OnDecodeTaskQueue 2018-07-25 06:44:59 +08:00
trav90 2d35bde18f Rename MDSM::OnDecodeThread to MDSM::OnDecodeTaskQueue 2018-07-25 06:44:53 +08:00
trav90 19e0f7aa42 Rename OnStateMachineThread-like functions to reflect the fact that it's a task queue 2018-07-25 06:44:51 +08:00
trav90 17e6d71294 Revert "Dispatch AudioSink notifications asynchronously" 2018-07-25 06:36:53 +08:00
trav90 b20b8dadab Replace dom::TimeRanges with TimeIntervals object 2018-07-25 01:27:34 +08:00
trav90 7e5b4386f2 Combine MediaInfo and mp4_demuxer::TrackConfig 2018-07-25 01:18:31 +08:00
trav90 d5e2cf7abc Dispatch AudioSink notifications asynchronously 2018-07-25 01:05:51 +08:00
trav90 5155516c96 Make MDSM::StartBuffering happen on the state machine thread 2018-07-25 01:05:46 +08:00
trav90 90904cb897 Make MDSM::Shutdown happen on the state machine thread 2018-07-25 01:05:42 +08:00
trav90 5507f0cc15 Update AudioOffloadPlayer seek to use new promise-based interface 2018-07-25 01:03:47 +08:00
trav90 07ffc3fc1e Deliver NotifyWaitingForResourcesStatusChanged asynchronously on the state machine task queue
The previous setup is wacky, and can cause the notification to reach the state machine before the promise rejection, which causes us to stall intermittently. We also take the opportunity to be a bit less trigger happy when we fire it in MediaSourceReader.cpp.
2018-07-25 01:03:45 +08:00
trav90 74eb7093f6 Use promises for metadata decoding 2018-07-25 01:03:43 +08:00
trav90 b265ff9e74 Switch the MDSM to a task queue 2018-07-25 01:03:34 +08:00
trav90 2d0902db6e Make the MediaDecoder-to-MediaDecoderStateMachine interface Promise-based 2018-07-25 01:03:21 +08:00
trav90 8acc4e725d Move some work from MDSM::Seek to MDSM::InitiateSeek
This has two implications:
1. We no longer need to pipe mQueuedSeekTarget through MDSM::Seek to get the appropriate clamping.
2. MDSM::Seek doesn't _need_ to be called on the main thread anymore.
2018-07-25 01:03:08 +08:00
trav90 fde7400175 Stop updating playback position from Ogg seek and remove MediaDecoder::UpdatePlaybackPosition
The ogg reader makes two adjustments to the seek time - the first is to clamp it between start and end time, which MDSM already does. The second is to subtract SEEK_OPUS_PREROLL from the target. If we wanted to, we could return this as the resolve value in the seek promise and handle the update in the MDSM. But DropVideoUpToSeekTarget should actually handle this just fine.
2018-07-25 01:03:05 +08:00
trav90 62337b35dc Return samples on the state machine thread
This is necessary because we're going to want to start disconnecting sample and seek requests directly from the state machine thread, and the machinery asserts that disconnection happens on the same thread as resolution.
2018-07-25 01:02:38 +08:00
wolfbeast 02112270b5 Remove EME (Encrypted Media Extensions) DRM support.
This resolves #102.
2018-07-24 23:32:00 +08:00
Moonchild baf46a6bf1 Merge pull request #1 from mozilla/esr38: Esr38 upstream pull 2018-07-24 23:04:07 +08:00