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

15470 Коммитов

Автор SHA1 Сообщение Дата
alwu 47597aeb6b Bug 1550633 - part2 : maybe start loading resource when the track's mode changes. r=jya
According to the spec [1], the user agent must start the track processing model when text track has its text track mode changed.

[1] https://html.spec.whatwg.org/multipage/media.html#sourcing-out-of-band-text-tracks:start-the-track-processing-model

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

--HG--
extra : moz-landing-system : lando
2019-05-23 09:05:02 +00:00
Alastor Wu 825855eddc Bug 1551385 - part3 : add test 'test_webvtt_overlapping_time.html' and 'vtt_overlapping_time.html'. r=heycam
Adding tests to ensure that when cues with overlapping times, the one with earlier end timestamp should disappear when the media time reaches its end time. In this test, we have two cues with overlapping time, when the video starts, both cues should be displayed. When the time passes 1 seconds, the first cue should disappear and the second cues should be still displayed.

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

--HG--
extra : moz-landing-system : lando
2019-05-22 20:29:08 +00:00
Alastor Wu e28b6b0b52 Bug 1551385 - part2 : recompute display state when display cues amount is different from the one we rendered last time. r=heycam
If the amount of cues which are going to be displayed is different from the one we displayed last time, we have to compute cues' display state again because cue's position might be affected by other cues.

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

--HG--
extra : moz-landing-system : lando
2019-05-23 18:13:13 +00:00
Alastor Wu ceefe2a70a Bug 1551385 - part1 : let 'processCue()' handle cleaning cues div. r=heycam
We can actually let `processCue()` to handle rendering cues or cleaning displayed cues, no need to use another way to clear the cue.

The advantages is to make the code cleaner and easier to read, now we just need to know JS side would handle all rendering stuffs for us. We don't need to have different behavior when there is no showing cue.

The way we clear displayed cues are intuitive, we would remove all child nodes under the overlay, which are used to display cues.

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

--HG--
extra : moz-landing-system : lando
2019-05-22 05:39:40 +00:00
Andreas Pehrson c6dbf8b80b Bug 1548629 - Separate logic for media data with gaps and overlaps. r=jya
If we end up taking the gap branch of the if in the patch, and the media file
in the future from the point we branched at contains no gaps or overlaps, we'll
still end up taking the gap branch until the end. This is because it only
appends up to the start of the current frame, but not the frame itself. I.e.,
when the next frame gets processed, there's still a gap in appended data.

Depends on D32107

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

--HG--
extra : moz-landing-system : lando
2019-05-22 12:44:44 +00:00
Andreas Pehrson 1c6fe43b5c Bug 1548629 - Set contentDuration for gizmo-short.mp4. r=jya
Differential Revision: https://phabricator.services.mozilla.com/D32107

--HG--
extra : moz-landing-system : lando
2019-05-22 12:43:50 +00:00
Mihai Alexandru Michis 6026c240e3 Backed out 22 changesets (bug 1550633) for browser-chrome failure at browser_cache.js. CLOSED TREE
Backed out changeset 87067f045e1e (bug 1550633)
Backed out changeset a42883570179 (bug 1550633)
Backed out changeset bf1426571565 (bug 1550633)
Backed out changeset 97f61668f78c (bug 1550633)
Backed out changeset e22ef6f848aa (bug 1550633)
Backed out changeset 22213d6f047c (bug 1550633)
Backed out changeset 27e03b195718 (bug 1550633)
Backed out changeset 9a5e3e6b8c21 (bug 1550633)
Backed out changeset d338d667dcbd (bug 1550633)
Backed out changeset abc099f50543 (bug 1550633)
Backed out changeset ed0f76cca0d9 (bug 1550633)
Backed out changeset 4b193e156faa (bug 1550633)
Backed out changeset fefc8d667b9c (bug 1550633)
Backed out changeset e4128df1406b (bug 1550633)
Backed out changeset 9ad7d7b5ef6d (bug 1550633)
Backed out changeset d8fdfd9505bf (bug 1550633)
Backed out changeset 679ce0bdbf18 (bug 1550633)
Backed out changeset f75c225dc273 (bug 1550633)
Backed out changeset 4346465d73b1 (bug 1550633)
Backed out changeset 4c8fd0720cc2 (bug 1550633)
Backed out changeset 81545b2c0b58 (bug 1550633)
Backed out changeset 12fc5abcd066 (bug 1550633)
2019-05-23 11:54:26 +03:00
alwu 26260da093 Bug 1550633 - part13.6 - refactor tests. r=jya
Refactor those tests' structure in order to make them more readable, and add the comment to show what the test purpose is for each test.

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

--HG--
extra : moz-landing-system : lando
2019-05-23 00:13:12 +00:00
alwu 7700a5afe5 Bug 1550633 - part13.5 - wait text track element's 'load' event. r=jya
This patch do two things in order to trigger loading for track element and wait for correct event to check track's and cues' status after loading finished.

(1) listen track element's load event
There are some tests listening video's loadedmetadata, but it's wrong. The loading process of media element and track element are completely non-related.
If you would like to check track element's status, you should wait for track element's load event.

(2) enable track explictly
If the text track which has default attribute is added to the media element before the media element starts running automatic track selection [1], then it would be enable by the media element.
Otherwise, you have to enable track explicitly by changing its track mode.

[1] https://html.spec.whatwg.org/multipage/media.html#sourcing-out-of-band-text-tracks:text-track-7

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

--HG--
extra : moz-landing-system : lando
2019-05-21 13:42:20 +00:00
alwu 69c922b8f8 Bug 1550633 - part13.4 : don't use anonymous function. r=jya
Use named function for callback to reduce the indentation.

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

--HG--
extra : moz-landing-system : lando
2019-05-21 13:40:55 +00:00
alwu f626b4abe4 Bug 1550633 - part13.3 - create elements in HTML, not in JS. r=jya
Create test elements in HTML beforehand, which can remove unnecessary JS code and make test cleaner.

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

--HG--
extra : moz-landing-system : lando
2019-05-21 13:40:51 +00:00
alwu 3361374872 Bug 1550633 - part13.2 - no need to set pref "media.webvtt.regions.enabled". r=jya
These tests didn't use region at all, so we have no need to set the pref.

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

--HG--
extra : moz-landing-system : lando
2019-05-21 13:40:44 +00:00
alwu 1c992466f8 Bug 1550633 - part13.1 - remove unnecessary elements. r=jya
These elemenets are useless and we can run tests without them.

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

--HG--
extra : moz-landing-system : lando
2019-05-21 13:37:54 +00:00
alwu 330ae399ba Bug 1550633 - part6 : clear track's cues list whenever track element's src attribute set, changed or removed. r=jya,baku
According to the spec [1], we should empty track's cue list whenever a track element has its src attribute set, changed, or removed.

[1] https://html.spec.whatwg.org/multipage/media.html#sourcing-out-of-band-text-tracks:attr-track-src

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

--HG--
extra : moz-landing-system : lando
2019-05-21 09:21:16 +00:00
alwu 37cc9f6d00 Bug 1550633 - part3 : add debug log to show track's kind. r=jya
Showing track's kind in debug log is helpful.

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

--HG--
extra : moz-landing-system : lando
2019-05-20 09:30:19 +00:00
alwu fa25e850f3 Bug 1550633 - part2 : maybe start loading resource when the track's mode changes. r=jya
According to the spec [1], the user agent must start the track processing model when text track has its text track mode changed.

[1] https://html.spec.whatwg.org/multipage/media.html#sourcing-out-of-band-text-tracks:start-the-track-processing-model

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

--HG--
extra : moz-landing-system : lando
2019-05-20 09:30:01 +00:00
Gurzau Raul 74c555539e Backed out 28 changesets (bug 1550422) for marionette AssertionError and failing browser_policy_hardware_acceleration.js on a CLOSED TREE.
Backed out changeset 5dd10a365ba9 (bug 1550422)
Backed out changeset 529f5be01ab9 (bug 1550422)
Backed out changeset b6861d3badf8 (bug 1550422)
Backed out changeset 059cff1a3dde (bug 1550422)
Backed out changeset 6ada1116b241 (bug 1550422)
Backed out changeset ca67e8e45262 (bug 1550422)
Backed out changeset a1961a51ae44 (bug 1550422)
Backed out changeset 1c90b9cb3ad4 (bug 1550422)
Backed out changeset 285fa46e4f26 (bug 1550422)
Backed out changeset e2938a444234 (bug 1550422)
Backed out changeset 7a930fc51125 (bug 1550422)
Backed out changeset 898ed02804fe (bug 1550422)
Backed out changeset e1b7abc99ae9 (bug 1550422)
Backed out changeset f781d415cef6 (bug 1550422)
Backed out changeset 2fef10a7cce5 (bug 1550422)
Backed out changeset ea64b4d8d4ff (bug 1550422)
Backed out changeset 86a8ba1b755c (bug 1550422)
Backed out changeset 9c0c9e80f309 (bug 1550422)
Backed out changeset 10c153ddbaea (bug 1550422)
Backed out changeset 60fe635ec2c9 (bug 1550422)
Backed out changeset a38796266b28 (bug 1550422)
Backed out changeset 2db647dcdf1c (bug 1550422)
Backed out changeset 952ddac02972 (bug 1550422)
Backed out changeset ba46b53643ec (bug 1550422)
Backed out changeset ca47ef6c59f7 (bug 1550422)
Backed out changeset f45f471a1a40 (bug 1550422)
Backed out changeset 371b4da5b771 (bug 1550422)
Backed out changeset 02fc78890032 (bug 1550422)
2019-05-23 05:59:44 +03:00
Michael Froman 3de5584fce Bug 1553555 - Release RemoteDecoderChild on manager thread in the case of an InitIPDL error. r=jya
Differential Revision: https://phabricator.services.mozilla.com/D32178

--HG--
extra : moz-landing-system : lando
2019-05-22 22:20:27 +00:00
Jean-Yves Avenard d59781ac33 Bug 1550422 - P23. Remove now unused gfxPrefs. r=jrmuizel
And with some tidying some comments and removing stray #include "gfxPrefs.h"

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

--HG--
extra : moz-landing-system : lando
2019-05-22 12:46:30 +00:00
Jean-Yves Avenard 2412878bd9 Bug 1550422 - P15. Move Skip and Once gfxPrefs to StaticPrefs. r=jrmuizel
Differential Revision: https://phabricator.services.mozilla.com/D31259

--HG--
extra : moz-landing-system : lando
2019-05-22 22:27:37 +00:00
Jean-Yves Avenard 2c0ce1b3ca Bug 1550422 - P12. Convert Live gfxPrefs into StaticPrefs. r=jrmuizel
gfxPrefs Live preferences are almost identical to StaticPrefs.

We leave aside for now those that set a custom change callback as this feature isn't yet supported in StaticPrefs.

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

--HG--
extra : moz-landing-system : lando
2019-05-22 12:43:42 +00:00
Jean-Yves Avenard 822d91dc49 Bug 1550422 - P6. Release object early when error. r=mattwoodrow
No need to keep the object alive.

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

--HG--
extra : moz-landing-system : lando
2019-05-22 12:42:03 +00:00
Jean-Yves Avenard 56f0daee25 Bug 1550422 - P5. Sync preferences with RDD process when then changed. r=mattwoodrow,mjf
Differential Revision: https://phabricator.services.mozilla.com/D30590

--HG--
extra : moz-landing-system : lando
2019-05-22 12:41:48 +00:00
Alastor Wu 06b1cc0bd8 Bug 1552354 - resolve video promise when we finish playing the last frame. r=jya
We should resolve video playing promise when we finish playing the last frame. Otherwise, it would cause playback to be ended earlier than its original duration.

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

--HG--
extra : moz-landing-system : lando
2019-05-22 22:21:56 +00:00
Nico Grunbaum ce3a24b8cd Bug 1553213 - correct new MediaAccess telemetry probes r=mjf
Differential Revision: https://phabricator.services.mozilla.com/D32095

--HG--
extra : moz-landing-system : lando
2019-05-22 19:02:37 +00:00
Andreas Pehrson 70a3da3e8f Bug 1389983 - Re-enable tests. r=jib
Differential Revision: https://phabricator.services.mozilla.com/D31774

--HG--
extra : moz-landing-system : lando
2019-05-22 14:45:57 +00:00
Chris Pearce 51e485a4ee Bug 1552712 - Reserve upper bound for capacity of IntervalSet::Intersection(). r=jya
Previous patch in Bug 1552712 actually didn't set the correct upper bound; it
failed to set the upper bound in cases like:

  intersect({[0,10]}, {[0,1], [2,3], [4,5]})

That's clearly the maximum of the lengths of the array, not the minimum.

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

--HG--
extra : moz-landing-system : lando
2019-05-21 17:09:53 +00:00
Nika Layzell 95e8f0306b Bug 1540731 - Part 2: Move toplevel actors to override ActorDestroy, r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D28573

--HG--
extra : moz-landing-system : lando
2019-05-21 17:04:21 +00:00
Paul Adenot 4be4624d57 Bug 1552530 - Make the wav dumper in AudioStream.cpp reusable. r=jya
Differential Revision: https://phabricator.services.mozilla.com/D31648

--HG--
extra : moz-landing-system : lando
2019-05-21 10:10:04 +00:00
Paul Adenot a78de7c1b3 Bug 1552530 - Templatize ByteWriter.h to allow writing big or little endian, and fix call sites. r=jya
Differential Revision: https://phabricator.services.mozilla.com/D31766

--HG--
extra : moz-landing-system : lando
2019-05-21 10:10:04 +00:00
Chris Pearce 922077eefe Bug 1552712 - Reserve capacity in IntervalSet::Intersection(). r=jya
Profiling shows we can spend a lot of time in IntervalSet::Intersection().

Much of this time is spent appending elements to a temporary buffer as we
loop over the two IntervalSets' arrays comparing them. As we append, the
storage of the temporary array is reallocated as the storage must grow to
hold more elements. These reallocations are expensive, as we must copy the
old elements to the new storage.

So before starting the loop, reserve enough capacity to store the upper
bound; the minimum of the two IntervalSets' lengths. This may waste memory,
but will be faster, as expensive reallocations are avoided.

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

--HG--
extra : moz-landing-system : lando
2019-05-21 02:09:18 +00:00
nils@vulndev.org, Karl Tomlinson 0383d9bf4e bug 1548816 crashtest r=padenot
Differential Revision: https://phabricator.services.mozilla.com/D30160

--HG--
extra : moz-landing-system : lando
2019-05-08 09:35:19 +00:00
Bryce Van Dyk 46e5b04e71 Bug 1533625 - Replace assert with early return for mp4 missing IV data. r=jya
This assert could be triggered with malformed files, so replace it with an early
return.

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

--HG--
extra : moz-landing-system : lando
2019-05-16 06:40:17 +00:00
Bryce Van Dyk 1fe446e00c Bug 1533625 - Add crashtest for MP4 with missing cenc aux info. r=jya
Mp4s using the 'cenc' encryption scheme should contain auxiliary information
containing the initialization vector to be used to decode that sample. However,
it's possible for malformed mp4s to contain other relevant crypto information,
but to omit this aux info. This adds such a file to our crashtests.

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

--HG--
extra : moz-landing-system : lando
2019-05-16 05:08:12 +00:00
Bryce Van Dyk e454136cb1 Bug 1547757 - Use a RefPtr to hold owner element ref when moving media resource load to background. r=cpearce
Differential Revision: https://phabricator.services.mozilla.com/D31019

--HG--
extra : moz-landing-system : lando
2019-05-16 07:01:02 +00:00
Jan Beich 83616a086b Bug 1552652 - Unbreak building tests on Tier3 after bug 1545079. r=padenot
Differential Revision: https://phabricator.services.mozilla.com/D31756

--HG--
extra : moz-landing-system : lando
2019-05-20 09:06:35 +00:00
Alastor Wu d65a4e80c9 Bug 1548446 - disable 'test_webvtt_seeking.html' on Android r=jolin
According to the comment [1], there are some seeking issue on Android which causes the intermittent failure, so we are going to disable this test on Android.

[1] https://bugzilla.mozilla.org/show_bug.cgi?id=1548446#c17

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

--HG--
extra : moz-landing-system : lando
2019-05-17 22:40:33 +00:00
Jan-Ivar Bruaroey 98192deae0 Bug 1550955 - Make StopTrack() API require a hard reference. r=pehrsons
Differential Revision: https://phabricator.services.mozilla.com/D31555

--HG--
extra : moz-landing-system : lando
2019-05-17 19:38:44 +00:00
Alex Chronopoulos ec7353c721 Bug 1545079 - Create a gtest that exercises revive method of AudioCallbackDriver. r=padenot
Differential Revision: https://phabricator.services.mozilla.com/D30890

--HG--
extra : moz-landing-system : lando
2019-05-14 15:27:06 +00:00
Alex Chronopoulos 75d6afdf3b Bug 1545079 - Execute revive logic in operation thread. r=padenot
`IsStarted` may not be updated at the time `Revive()` method is executed since the update of the flag happens on the async operation. This will be the case if `Revive` is executed right after `Start`. When that happens the revive method asserts that the stream is started.

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

--HG--
extra : moz-landing-system : lando
2019-05-14 16:00:22 +00:00
Alex Chronopoulos 77b1b7585c Bug 1545079 - Enhance MockCubeb class to simulate a cubeb stream. r=padenot
On MochCubeb add a fake audio thread and the corresponding methods for stream_{init,start,stop,destroy}.

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

--HG--
extra : moz-landing-system : lando
2019-05-17 16:38:04 +00:00
Alex Chronopoulos feeaa94e0d Bug 1545079 - Move MockCubeb on a seperate reusable header. r=padenot
Extract the existing MockCubeb logic from TestAudioDeviceEnumerator to a separate reusable header.

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

--HG--
extra : moz-landing-system : lando
2019-05-14 15:26:15 +00:00
Paul Adenot cadd6ec6ca Bug 1549041 - Destroy the AudioChannelAgent in CloseInternal instead of Close. r=karlt
Differential Revision: https://phabricator.services.mozilla.com/D30638

--HG--
extra : moz-landing-system : lando
2019-05-17 09:46:25 +00:00
Alastor Wu 70f521747d Bug 1552081 - part2. Modify test 'test_webvtt_update_display_after_adding_or_removing_cue.html'. r=jya
Now adding or removing cue would trigger processing cues only when media element's `show-poster` flag is false, so we have to modify the test to reset the flag in order to test the correct behavior.

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

--HG--
extra : moz-landing-system : lando
2019-05-17 00:56:27 +00:00
Alex Chronopoulos b54af00815 Bug 1550737 - When shutdown is finished use only a reference of the child. r=jya
When `RemoteMediaDataDecoder::Shutdown` is finished it is not necessary to hold a reference of the `self` any more. Keep the `mChild` alive, which is the only one needed to destroy the IPDL. In addition to that, deleting the IPDL and destroying the child will be happening at the task queue similar to what was happening before Bug 1545416.

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

--HG--
extra : moz-landing-system : lando
2019-05-16 12:59:37 +00:00
Alex Chronopoulos 9bf1923ba8 Bug 1550737 - Make sure we keed strong reference until the end of the method. r=jya.
Instead of deleteing a RefPtr directly copy it in a local variable in order to ensure that the pointer will be alive till the end of the method. In addition to that, on RemoteMediaDataDecpder::Shutdown promise use a reference of the child object instead of the whole `self` object since this is the only one needed. Finally, one style change.

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

--HG--
extra : moz-landing-system : lando
2019-05-16 14:07:42 +00:00
Andreas Pehrson b9873fa23e Bug 1551855 - Add a dedicated pref for enabling GraphRunner. r=karlt
Differential Revision: https://phabricator.services.mozilla.com/D31262

--HG--
extra : moz-landing-system : lando
2019-05-16 06:10:54 +00:00
Bryce Van Dyk 94c6b5f06d Bug 1549544 - Use the 'cenc' init data type when encountering cbcs media. r=cpearce
When encountering media using the common encryption format (mp4s containing pssh
boxes), the encrypted event we fire should specify the cenc init data type.
Fixes a bug where for cbcs the 'cbcs' init data type was used -- which is a
bogus value.

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

--HG--
extra : moz-landing-system : lando
2019-05-14 02:31:47 +00:00
Nico Grunbaum 79279249fb Bug 1551361 - add extra logging to basic RTP extensions test - r=bwc
Differential Revision: https://phabricator.services.mozilla.com/D31106

--HG--
extra : moz-landing-system : lando
2019-05-14 22:21:58 +00:00
Bryce Van Dyk d095d35551 Bug 1550577 - Skip problematic mp4 crashtest on Android while we investigate. r=jolin
encrypted-track-with-bad-sample-description-index.mp4 appears to be causing
issues when running under older Android versions. Skip this when running crash
tests while we investigate and add a comment to indicate as such. Bug 1550912
has been raised to follow this up and fix as needed.

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

--HG--
extra : moz-landing-system : lando
2019-05-14 21:32:45 +00:00
Ryan VanderMeulen 8f5477d25e Bug 1313741 - Use AppConstants in DOM and XPConnect tests instead of manual detection. r=bzbarsky
Differential Revision: https://phabricator.services.mozilla.com/D30973

--HG--
extra : moz-landing-system : lando
2019-05-14 21:01:05 +00:00
Jim Mathies 596063b9b7 Bug 1541186 - Switch to using TYPE_MOZILLA_NONMAINTHREAD for MediaManager. r=jesup
Differential Revision: https://phabricator.services.mozilla.com/D25925

--HG--
extra : moz-landing-system : lando
2019-05-01 18:16:55 +00:00
alwu f0a398cc59 Bug 1548446 - part2 : should wait until seek completed. r=jolin
Main test function should await `seekVideo()`  until it finishes.

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

--HG--
extra : moz-landing-system : lando
2019-05-13 20:49:09 +00:00
alwu e87aa05c40 Bug 1548446 - part1 : add more debug log in 'test_webvtt_seeking.html'. r=jolin
Add more log in order to help debug and know where we get failure.

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

--HG--
extra : moz-landing-system : lando
2019-05-13 18:46:01 +00:00
Alastor Wu ffa1d889f4 Bug 1551045 - add debug log in `vtt.jsm`. r=heycam
We should add some debug logs, which should be easily enable and disable, in vtt.jsm in order to increase the efficiency of debugging.

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

--HG--
extra : moz-landing-system : lando
2019-05-12 22:56:06 +00:00
Daniel Varga 94674eaadf Backed out changeset 8deb4484f31c (bug 1548858) re-enable test.
--HG--
extra : rebase_source : ae092fe9592a00342f3b3a4c44cf4903bde8c6e8
2019-05-10 23:00:16 +03:00
Jan-Ivar Bruaroey 6f1f1f6d20 Bug 1546865 - Retry gUM on mic process limit collision after 200 ms. r=padenot
Differential Revision: https://phabricator.services.mozilla.com/D30290

--HG--
extra : moz-landing-system : lando
2019-05-10 16:06:09 +00:00
Andreea Pavel 83f3eb6488 Bug 1548858 - skip test_can_play_type_mpeg.html on android r=jmaher
Differential Revision: https://phabricator.services.mozilla.com/D30627

--HG--
extra : moz-landing-system : lando
2019-05-10 12:03:40 +00:00
alwu 6896b4c755 Bug 1532495 - part2 : add test 'test_background_video_resume_looping_video_without_audio.html' r=jya
Add test to to ensure that the looping video (without audio track) which has been suspended can continute to playback correctly after we resume video decoding.

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

--HG--
extra : moz-landing-system : lando
2019-05-09 23:09:44 +00:00
alwu 4fea1ece94 Bug 1532495 - part1 : only skip the 'completed' state during seamless looping mode. r=jya
The normal looping process is that, goes to `completed` state first, notify playback ended, and finally media element would call seek to the start position in order to start looping again.

However, if we're in the seamless looping mode, we can stay in `loopingDecoding` state and repeating the looping without going to other states. Otherwise, we should go to `completed` state if decoding has ended.

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

--HG--
extra : moz-landing-system : lando
2019-05-09 17:47:52 +00:00
Jean-Yves Avenard 92822b915d Bug 1548795 - P1. Don't use StaticPrefs in GPU process. r=mattwoodrow
Differential Revision: https://phabricator.services.mozilla.com/D29984

--HG--
extra : moz-landing-system : lando
2019-05-09 23:12:12 +00:00
alwu 6b41d4e549 Bug 1536762 - part5 : adjustment should only happen when box doesn't go over the boundary along the moving direction. r=heycam
When adjusting box's position, we would choose a axis first and move the box along this axis to see whether we can place this box without overlapping with other boxes and fully inside the rendering area.

If the box has been over the boundary along the moving direction, we should move box back to the original position and change the moving direction to see whether we can find another best place for the box.

Although the adjustment can run without timeout now, it still doesn't match the result of the reference, so change the state to `fail`.

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

--HG--
extra : moz-landing-system : lando
2019-05-09 18:46:12 +00:00
alwu 119f85db3a Bug 1536762 - part2 : use first line box's size as positioning basic unit. r=heycam,baku
According to the spec [1] 7.2.10.2, we should use the first line box's height or width as positioning unit to adjust box's position.

We will also use this value to adjust box when `snap-to-line` is false.

There, we implement a new chrome-only API to acquire this information, which would return the first line box's size in the `block` frame.

[1] https://www.w3.org/TR/webvtt1/#ref-for-webvtt-cue-snap-to-lines-flag-12

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

--HG--
extra : moz-landing-system : lando
2019-05-09 19:22:33 +00:00
alwu 9ea9ba3929 Bug 1536762 - part1 : use unscaled bounding box'size as a cue box's size. r=baku,heycam
When adjusting cue's position, the goal is to place cue boxes fully inside the rendering area, and place in the right place.

In order to check whether the box is correctly inside the rendering area, we have to know the correct size of the cue box.

Therefore, we implement the new chrome-only APIs to acquire this information (box's height and width), and this returned value won't be affected by CSS transformation, which is good for positioning.

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

--HG--
extra : moz-landing-system : lando
2019-05-09 18:26:17 +00:00
Byron Campen [:bwc] 6a25453cbf Bug 1529612 - Part 3: Update a mochitest to expect bufferedamountlow events even when the threshold is 0 (Part 2 fixed this bug). r=mjf
Differential Revision: https://phabricator.services.mozilla.com/D28528

--HG--
extra : moz-landing-system : lando
2019-05-09 15:37:55 +00:00
Byron Campen [:bwc] 7589cea682 Bug 1531908 - Part 0: Re-enable a test-case, and check length of label based on UTF-8 encoding. r=jib
Differential Revision: https://phabricator.services.mozilla.com/D28557

--HG--
extra : moz-landing-system : lando
2019-05-09 17:29:20 +00:00
Alex Chronopoulos 396962e5a5 Bug 1545416 - Make the remote decoder shutdown async. r=mjf
Create a new IPDL message `ShutdownComplete`, direction from parent (RDD) to child (content), to inform the child when the decoder shutdown has been completed. The remote decoder child uses that message to resolve the shutdown promise.

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

--HG--
extra : moz-landing-system : lando
2019-05-09 16:38:54 +00:00
alwu 12021ef9f6 Bug 1548923 - part3 : add test 'test_webvtt_update_display_after_adding_or_removing_cue.html'. r=jya
Differential Revision: https://phabricator.services.mozilla.com/D29883

--HG--
extra : moz-landing-system : lando
2019-05-08 17:46:39 +00:00
alwu dfb849b238 Bug 1548923 - part2 : reset cues' active flag when media element's ready state becomes 'HAVE_NOTHING' r=jya
According to the spec [1], whenever the media element's readyState is changed back to `HAVE_NOTHING`, we have to reset all cues' active flag and update cue display in order to hide them.

[1] https://html.spec.whatwg.org/multipage/media.html#text-track-cue-active-flag

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

--HG--
extra : moz-landing-system : lando
2019-05-08 17:46:39 +00:00
alwu b864f159ca Bug 1549642 - handle cue with negative duration. r=jya
According to the spec [1], the cue's end time might be negative and be smaller than its start time.

In this case, when we reach the cue's start on the media time line, we should treat it as a `missing cue` (which won't be actually displayed, but will receive events) when we run the `TimeMarchesOn`.

Therefore, we have to add this kind of cue into `otherCue` and let `TimeMarchesOn` handles it properly, to dispatch `enter` and `exit` event for it.

[1] https://html.spec.whatwg.org/multipage/media.html#text-track-cue-end-time

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

--HG--
extra : moz-landing-system : lando
2019-05-08 18:09:56 +00:00
Daniel Varga e25fb1a515 Backed out changeset 2996e082682c (bug 1548858) for mda failures at dom/media/test/test_can_play_type_mpeg.html
--HG--
extra : rebase_source : ed7d212e9efdaa3194a1ad35b3826e318ca99c0d
2019-05-08 12:02:03 +03:00
Chris Pearce 7402ebd65e Bug 1538023 - Change MDSM::HasLowBufferedData() to consider data buffered after end of decoded data rather than start. r=jya
When under pressure, the MediaCache evicts data before the last read on a
stream.  We typically have two demuxers reading from different offsets in a
stream. So if the MediaCache is under pressure, it may end up evicting data
between the two demuxers.

The MediaDecoderStateMachine currently goes into buffering state if there's
insufficient data available beginning at the start of its queue of decoded
samples. However since the MediaCache evicts data behind the streams read
cursor, the data after the beginning of the sample queue may have already been
evicted by the media cache. This will cause the MediaDecoderStateMachine to
enter a buffering state, and if its sample queues are full, there will be no
demuxers reading to cause the MediaCache to download the data between the two
demuxers, and we'll get stuck in buffering state indefinitely.

So change the MediaDecoderStateMachine to instead check whether there's
insufficient data available at the end of the decoded sample queues. This means
we won't get stuck in buffering state. Note the MediaCache may still evict data
which the other demuxer needed, causing us to re-request it, but at least we
won't get stuck in buffering state.

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

--HG--
extra : moz-landing-system : lando
2019-05-08 04:35:32 +00:00
Chris Pearce b64a2d776d Bug 1538023 - Add support for -Inf to media::TimeUnits. r=jya
TimeUnits with a negative infinity value are used in the next patch.

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

--HG--
extra : moz-landing-system : lando
2019-05-08 06:27:03 +00:00
Karl Tomlinson 562c78800b Bug 1548816 be consistent about number of frames copied r=padenot
Differential Revision: https://phabricator.services.mozilla.com/D30159

--HG--
extra : moz-landing-system : lando
2019-05-07 11:17:54 +00:00
Nico Grunbaum 59dcd65631 Bug 1548097 - sort getContributingSources and getSynchronizationSources results r=jib
sort getContributingSources and getSynchronizationSources results

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

--HG--
extra : moz-landing-system : lando
2019-05-02 19:57:43 +00:00
Michael Froman 87a83db872 Bug 1548858 - don't expect av1 decoding for Android. r=bwc
RDD/AV1 isn't enabled by default yet for Android.

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

--HG--
extra : moz-landing-system : lando
2019-05-07 15:14:15 +00:00
Paul Adenot d9b3df4c8e Bug 1549699 - Don't use communication devices by default on Windows. r=achronop
Differential Revision: https://phabricator.services.mozilla.com/D30205

--HG--
extra : moz-landing-system : lando
2019-05-07 15:19:32 +00:00
Paul Adenot e6aeac0043 Bug 1549383 - Fix build bustage in CameraParent.cpp. r=jib
`rv` is not used anymore out of Nightly, because diagnostic asserts are
disabled.

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

--HG--
extra : moz-landing-system : lando
2019-05-07 14:22:17 +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
Chris Pearce 79608d2578 Bug 1540573 - P5. Only "always throttle" media download to the readahead on cellular connections. r=jya
Normally when downloading media data we throttle the download only if we're
ahead of the read cursor more than the "readahead limit", and if we estimate
that the connection is fast enough that we'll be able to download at a rate
fast enough to playback in real time if we resume it later.

On mobile we additionally override this so that we always throttle the download
once we're ahead of the read cursor by the readahead limit. This is to save
data.  I think we can relax this to only do this override if we're on a
cellular connection; if we're on WiFi we can assume data is cheap.

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

--HG--
extra : moz-landing-system : lando
2019-05-06 22:43:09 +00:00
Chris Pearce d905b6207b Bug 1540573 - P4. Use larger MediaCache sizes when on cellular connection. r=jya
Differential Revision: https://phabricator.services.mozilla.com/D26233

--HG--
extra : moz-landing-system : lando
2019-05-06 23:38:02 +00:00
Chris Pearce f0243bf126 Bug 1540573 - P3. Expose network link type on ContentChild for use in content process. r=snorp
In GeckoView the nsINetworkLinkService doesn't work in the content process, as
we don't seem to have an AndroidBridge there, so just maintain the network
connection type on the ContentChild.

(I had considered keeping this on the NeckoChild, but the creation of that is
initiated from the content process side, and there's not an easy and clean way
to have the parent process send us the connection type after construction of
the NeckoParent, other than have the NeckoChild request it either
synchronously, or doing it async and hoping it's not asked for the value before
the response comes in.)

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

--HG--
extra : moz-landing-system : lando
2019-05-06 22:41:25 +00:00
Dorel Luca 2365b4f5b1 Backed out changeset ef8c4674d0b0 (bug 1549383) for Build bustage. CLOSED TREE 2019-05-07 00:14:08 +03:00
Paul Adenot 447322c285 Bug 1549383 - Fix build bustage in CameraParent.cpp. r=jib
`rv` is not used anymore out of Nightly, because diagnostic asserts are
disabled.

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

--HG--
extra : moz-landing-system : lando
2019-05-06 20:56:16 +00: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
Geoff Brown 18638f8bc4 Bug 1545235 - Enable some android gtests in dom/media/gtest; r=jmaher
With changes from bug 1548555, some of the gtests previously disabled on Android
can be re-enabled.

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

--HG--
extra : moz-landing-system : lando
2019-05-06 18:53:54 +00:00
Jan-Ivar Bruaroey a8cc07510f Bug 1547381 - Call StopTrack() in the right order. r=padenot
Differential Revision: https://phabricator.services.mozilla.com/D29924

--HG--
extra : moz-landing-system : lando
2019-05-06 09:14:38 +00:00
Nico Grunbaum 705743fb99 Bug 1528078 - Adding WebRTC device access and deprecated interface telemetry r=jib,smaug
Adding telemetry for gUM, enumerate devices, and mozRTCPeerConnection

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

--HG--
extra : moz-landing-system : lando
2019-05-03 23:50:22 +00:00
Jan-Ivar Bruaroey 2a2f7640e3 Bug 1407415 - Add a CamerasParent shutdown blocker. r=dminor,asuth
Differential Revision: https://phabricator.services.mozilla.com/D29701

--HG--
extra : moz-landing-system : lando
2019-05-03 21:08:45 +00:00
Jan-Ivar Bruaroey e52e8837ef Bug 1407415 - Consolidate media::GetShutdownBarrier() use and return a RefPtr r=dminor
Differential Revision: https://phabricator.services.mozilla.com/D29700

--HG--
extra : moz-landing-system : lando
2019-05-03 21:08:42 +00:00
Jan-Ivar Bruaroey 2a825b2d8a Bug 1407415 - Add a using statement to reduce word wrapping. r=dminor
Differential Revision: https://phabricator.services.mozilla.com/D29699

--HG--
extra : moz-landing-system : lando
2019-05-03 21:08:40 +00:00
Byron Campen [:bwc] 622f5f795e Bug 1531910: Re-enable a test-case, and check protocol length based on UTF-8 encoding. r=jib
Depends on D28252

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

--HG--
extra : moz-landing-system : lando
2019-05-03 19:08:25 +00:00
Andreea Pavel e2388edd9f Backed out 7 changesets (bug 1540573) for causing bug 1548441
Backed out changeset dd882b8cd73e (bug 1540573)
Backed out changeset b10d2cae45f2 (bug 1540573)
Backed out changeset 270a8917377f (bug 1540573)
Backed out changeset 3db059b34e40 (bug 1540573)
Backed out changeset fe196b2dfc62 (bug 1540573)
Backed out changeset 1bde5042e507 (bug 1540573)
Backed out changeset 4ff116b9d729 (bug 1540573)
2019-05-03 20:35:27 +03:00
Dorel Luca 926056ac66 Backed out changeset beae0db3529d (bug 1531910) for WPT failures in webrtc/RTCPeerConnection-createDataChannel.html 2019-05-03 18:37:07 +03:00
Boris Zbarsky ff72e84ac1 Bug 1547923 part 4. Add nsIGlobalObject::HasJSGlobal(). r=mccr8
Consumers that just care about this boolean state should use this instead of
getting the JSObject* directly.

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

--HG--
extra : moz-landing-system : lando
2019-05-02 21:32:17 +00:00
Boris Zbarsky 248fcf067d Bug 1547923 part 1. Remove unused callers of GetGlobalJSObject. r=mccr8
Differential Revision: https://phabricator.services.mozilla.com/D29702

--HG--
extra : moz-landing-system : lando
2019-05-02 18:37:52 +00:00
Bryce Van Dyk e6ea35d315 Bug 1533211 - Remove assertion for if MP4 sample description index is invalid. r=jya
It's possible for a malformed mp4 to contain invalid sample description index in
fragments, that do not reference any sample description entries found in the
header. E.g. the header may contain 2 sample description entries (which should
be indexed with indices 1 and 2), but for a fragment to contain an index to 4.
Instead of asserting in this case we should gracefully fail.

Bug 1547328 plans to add logging for this case, so we have a means to still
detect failures here from bad files.

Depends on D29733

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

--HG--
extra : moz-landing-system : lando
2019-05-03 00:38:10 +00:00
Bryce Van Dyk 910dd0ad38 Bug 1533211 - Add crashtest for MP4 with a bad sample description index. r=jya
Add an mp4 with a bad sample description index to crashtests. When samples in a
fragment are encountered, they should reference a sample description entry found
in the mp4 header. However, it's possible that the index contained in the
fragment may refer to an entry that doesn't exist in the header, as in this
file.

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

--HG--
extra : moz-landing-system : lando
2019-05-03 00:38:28 +00:00
Michael Froman dbe06dee04 Bug 1548686 - only add RemoteDecoderModule in CreatePDMs if e10s. r=jya
This can cause 1proc tests to fail because no decoder ends up supporting
a format.  The particular case was enabling Vorbis decoding on RDD.

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

--HG--
extra : moz-landing-system : lando
2019-05-03 00:35:15 +00:00
Michael Froman 9b57c4ac82 Bug 1548113 - pass mEOS from MediaRawData to remote decoder. r=jya
Lack of mEOS for decoding Vorbis on RDD was causing a mochitest failure
with file spacestorm-1000Hz-100ms.ogg in dom/media/test/test_playback.html.
The symptom was an incorrect frame count here[1].

[1] https://searchfox.org/mozilla-central/rev/b59a99943de4dd314bae4e44ab43ce7687ccbbec/dom/media/platforms/agnostic/VorbisDecoder.cpp#178

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

--HG--
extra : moz-landing-system : lando
2019-05-03 00:36:19 +00:00
Bryce Van Dyk db3021c25c Bug 1533215 - Remove assert that can be triggered by malformed MP4. r=jya
The assert removed here can be triggered by malformed mp4s that lack certain
crypto info (the sinf box), but that still indicate samples are encrypted via
sample description entries.

I plan to follow up the removal here by adding logs so we have some way to
detect this case. This will be done as part of bug 1547328.

Depends on D29692

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

--HG--
extra : moz-landing-system : lando
2019-05-03 00:48:45 +00:00
Bryce Van Dyk be7276c15c Bug 1533215 - Add crashtest for MP4 with encrypted track with bad sinf. r=jya
Add an mp4 with a mangled tenc box to the crashtests. This file has been fuzzed
and appears to have had the tenc box for its second track changed to a '.enc'
box, which means it cannot be parsed. The tenc box is contained in the sinf box,
so this will bust the sinf parse. We should tolerate such bad files and not
assert and/or crash.

Driveby add a comment to another line in crashtests list to make it clear the
bug the file originally relates to.

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

--HG--
extra : moz-landing-system : lando
2019-05-03 00:49:13 +00:00
Byron Campen [:bwc] 17a80eda9c Bug 1531910: Re-enable a test-case, and check protocol length based on UTF-8 encoding. r=jib
Depends on D28252

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

--HG--
extra : moz-landing-system : lando
2019-05-02 18:27:53 +00:00
Chris Pearce c957fbd2ef Bug 1540573 - P5. Only "always throttle" media download to the readahead on cellular connections. r=jya
Normally when downloading media data we throttle the download only if we're
ahead of the read cursor more than the "readahead limit", and if we estimate
that the connection is fast enough that we'll be able to download at a rate
fast enough to playback in real time if we resume it later.

On mobile we additionally override this so that we always throttle the download
once we're ahead of the read cursor by the readahead limit. This is to save
data.  I think we can relax this to only do this override if we're on a
cellular connection; if we're on WiFi we can assume data is cheap.

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

--HG--
extra : moz-landing-system : lando
2019-05-03 02:44:31 +00:00
Chris Pearce c13f163bd6 Bug 1540573 - P4. Use larger MediaCache sizes when on cellular connection. r=jya
Differential Revision: https://phabricator.services.mozilla.com/D26233

--HG--
extra : moz-landing-system : lando
2019-05-03 02:44:05 +00:00
Chris Pearce 693f25ad50 Bug 1540573 - P3. Expose network link type on ContentChild for use in content process. r=snorp
In GeckoView the nsINetworkLinkService doesn't work in the content process, as
we don't seem to have an AndroidBridge there, so just maintain the network
connection type on the ContentChild.

(I had considered keeping this on the NeckoChild, but the creation of that is
initiated from the content process side, and there's not an easy and clean way
to have the parent process send us the connection type after construction of
the NeckoParent, other than have the NeckoChild request it either
synchronously, or doing it async and hoping it's not asked for the value before
the response comes in.)

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

--HG--
extra : moz-landing-system : lando
2019-05-03 02:43:47 +00:00
Michael Froman 8d9ae81a3d Bug 1539030 - (redux) don't attempt RDD launch unless needed. r=jya
Detect content process that already has connection to the RDD process
and don't attempt to relaunch or needlessly call
RDDProcessManager::CreateContentBridge.  Calling CreateContentBridge
unnecessarily causes churn by recreating RemoteDecoderManagerParents.

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

--HG--
extra : moz-landing-system : lando
2019-05-02 21:08:58 +00:00
alwu 6e61f3513b Bug 1540748 - part2 : add warning for negative adjusted time. r=jolin
As the purpose of adjusting time is to make the start of the playback to align to zero, so the result should not be negative.

However, we can't always ensure the demuxed start time is correct, the decoded first frame sample time might be different with the time demuxer provides.

Even if we try to update the start time when we get the first decoded sample, there is still a problem because a decoder might return samples with different order, which means the first frame the decoder returns is probably not a real first frame.

Therefore, using warning to help us knows how many this situaion would be.

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

--HG--
extra : moz-landing-system : lando
2019-04-29 21:44:06 +00:00
Alastor Wu 7d5891752c Bug 1540748 - part1 : Android decoder should throw an error when the decoded sample's time is smaller than the time of first demuxed sample. r=jolin,jya
Considering that the audio sample's time is always increased, the decoded sample's time decoder returns should always be equal or larger than its demuxed time.

When the decoded sample's time is smaller than the time of first demuxed sample, that time would probably cause a problem so we should  throw an error for that.

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

--HG--
extra : moz-landing-system : lando
2019-05-02 17:58:05 +00:00
Alastor Wu 01946df64d Bug 1540748 - part0 : mark functions const. r=jya
There functions won't change any internal variables, so they should be marked as const.

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

--HG--
extra : moz-landing-system : lando
2019-05-02 00:51:54 +00:00
Alastor Wu b0343f16e5 Bug 1546655 - Skip 'flac-s24.flac' and 'opus-mapping2.webm' in test_streams_element_capture.html r=padenot
Differential Revision: https://phabricator.services.mozilla.com/D29594

--HG--
extra : moz-landing-system : lando
2019-05-02 17:48:33 +00:00
Valentin Millet d934ec2ff8 Bug 1530178 - copyFromChannel/copyToChannel until end of buffer when destination/source is longer r=padenot,karlt
than available space, as clarified in https://github.com/WebAudio/web-audio-api/issues/1004

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

--HG--
extra : moz-landing-system : lando
2019-05-02 09:24:57 +00:00
Haik Aftandilian 58067ff840 Bug 1548406 - Part 1 - Simplify MacSandboxInfo and sandbox type enums r=handyman
Replace the MacSandboxType_Plugin sandbox type with MacSandboxType_Flash and MacSandboxType_GMP so that there is a 1:1 association between MacSandboxType values and sandbox policies.

Remove the MacSandboxPluginType enum. Instead of having different MacSandboxPluginTypes, we will just have MacSandboxType_GMP. We only use GMP for two plugin types, Widevine and OpenH264, and they only differ in that Widevine requires accss to the WindowServer.

Remove the MacSandboxPluginInfo struct and move the two needed fields pluginPath and pluginBinaryPath to MacSandboxInfo.

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

--HG--
extra : moz-landing-system : lando
2019-05-02 07:04:44 +00:00
Noemi Erli 54a0234766 Backed out 6 changesets (bug 1540573) for failures in test_CSP.html
Backed out changeset 599e6e06599d (bug 1540573)
Backed out changeset bf725b7daa5b (bug 1540573)
Backed out changeset 814c94b26028 (bug 1540573)
Backed out changeset 3496ca48f6e0 (bug 1540573)
Backed out changeset 2c4303b175ec (bug 1540573)
Backed out changeset b49cd2b191ae (bug 1540573)
2019-05-02 06:41:33 +03:00
Chris Pearce 4c240bf871 Bug 1540573 - P5. Only "always throttle" media download to the readahead on cellular connections. r=jya
Normally when downloading media data we throttle the download only if we're
ahead of the read cursor more than the "readahead limit", and if we estimate
that the connection is fast enough that we'll be able to download at a rate
fast enough to playback in real time if we resume it later.

On mobile we additionally override this so that we always throttle the download
once we're ahead of the read cursor by the readahead limit. This is to save
data.  I think we can relax this to only do this override if we're on a
cellular connection; if we're on WiFi we can assume data is cheap.

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

--HG--
extra : moz-landing-system : lando
2019-05-01 23:48:17 +00:00
Chris Pearce 217bd1680c Bug 1540573 - P4. Use larger MediaCache sizes when on cellular connection. r=jya
Differential Revision: https://phabricator.services.mozilla.com/D26233

--HG--
extra : moz-landing-system : lando
2019-05-01 23:48:13 +00:00
Chris Pearce 8ad76b6460 Bug 1540573 - P3. Expose network link type on ContentChild for use in content process. r=snorp
In GeckoView the nsINetworkLinkService doesn't work in the content process, as
we don't seem to have an AndroidBridge there, so just maintain the network
connection type on the ContentChild.

(I had considered keeping this on the NeckoChild, but the creation of that is
initiated from the content process side, and there's not an easy and clean way
to have the parent process send us the connection type after construction of
the NeckoParent, other than have the NeckoChild request it either
synchronously, or doing it async and hoping it's not asked for the value before
the response comes in.)

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

--HG--
extra : moz-landing-system : lando
2019-05-01 23:46:23 +00:00
Alastor Wu b8d3f16ea7 Bug 1535005 - part2 : add test. r=jya
Differential Revision: https://phabricator.services.mozilla.com/D29095

--HG--
extra : moz-landing-system : lando
2019-05-01 23:02:38 +00:00
Jean-Yves Avenard 703b321635 Bug 1532867 - Force unsigned arithmetic. r=gerald
"For negative a, the behavior of a << b is undefined." https://en.cppreference.com/w/cpp/language/operator_arithmetic

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

--HG--
extra : moz-landing-system : lando
2019-05-01 07:20:23 +00:00
Jean-Yves Avenard da336c5aa4 Bug 1532849 - Prevent arithmetic overflow. r=bryce
Differential Revision: https://phabricator.services.mozilla.com/D29461

--HG--
extra : moz-landing-system : lando
2019-05-01 23:13:34 +00:00
Jean-Yves Avenard 8926b1a54d Bug 1534156 - Get around int32_t to float rounding error. r=bryce
float(INT32_MAX); gets compiled into 2.14748365E+9 using clang, which is slightly bigger than INT32_MAX, as such 2.14748365E+9 <= INT32_MAX will return true (as INT32_MAX gets converted to a float)

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

--HG--
extra : moz-landing-system : lando
2019-05-01 23:11:56 +00:00
Dan Minor 4d0f83f387 Bug 1497559 - Remove Application from mediaCaptureWindowState; r=jib
Differential Revision: https://phabricator.services.mozilla.com/D28093

--HG--
extra : moz-landing-system : lando
2019-04-30 15:06:23 +00:00
Dan Minor 522725a730 Bug 1497559 - Remove application capture support; r=ng
This removes all references to application capture except from MediaSourceEnum.
That was left in place so as to not change the enumerated values used
for WEBRTC_GET_USER_MEDIA_TYPE telemetry.

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

--HG--
extra : moz-landing-system : lando
2019-04-26 16:35:39 +00:00
Sylvestre Ledru e226046cb8 Bug 1547143 - Format the tree: Be prescriptive with the pointer style (left) r=Ehsan
# ignore-this-changeset

Depends on D28954

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

--HG--
extra : moz-landing-system : lando
2019-05-01 08:47:10 +00:00
Andreas Pehrson e8b6f83dce Bug 1538727 - Move TrackListener and track-PrincipalChangeObserver removal to Stop(). r=bryce
These are added in start, and we get into unexpected state if they notify us
after Stop() (when MediaEncoder shuts down and internally removes the tracks
it is encoding) but before Shutdown() when we remove the listeners. This is not
symmetrical. The proper thing to do is to remove these listeners in Stop() as
well.

Depends on D29080

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

--HG--
extra : moz-landing-system : lando
2019-04-30 18:39:21 +00:00
Andreas Pehrson 7485192753 Bug 1538727 - Add crashtest. r=bryce
Differential Revision: https://phabricator.services.mozilla.com/D29080

--HG--
extra : moz-landing-system : lando
2019-04-30 18:39:11 +00:00
Jan-Ivar Bruaroey 6b8d3b7ad8 Bug 1335740 - Update wpt & mochitests to work w/[SecureContext] navigator.mediaDevices. r=pehrsons
Differential Revision: https://phabricator.services.mozilla.com/D20425

--HG--
rename : testing/web-platform/meta/mediacapture-streams/MediaDevices-getSupportedConstraints.html.ini => testing/web-platform/meta/mediacapture-streams/MediaDevices-getSupportedConstraints.https.html.ini
rename : testing/web-platform/tests/mediacapture-streams/MediaDevices-getSupportedConstraints.html => testing/web-platform/tests/mediacapture-streams/MediaDevices-getSupportedConstraints.https.html
extra : moz-landing-system : lando
2019-04-30 15:20:53 +00:00
Jan-Ivar Bruaroey 51b1caf0cd Bug 1335740 - getUserMedia() Add 2 prefs to control A) NotAllowedError in http (pref'd on), and B) [SecureContext] navigator.mediaDevices (pref'd off) r=bzbarsky,pehrsons
Differential Revision: https://phabricator.services.mozilla.com/D19549

--HG--
extra : moz-landing-system : lando
2019-04-30 15:20:59 +00:00
Bryce Van Dyk 11a3061e0d Bug 1540580 - Add crashtest for WebM with 0 sized samples. r=jya
Depends on D25846

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

--HG--
extra : moz-landing-system : lando
2019-04-30 15:12:49 +00:00
Bryce Van Dyk 378a61073b Bug 1540580 - WebM demuxer skips empty samples. r=jya
The mp4 demuxer already does this, so have the WebM case follow suit. This
avoids asserts with creating 0 size shmems in the case where the demuxer is
being used with the remote data decoder.

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

--HG--
extra : moz-landing-system : lando
2019-04-30 15:12:30 +00:00
Byron Campen [:bwc] f28444a083 Bug 1531803 - Part 6: Fire track events when that track has been added to a stream. r=jib,smaug
Differential Revision: https://phabricator.services.mozilla.com/D25799

--HG--
extra : moz-landing-system : lando
2019-04-29 15:52:03 +00:00
Byron Campen [:bwc] fc0aece742 Bug 1531803 - Part 5: Rework local track checking in our mochitests to ignore track ids, and decruft. r=jib
Differential Revision: https://phabricator.services.mozilla.com/D25798

--HG--
extra : moz-landing-system : lando
2019-04-29 15:52:00 +00:00
Byron Campen [:bwc] c95b46bd72 Bug 1531803 - Part 4: Remove some track-id-centric ChromeOnly API on RTCRtpTransceiver. r=jib,smaug
Differential Revision: https://phabricator.services.mozilla.com/D25797

--HG--
extra : moz-landing-system : lando
2019-04-29 15:52:00 +00:00
Byron Campen [:bwc] 02c4274c5e Bug 1546691: Avoid the PCObserver going away spontaneously when network is lost. r=mjf
Differential Revision: https://phabricator.services.mozilla.com/D28839

--HG--
extra : moz-landing-system : lando
2019-04-27 16:29:21 +00:00
Cosmin Sabou b756e6d007 Backed out 2 changesets (bug 1540748) for causing more crashes (bug 1547604). a=backout
Backed out changeset 57b12599afe2 (bug 1540748)
Backed out changeset 8c9fc50e48c2 (bug 1540748)
2019-04-29 12:55:04 +03:00
Alastor Wu 31a6a91d20 Bug 1540748 - part2 : add warning for negative adjusted time. r=jolin
As the purpose of adjusting time is to make the start of the playback to align to zero, so the result should not be negative.

However, we can't always ensure the demuxed start time is correct, the decoded first frame sample time might be different with the time demuxer provides.

Even if we try to update the start time when we get the first decoded sample, there is still a problem because a decoder might return samples with different order, which means the first frame the decoder returns is probably not a real first frame.

Therefore, using warning to help us knows how many this situaion would be.

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

--HG--
extra : moz-landing-system : lando
2019-04-26 22:30:06 +00:00
Alastor Wu 285ab3ee11 Bug 1540748 - part1 : Android decoder should throw an error when the decoded sample's time is smaller than the time of first demuxed sample. r=jolin
Considering that the audio sample's time is always increased, the decoded sample's time decoder returns should always be equal or larger than its demuxed time.

When the decoded sample's time is smaller than the time of first demuxed sample, that time would probably cause a problem so we should  throw an error for that.

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

--HG--
extra : moz-landing-system : lando
2019-04-25 21:47:53 +00:00
Byron Campen [:bwc] 67bd1aa6e8 Bug 1531894: Throw TypeError if both maxRetransmits and maxPacketLifeTime are set, and re-enable test case. r=jib
Differential Revision: https://phabricator.services.mozilla.com/D28252

--HG--
extra : moz-landing-system : lando
2019-04-26 15:56:15 +00:00
Byron Campen [:bwc] fd880e95f8 Bug 1545827: Use TabId instead of PBrowserOrId, use LoadInfoArgs to avoid using the system principal on the socket process, and use PSocketProcess for the WebrtcProxyChannel when on the socket process. r=kershaw,mjf
Differential Revision: https://phabricator.services.mozilla.com/D28239

--HG--
extra : moz-landing-system : lando
2019-04-26 14:46:26 +00:00
Dorel Luca b82106b756 Backed out changeset 8c4a85bb16bc (bug 1531894) for WPT failures in /webrtc/RTCPeerConnection-createDataChannel.html 2019-04-26 05:24:22 +03:00
Emilio Cobos Álvarez 11ea945833 Bug 1546697 - Use a consistent style for enum classes in layout. r=dholbert
Per the discussion in:

  https://groups.google.com/d/msg/mozilla.dev.platform/P79pwa9z5m8/iPYPAWPHCAAJ

They should be CamelCase, and that's what most of them already do. This converts
the rest, which are a few.

For the ones that already used `e` or `k` prefixes, I've mostly done:

 for file in $(rg Type::e layout | cut -d : -f 1 | sort | uniq); do sed -i 's#Type::e#Type::#g' $file; done

For the ones that used uppercase, I've removed the prefix if it was already in
the type name, and turn them into CamelCase.

Depends on D28680

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

--HG--
extra : moz-landing-system : lando
2019-04-25 23:03:04 +00:00
Byron Campen [:bwc] 1963cd0a3a Bug 1531894: Throw TypeError if both maxRetransmits and maxPacketLifeTime are set, and re-enable test case. r=jib
Differential Revision: https://phabricator.services.mozilla.com/D28252

--HG--
extra : moz-landing-system : lando
2019-04-25 20:59:45 +00:00
Byron Campen [:bwc] 79f14c2299 Bug 1529595: Remove "token" from RTCIceCredentialType, re-enable a web-platform-test, and fix a mochitest. r=smaug,jib
Differential Revision: https://phabricator.services.mozilla.com/D28496

--HG--
extra : moz-landing-system : lando
2019-04-25 20:58:12 +00:00
Bryce Van Dyk 2862090894 Bug 1545108 - Use a diagnostic assert to check for nullptr when pushing into MediaQueue. r=alwu
We're rarely getting nullptrs out of MediaQueues. It's not clear where these are
coming from, as we have many guards against them. Upgrade this assert to a
diagnostic to help us track the source and determine if the value is null before
entering the queue.

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

--HG--
extra : moz-landing-system : lando
2019-04-25 17:08:27 +00:00
Andreas Pehrson cef48c8ec4 Bug 1545133 - Avoid trying to double-suspend a MediaStream if external code makes the suspendCount negative. r=padenot
We don't currently know any ways in which external code can make the
suspendCount negative, but this will keep us safe should a future bug enable it.

Depends on D28805

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

--HG--
extra : moz-landing-system : lando
2019-04-25 16:41:15 +00:00
Andreas Pehrson b53e315572 Bug 1545133 - Add crashtest. r=padenot
Differential Revision: https://phabricator.services.mozilla.com/D28805

--HG--
extra : moz-landing-system : lando
2019-04-25 16:41:33 +00:00
Masayuki Nakano 2933c032e7 Bug 1545342 - part 3: Move remaining public enum of nsIPresShell to mozilla namespace in mozilla/PresShellForwards.h and make them enum class r=smaug
This patch moves remaining public `enum` of `nsIPresShell` to `mozilla`
namespace in `mozilla/PresShellForwards.h` and make them `enum class`es.

Additionally, some methods which use the moving `enum`s from `nsIPresShell`
to `PresShell`.

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

--HG--
extra : moz-landing-system : lando
2019-04-25 05:04:23 +00:00
shindli ff6b6815f1 Backed out 2 changesets (bug 1540748) for causing perma assertion failure !mTime.IsNegative(), at /builds/worker/workspace/build/src/dom/media/MediaData.h:303 CLOSED TREE
Backed out changeset d8cb636260a0 (bug 1540748)
Backed out changeset 27bcf73686ed (bug 1540748)
2019-04-24 21:07:15 +03:00
Alastor Wu 1df4ea356e Bug 1546324 - use TimeUnit version modular. r=bryce
The value of `mAudioDecodedDuration` can be larger than `int32`, so we should use the modular function which accepts `TimeUnit`as a input.

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

--HG--
extra : moz-landing-system : lando
2019-04-24 17:21:01 +00:00
Alastor Wu f9ae0149f6 Bug 1546506 - Add an assertion to ensure that we won't construct SeekTarget with invalid time. r=bryce
We should only use valid time to construct a `SeekTarget`, because we can't get the value from the invalid time.

This can help us to prevent having a crash when request data value from an invalid time.

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

--HG--
extra : moz-landing-system : lando
2019-04-24 17:07:40 +00:00
Michael Froman 9563f008ce Bug 1545575 - stop RDD process cleanly if linux sandbox fails to init. r=bryce
Differential Revision: https://phabricator.services.mozilla.com/D28663

--HG--
extra : moz-landing-system : lando
2019-04-24 16:55:03 +00:00
Alastor Wu 57885dc99c Bug 1540748 - part2 : adjusted time should always be non-negative. r=jolin
As the purpose of adjusting time is to make the start of the playback to align to zero, so the result should not be negative.

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

--HG--
extra : moz-landing-system : lando
2019-04-24 15:05:39 +00:00
Alastor Wu 4e0420416f Bug 1540748 - part1 : Android decoder should throw an error when the decoded sample's time is smaller than the time of first demuxed sample. r=jolin
Considering that the audio sample's time is always increased, the decoded sample's time decoder returns should always be equal or larger than its demuxed time.

When the decoded sample's time is smaller than the time of first demuxed sample, that time would probably cause a problem so we should  throw an error for that.

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

--HG--
extra : moz-landing-system : lando
2019-04-24 15:16:58 +00:00
Andreas Pehrson 4021f52e46 Bug 1546655 - Fix test filtering in test_streams_element_capture.html. r=padenot
Differential Revision: https://phabricator.services.mozilla.com/D28666

--HG--
extra : moz-landing-system : lando
2019-04-24 14:49:23 +00:00
Andreas Pehrson b3f586c723 Bug 1546655 - Skip ambisonics.mp4 in test_streams_element_capture.html. r=padenot
Differential Revision: https://phabricator.services.mozilla.com/D28651

--HG--
extra : moz-landing-system : lando
2019-04-24 14:00:53 +00:00
Andreas Pehrson 1e4382f9fb Bug 1544650 - Always pre-create MediaStreamTracks for DecodedStream in MediaDecoder. r=padenot
This moves the responsibility for creating MediaStreamTracks from
DecodedStream::Start to MediaDecoder. This let's MediaDecoder create them as
soon as metadata is known. This gives the application guarantees on when tracks
can be expected to exist, and aligns with the spec that says they should be
created when metadata is known.

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

--HG--
extra : moz-landing-system : lando
2019-04-23 16:46:30 +00:00
Andreas Pehrson eaf1537b05 Bug 1544650 - Add mochitest. r=padenot
Differential Revision: https://phabricator.services.mozilla.com/D28472

--HG--
extra : moz-landing-system : lando
2019-04-23 16:46:45 +00:00
Andreas Pehrson 2cab1f445f Bug 1536766 - End a track only after the graph has reported reaching its end time in DecodedStream. r=jya,padenot
This gives us a guarantee that the first frame of a media file can be rendered
with a second media element and mozCaptureStream(), even if the file is very
very short.

With longer video-only files there were also cases where nothing ended up being
rendered. Probably because the MediaStreamGraph ended up switching from an
AudioCallbackDriver to a SystemClockDriver and this took enough time to put the
SourceMediaStream::EndTrack and the SourceMediaStream::AddTrackListener calls
for this video track to be processed in the same iteration. The listener would
then always lose to the ending track and update main thread state too late,
leading to its media element not rendering any frames and nasty intermittent
failures.

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

--HG--
extra : moz-landing-system : lando
2019-04-24 10:56:16 +00:00
Andreas Pehrson 8734620d4d Bug 1536766 - Drop frames more accurately when ending and interrupting video track playback. r=padenot
Differential Revision: https://phabricator.services.mozilla.com/D27269

--HG--
extra : moz-landing-system : lando
2019-04-24 10:56:11 +00:00
Andreas Pehrson 58af5d4443 Bug 1536766 - Make NotifyOutput from SourceMediaStream tracks reflect amount of data in the track. r=padenot
`streamCurrentTime` is relative to the start of the stream, as is the track's
segment. We need to account for the track's start time in the stream when
notifying of output.

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

--HG--
extra : moz-landing-system : lando
2019-04-24 10:56:04 +00:00
Andreas Pehrson 977b049e15 Bug 1536766 - Better handle overlapping video frames in DecodedStream::SendVideo. r=jya
A case where this wasn't working was bipbop-lateaudio.mp4, where the last frame
has duration 0 and starts and ends before the previous frame has ended. The
VideoSink still renders this frame at the end of playback, so this patch
brings DecodedStream closer to that behavior by rendering all frames with a
start time after the previous frame's start time. The track's duration is still
based on absolute times so things don't blow up.

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

--HG--
extra : moz-landing-system : lando
2019-04-24 10:55:55 +00:00
Andreas Pehrson 39580a0cf7 Bug 1536766 - Remove unused MediaStream::HasCurrentData. r=padenot
Differential Revision: https://phabricator.services.mozilla.com/D27266

--HG--
extra : moz-landing-system : lando
2019-04-24 10:55:50 +00:00
Andreas Pehrson fc3f15c331 Bug 1536766 - Assert that time always goes forward in DecodedStream. r=jya
Differential Revision: https://phabricator.services.mozilla.com/D27265

--HG--
extra : moz-landing-system : lando
2019-04-24 10:55:48 +00:00
Andreas Pehrson 2c9b92be1f Bug 1536766 - Handle DecodedStream's resets when calculating VideoChunk durations in the MSG. r=padenot
This is necessary to get an accurate total track duration in case DecodedStream
does a lot of seeking and pausing.

This also removes previous code for avoiding blocking a video track, as this new
code handles that case too.

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

--HG--
extra : moz-landing-system : lando
2019-04-24 10:55:46 +00:00
Andreas Pehrson 19834afbea Bug 1536766 - Don't ignore null frames in MediaStreamGraph. r=padenot
Null frames could still be valid. It's how DecodedStream signals a pause. They
could also be valid and have an intrinsic size and the force-black flag set.

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

--HG--
extra : moz-landing-system : lando
2019-04-24 10:55:41 +00:00
Andreas Pehrson cc6262e7c7 Bug 1536766 - Fix a rounding error in DecodedStream. r=jya
Differential Revision: https://phabricator.services.mozilla.com/D27262

--HG--
extra : moz-landing-system : lando
2019-04-24 10:55:37 +00:00
Andreas Pehrson ee433bc6ed Bug 1536766 - Send a black dummy frame out when a video track that contained no frames ends. r=jya
This is similar to what VideoSink does, and is required for us to end playback
on HAVE_CURRENT_DATA (a frame for currentTime must be available).

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

--HG--
extra : moz-landing-system : lando
2019-04-24 10:55:35 +00:00
Andreas Pehrson 93d09c009d Bug 1536766 - Follow the video clock when audio ends early in DecodedStream. r=jya
Differential Revision: https://phabricator.services.mozilla.com/D27260

--HG--
extra : moz-landing-system : lando
2019-04-24 10:53:52 +00:00
Andreas Pehrson 232e24cd08 Bug 1536766 - Re-label two files in gPlayTests as video, since they contain video tracks. r=jya
Differential Revision: https://phabricator.services.mozilla.com/D27258

--HG--
extra : moz-landing-system : lando
2019-04-24 10:53:31 +00:00
Andreas Pehrson 89b1d846dc Bug 1536766 - Switch test_streams_element_capture.html to test all gPlayTests. r=jya
This tests HTMLMediaElement::MozCaptureStream on all of our play-tests, rather
than just a single test, in order to test more corner cases in the capture code.

Because this test checks that the media element that's playing the
mozCaptureStream()-stream ends after at least the duration of the original media
file, and because media elements playing a MediaStream have a `currentTime`
based on the MediaStreamGraph's monotonically increasing clock, we need to have
accurate metadata for how long the duration of the content of the original media
file is. There are several cases among the play-tests where the duration
metadata doesn't match what the decoder gives us -- the reason is often preroll
or corrupt containers. This patch updates manifest.js with `contentDuration` for
the tests among `gPlayTests` where try detected mismatches.

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

--HG--
extra : moz-landing-system : lando
2019-04-24 10:53:24 +00:00
Razvan Maries 98d200e4b4 Backed out changeset 7b326aa4930c (bug 1545416) for causing multiple perma failures. CLOSED TREE 2019-04-23 22:29:36 +03:00
Alastor Wu c58212fe27 Bug 1544023 - let AudioNode keep the reference of all AudioParams which belong to itself. r=padenot
When we suspend or resume the `AudioContext`, it should affect ALL media streams which belong to or are related to the `AudioNode` that are created by this `AudioContext`.

As `AudioNode::OutputParams()` can only return the connected AudioParams, it doesn't return the AudioParams which are belong to itself. That means we would miss to apply the suspend/resume operation for those streams, and it would cause imbalancing suspended count.

Therefore, we let `AudioNode` to keep the reference of all its AudioParam, and return them to `AudioContext` in order to do the operation for all streams.

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

--HG--
extra : moz-landing-system : lando
2019-04-23 17:50:54 +00:00
Alex Chronopoulos aabdaf534f Bug 1545416 - Make the remote decoder shutdown async. r=mjf
Create a new IPDL message `ShutdownComplete`, direction from parent (RDD) to child (content), to inform the child when the decoder shutdown has been completed. The remote decoder child uses that message to resolve the shutdown promise.

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

--HG--
extra : moz-landing-system : lando
2019-04-23 17:23:33 +00:00
Edwin Gao 9994405ece Bug 1544961 - comment on gtests that are disabled, disable ThreadUtils.IdleRunnableMethod and Timers.FindExpirationTime for windows10-aarch64 r=jmaher,gbrown,dmajor
Changes:
- added comments for tests being disabled
- disabled two additional tests in order to green the run

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

--HG--
extra : moz-landing-system : lando
2019-04-23 00:21:37 +00:00
Sylvestre Ledru a1dce6440a Bug 1519636 - Reformat recent changes to the Google coding style r=Ehsan
# ignore-this-changeset

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

--HG--
extra : moz-landing-system : lando
2019-04-22 16:35:03 +00:00
Jean-Yves Avenard 7ec9b68802 Bug 1542097 - Directly downmix to mono. r=bryce
No need to first downmix to stereo and then mono.

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

--HG--
extra : moz-landing-system : lando
2019-04-22 13:27:42 +00:00
Narcis Beleuzu 6034867601 Bug 1480942 - Disable test_peerConnection_twoAudioVideoStreamsCombined.html on Linux asan r=jmaher
Differential Revision: https://phabricator.services.mozilla.com/D28326

--HG--
extra : moz-landing-system : lando
2019-04-22 11:36:49 +00:00
Andrew McCreight f242e71c8a Bug 1545822 - Clean up some whitespace in XPIDL files. r=froydnj
The attributes for an interface should be on the line right before the
interface.

Interface attributes should be separated by spaces.

Clean up some trailing whitespace in widget/.

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

--HG--
extra : moz-landing-system : lando
2019-04-21 01:47:00 +00:00
Michael Froman 62655b5d62 Bug 1515497 - pt 1 - eliminate fall back to av1 decoding on content process when RDD enabled. r=bryce
If the RDD process is enabled and fails to start properly for some reason,
make sure we cannot accidentally fall back to decoding AV1 on the content
process.

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

--HG--
extra : moz-landing-system : lando
2019-04-19 21:11:25 +00:00
Alastor Wu 5e55c84124 Bug 1544150 - add new operator'%' to handle modular by TimeUnit. r=jya
As operator`%` would need to handle `TimeUnit` as a input as well, we add new operator function.

Also use `int64` as a input parameter for another two operator functions `%` and `/` in order to add assertion to ensure that the input won't overflow.

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

--HG--
extra : moz-landing-system : lando
2019-04-19 13:16:43 +00:00
Alex Chronopoulos bd827c189f Bug 1541290 - Close audio input from main thread to ensure that the message is not executed on a closed graph. r=pehrsons
CloseAudioInut method posts a message, to the graph thread, in order to close the input asynchonously. When CloseAudioInput method was being executed from a thread other than the main thread, a runnable would be posted to main thread in order to post the async message from there. That was a risky path because when the graph was shutting down there were no guarantee that the close-input message would reach the graph thread before destroy takes place. By limiting CloseAudioInput to main thread it is ensured that the close-input message will be executed before destroy.

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

--HG--
extra : moz-landing-system : lando
2019-04-18 18:35:20 +00:00
Alex Chronopoulos 5fc615519b Bug 1541290 - Restart driver properly on revive method. r=padenot
Revive method of AudioCallbackDriver was wrong because it was re-initializing an already initialized driver. That was hitting an assert. Instead of that it should stop the drained stream and start it again. Also, mStarted member should be reset properly on the stop method.

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

--HG--
extra : moz-landing-system : lando
2019-04-19 08:34:22 +00:00
Ciure Andrei add7a3fb9e Backed out 14 changesets (bug 1536766) for causing RunWatchdog and mediaElementAudioSource wpt failures CLOSED TREE
Backed out changeset 72d37a08f281 (bug 1536766)
Backed out changeset 63fc85885060 (bug 1536766)
Backed out changeset addbb04415cb (bug 1536766)
Backed out changeset f2923dfcf33c (bug 1536766)
Backed out changeset 25f3a33ec51b (bug 1536766)
Backed out changeset 199efe6aec59 (bug 1536766)
Backed out changeset f9d1f1bfe2b1 (bug 1536766)
Backed out changeset 87616997f160 (bug 1536766)
Backed out changeset 36f99fa3c956 (bug 1536766)
Backed out changeset 000260ba28de (bug 1536766)
Backed out changeset 6386ed1b7d74 (bug 1536766)
Backed out changeset ab27d9f5902a (bug 1536766)
Backed out changeset 4f6d240c210d (bug 1536766)
Backed out changeset 3e0e3030314d (bug 1536766)
2019-04-19 05:55:57 +03:00
Andreas Pehrson 92cc59ab5b Bug 1536766 - End a track only after the graph has reported reaching its end time in DecodedStream. r=jya,padenot
This gives us a guarantee that the first frame of a media file can be rendered
with a second media element and mozCaptureStream(), even if the file is very
very short.

With longer video-only files there were also cases where nothing ended up being
rendered. Probably because the MediaStreamGraph ended up switching from an
AudioCallbackDriver to a SystemClockDriver and this took enough time to put the
SourceMediaStream::EndTrack and the SourceMediaStream::AddTrackListener calls
for this video track to be processed in the same iteration. The listener would
then always lose to the ending track and update main thread state too late,
leading to its media element not rendering any frames and nasty intermittent
failures.

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

--HG--
extra : moz-landing-system : lando
2019-04-18 15:25:54 +00:00
Andreas Pehrson 1811dcc135 Bug 1536766 - Drop frames more accurately when ending and interrupting video track playback. r=padenot
Differential Revision: https://phabricator.services.mozilla.com/D27269

--HG--
extra : moz-landing-system : lando
2019-04-18 15:24:27 +00:00
Andreas Pehrson 27c622fc65 Bug 1536766 - Make NotifyOutput from SourceMediaStream tracks reflect amount of data in the track. r=padenot
`streamCurrentTime` is relative to the start of the stream, as is the track's
segment. We need to account for the track's start time in the stream when
notifying of output.

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

--HG--
extra : moz-landing-system : lando
2019-04-18 15:25:51 +00:00
Andreas Pehrson cdbaaceba1 Bug 1536766 - Better handle overlapping video frames in DecodedStream::SendVideo. r=jya
A case where this wasn't working was bipbop-lateaudio.mp4, where the last frame
has duration 0 and starts and ends before the previous frame has ended. The
VideoSink still renders this frame at the end of playback, so this patch
brings DecodedStream closer to that behavior by rendering all frames with a
start time after the previous frame's start time. The track's duration is still
based on absolute times so things don't blow up.

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

--HG--
extra : moz-landing-system : lando
2019-04-18 15:24:12 +00:00
Andreas Pehrson e63ff93e4d Bug 1536766 - Remove unused MediaStream::HasCurrentData. r=padenot
Differential Revision: https://phabricator.services.mozilla.com/D27266

--HG--
extra : moz-landing-system : lando
2019-04-18 15:24:12 +00:00
Andreas Pehrson a490889c8d Bug 1536766 - Assert that time always goes forward in DecodedStream. r=jya
Differential Revision: https://phabricator.services.mozilla.com/D27265

--HG--
extra : moz-landing-system : lando
2019-04-18 15:23:57 +00:00
Andreas Pehrson 120d5e5971 Bug 1536766 - Handle DecodedStream's resets when calculating VideoChunk durations in the MSG. r=padenot
This is necessary to get an accurate total track duration in case DecodedStream
does a lot of seeking and pausing.

This also removes previous code for avoiding blocking a video track, as this new
code handles that case too.

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

--HG--
extra : moz-landing-system : lando
2019-04-18 15:23:59 +00:00
Andreas Pehrson 834eeba666 Bug 1536766 - Don't ignore null frames in MediaStreamGraph. r=padenot
Null frames could still be valid. It's how DecodedStream signals a pause. They
could also be valid and have an intrinsic size and the force-black flag set.

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

--HG--
extra : moz-landing-system : lando
2019-04-18 15:23:46 +00:00
Andreas Pehrson 24bb7e9684 Bug 1536766 - Fix a rounding error in DecodedStream. r=jya
Differential Revision: https://phabricator.services.mozilla.com/D27262

--HG--
extra : moz-landing-system : lando
2019-04-18 15:27:05 +00:00
Andreas Pehrson 4fd9a5752f Bug 1536766 - Send a black dummy frame out when a video track that contained no frames ends. r=jya
This is similar to what VideoSink does, and is required for us to end playback
on HAVE_CURRENT_DATA (a frame for currentTime must be available).

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

--HG--
extra : moz-landing-system : lando
2019-04-18 15:23:28 +00:00
Andreas Pehrson 361b4b399b Bug 1536766 - Follow the video clock when audio ends early in DecodedStream. r=jya
Differential Revision: https://phabricator.services.mozilla.com/D27260

--HG--
extra : moz-landing-system : lando
2019-04-18 15:23:22 +00:00
Andreas Pehrson 59ec9cbd9a Bug 1536766 - Re-label two files in gPlayTests as video, since they contain video tracks. r=jya
Differential Revision: https://phabricator.services.mozilla.com/D27258

--HG--
extra : moz-landing-system : lando
2019-04-18 15:23:07 +00:00
Andreas Pehrson a061045b8b Bug 1536766 - Switch test_streams_element_capture.html to test all gPlayTests. r=jya
This tests HTMLMediaElement::MozCaptureStream on all of our play-tests, rather
than just a single test, in order to test more corner cases in the capture code.

Because this test checks that the media element that's playing the
mozCaptureStream()-stream ends after at least the duration of the original media
file, and because media elements playing a MediaStream have a `currentTime`
based on the MediaStreamGraph's monotonically increasing clock, we need to have
accurate metadata for how long the duration of the content of the original media
file is. There are several cases among the play-tests where the duration
metadata doesn't match what the decoder gives us -- the reason is often preroll
or corrupt containers. This patch updates manifest.js with `contentDuration` for
the tests among `gPlayTests` where try detected mismatches.

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

--HG--
extra : moz-landing-system : lando
2019-04-18 15:23:05 +00:00
Rob Wu 4a6f84f91d Bug 1544834 - Replace deprecated generics in test code r=evilpie
- `Array.map` becomes `Array.from`
- Array copying via `Array.slice` becomes `Array.from`.
- `Array.forEach` that did not rely on closures becomes `for`-`of` loops.
- Anything else: `Array.X` becomes `Array.prototype.X`.

Complex cases:

dom/bindings/test/TestInterfaceJS.js and
dom/bindings/test/test_exception_options_from_jsimplemented.html
use `Array.indexOf` to generate an error with a specific error message.
Switched to `Array.prototype.forEach` to generate the same error.

js/src/jit-test/tests/basic/exception-column-number.js
In this test `Array.indexOf()` is used to generate an error. Since the
exact message doesn't matter, I switched to `Array.from()`.

Intentionally not changed:

editor/libeditor/tests/browserscope/lib/richtext/richtext/js/range.js
Did not modify because this is 3rd-party code and the code uses
feature detection as a fall back when Array generics are not used.

testing/talos/talos/tests/dromaeo/lib/mootools.js
Did not modify because mootools adds the `Array.slice` method to the
`Array` object.

Not changed because they check the implementation of Array generics:
js/src/jit-test/tests/basic/arrayNatives.js
js/src/jit-test/tests/basic/bug563243.js
js/src/jit-test/tests/basic/bug618853.js
js/src/jit-test/tests/basic/bug830967.js
js/src/jit-test/tests/jaeger/recompile/bug656753.js
js/src/jit-test/tests/self-hosting/alternate-static-and-instance-array-extras.js
js/src/tests/non262/Array/generics.js
js/src/tests/non262/Array/regress-415540.js
js/src/tests/non262/extensions/regress-355497.js
js/src/tests/non262/extensions/typedarray-set-neutering.js

Depends on D27802

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

--HG--
extra : moz-landing-system : lando
2019-04-17 19:03:19 +00:00
Brian Grinstead 381332c51e Bug 1544051 - Part 3 - Scripted change to remove references to AddTask.js r=ahal
This was generated with the script at https://bug1544051.bmoattachments.org/attachment.cgi?id=9058672

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

--HG--
extra : moz-landing-system : lando
2019-04-18 16:51:01 +00:00
Alex Chronopoulos 1af9f39b96 Bug 1543350 - don't shut-down taskqueue early. r=jya,mjf
Shutting down the taskqueue early prevents the decoder's tasks to be queued.

A TaskQueue no longer requires to be explicitly shutdown it will shutdown when ref counter drops to zero.

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

--HG--
extra : moz-landing-system : lando
2019-04-18 08:23:59 +00:00
Edwin Gao 4b2a06ae0f Bug 1544961 - disable tests that cause gtest harness to crash on windows10-aarch64 r=jmaher,gbrown
Changes:
- most tests are skipped using `moz.build` configuration file.
- `MultiWriterQueue` had to be skipped with `define` clauses in the test file due to build bustages when its `moz.build` file was used.

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

--HG--
extra : moz-landing-system : lando
2019-04-17 23:12:19 +00:00
Bryce Van Dyk 9d7ff90686 Bug 1538206 - Update comments in MediaKeySystemAccess to reflect current numbering in spec. r=cpearce
The spec referenced in the comments in code has been updated since the code was
originally written. As such, some of the sections referenced in code comments
now have different numbering. Update the comments to reflect this.

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

--HG--
extra : moz-landing-system : lando
2019-04-16 19:38:46 +00:00
Alastor Wu ff87bca9a9 Bug 1540746 - TimeUnitToFrames() should handle the case where the input TimeUnit is overflow. r=jya
If the input has been overflow, we don't need to calculate frames and will directly return invalid result to let caller handle the error.

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

--HG--
extra : moz-landing-system : lando
2019-04-16 18:22:51 +00:00
arthur.iakab b573fad459 Backed out changeset 6ecaea77b9d5 (bug 1540746) for causing multiple build bustages on CheckedInt.h CLOSED TREE 2019-04-16 20:39:10 +03:00
Alastor Wu 87516ab507 Bug 1540746 - TimeUnitToFrames() should handle the case where the input TimeUnit is overflow. r=jya
If the input has been overflow, we don't need to calculate frames and will directly return invalid result to let caller handle the error.

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

--HG--
extra : moz-landing-system : lando
2019-04-16 17:19:13 +00:00
Markus Stange da2dce5cff Bug 1544478 - Respect SharedRGBImage's stride during YUV->RGBA conversion. r=mattwoodrow
Differential Revision: https://phabricator.services.mozilla.com/D27600

--HG--
extra : moz-landing-system : lando
2019-04-16 17:02:59 +00:00
Byron Campen [:bwc] 2c684f17ba Bug 1531904 - Part 3: Fix some validation logic in createDataChannel. r=jib
Differential Revision: https://phabricator.services.mozilla.com/D26772

--HG--
extra : moz-landing-system : lando
2019-04-16 16:38:32 +00:00
Andreea Pavel de5960a5f9 Bug 1543496 - disabled test_mediaStreamTrackAudioSourceNode.html on everything except debug r=jmaher
Differential Revision: https://phabricator.services.mozilla.com/D27739

--HG--
extra : moz-landing-system : lando
2019-04-16 16:29:45 +00:00
Tarek Ziadé 7f4b636f4f Bug 1543032 - Extend metrics for dropped frames - r=padenot
This patch adds the number of dropped frames for each step of the process
(read/sink/compositor) and gives us more insight about where frames are
dropped, as opposed to the getVideoPlaybackQuality() API which gives the grand
total.

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

--HG--
extra : moz-landing-system : lando
2019-04-16 11:50:38 +00:00
Paul Adenot 784704534a Bug 1531833 - When the input is voice, activate the global communication mode. r=pehrsons
Differential Revision: https://phabricator.services.mozilla.com/D21738

--HG--
extra : moz-landing-system : lando
2019-04-16 15:42:42 +00:00
Paul Adenot b1c0df1177 Bug 1531833 - Add a way to tell the graph driver that the audio input is voice. r=pehrsons
Differential Revision: https://phabricator.services.mozilla.com/D21737

--HG--
extra : moz-landing-system : lando
2019-04-16 15:42:38 +00:00
Paul Adenot cd545b34bb Bug 1531833 - Expose a way to set a global "communication mode" in CubebUtils, to be use by real-time duplex audio users. r=pehrsons
Differential Revision: https://phabricator.services.mozilla.com/D21736

--HG--
extra : moz-landing-system : lando
2019-04-16 15:42:33 +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
Andreas Pehrson 5cd1576eed Bug 1540434 - Convert a bunch of rawptrs related to MediaManager to RefPtr. r=jib
When unplugging a camera in use in a video-only gUM capture, we see a crash in
GetUserMediaWindowListener::Remove when trying to use `aListener` after its last
reference was removed from an nsRefPtrHashTable at the beginning of the method.
As `aListener` was a rawptr, neither this method itself, nor its caller, kept it
alive.

Making this method take a RefPtr instead of a rawptr solves this issue.
This patch also converts other similar rawptrs for good measure.

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

--HG--
extra : moz-landing-system : lando
2019-04-16 07:37:48 +00:00
Coroiu Cristina a9338f145b Merge inbound to mozilla-central a=merge 2019-04-16 07:05:54 +03:00
Geoff Brown 9c36cf5c77 Bug 1115253 - Disable dom/media/doctor gtests on Android; r=jmaher
I missed this intermittent when enabling Android gtests in bug 1318091. Disable the failing test on Android only, to green up Android gtest.

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

--HG--
extra : moz-landing-system : lando
2019-04-15 19:09:50 +00:00
Cosmin Sabou 7a79795ee0 Backed out changeset 7d37a22773a0 (bug 1115253) for causing Android build bustages on RollingNumber.h. CLOSED TREE 2019-04-15 21:06:21 +03:00
Geoff Brown 483376aa8e Bug 1115253 - Disable gtest TestMultiWriterQueue on Android; r=jmaher
I missed this intermittent when enabling Android gtests in bug 1318091. Disable
the failing test on Android only, to green up Android gtest.

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

--HG--
extra : moz-landing-system : lando
2019-04-15 17:13:43 +00:00
Mike Conley 2fcda12c4d Bug 1544345 - Fix perma orange on test_setSinkId.html caused by redeclaring a variable with let. r=Jamie
Differential Revision: https://phabricator.services.mozilla.com/D27464

--HG--
extra : moz-landing-system : lando
2019-04-15 03:37:08 +00:00
Mike Conley f957ebe843 Bug 1543128 - Fire UAWidgetSetupOrChange for the no-controls <video> case on Desktop. r=jya
The Picture-in-Picture toggle buttons are now part of the video controls UAWidget
bindings, so we need to construct a UAWidget for the no-controls case for Desktop
to make that toggle available.

Up until now, we've never needed a no-controls UAWidget for Desktop, since we
never needed to show UI in that case.

Depends on D26809

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

--HG--
extra : moz-landing-system : lando
2019-04-15 01:08:32 +00:00
Masayuki Nakano 0986fb819b Bug 1542506 - Make nsDocShell use mozilla::PresShell* directly rather than nsIPresShell* r=bzbarsky
This patch makes `nsDocShell::GetPresShell()` and
`nsDocShell::GetEldestPresShell()` return `mozilla::PresShell*` and
some non-public methods use `mozilla::PresShell*` directly.

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

--HG--
extra : moz-landing-system : lando
2019-04-13 01:03:13 +00:00
Sylvestre Ledru 7f60810d86 Bug 1519636 - Reformat recent changes to the Google coding style r=Ehsan
# ignore-this-changeset

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

--HG--
extra : moz-landing-system : lando
2019-04-12 13:14:25 +00:00
Andreas Pehrson 74c94dff25 Bug 1541298 - Fix SpeechRecognition static-analysis warnings. r=jib
This ignores warnings in endpointer.cc/h and energy_endpointer.cc/h as they
appear to be from Chromium.

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

--HG--
extra : moz-landing-system : lando
2019-04-12 11:34:46 +00:00
Andreas Pehrson ed4e666edf Bug 1541298 - Implement an async shutdown blocker for SpeechRecognition. r=jib
This will let us clear the SpeechTrackListener's ref-cycle and avoid leaking.

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

--HG--
extra : moz-landing-system : lando
2019-04-12 11:38:36 +00:00
Andreas Pehrson 5e3f41a348 Bug 1541298 - Cycle collect what we can in SpeechRecognition. r=jib
Differential Revision: https://phabricator.services.mozilla.com/D26723

--HG--
extra : moz-landing-system : lando
2019-04-12 11:35:06 +00:00
Cosmin Sabou 3e6ef756b6 Merge mozilla-central to autoland. 2019-04-12 06:48:11 +03:00
Cosmin Sabou 90efd04259 Merge mozilla-inbound to mozilla-central. a=merge 2019-04-12 06:45:27 +03: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
Jean-Yves Avenard c9d311bd95 Bug 1540581 - P20. Change fuzzying leeway on macOS. r=mattwoodrow
There are slight differences produced between the earlier 422 output surface and the 420; interestingly the image is sharper with 420.

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

--HG--
extra : moz-landing-system : lando
2019-04-11 23:24:55 +00:00
Jean-Yves Avenard de7da3e651 Bug 1540581 - P19. Mark h264 streams as being BT601. r=bryce
No color space was defined for these videos, making any correct rendering impossible.
We modify the h264 stream metadata, by marking it as being bt601.
This is done with the ffmpeg command:

ffmpeg -i dom/media/test/short.mp4 -codec copy -bsf:v h264_metadata=colour_primaries=6:transfer_characteristics=6:matrix _coefficients=6 -map 0

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

--HG--
extra : moz-landing-system : lando
2019-04-11 12:39:21 +00:00
Jean-Yves Avenard 51d9f4be53 Bug 1540581 - P18. Move destination texture type choice to the D3D11 texture allocator. r=mattwoodrow
It allows for more readable code, not having to store multiple times different storage type across multiple objects.

Now each class does one task and only deal with a single texture data type.

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

--HG--
extra : moz-landing-system : lando
2019-04-11 12:39:12 +00:00
Jean-Yves Avenard 2ca0f1b548 Bug 1540581 - P12. Pass YUV colorspace information with WMF decoder. r=bryce,mattwoodrow.
Differential Revision: https://phabricator.services.mozilla.com/D26467

--HG--
extra : moz-landing-system : lando
2019-04-11 12:38:51 +00:00
Jean-Yves Avenard 1dc7e8e498 Bug 1540581 - P11. Handle colorspace correctly with D3D11 images. r=mattwoodrow,nical
Differential Revision: https://phabricator.services.mozilla.com/D26466

--HG--
extra : moz-landing-system : lando
2019-04-11 12:38:49 +00:00
Jean-Yves Avenard b8abb07619 Bug 1540581 - P10. Pass colorspace data with first VP9 frame seen. r=bryce
The info would only be passed after the 2nd keyframe

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

--HG--
extra : moz-landing-system : lando
2019-04-11 12:37:38 +00:00
Jean-Yves Avenard 92b211930c Bug 1540581 - P8. Set decoding format back to NV12 and set colorspace. r=bryce
Differential Revision: https://phabricator.services.mozilla.com/D26062

--HG--
extra : moz-landing-system : lando
2019-04-11 12:37:16 +00:00
Jean-Yves Avenard 0bb575734a Bug 1540581 - P3. Add methods to extract color space and color depth from SPS NAL. r=bryce
Differential Revision: https://phabricator.services.mozilla.com/D26056

--HG--
extra : moz-landing-system : lando
2019-04-11 12:36:10 +00:00
Jean-Yves Avenard 4b22346e41 Bug 1540581 - P2. Add missing VideoInfo members to IPC serializer. r=bryce
Another case where you have to wonder how did this ever worked!?

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

--HG--
extra : moz-landing-system : lando
2019-04-11 12:36:00 +00:00
Jean-Yves Avenard 3ae43eb506 Bug 1493898 - P6. Move YUVColorSpace definition in the gfx namespace. r=mattwoodrow.
YUVColorSpace is inseparable from the bit depth as the matrix coefficients to be calculated need the bit depth information.

So let's put the two types together. gfx namespace also makes more sense as that's where we find IntRect, IntSize and other.

The extent of the changes highlight how much similar data structures are duplicated across the code, to the point it's scary.

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

--HG--
extra : moz-landing-system : lando
2019-04-11 12:41:33 +00:00
Jean-Yves Avenard 14fac11637 Bug 1493898 - P5. Add Colorspace and YUV range data to VideoInfo. r=bryce
And read the info from the VP9 bytestream.

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

--HG--
extra : moz-landing-system : lando
2019-04-11 12:41:23 +00:00
Jean-Yves Avenard 09b5578692 Bug 1493898 - P3. Don't downsample 10/12 bits AOM images. r=bryce
All compositors support 10/12 bits images now.
Additionally, add BT2020 support to AOM decoder.

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

--HG--
extra : moz-landing-system : lando
2019-04-11 12:40:59 +00:00
Jean-Yves Avenard 1da8a6804f Bug 1493898 - P2. Add BT2020 support to decoders. r=bryce
Differential Revision: https://phabricator.services.mozilla.com/D25343

--HG--
extra : moz-landing-system : lando
2019-04-11 12:40:50 +00:00
Alastor Wu f076a8ece9 Bug 1540740 - part2 : using TimeUnit as input parameter for 'AdjustForStartTime()'. r=jya
There is no need to cast to `TimeUnit` to `int64` and then cast to `TimeUnit` again.

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

--HG--
extra : moz-landing-system : lando
2019-04-11 17:32:54 +00:00
alwu aebb6d8617 Bug 1540740 - part1 : let the return value of 'AdjustForStartTime()' to tell whether the adjustment is succeeded r=jya
Now the caller of `AdjustForStartTime()` should check the return value to know whether the adjustment is succeeded.

If the error happens the caller should handle it and return an error.

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

--HG--
extra : moz-landing-system : lando
2019-04-11 20:43:00 +00:00
Boris Zbarsky d0bcf72821 Bug 1543564 part 2. Get rid of pointless nsPIDOMWindowInner::AsInner methods. r=farre
Differential Revision: https://phabricator.services.mozilla.com/D27027

--HG--
extra : moz-landing-system : lando
2019-04-11 14:12:43 +00:00
Boris Zbarsky 6d78fdff25 Bug 1543564 part 1. Get rid of pointless nsPIDOMWindowOuter::AsOuter() methods. r=farre
Differential Revision: https://phabricator.services.mozilla.com/D27026

--HG--
extra : moz-landing-system : lando
2019-04-11 12:12:04 +00:00
Oana Pop Rus 212a653d81 Backed out 6 changesets (bug 1531833) for geckoview failures on PermissionDelegateTest.media CLOSED TREE
Backed out changeset f90ad6bb8ebd (bug 1531833)
Backed out changeset 465570a54b46 (bug 1531833)
Backed out changeset e725253ee976 (bug 1531833)
Backed out changeset 74ad8e7a722b (bug 1531833)
Backed out changeset b1268e5f7023 (bug 1531833)
Backed out changeset e3ec78b2db1f (bug 1531833)

--HG--
extra : amend_source : 81aa19c352e72cac2369e014d19ec5a896538b21
2019-04-11 21:16:55 +03:00
Csoregi Natalia 0a57edb23d Merge mozilla-central to mozilla-inbound. CLOSED TREE 2019-04-15 12:48:34 +03:00
Andreas Pehrson 4ec909364e Bug 1544199 - Allow `rv = shutdown->RemoveBlocker()` to be unused in SpeechRecognition. r=me 2019-04-15 11:10:41 +02:00
Ciure Andrei 6d8c05133f Merge mozilla-central to mozilla-inbound. a=merge CLOSED TREE 2019-04-11 19:13:48 +03:00
Ciure Andrei bc3c25dece Merge mozilla-central to mozilla-inbound. a=merge CLOSED TREE 2019-04-11 12:57:28 +03:00
Paul Adenot 387f4ae5fd Bug 1531833 - When the input is voice, activate the global communication mode. r=pehrsons
Differential Revision: https://phabricator.services.mozilla.com/D21738

--HG--
extra : moz-landing-system : lando
2019-04-11 09:19:35 +00:00