Commit Graph

899 Commits

Author SHA1 Message Date
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
Gerald Squelart
353902bada Bug 1313497 - AppendBufferTask can take SourceBufferAttributes by const& - r=jya
A small optimization found while working on the previous patch.

MozReview-Commit-ID: 4w2LI5mqUvS

--HG--
extra : rebase_source : 70b9ad73c57da5079df607b5176fcfa45ed42e81
2016-11-13 16:39:47 +11:00
Gerald Squelart
1e16643490 Bug 1313497 - Use InvokeAsync with Storages in TrackBuffersManager - r=jya
MozReview-Commit-ID: IkpuSyFgPbP

--HG--
extra : rebase_source : bc56bb4dbfef3381477896470f644c5897753505
2016-11-13 16:37:24 +11:00
Gerald Squelart
038cba7f2e Bug 1313497 - Pass TimeUnit by const& in MediaDataDemuxer - r=jya
Thanks to the previous patch, MediaDataDemuxer::Seek and
SkipToNextRandomAccessPoint (and all overrides in derived demuxers) can now
take their TimeUnit parameter by const&.

MozReview-Commit-ID: 6CqfjAXZ7Yk

--HG--
extra : rebase_source : c3453e4432d9e0281cf5eba55217b0c1d6312f5b
2016-11-13 15:13:51 +11:00
Gerald Squelart
25b7c80fa4 Bug 1313497 - Use InvokeAsync with Storages in MediaSourceDemuxer - r=jya
We now take a copy of the TimeUnit object, and can then pass it by rref to
internal methods.

MozReview-Commit-ID: J0Idw85NMcu

--HG--
extra : rebase_source : 9cb8dd45ff7b449074121df8618ee7295398138b
2016-11-13 12:03:26 +11:00
Gerald Squelart
8f286c5e0c Bug 1313497 - Use InvokeAsync with lambda to replace MediaSourceDemuxer::AttemptInit - r=jya
MozReview-Commit-ID: 5qsQ2zQAMV3

--HG--
extra : rebase_source : f8d82ca0198fb95e0add8fc3e5f4489dfc8b31f1
2016-11-13 11:40:46 +11:00
JW Wang
b89b9e675b Bug 1319357 - clean up media elements when media tests are done. r=jya
MozReview-Commit-ID: GHJAwxR50AG

--HG--
extra : rebase_source : bdb6d045fddf65d18779b056baa496dc1c71e756
extra : source : 691ffaaf98a3796c92bab0e58eb56d0212601acc
2016-11-22 17:02:08 +08:00
JW Wang
05b9e78f7b Bug 1319293 - Enable dormant for dom/media/mediasource/test/test_PlayEvents.html r=jya
MozReview-Commit-ID: 1cRcyTfF0Qc

--HG--
extra : rebase_source : e1d77bfdda8de1f46fd4d717024bdc6c9d924b74
extra : source : be6a71fc9ee695ec0461499b951f5939d254e9cf
2016-11-22 14:59:00 +08:00
JW Wang
a8b746d049 Bug 1318982 - Enable dormant for most media mochitests. r=jya
MozReview-Commit-ID: 7AXEhCmFUeR

--HG--
extra : rebase_source : fa42b09dda75c3385edc6f7decc240816195722b
extra : intermediate-source : 3376be75b913bbc3bd0920828f9e756982e9cac3
extra : source : ffee549ec036bc3ec1b9b1bccb26314c5adb5096
2016-11-02 16:56:38 +08:00
JW Wang
c73002e638 Bug 1315591 - remove duplicated waitUntilTime() in test_BufferingWait[_mp4].html. r=jya
MozReview-Commit-ID: 12Z9TJ4WVVt

--HG--
extra : rebase_source : 34b9d33b354c41f02ce0da7dfcf13612e809bd34
2016-11-07 11:49:38 +08:00
Jean-Yves Avenard
ad3b3a4b82 Bug 1314533: [MSE] P6. Allow to detect error during preliminary container parsing. r=gerald
MozReview-Commit-ID: KZ858ISWDmu

--HG--
extra : rebase_source : 776e858619f13178193a9be2e0857c69dea15984
2016-11-04 23:09:47 +11:00
Jean-Yves Avenard
a7ef8c33da Bug 1314533: [MSE] P4. Reject invalid webm block. r=gerald
An invalid webm block at this stage is either a non init segment or non media segment.

MozReview-Commit-ID: 46NrhCwqas1

--HG--
extra : rebase_source : b5be124fc0789cfe0fe757c5fb83f18a769a8bd4
2016-11-04 02:16:53 +11:00
Jean-Yves Avenard
5c340b140f Bug 1314533: [MSE] P3. Reject invalid MP4 boxes. r=gerald
MozReview-Commit-ID: F0FcQDqsLk7

--HG--
extra : rebase_source : 91d878d277013b7d78c32b9b0855d38989e94741
2016-11-04 01:49:19 +11:00
Jean-Yves Avenard
d7ed0c4335 Bug 1314533: [MSE] P2. Reject appendBuffer if invalid data found. r=gerald
This still requires all the ContainerParser to be updated in properly handling errors.

MozReview-Commit-ID: A7gDmXSJXmc

--HG--
extra : rebase_source : c438fdd40deb843e43f341d107e48171141dc746
2016-11-02 21:39:14 +11:00
Jean-Yves Avenard
fa47b59611 Bug 1314533: [MSE] P1. Change member prototype. r=gerald
MozReview-Commit-ID: L8H4oDoTm2b

--HG--
extra : rebase_source : d78504699223bfd63624bf2e603d274d4c06cca8
2016-11-02 21:29:13 +11:00
Sebastian Hengst
8ee9323cd0 Bug 1310297 - Remove test annotations using b2g, mulet or gonk: dom/media. r=RyanVM
MozReview-Commit-ID: JVsnpnBDeCC

--HG--
extra : rebase_source : 5a7ccee10b094808e3ee73de7a226306a9fd55fd
2016-11-05 11:29:16 +01:00
JW Wang
9fcd26988d Bug 1311872. Part 1 - remove dormant code from MediaDecoder and its friends. We will let MDSM solely decide when to enter/exit dormant. r=cpearce,jya
MozReview-Commit-ID: 4rRSGcruy7Z

--HG--
extra : rebase_source : 6bff3bde442dbc96ce23a4a1aabae9ec79f1b9f0
extra : intermediate-source : 456de41037090ff072925d937b001de31a479556
extra : source : 525be5a0f46950ced9efba9a7cfeda26ce73cfb8
2016-10-20 15:20:25 +08:00
bechen
b903d81761 Bug 1286738 - part4-fixWebMAudio: audio/webm doesn't need the IsWebMForced() check. r=jya
MozReview-Commit-ID: 1BWpKvT3XTs

--HG--
extra : rebase_source : b834c1f767b35036928c3d59663b62ead7482ea9
2016-10-26 17:31:22 +08:00
bechen
24016416cb Bug 1286738 - part3-mediasource: Enable fennec vp9 only if we have hw deocder. r=jya
MozReview-Commit-ID: BwAZTrgXcaP

--HG--
extra : rebase_source : 85ed47735c51281053b409d25bdebd6dad3aa1bc
2016-10-26 17:08:21 +08:00
Jean-Yves Avenard
b59dab94ce Bug 1314212: P2. Update and re-enable MSE mochitest. r=gerald
MozReview-Commit-ID: Lm09FxaYr7w

--HG--
extra : rebase_source : 7473a65f36f47e0c2aaf4dab9892594bc08346bb
2016-11-02 18:05:51 +11:00
Jean-Yves Avenard
0f06937c17 Bug 1314212: P1. Update and re-enable MSE mochitest. r=gerald
MozReview-Commit-ID: 9hYddtEWexz

--HG--
extra : rebase_source : dce11a935d64ddc2a4a2855d2ba0ec1af54a9653
2016-11-01 18:36:07 +11:00
Phil Ringnalda
a2f4b15464 Merge m-c to autoland 2016-10-18 19:50:46 -07:00
Jean-Yves Avenard
4db3f07930 Bug 1311137: [MSE] Ensure buffered range doesn't get modified during run. r=gerald
Previously two separate monitors were used to find the highest end time, and then work on tracks, introducing the possibility that tracks could be modified between these two operations. Now only one monitor is used to ensure consistency.

MozReview-Commit-ID: 1foB82S6W1Z

--HG--
extra : rebase_source : 817ff8cf231372a4db90b2c11f3bb60d1031fa89
2016-10-19 10:28:49 +11:00
Jonathan Hao
ad4fb47b95 Bug 1264595 - Test whether auto-revocation is removed. r=karlt 2016-10-18 15:56:00 +08:00
Jean-Yves Avenard
393d5d4fe1 Bug 1305876: P3. Make function members const. r=gerald
MozReview-Commit-ID: 6R9Y9ofjKp8
2016-10-13 18:59:17 +11:00
Jean-Yves Avenard
eb41ff60cb Bug 1305876: P2. Do not modify internal data when calculating buffered ranges. r=gerald
MozReview-Commit-ID: 29WJozhIrEP
2016-10-13 18:59:17 +11:00
Jean-Yves Avenard
b835f66b3a Bug 1305876: P1. Add diagnostic assert to more easily identify issue. r=gerald
MozReview-Commit-ID: BJhHLHRhnQw
2016-10-13 18:59:17 +11:00
Gerald Squelart
72c393635b Bug 1176218 - p5. Use DecoderTraits::CanHandleContentType in MediaSource - r=jya
Replace both uses of nsContentTypeParser with MediaContentType.

MozReview-Commit-ID: KV7ze3ASRf3

--HG--
extra : rebase_source : b3d102b02fa671d0a42d70ae7fe66bdd51ac5d86
2016-09-29 23:10:15 +10:00
Jean-Yves Avenard
8ad335efb0 Bug 1305347: [MSE] Break removal loop early when possible. r=gerald
MozReview-Commit-ID: 2Pl3drov8tT

--HG--
extra : rebase_source : ccf512533b71315400bf5db77147d47a4e342162
2016-10-06 17:32:39 +11:00
JW Wang
bb286ff881 Bug 1307055. Part 2 - remove unnecessary pref settings and unused functions. r=cpearce
MozReview-Commit-ID: IQHrWAwrMMZ

--HG--
extra : rebase_source : 04e5c65b386270e1231e6720f1635f19c0a58e24
2016-10-03 15:20:31 +08:00
Carsten "Tomcat" Book
762cd18602 Merge mozilla-central to autoland 2016-09-28 16:52:13 +02:00
Chris Pearce
22b3d81155 Bug 1300069 - Remove TrackBuffersManager::mIsEncrypted. r=jya
It's write only, so there's no point storing this, and it's not accurate
anyway, as it's actually tracking whether there's encrypted init data in
the media, not whether its got encrypted tracks.


MozReview-Commit-ID: 78iFUyXwRBV

--HG--
extra : rebase_source : f500b90d32da042a550172128a4c79c142048a98
extra : amend_source : c4e31f686e2c0f2c400225919c45c3a530373a8c
2016-09-28 13:45:25 +13:00
James Cheng
48efb9caad Bug 1300654 Part1-Remove MOZ_EME from code base. r=cpearce,smaug
MozReview-Commit-ID: JboGO0w4tcE

--HG--
extra : rebase_source : abfe53f30081f74fc39c900cab48d08c7574bfec
2016-09-08 18:06:20 +08:00
Jean-Yves Avenard
05df96f1aa Bug 1302573: [MSE] P5. Always evict data as soon as we can. r=gerald
While never evicting less than 512kB saves CPU cycles, it reduces the chances to evict data when we actually need to and requires currentTime to advance much further.

MozReview-Commit-ID: LcQFFtarbbi

--HG--
extra : rebase_source : 381de3d926bbb12377f4332eb87c08b52a56551a
2016-09-25 21:55:26 +10:00