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

1381 Коммитов

Автор SHA1 Сообщение Дата
Chris Pearce 51415ba462 Bug 1554075 - Allow direct access of source buffer's data from demuxer, eliminating most copies. r=jya
A lot of the overhead in MoofParser::RebuildFragmentedIndex(BoxContext&) is
copying data into the BoxReader's storage. In the MSE case the underlying data
being read is actually buffered in memory, so we may be able to just read the
in-memory data directly, avoiding the copy.

Note that the data may not be stored in a single contiguous ResourceItem in the
SourceBufferResource's ResourQueue. If so, it's not as straightforward to hand
out a uint8_t* to the underlying data. So we just copy it in that case for
simplicity. In most cases, the data in a single MP4 box would be appended in a
single append, and so is likely to be in a single ResourceItem.

Differential Revision: https://phabricator.services.mozilla.com/D33877

--HG--
extra : moz-landing-system : lando
2019-06-11 07:38:16 +00:00
Chris Pearce 693e4dc1c7 Bug 1554075 - Make ResourceQueue::GetOffsetAt() log(n). r=jya
The demuxer's low level byte reading abstraction is ResourceQueue::CopyData(),
but that's doing a linear scan through its list of ResourceItems in
GetOffsetAt() in order to find the ResourceItem in which the data to be read
lies. This sometimes shows up at the bottom of call stacks.

We could make this faster by doing a bisection search to find the ResourceItem
we need.

Differential Revision: https://phabricator.services.mozilla.com/D33871

--HG--
extra : moz-landing-system : lando
2019-06-11 07:36:58 +00:00
Oana Pop Rus 9fdfa8a955 Backed out 9 changesets (bug 1554075) for reftest failures in Intervals.h and MP4Interval.h on a CLOSED TREE
Backed out changeset d5543a60f833 (bug 1554075)
Backed out changeset 1ea15f85c789 (bug 1554075)
Backed out changeset a76688ee5b8a (bug 1554075)
Backed out changeset 85482315a53c (bug 1554075)
Backed out changeset c3f3e9e00279 (bug 1554075)
Backed out changeset ac24ec2e0349 (bug 1554075)
Backed out changeset b04fc8b0c07a (bug 1554075)
Backed out changeset 2cce329d894d (bug 1554075)
Backed out changeset 347b7b4eaab1 (bug 1554075)
2019-06-11 09:52:43 +03:00
Chris Pearce cfee488773 Bug 1554075 - Allow direct access of source buffer's data from demuxer, eliminating most copies. r=jya
A lot of the overhead in MoofParser::RebuildFragmentedIndex(BoxContext&) is
copying data into the BoxReader's storage. In the MSE case the underlying data
being read is actually buffered in memory, so we may be able to just read the
in-memory data directly, avoiding the copy.

Note that the data may not be stored in a single contiguous ResourceItem in the
SourceBufferResource's ResourQueue. If so, it's not as straightforward to hand
out a uint8_t* to the underlying data. So we just copy it in that case for
simplicity. In most cases, the data in a single MP4 box would be appended in a
single append, and so is likely to be in a single ResourceItem.

Differential Revision: https://phabricator.services.mozilla.com/D33877

--HG--
extra : moz-landing-system : lando
2019-06-11 05:10:20 +00:00
Chris Pearce ae72274a24 Bug 1554075 - Make ResourceQueue::GetOffsetAt() log(n). r=jya
The demuxer's low level byte reading abstraction is ResourceQueue::CopyData(),
but that's doing a linear scan through its list of ResourceItems in
GetOffsetAt() in order to find the ResourceItem in which the data to be read
lies. This sometimes shows up at the bottom of call stacks.

We could make this faster by doing a bisection search to find the ResourceItem
we need.

Differential Revision: https://phabricator.services.mozilla.com/D33871

--HG--
extra : moz-landing-system : lando
2019-06-11 05:09:01 +00:00
Andrea Marchesini f4c9f068fa Bug 1554847 - Improve cross-origin checks in canvas API - consider intermediate redirects, r=jya
Differential Revision: https://phabricator.services.mozilla.com/D32792

--HG--
extra : moz-landing-system : lando
2019-06-04 06:32:37 +00:00
Coroiu Cristina 73edc6621b Backed out 4 changesets (bug 1554847) for wpt failures at /service-workers/service-worker/fetch-canvas-tainting-video-cache.https.html
Backed out changeset 17e36d139ac2 (bug 1554847)
Backed out changeset 101bd1c2d688 (bug 1554847)
Backed out changeset 3ff9a221f3e5 (bug 1554847)
Backed out changeset 946e4d9420dd (bug 1554847)
2019-06-04 03:24:42 +03:00
Andrea Marchesini 8df66534cf Bug 1554847 - Improve cross-origin checks in canvas API - consider intermediate redirects, r=jya
Differential Revision: https://phabricator.services.mozilla.com/D32792

--HG--
extra : moz-landing-system : lando
2019-06-03 09:54:43 +00:00
Tarek Ziadé c48befbb9c Bug 1542674 - Make Media debug info machine parsable r=padenot,smaug,jya
This patch structurizes the media debug information via webidl dictionaries
that are returned by HTMLMediaElement::GetMozRequestDebugInfo() and
MediaSource::GetMozDebugReaderData().

Differential Revision: https://phabricator.services.mozilla.com/D27893

--HG--
extra : moz-landing-system : lando
2019-05-27 16:15:33 +00:00
shindli 9134ad98fa Backed out changeset c386ebfd9c6b (bug 1542674) as per tarek's request on IRC 2019-05-07 15:07:27 +03:00
Tarek Ziadé 446d5cdff7 Bug 1542674 - Make Media debug info machine parsable r=padenot,smaug
This patch structurizes the media debug information via webidl dictionaries
that are returned by HTMLMediaElement::GetMozRequestDebugInfo() and
MediaSource::GetMozDebugReaderData().

Differential Revision: https://phabricator.services.mozilla.com/D27893

--HG--
extra : moz-landing-system : lando
2019-05-06 16:39:58 +00:00
Brian Grinstead 0d460e3432 Bug 1544322 - Part 2.2 - Remove the [type] attribute for one-liner <script> tags loading files in /tests/SimpleTest/ in dom/ r=bzbarsky
This is split from the previous changeset since if we include dom/ the file size is too
large for phabricator to handle.

This is an autogenerated commit to handle scripts loading mochitest harness files, in
the simple case where the script src is on the same line as the tag.

This was generated with https://bug1544322.bmoattachments.org/attachment.cgi?id=9058170
using the `--part 2` argument.

Differential Revision: https://phabricator.services.mozilla.com/D27457

--HG--
extra : moz-landing-system : lando
2019-04-16 03:53:28 +00:00
Chris Pearce 8a1a29f279 Bug 1543669 - Disable test_isTypeSupported on android_version >= 28. r=jya
Disable test_isTypeSupported on android version >= 28 (Android 9.0) since our
infra there doesn't support cross origins there, at least until bug 1335740
is resolved.

Differential Revision: https://phabricator.services.mozilla.com/D27215

--HG--
extra : moz-landing-system : lando
2019-04-12 03:32:39 +00:00
Chris Pearce f1b4ef2942 Bug 1533129 - Add extended MIME parameter support to MediaSource.isTypeSupported on YouTube only. r=jya
YouTube.com/tv uses YouTube specific extensions to MediaSource.isTypeSupported
in order to determine whether it serves 4K. It checks with bogus values, and if
we reject the bogus values, it assumes we're responding truthfully to the other
queries. So add support to reject the bogus values on YouTube.com.

With this patch, we can play 4K on YouTube.com/tv.

Differential Revision: https://phabricator.services.mozilla.com/D26655

--HG--
extra : moz-landing-system : lando
2019-04-11 09:53:26 +00:00
shindli ab80016442 Backed out changeset e80a847a8b9b (bug 1533129) for causing perma mda failures in dom/media/mediasource/test/test_isTypeSupportedExtensions.html
--HG--
extra : rebase_source : 434f35ad3363c0c59eea03858f045d122cc3f114
2019-04-10 06:35:39 +03:00
Chris Pearce 2d1f469cd2 Bug 1533129 - Add extended MIME parameter support to MediaSource.isTypeSupported on YouTube only. r=jya
YouTube.com/tv uses YouTube specific extensions to MediaSource.isTypeSupported
in order to determine whether it serves 4K. It checks with bogus values, and if
we reject the bogus values, it assumes we're responding truthfully to the other
queries. So add support to reject the bogus values on YouTube.com.

With this patch, we can play 4K on YouTube.com/tv.

Differential Revision: https://phabricator.services.mozilla.com/D26655

--HG--
extra : moz-landing-system : lando
2019-04-09 23:23:35 +00:00
Sylvestre Ledru 03fc65347c Bug 1542146 - Apply the change with the option StatementMacros from clang-format-8 r=andi
# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D26280

--HG--
extra : moz-landing-system : lando
2019-04-05 21:42:17 +00:00
Sylvestre Ledru 03c8e8c2dd Bug 1519636 - clang-format-8: Reformat recent changes to the Google coding style r=Ehsan
clang-format-8 upstream had some improvements wrt macros
See: https://reviews.llvm.org/D33440
This is why the diff is bigger than usual

# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D26098

--HG--
extra : moz-landing-system : lando
2019-04-05 21:41:42 +00:00
Csoregi Natalia ba58e936bd Backed out changeset 4ad80127f89f (bug 1519636) for bustage on MarkupMap.h and nsAccessibilityService.cpp. CLOSED TREE 2019-04-05 09:48:19 +03:00
Sylvestre Ledru d1c1878603 Bug 1519636 - clang-format-8: Reformat recent changes to the Google coding style r=Ehsan
clang-format-8 upstream had some improvements wrt macros
See: https://reviews.llvm.org/D33440
This is why the diff is bigger than usual

# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D26098

--HG--
extra : moz-landing-system : lando
2019-04-04 21:36:16 +00:00
Narcis Beleuzu 24dbe577a5 Backed out changeset 389b6bbd76db (bug 1519636) for bustages on MarkupMap.h . CLOSED TREE 2019-04-05 00:27:56 +03:00
Sylvestre Ledru 399dbd28fe Bug 1519636 - clang-format-8: Reformat recent changes to the Google coding style r=Ehsan
clang-format-8 upstream had some improvements wrt macros
See: https://reviews.llvm.org/D33440
This is why the diff is bigger than usual

# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D26098

--HG--
extra : moz-landing-system : lando
2019-04-04 20:12:23 +00:00
Edwin Gao d5df057c37 Bug 1538359, 1538331, 1538360 - disable mochitest-media tests that fail intermittently or permanently on windows10-aarch64 r=jmaher
Disabled the following for windows10-aarch64:
- test_getUserMedia_audioCapture
- test_AudioChange_mp4.html
- test_bug1255618.html
- test_singleSourceDest
- test_mediaElementAudioSourceNodeFidelity
- test_maxChannelCount
- test_abort
- test_audio_capture_error
- test_call_start_from_end_handler
- test_recognition_service_error
- test_success_without_recognition_service
- test_ExperimentalAsync
- test_peerConnection_restartIceNoBundle.html

All of these tests tend to fail on the first run of the push, then pass on the retry run.

Differential Revision: https://phabricator.services.mozilla.com/D24569

--HG--
extra : moz-landing-system : lando
2019-03-23 09:51:09 +00:00
Edwin Gao 0e56d58992 Bug 1536604 - disable manifest dom/media/test/mochitest.ini r=jmaher
Disable the following:

- test_MediaSource_flac_mp4 (keeps getting missed somehow)
- dom/media/test/mochitest.ini

Disabling the entire `dom/media/test/mochitest.ini` manifest file does have collateral damage in that it disables tests that are running fine; the alternative is to disable only the EME tests, but the failure count numbers somewhere close to 50.

Differential Revision: https://phabricator.services.mozilla.com/D24094

--HG--
extra : moz-landing-system : lando
2019-03-19 22:54:34 +00:00
Jean-Yves Avenard 8ed165824c Bug 1535493 - [MSE] Lower HAVE_ENOUGH_DATA threshold to 3s. r=pehrsons
Differential Revision: https://phabricator.services.mozilla.com/D23658

--HG--
extra : moz-landing-system : lando
2019-03-15 12:34:07 +00:00
Ryan Hunt 00e98538aa Bug 1523969 part 6 - Move method definition inline comments to new line in 'dom/'. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D21106

--HG--
extra : rebase_source : ea3f51c2c11247114deccbc86e90fb02b8a97257
2019-02-25 16:05:29 -06:00
Jean-Yves Avenard fc260afed4 Bug 1531201 - Don't assume all frames' time is greater than 0. r=gerald
We now allow frames to have a negative time (so that they can be decoded and trimmed).

Differential Revision: https://phabricator.services.mozilla.com/D21474

--HG--
extra : moz-landing-system : lando
2019-02-28 02:34:04 +00:00
Dorel Luca b4b7dc9290 Bug 1487973 - Disabled dom/media/mediasource/test/test_FrameSelection_mp4.html on windows for frequently faling r=jmaher
Differential Revision: https://phabricator.services.mozilla.com/D21328

--HG--
extra : moz-landing-system : lando
2019-02-27 10:38:49 +00:00
Jean-Yves Avenard 0fe17b9323 Bug 1530234 - P1. Ignore init segment for audio only buffer if audio content didn't change. r=bryce
This prevents re-creating a new audio decoder which on Android can take an awful long time.

Differential Revision: https://phabricator.services.mozilla.com/D20969

--HG--
extra : moz-landing-system : lando
2019-02-27 14:34:15 +00:00
Jean-Yves Avenard 916342f7c5 Bug 1222851 - Keep the one dropped frame prior the first one to prime the decoder. r=bryce
Some audio decoders, such as AAC and Opus have a need for a pre-roll content. As such, in order to be able to fully get the content of the first frame we keep the frame just prior that would have normally been dropped.

We set this frame to have a duration of 1us so that it will be dropped later by the decoding pipeline. The starting time of the first frame is adjusted so that we have continuous data, without gap in the buffered range.

Differential Revision: https://phabricator.services.mozilla.com/D20322

--HG--
extra : moz-landing-system : lando
2019-02-22 09:58:18 +00:00
Jean-Yves Avenard ffc1352b1f Bug 1524890 - P16. Fix mochitests. r=bryce
Differential Revision: https://phabricator.services.mozilla.com/D20330

--HG--
extra : moz-landing-system : lando
2019-02-22 09:21:13 +00:00
Jean-Yves Avenard 5569ae1a9c Bug 1524890 - P15. [MSE] Add extra logging. r=bryce
Differential Revision: https://phabricator.services.mozilla.com/D20321

--HG--
extra : moz-landing-system : lando
2019-02-22 09:21:11 +00:00
Jean-Yves Avenard 68176b56c7 Bug 1524890 - P13. [MSE] Mark frames as truncated when needed. r=bryce
There's two cases to handle.
1- A Frame isn't entirely contained between appendWindowStart and appendWindowEnd
2- A new frame is appended which overlaps partially an existing frame.

To achieve this we tweak the start time and duration of the sample added (case 1), or the frame about to be partially covered (case 2). We then set a flag that will indicate to the decoder that the decompressed frame will have to be truncated.

Differential Revision: https://phabricator.services.mozilla.com/D20172

--HG--
extra : moz-landing-system : lando
2019-02-22 09:21:05 +00:00
Cosmin Sabou 37e54dc3ca Bug 1516754 - Fix eslint failure. r=eslint-fix 2019-02-06 06:53:12 +02:00
Jean-Yves Avenard d3949f6fee Bug 1516754 - P2. Add mochitest. r=drno
Check that we can resume after appening a partial media segment header and calling abort().

Depends on D18651

Differential Revision: https://phabricator.services.mozilla.com/D18762

--HG--
extra : moz-landing-system : lando
2019-02-06 02:08:06 +00:00
Jean-Yves Avenard 6e021f1b1f Bug 1516754 - P1. Reset Pending Input Buffer during Reset Parser State Algorithm. r=kinetik
Differential Revision: https://phabricator.services.mozilla.com/D18651

--HG--
extra : moz-landing-system : lando
2019-02-06 00:30:35 +00:00
Jean-Yves Avenard 864ca81cfc Bug 1524500 - P2. Simplify logic to break loop early. r=bryce
The logic was redundant with the next step that will already remove all until the next keyframe.

Depends on D18321

Differential Revision: https://phabricator.services.mozilla.com/D18322

--HG--
extra : moz-landing-system : lando
2019-02-01 17:45:38 +00:00
Jean-Yves Avenard 8701ff5245 Bug 1524500 - P1. Remove partial frames when the starting time falls within the removal interval. r=bryce
Per spec:
https://w3c.github.io/media-source/#sourcebuffer-coded-frame-removal
Step 3 of the Coded Frame Removal Interval:
"Remove all media data, from this track buffer, that contain starting timestamps greater than or equal to start and less than the remove end timestamp. "

So to decide if a frame should be removed from a track buffer, its start time is the only information to be used.

Differential Revision: https://phabricator.services.mozilla.com/D18321

--HG--
extra : moz-landing-system : lando
2019-02-01 22:58:08 +00:00
Bryce Van Dyk 4f095e63a3 Bug 1523683 - Use mozilla::Variant to select if the MoofParser should parse a single track or multiple. r=jya
Using a variant more clearly indicates how MoofParser works: you cannot request
a specific track id and to parse all tracks. Callers must now explicitly select
one or the other.

Differential Revision: https://phabricator.services.mozilla.com/D18135

--HG--
extra : moz-landing-system : lando
2019-02-01 21:34:37 +00:00
Myk Melez 25349d2601 Bug 1518283 - prohibit blank lines at the beginning and end of blocks (eslint padded-blocks) r=mossop,Standard8
Differential Revision: https://phabricator.services.mozilla.com/D17526

--HG--
extra : moz-landing-system : lando
2019-01-30 17:26:25 +00:00
Ehsan Akhgari e5e885ae31 Bug 1521000 - Part 2: Adjust our clang-format rules to include spaces after the hash for nested preprocessor directives r=sylvestre
# ignore-this-changeset

--HG--
extra : amend_source : 7221c8d15a765df71171099468e7c7faa648f37c
extra : histedit_source : a0cce6015636202bff09e35a13f72e03257a7695
2019-01-18 10:16:18 +01:00
Bryce Van Dyk 279e7ee239 Bug 1519617 - Update MoofParser to handle tracks using track_id 0. r=jya
Using track_id 0 is forbidden by the mp4 spec, however, some sites still serve
media using this track_id. We've been using the 0 track ID to trigger special
handling in the MoofParser where we will parse multiple tracks, and this led us
to be tolerant of tracks using this reserved id (though we likely had some bugs
due to this).

Since sites are using this track_id, and as other browsers (and Firefox until I
broke this) tolerate such media, we should too. In order to do so correctly, we
should no longer us track_id=0 as a special case in the MoofParser, and instead
have an explicit flag, which is what this patch does.

Differential Revision: https://phabricator.services.mozilla.com/D16428

--HG--
extra : moz-landing-system : lando
2019-01-16 11:45:42 +00:00
Cosmin Sabou 2522f5281a Backed out changeset dad40f23f4c1 (bug 1519617) for breaking Soundcloud. a=backout 2019-01-15 12:38:06 +02:00
Bryce Van Dyk 5c977fdb7d Bug 1519617 - Update MoofParser to handle tracks using track_id 0. r=jya
Using track_id 0 is forbidden by the mp4 spec, however, some sites still serve
media using this track_id. We've been using the 0 track ID to trigger special
handling in the MoofParser where we will parse multiple tracks, and this led us
to be tolerant of tracks using this reserved id (though we likely had some bugs
due to this).

Since sites are using this track_id, and as other browsers (and Firefox until I
broke this) tolerate such media, we should too. In order to do so correctly, we
should no longer us track_id=0 as a special case in the MoofParser, and instead
have an explicit flag, which is what this patch does.

Differential Revision: https://phabricator.services.mozilla.com/D16428

--HG--
extra : moz-landing-system : lando
2019-01-14 16:33:03 +00:00
Sylvestre Ledru 804b8b8883 Bug 1204606 - Reformat of dom/media r=jya
# skip-blame

Differential Revision: https://phabricator.services.mozilla.com/D12251

--HG--
extra : moz-landing-system : lando
2018-11-19 13:25:37 +00:00
Jean-Yves Avenard 6ba9a04554 Bug 1505910 - P2. Remove use of AsTaskQueue(). r=cpearce
Make IsCurrentThreadIn() const.

Depends on D11491

Differential Revision: https://phabricator.services.mozilla.com/D11492

--HG--
extra : moz-landing-system : lando
2018-11-12 01:09:03 +00:00
Julian Descottes 2fcd6cb020 Bug 1499096 - Update tests using ok() to is();r=Standard8
This changeset updates all the test that were wrongly using ok() and wanted to
use is() AND for which the assert is still passing without any modification
required.

Differential Revision: https://phabricator.services.mozilla.com/D8739

--HG--
extra : moz-landing-system : lando
2018-10-23 07:12:23 +00:00
Mark Banner ceaeb93550 Bug 1486741 - Enable ESLint rule comma-dangle for all of mozilla-central (automatic fixes). r=mossop
Differential Revision: https://phabricator.services.mozilla.com/D8389

--HG--
extra : moz-landing-system : lando
2018-10-19 12:55:39 +00:00
Cosmin Sabou d41320ad98 Bug 1495167 - Disable dom/media/mediasource/test/test_WaitingToEndedTransition_mp4.html on Linux for frequent failures. r=jmaher 2018-10-16 04:34:00 +03:00
Chris Peterson b5ad48a759 Bug 1336712 - dom/media: Remove test checks for Android GB (API Level 15). r=RyanVM
Differential Revision: https://phabricator.services.mozilla.com/D6583

--HG--
extra : source : 8d277a0ad4e4314054b30b644c7b972ff74e7744
extra : histedit_source : 51f5fc31952641c4df66a6a1eb2a958d52997e8c
2018-09-15 00:12:47 -07:00
Jan-Ivar Bruaroey 4dc294148a Bug 1487431 - Fix typo in mediasource test_FrameSelection_mp4.html to make last two tests work. r=bryce
Differential Revision: https://phabricator.services.mozilla.com/D4798

--HG--
extra : moz-landing-system : lando
2018-08-31 20:38:59 +00:00
Jean-Yves Avenard b66c9b2ac1 Bug 1481166 - Enable SourceBuffer.changeType by default. r=bzbarsky
Differential Revision: https://phabricator.services.mozilla.com/D2770
2018-08-07 22:46:14 +02:00
Jean-Yves Avenard 5e17996c2a Bug 1481397 - P1. Properly recalculate highest start timestamp when samples are removed. r=bryce
Summary: When removing frames from the trackbuffer we may remove frames outside the original removal interval as we must remove all frames depending on the removed frames.

Differential Revision: https://phabricator.services.mozilla.com/D2837
2018-08-07 22:46:14 +02:00
Jean-Yves Avenard d7eb320e7a Bug 1476975 - P3. Fix canPlayType/isTypeSupported for AV1 content. r=dminor
AV1 support is behind a pref, as such, the result of canPlayType should depends on the value of that pref.

Additionally to this change we remove AOMDecoder::IsSupportedCodec as it implied confusion on what a codec mimetype is. There are two type of codec mimetype: the one describing the container content ("av1") and the one describing the codec itself "video/av1")
AOMDecoder shouldn't know anything about containers (e.g. mp4 or webm)

--HG--
extra : rebase_source : 72ebe662f76fb6c9d8be1f753890601aac440061
2018-07-20 10:24:56 +02:00
Noemi Erli 76fe049448 Backed out 3 changesets (bug 1476975) for mochitest failures on test_can_play_type_webm.html
Backed out changeset 91585d095420 (bug 1476975)
Backed out changeset 798f4894ffd5 (bug 1476975)
Backed out changeset b5377ceef34f (bug 1476975)
2018-07-20 21:27:01 +03:00
Jean-Yves Avenard 4d4b32ccf8 Bug 1476975 - P3. Fix canPlayType/isTypeSupported for AV1 content. r=dminor
AV1 support is behind a pref, as such, the result of canPlayType should depends on the value of that pref.

Additionally to this change we remove AOMDecoder::IsSupportedCodec as it implied confusion on what a codec mimetype is. There are two type of codec mimetype: the one describing the container content ("av1") and the one describing the codec itself "video/av1")
AOMDecoder shouldn't know anything about containers (e.g. mp4 or webm)
2018-07-20 19:04:46 +02:00
Jean-Yves Avenard a867c82f1e Bug 1409664 - P27. Don't disable webm container for MSE::isTypeSupported when MediaCapabilities is enabled. r=bryce
Summary:
MediaCapabilities provide a finer detail on VP9 being supported or not. YouTube will use that information to determine which resolutions to support when using VP9

Depends on D1772

Reviewers: bryce

Tags: #secure-revision

Bug #: 1409664

Differential Revision: https://phabricator.services.mozilla.com/D1794
2018-07-03 11:45:27 -07:00
Jean-Yves Avenard d586f6f943 Bug 1409664 - P9. Remove AutoTaskQueue and its use r=bryce
Summary:
TaskQueue no longer requires an explicit call to BeginShutdown() as such we no longer have a need for AutoTaskQueue.

Depends on D1621

Tags: #secure-revision

Bug #: 1409664

Differential Revision: https://phabricator.services.mozilla.com/D1622
2018-07-03 11:45:19 -07:00
Bryce Van Dyk 7928956283 Bug 1450952 - If TrackBuffersManager is sent the same init segment, reuse same StreamID. r=jya
Some MSE streams will resend the same init segment. In these cases we can treat
the following data as belonging to the already existing stream. We do this by
reusing the same stream id. This stops us tearing down and restarting decoders
in these cases.  This has the benefit of stopping us introducing gaps to audio
and/or video.

Differential Revision: https://phabricator.services.mozilla.com/D1837

--HG--
extra : moz-landing-system : lando
2018-06-29 07:33:23 +00:00
Jeff Gilbert 5b753da289 Bug 1470325 - s/FooBinding/Foo_Binding/g - r=qdot
MozReview-Commit-ID: JtTcLL5OPF0
2018-06-26 17:05:01 -07:00
Jean-Yves Avenard 507a82e41c Bug 1470944 - Don't attempt to create a new demuxer upon changeType call r=bryce
Re-creating a new demuxer is fine, provided that the SourceBufferResource exists. However, a resource is only created upon receiving an init segment.

The segment following a call to changeType() must be an init segment, will let the demuxer creation occurs there.

Differential Revision: https://phabricator.services.mozilla.com/D1812
2018-06-25 19:13:13 +00:00
Jean-Yves Avenard 9ae6b235d5 Bug 1470814 - Update SourceBuffer.changeType behaviour. r=bryce
Follow current WICG https://github.com/WICG/media-source/tree/codec-switching as of revision f2ed457

The difference with the current spec can be seen with:
https://services.w3.org/htmldiff?doc1=https%3A%2F%2Fraw.githubusercontent.com%2FWICG%2Fmedia-source%2F9bb87ae9566f0db3d646b648e7370bdac97349ae%2Findex.html&doc2=https%3A%2F%2Fraw.githubusercontent.com%2FWICG%2Fmedia-source%2Fcodec-switching%2Findex.html

Differential Revision: https://phabricator.services.mozilla.com/D1810
2018-06-25 19:07:16 +00:00
Jean-Yves Avenard 1597386a00 Bug 1466606 - P2. Re-use code to determine NextGetSample index. r=bryce
Previous commit added SetNextGetSampleIndexIfNeeded, let's re-use it for GetSample.
We continue to have an exception code as it caters for the most common code path, which is we retrieve one sample after the other.

MozReview-Commit-ID: HOQ53qwZj7w

--HG--
extra : rebase_source : cc9bc0b41a7085d28554f7ed764a18decfea327d
2018-06-06 21:47:52 +02:00
Jean-Yves Avenard 3da25ab8e6 Bug 1466606 - P1. Calculate the current GetSample index when needed. r=bryce
The assumption that when calling GetNextRandomAccessPoint the next GetSample index would always be known was incorrect. It assumed that the call to GetNextRandomAccessPoint would always be preceded by a call to GetSample.
This is not always how the MediaSourceDemuxer called it.

MozReview-Commit-ID: H1MyPpDEytk

--HG--
extra : rebase_source : 07f70ee87ae5084016a094c564382090a3045e94
2018-06-06 15:14:24 +02:00
Jean-Yves Avenard b48f26ad93 Bug 1466606 - Revert "Add diagnostic code.". r=bryce
This reverts commit 4c1f90791492fc441cc600f66ff2d36c7910e905

MozReview-Commit-ID: KbMWKE08vT8

--HG--
extra : rebase_source : c3db78ddf82684475a63acd75de0180a9c66b6cb
2018-06-06 14:12:25 +02:00
Jan-Ivar Bruaroey 9d549a104e Bug 1467018 - Remove callback argument from fetchWithXHR() and once() helpers. r=bryce
MozReview-Commit-ID: DJDqKN9Opn3

--HG--
extra : rebase_source : c5dd2175398c3f5c9e5a3d6c8fb3e8868be4ce19
2018-05-25 11:25:45 -04:00
Jean-Yves Avenard 37ecd2740d Bug 1466606 - Add diagnostic code. r=bryce
Temporary diagnostic code to help determine what the problem might be.

MozReview-Commit-ID: D5Dm32aZ1Ia

--HG--
extra : rebase_source : ba0955c2b880823986277919f05a32e9095b14fa
2018-06-05 13:48:59 +02:00
Emilio Cobos Álvarez fffb25b74f Bug 1465585: Switch from mozilla::Move to std::move. r=froydnj
This was done automatically replacing:

  s/mozilla::Move/std::move/
  s/ Move(/ std::move(/
  s/(Move(/(std::move(/

Removing the 'using mozilla::Move;' lines.

And then with a few manual fixups, see the bug for the split series..

MozReview-Commit-ID: Jxze3adipUh
2018-06-01 10:45:27 +02:00
Bryce Van Dyk c9d6056854 Bug 1465409 - Change lint rules for mediasource tests to prefer no spaces for array notation. r=jya
Change rules so we enforce ["foo", "bar"] rather than [ "foo", "bar" ].

MozReview-Commit-ID: KX6wJd8jmeJ

--HG--
extra : rebase_source : 6800cf4e701a33f246418e0deb35a206af8104f4
2018-05-30 08:18:54 -04:00
Jan-Ivar Bruaroey 4439872dc0 Bug 1462990 - Use async/await in mediasource mochitests r=bryce
MozReview-Commit-ID: AIr8CLyuGb7

--HG--
extra : rebase_source : 2136b7faccc24da6b163b0edf908a198136a7638
2018-05-21 16:40:13 -04:00
Jan-Ivar Bruaroey 5017b2c432 Bug 1462990 - Use async/await in mediasource/test/mediasource.js r=bryce,jya
MozReview-Commit-ID: BnQ30DnY4mB

--HG--
extra : rebase_source : fd89494f1f5946a9b8505456ab9761d3cc1914fa
2018-05-18 10:26:11 -04:00
Jean-Yves Avenard aa3feebecc Bug 1451149 - P2. Don't fire the "stalled" event when using MSE. r=bryce
When using a media element with a Media Source, the resource fetching algorithm is to be called in "local" mode:
https://www.w3.org/TR/media-source/#mediasource-attach
"Continue the resource fetch algorithm by running the remaining "Otherwise (mode is local)" steps, with these clarifications"

https://html.spec.whatwg.org/multipage/media.html#concept-media-load-resource
Under the local mode, the steps that would cause the element to fire suspend, stalled or progress can never occur.
We only prevent the stalled event to be fired, many websites rely on the progress event to be fired (such as when the init segment has been parsed). The HTML5 media spec will be amended to clearly indicate that progress is to be fired even with mediasource

MozReview-Commit-ID: DkoQzoV0JzO

--HG--
extra : rebase_source : 1e916eee50c9935f168797bb5a92052191cda59d
2018-05-14 11:32:09 +02:00
Bryce Van Dyk d74241d1f7 Bug 1461785 - Update dom/media/mediasource/test to abide eslint rules, add .eslintrc.js. r=jya,standard8
Add .eslintrc.js to configure globals from mediasource.js and to add extra
rules to encourage use of let and const over var.

Linting changes:
- Prefer const and let to var. This provides tighter scoping and avoids
  reassignment.
- Mozilla rules do not allow for shadowing of variables, so several tests have
  had promise lists renamed to avoid this.
- Numerous minor fixes to formatting including using double quotes, spacing,
  missing semicolons.
- Remove some unused variables.
- Arrays have spaces after opening braces and before closing braces, e.g.
  [ "foo" ], this is to be consistent with our clang-format rules.
- Fix naming of resourcePathSeen in test_MediaSource_memory_reporting.html.

MozReview-Commit-ID: 5q6oS7EWLTk

--HG--
extra : rebase_source : 9b67b294f338ca9205b52fded3af63e6c3ac9a5a
2018-05-14 10:08:59 -04:00
Jean-Yves Avenard 559fa1a1f2 Bug 1280613 - P3. Mochitests. r=bryce
MozReview-Commit-ID: 5FIe9qfNZWd

--HG--
extra : rebase_source : b8f0a01abeba4dc4356f933a29ed0595fc9884c4
2018-05-11 09:01:25 +02:00
Jean-Yves Avenard 756284d1ab Bug 1280613 - P2. Add experimental SourceBuffer.removeAsync. r=bz
The aim of those changes is to be incubated in the WICG.

MozReview-Commit-ID: K93xiTod6tw

--HG--
extra : rebase_source : 788122a69b6cab96bab9c2ae6e8cdf7c61d4ed07
2018-05-11 04:07:24 +02:00
Jean-Yves Avenard 6039ae5766 Bug 1280613 - P1. Add experimental SourceBuffer.appendBufferAsync. r=bz
The aim of those changes is to be incubated in the WICG.

MozReview-Commit-ID: 5wEUnWz8i7kBug 1280613

--HG--
extra : rebase_source : 4360d2c34025bf3c87fff49f0e2aa01975fff15b
2018-05-11 03:56:50 +02:00
Jean-Yves Avenard 97cad9b3dd Bug 1456743 - P4. Actual implementation of SourceBuffer.changeType. r=bryce
Currently, the new init segment provided following a call to changeType() must contain the same number of audio and video tracks as previously.

The Chrome team has indicated concerns in regards to this restriction. TBD.

MozReview-Commit-ID: 3S6YVtQILF9

--HG--
extra : rebase_source : 59574301d8d4b6f04fc40a97a0917222f1d42fe4
2018-04-30 19:16:31 +02:00
Jean-Yves Avenard 5616b876de Bug 1456743 - P3. Add SourceBuffer.changeType experimental method. r=bryce,bz
Non functional code.

SourceBuffer.changeType allows to reconfigure a sourceBuffer so that a new codec type or new container format can be fed later.

The new code is placed behind the media.mediasource.experimental.enabled pref.

MozReview-Commit-ID: 5wj6J4uzLbA

--HG--
extra : rebase_source : b6f57246e0a4c856f6365bb0c8ec8d759a770105
2018-04-30 19:13:15 +02:00
Jean-Yves Avenard e3a0fefdd0 Bug 1456743 - P1. Create mochitest for new SourceBuffer::changeType. r=bryce
MozReview-Commit-ID: 6X8rVMhVY98

--HG--
extra : rebase_source : 52acce9508ce98c43eef6a7500355fa2465c5fe7
2018-04-30 18:59:34 +02:00
Nicholas Nethercote 51f2b494ea Bug 1448222 - Remove MediaPrefs. r=jya
This patch converts all the prefs in MediaPrefs to the new StaticPrefs system.

Note that the "media.wmf.skip-blacklist" pref was present in both MediaPrefs
and gfxPrefs. The copy in MediaPrefs was never used; this explains why this
patch does not add an entry for it to StaticPrefList.h.

Note also that the patch removes themedia.rust.mp4parser pref, because it's
unused.

MozReview-Commit-ID: IfHP37NbIjY

--HG--
extra : rebase_source : df84ea813b7c366d7be663c696891325610149c8
2018-03-20 09:48:56 +11:00
Videet 01ad0f3438 Bug 547707: replaced hardcoded strings by definitions in nsMimeTypes.h r=gerald
MozReview-Commit-ID: 6f85pRUe8Tg

--HG--
extra : rebase_source : f41797530bf9211f3fe875a5da860132f5bd2c7c
2018-03-06 17:43:57 +01:00
Miko Mynttinen 280cf13e36 Bug 1441779 - Part 1: Change nsTArray<SourceBufferTask> to nsTArray<RefPtr<SourceBufferTask>> r=gerald
MozReview-Commit-ID: 8lV4Pp9p7Ch

--HG--
extra : rebase_source : b149b6ed15f88b9ee8af8ec553a57a8ccec3dafd
2018-03-01 11:55:18 +01:00
JW Wang d201fcefe3 Bug 1427931. P1 - remove MediaDecoder::PinForSeek/UnpinForSeek. r=bechen,gerald
PinForSeek() is called only when playback reaches the end. In other words,
it is not called for most cases of seeking. It should be OK not to call it at
all during seeking.

MozReview-Commit-ID: 1xXX1321bO7

--HG--
extra : rebase_source : df8ba3f59da2a337b456546af4b54abaddfe38a9
extra : intermediate-source : 0a70419f9ce639ac0784a0632db4598d6be511f8
extra : source : bfddad9b922386c91fcfa7657a7ac274991d15f4
2017-12-19 17:56:52 +08:00
JW Wang 79b5f2dd2e Bug 1425996 - fix build error: unused variable 'rv'. r=gerald
MozReview-Commit-ID: 7MhsSWbxB3z

--HG--
extra : rebase_source : 81207a1e5b663314295f2f95afd4b726ffe8f12d
2017-12-21 12:12:42 +08:00
Jean-Yves Avenard b8cd152890 Bug 1425904 - Make the monitor refcounted. r=gerald
To prevent another heap allocation, we re-use the TaskQueue internal monitor.
As a TaskQueue is refcounted, and the MozPromise::Then() holds a reference to the taskqueue, it ensures that the monitor isn't immediately destroyed when Await() execution unwinds.
Instead it will live until either the lambda or Await() completes, whichever comes last.

MozReview-Commit-ID: EeG6LLAiiyp

--HG--
extra : rebase_source : c5872733c0444737682632dd10d8844c44c4d429
2017-12-19 11:11:23 +01:00
Jean-Yves Avenard 998881b06e Bug 1404997 - P24. Make AutoTaskQueue deliver runnables to nsIEventTarget. r=gerald
Similar to bug 1300118 for TaskQueue.

MozReview-Commit-ID: 8jIifvs2r4U

--HG--
extra : rebase_source : f1c8ab791fa853c4d69cfb8791a418654a5d4142
2017-12-15 18:14:02 +01:00
Jean-Yves Avenard ec469fdddc Bug 1425608 - Don't delete AutoTaskQueue::mTaskQueue on the main thread. r=gerald
MozReview-Commit-ID: I2R4OYB0Jyc

--HG--
extra : rebase_source : 1b8c1caffef91b5888b04b336bd20a74df6711a1
2017-12-16 00:46:49 +01:00
JW Wang 4b584fc48b Bug 1424973. P2 - remove unused MediaDecoder::IsLiveStream() and friends. r=bechen,gerald
MozReview-Commit-ID: Hf3QAFoq97x

--HG--
extra : rebase_source : 0cbfaaec37dea3ab0ab4ad0622bae8056e383ec0
extra : intermediate-source : b591e2e854d0c480f889aa6ebe87f4892ffc0cdc
extra : source : 13db1fcd03825077382e41235c02d1f8ecc5edf2
2017-12-06 16:24:31 +08:00
JW Wang bb45ff010e Bug 1424973. P1 - propagate 'IsLiveStream' changes to MDSM in MediaDecoder subclasses. r=bechen,gerald
MozReview-Commit-ID: 8wSZf7pRERP

--HG--
extra : rebase_source : c2bea725064f5ad2e1cd1de1b8b9c19994bad89b
extra : intermediate-source : 54da627350d8a6276f9ad5d14a7191cb05957901
extra : source : dc582401401272df3150fb639bdf0ad05d749a06
2017-12-06 16:00:20 +08:00
Sylvestre Ledru 9bfe27d903 Bug 1394734 - Replace CONFIG['GNU_C*'] by CONFIG['CC_TYPE'] r=glandium
MozReview-Commit-ID: 7duJk2gSd4m

--HG--
extra : rebase_source : 7312fe276e561e8c034a5f6749774ae812727f9c
2017-12-07 22:09:15 +01:00
Gerald Squelart c5aeab4f69 Bug 1407810 - Use DDMOZ_LOG in media stack - r=jwwang
Mostly-mechanical replacement of MOZ_LOG with DDMOZ_LOG, usually just removing
the class name and `this` pointer (as they are already implicitly recorded).
Some files needed a bit more work when logging was done from helper classes or
static functions.

MozReview-Commit-ID: IeJJmzYqWMQ

--HG--
extra : rebase_source : 94200838dcdaf6c3bda9de30042ce2d307237eef
2017-10-13 16:31:59 +11:00
Gerald Squelart 1b357db99b Bug 1407810 - Use DDLogger in media stack - r=jwwang
Mostly-mechanical additions:
- Log constructions&destructions, usually by just inheriting from
  DecoderDoctorLifeLogger, otherwise with explicit log commands (for internal
  classes for which DecoderDoctorTraits can't be specialized),
- Log links between most objects, e.g.: Media element -> decoder -> state
  machine -> reader -> demuxer -> resource, etc.

And logging some important properties and events (JS events, duration change,
frames being decoded, etc.)

More will be added later on, from just converting MOZ_LOGs, and as needed.

MozReview-Commit-ID: KgNhHSz35t0

--HG--
extra : rebase_source : dd7206e350e32671adc6f3b9e54ebf777251de2c
2017-10-10 17:55:27 +11:00
Chris Pearce fb207e4f8a Bug 1422662 - Move BaseMediaResource::Close() into MediaResource class. r=jwwang
For the project to export Gecko's media stack and import it into Servo,
I need a way to shutdown an abstract MediaResource. So I'd like to move
BaseMediaResource::Close() up into MediaResource class.

MozReview-Commit-ID: 9JmxJPs02PN

--HG--
extra : rebase_source : e61cc1a3a79b3e4ca7e9fa86a602e6e26044e247
2017-12-04 16:29:35 +13:00
JW Wang 855a4bc6c4 Bug 1421875. P3 - remove MediaDecoder::DownloadProgressed() which is basically a one-line call to GetOwner()->DownloadProgressed(). r=bechen,gerald
Also devirtualize ChannelMediaDecoder::DownloadProgressed() and move it to private.

MozReview-Commit-ID: ITv3ISRbN5t

--HG--
extra : rebase_source : aa75bc11fc1a4af8df15db9224928b1f02267b80
2017-11-30 11:21:14 +08:00
JW Wang 7c3304f247 Bug 1421875. P2 - move MediaDecoder::NotifyDataArrived() down the class hierarchy. r=bechen,gerald
For it is never used by ChannelMediaDecoder.

MozReview-Commit-ID: Jtvlj0iwTm7

--HG--
extra : rebase_source : 8582486e0403cf78366adfdc0c11fab42fedb1c9
2017-11-30 11:07:13 +08:00
Fernando Jimenez 29f504c683 Bug 1421343 - MediaSourceDecoder uses SourceBuffer without including its header. r=cpearce
MozReview-Commit-ID: 3hnmMwzp1xH

--HG--
extra : rebase_source : 98dbebb34f84bb6922efc729411dc52e8584abb1
2017-11-29 09:00:53 +01:00
Margareta Eliza Balazs 112b2cef30 Merge mozilla-central to mozilla-autoland. r=merge a=merge CLOSED TREE 2017-11-20 11:47:28 +02:00
Fernando Jimenez Moreno 4fa89640c0 Bug 1418244 - Add missing headers to MSE SourceBufferResource and TrackBuffersManager. r=cpearce 2017-11-19 15:30:30 -05:00
Alfredo.Yang be0c9536ec Bug 1417795 - remove mp4_demuxer namespace part5. r=kinetik
MozReview-Commit-ID: Fo5p3kPyxAR

--HG--
rename : dom/media/mp4/Stream.h => dom/media/mp4/ByteStream.h
rename : dom/media/mp4/Interval.h => dom/media/mp4/MP4Interval.h
extra : rebase_source : b937a231ef0280ad03195cf98b15ecd080a20f49
2017-11-17 14:30:09 +08:00
Alfredo.Yang d6a0eb9d74 Bug 1417795 - remove mp4_demuxer namespace part3. r=kinetik
MozReview-Commit-ID: 9fM2VjY4Ckk

--HG--
extra : rebase_source : 24d971d44e1d9bd8b1589b4b542d792f75df376d
2017-11-17 08:53:25 +08:00
Alfredo.Yang a0056437d9 Bug 1417795 - remove mp4_demuxer namespace part2. r=kinetik
MozReview-Commit-ID: F8z1QW6WuUU

--HG--
extra : rebase_source : 9d137794bb1c6465da1d6b7aa6ba50265172ada3
2017-11-16 16:24:22 +08:00
Alfredo.Yang a2cd247c8f Bug 1417795 - remove mp4_demuxer namespace part1. r=kinetik
MozReview-Commit-ID: 6YrURoOq2wk

--HG--
extra : rebase_source : 3ea026780b210b42bd41163c654580a920d30181
2017-11-16 15:57:15 +08:00
JW Wang 1f62c1d92b Bug 1417869. P3 - pass descriptive messages to NetworkError(). r=jya
MozReview-Commit-ID: 6yaFJvXG3g8

--HG--
extra : rebase_source : 2d1c851098be7eb880a01432c504c6db96d86756
extra : source : a30f9699f49687b23d4ccf955d7a0af8ce0c7653
2017-11-17 11:07:30 +08:00
JW Wang 5a99c6b197 Bug 1417774 - remove unused MediaResource::Tell(). r=bechen
MozReview-Commit-ID: 3qlP4sSh9kM

--HG--
extra : rebase_source : 4002fec6f8c43abb640f9206cd715f3ecb02b373
2017-11-15 17:18:52 +08:00
Andrea Marchesini 4b1b084ce7 Bug 1416724 - part 3 - AbstractThread::Dispatch return value check in dom/media, r=jwwang 2017-11-15 07:58:03 +01:00
shindli 385fb3428c Backed out 4 changesets (bug 1416724) for failing /builds/worker/workspace/build/src/dom/media/hls/HLSDemuxer.cpp:89:5 r=backout on a CLOSED TREE
Backed out changeset 45352aa4319d (bug 1416724)
Backed out changeset 01d1e5263bcd (bug 1416724)
Backed out changeset bc854c315ec8 (bug 1416724)
Backed out changeset 35a50167485d (bug 1416724)
2017-11-15 09:49:04 +02:00
Andrea Marchesini 642cdd108b Bug 1416724 - part 3 - AbstractThread::Dispatch return value check in dom/media, r=jwwang 2017-11-15 07:58:03 +01:00
Andrea Marchesini 3f760d8258 Bug 1415564 - TaskQueue::Dispatch should return an error if failed, r=smaug 2017-11-09 01:43:40 +01:00
Sebastian Hengst d61954557d merge mozilla-inbound to mozilla-central. r=merge a=merge
MozReview-Commit-ID: Ai6Y5GGfkfT
2017-11-04 10:58:24 +01:00
Jon Coppeard fd86611724 Bug 1413993 - Remove unused USEC_PER_SEC constant r=jya
This constant is #defined in some MacOS system headers which causes compile errors.
2017-11-03 10:25:26 +00:00
Jean-Yves Avenard acabf2903c Bug 1295886 - P15. Enable FLAC mochitest on Android. r=gerald
MozReview-Commit-ID: 83mJleAMVro

--HG--
extra : rebase_source : ba445777b70a1b700eb21eb9809fecea76609598
2017-11-02 02:56:04 +01:00
Alastor Wu c683d23150 Bug 1362440 - part4 : parsing entire content to decide whether it's init segment. r=jya
The spec [1] defines what's the init segment, and the parser would return error
if the format is not correct.

[1] https://w3c.github.io/media-source/webm-byte-stream-format.html

MozReview-Commit-ID: 3nFHHdn5b89

--HG--
extra : rebase_source : 66fe592958801c4f9e2115f7729df2b9ece55ac3
2017-10-30 17:48:43 +08:00
Alastor Wu 65c50bf89e Bug 1362440 - part3 : add tests. r=jya
MozReview-Commit-ID: C4mXuPsMaF4

--HG--
extra : rebase_source : 11b69bde40b1ca336e2b9272aa2ec26c0e78507d
2017-10-30 17:48:35 +08:00
Alastor Wu 7440c83cae Bug 1362440 - part2 : parsing entire content to decide whether it's media segment. r=kinetik
The spec [1] defines what's the media segment, and the parser would return error
if the format is not correct.

[1] https://w3c.github.io/media-source/webm-byte-stream-format.html

MozReview-Commit-ID: 4hq59Pywz2t

--HG--
extra : rebase_source : 1136d2a673f11d612e0eb711db6affdce42bb525
2017-10-30 15:27:30 +08:00
Alfredo.Yang fc4a02e7c7 Bug 1411815 - use BufferReader instead of ByteReader in ContainerParser. r=kinetik
MozReview-Commit-ID: DB2J7w8PpAJ

--HG--
extra : rebase_source : 113b9832df3ac223c9adbcaa44f224d0c792892b
2017-10-19 11:12:48 +08:00
James Cheng ed18e57446 Bug 1407919 - Part3 - Add a gtest for testing the extraction function. r=gerald
MozReview-Commit-ID: 7CocV0rLtk7

--HG--
extra : rebase_source : 5fd1ac5e5623b2e4637b0e78541582432a87ac44
2017-10-13 21:17:35 +08:00
Jean-Yves Avenard 38b456068a Bug 1409272 - P2. Pre-roll vorbis by 80ms when seeking. r=gerald
The value by which we pre-roll is inconsequential, so long as we seek to the previous packet than the one we want. So 80ms will do.

MozReview-Commit-ID: 8iPOtjReZnb

--HG--
extra : rebase_source : 42908c6afc84cf783356fb7311ffe99b4ec76d96
2017-10-17 16:07:26 +02:00
Sebastian Hengst 34714cebde merge mozilla-inbound to mozilla-central. r=merge a=merge
MozReview-Commit-ID: 2KL1o3EPUk
2017-10-17 23:52:28 +02:00
Alastor Wu c8a9b504ed Bug 1408987 - Part 2: Make mManager thread-safe. r=jya
mManager would be accessed in both main thread and task queue, and be set on task
queue, so we need to make sure it's thread-safe.

MozReview-Commit-ID: m76KeEsDgB
2017-10-17 16:53:54 +08:00
Alastor Wu bbdf374f35 Bug 1408987 - Part 1: Add OnTaskQueue() assertion to clarify functions' running thread. r=jya
MozReview-Commit-ID: 36sqB5SlOd
2017-10-17 15:58:44 +08:00
Alastor Wu def6113401 Bug 1409274 - remove the lock for SourceBufferTaskQueue. r=jya
It would only be accessed on task queue now, so we don't need to lock it.

MozReview-Commit-ID: 6jd36TQW4aA

--HG--
extra : rebase_source : e8bb53a226154312496149ab8f6b00dead49a3b6
2017-10-17 15:46:26 +08:00
Jean-Yves Avenard e891f573a5 Bug 1407940 - P2. Only ever access mTaskQueue in a thread-safe fashion. r=alwu,gerald
mTaskQueue is only read on the main thread, but read and written on the demuxer's taskqueue. We need to ensure that accesses are synchronised.

MozReview-Commit-ID: Gbc15iYgZOe

--HG--
extra : rebase_source : 006ff3f73c9895fa2f29e56123e690cdf66fe2c5
2017-10-12 13:30:47 +02:00
Jean-Yves Avenard 51e48cb035 Bug 1407940 - P1. Use Mutex in place of Monitor. r=gerald
MozReview-Commit-ID: Dy2WhS0YOq1

--HG--
extra : rebase_source : 9ce10f7c7c811d0f73ef39a6439cac92686f9793
2017-10-12 11:15:20 +02:00
Alastor Wu b8237a2029 Bug 1247189 - part5 : use IsCurrentThreadIn() as a main criteria to determine whether we're on the task queue or not. r=jya
The use of the TrackBuffersManager once detached is explictly forbidden, as such
OnTaskQueue() can only be used before the DetachTask ran: we now strongly assert
as such.

MozReview-Commit-ID: ycOI4QRElb

--HG--
extra : rebase_source : ecce8ac75587470c15268ab729b068f049702a8a
2017-10-12 10:49:25 +08:00
Alastor Wu b4c4772190 Bug 1247189 - part4 : ensure we always detach TBM from demuxers. r=jya
Ensure the TBM would always be detached from demuxers, before calling
TBM::detach().

MozReview-Commit-ID: DLWZHB3M3GG

--HG--
extra : rebase_source : 9e455022ba9360fb549222e9ad1238a3ae9d88ad
2017-10-12 10:49:21 +08:00
Alastor Wu 023e34cbe4 Bug 1247189 - part3 : don't process any task after detached. r=jya
From [1], the task was executed after finished detach task. It would be caused
by queuing two detach tasks in the task queue.

If the previous detach task is still waiting in the task queue when we're calling
the second detach(), then we might have two detach tasks in the queue.

[1] https://treeherder.mozilla.org/logviewer.html#?job_id=134315866&repo=try&lineNumber=2540

MozReview-Commit-ID: HohgKqeZy0s

--HG--
extra : rebase_source : 0d20f1b8648acaf2ed8e75b2631e905629c2abaf
2017-10-12 10:49:10 +08:00
Alastor Wu 5a164c7e06 Bug 1247189 - part2 : remove reference to TrackBuffersManagers once detached. r=jya
Should never access the TrackBuffersManager once the SourceBuffer has been detached.

MozReview-Commit-ID: EgVINj9B1vZ

--HG--
extra : rebase_source : 4b4dc3e5c4b507fe4cc40e80f507b575a8b87eb3
2017-10-11 10:55:21 +08:00
Alastor Wu d9f5f478d9 Bug 1247189 - part1 : should detach TBM after detaching it from demuxers. r=jya
After detaching TBM, we should not access it anymore. So we should finish all
other related detaching process, before detaching TBM.

MozReview-Commit-ID: 8bNzqXVHVyy

--HG--
extra : rebase_source : e135eb3d0fd4e5c41bbac4ebfc8d6fcbd1b32d5b
2017-10-11 10:49:05 +08:00
Ryan VanderMeulen 0dcd727f08 Merge m-c to autoland. a=merge 2017-10-11 17:55:13 -04:00
Tom Ritter 701ee70a22 Bug 1406687 Pass return values from fwrite to Unused to silence the warn-unused-result warning r=njn
MozReview-Commit-ID: 4v6tPF5aMz7

--HG--
extra : rebase_source : fe434db73a8da686391462c12b91648348abcdc9
2017-10-09 15:01:48 -05:00
Sebastian Hengst 0ed8d9a86e Backed out changeset 26e324eb052d (bug 1247189) for crashing in /media-source/mediasource-errors.html. r=backout
--HG--
extra : amend_source : 39152d1a0836f9f1e22cc4cc6a0a759f4258e81b
2017-10-11 12:45:50 +02:00
Sebastian Hengst 953fafcc3c Backed out changeset 5b9af87e76a9 (bug 1247189) 2017-10-11 12:45:45 +02:00
Sebastian Hengst 6479b83569 Backed out changeset 36a63b9f8dcb (bug 1247189) 2017-10-11 12:45:40 +02:00
Sebastian Hengst ebb7218fe9 Backed out changeset 85d236f46b00 (bug 1247189) 2017-10-11 12:45:34 +02:00
Sebastian Hengst e80bd4f030 Backed out changeset 9be5bbb35797 (bug 1247189) 2017-10-11 12:45:29 +02:00
Jean-Yves Avenard d34a7ebdc5 Bug 1407243 - Don't immediately fire canplaythrough for infinite/live streams. r=jwwang
MozReview-Commit-ID: 2LQFa8PHvO5

--HG--
extra : rebase_source : 3534a963202658870221fca9cc238185d7e55156
2017-10-10 16:14:24 +02:00
Alastor Wu 8ef6776c31 Bug 1247189 - part5 : use IsCurrentThreadIn() as a main criteria to determine whether we're on the task queue or not. r=jya
The use of the TrackBuffersManager once detached is explictly forbidden, as such
OnTaskQueue() can only be used before the DetachTask ran: we now strongly assert
as such.

MozReview-Commit-ID: ycOI4QRElb

--HG--
extra : rebase_source : 44ea3d0eb292e5c285d0aa4e10eefa41f20beed7
2017-10-11 16:12:13 +08:00
Alastor Wu f519e79462 Bug 1247189 - part4 : ensure we always detach TBM from demuxers. r=jya
Ensure the TBM would always be detached from demuxers, before calling
TBM::detach().

MozReview-Commit-ID: DLWZHB3M3GG

--HG--
extra : rebase_source : 0334b71534cfaccaf1d8985d827fe4e5d5bf0e9f
2017-10-11 11:01:08 +08:00
Alastor Wu a4ae0238e3 Bug 1247189 - part3 : don't process any task after detached. r=jya
From [1], the task was executed after finished detach task. It would be caused
by queuing two detach tasks in the task queue.

If the previous detach task is still waiting in the task queue when we're calling
the second detach(), then we might have two detach tasks in the queue.

[1] https://treeherder.mozilla.org/logviewer.html#?job_id=134315866&repo=try&lineNumber=2540

MozReview-Commit-ID: HohgKqeZy0s

--HG--
extra : rebase_source : b1dc3193d839ef3776195901339fae24f328207b
2017-10-11 11:00:57 +08:00
Alastor Wu afaf8c616f Bug 1247189 - part2 : remove reference to TrackBuffersManagers once detached. r=jya
Should never access the TrackBuffersManager once the SourceBuffer has been detached.

MozReview-Commit-ID: EgVINj9B1vZ

--HG--
extra : rebase_source : 4b4dc3e5c4b507fe4cc40e80f507b575a8b87eb3
2017-10-11 10:55:21 +08:00
Alastor Wu e750a6aff2 Bug 1247189 - part1 : should detach TBM after detaching it from demuxers. r=jya
After detaching TBM, we should not access it anymore. So we should finish all
other related detaching process, before detaching TBM.

MozReview-Commit-ID: 8bNzqXVHVyy

--HG--
extra : rebase_source : e135eb3d0fd4e5c41bbac4ebfc8d6fcbd1b32d5b
2017-10-11 10:49:05 +08:00
Joel Maher 5ab59bd06c Bug 1401090 - Disable test_FrameSelection.html,test_HaveMetadataUnbufferedSeek.html,test_EndedEvent.html on android for frequent failures. r=me, a=test-only 2017-10-11 08:45:03 -04:00
Gerald Squelart b0442493e5 Bug 1405531 - Remove unused MediaDataDemuxer::HasTrackType - r=jwwang
The only actual code use in MediaSourceDemuxer can trivially be folded into
its caller GetNumberTracks in the same class.

MozReview-Commit-ID: E6zh98zmJwJ

--HG--
extra : rebase_source : 9358dc37523d6cd7c1a4d5ec62a790db6a092063
2017-10-04 11:40:29 +11:00
Alastor Wu 6881f03d05 Bug 1403478 - part2 : merge 'test_SeekableBefore*' and 'test_SeekableAfter*' into 'test_SeekableBeforeAndAfter*'. r=jya
MozReview-Commit-ID: 3tfdEEV78k8

--HG--
rename : dom/media/mediasource/test/test_SeekableAfterEndOfStream.html => dom/media/mediasource/test/test_SeekableBeforeAndAfterEndOfStream.html
rename : dom/media/mediasource/test/test_SeekableAfterEndOfStreamSplit.html => dom/media/mediasource/test/test_SeekableBeforeAndAfterEndOfStreamSplit.html
rename : dom/media/mediasource/test/test_SeekableAfterEndOfStreamSplit_mp4.html => dom/media/mediasource/test/test_SeekableBeforeAndAfterEndOfStreamSplit_mp4.html
rename : dom/media/mediasource/test/test_SeekableAfterEndOfStream_mp4.html => dom/media/mediasource/test/test_SeekableBeforeAndAfterEndOfStream_mp4.html
extra : rebase_source : 98e2e7c90f9b22526889eca869160999307e0cf7
2017-09-29 11:58:44 +08:00
Alastor Wu 27e06f23ea Bug 1403478 - part1 : check v.seekable before and after calling ms.endOfStream(). r=jwwang,jya
This patch does two things,

(1) check v.seekable after calling ms.endOfStream()
As test name suggests, we check seekable after calling endOfStream()

(2) check the time range of v.seekable
The seekable represents the ranges of the media resource [1], so it would be changed after calling ms.endOfStream().

Before calling the endOfStream(), seekable should be [0, ms.duration)
After calling the endOfStream(), seekable should be [0, ms.buffer.end(0))

[1] https://www.w3.org/TR/html51/semantics-embedded-content.html#dom-htmlmediaelement-seekable

MozReview-Commit-ID: 56AIZYVsHhW

--HG--
extra : rebase_source : a1f1df601dc8523cd5d4e58b41cada3c79d494c1
2017-09-29 11:33:46 +08:00
Alastor Wu 1bc4324cb2 Bug 1403832 - part1 : replace Error.Code() with Error.ErrorName(). r=jya
Use ErrorName() as it provides more useful information for the error detail.

MozReview-Commit-ID: BQUPQGcLd8L

--HG--
extra : rebase_source : 734825c88dfbe79de1e61498dcc24606c50314ee
2017-09-29 00:37:45 +08:00
Sebastian Hengst ee63f2e30a Backed out changeset 0317bcff40bc (bug 1406687) for build bustage at testing/gtest/gtest/src/gtest.cc:3871: 'Unused' was not declared in this scope. r=backout 2017-10-09 18:52:39 +02:00
Tom Ritter 22d2cdf063 Bug 1406687 Pass return values from fwrite to Unused to silence the warn-unused-result warning r=njn
MozReview-Commit-ID: 4v6tPF5aMz7

--HG--
extra : rebase_source : c54b129c6815096035e262322f40aa0884b1ae56
2017-10-09 00:26:16 -05:00
Alastor Wu a9f36ddd2d Bug 1402681 - part2 : add log. r=jya
MozReview-Commit-ID: 8qINxSCKrvg

--HG--
extra : rebase_source : 962ec20a7882c1854b0b3ea7a8aa6be65c9d0247
2017-09-26 17:48:39 +08:00
Alastor Wu eaf6e2d76e Bug 1402681 - part1 : do not queue the task without task queue. r=jya
Since the source buffer is a wrapped native, it would be unlinked twice and then the
TrackBuffersManager::Detach() would also be called twice.

The first detach task would clear the task queue of TrackBuffersManager, and then we
won't accept any new task without task queue. The second detach task should not be
executed.

MozReview-Commit-ID: AWTzVbRH5B1

--HG--
extra : rebase_source : 557e22f56f8541b06174e41604ca57cb01325d61
2017-09-26 17:48:19 +08:00
Gerald Squelart f54bfaa676 Bug 1402728 - Use RefPtr<TrackBuffersManager> instead of raw pointers - r=jya
All in MediaSourceDemuxer:
- GetManager returns a RefPtr<TBM>. Probably unneeded as the only call stores
the pointer in a RefPtr, but I'm adding it for peace of mind, and it's very
low cost.
- AttachSourceBuffer takes a RefPtr& and explicitly stores the given TBM in a
RefPtr in the dispatched task, then DoAttachSourceBuffer takes a
RefPtr<TBM>&&. This should not be needed, as it should already be done
implicitly. But now it's more obvious, and a bit more optimized thanks to move
semantics.
- DetachSourceBuffer takes a RefPtr& and explicitly stores the given TBM in a
RefPtr in the dispatched task, then DoDetachSourceBuffer takes a
RefPtr<TBM>&&; And changed the loop to use RemoveElementsBy. Same as above,
probably not needed, but it's now obvious that we keep a RefPtr.

MozReview-Commit-ID: 9aOZtV7uS1P

--HG--
extra : rebase_source : 1e33cffd5686e2d73f02976794d6b27861eb0391
2017-09-25 11:19:05 +13:00
Alastor Wu 5eddb6c449 Bug 1401147 - part2 : add test. r=jya
MozReview-Commit-ID: 2onCtimjuz4

--HG--
extra : rebase_source : 9e54641fbc2480895ff067e0d48f1eebba313911
2017-09-23 00:00:56 +08:00
Jean-Yves Avenard a47673b6ea Bug 1401147 - part1 : empty track buffer content upon detach. r=jya
After detached the source buffer, we would reset all its resource and shutdown
demuxer.

MozReview-Commit-ID: 7xEJ7q00aeF

--HG--
extra : rebase_source : c80ebb2e9ed6c9d3a672273d20ba2558b289e92d
2017-09-19 14:44:59 +02:00
Jean-Yves Avenard 83780d15b6 Bug 1400254 - Don't apply fuzz workaround when appendWindowEnd is set. r=gerald
Someone changing the attribute appendWindowStart and appendWindowEnd can be expected to know what they are doing. As such, we don't need to make sure playback starts when content timestamps are broken.

MozReview-Commit-ID: EcPORuDHpF5

--HG--
extra : rebase_source : 2e29f07d8c4c52dfee360bac9e83b4d92b3eae38
2017-09-17 15:30:34 +02:00
Jean-Yves Avenard afd0595779 Bug 1400598 - P1. Stop parsing bytesteam as soon as we have found the necessary data. r=gerald
MozReview-Commit-ID: 9APhbRHIMUP

--HG--
extra : rebase_source : 5f62596fab23c2b832d6cdb85764f3b4b37aa7ad
2017-09-16 23:35:17 +02:00
Alastor Wu 8c76ba6b0a Bug 1400195 - remove xp constraint for tests. r=jya
MozReview-Commit-ID: BawMiEVPNFA

--HG--
extra : rebase_source : 0f653a020a2cdfaff76c8ef2ee477e02796c646b
2017-09-16 02:14:23 +08:00
Alastor Wu 97421a2047 Bug 1398139 - part4 : enable test. r=jya
Fix the fail by patch1, so we can re-enable it.

MozReview-Commit-ID: It3JkvQzAdk

--HG--
extra : rebase_source : 5ad433012750c8f6c92b16b787e87b32ee03d7a6
2017-09-15 18:05:21 +08:00
Sebastian Hengst 7dd2b068b5 merge mozilla-central to mozilla-inbound. r=merge a=merge 2017-09-13 13:35:21 +02:00
Joel Maher 7806465584 Bug 1398244 - run mochitest-media on windows 10 instead of windows 8. r=rwood 2017-09-13 05:18:46 -04:00
Gerald Squelart 7dbe315e25 Bug 1398999 - nsDequeFunctor::operator() doesn't need to return anything - r=froydnj
Its return value is never used, and most implementations return nullptr anyway.

MozReview-Commit-ID: 8rxC053mmE8

--HG--
extra : rebase_source : 61a0b8b1373396182efd27d3c01b96e5e5541364
2017-02-09 14:06:36 +11:00
Jean-Yves Avenard 3358fb824a Bug 1396629 - P5. Show container type in debug info. r=cpearce
MozReview-Commit-ID: 3olXuGeqqoS

--HG--
extra : rebase_source : bc61d8f67eb4e726ba1d200d731a7740f80f8f82
2017-09-04 22:47:36 +02:00
Jean-Yves Avenard e5379b16fc Bug 1396629 - P4. Show sourcebuffer mimetype in debug info. r=cpearce
MozReview-Commit-ID: 2FLWa7Tidzy

--HG--
extra : rebase_source : 1c839e9b2a837294eb4dd24ce10812cfce1b7f3c
2017-09-04 22:46:37 +02:00
Jean-Yves Avenard 4d30575929 Bug 1396629 - P3. Make member const. r=cpearce
MozReview-Commit-ID: CwOh3BZj0vG

--HG--
extra : rebase_source : 698bdb76c3c713bd956448f0fc15eeeeab015b0e
2017-09-04 22:43:50 +02:00
Jean-Yves Avenard 9349efba14 Bug 1396515: Fix incorrect && and || operator placements. r=sylvestre
Includes some side 80 columns fix.

MozReview-Commit-ID: IXRoQfM0Hjc

--HG--
extra : rebase_source : 918cf87b2ce82c8de245dcb23cc359289ac5f21f
2017-09-04 11:27:43 +02:00
Kaku Kuo e738871d59 Bug 1393399 P3 - keep the MediaDecoderOwner's identification in MFR; r=gerald
When GPU process crashes, the MediaDecoder, MDSM, and MFR are all destroyed.
So, we use MediaDecoderOwner to identify which video we're dealing with.

MozReview-Commit-ID: 1cv08M7Cpcf

--HG--
extra : rebase_source : 62f7be874d97a58eb4c1d7a98b4e9fe83a9313d3
2017-08-31 17:31:51 +08:00
JW Wang e24fdf16a7 Bug 1395014 - remove MediaSourceResource. r=jya
MozReview-Commit-ID: D3W2u4MBize

--HG--
extra : rebase_source : 7c610abc5c42c80ea8abc081f200c35647b81730
extra : source : c525cc941fb2504eee00b8237defe5fef2eea934
2017-08-29 14:03:19 +08:00
Andrew McCreight 78807d8776 Bug 1391005 - Eliminate NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION_INHERITED. r=peterv
Replace it with NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION, because it
has been the same for a while.

MozReview-Commit-ID: 5agRGFyUry1

--HG--
extra : rebase_source : 5388c56b2f6905c6ef969150f0c5b77bf247624d
2017-08-29 16:02:48 -07:00
JW Wang c8952581e9 Bug 1394653 - remove MediaResource from the base class of MediaSourceResource. r=jya
MozReview-Commit-ID: 9Pmp7K6zp13

--HG--
extra : rebase_source : b6ce308423c530f6c0b5c71127fc9343561f0fdb
extra : intermediate-source : b443c01608e693905afb69db2ae24bde162a65b9
extra : source : 3fc73f9bd173467c50159bc12ea2274013338b71
2017-08-25 14:08:07 +08:00
JW Wang 2cbbe83757 Bug 1393386. P2 - remove MediaDecoder::GetResource(). r=gerald
MozReview-Commit-ID: 7OfkJthwfoM

--HG--
extra : rebase_source : 88b63f6ebbab3a4df15febede377e427e32e065e
extra : intermediate-source : 39514e130ddbda604a9fdc69fd99d0248ed40420
extra : source : 91eded128b33b655d023f8aa73f9eaf2a38aac4a
2017-08-24 18:10:31 +08:00
JW Wang 4af519df25 Bug 1393386. P1 - make PinForSeek/UnpinForSeek pure virtual. r=gerald
Sub-classes should know how to pin/unpin the resource.

MozReview-Commit-ID: 50S8oSD5oEU

--HG--
extra : rebase_source : 5e1b7c657b759c0d1dfdd7b5c0a4b7dbc4077ffe
extra : intermediate-source : 3000b76a3b97c08955c2d584ac215114c8e8f59a
extra : source : a56b9846db916ff85a0cae09736c3284bd895506
2017-08-24 18:08:37 +08:00
JW Wang b634b53e60 Bug 1393379. P2 - remove MediaResource::SizeOfIncludingThis/SizeOfExcludingThis. r=gerald
MozReview-Commit-ID: MMhVOaSUuX

--HG--
extra : rebase_source : a158bbd9c718212247896e299f6063773ca81d1a
extra : source : ff3aef3a67c67e281aac244206aeb15eccbace29
2017-08-24 17:52:21 +08:00
JW Wang 470f887d6d Bug 1393369. P4 - remove MediaSourceResource::GetCurrentPrincipal(). r=gerald
MozReview-Commit-ID: J96wBGLBQ45

--HG--
extra : rebase_source : 269edf22f54b0a81331c7b3c8b264a350cac1a91
extra : source : daddcd406a1f61cae957ba941247d602a1f7d3bf
2017-08-24 17:13:03 +08:00
JW Wang db3e1718f7 Bug 1393369. P2 - remove MediaResource::GetCurrentPrincipal(). r=gerald
MozReview-Commit-ID: 9as5ya2xXdL

--HG--
extra : rebase_source : 7141cec4f3e9c38253b85e71d3b5efe5a5d7dddd
extra : source : 9d9f1de4db95a353040f7c7c484e7d9d79f275fa
2017-08-24 17:01:08 +08:00
JW Wang 59d7107e86 Bug 1393369. P1 - virtualize MediaDecoder::GetCurrentPrincipal() so the sub-classes know how to calculate the current principal. r=gerald
MozReview-Commit-ID: EOUtPE4hfgO

--HG--
extra : rebase_source : d15166e373fdd3a8490e2c794215aeb2551a7397
extra : source : 5f627ea709d24c8b7c5ddd0115524ef734378e66
2017-08-24 16:58:06 +08:00
Chris Pearce 4ffa31745b Bug 1392498 - Move TimeIntervals to dom::TimeRanges conversion into TimeRanges class. r=jya
If TimeUnits.h includes mozilla/dom/TimeRanges.h, then the build ends up
pulling in the Gecko DOM bindings, which pulls in a whole lot of JavaScript and
DOM bindings code. That makes it trickier to import GeckoMedia into Servo, and
makes Gecko's build slower, so move the code to convert TimeIntervals into
dom::TimeRanges.

Also remove an extraneous "virtual" and add "const" to some functions in TimeRanges.

MozReview-Commit-ID: BLeehaf9gCE

--HG--
extra : rebase_source : 84ef054cf8fd5b4434dc761a1b0a39803d3231f5
2017-08-21 15:08:25 +12:00
JW Wang 9ba52292a9 Bug 1393346. P2 - move IsTransportSeekable() from MediaResource to BaseMediaResource. r=gerald
MozReview-Commit-ID: KqpzIRH31gz

--HG--
extra : rebase_source : e9303347b34d3cbfbd8d6a6f2a474dd8f0fb1447
2017-08-24 00:08:41 +08:00
JW Wang 3202c8815c Bug 1393346. P1 - virtualize IsTransportSeekable(). r=gerald
MozReview-Commit-ID: LIwEEbH3tBT

--HG--
extra : rebase_source : e02954fb3b6ddf40259bc6c69221192e01fc1410
2017-08-24 00:06:23 +08:00
JW Wang e8dd02d4f8 Bug 1393345 - remove MediaResource::IsSuspended() which has no callers. r=gerald
MozReview-Commit-ID: Jn6TIXpFflR

--HG--
extra : rebase_source : 0efc64660523f1e846feb247075ab69e54f5f24a
2017-08-23 15:52:33 +08:00
JW Wang da66e5c214 Bug 1392919. P2 - remove MediaResource::IsSuspendedByCache(). r=gerald
MozReview-Commit-ID: E1lkfLARMhS

--HG--
extra : rebase_source : 354adbb22db9bdacec74a824bf04bfce0775faad
2017-08-23 14:38:00 +08:00
JW Wang 2834911596 Bug 1391170 - lessen the assertion in AddMediaElementToURITable() so we can move MediaDecoder::GetResource() to private. r=gerald
If AddMediaElementToURITable() is called after the decoder Load failed, mDecoder
will be reset and it is sufficient to assert mDecoder only.

MozReview-Commit-ID: 58WT8zFeiFj

--HG--
extra : rebase_source : 712579b544e9a9ce971778b85795d06e58bd4ea5
extra : intermediate-source : 470e2d8a20010e11d7a7dce5540957e89439811e
extra : source : 59f4b2b33212794aa1cf3e8782737a2d4af8c241
2017-08-17 15:41:22 +08:00
JW Wang 41cd273f4e Bug 1391142. P3 - remove IsLiveStream() from MediaResource. r=gerald
MozReview-Commit-ID: DBFrYfj2lGB

--HG--
extra : rebase_source : 18532f55f38c5ac54660c11f078741e09273a30a
extra : source : 0e45bca0cdc0b2428216e6c9a55f8651e5b21017
2017-08-17 15:20:40 +08:00
JW Wang 9bfb2b1c06 Bug 1390443. P2 - remove unused IsExpectingMoreData(). r=cpearce
MozReview-Commit-ID: KTxmjIrD1WB

--HG--
extra : rebase_source : 8c1fc9b4da08290f7a177ef60793c831b0cc7a25
extra : intermediate-source : a86b94e4bdc04bae34f6e8966dfe9b5e11f98677
extra : source : 498e2844d2d0d1cee087552f5aaf5aac7e34c3bf
2017-08-16 15:37:29 +08:00
Sebastian Hengst 9d63faba53 Backed out changeset 05b2bf2e6017 (bug 1390443) 2017-08-21 10:19:39 +02:00
JW Wang a7f1c5d69b Bug 1390443. P2 - remove unused IsExpectingMoreData(). r=cpearce
MozReview-Commit-ID: KTxmjIrD1WB

--HG--
extra : rebase_source : 3cad2f2df2f75d6b052cbc6e6f5623ba9c587987
extra : intermediate-source : a86b94e4bdc04bae34f6e8966dfe9b5e11f98677
extra : source : 498e2844d2d0d1cee087552f5aaf5aac7e34c3bf
2017-08-16 15:37:29 +08:00
Wes Kocher b1fc5e008c Merge inbound to central, a=merge
MozReview-Commit-ID: 4cWGBbMEU2x
2017-08-18 15:53:07 -07:00
Eric Rahm 9732475fe0 Bug 1389598 - Part 3: Remove gonk references from dom/ r=bkelly
--HG--
extra : rebase_source : 94a2b34b21cfde0c0ebda1045e9d30c6b88a1557
2017-08-11 17:42:11 -07:00
Chris Pearce 7bf74ce2b5 Bug 1390748 - Make MediaDecoder::CreateStateMachine() non-virtual. r=jwwang
MediaDecoder::CreateStateMachine is only virtual so that Ogg can attach
the reader's metadata/seekable produces to its chaining event.

The MediaSourceDecoder also overrides CreateStateMachine(), but it's not
called by anything external, so its implementation doesn't actually need
to be virtual.

MozReview-Commit-ID: 2x6bpK6Fdzd

--HG--
extra : rebase_source : 5a9932bf98992e13ba850dd640d2623ad8bcccbb
2017-08-15 16:37:00 +12:00
Carsten "Tomcat" Book fd8d71864f Backed out changeset b86afd45a710 (bug 1390748)
--HG--
extra : rebase_source : 3567c5675e1506f5c46ffbe626f5f128118cf4c7
2017-08-17 08:35:38 +02:00
Chris Pearce 622ee050c8 Bug 1390748 - Make MediaDecoder::CreateStateMachine() non-virtual. r=jwwang
MediaDecoder::CreateStateMachine is only virtual so that Ogg can attach
the reader's metadata/seekable produces to its chaining event.

The MediaSourceDecoder also overrides CreateStateMachine(), but it's not
called by anything external, so its implementation doesn't actually need
to be virtual.

MozReview-Commit-ID: 2x6bpK6Fdzd

--HG--
extra : rebase_source : 5a9932bf98992e13ba850dd640d2623ad8bcccbb
2017-08-15 16:37:00 +12:00
Phil Ringnalda 38ce1ea2a0 Backed out 10 changesets (bug 1390748) for build bustage
Backed out changeset 02b36ee5fb17 (bug 1390748)
Backed out changeset 84e8bf01c856 (bug 1390748)
Backed out changeset fc8989be30f3 (bug 1390748)
Backed out changeset 14d421ace6cc (bug 1390748)
Backed out changeset 7dadac869038 (bug 1390748)
Backed out changeset 0e77809e7bc2 (bug 1390748)
Backed out changeset bf78a8dce9c5 (bug 1390748)
Backed out changeset 5fa77990472e (bug 1390748)
Backed out changeset 5d3b637d2485 (bug 1390748)
Backed out changeset 634fe076d134 (bug 1390748)

MozReview-Commit-ID: Dxio8vXDCHg
2017-08-16 21:33:10 -07:00
Chris Pearce 582456c0a6 Bug 1390748 - Make MediaDecoder::CreateStateMachine() non-virtual. r=jwwang
MediaDecoder::CreateStateMachine is only virtual so that Ogg can attach
the reader's metadata/seekable produces to its chaining event.

The MediaSourceDecoder also overrides CreateStateMachine(), but it's not
called by anything external, so its implementation doesn't actually need
to be virtual.

MozReview-Commit-ID: 2x6bpK6Fdzd

--HG--
extra : rebase_source : 01b4a59cba8ec64480779fb6849322841646ca3b
2017-08-15 16:37:00 +12:00
Chris Pearce f2902bdf82 Bug 1390406 - Remove unnecessary includes in dom/media/mediasource. r=jya
MozReview-Commit-ID: 1aTncGfBicu

--HG--
extra : rebase_source : 8ad085eb81d195732c385718c283b4752e5e3c80
2017-08-15 16:13:00 +12:00
Jean-Yves Avenard f247f14f15 Bug 1389844 - P3. Handle case where currentTime isn't contained in buffered range. r=gerald
When playback starts, currentTime is always 0, and even if the buffered data doesn't contain currentTime it is possible for playback to progress as we always allow up to 500ms gap in the buffered data.

As such, we must use fuzzing on the interval's start time when determining if we have future data.

MozReview-Commit-ID: Ki9QxmKhfdY

--HG--
extra : rebase_source : b7a550348b61d96f91e73b171a5dd03b16a4c152
2017-08-16 19:35:27 +02:00
Jean-Yves Avenard cf6931a74f Bug 1389844 - P1. Add mochitest. r=gerald
Similar to test_PlayEventsAutoPlaying.html, but here we load 10s of data and ensure autoplaying kicks in.

MozReview-Commit-ID: ImpjFIcBIo1

--HG--
extra : rebase_source : c7d280eebeb6b3398176423b9e723696c9543c7f
2017-08-16 19:20:45 +02:00
JW Wang 32951f4824 Bug 1388604 - move SetReadMode() from MediaResource to BaseMediaResource. r=gerald
It would be less accurate to call SetReadMode(MediaCacheStream::MODE_PLAYBACK)
in ChannelMediaDecoder::MetadataLoaded() instead of DecodeMetadataState::OnMetadataRead()
because MDSM might have started decoding by the time 'metadata loaded' event arrives
in the main thread. However this little inaccuracy should be fine since it only
affects a small amount of data concerning the eviction algorithm.

MozReview-Commit-ID: JoQMGr5Fvge

--HG--
extra : rebase_source : 3663a028522cc8b973964f62e59d7568a5eba10a
extra : source : 359b4454633432d3334a106aedb267a2451afb45
2017-08-09 11:06:29 +08:00
Chris Pearce e869956526 Bug 1388288 - Make TrackBuffersManager compile in non-Unified mode. r=jya
TrackBuffersManager::SegmentParserLoop() fails to compile in non-Unified mode
because some uses of SourceBufferAttributes::AppendState don't have the
SourceBufferAttributes:: prefix. So just add a typedef to make that
unnecessary.

MozReview-Commit-ID: 1H3SIeUxNu7

--HG--
extra : rebase_source : 06215eec4f19a46dc5e7243f1be02a1bfb974ddf
2017-08-08 15:02:20 +08:00
JW Wang cf112f4b88 Bug 1388228. P6 - following P5, we are now able to move some methods that are related to nsIChannel to BaseMediaResource. r=gerald
So we reduce the number of unimplemented methods in the sub-classes of MediaResource.

MozReview-Commit-ID: EAmUEv9WQk8

--HG--
extra : rebase_source : deed5fd089e8c42a5a6ab0546e0781d0061591e5
2017-08-07 18:09:56 +08:00
JW Wang b4e54281c9 Bug 1388228. P2 - cache the result of CanPlayThrough() and mirror it to MDSM. r=gerald
So we don't duplicate the code of calculating CanPlayThrough from
download rate and playback rate in MediaDecoder.

MozReview-Commit-ID: 7M5JAuUxFFc

--HG--
extra : rebase_source : cb216a1af59b9d8207e3056a5d3ae05e93d85e74
extra : source : a183c089760e329508fac44239fee42c1f047b80
2017-08-04 17:38:20 +08:00
Ryan VanderMeulen e0883c892e Bug 1364821 - Fix merge bustage. a=RyanVM
A line was accidentally dropped when resolving merge conflicts between inbound and autoland. CI wasn't amused. This just adds it back.
2017-08-04 15:33:53 -04:00
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