Commit Graph

1257 Commits

Author SHA1 Message Date
Bryce Seager van Dyk
566e4b6e4e Bug 1582518 - Replace IntervalSet.Length usages with IsEmpty where appropriate. r=dminor
This replaces the instances where Length was being called on an interval set
to determine if it was empty or not empty. IsEmpty makes the intention in these
cases more immediately obvious, and avoids the need to think about ints as
bools in cases like `if(!mySet.Length())`.

Depends on D46638

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

--HG--
extra : moz-landing-system : lando
2019-09-20 19:41:53 +00:00
Bryce Seager van Dyk
ee7fee057b Bug 1578143 - Prevent TrackBuffersManager attempting to access buffered ranges if none exist when evicting data. r=jya
It appears possible for data eviction to take place despite the manager not
currently having any buffered ranges. This shouldn't happen, but if it can if
the buffers have become full with 0 duration data. This patch attempts to
mitigate that case by removing all coded frames. This prevents a bad access on
the buffered ranges and should clear up space in the buffers to append more
data.

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

--HG--
extra : moz-landing-system : lando
2019-09-19 15:38:40 +00:00
Karl Tomlinson
78bb2541b3 Bug 834505 undef GetCurrentTime() from windows-h-wrapper.template.h r=glandium
GetCurrentTime is declared in WinBase.h
https://github.com/tpn/winsdk-10/blob/master/Include/10.0.10240.0/um/WinBase.h#L91

Documentation for functions declared in winbase.h instruct to include
Windows.h. e.g.
https://docs.microsoft.com/en-us/windows/win32/api/winbase/nf-winbase-copyfile
Other macro declarations in winbase.h such as CopyFile() are already adjusted
with this wrapper via windows-h-unicode.decls.h

A similar, but different, static inline could be provided but is not required.

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

--HG--
extra : moz-landing-system : lando
2019-09-18 02:52:20 +00:00
Edwin Takahashi
73510ce199 Bug 1526064 - re-enable tests in dom/media/mediasource/test/mochitest.ini for windows10-aarch64 r=gbrown
Differential Revision: https://phabricator.services.mozilla.com/D45887

--HG--
extra : moz-landing-system : lando
2019-09-13 22:12:05 +00:00
Tom Ritter
d922064696 Bug 1547519 - Rename NS_STRINGIFY to MOZ_STRINGIFY, move to mfbt, and unify stragglers r=glandium
Differential Revision: https://phabricator.services.mozilla.com/D39961

--HG--
extra : moz-landing-system : lando
2019-09-04 02:40:32 +00:00
Tarek Ziadé
03685b73e1 Bug 1556637 - Replace all mozDumpDebugInfo calls r=jya,jib
Replaces mozDumpDebugInfo with mozRequestDebugInfo

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

--HG--
extra : moz-landing-system : lando
2019-08-14 20:32:31 +00:00
Edwin Gao
d6127aa0c2 Bug 1561046 - remove API 22 from manifest files r=gbrown
Changes:
- remove references to API 22 from manifests

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

--HG--
extra : moz-landing-system : lando
2019-07-31 17:38:39 +00:00
Nicholas Nethercote
18fae65f38 Bug 1563139 - Remove StaticPrefs.h. r=glandium
This requires replacing inclusions of it with inclusions of more specific prefs
files.

The exception is that StaticPrefsAll.h, which is equivalent to StaticPrefs.h,
and is used in `Codegen.py` because doing something smarter is tricky and
suitable for a follow-up. As a result, any change to StaticPrefList.yaml will
still trigger recompilation of all the generated DOM bindings files, but that's
still a big improvement over trigger recompilation of every file that uses
static prefs.

Most of the changes in this commit are very boring. The only changes that are
not boring are modules/libpref/*, Codegen.py, and ServoBindings.toml.

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

--HG--
extra : moz-landing-system : lando
2019-07-26 01:10:23 +00:00
alwu
55e171e76b Bug 1563949 - part5 : return nullptr when time overflow. r=jya
If the result of expected dts/pts after added `fuzz` is overflow, we should return nullptr as if we reach to the end of the file.

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

--HG--
extra : moz-landing-system : lando
2019-07-19 02:16:44 +00:00
alwu
441473d744 Bug 1563949 - part4 : prevent direct usage of 'AppendElement()' to append sample. r=jya
We should always append sample by using `AppendSample()` to assert whether a sample is valid, so making `mSamples` private can prevent a direct usage of the nsTarry's `AppendElement()`.
Also provide a method to return non-const mSamples which is only used for the move semantics.

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

--HG--
extra : moz-landing-system : lando
2019-07-19 21:11:21 +00:00
alwu
424b48c982 Bug 1563949 - part2 : add 'AppendSample' to assert that a sample should always be valid r=jya
We don't want to have a sample with invalid time, duration, end time or end timecode, so add a diagnostic assertion to check. And will handle invalid sample for demuxers in next patch.

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

--HG--
extra : moz-landing-system : lando
2019-07-19 20:16:26 +00:00
alwu
7cea87585a Bug 1563949 - part1 : add function 'GetEndTimeCode'. r=jya
We already have function `GetEndTime()`, so it's good to have a similar function `GetEndTimeCode()` so that we won't have to calculate end time code by ourselves.

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

--HG--
extra : moz-landing-system : lando
2019-07-18 11:03:28 +00:00
Emilio Cobos Álvarez
1e51ee6ad5 Bug 1564466 - Remove MediaSource::{Enabled,ExperimentalEnabled}, and use [Pref] on the IDL instead. r=bzbarsky
Differential Revision: https://phabricator.services.mozilla.com/D38098

--HG--
extra : moz-landing-system : lando
2019-07-18 13:06:25 +00:00
Emilio Cobos Álvarez
f34964f6bc Bug 1564466 - Make MediaSource not call Preferences::GetBool off-main-thread. r=jya
Preferences::GetBool is not thread-safe, StaticPrefs are.
Also StaticPrefs are nicer anyway.

There's a lot of Preferences:: usage in dom/media which looks suspicious, though
I don't know if all that runs on the main thread.

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

--HG--
extra : moz-landing-system : lando
2019-07-18 13:06:17 +00:00
Razvan Maries
adc6758e36 Backed out 2 changesets (bug 1564466) for perma fails on EnsureMTA.h. CLOSED TREE
Backed out changeset 8011dd41d7d3 (bug 1564466)
Backed out changeset b162d0e42bee (bug 1564466)
2019-07-17 22:48:41 +03:00
Emilio Cobos Álvarez
4cfbe11244 Bug 1564466 - Remove MediaSource::{Enabled,ExperimentalEnabled}, and use [Pref] on the IDL instead. r=bzbarsky
Differential Revision: https://phabricator.services.mozilla.com/D38098

--HG--
extra : moz-landing-system : lando
2019-07-15 18:32:29 +00:00
Emilio Cobos Álvarez
ec51c3a362 Bug 1564466 - Make MediaSource not call Preferences::GetBool off-main-thread. r=jya
Preferences::GetBool is not thread-safe, StaticPrefs are.
Also StaticPrefs are nicer anyway.

There's a lot of Preferences:: usage in dom/media which looks suspicious, though
I don't know if all that runs on the main thread.

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

--HG--
extra : moz-landing-system : lando
2019-07-17 12:56:39 +00:00
Victor Porof
0a8ff0ad85 Bug 1561435 - Format dom/, a=automatic-formatting
# ignore-this-changeset

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

--HG--
extra : source : 62f3501af4bc1c0bd1ee1977a28aee04706a6663
2019-07-05 10:44:55 +02:00
Victor Porof
b5a4cb3848 Bug 1558517 - Pre 3.0: Remove conflicting eslint rules, and turn on "curly: all" everywhere, r=standard8
Differential Revision: https://phabricator.services.mozilla.com/D34535

--HG--
extra : source : 74ed7ee773393d305c4e948a57a1b1e32b1f12e8
extra : intermediate-source : 403d0757d61683e0a85d0bb07768eb39fbd0af72
2019-06-28 17:14:01 +02:00
Nicholas Nethercote
d839ef58db Bug 1562331 - Make media.* static prefs follow the naming convention. r=KrisWright
This also removes the following prefs, because they're unused:
- media.autoplay.allow-muted pref
- media.autoplay.blackList-override-default

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

--HG--
extra : rebase_source : 0570540496302b3efedadf4d5115ee5422d5c279
2019-06-28 14:09:05 +10:00
Edwin Gao
8361aefc97 Bug 1555454 - migrate mochitest-media to macosx1014 and turn off permafail tests r=gbrown,jmaher
Changes:
- rebalance chunk
- turn off three tests that are nearly permafail

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

--HG--
extra : moz-landing-system : lando
2019-06-20 04:10:29 +00:00
Chris Pearce
337355aa9c Bug 1558364 - Convert TrackBuffersManager::mPendingInput into a MediaSpan. r=jya
This allows us to avoid a (probably small) copy when we stash the pending input.

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

--HG--
extra : moz-landing-system : lando
2019-06-14 02:10:24 +00:00
Chris Pearce
42fd2adbaa Bug 1558364 - Add MediaSpan and use it for TrackBuffersManager::mInputBuffer. r=jya
As seen in this profile of a Twitch replay: https://perfht.ml/2K9Ydb3 we can
often end up spending time in TrackBuffersManager::CodedFrameProcessing()
shaving off bytes from the front off TrackBuffersManager::mInputBuffer. This
requires all the remaining bytes to be memmove'd down to the start of this
array. Sometimes we have close to 1MB in that buffer, and when we're just
trying to consume a few hundred bytes, that becomes high overhead.

So intead of using this "slice off, shuffle down" approach change
TrackBuffersManager::mInputBuffer to be a new type MediaSpan, which maintains a
RefPtr to a MediaByteBuffer and a span defining the subregion of the buffer we
care about. This means the RemoveElementsAt(0,N) operation becomes basically
free, and we can eliminate a few other copies we were doing as well.

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

--HG--
extra : moz-landing-system : lando
2019-06-14 02:10:09 +00:00
Brindusan Cristian
a7f24acb4b Backed out 2 changesets (bug 1558364) for build bustages at MediaSpan.h. CLOSED TREE
Backed out changeset 098ce3586133 (bug 1558364)
Backed out changeset 2e64d8db2b4b (bug 1558364)
2019-06-14 03:48:51 +03:00
Chris Pearce
8f2dd4a937 Bug 1558364 - Convert TrackBuffersManager::mPendingInput into a MediaSpan. r=jya
This allows us to avoid a (probably small) copy when we stash the pending input.

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

--HG--
extra : moz-landing-system : lando
2019-06-14 00:31:06 +00:00
Chris Pearce
d5f83d4740 Bug 1558364 - Add MediaSpan and use it for TrackBuffersManager::mInputBuffer. r=jya
As seen in this profile of a Twitch replay: https://perfht.ml/2K9Ydb3 we can
often end up spending time in TrackBuffersManager::CodedFrameProcessing()
shaving off bytes from the front off TrackBuffersManager::mInputBuffer. This
requires all the remaining bytes to be memmove'd down to the start of this
array. Sometimes we have close to 1MB in that buffer, and when we're just
trying to consume a few hundred bytes, that becomes high overhead.

So intead of using this "slice off, shuffle down" approach change
TrackBuffersManager::mInputBuffer to be a new type MediaSpan, which maintains a
RefPtr to a MediaByteBuffer and a span defining the subregion of the buffer we
care about. This means the RemoveElementsAt(0,N) operation becomes basically
free, and we can eliminate a few other copies we were doing as well.

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

--HG--
extra : moz-landing-system : lando
2019-06-14 00:31:02 +00:00
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