Commit Graph

15730 Commits

Author SHA1 Message Date
Bryce Seager van Dyk
48980be9fe Bug 1547784 - Add crashtest for moving media element with media keys to inactive doc. r=alwu
Differential Revision: https://phabricator.services.mozilla.com/D40481

--HG--
extra : moz-landing-system : lando
2019-08-06 17:48:29 +00:00
Andreea Pavel
eb6f2642fa Backed out 7 changesets (bug 1565689) for assertion failures at MediaControlUtils.h on a CLOSED TREE
Backed out changeset 9ebf6f8a4fda (bug 1565689)
Backed out changeset 49c41a9238f9 (bug 1565689)
Backed out changeset 9014276e070a (bug 1565689)
Backed out changeset d9f7fcbef3ee (bug 1565689)
Backed out changeset d3db3285e933 (bug 1565689)
Backed out changeset 1ca26f550f4b (bug 1565689)
Backed out changeset 1d27d083e974 (bug 1565689)
2019-08-07 04:40:52 +03:00
alwu
267ee7f804 Bug 1565689 - part7 : add browser test. r=baku
Differential Revision: https://phabricator.services.mozilla.com/D38147

--HG--
extra : moz-landing-system : lando
2019-08-06 01:13:08 +00:00
alwu
a76dfcbdd5 Bug 1565689 - part6 : add gtests. r=baku
Differential Revision: https://phabricator.services.mozilla.com/D38146

--HG--
extra : moz-landing-system : lando
2019-08-06 01:13:08 +00:00
alwu
f8f21d9082 Bug 1565689 - part5 : control media from chrome process. r=farre,baku
This patch implements how to use MediaController to control corresponding media in content processes.

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

--HG--
extra : moz-landing-system : lando
2019-08-06 01:13:07 +00:00
alwu
519f56c448 Bug 1565689 - part4 : notify controller about media active state and audible state changed from content processes. r=baku
We implement some helpful functions in MediaControlUtils which can be used to notify controller when media starts/stops playing or become audible/inaudible.

For now, we can temporarily notify these changes in AudioChannelService where we have already known when media has these kinds of status changing.

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

--HG--
extra : moz-landing-system : lando
2019-08-06 01:13:07 +00:00
alwu
a212936957 Bug 1565689 - part3 : use static pref to control audio competing. r=baku
We don't want to enable audio competing by default, so hide this feature behind a static pref.

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

--HG--
extra : moz-landing-system : lando
2019-08-06 01:13:09 +00:00
alwu
e76b883c12 Bug 1565689 - part2 : implement AudioFocusManager. r=baku
In order to support audio competing among different tabs, we implement a new class AudioFocusManager.

AudioFocusManager is used to assign the audio focus to different requester and decide which requester can own audio focus when audio competing happens.
When the audio competing happens, the last request would be a winner who can still own the audio focus, and all the other requesters would lose the audio focus.
Now MediaController is the onlt requester, it would request the audio focus when it becomes audible and revoke the audio focus when the controller is no longer active.

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

--HG--
extra : moz-landing-system : lando
2019-08-06 19:27:34 +00:00
alwu
d64b11e708 Bug 1565689 - part1 : implement MediaController and MediaControlService. r=baku
In order to have a centralized audio control in the parent process, we create two new classes here.

* MediaController
MediaController is a class used to control certain amount of media in the content process. Every controller corresponds to a browsing context.
For example, TabMediaController would correspond to the top level browsing context, which mean it can control all media in the specific tab.

* MediaControlService
As there might be multiple tabs playing audio, so there would be multiple controllers. MediaControlService is a place to manage all of them, you can access specific controller through MediaControlService by providing controller ID.
Everytime a controller becomes active, which means there is a media starts in corresponding browsing context, then controller would be added into the list of the MediaControlService. And it would be removed from the list when the media in corresponding browsering context stopped.

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

--HG--
extra : moz-landing-system : lando
2019-08-06 19:24:45 +00:00
Andreas Pehrson
213a51d07c Bug 1565344 - Remove unnecessary OutputStreamManager::mPrincipal. r=jib
It would cause an assertion failure when OutputStreamManager was released on
main thread. It could be wrapped in an nsMainThreadPtrHandle instead, but that's
exactly what mPrincipalHandle is, so we can use that for both needs.

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

--HG--
extra : moz-landing-system : lando
2019-08-06 15:11:45 +00:00
Michael Froman
af196d4cfc Bug 1571568 - Update ShmemPool to work in builds with --disable-webrtc. r=ng
1. ShmemPool.cpp is now built for --disable-webrtc builds.
2. ShmemPool no longer uses the gCamerasParentLog logger, it
   uses its own logger.
3. ShmemPool log macros were updated with a SHMEMPOOL_ prefix
   to avoid undef-ing other log macros.

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

--HG--
extra : moz-landing-system : lando
2019-08-06 15:09:12 +00:00
Alex Chronopoulos
dae984b098 Bug 1530996 - Use the new storage mechanism to save the current playback benchmark. r=jya
Create an event in MediaFormatReader the will signal to the HTMLMediaElement to initiate a new storing according to the latest VideoInfo. Also when the application is shutting down, trigger a new storing early enough, before all the events are disconnected.

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

--HG--
extra : moz-landing-system : lando
2019-08-06 09:25:45 +00:00
Alex Chronopoulos
db7dd624ec Bug 1530996 - Use the benchmark class from MediaCapabilities. r=jya
Make use of the new DecoderBenchmark class in MediaCapabilities instead of the old Benchmark mechanism.

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

--HG--
extra : moz-landing-system : lando
2019-08-06 09:24:40 +00:00
Alex Chronopoulos
d95b52b77f Bug 1530996 - Store the benchmark calculated from the frame statistics. r=jya
Create a class that gets the video properties and the frame statistics, calculates the score in percentage for that video playback, creates a key string according to video properties and trigger the storage of the score.

The video properties used are the resolution, the frame rate and the bitdepth.

For the key, a range of levels has been created for each property and the video is categorised on the closest levels. The key consists of the various levels like: "ResolutionLevel5-FrameRateLevel1-8bit".

Finaly, it uses the IPDL protocol to store the pair of the score and the key.

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

--HG--
extra : moz-landing-system : lando
2019-08-06 09:24:36 +00:00
Alex Chronopoulos
a930f0bdd1 Bug 1530996 - Create the IPC protocol to access the database from the content process. r=jya
The database is accessible from the parent process due to to the sandbox thus it is required an IPDL protocol that will transfer the queries and the results

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

--HG--
extra : moz-landing-system : lando
2019-08-06 09:24:34 +00:00
Alex Chronopoulos
9533dca8e9 Bug 1530996 - Create a wrapper around kvstore module. r=jya
Differential Revision: https://phabricator.services.mozilla.com/D38312

--HG--
extra : moz-landing-system : lando
2019-08-06 09:23:28 +00:00
Bogdan Tara
a252740d31 Backed out 7 changesets (bug 1565689) for browser chrome failures CLOSED TREE
Backed out changeset 36ea91bf28f7 (bug 1565689)
Backed out changeset 278340adf69c (bug 1565689)
Backed out changeset 4f508252b015 (bug 1565689)
Backed out changeset faaa4e9ba8d3 (bug 1565689)
Backed out changeset 177f2b26c892 (bug 1565689)
Backed out changeset ba665f96330d (bug 1565689)
Backed out changeset 0de7b1db3ef9 (bug 1565689)
2019-08-06 04:09:19 +03:00
alwu
504dbdbac6 Bug 1565689 - part7 : add browser test. r=baku
Differential Revision: https://phabricator.services.mozilla.com/D38147

--HG--
extra : moz-landing-system : lando
2019-08-05 17:32:34 +00:00
alwu
3bf00f42cd Bug 1565689 - part6 : add gtests. r=baku
Differential Revision: https://phabricator.services.mozilla.com/D38146

--HG--
extra : moz-landing-system : lando
2019-08-05 08:51:22 +00:00
alwu
3608731279 Bug 1565689 - part5 : control media from chrome process. r=farre,baku
This patch implements how to use MediaController to control corresponding media in content processes.

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

--HG--
extra : moz-landing-system : lando
2019-08-05 17:32:27 +00:00
alwu
0987d9bd13 Bug 1565689 - part4 : notify controller about media active state and audible state changed from content processes. r=baku
We implement some helpful functions in MediaControlUtils which can be used to notify controller when media starts/stops playing or become audible/inaudible.

For now, we can temporarily notify these changes in AudioChannelService where we have already known when media has these kinds of status changing.

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

--HG--
extra : moz-landing-system : lando
2019-08-05 08:48:51 +00:00
alwu
03eb5ac7ab Bug 1565689 - part3 : use static pref to control audio competing. r=baku
We don't want to enable audio competing by default, so hide this feature behind a static pref.

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

--HG--
extra : moz-landing-system : lando
2019-08-05 18:53:54 +00:00
alwu
250b9f11c3 Bug 1565689 - part2 : implement AudioFocusManager. r=baku
In order to support audio competing among different tabs, we implement a new class AudioFocusManager.

AudioFocusManager is used to assign the audio focus to different requester and decide which requester can own audio focus when audio competing happens.
When the audio competing happens, the last request would be a winner who can still own the audio focus, and all the other requesters would lose the audio focus.
Now MediaController is the onlt requester, it would request the audio focus when it becomes audible and revoke the audio focus when the controller is no longer active.

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

--HG--
extra : moz-landing-system : lando
2019-08-05 18:53:41 +00:00
alwu
b17076ef63 Bug 1565689 - part1 : implement MediaController and MediaControlService. r=baku
In order to have a centralized audio control in the parent process, we create two new classes here.

* MediaController
MediaController is a class used to control certain amount of media in the content process. Every controller corresponds to a browsing context.
For example, TabMediaController would correspond to the top level browsing context, which mean it can control all media in the specific tab.

* MediaControlService
As there might be multiple tabs playing audio, so there would be multiple controllers. MediaControlService is a place to manage all of them, you can access specific controller through MediaControlService by providing controller ID.
Everytime a controller becomes active, which means there is a media starts in corresponding browsing context, then controller would be added into the list of the MediaControlService. And it would be removed from the list when the media in corresponding browsering context stopped.

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

--HG--
extra : moz-landing-system : lando
2019-08-05 17:31:02 +00:00
Andreas Pehrson
a68e624ca6 Bug 1569645 - Remove overzealous asserts. r=bryce
If webm is disabled or not compiled in, the video assert would fail if trying
to record a video track -- we'd only have an ogg/opus encoder.

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

--HG--
extra : moz-landing-system : lando
2019-08-05 16:40:10 +00:00
Andreas Pehrson
5d91259b9f Bug 1569645 - Add crashtest. r=bryce
Differential Revision: https://phabricator.services.mozilla.com/D40647

--HG--
extra : moz-landing-system : lando
2019-08-05 15:56:04 +00:00
Andreas Pehrson
670447873a Bug 1570900 - Remove mStreamTimeOffset and friends from DecodedStream. r=jib
This hasn't been needed since the last larger refactor of DecodedStream
(bug 1423241), but got incorporated wrongly with bug 1493613.

When DecodedStream is Stop()ed and then Start()ed, a track is added to the graph
with a playout position starting at 0, and mStartTime is set to the starting
position, i.e., the seeked position in case of a seek or 0 if decoding from the
start of a file.

Hence, the reported position by DecodedStream should be mStartTime plus the last
reported output time of the tracks.

mStreamTimeOffset was offseting the tracks' reported output time further, so
DecodedStream was reporting a too large number.

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

--HG--
extra : moz-landing-system : lando
2019-08-05 15:34:24 +00:00
Andreea Pavel
d95d878a50 Backed out 15 changesets (bug 1014393) for causing test_mediarecorder_record_gum_video_timeslice_mixed.html a=backout
Backed out changeset 83a1758bc6fa (bug 1014393)
Backed out changeset be1f1f82f92c (bug 1014393)
Backed out changeset 21ec9e104912 (bug 1014393)
Backed out changeset ea6314a61a77 (bug 1014393)
Backed out changeset e35a1a354bb5 (bug 1014393)
Backed out changeset 5c4b5620be2e (bug 1014393)
Backed out changeset 579d7f15d4f2 (bug 1014393)
Backed out changeset f9a9b2fc3335 (bug 1014393)
Backed out changeset c49241bad727 (bug 1014393)
Backed out changeset fc24872739e4 (bug 1014393)
Backed out changeset fd846ac16731 (bug 1014393)
Backed out changeset 4b11f19aa613 (bug 1014393)
Backed out changeset 4a57b865b461 (bug 1014393)
Backed out changeset 147d5aeaab46 (bug 1014393)
Backed out changeset c58e17df9c99 (bug 1014393)

--HG--
rename : dom/media/encoder/EncodedFrame.h => dom/media/encoder/EncodedFrameContainer.h
2019-08-03 20:23:02 +03:00
Andreea Pavel
8438d93b00 Backed out changeset ff0125384d06 (bug 1570958) for backout conflict with bug 1014393 a=backout 2019-08-03 20:21:43 +03:00
Andreea Pavel
5f860a304f Backed out changeset 6954782553c7 (bug 1014393) for build bustages a=backout 2019-08-03 20:09:29 +03:00
Gurzau Raul
3d31a9b7c0 Backed out 15 changesets (bug 1014393) for permafailing at test_mediarecorder_record_gum_video_timeslice_mixed.html a=backout 2019-08-03 19:22:18 +03:00
Narcis Beleuzu
71ce6058e6 Backed out 2 changesets (bug 1547784) for crashtest failrues on 1547784.html . CLOSED TREE
Backed out changeset 21f0da4d5763 (bug 1547784)
Backed out changeset 54b3b878f07d (bug 1547784)
2019-08-03 02:54:04 +03:00
Bryce Seager van Dyk
07a2753dbb Bug 1547784 - Add crashtest for moving media element with media keys to inactive doc. r=alwu
Differential Revision: https://phabricator.services.mozilla.com/D40481

--HG--
extra : moz-landing-system : lando
2019-08-02 21:54:03 +00:00
Alastor Wu
2ae05955ab Bug 1571051 - part4 : use Cb buffer in the second plane. r=jolin
The second plane should store data of the Cb buffer's value, not the Cr's.

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

--HG--
extra : moz-landing-system : lando
2019-08-02 18:54:02 +00:00
Alastor Wu
e1447216a6 Bug 1571051 - part3 : mark MediaRawData as a keyframe. r=jolin
If the encoded frame is a keyframe, we should also mark the MediaRawData which would contain the data from this encoded frame as a keyframe.

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

--HG--
extra : moz-landing-system : lando
2019-08-02 18:53:34 +00:00
Alastor Wu
f839b3c72d Bug 1571051 - part2 : keep CodecSpecific const when doing the std::forward. r=jolin
As we are not going to modify the CodecSpecific, it should keep const when we forward it.

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

--HG--
extra : moz-landing-system : lando
2019-08-02 18:53:12 +00:00
Alastor Wu
6c24473bca Bug 1571051 - part1 : use thread safe refcounting for PlatformEncoderModule. r=jolin
We don't have a contraint for using PlatformEncoderModule in the specific thread only, so we should use thread-safe refcounting for it, like PlatformDecoderModule.

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

--HG--
extra : moz-landing-system : lando
2019-08-02 18:52:49 +00:00
Edwin Gao
b270bb1353 Bug 1561046 - remove API 17 from manifest files r=gbrown
Differential Revision: https://phabricator.services.mozilla.com/D39809

--HG--
extra : moz-landing-system : lando
2019-08-02 20:10:06 +00:00
Brindusan Cristian
f58c7a50ae Backed out changeset 66710416d1e4 (bug 1562910) for MinGW bustages. CLOSED TREE 2019-08-02 22:09:39 +03:00
Dan Minor
082a390c61 Bug 1356046 - Remove expired media telemetry; r=jya,alwu,bryce
This removes all telemetry which expired in Firefox 69 or earlier, with the
exceptions of the following, which we plan to renew:
* AUDIO_TRACK_SILENCE_PROPORTION
* MEDIA_AUTOPLAY_WOULD_BE_ALLOWED_COUNT
* MEDIA_AUTOPLAY_WOULD_NOT_BE_ALLOWED_COUNT
* MEDIACACHESTREAM_LENGTH_KB
* MEDIA_MKV_CANPLAY_REQUESTED
* MEDIA_PAGE_COUNT
* MEDIA_PAGE_HAD_MEDIA_COUNT
* VIDEO_DROPPED_FRAMES_PROPORTION
* VIDEO_PLAY_TIME
* VIDEO_HIDDEN_PLAY_TIME
* VIDEO_HIDDEN_PLAY_TIME_PERCENTAGE
* VIDEO_INFERRED_DECODE_SUSPEND_PERCENTAGE
* VIDEO_INTER_KEYFRAME_AVERAGE_MS
* VIDEO_INTER_KEYFRAME_MAX_MS
* VIDEO_SUSPEND_RECOVERY_TIME_MS
* VIDEO_VP9_BENCHMARK_FPS
* WEB_AUDIO_BECOMES_AUDIBLE_TIME
* WEBVTT_TRACK_KINDS

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

--HG--
extra : moz-landing-system : lando
2019-08-02 18:17:45 +00:00
Michael Froman
d889971613 Bug 1562910 - Use ShmemPool to reduce shmem thrashing in RDD audio decoding. r=mattwoodrow
Differential Revision: https://phabricator.services.mozilla.com/D36611

--HG--
extra : moz-landing-system : lando
2019-08-02 18:13:46 +00:00
Andreas Pehrson
19cde46042 Bug 1570958 - Demote some WebMWriter assertions to keep release builds clean and happy. r=jib
Differential Revision: https://phabricator.services.mozilla.com/D40447

--HG--
extra : moz-landing-system : lando
2019-08-02 16:31:04 +00:00
arthur.iakab
7aef316861 Backed out changeset b8661a3b5dc2 (bug 1356046) for causing buid bustages on HTMLMediaElement.cpp CLOSED TREE 2019-08-02 19:00:45 +03:00
Dan Minor
a13ff75b20 Bug 1356046 - Remove expired media telemetry; r=jya,alwu,bryce
This removes all telemetry which expired in Firefox 69 or earlier, with the
exceptions of the following, which we plan to renew:
* AUDIO_TRACK_SILENCE_PROPORTION
* MEDIA_AUTOPLAY_WOULD_BE_ALLOWED_COUNT
* MEDIA_AUTOPLAY_WOULD_NOT_BE_ALLOWED_COUNT
* MEDIACACHESTREAM_LENGTH_KB
* MEDIA_MKV_CANPLAY_REQUESTED
* MEDIA_PAGE_COUNT
* MEDIA_PAGE_HAD_MEDIA_COUNT
* VIDEO_DROPPED_FRAMES_PROPORTION
* VIDEO_PLAY_TIME
* VIDEO_HIDDEN_PLAY_TIME
* VIDEO_HIDDEN_PLAY_TIME_PERCENTAGE
* VIDEO_INFERRED_DECODE_SUSPEND_PERCENTAGE
* VIDEO_INTER_KEYFRAME_AVERAGE_MS
* VIDEO_INTER_KEYFRAME_MAX_MS
* VIDEO_SUSPEND_RECOVERY_TIME_MS
* VIDEO_VP9_BENCHMARK_FPS
* WEB_AUDIO_BECOMES_AUDIBLE_TIME
* WEBVTT_TRACK_KINDS

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

--HG--
extra : moz-landing-system : lando
2019-08-02 15:37:59 +00:00
Andreas Pehrson
f95bb47fbc Bug 1570684 - Don't access MediaStreamTrack::mStream after the track has ended. r=padenot
Differential Revision: https://phabricator.services.mozilla.com/D40397

--HG--
extra : moz-landing-system : lando
2019-08-02 12:02:05 +00:00
Tom Schuster
88855a7ee5 Bug 1558915 - Use infallible nsIURI::SchemeIs in dom/. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D40108

--HG--
extra : source : 3da6e9e86be4a4a9eeaceec222398475b6679193
2019-08-02 08:54:18 +00:00
Mihai Alexandru Michis
0cc257addd Backed out 2 changesets (bug 1558915) for causing bustages. CLOSED TREE
Backed out changeset e44c9fd81e5b (bug 1558915)
Backed out changeset 3da6e9e86be4 (bug 1558915)
2019-08-02 12:17:42 +03:00
Tom Schuster
f115dd9113 Bug 1558915 - Use infallible nsIURI::SchemeIs in dom/. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D40108

--HG--
extra : moz-landing-system : lando
2019-08-02 08:54:18 +00:00
Andreas Pehrson
217959703e Bug 1014393 - Use undef-after-def pattern in MediaRecorder and related files. r=bryce
Differential Revision: https://phabricator.services.mozilla.com/D37700

--HG--
extra : moz-landing-system : lando
2019-08-01 08:48:39 +00:00
Andreas Pehrson
f5a11fcfea Bug 1014393 - Minor mochitest fixes. r=jib
Differential Revision: https://phabricator.services.mozilla.com/D35311

--HG--
extra : moz-landing-system : lando
2019-08-01 08:48:32 +00:00