Commit Graph

1132 Commits

Author SHA1 Message Date
Sebastian Hengst
765cc1b925 merge mozilla-inbound to mozilla-central. r=merge a=merge
MozReview-Commit-ID: JhesEg4Bxjy
2017-08-04 19:28:27 +02:00
Bill McCloskey
2273c53b75 Bug 1364821 - Introduce AbstractThread::AutoEnter and remove main thread's AbstractThread::GetCurrent() (r=jwwang)
MozReview-Commit-ID: FSLVn7xe3sq
2017-08-03 14:19:02 -07:00
JW Wang
d685ec7cc3 Bug 1386956. P2 - move mResource to sub-classes. r=gerald
MozReview-Commit-ID: Ixx8NwZfjhO

--HG--
extra : rebase_source : 65529a6cf6736e6fde61ddd413efa6f38cd96922
extra : intermediate-source : 1d75a416e8452c356f533d13c3037cae07aeb291
extra : source : d14219446670baf0f02da86c412932ec59dbf178
2017-08-03 15:38:28 +08:00
JW Wang
17554a637a Bug 1385699. P4 - MediaDecoder::mExplicitDuration doesn't need to be a canonical anymore. r=cpearce
MozReview-Commit-ID: 4FUwQRS2K1m

--HG--
extra : rebase_source : 66b2f1a9fcdf54abd61f071847c1469ad3a3c5c4
extra : source : 0da2d6137100d1cb3ec33d5ce735252eeba3ac62
2017-08-01 15:06:13 +08:00
Sylvestre Ledru
edbf1ad0a8 Bug 1385701 - Add a missing comma in validBoxes r=jya
MozReview-Commit-ID: 47dldBVVvBo

--HG--
extra : rebase_source : d8785799ebc42b077b709803d8e4037562d791b5
2017-07-30 15:06:05 +02:00
JW Wang
675a12c855 Bug 1385155. P3 - let MP4Stream use SourceBufferResource instead of MediaResourceIndex. r=gerald
MozReview-Commit-ID: Gf6FEQAOLRk

--HG--
extra : rebase_source : a7172409051d4078107d35d29927d9af6f5f56a6
2017-07-27 17:58:45 +08:00
JW Wang
aa4fe7edda Bug 1385155. P2 - move MP4Stream into ContainerParser.cpp which is the only user. r=gerald
MozReview-Commit-ID: 4IguqbJn1xd

--HG--
extra : rebase_source : 881a27a24b11e05033e4ae9c9dbfe93f6ec34141
2017-07-27 17:43:09 +08:00
Carsten "Tomcat" Book
d360d49d2a merge mozilla-inbound to mozilla-central a=merge 2017-07-27 10:57:25 +02:00
Bevis Tseng
a7505864a8 Bug 1378930 - Part 2: Remove the aName parameter from SchedulerGroup/DocGroup/DispatcherTrait. r=billm
--HG--
extra : rebase_source : 11319e568a51d16754a6a9990f76c35c86c2bda7
2017-07-26 16:13:35 +08:00
Kartikaya Gupta
ba4b3b9101 Bug 1384233 - Remove SizePrintfMacros.h. r=froydnj
We have a minimum requirement of VS 2015 for Windows builds, which supports
the z length modifier for format specifiers. So we don't need SizePrintfMacros.h
any more, and can just use %zu and friends directly everywhere.

MozReview-Commit-ID: 6s78RvPFMzv

--HG--
extra : rebase_source : 009ea39eb4dac1c927aa03e4f97d8ab673de8a0e
2017-07-26 16:03:57 -04:00
Jean-Yves Avenard
64c70317ce Bug 1383122 - P3. Don't set src attribute to null. r=jwwang
Setting the src attribute to null was incorrect, per spec https://www.w3.org/TR/WebIDL-1/#es-DOMString, if null is passed, this is to be treated as ToString(null), which is "null" (https://tc39.github.io/ecma262/#sec-tostring).
Hence setting src to null will cause a 404 error as it attempts to load "null".

To unload the element, recommended practice is:
Per spec:
https://html.spec.whatwg.org/multipage/media.html#best-practices-for-authors-using-media-elements
"by removing the element's src attribute and any source element descendants, and invoking the element's load() method."

MozReview-Commit-ID: 5Lq13CeDCSZ

--HG--
extra : rebase_source : 806bccb32fa0542ea3be3025a31da97bb331b29c
2017-07-21 19:05:54 +02:00
Jean-Yves Avenard
eb9666fa81 Bug 1383122 - P1. Amend Mochitest to ensure error doesn't occur. r=jwwang
MozReview-Commit-ID: 4xHD8KjY0XT

--HG--
extra : rebase_source : e6a8c22ee37537bcd6cdb98487796854ad116227
2017-07-21 18:44:11 +02:00
JW Wang
0abee9d910 Bug 1378295. P4 - remove reference to AbstractMediaDecoder from TrackBuffersManager.cpp. r=jya
MozReview-Commit-ID: 6TXVu72w7Ht

--HG--
extra : rebase_source : 7cc57a09949500f30ac6b57890578ce203ba6a59
extra : intermediate-source : 839251dd062bad76ea5aad49848183da5522d046
extra : source : d17fae18b49c46b40c0c06c2e26bef90cf0e5d13
2017-07-13 16:50:40 +08:00
JW Wang
35f6829a03 Bug 1378295. P1 - remove unused MFR::mDecoder. r=jya
MozReview-Commit-ID: BuvxlYs0LqD

--HG--
extra : rebase_source : 8595e8c5e08e9cd6575b3e3bf37e59e25c79045c
extra : intermediate-source : 589082a3f0571cea45e6942a1e6b82adda7efdcb
extra : source : 47cdc0a2b7acec44d102b165e1867b4f689e488c
2017-07-13 15:13:12 +08:00
JW Wang
0ad4cd546b Bug 1380568. P1 - store FrameStatistics in MFR. r=jya
So we can remove the use of AbstractMediaDecoder::NotifyDecodedFrames().

MozReview-Commit-ID: Ch7Saha6zdi

--HG--
extra : rebase_source : 8562faa56d1f31797643ed0f7ae550765d8c86d7
extra : intermediate-source : 05b50517cc40f2adf06facfccea628488dd319da
extra : source : d5af89f5a09e03c8fbb0d6111f88e3221f3a1d57
2017-07-07 11:05:03 +08:00
Sebastian Hengst
f16a7f8371 merge mozilla-inbound to mozilla-central. r=merge a=merge
MozReview-Commit-ID: 4EWdTlEncz7
2017-07-22 11:38:42 +02:00
Wes Kocher
d45eb771f0 Merge m-c to inbound, a=merge
MozReview-Commit-ID: Ah48RzFU8Mt
2017-07-21 18:20:46 -07:00
Sylvestre Ledru
7c0ae251cd Bug 1381253 - Remove redundant control flow declarations rs=ehsan
MozReview-Commit-ID: FFxP4aMCbOL

--HG--
extra : amend_source : 3aec108430b11048f47ffe19d5da7ac5034770a9
2017-07-15 19:03:04 +02:00
JW Wang
87a7705558 Bug 1316211. P16 - remove MediaDecoderReader completely and fix includes. r=gerald
MozReview-Commit-ID: AGNyyh4kt3e

--HG--
extra : rebase_source : 48bfd7c681693a965848078c19ac81707ac19540
extra : source : 093ff5fe2ab6dd7551453b10b480fa3553ec135d
2017-07-20 09:56:08 +08:00
JW Wang
ef025c6fcf Bug 1316211. P15 - remove MDR from the base class of MFR. r=gerald
MozReview-Commit-ID: Jf5pCxkhexg

--HG--
extra : rebase_source : 3ec9423d4d0f3b60ee9e5f6f19af18188530e1d9
extra : source : 4fbc225bfc79abacaf47ffd4405ef2d6711dea32
2017-07-19 22:18:37 +08:00
JW Wang
5370eb3105 Bug 1316211. P13 - replace use of MediaDecoderReader with MediaFormatReader. r=gerald
We will remove MediaDecoderReader in the future.

MozReview-Commit-ID: BaCRXleKK5a

--HG--
extra : rebase_source : dc14a593d6291136f02b1deb910cd6dcd01c0355
extra : source : 8f71b7dae0a541562c7c3829b5a873e9f9fd2674
2017-07-19 17:01:32 +08:00
Jean-Yves Avenard
d0144aba45 Bug 1382303 - P3. Reduce enough data threadhold to 10s. r=jwwang
We waited 30s until we changed readyState to HAVE_ENOUGH_DATA this would cause autoplay media element to start rather late. In particular with live stream. 10s is typically enough ahead time to start playback.

MozReview-Commit-ID: LJvY8cQYfwZ

--HG--
extra : rebase_source : 4c75326891ba4e9317c432ea7074eb033a77b300
2017-07-20 20:49:06 +02:00
Jean-Yves Avenard
fe81e074b9 Bug 1382303 - P1. Add mochitest. r=jwwang
MozReview-Commit-ID: ENSiDzd2SmW

--HG--
extra : rebase_source : fd590977e460d14cc2596116fe4ce7ee6fb76b97
2017-07-20 19:09:04 +02:00
JW Wang
cf0ba2ea01 Bug 1380569. P3 - remove AbstractMediaDecoder::NotifyWaitingForKey() and its callers. r=gerald
MozReview-Commit-ID: 3fHDr0xw92P

--HG--
extra : rebase_source : 07ca1ae4e8d65e66beca2d1eb0de232ec6e291fb
extra : intermediate-source : d367e33cc9c132abb9e66aae652f4bbbf4f58be1
extra : source : 029ccea837ef1948bd33ce1d786626f362c41bdf
2017-07-13 14:52:05 +08:00
Ryan VanderMeulen
019bd042fc Merge autoland to m-c. a=merge 2017-07-14 09:16:03 -04:00
JW Wang
789cd1ebe8 Bug 1380532. P1 - pass GMPCrashHelper through MediaDecoderReaderInit to MFR. r=gerald
So we can reduce dependency on AbstractMediaDecoder.
See bug 1378295 comment 1 for the detail.

Note it is not ideal to repeat |init.mCrashHelper = ...| several times in
this patch. We will re-visit it to reduce code duplication after bug 1378295
is done.

MozReview-Commit-ID: AEC56ukqtYr

--HG--
extra : rebase_source : 07554566af74b65f391811e55847e58365ac81fe
extra : source : 7f613117f815369f65256408b221131683c0dd82
2017-07-13 10:19:36 +08:00
JW Wang
4ca981216d Bug 1380234. P1 - pass KnowsCompositor to MFR through MediaDecoderReaderInit. r=jya
MozReview-Commit-ID: 3krK3meG5jV

--HG--
extra : rebase_source : f0a628ab28a527fa7f79ec61672e988cf1def8e7
extra : source : c8c2a6f2506338a8208f3bcf56160c47e6a29000
2017-07-12 15:37:02 +08:00
Chris Pearce
2d16a23835 Bug 1351124 - Detect MP4 PSSH boxes in MOOF boxes and dispatch those in 'encrypted' events to content. r=jya
We detect when a PSSH is contained in a MOOF and stash them in the
mp4_demmuxer::Moof object.  When the mp4_demuxer::SampleIterator returns a
sample, we check whether it's the first sample from its MOOF, and if so, we
attach any PSSH boxes from that MOOF to the sample.  The TrackBuffersManager
checks samples upon demux, to see whether they have any EME init data attached,
and if so dispatches thoses to the HTMLMediaElement in 'encrypted' events.


MozReview-Commit-ID: F8GobKOr96F

--HG--
extra : rebase_source : 5366f1008979605aa8fc80216cd1d9cc2eefd346
2017-07-12 22:07:15 +12:00
JW Wang
aeaad5857f Bug 1378689 - add a structure to pack the data sent to the MediaDecoderReader constructor. r=jya
It would be handy we want to pass more data to the constructor.

MozReview-Commit-ID: 3AUUsTbv534

--HG--
extra : rebase_source : 8d230c85addf1ba296e6a0512f0d18ebd41c0d17
extra : source : e6568e9fa24f52c59baecaa16aa044b492f407fb
2017-07-06 16:59:22 +08:00
JW Wang
15da20ff70 Bug 1378316. P1 - store MediaDecoderReader in MediaDecoder. r=gerald
So we are able to dispatch NotifyDataArrived() to MediaDecoderReader in P2.

MozReview-Commit-ID: 3RM66uTvYSc

--HG--
extra : rebase_source : 40311cf27fefbd2046016fb246a3a4ccfce845a8
extra : source : 515d9b3b3cd4b0b30d2fd8196b48c55e14466263
2017-07-05 17:21:17 +08:00
JW Wang
ab6f636e4a Bug 1378304. P2 - replace GetResource() with mResource in MediaDecoder sub-classes. r=jya
MozReview-Commit-ID: GRIBp3y0Cb7

--HG--
extra : rebase_source : c80386b223d90e8a9a7fb285a09edc526227bde8
extra : source : b74c63131f6ed873726519eed1a308aaaf35a6a9
2017-07-05 14:52:42 +08:00
JW Wang
c6e43291cb Bug 1376363. P3 - remove MediaResource::GetContentType() and its friends. r=gerald
Note we remove the call to mChannel->SetContentType() from RecreateChannel().

The hint never works as expected for [1] is the only caller to
nsIChannel::GetContentType() and MediaResource::Create() always happens
before any reads from the resource.

[1] http://searchfox.org/mozilla-central/rev/b425854d9bbd49d5caf9baef3686e49ec91c17ec/dom/media/MediaResource.cpp#1500

MozReview-Commit-ID: 1n4yHEouCjC

--HG--
extra : rebase_source : 9a7345c29b985ddee7a90a94191e9d526e2a0a67
extra : source : 054d9ffaf21eb937a6349df76228269ad2d7dc2c
2017-06-26 21:39:16 +08:00
Ralph Giles
efcb8bc380 Bug 1376636 - Exempt AV1 decoding from the vp9 benchmark. r=gerald
Accept av1 video in the webm decoder even when we've determined
the machine is too slow for software vp9 decoding. While we're
at an experimental stage with this codec, poor performance is
preferable to not being able to see a demo at all.

MozReview-Commit-ID: 6DJHCPfXHlA

--HG--
extra : rebase_source : 8fb5c0dac6483abf4775e3546dadd5aaa45947ac
2017-06-27 17:20:00 -07:00
Sebastian Hengst
9a1a3b8ebd Backed out changeset 0e4bdf5c1628 (bug 1376636) for Android bustage. r=backout 2017-06-29 03:28:18 +02:00
Ralph Giles
892c70acff Bug 1376636 - Exempt AV1 decoding from the vp9 benchmark. r=gerald
Accept av1 video in the webm decoder even when we've determined
the machine is too slow for software vp9 decoding. While we're
at an experimental stage with this codec, poor performance is
preferable to not being able to see a demo at all.

MozReview-Commit-ID: 6DJHCPfXHlA

--HG--
extra : rebase_source : 0819c3ddd437e9e56b18ba1fc6c56d4bdaebfa77
2017-06-27 17:20:00 -07:00
JW Wang
a05b9a90ee Bug 1376360. P1 - give CloneData() a default implementation for most resource types don't support clone. r=gerald
Also remove CanClone() overrides that are identical to that of the base class.

MozReview-Commit-ID: A0Q5ychQtso

--HG--
extra : rebase_source : 3369558a8e6bc9f86ab6dcdc39fe40f686041001
2017-06-23 16:26:30 +08:00
Bill McCloskey
f115503a0b Bug 1372405 - Provide names for all runnables in the tree (r=froydnj)
MozReview-Commit-ID: DKR6ROiHRS7
2017-06-26 14:19:58 -07:00
JW Wang
43c85c2307 Bug 1376227. P5 - merge CreateResource() and Load() for they are highly coupled. r=gerald
MozReview-Commit-ID: EH9NROdQfmd

--HG--
extra : rebase_source : 63c2ba04de1a25fb05db15977d8a19638e31b272
2017-06-23 15:39:57 +08:00
JW Wang
350f03bde7 Bug 1376227. P3 - move Load() down the class hierarchy. r=gerald
So we won't pass an unused |nsIStreamListener**| to MediaSourceDecoder::Load().

MozReview-Commit-ID: 2TCby8m8K5H

--HG--
extra : rebase_source : 349179aa4303c0abd8b86a695789770e158e5c28
extra : intermediate-source : d6f550bd6709a0ee7db6033286af42565a20cdb1
extra : source : ed524d855a1a78665c499152a9360ba961655641
2017-06-23 14:12:41 +08:00
JW Wang
884c26d368 Bug 1376227. P1 - let MediaDecoder sub-classes have the knowledge how to create a MediaResource. r=gerald
MozReview-Commit-ID: 2fHEkU46MUr

--HG--
extra : rebase_source : 18f5b01a065d6acbdc88ce808f8bd1e8e462e8d7
extra : intermediate-source : e003e070535d95f7e6334f4a92d6d763d436023c
extra : source : 450d506c6bb85f53b44fed296a32845bcd777905
2017-06-21 17:30:56 +08:00
JW Wang
61f7ca2479 Bug 1374930. P3 - move Clone() down to ChannelMediaDecoder for clone is possible only for those use channel-based resource. r=cpearce
MozReview-Commit-ID: Ci2kbts2pkQ

--HG--
extra : rebase_source : 3a2e70ca4bf56e1c73b7faff8e183211787a96bf
extra : source : 682cb949adae4683ae1cbbfbb4c457b83cb1fddc
2017-06-20 18:10:27 +08:00
Carsten "Tomcat" Book
de892834ed Merge mozilla-central to mozilla-inbound 2017-06-20 11:31:34 +02:00
JW Wang
ca683c8fb9 Bug 1374184. P2 - merge NotifyDataArrived() and NotifyDownloadProgressed(). r=gerald
We also move NotifyDownloadProgressed() to private
since it won't be called outside MediaDecoder.

MozReview-Commit-ID: GISbJEW7wwx

--HG--
extra : rebase_source : a454e1477ad645e9e2ee9cab8b31332b38518836
extra : source : 8ca5e3e1fac96a150e5df8e4d06c11f85ee3257d
2017-06-19 14:24:40 +08:00
Carsten "Tomcat" Book
ea1b86680c Backed out changeset 9846de3bd954 (bug 1372405)
--HG--
extra : rebase_source : 5d4a48e8ec394c329994689d938d2a6e9b2752b0
2017-06-20 08:27:02 +02:00
Bill McCloskey
4592152411 Bug 1372405 - Provide names for all runnables in the tree (r=froydnj)
MozReview-Commit-ID: DKR6ROiHRS7
2017-06-19 22:25:47 -07:00
Bevis Tseng
d1637b9c5a Bug 1372453 - Part 2: Name the caller of ProxyReleaseEvent. r=billm
MozReview-Commit-ID: LYhSWnZkq0i
2017-06-14 09:27:17 +08:00
JW Wang
becfe61ebe Bug 1373595. P2 - rename NotifyBytesDownloaded to NotifyDownloadProgressed to better describe what it actually does. r=gerald
MozReview-Commit-ID: IOBY3UKAy0G

--HG--
extra : rebase_source : be4b9a53fa676ec0a628a09edecce74528f1e66a
2017-06-19 11:01:13 +08:00
Jan Henning
5f07aa20bb Bug 1168435 - Part 1 - Remove old MP3FrameParser. r=jya
All former users of the old MP3 parsing code are gone, so we can now just remove the parser itself as well.

We also need to fix up an include issue in AutoTaskQueue.h that was previously masked by MP3FrameParser.cpp through unified builds.

MozReview-Commit-ID: CtvmfJKq5or

--HG--
extra : rebase_source : 73fe84244b4286c1eddce01c3001e3f985c8c568
2017-06-05 15:45:46 +02:00
Bill McCloskey
40acc9e3a0 Bug 1366072 - Make AbstractThread inherit from nsISerialEventTarget (r=jwwang)
MozReview-Commit-ID: 5L3gUEyGfyL
2017-06-13 14:50:58 -07:00
JW Wang
4031d18757 Bug 1371200. P1 - add MediaDecoderInit and fix MediaDecoder constructor and its friends. r=cpearce
We will add more fields to MediaDecoderInit and be able to remove some setters.

MozReview-Commit-ID: BVx935IHQHf

--HG--
extra : rebase_source : 6d167265e478ce39881ceada1303e9ca18189bbf
extra : source : 0c26f909568f673591ad6720458dfc912c01daad
2017-06-07 12:14:11 +08:00
Gerald Squelart
caaa280433 Bug 1369322 - MediaResource::ShouldCacheReads to indicate usefulness of caching - r=cpearce
This hint will inform readers if caching is discouraged (e.g., for
SourceBufferResource) or recommmended (e.g., for MediaCache-backed
ChannelMediaResource).

MozReview-Commit-ID: 7hopNS0s5tE

--HG--
extra : rebase_source : 681646cc904229e8513adb148baa085254508049
2017-06-02 14:27:17 +12:00
Gerald Squelart
8a1db77ea6 Bug 1368837 - Implement SourceBufferResource::GetCachedDataEnd - r=cpearce
MediaResourceIndex caching requires GetCachedDataEnd and ReadFromCache.
Implementing SourceBufferResource::GetCachedDataEnd is trivial, as it's just a
buffer from 0 to GetLength(), so if the requested cached-data offset is inside
the buffer, we can just return the total length as known cached data.

MozReview-Commit-ID: 1DO0PzDnjQp

--HG--
extra : rebase_source : e7a652622221c04e77dc3a3b7707f22e1db25599
2017-05-29 14:51:08 +12:00
Jean-Yves Avenard
575d1b16a0 Bug 1368952: P2. Remove monitor from SourceBufferResource. r=gerald
A SourceBufferResource is only ever used on the same taskqueue. It doesn't require to be thread-safe.

MozReview-Commit-ID: HREUvzaHyD9

--HG--
extra : rebase_source : dfa9d5223e892f95091fb522a1d768167d874a0a
2017-05-31 11:08:06 +02:00
Jean-Yves Avenard
aef9078060 Bug 1368952: P1. Fix coding style. r=gerald
MozReview-Commit-ID: HfkAegyhKW7

--HG--
extra : rebase_source : d9c5675ef4caf95ac94ff2e0f01ff42b1fb8fd87
2017-05-31 10:45:51 +02:00
Alfredo Yang
e6b2ddf4c2 Bug 1364872 - take zero tolerance of decoding error in debug and playback test. r=jya
MozReview-Commit-ID: 9DYBfyIvGvk

--HG--
extra : rebase_source : 81c85e2f271110fe85f94fb687a60820fc37f0fa
2017-05-24 15:25:09 +08:00
Jean-Yves Avenard
2dc6972be9 Bug 1362165: P9. Update mochitests. r=jwwang
I'm not sure what this mochitest was supposed to test, but it was doing it wrong anyway.

MozReview-Commit-ID: BexSN7YgXwj

--HG--
extra : rebase_source : ee056ab1eede9381376265dffb2f171cec87b086
2017-05-26 20:54:36 +02:00
Jean-Yves Avenard
7aeaba625b Bug 1362165: P8. Fix mochitests. r=jwwang
Per spec loadedmetadata should be fired before updateend. fetchAndLoad want on the updateend event. So we can't wait for the loadedmetadata event only after updateend has been fired.

MozReview-Commit-ID: BprzynZ8t1U

--HG--
extra : rebase_source : e3281b2d68272f5dd08567bfd3189e75411a6a99
2017-05-26 10:36:23 +02:00
Jean-Yves Avenard
a16fab66e4 Bug 1362165: P7. Only complete appendBuffer once readyState has changed. r=jwwang
MSE specs require that the readyState be modified during either the Initialization Segment Received or the Coded Frame Processing algorithms.

At this stage, we only handle the Initialization Segment part (readyState moving from HAVE_NOTHING to HAVE_METADATA)

MozReview-Commit-ID: KBnnWuHJ6Om

--HG--
extra : rebase_source : a4450139762d5d033438fbee2ce560fe02ed6ffc
2017-05-09 12:23:11 +02:00
Jean-Yves Avenard
5c7678f322 Bug 1362165: P6. Only use sourcebuffer again once previous operation completed. r=gerald
It was incorrect to assume that once "loadeddata" event fired the sourcebuffer would be usable again. Only the "updateend" event guarantees such condition.

MozReview-Commit-ID: HcyaLWjjBlp

--HG--
extra : rebase_source : c9d7a91ecc40c633078eaa2dec635e240106dff6
2017-05-03 11:50:33 +02:00
Jean-Yves Avenard
10fa46be38 Bug 1362165: P5. Don't assume that when stalling all data has been loaded. r=gerald
The stalled event can be fired as playback is starting and data has yet to be processed.
So instead we wait for playback to reach the end.

MozReview-Commit-ID: 4W3M5tee2HD

--HG--
extra : rebase_source : 349321452f8e1cc3307e8cedb6ebf44949694661
2017-04-28 17:18:43 +02:00
Jean-Yves Avenard
6643614f8c Bug 1362165: P4. Don't assume the duration found when reading metadata will be the final one. r=gerald
When endOfStream() is called, the duration is changed to that of the last buffered frame's end time.

The ended event will only be fired if currentTime is equal to the duration. So if the duration has changed following a call to endOfStream, then playback won't be considered as ended.

MozReview-Commit-ID: DBu3LorwFTI

--HG--
extra : rebase_source : a721ac0186f609b23537b71819c63d812f89a3b6
2017-04-28 16:16:51 +02:00
Jean-Yves Avenard
3b95392a3c Bug 1362165: P3. Remove unecessary code. r=gerald
We have no need to call endOfStream here as we don't rely on the ended event being fired.
Also, there's no need to track how many update count we will get when we only use appendBuffer once.

Adding extra test to help identify where the actual failure of the test could occur.

MozReview-Commit-ID: HIu1XQpHark

--HG--
extra : rebase_source : 07f9ac856d290f1347ec4b33794dc7d20adcc4cc
2017-04-28 16:18:36 +02:00
Jean-Yves Avenard
5dd9cac21c Bug 1362165: P2. Don't expect that all data has been processed after metadata. r=gerald
Assuming that the buffered range has been updated when loadedmetadata was fired was wrong. Only once the data has been fully appended to the source buffer, can seeking complete.

MozReview-Commit-ID: LRY0PRaMEw9

--HG--
extra : rebase_source : 07dcae199c8c38e3cadc3c4ed302e4bd3a82b48b
2017-04-28 00:52:44 +02:00
Jean-Yves Avenard
e27407d185 Bug 1362165: P1. Fix potential race accessing members. r=gerald
MozReview-Commit-ID: 9sXU2ZFKmJZ

--HG--
extra : rebase_source : bd98998ab5295cb42652e75612c888d8b23ce0db
2017-05-05 17:51:08 +02:00
Jean-Yves Avenard
ab282a14d4 Bug 1357040: P2. Don't rely on NotifyDataArrived to resolve MSE init promise. r=gerald
MozReview-Commit-ID: KUxVqfU9umw

--HG--
extra : rebase_source : c6f11109490fbb6fbfbda1b0fe2be1c8088ca4a2
2017-04-27 19:53:53 +02:00
JW Wang
5d7a4ae4c9 Bug 1362258 - Reduce ref-counting overhead of TrackBuffersManager::AppendData(). r=jya
http://searchfox.org/mozilla-central/rev/6580dd9a4eb0224773897388dba2ddf5ed7f4216/dom/media/mediasource/TrackBuffersManager.cpp#127

We can pass already_AddRefed<MediaByteBuffer> to InvokeAsync to avoid unnecessary AddRef/Release pairs.

MozReview-Commit-ID: ErXompyX8ua

--HG--
extra : rebase_source : f086e4ef5fda9f0dca8bfb0e2b4c74967e3f8323
2017-05-05 10:27:51 +08:00
JW Wang
47f3443d87 Bug 1361263 - allow InvokeAsync() to accept a member function which is pass-by-reference. r=gerald
StoreCopyPassByRRef<> ensures a copy is stored in the runnable.
We don't have to worry about the concern of bug 1300476.

MozReview-Commit-ID: DHqlzlVLBFV

--HG--
extra : rebase_source : 77f2175611aa6fad88207a771de75fd28fd46f21
extra : source : 429c62928fd43185da45c905a150cfbe84cb3cf7
2017-04-30 15:37:19 +08:00
JW Wang
aab9f27e0f Bug 1359309. P1 - give mozilla::TaskQueue a name which will be useful in debugging Dispatch() failures. r=jya
MozReview-Commit-ID: 5FAVNo32fl7

--HG--
extra : rebase_source : 761fca752429d95e97be699976283baa35c64abb
extra : intermediate-source : 83282a7a5adbe7046212da85f9d16e39faa4bd5c
extra : source : 924af3ea0aa86888fd2745020be7900e6eb614f0
2017-04-25 14:57:55 +08:00
JW Wang
f6a893a644 Bug 1358969 - let MediaDecoder::CurrentPosition() return a TimeUnit. r=kikuo
We want to replace the use of int64_t for microseconds by TimeUnit
whenever possible since int64_t is ambiguous which could be microseconds
or milliseconds.

MozReview-Commit-ID: K3Bz3uEXLDK

--HG--
extra : rebase_source : ade3cbd61c764b73a22c360572a525127dbadbc5
extra : intermediate-source : 013227a4aa645fc34a82c44130db6c847d74960b
extra : source : 1ab7ce426b557e4ce9979e023f9e84b4690eeaaa
2017-04-17 17:04:39 +08:00
Bob Clary
e0fcc0bc36 Bug 1358876 - Autophone - disable perma orange tests on Android 5.1, r=jmaher. 2017-04-24 08:02:59 -07:00
Sebastian Hengst
38b7615ab3 Backed out changeset df17c800d8f2 (bug 1358876) for crash test bustage. r=backout
"AndroidVersion is not defined"
2017-04-24 17:35:37 +02:00
Bob Clary
33ee94b632 Bug 1358876 - Autophone - disable perma orange tests on Android 5.1, r=jmaher. 2017-04-24 08:02:59 -07:00
JW Wang
02369ea1a2 Bug 1357987 - make MediaDecoder::DEFAULT_NEXT_FRAME_AVAILABLE_BUFFERED a TimeUnit to avoid ambiguous int64_t for microseconds. r=kaku
MozReview-Commit-ID: 9JC4zPEc6or

--HG--
extra : rebase_source : 8001ba3924f4bdb2ffb4143f1a22e2c4bf697ce3
extra : intermediate-source : 02bc62f83a7af3059b819c2bbb9fd887e2593043
extra : source : 5af753b1192f36ebf84279ff011617587ede613b
2017-04-17 16:58:44 +08:00
Carsten "Tomcat" Book
975e251aff merge mozilla-inbound to mozilla-central a=merge 2017-04-21 10:57:02 +02:00
JW Wang
f2ea37e57b Bug 1357986 - Use helper functions of TimeUnit to make code more readable. r=kaku
1. using media::TimeUnit to save some typing.
2. replace TimeUnit() with TimeUnit::Zero().
3. replace TimeUnit::FromXXX(0) with TimeUnit::Zero().
4. replace TimeUnit::FromMicroseconds(std::numeric_limits<int64_t>::max()) with TimeUnit::FromInfinity().
5. replace some uses of int64_t with TimeUnit.
6. replace t > TimeUnit() with t.IsPositive().

MozReview-Commit-ID: 6hC94PXx86i

--HG--
extra : rebase_source : 1ea3b409e6ec12915f3e1a00359d6ff4152c8917
extra : intermediate-source : e31a12ad0e7a4840119036f261ed17eaaff85734
extra : source : ae07ee48000c4a52da0e4fd502b4d690ec51ce1f
2017-04-17 16:35:04 +08:00
JW Wang
302d82c85a Bug 1356530 - Change the type of MediaData::mTime to TimeUnit since int64_t is ambiguous. r=kaku
MozReview-Commit-ID: 4bVeqIuWO2O

--HG--
extra : rebase_source : d504ac15a6dc59ad42f3ab80faf23f629d74315f
extra : intermediate-source : 6e52995b6c8146451d98dffc62f6907755dc856e
extra : source : 82d2649cdafb5a6389f6858c23578811933580c9
2017-04-14 17:13:36 +08:00
JW Wang
235f1f55ed Bug 1356506 - change the type of MediaData::mTimecode to TimeUnit since int64_t is ambiguous. r=gerald
MozReview-Commit-ID: 7dO5OOUuORz

--HG--
extra : rebase_source : 1c1c020700d9180ef9f85d7e2e679f498ab71fce
extra : intermediate-source : d173c820bef7a113e28e9732c42e8c1af36160ab
extra : source : 04c08a780526ca3a5ac4d1a6f9b7ae30d9957e92
2017-04-14 14:52:14 +08:00
Wes Kocher
5cba60441b Merge m-c to inbound, a=merge
MozReview-Commit-ID: HfJqvXF2Ux7
2017-04-20 15:55:31 -07:00
Bob Clary
5382b3e45a Bug 1352333 - sync autophone webrtc test manifests with normal webrtc manifests, r=jmaher,dminor. 2017-04-20 14:13:34 -07:00
JW Wang
3c0e7bddc7 Bug 1356502. P1 - let MediaDatra::GetEndTime() return a TimeUnit instead of ambiguous int64_t. r=gerald
MozReview-Commit-ID: DBQELBs32Ad

--HG--
extra : rebase_source : a7c9f7affbdfa12aaf94a6d0505cf4f54f4408cc
extra : intermediate-source : e1fcccdb12bb86c23520b5c2e0d76aef355597a5
extra : source : ddb8a8382c74e18dd52cdfbc7e8eee54cf46f05d
2017-04-14 14:14:08 +08:00
JW Wang
464497b945 Bug 1355756. P1 - change the type of MediaData::mDuration to TimeUnit. r=gerald
MozReview-Commit-ID: 3d4bUYtSuMI

--HG--
extra : rebase_source : 94c821b6d381421035e6a12cbe038436055c5822
extra : intermediate-source : 9a06beffc736486f47b9cf05e7f482e726d53068
extra : source : fdbdcd5c1474f04dc1dbde66fcf3a9ecec953053
2017-04-12 17:27:34 +08:00
JW Wang
f45fa7374e Bug 1355740 - Change the type of TrackInfo::mDuration to TimeUnit. r=jya
MozReview-Commit-ID: P7aqw4d5Vk

--HG--
extra : rebase_source : f22743fec9c8b70cbb092e3b26e252e7a4cb0b31
extra : source : 2413cd58f073b734a2cb85cec3658942bfd46e08
2017-04-12 16:41:36 +08:00
Gerald Squelart
4101482ad6 Bug 1343437 - 'media.playback.warnings-as-errors' pref - r=jya
If 'media.playback.warnings-as-errors' is true, demuxing and decoding warnings
(i.e., non-fatal errors) will be treated as errors, causing playback to fail.

Currently set to false by default.

This could be later changed to catch and diagnose more issues.

MozReview-Commit-ID: BTaZ6TbIbNG

--HG--
extra : rebase_source : bacc24a46f588dd344e6d46178ae2d2c58882fcb
2017-03-03 16:10:48 +11:00
Gerald Squelart
7dca1275ff Bug 1343437 - TBM::OnDemuxer{Init,Reset}Done forward non-NS_OK MediaResult to HTMLMediaElement::DecodeWarning - r=jya
Similarly to the MediaFormatReader, TrackBuffersManager can forward warnings
from the demuxer initialization to the associated HTMLMediaElement.

Note that errors (sent to OnDemuxerInitFailed) are currently *not* forwarded
to the HTMLMediaElement by design. In the future, we may want to add this
feature so that mediasource errors can also be reported to webcompat.

MozReview-Commit-ID: GjluZbpmC9q

--HG--
extra : rebase_source : 57c02f86c56f054f209094d9697209300acc1288
2017-03-14 01:08:39 +11:00
Jean-Yves Avenard
99c84ca5b6 Bug 1354090: P4. Only assume we have an init segment with moov box. r=gerald
By ISOBMFF spec, an init segment is made of an ftyp and a moov box. However the ftyp box serve little purpose as such and only the moov atom contains essential information.

Some streams incorrectly add ftyp box all accross the content, despite the ISOBMFF spec stating (4.3.1):
Box Type: `ftyp’
Container: File
Mandatory: Yes
Quantity: Exactly one (but see below)

Additionally, with this change the ftyp box may not be present in content following earlier spec. So we will now be able to play them.

MozReview-Commit-ID: KijlV5pPLby

--HG--
extra : rebase_source : c5d5ec643879b28b3fdf1b97364d856467ba5948
2017-04-07 15:37:18 +02:00
Jean-Yves Avenard
b0c4fd9119 Bug 1354090: P3. Properly offset the media and init byte ranges. r=gerald
The init and media segment byte ranges were not offset by the amount of bytes currently parsed. Whenever a new init segment signature was seen we would recreate a container parser.
This would lead to invalid offsets later.

MozReview-Commit-ID: 8U7kTa7SK8O

--HG--
extra : rebase_source : 6b6e665e01db2685a423558b2d09ce36b9052974
2017-04-07 12:04:24 +02:00
Jean-Yves Avenard
fa2ce72185 Bug 1354090: P1. Fix coding style. r=gerald
MozReview-Commit-ID: ByBHvxM3kfc

--HG--
extra : rebase_source : e96be6001fb38e1ff45ca2a5c27975c76b85f42b
2017-04-07 10:55:15 +02:00
Jean-Yves Avenard
efb450b903 Bug 1353088: Ensure we don't attempt to process garbage data. r=gerald
MozReview-Commit-ID: AryC34eLjOg
2017-04-09 09:00:40 +02:00
JW Wang
fb7b33fc4f Bug 1351160 - accept only integral types for operator*(). r=gerald
See bug 853398 for the reason to block double multiplier which is slower and
less precise for large values. Also we remove the friend functions of
operator* because it is easy to cause overloading ambiguity when making
them templates.

MozReview-Commit-ID: FhIWSHDd41b

--HG--
extra : rebase_source : e9fec65dfb0b077dd7f962eb20af719c0dc76df8
2017-03-28 14:10:31 +08:00
Jean-Yves Avenard
45f18b6e83 Bug 1350932: P1. Add mochitest. r=gerald
Add an AVC3 (content provided by BBC) mochitest. We've regressed BBC playback rather regularly. Better make sure this never happens again.

MozReview-Commit-ID: 5ssaLcqiqsv

--HG--
extra : rebase_source : 27938e746822f89167f287d57c81f276198b2c5e
2017-03-28 23:39:09 +02:00
Jean-Yves Avenard
50a8a24876 Bug 1347101: P1. Re-enable mochitest. r=gerald
MozReview-Commit-ID: 4Zh3WOZiyrI

--HG--
extra : rebase_source : 3c889c37efbbe6658800533c2df500792478bcf9
2017-03-17 01:15:34 +01:00
Jean-Yves Avenard
65f007b6ab Bug 1342913: P1. Add mochitest. r=gerald
MozReview-Commit-ID: IaU4tIm0Wze

--HG--
extra : rebase_source : 99c48155ec1c846496767ed2f823c60811e968f6
2017-03-08 00:28:13 +11:00
Jean-Yves Avenard
ec5692956a Bug 1346463: Disable test on windows 8 for now. r=gerald
Issue tracked in bug 1347101

MozReview-Commit-ID: 8YaMr3p8aMk

--HG--
extra : rebase_source : 0ee14327fd0d2bcb1589e35e6cf4455d5d8e7793
2017-03-14 12:39:13 +01:00
JW Wang
b28f0b3829 Bug 1343459. Part 2 - remove the 'updateend' handler which might fire before we register it. r=jya
Note the race is uncovered by P1 which kinda change the order of events.

MozReview-Commit-ID: 3INYvJVUhSG

--HG--
extra : rebase_source : e378c2a437a5a729008d39570be2a9087a7eb5f7
extra : intermediate-source : 02e2ecfea068dd9f487791287064e684a15dd599
extra : source : f2f40c70a2304e3e499422f3a7c46b59b54ad1ae
2017-03-01 17:46:42 +08:00
JW Wang
4f89ce372f Bug 1343459. Part 1 - Label runnables under dom/media/mediasource. r=jya
MozReview-Commit-ID: 5lJUZXWFH8u

--HG--
extra : rebase_source : 0a4215862264dcf3103d52141650dd9516290a58
extra : intermediate-source : 934ff70dc058eb7e18bf70f69aeac38b0595bbe9
extra : source : 6804fe809dcc2a365b8922cf72da129e764830c2
2017-03-01 15:08:50 +08:00
Jean-Yves Avenard
1a7b7995d5 Bug 1345756: [MSE] P4. Pre-roll AAC by 2112 audio frames. r=gerald
MozReview-Commit-ID: K09DyZMzbY7

--HG--
extra : rebase_source : 489974fa5cc254eba8b3bc83bb45bad8323a4313
2017-03-09 10:57:02 +01:00
Jean-Yves Avenard
2af615365e Bug 1345756: P3. Fix coding style. r=gerald
MozReview-Commit-ID: HxdcqxWbJzC

--HG--
extra : rebase_source : 614cd9bda49327db234c1ad7fc8e35ba96ba1b1a
2017-03-09 10:40:37 +01:00
Jean-Yves Avenard
ea9131893f Bug 1345756: P1. Add mochitest. r=gerald
testing seeking to last audio frame buffered.

MozReview-Commit-ID: A4Cr4OHs8qP

--HG--
extra : rebase_source : 77b91e3777feede619efa7008489c78680c1627e
2017-03-08 23:09:52 +01: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
Wes Kocher
eb19bf64a5 Backed out 4 changesets (bug 1345756) for failures in test_SeekToLastFrame_mp4.html a=backout
Backed out changeset ee6db88f8695 (bug 1345756)
Backed out changeset afd77992867f (bug 1345756)
Backed out changeset 83dc982bfc63 (bug 1345756)
Backed out changeset bd4999a68867 (bug 1345756)

MozReview-Commit-ID: 1J7H3EfW3fZ
2017-03-09 11:06:41 -08:00
Jean-Yves Avenard
f784a126e9 Bug 1345799: [MSE] Add flac in mp4 mochitest. r=gerald
MozReview-Commit-ID: CGW7kZa7u5q

--HG--
extra : rebase_source : 98bde84747f63e8c15abd9f72eadf728947aca38
2017-03-09 13:02:57 +01:00
Jean-Yves Avenard
f17d058e7f Bug 1345756: [MSE] P4. Pre-roll AAC by 2112 audio frames. r=gerald
MozReview-Commit-ID: K09DyZMzbY7

--HG--
extra : rebase_source : 68f574f720a4ccc24674a36c2b7aa33f1bca0f9b
2017-03-09 10:57:02 +01:00
Jean-Yves Avenard
00f3f4b13c Bug 1345756: P3. Fix coding style. r=gerald
MozReview-Commit-ID: HxdcqxWbJzC

--HG--
extra : rebase_source : 73d2da1692d4f692af94a9cb90198e2ed8249430
2017-03-09 10:40:37 +01:00
Jean-Yves Avenard
5d03df341f Bug 1345756: P1. Add mochitest. r=gerald
testing seeking to last audio frame buffered.

MozReview-Commit-ID: A4Cr4OHs8qP

--HG--
extra : rebase_source : 6b29a319181ca3284c264db9a1835e90875ccfa6
2017-03-08 23:09:52 +01:00
Jean-Yves Avenard
62f545f559 Bug 1342913: P1. Add mochitest. r=gerald
MozReview-Commit-ID: IaU4tIm0Wze

--HG--
extra : rebase_source : d4ed69e7addd9eaece9031195288c0f411ddea0a
2017-03-08 00:28:13 +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
57506c3907 Bug 1343787. Part 2 - move the Register() calls to Load(). r=gerald
MozReview-Commit-ID: 2jjZujE1qH8

--HG--
extra : rebase_source : f787346a5631acceb27d88e352d67f66e8053bf9
extra : source : 2d3a5e31f306ab2109f38e070a9881ef2affba60
2017-03-02 18:03:20 +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
Masatoshi Kimura
7be7b11a1c Bug 1342144 - Remove version parameter from the type attribute of script elements. r=jmaher
This patch is generated by the following sed script:
find . ! -wholename '*/.hg*' -type f \( -iname '*.html' -o -iname '*.xhtml' -o -iname '*.xul' -o -iname '*.js' \) -exec sed -i -e 's/\(\(text\|application\)\/javascript\);version=1.[0-9]/\1/g' {} \;

MozReview-Commit-ID: AzhtdwJwVNg

--HG--
extra : rebase_source : e8f90249454c0779d926f87777f457352961748d
2017-02-23 06:10:07 +09:00
Jeff Walden
d73ce21741 Bug 1287006 - Adjust media/ code to not pass Maybe (or any class containing a Maybe member) by value, only by reference or pointer. r=jw_wang, r=rjesup
--HG--
extra : rebase_source : 176a2afde5772bbdf43f0f6dc8082201acadcf4f
2017-02-13 09:07:40 -08:00
Jean-Yves Avenard
3afb565f72 Bug 1341342: [MSE] P2. Always enable MSE with webm/vp8. r=gerald
MozReview-Commit-ID: 4x1zyDZXqUt
2017-02-22 13:03:00 +01:00
Jean-Yves Avenard
edff5e0800 Bug 1341342: P1. Add mochitest. r=gerald
MozReview-Commit-ID: 9BUnSmEdIRr
2017-02-22 13:03:00 +01: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
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
JW Wang
553e846993 Bug 1331070 - delay seek request until decoding first frames for non-MSE media. r=kaku
See see bug 1321198 comment 17. This is a workaround to alleviate the issue
which seems to happen on win8 x64 opt only.

MozReview-Commit-ID: Lr4viEjuFkC

--HG--
extra : rebase_source : 99895cf6f6f13d5f4d698f76db7acda15d8cee77
2017-02-08 18:15:28 +08:00
Jean-Yves Avenard
71e0f46c33 Bug 1325707: P4. Fix coding style of MediaDataDemuxers. r=gerald
MozReview-Commit-ID: AV2lXwVZqLV

--HG--
extra : rebase_source : f66559f4d104516c8dfd2c9a146dfba8672dce33
2017-02-07 09:23:34 +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
Florian Quèze
bdc1ffa608 Bug 1334831 - script-generated patch to use .remove() instead of .parentNode.removeChild, r=jaws. 2017-01-30 08:10:22 +01:00
Florian Quèze
f187782ccf Bug 1334250 - script-generated patch to avoid removeEventListener calls when a variable is used for the event name, r=jaws. 2017-01-27 10:48:00 +01:00
Florian Quèze
0e0865f4fc Bug 1331599 - script-generated patch to replace removeEventListener calls with the once option when possible, r=jaws. 2017-01-25 07:01:52 +01: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
Gerald Squelart
f17dd305d6 Bug 1331289 - Use MediaContainerType in MediaResource, SourceBuffer, TrackBuffersManager, and dependencies - r=jya
Continuing the work of replacing MIME strings with MediaContainerType, starting
from MediaResource and following the dependencies.

Most changes are mechanical: Just change ns*String into MediaContainerType, and
MIME string literals into MEDIAMIMETYPE("a/b").
Some checks for empty/invalid strings and lowercase comparisons can go, thanks
to the always-valid always-lowercase-MIME invariants of MediaContainerType.

One special case in is MediaSourceResource, which used to have an empty string
as its type (because its own type is not relevant, but its SourceBuffers carry
types). Because the inherited GetContentType *must* be overridden, and must
return a MediaContainerType, we needed a valid type even though it should not
be seen in the real world. I've chosen "application/x.mediasource" for that.

MozReview-Commit-ID: 1aCH75Kh2e6

--HG--
extra : rebase_source : 0d9cd9b69c264e5dcfc3845f80ee107f4bcbcd9a
2016-12-28 18:59:02 +11:00
Gerald Squelart
5745998021 Bug 1331770 - Rename 'MediaContentType' to 'MediaContainerType' - r=jya
MozReview-Commit-ID: F0BWai8vPyo

--HG--
rename : dom/media/MediaContentType.cpp => dom/media/MediaContainerType.cpp
rename : dom/media/MediaContentType.h => dom/media/MediaContainerType.h
extra : rebase_source : 640ada96750b4496055087e80ae3f600c9df31c9
2017-01-18 11:59:03 +11:00
Florian Quèze
85611a7b6d Bug 1331081 - script generated patch to omit addEventListener/removeEventListener's third parameter when it's false, r=jaws.
--HG--
extra : rebase_source : a22344ee1569f58f1f0a01017bfe0d46a6a14602
2017-01-17 11:50:25 +01:00
Jean-Yves Avenard
ff5bf730de Bug 1329480: [MSE] Do not reject partial boxes. r=gerald
Partial content less than 8 bytes long was incorrectly rejected.

We now assume that content is valid unless it is explicitly incorrect (bad box type)

MozReview-Commit-ID: 8L32mNVjzxh

--HG--
extra : rebase_source : 980242aab96d5b96dc7e62ad289e8ecd7b228032
2017-01-13 17:38:40 +01:00
Gerald Squelart
f3a92fa0a6 Bug 1330284 - Use MediaContentType in MP4Decoder - r=jya
MozReview-Commit-ID: 9Npl40Iicjc

--HG--
extra : rebase_source : 27df1df1cdf8eb8b608e155c0146c8b09d655de4
2017-01-01 12:27:45 +11:00
Gerald Squelart
5587e692df Bug 1329568 - Remove MediaContentType crutches - r=jya
Now that we have move all data-handling functions to MediaMIMEType and friends,
we can remove direct accesses to data from MediaContentType, to better separate
the context that MediaContentType represents, from the data it includes.

Dependent code needs to be mechanically updated to now use the proper APIs.

Note that in most places, we just extract MIME strings. Further work will take
place in later bugs, to completely replace these strings with MediaContentType
or more appropriate types...

MozReview-Commit-ID: LoX8dhX7OlB

--HG--
extra : rebase_source : cf221ac3c104f99b36cfa055afcf67d3bca26d0e
2017-01-01 09:24:24 +11:00
Gerald Squelart
d206c54fef Bug 1329568 - MediaSource::IsTypeSupported should report a NotSupportedError if type is not supported - r=jya
Bug 1176218 made IsTypeSupported return a DOMTypeError if the type cannot be
parsed, but this was incorrect.
This was not important until now, because the basic parser accepted invalid
MIME types and therefore would never report an error there.
But the next couple of patches will introduce a stronger check that will
refuse types other that "application/...", "audio/...", and "video/...", and
would now trip the web-platform tests.

MozReview-Commit-ID: EeyFnyurEZK

--HG--
extra : rebase_source : 76f831ddc3c19e0d820454f6f949d44e15d6773c
2017-01-13 14:58:23 +11:00
JW Wang
4f5754ca55 Bug 1328130. Part 2 - remove MozPromiseRequestHolder::Begin(). r=gerald
MozReview-Commit-ID: JL27n0Era6E

--HG--
extra : rebase_source : e6de76db3fb35b110370497f4060ea1c3f527f23
extra : intermediate-source : 5bc39a45ef042b895a5abda59cc0796e8cfb4be3
extra : source : a7f7faded7b112e8a971ca96b091a9a22214a2bb
2017-01-11 16:33:29 +08:00
Wes Kocher
48f75e3c03 Backed out 13 changesets (bug 1329568) for wpt-11 failures in mediasource-addsourcebuffer.html a=backout CLOSED TREE
Backed out changeset 8f37ee96bd78 (bug 1329568)
Backed out changeset 706da9f85272 (bug 1329568)
Backed out changeset c316c8d24d32 (bug 1329568)
Backed out changeset 90a091e65db3 (bug 1329568)
Backed out changeset da855d6a78bb (bug 1329568)
Backed out changeset 3a49367220e3 (bug 1329568)
Backed out changeset 453851b40e3e (bug 1329568)
Backed out changeset 662529436cc4 (bug 1329568)
Backed out changeset 7c62078beb88 (bug 1329568)
Backed out changeset 99758b5f7918 (bug 1329568)
Backed out changeset 2ce9dcf0c274 (bug 1329568)
Backed out changeset 644f206d06d6 (bug 1329568)
Backed out changeset e1ed12f057c8 (bug 1329568)

MozReview-Commit-ID: FhJlySehxHi
2017-01-12 15:10:52 -08:00
Gerald Squelart
3a78522186 Bug 1329568 - Remove MediaContentType crutches - r=jya
Now that we have move all data-handling functions to MediaMIMEType and friends,
we can remove direct accesses to data from MediaContentType, to better separate
the context that MediaContentType represents, from the data it includes.

Dependent code needs to be mechanically updated to now use the proper APIs.

Note that in most places, we just extract MIME strings. Further work will take
place in later bugs, to completely replace these strings with MediaContentType
or more appropriate types...

MozReview-Commit-ID: LoX8dhX7OlB

--HG--
extra : rebase_source : 63eba419e5cb8a69500008145769c8e4ef99f33f
2017-01-01 09:24:24 +11:00
Gerald Squelart
cd181bc396 Bug 1329561 - MediaContentType is always valid - r=jya
MediaContentType can only be created through MakeMediaContentType(), which
returns a Maybe<MediaContentType>.
If the return value is Nothing, parsing failed.
Otherwise the contained MediaContentType object is guaranteed to be valid;
E.g., GetMIMEType() will always return a non-empty string.

Note that this interface will change a lot in the following bugs&patches, so
please don't worry about the 'Get' in the never-failing GetMIMEType(), it will
be gone soon!

MozReview-Commit-ID: IjGKkQ6RVd4

--HG--
extra : rebase_source : 5254af80dec0beb05da49f68c12fecc28edd725e
2016-12-01 12:56:11 +11:00
Gerald Squelart
1cc4e2c254 Bug 1329319 - Allow NewRunnableMethod to method of a non-refcounted base class - r=froydnj
This is done by storing the object pointer based on the exact pointee type,
instead of as hinted by the method-pointer, which could be a non-refcounted
base class.

The stored pointer type is statically-checked to be derived from (or the same
as) the class type from the method-pointer, to prevent misuses.

One change had to be done in TrackBuffersManager, as it was passing another
type and relying on implicit pointer conversions. A simple `.get()` to pass
the raw pointer type (to be stored in a RefPtr) fixed that one issue.

MozReview-Commit-ID: 4kH0XdjB5Rk

--HG--
extra : rebase_source : 40ad68820cfce469ecda272f430062f05dfcd09f
2017-01-10 10:49:08 +11:00
Wes Kocher
b0df943433 Backed out 2 changesets (bug 1329319) because it will not build a=backout
Backed out changeset ae96a44e6a8f (bug 1329319)
Backed out changeset a75ecabf7129 (bug 1329319)

MozReview-Commit-ID: HQ3on7jlZXN
2017-01-09 15:46:42 -08:00
Gerald Squelart
189314d9cf Bug 1329319 - Allow NewRunnableMethod to method of a non-refcounted base class - r=froydnj
This is done by storing the object pointer based on the exact pointee type,
instead of as hinted by the method-pointer, which could be a non-refcounted
base class.

The stored pointer type is statically-checked to be derived from (or the same
as) the class type from the method-pointer, to prevent misuses.

One change had to be done in TrackBuffersManager, as it was passing another
type and relying on implicit pointer conversions. A simple `.get()` to pass
the raw pointer type (to be stored in a RefPtr) fixed that one issue.

MozReview-Commit-ID: 4kH0XdjB5Rk

--HG--
extra : rebase_source : 3eb7fa3cb1873f71b4d5e7118d2dc48f6fdf2874
2017-01-09 11:11:16 +11:00
JW Wang
b245f6d89e Bug 1319295. Part 3 - enable dormant for the test. r=jya
MozReview-Commit-ID: 9dvmRXbr683

--HG--
extra : rebase_source : 89757edee2d01881902583b7c54a8f9084392248
extra : intermediate-source : 487459ad82406a06b9a5d1b4a53290c8aa3ee652
extra : source : 3e90c3305c9988daa2cef10b3209f629ccc6dd2d
2016-12-20 17:05:25 +08:00
Jean-Yves Avenard
0f319635c2 Bug 1324306: [MSE] Bump audio memory threshold to 20MB. r=gerald
MozReview-Commit-ID: LSAv3ujW2TX

--HG--
extra : rebase_source : 649dbc4b9d847c3d734c92408467fe309748682c
2016-12-19 20:17:50 +11:00
Jean-Yves Avenard
6182653bf0 Bug 1323847: [MSE] P4. Bump audio buffer size. r=gerald
Under some cases YouTube attempts to append more than 10MB of data ahead of currentTime. This causes the appendBuffer to be rejected with QUOTA_EXCEEDED_ERR as as per spec.

Bug 1320829 slightly increased the size of the MediaRawData object (by 36 bytes) which on average caused an increase of 470kB of the source buffer size causing the eviction threshold to be crossed quicker.
YouTube clears the entire source buffer once a buffer full is reported and reloads it all, causing an audible silence.

Bumping the threshold slightly is the only way to get around the problem.

MozReview-Commit-ID: HgtHFcZHUG1

--HG--
extra : rebase_source : 74b78a551c5eb827576d1797928cc4da51eb3dd1
2016-12-16 16:30:41 +11:00
Jean-Yves Avenard
95e0de057c Bug 1323847: [MSE] P2. Don't evict sample containing currentTime. r=gerald
MozReview-Commit-ID: KjX10EPzUJN

--HG--
extra : rebase_source : ef4e11a2f5a6a12cc7bf12715c4da0564f24c91c
2016-12-16 16:05:21 +11:00
Jean-Yves Avenard
41cae58779 Bug 1323847: [MSE] P1. Add extra logging. r=gerald
MozReview-Commit-ID: FL4aScnrTY3

--HG--
extra : rebase_source : d20a5805c79063640e12e9d5f11c6dfe70d4d214
2016-12-16 16:04:27 +11:00
Andrew McCreight
fccb0645ed Bug 1323042 - forbid MOZ_COUNT_{CTOR,DTOR} for nsISupports classes; r=froydnj 2016-12-12 09:27:58 -05:00
Nathan Froyd
826598caba Backout aba6c73511a2 (bug 1307961) for massive test bustage resulting in a CLOSED TREE; r=alltheorange 2016-12-12 08:45:46 -05:00
Andrew McCreight
e31b5489da Bug 1307961 - require consistent bloatview reporting for nsISupports classes; r=froydnj 2016-12-12 07:58:33 -05:00
Jean-Yves Avenard
0374bc4ac7 Bug 1322587: [MSE] P2. Allow additional top-level boxes. r=gerald
MozReview-Commit-ID: AE6EaPnOiJu

--HG--
extra : rebase_source : e713d4d4a755a1a6e835521d9774139d3a3e98d2
2016-12-09 09:21:21 -10:00
Jean-Yves Avenard
225e0aecd7 Bug 1322587: [MSE] P1. Fix error message. r=gerald
MozReview-Commit-ID: E6IH5t2uBKg

--HG--
extra : rebase_source : e3a8d0dcd0d0a87ae4e76378a6807cb6933e24b6
2016-12-09 09:03:09 -10:00
Ralph Giles
013b2b9c9f Bug 1320895 - Test ADTS frame size calculation. r=gerald
We don't generate timestamps for ADTS but we can verify
the Init Segment Range and Media Segment Range returned
by the parser match the frame size declared in the
Init Segment header.

MozReview-Commit-ID: FCZfxn9b69R

--HG--
extra : rebase_source : 44e6f842b815fcc1f21c3b2425a729f3773af319
2016-11-30 14:38:52 -08:00
Ralph Giles
d20f7b6309 Bug 1320895 - Correct ADTS frame size calculation. r=gerald
This should be bitwise OR rather than logical OR, which just
returns 1. This code has clearly never worked, but it isn't
currently called.

MozReview-Commit-ID: 9Iuy7a7P85O

--HG--
extra : rebase_source : 4da35a507993ee761ac952259c1be3a974a8a0ac
2016-11-30 13:23:18 -08:00
JW Wang
43e53b8e88 Bug 1320258. Part 1 - add a test case to test 'ended' is fired when seeking to the end of media. r=jya
MozReview-Commit-ID: 4cS9GiTYB7l

--HG--
extra : rebase_source : 20816f2e81c7488f4e0bc152b02f6949de15add8
extra : intermediate-source : 5a9a9b32dc576774aaa0834dd63b31644e557707
extra : source : f831993d1b06a1f18d9b599a9742a92833e5f6a0
2016-11-25 15:06:30 +08:00