Граф коммитов

296 Коммитов

Автор SHA1 Сообщение Дата
Gerald Squelart 7866e6fdb6 Bug 1377015 - MediaCodecs::ContainsPrefix implementation and tests - r=rillian
Many video codecs use a suffix to specify level, profile and optional features,
like "avc1.42E001" or "vp09.00.41.08".
MediaCodecs::ContainsPrefix() can be used to facilitate codec identification
from their prefix alone, e.g.: "avc1" or "vp09".

MozReview-Commit-ID: D6kcjggXptS

--HG--
extra : rebase_source : 3a60c01da1d91adf29f51ce3c32f8df60282c90a
2017-06-29 11:17:56 -07: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
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 4bc2a74510 Bug 1374566 - remove methods that have no callers. r=gerald
MozReview-Commit-ID: 7Ze0q32VS0h

--HG--
extra : rebase_source : 470fdf5d480b9115039faeb519756e05787011af
extra : source : be2cd2df4469cec5ded0f9d07977f8f09ba60cb6
2017-06-20 16:47:03 +08:00
Jan Henning 0b677ecf4b Bug 1168435 - Part 3 - Remove separate MP3 name space. r=jya
MozReview-Commit-ID: D876PpLd93C

--HG--
extra : rebase_source : cd65b9ed78674e601493f7d0145bf038e0e48d0b
2017-06-15 15:32:20 +02:00
Bill McCloskey 5066de8593 Bug 1366072 - MozPromise tests (r=jwwang)
MozReview-Commit-ID: 69OQb1f3UTd
2017-06-13 14:51:07 -07:00
Ralph Giles 79deabf94b Bug 1370976 - Add webm MediaMIMEType gtest. r=gerald
Make sure we test the other major container we
need to parse correctly.

MozReview-Commit-ID: AnrGADFXPkw

--HG--
extra : rebase_source : 5e20580d0900a62f923b96089410845c187ac2a7
2017-05-31 13:35:15 -07: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
JW Wang 7348b1e4b3 Bug 1367679. P5 - add a gtest to test chaining between different promise types. r=gerald
MozReview-Commit-ID: 8l3clGN3pWd

--HG--
extra : rebase_source : 5c3a7d74649a44e9d86738942bfe58a34f63332f
extra : intermediate-source : 4811c6b4d7c4fb241c633e3c81cc8b032c69386e
extra : source : 620a6593190dbb97df105a5bb1ca5fa48d1c73be
2017-05-27 22:03:57 +08:00
JW Wang ea2f8c0d3a Bug 1370005. P1 - backout bug 1367679. r=gerald
MozReview-Commit-ID: 4SUCinaz3Cj

--HG--
extra : rebase_source : 2d6f7fec44a8fb4dd3a526ec6bd2cd5737c93727
2017-06-05 14:03:34 +08:00
JW Wang 30ad12db3a Bug 1367679. P5 - add a gtest to test chaining between different promise types. r=gerald
MozReview-Commit-ID: 8l3clGN3pWd

--HG--
extra : rebase_source : 5c3a7d74649a44e9d86738942bfe58a34f63332f
extra : intermediate-source : 4811c6b4d7c4fb241c633e3c81cc8b032c69386e
extra : source : 620a6593190dbb97df105a5bb1ca5fa48d1c73be
2017-05-27 22:03:57 +08:00
Gerald Squelart 5c90401225 Bug 1368837 - MockMediaResource should fread individual bytes - r=cpearce
`fread(buf, count, 1, f)` meant that exactly one object of size `count` could
be read.
Changing that to `fread(buf, 1, count, f)` now reads up to `count` size-1
objects (aka bytes) up to `count` and returns that number of bytes read, which
is usually what we want from a read, i.e. as much as possible even if it's less
than requested.

MozReview-Commit-ID: 3Lgvws19SFd

--HG--
extra : rebase_source : e5b89a7073d2a5a0365c6fe6aa938bd17cf37935
2017-05-26 15:15:14 +12:00
Gerald Squelart 9f7cafca97 Bug 1368837 - MockMediaResource::GetCachedDataEnd should return the offset if out of range - r=cpearce
If the requested cached-data offset is out of range, we should just return the
same offset, as it signals that the actual cached range is 0 bytes, without
having to deal with -1.

MozReview-Commit-ID: D0rXO0S0mss

--HG--
extra : rebase_source : 39784ff39d12d416358a181f0245ec2129c6992d
2017-05-29 15:13:15 +12:00
JW Wang a86c1434a6 Bug 1338635 - Declare |holder| before |atq| to ensure the destructor is run after |holder.Disconnect()|. r=gerald
Otherwise we might fail the assertion |!mRequest| in the destructor of MozPromiseRequestHolder.

MozReview-Commit-ID: HsVD2re0R7e

--HG--
extra : rebase_source : c023899d92501dd3e275000c9ef0eb50df117236
2017-05-29 09:38:14 +08:00
Nathan Froyd c1d1748428 Bug 1359490 - add an event loop spinning abstraction function; r=gerald
This function is arguably nicer than calling NS_ProcessNextEvent
manually, is slightly more efficient, and will enable better auditing
for NS_ProcessNextEvent when we do Quantum DOM scheduling changes.
2017-05-15 09:34:19 -04:00
JW Wang 2c2b5b8639 Bug 1362910. P3 - add a gtest to test move-only types with MozPromise. r=gerald
MozReview-Commit-ID: 5LP7POyxNt3

--HG--
extra : rebase_source : a394993f55180c115c8f5ea7192dfa5ee75b69ea
extra : source : 531a38af11fcb704c1b3c5f5e0856b11b0cc2da3
2017-05-11 11:51:58 +08:00
JW Wang 5ad2189944 Bug 1363676. P2 - add a gtest to ensure we don't break ResolveOrRejectValue during refactoring. r=gerald
MozReview-Commit-ID: A1ftwJMYgGw

--HG--
extra : rebase_source : 7d85b6b17363af64466bb937f671ddb019ce6be2
2017-05-10 17:41:08 +08:00
Ralph Giles 708b853aaa Bug 1363500 - Remove TestMP4Reader. r=jya
The MP4Reader class was removed in bug 1163486, replaced
by MediaFormatReader combined with MP4Demuxer. Bug 1175752
disabled the corresponding gtest, but as the underlying
object is gone, the test should be removed instead.

MozReview-Commit-ID: 7mU4Q98LtKA

--HG--
extra : rebase_source : 10b20e749321a50bac708c493badbdf32b41f859
2017-05-09 12:03:07 -07:00
Ralph Giles f56cb16c14 Bug 1336153 - Remove MOZ_RUST. r=ted
We now have code that unconditionally requires the rust
compiler and are committed to adding more. Remove this
last vestige of conditional support.

MozReview-Commit-ID: EK6FBnAbR

--HG--
extra : rebase_source : 6efda10a74f9ca0482304c2b1ffe6941e42138f8
2017-05-09 11:36:13 -07:00
JW Wang 20f3ad9f2f Bug 1362912. P2 - fix the callers. r=gerald
MozReview-Commit-ID: LdYcIWAFDUn

--HG--
extra : rebase_source : eb943f7e5b7674c3397fce3ad0e8193b4c0ddc01
extra : source : fdfd468b6edbabf3830eb78fc705f6d6682b7126
2017-05-09 23:31:32 +08:00
JW Wang 55f471732b Bug 1361305. P2 - add a gtest to test an rvalue lambda is moved instead of copied when adding a listener. r=gerald
MozReview-Commit-ID: 8YM0iJxk6er

--HG--
extra : rebase_source : b7556abd70b5c185a7cae14ebd94f1783c092cc0
extra : source : d01696f770c7d4787942a3fbfc681d9fdaa99793
2017-05-02 17:33:23 +08:00
JW Wang a1108d032e Bug 1361259. P4 - enforce copy in NonExclusive mode for each listener must get a copy. r=gerald
MozReview-Commit-ID: Mqt0N2erP6

--HG--
extra : rebase_source : 29c5a468401cd8926d5bd636caa7f63ab50e00aa
extra : source : c685f9768d516ffac538cb7fc240aaf5e4844693
2017-04-28 17:56:57 +08:00
Michael Layzell 31c0dfca22 Bug 1339537 - Part 3: Pass IntIntervals by const reference in TestIntervalSet, r=jya
MozReview-Commit-ID: BGg1yS2Ovhz
2017-04-27 12:44:51 -04: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 d2ca2106c9 Bug 1357983 - remove media::Microseconds. r=gerald
media::TimeUnit can take its place. We don't want 2 things for the same purpose to cause confusion.

MozReview-Commit-ID: 3z6hbgXFsxP

--HG--
extra : rebase_source : 0b472e351abdc48e337aaf645ae8be467e8a300f
extra : intermediate-source : 4e2156ec04fd30af6cf59adfd1390cf67f411d4c
extra : source : bf5b035c7041a892517373dd566d2a7d7ec60c72
2017-04-17 14:34:36 +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
Kaku Kuo b06e8a5370 Bug 1344357 P1 - move the MediaDecoder::mSeekDOMPromise to HTMLMediaElement; r=jwwang
There was a cycle amoung a window object -> a HTMLMediaElement -> a MediaDecoder -> a Promise (-> back to the window object).
And we have no way to break the cycle since the MediaDecoder does not participate into the collection.

By moving the Promise form MediaDecoder to HTMLMediaElement, we will be able to break the cycle since the HTMLMediaElement is in the collection.

We'll implement the cycle collection in the next patch.

MozReview-Commit-ID: CyVXBl6IMI3

--HG--
extra : rebase_source : 195a322ce3e6fe933e72be4aec5d2ebfa1f54865
2017-04-17 18:25:26 +08:00
James Cheng ba6513e929 Bug 1349129 - Fix CID 1403176 and CID 1403178 for memory leak. r=jwwang
MozReview-Commit-ID: ClAcLgztPZ4

--HG--
extra : rebase_source : 3f00022cf2ca8dfec78cc1e8cc8f48fcbb220feb
2017-03-21 16:25:29 +08:00
Kaku Kuo 229d7c8d86 Bug 1348237 part 3 - add a gtest to test the overflow case; r=jwwang
MozReview-Commit-ID: Fv6MjKjoRxd

--HG--
extra : rebase_source : acdf3e6799819a3664294fa125a88c3d3a41aec4
2017-03-17 16:54:05 +08:00
Kaku Kuo 0d5f3a200f Bug 1347402 part 5 - create MediaElementGMPCrashHelper in HTMLMediaElement.cpp; r=cpearce,jwwang
Move the creation of MediaElementGMPCrashHelper out from MediaDecoder.cpp
which reduces the dependency of MediaDecoder to HTMLMediaElement.

MozReview-Commit-ID: E60aMfcFr7V

--HG--
extra : rebase_source : f50a8ee6f2fbec0bdf117eb1217066bc9c701745
extra : source : dd4e52da6d0d6205fe61d0caba44bbff008fd21a
2017-03-16 11:16:15 +08:00
Kaku Kuo b7fee84e84 Bug 1347402 part 4 - move ConstructMediaTracks/RemoveMediaTracks to HTMLMediaElemnt; r=jwwang
ConstructMediaTracks and RemoveMediaTracks are actually HTMLMediaElement's responsibilities.

MozReview-Commit-ID: 8lOdzD4pN7N

--HG--
extra : rebase_source : 7159d2c62b77429e5b2305b9e3eb7a0020a3b52c
extra : source : 0467c059be3cd8f066da5fc912b7738a5b9c4dd9
2017-03-15 17:33:21 +08:00
Kaku Kuo a71c156f34 Bug 1347402 part 2 - open a GetOwnerDoc() interface at the MediaDecoderOwner; r=jwwang
Open a GetOwnerDoc() method to the MediaDecoderOwner interface and then we can get the
owner document via a pointer to MediaDecoderOwner in MediaDecoder.

MozReview-Commit-ID: JCzQDLx1MsU

--HG--
extra : rebase_source : e194c95cb1513046ec7aa19d6c6e9f8231971a2d
extra : source : 1b9c45911a036e3677b6636cda84a636681d71de
2017-03-15 11:40:37 +08:00
JW Wang 00339296c7 Bug 1345313 - Label runnables under dom/media/gtest. r=gerald
MozReview-Commit-ID: Fp7Rcn6JsXf

--HG--
extra : rebase_source : beb0e871d459f616a41f617d092e86938cf5c997
extra : source : 6081536de4c4c2dc7e191eeb87df50f879e44a86
2017-03-07 16:06:59 +08: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
Gerald Squelart 6a13464498 Bug 1339924 - Remove unneeded [queue] lambda capture - r=dholbert
'queue' is not used inside that lambda, so we can drop it.

Another option would have been to simulate its use through `Unused <<`.
But I think that it's a useful test, *not* to capture the queue here, to verify
that it is correctly captured in the enclosing MozPromise::Then.

MozReview-Commit-ID: LUQGPJzDcTb

--HG--
extra : rebase_source : 8a539816b8c3ce16ea7af2fed0d6b2b68bd3900b
2017-02-16 10:17:32 +11:00
Chris Pearce 302ca1dbee Bug 1332530 - Remove GMP enum storage names. r=gerald
Note: Only the Adobe GMP used enum storage, so not that it's unused we may
as well remove this.

MozReview-Commit-ID: JtmQ69eJzaI

--HG--
extra : rebase_source : 29929e680dc1692b957b34ce274c4944743768e8
2017-01-20 15:06:00 +13:00
Chris Pearce 6b15c34475 Bug 1332530 - Remove librlz and EME/GMP device binding code. r=gerald
MozReview-Commit-ID: FzJ220XlrJi

--HG--
extra : rebase_source : 0945a3b46bcc90de9b48f56da46090cb2f777411
2017-01-20 13:47:48 +13:00
Andreas Pehrson 6308603b30 Bug 1333341 - Add gtest for per-frame rounding error. r=jesup
MozReview-Commit-ID: KEG3ewlMmTN

--HG--
extra : rebase_source : f1ea0444250a245ac0be728facf120c42c1faf14
2017-01-24 09:26:51 +01:00
Gerald Squelart 9c41bb7d24 Bug 1333314 - MediaCodecs::operator==(ascii literal) - r=jya
Instead of `...Codecs().AsString().EqualsASCII("...")`, one can just type
`...Codecs() == "..."`.

MozReview-Commit-ID: JS0yXhs0mz1

--HG--
extra : rebase_source : 40947ca3975ae5390d5dae5add7ed35460235545
2017-01-24 15:42:48 +11:00
Andreas Pehrson 15e55f2046 Bug 1332619 - Add gtest for skipped frames. r=jesup
MozReview-Commit-ID: G5BkNVayJOV

--HG--
extra : rebase_source : f9ff73a6f86e7d85f4ff8d78d8af87a4b1bc8e80
extra : intermediate-source : f9688b01d725caadb64486d299a6a38a421b560b
extra : source : f06f4ff1d49007e0d6a2506f87df3c365f3a2c5f
2017-01-23 15:32:24 +01:00
Ryan VanderMeulen 340794d0a9 Backed out 2 changesets (bug 1332619) by request.
Backed out changeset 08d0dccfb2c3 (bug 1332619)
Backed out changeset a406da1d258c (bug 1332619)

--HG--
extra : rebase_source : 0b6a5f2623967fe35eaa60941571feb3e91fecb5
2017-01-23 11:25:11 -05:00
Andreas Pehrson 762080ae3d Bug 1332619 - Add gtest for skipped frames. r=jesup
MozReview-Commit-ID: G5BkNVayJOV

--HG--
extra : rebase_source : c2aef01ea7b2c9e61576af3b13b1a10b794e253d
extra : source : f06f4ff1d49007e0d6a2506f87df3c365f3a2c5f
2017-01-23 15:32:24 +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
Phil Ringnalda 0fae2ed52a Backed out 2 changesets (bug 1332619) for frequent Win8 gtest failures in VP8VideoTrackEncoder.SkippedFrames
Backed out changeset 9ea8e4f2edae (bug 1332619)
Backed out changeset 123099d23df5 (bug 1332619)
2017-01-20 20:02:57 -08:00
Andreas Pehrson 12bae8d7f9 Bug 1332619 - Add gtest for skipped frames. r=jesup
MozReview-Commit-ID: G5BkNVayJOV

--HG--
extra : rebase_source : 522a754f70bff7525c5f9e8fdc4343360783c356
extra : source : f06f4ff1d49007e0d6a2506f87df3c365f3a2c5f
2017-01-20 15:30:29 +01:00
Andreas Pehrson 2bca25c1da Bug 1332585 - Add gtest for starting a track with null frames. r=jesup
MozReview-Commit-ID: FxJUFNZ3TDn

--HG--
extra : rebase_source : caf2c39e07d8e1664e419ef83971f7b1a5eee73b
extra : source : 42db20a8898443376c0e0aeea62befa23eb52e93
2017-01-20 12:27:32 +01:00
Andreas Pehrson c42cf251e0 Bug 1332585 - Add gtest for passing multiple instances of one frame to the vp8 encoder. r=jesup
MozReview-Commit-ID: ellNhSDWGh

--HG--
extra : rebase_source : e224edbec125e39e7175fffb3d8ff933fdf48a02
extra : source : e369214fb173e8325c352075dd10466a9f90b03f
2017-01-20 12:26:56 +01:00
Andreas Pehrson 9197ca6ccc Bug 1332585 - Check that encoder completed after EOS in existing test. r=jesup
MozReview-Commit-ID: FFLyGhggDyM

--HG--
extra : rebase_source : 0ef19f642b65dbfc502a116449de78c5fde67a9f
extra : source : 3b4820bc1fc83dba9f621cb0ba0bafe09c2f303f
2017-01-20 12:25:48 +01:00