John Lin
66e158e1c6
Bug 1345599 - part 3: for recyclable decoder, don't drain/flush when stream ID/SPS change. r=jya
...
MozReview-Commit-ID: 4qtlbMWgfPo
--HG--
extra : rebase_source : f5b71b6803e2f725639e675081bc30cd0b1bde2a
2017-03-14 15:04:52 +08:00
Jean-Yves Avenard
55676c3d5a
Bug 1342913: P2. Terminate draining operations when possible. r=gerald
...
An interesting intermittent condition not previously handled.
We were incorrectly assuming that we always had a decode promise pending when a drain was requested.
If a change of content occurred when resuming from a waiting for data condition: we would have stalled forever as the waiting promise would never have been resolved even after new data was appended.
MozReview-Commit-ID: BQSRSHYqTSe
--HG--
extra : rebase_source : e091969ce35728cd3ded40161eaaa117df2c6886
2017-03-07 20:13:39 +11:00
JW Wang
f7aad5be2a
Bug 1344772 - set a dirty flag so we can process the notification later. r=jya
...
https://hg.mozilla.org/mozilla-central/file/34c6c2f302e7b48e3ad2cec575cbd34d423a9d32/dom/media/MediaFormatReader.cpp#l2835
NotifyDataArrived() is dispatched again if |mNotifyDataArrivedPromise.Exists()| which will then be dispatched again
recursively until mNotifyDataArrivedPromise is completed. This is a waste of CPU cycles.
We can use a dirty flag to note we should update buffer ranges again when the current update is done.
MozReview-Commit-ID: 6hInhGKnXJE
--HG--
extra : rebase_source : 71aa2c16112428c34def094515e37aa1f028a3fc
2017-03-15 15:20:45 +08:00
John Lin
6150d45675
Bug 1344649 - part 5: deprecate ConfigurationChanged() once again. r=jya
...
MozReview-Commit-ID: D9b8rljlNzP
--HG--
extra : rebase_source : 7cd586f506c4c01f21da0b7b44ec0e2798af5e0a
2017-03-14 12:58:27 +08:00
Kaku Kuo
7c985e041c
Bug 1346120 part 3 - Use NullDecoderModule while suspending a video element's decoder; r=jwwang
...
MozReview-Commit-ID: L1CsDV5TW5R
--HG--
extra : rebase_source : c7aa851ebdbda6abbf7acb09849b237023d653fe
extra : intermediate-source : 91c5986bef4c236e29deeeca6b14f33405da56a3
extra : source : 2d3146d70fb65da3379dd6a5f126c4caff65e139
2017-03-09 17:12:02 +08:00
Iris Hsiao
7f4987cc26
Backed out 6 changesets (bug 1346120) for autophone Mdm tests failure in test_background_video_drawimage_with_suspended_video.html
...
Backed out changeset a30c73fc8d69 (bug 1346120)
Backed out changeset f16556658fd9 (bug 1346120)
Backed out changeset 98d212462786 (bug 1346120)
Backed out changeset ba579adbed21 (bug 1346120)
Backed out changeset c0758b9bf7b5 (bug 1346120)
Backed out changeset 94a483ef784e (bug 1346120)
2017-03-13 16:53:14 +08:00
Kaku Kuo
707ca65566
Bug 1346120 part 3 - Use NullDecoderModule while suspending a video element's decoder; r=jwwang
...
MozReview-Commit-ID: L1CsDV5TW5R
--HG--
extra : rebase_source : e8a47fc99d775c591f6830b042c21717a3e8bced
extra : source : 2d3146d70fb65da3379dd6a5f126c4caff65e139
2017-03-09 17:12:02 +08:00
Wes Kocher
a237e462ec
Backed out 2 changesets (bug 1342913) for failures in test_ChangeWhileWaitingOnMissingData_mp4.html a=backout
...
Backed out changeset f770cf70a30e (bug 1342913)
Backed out changeset 7fc8016ace00 (bug 1342913)
MozReview-Commit-ID: GfZmkx9mvoZ
2017-03-09 11:07:18 -08:00
Jean-Yves Avenard
21ed3b5fbd
Bug 1342913: P2. Terminate draining operations when possible. r=gerald
...
An interesting intermittent condition not previously handled.
We were incorrectly assuming that we always had a decode promise pending when a drain was requested.
If a change of content occurred when resuming from a waiting for data condition: we would have stalled forever as the waiting promise would never have been resolved even after new data was appended.
MozReview-Commit-ID: BQSRSHYqTSe
--HG--
extra : rebase_source : a608377b935427faa7cd8042d0226e64e86e17b9
2017-03-07 20:13:39 +11:00
karo
85319b4cd0
Bug 1344073 - Adding consistent formatting to HTMLMediaElement::MozRequestDebugInfo debugInfo dump string. r=cpearce
...
MozReview-Commit-ID: GfRrLQcebbt
--HG--
extra : rebase_source : 846b74c63528f58e414636654b0167d6c8c1480b
2017-03-01 16:03:01 +13:00
JW Wang
6b008ac4cf
Bug 1341200. Part 10 - streamline DecoderData::ShutdownDecoder() so it feels like a sync function and MFR doesn't need to explicitly wait for flush/shutdown to complete before creating new decoders. r=jya
...
MozReview-Commit-ID: F4tf1f7O89U
--HG--
extra : rebase_source : ecd394c118812ee0419fc5307a63dfa62b82cddc
extra : intermediate-source : 7868b87098521a9e843ec4a154681391acf389ca
extra : source : 1cf5946fbd3a309d152ee8e785cafd1e3a96f1b6
2017-02-27 09:56:36 +08:00
JW Wang
8420ad6d55
Bug 1341200. Part 9 - remove unused mShuttingDown. r=jya
...
MozReview-Commit-ID: 8OWgOB07rEP
--HG--
extra : rebase_source : edc89b4ba3809409ddf3aa71d1c027f6bdbdb6c7
extra : intermediate-source : 71377f45a8ae845332f31761553dad1f3d2d7f85
extra : source : 5d1b66fb3a4b02aa4bd0405e03d199bbafaafb1e
2017-02-27 00:17:16 +08:00
JW Wang
e8e4792c53
Bug 1341200. Part 8 - let DecoderData::ShutdownDecoder() handle shutdown in the middle of flush. r=jya
...
MozReview-Commit-ID: FW23TFQLStR
--HG--
extra : rebase_source : 9d4e46d120f2ecf6a9d51f38399bf559b56bcc32
extra : intermediate-source : 94eba150cc566811a9324bfefc08ff67de836bad
extra : source : 772bcac7acb4a2c8f146c9ade9298fb16b75ef0e
2017-02-26 22:51:22 +08:00
JW Wang
8f139e4859
Bug 1341200. Part 7 - merge ShutdownDecoderWithPromise() and ShutdownDecoder(). r=jya
...
MozReview-Commit-ID: 9YRwPJGqrhq
--HG--
extra : rebase_source : 01bc1131ae5443b794369d35c524d7a84aa6ab59
extra : intermediate-source : b46551e3810b5695e9ffd9f13858047ae77b0373
extra : source : d76c075fc8c0a3fa9d1e24aecfdb226b9ef232c8
2017-02-25 07:59:53 +08:00
JW Wang
9b1586e228
Bug 1341200. Part 6 - let ShutdownDecoderWithPromise() return void by tracking the shutdown promise. r=jya
...
MozReview-Commit-ID: GIYdLXZYEyk
--HG--
extra : rebase_source : 1e3f48b3bdc351e64b8a9820c8bed4734f7de912
extra : intermediate-source : e2807e0c4457e703161418113efbcce67ca89511
extra : source : 90a3f8649308d65e5da6e931f914c024fa92e66e
2017-02-25 07:49:29 +08:00
JW Wang
f0f62f9c3c
Bug 1341200. Part 5 - move the definition to .cpp as they will access ShutdownPromisePool in next patches. r=jya
...
MozReview-Commit-ID: 5Tvh1t4KyoV
--HG--
extra : rebase_source : e497b47e7d7497726b7d385e459ba5b2d982078b
extra : intermediate-source : 8f7c36f8638865781ff523d1c18c34f51bb96d9d
extra : source : f71a8765260b668c6580cd0e58af4c11a1a2918b
2017-02-24 17:27:42 +08:00
JW Wang
e2351feb40
Bug 1341200. Part 3 - replace mShutdownRequest with a bool as P2. r=jya
...
MozReview-Commit-ID: ERERt0ZyvkC
--HG--
extra : rebase_source : a90adf0959c1458fd1ce8dd9c6a4ab52a45ec616
extra : intermediate-source : 0a68fd48e448382dcc4648ca30dd684e108eaf39
extra : source : 09844aff616c3b7ccd73fa01bcdc14d3529e35af
2017-02-24 17:19:12 +08:00
JW Wang
f903aff319
Bug 1341200. Part 2 - replace mFlushRequest with a bool for mFlushRequest.Disconnect() is never used and a bool is sufficient to do the job. r=jya
...
MozReview-Commit-ID: GFnSvunqtGq
--HG--
extra : rebase_source : 81b168157e04c455d8876c8e2504fad79b889cb8
extra : intermediate-source : aa57748660c8b5858c64ae07e77a60a5114a33fc
extra : source : 20371ccdf3c1f19ae2836e693a8b669a40f9e7a4
2017-02-24 17:04:32 +08:00
JW Wang
93af428900
Bug 1343433 - Label runnables in dom/media/MediaFormatReader.cpp. r=jya
...
MozReview-Commit-ID: 6BWmq4m18va
--HG--
extra : rebase_source : 98afbe450076333e5b31fcfc6754e50455b3e58b
extra : source : 08dd512f362d7275e0f729016ba2f3df2d2543a4
2017-03-01 11:58:39 +08:00
JW Wang
d6ee299185
Bug 1343732
- use SystemGroup::Dispatch() in ~AutoTaskQueue(). r=jya
...
MozReview-Commit-ID: IWFs5e8U7VQ
--HG--
extra : rebase_source : e71ae9b777ad8fd421d5a66cefc0086b28af8967
extra : source : 221546a238788a744703380c6023efdf741c48cb
2017-03-01 13:02:29 +08:00
Jean-Yves Avenard
88913538dd
Bug 1313548: P3. Return early of we're not longer waiting for a key. r=gerald
...
The next run of Update would have cleared the mWaitingForKey flag, may as well do it early.
MozReview-Commit-ID: DXiqSDAxnnz
--HG--
extra : rebase_source : ecdaaab1560d3e4637bbc05689cb9ab91294ae7c
2017-02-24 15:00:39 +01:00
Jean-Yves Avenard
e1903d15ee
Bug 1313548: P2. Add additional information in dump data. r=gerald
...
MozReview-Commit-ID: 1OndEp1ZQ9u
--HG--
extra : rebase_source : c7567123a8087fbd8ce0af91932570e7e1b072be
2017-02-23 14:43:01 +01:00
Jean-Yves Avenard
2a41ec036c
Bug 1313548: P1. Always resolve waiting promise, when clearing waitforkey. r=gerald
...
MozReview-Commit-ID: 6xu8Rcn9WMO
--HG--
extra : rebase_source : 54f99f2d4fc6370ee64a6e3dc0bec69f5edc9085
2017-02-23 14:10:12 +01:00
Gerald Squelart
a39a22468d
Bug 1343152 - Move TrackTypeToStr(TrackInfo::TrackType) to MediaInfo.h/cpp - r=jya
...
MozReview-Commit-ID: 57U5ySHsIn1
--HG--
extra : rebase_source : d244ff6ec9564eade25858743cec29d0ddcf40bb
2017-02-27 17:15:36 +11:00
JW Wang
92c225d322
Bug 1340969. Part 2 - remove MFR::mShutdownPromise by using promise chaining. r=jya
...
MozReview-Commit-ID: 6Oa1yar80aH
--HG--
extra : rebase_source : e5fba9cea0ea6c2263d676e8328da50ab335a8d9
extra : intermediate-source : af2cfe6e4c5bb36d5016a2de1c1193aa2ddee0b0
extra : source : 0f94c4404ea9dce4904fb40b215314932f5211aa
2017-02-17 19:34:03 +08:00
JW Wang
8f2e3bc3e5
Bug 1340969. Part 1 - add ShutdownPromisePool to manage ShutdownPromises. r=jya
...
MozReview-Commit-ID: KAr3Fe8Aeqi
--HG--
extra : rebase_source : 3c8d93653f8974d69b356ef49a360105efae28a0
extra : intermediate-source : 5ca91530155e9bae43a349acd30e8e591d1ca928
extra : source : e77a4d9d8c7bfedbe43933781c9090681fdff9af
2017-02-17 19:29:43 +08:00
JW Wang
a64a631925
Bug 1340943. Part 2 - add LocalAllocPolicy which enforces the order of decoder creation and shutdown. r=jya
...
MozReview-Commit-ID: 4zSG6DswYO5
--HG--
extra : rebase_source : 61acbfd7715e44f61cb9491d7e4be91fed2fb9a4
extra : intermediate-source : 997a2676577f6349a4340dfc1000701edd611597
extra : source : be74953cc1379554737c1092678c3b63f4bf5dfd
2017-02-17 18:30:39 +08:00
JW Wang
1b99abd90e
Bug 1340943. Part 1 - rename DecoderAllocPolicy to GlobalAllocPolicy. r=jya
...
MozReview-Commit-ID: DJJwa56TXlC
--HG--
extra : rebase_source : d8c9e43fe8c385dd6dca3f06db68a96ddb97cdb0
extra : intermediate-source : 4c6a9976d82b1c831f174556d61b218d9ba63784
extra : source : b84270ab19c601a4c33bce0e054b9f2724f91004
2017-02-17 16:06:45 +08:00
JW Wang
26791eec24
Bug 1340942. Part 4 - pass Data& to DoInitDecoder(). r=gerald
...
MozReview-Commit-ID: IwlpxR2MuRE
--HG--
extra : rebase_source : 55418d1358ec370f69baa2c56401f752f3117b0c
extra : source : d6ff310f1def862376f77eb2e3a98d44984e2b22
2017-02-17 15:21:46 +08:00
JW Wang
a9cf757728
Bug 1340942. Part 3 - pass Data& to DoCreateDecoder. r=gerald
...
MozReview-Commit-ID: ABHu0tp57AM
--HG--
extra : rebase_source : bcd7979839dfd8773f8cca89a225932a3afe35e9
extra : source : ebde79529e6725fd46ffefbdda375ece5a7689a8
2017-02-17 15:17:22 +08:00
JW Wang
47716779ec
Bug 1340942. Part 2 - pass Data& to RunStage(). r=gerald
...
MozReview-Commit-ID: DAALmMBhoep
--HG--
extra : rebase_source : c93148be805745db1639d179e9814907cfb0b225
extra : source : cbc4fdebd0ca1245ae2f074f569bed0cd2b4c2c6
2017-02-17 15:14:53 +08:00
JW Wang
8a8490a7c9
Bug 1340942. Part 1 - add some members so we don't have to pass the track type around. r=gerald
...
MozReview-Commit-ID: Ewipsg8FFqb
--HG--
extra : rebase_source : dae5cbe33db8873da0bfbf8caf2163780767229c
extra : source : aea7d0f1ef2eafc50c5a62a7447f19d911228152
2017-02-17 14:48:42 +08:00
Tom Tromey
d2667a2b27
Bug 1060419 - make AppendPrintf and nsPrintfCString use Printf.h, r=froydnj
...
MozReview-Commit-ID: 2E8FoiNxU8L
--HG--
extra : rebase_source : 810ac727bef0751f24edea18c52e0ec170bf367d
2016-12-14 09:32:21 -07:00
Tom Tromey
5f8f360823
Bug 1060419 - make log_print use Printf.h, r=froydnj
...
MozReview-Commit-ID: BIZ1GQEZ1vs
--HG--
extra : rebase_source : 2f1f0aa12493c44f352d9a7e8683e7bb72d2d75b
2016-12-15 20:16:31 -07:00
JW Wang
516d2e93db
Bug 1340073 - Remove DecoderAllocPolicy::mTrack. r=gerald
...
MozReview-Commit-ID: IPe7K3FEZpS
--HG--
extra : rebase_source : 98f176660fa43451b6c4c1a2ea97025e14fc63fa
2017-02-16 15:55:20 +08:00
Jean-Yves Avenard
7a7dc2c2ed
Bug 1336431: P5. Re-add ConfigurationChanged API. r=JamesCheng
...
We need to inform the MediaDataDecoder that a new sample configuration has been detected.
To do so, and to ensure that samples are easily matched to a given configuration, we first drain the decoder prior feeding a new frame.
MozReview-Commit-ID: Hye251CF21i
--HG--
extra : rebase_source : d6e5be74a6678cef0ff4c798fac91d95911be70a
2017-02-13 11:15:54 +01:00
Jean-Yves Avenard
36471a6bc1
Bug 1336431: P4. Rename SharedTrackInfo. r=gerald
...
into TrackInfoSharedPtr to better indicate what this class is about.
Adding cast operator to allow transparent conversion from TrackInfoSharedPtr to const TrackInfo*
MozReview-Commit-ID: 6RwXl5CG0fG
--HG--
extra : rebase_source : b5a7a0f06793c609e2eab60aacc4f76d96d6ec32
2017-02-13 19:18:05 +01:00
Jean-Yves Avenard
e7fc412909
Bug 1337559: P5. Only continue drain once all pending frames are processed. r=gerald
...
While reducing total peak memory usage, it also allows to start processing frames as they come without having to wait on the decoder to have processed all frames at once. This is particularly an issue on windows where the decoder will block the entire decode task queue while a YUV->RGB conversion is occurring.
MozReview-Commit-ID: QQDpUoj0PS
--HG--
extra : rebase_source : bc2fc4e29a2b943a71f8c8450aad1cd162375bd6
2017-02-10 23:46:58 +01:00
Jean-Yves Avenard
2a23d10d73
Bug 1337559: P2. Rework draining in MediaFormatReader. r=gerald
...
We now use a generic state rather than various booleans.
We handle partial drains better too.
MozReview-Commit-ID: AJSTcJivfEm
--HG--
extra : rebase_source : 26386cea20b97f1f76df829241b091ba837b301a
2017-02-09 15:31:44 +01:00
Jean-Yves Avenard
bb51f92016
Bug 1336947: P2. Fix coding style. r=gerald
...
MozReview-Commit-ID: 74OQ6GxSFWX
--HG--
extra : rebase_source : 307827dc3e1d624ee8a13044e2d352ae5826ff3c
2017-02-07 23:27:56 +01:00
Jean-Yves Avenard
c0888afdbe
Bug 1336947: P1. Drain decoder until no more data is returned. r=gerald
...
It may not be possible for a decoder to return all drained samples in one go. This is particularly a problem on android where there's a limited amount of memory buffers available.
So we no longer expect the operation to complete in one go, we call Drain until there are no more samples returned.
MozReview-Commit-ID: GbfntKNBDaW
--HG--
extra : rebase_source : 6b7dc19e1acf348d41d5f96cf575fa2e7dffdd3b
2017-02-07 15:36:20 +01:00
Jean-Yves Avenard
b7844bd5c3
Bug 1319987: P9. More coding style fixes. r=gerald
...
MozReview-Commit-ID: DhFRqkWQZny
--HG--
extra : rebase_source : 03ed44efc83fe9cab7fc975229ac4e5746aff96b
2017-01-27 13:20:37 +01:00
Jean-Yves Avenard
e2abc1a523
Bug 1319987: P7. Re-implement handling for WaitingForKey in MFR. r=cpearce,gerald
...
MozReview-Commit-ID: FCiAO54oiH3
--HG--
extra : rebase_source : 898e175742ae4db13c48cf75463a9775968b0030
2017-01-27 11:48:00 +01:00
Jean-Yves Avenard
5e2e07649c
Bug 1319987: P6. Shutdown demuxer asynchronously. r=gerald
...
This prevents the demuxer attempting to use the parent resources once the parent has been shutdown.
MozReview-Commit-ID: LQqPxBkAfAS
--HG--
extra : rebase_source : 1a9c2e870aecb5b0ecb68d5f600c48334ac4d312
2017-01-26 18:17:15 +01:00
Jean-Yves Avenard
73fd84bc5d
Bug 1319987: P5. Promisify MediaDataDecoder. r=cpearce,gerald,mattwoodrow,snorp
...
This is a big change, and unfortunately impossible to break down with independently functional commits.
There are four main changes being applied here:
* Code cleanup, including making all MediaDataDecoder related code mozilla coding style compliant
* Make MediaDataDecoder use MozPromise
* Making Flush and Shutdown processes fully asynchronous
* Fixing few data races encountered across the code, in particular in the Android PDM
MozReview-Commit-ID: DpiZucGofJT
--HG--
extra : rebase_source : 80bd6c6f9726d536b6f306c40d9af6df27333be9
2017-01-26 13:56:46 +01:00
Jean-Yves Avenard
d144f37888
Bug 1319987: P1. Remove handling for WaitingForKey in MFR. r=cpearce
...
This is not compatible with promise based decoders. We'll re-implement it in a different fashion later on.
MozReview-Commit-ID: HYBNKVxEUmB
--HG--
extra : rebase_source : fe9f26e47b77a64099a422be844d20f4108663d0
2016-12-20 18:53:39 +11:00
Jean-Yves Avenard
95b4a438ea
Bug 1335624: Check mDecoder. r=gerald
...
Revert commit dd429b170253 (bug 1335390)
Fix CID 1399621
MozReview-Commit-ID: 571uyotVb5c
--HG--
extra : rebase_source : d7095510f2c0006afc6ac16676bf7f03268abbd8
2017-02-01 13:25:12 +01:00
Andi-Bogdan Postelnicu
d326016419
Bug 1335390 - prevent nul pointer dereference in parameter initialisation. r=baku
...
MozReview-Commit-ID: H2RrwojBug
--HG--
extra : rebase_source : e9bbb215095d09e7920a3063ca18b4d0114d4387
2017-02-01 15:20:45 +02:00
Bevis Tseng
f2bdbd8fd1
Bug 1314833 - Part 2.1: Factor out AbstractThread::MainThread() used in Media Playback. r=billm,jwwang
...
MozReview-Commit-ID: 9yJi3iDtVZG
--HG--
extra : rebase_source : 39c720ccc576ed9247b5e8abb70d99d7873b3ad6
2016-11-29 13:03:36 +08:00
JW Wang
992114f5fd
Bug 1332160 - use nsCString internally whenever possible. r=gerald
...
MozReview-Commit-ID: 1DUaJWfbL88
--HG--
extra : rebase_source : f4a02736b0385e4be6258a185822f7855d0b0189
extra : intermediate-source : 1faaf4254a2e1ce2c096a8650b66d07c84c7fdbe
extra : source : c23fc2cea382627af8ff20ae3edea926eaa6d51a
2017-01-18 16:51:31 +08:00