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

17568 Коммитов

Автор SHA1 Сообщение Дата
Randell Jesup 33bfc03435 Bug 1112392: Move webrtc Tab Sharing to work in e10s/fission r=dminor
Also we drop support for an independent-of-scroll/viewport capture, which
the old Tab Sharing supported, for security reasons (and we don't need it).

Differential Revision: https://phabricator.services.mozilla.com/D80974
2020-07-10 21:22:10 +00:00
Bogdan Tara b2ea557fcf Backed out changeset 6dea878aaf36 (bug 1112392) for tab_capturer.cc related bustage CLOSED TREE 2020-07-10 23:30:41 +03:00
Randell Jesup 109ef2a1dd Bug 1112392: Move webrtc Tab Sharing to work in e10s/fission r=dminor
Also we drop support for an independent-of-scroll/viewport capture, which
the old Tab Sharing supported, for security reasons (and we don't need it).

Differential Revision: https://phabricator.services.mozilla.com/D80974
2020-07-10 18:11:02 +00:00
alwu 20f7602472 Bug 1582569 - part2 : modify tests. r=chunmin
Differential Revision: https://phabricator.services.mozilla.com/D82580
2020-07-10 16:19:43 +00:00
alwu 8db4dcbd7c Bug 1582569 - part1 : implement 'skipad'. r=chunmin,webidl,peterv
Implement `skipad` action.

https://w3c.github.io/mediasession/#dom-mediasessionaction-skipad

Differential Revision: https://phabricator.services.mozilla.com/D82579
2020-07-10 18:59:31 +00:00
Narcis Beleuzu d27be427c9 Backed out changeset 83749e9e67bd (bug 1220810) for bc failures on browser_fall_back_to_https.js . CLOSED TREE 2020-07-10 18:42:17 +03:00
Andrea Marchesini 23052342cb Bug 1220810 - Hardcode localhost to loopback, r=ckerschb,dragana
Differential Revision: https://phabricator.services.mozilla.com/D64586
2020-07-10 14:30:58 +00:00
Mihai Alexandru Michis b62be4d15f Backed out changeset 1b035d80fb9f (bug 1220810) for causing bustages in netwerk/dns/DNS.cpp
CLOSED TREE
2020-07-10 17:17:20 +03:00
Andrea Marchesini f498accc17 Bug 1220810 - Hardcode localhost to loopback, r=ckerschb,dragana
Differential Revision: https://phabricator.services.mozilla.com/D64586
2020-07-10 13:08:14 +00:00
Mihai Alexandru Michis 44cad01e29 Backed out changeset 1b44f13206d0 (bug 1220810) for causing gecko decision task bustages.
CLOSED TREE
2020-07-10 15:37:45 +03:00
Andrea Marchesini 2144af13e9 Bug 1220810 - Hardcode localhost to loopback, r=ckerschb,dragana
Differential Revision: https://phabricator.services.mozilla.com/D64586
2020-07-10 12:23:46 +00:00
Mihai Alexandru Michis 61006875dd Backed out changeset 36f368ba214c (bug 1220810) for causing gecko decision task bustages.
CLOSED TREE
2020-07-10 15:00:15 +03:00
Andrea Marchesini f36d351374 Bug 1220810 - Hardcode localhost to loopback, r=ckerschb,dragana
Differential Revision: https://phabricator.services.mozilla.com/D64586
2020-07-10 11:34:10 +00:00
Jean-Yves Avenard 71dbeca336 Bug 1650996 - P3. Have RemoteDecoderManagerChild use a TaskQueue over a media threadpool. r=mjf
Differential Revision: https://phabricator.services.mozilla.com/D82503
2020-07-09 07:47:37 +00:00
Jean-Yves Avenard e2dc02032e Bug 1650996 - P2. Always initialise the RemoteDecoderChild manager thread. r=mjf
This allows to simplify the lifetime management off the RemoteDecoderModule's mManagerThread member.

Differential Revision: https://phabricator.services.mozilla.com/D82502
2020-07-09 07:47:39 +00:00
Jean-Yves Avenard 8bde08cf2e Bug 1650996 - P1. Remove RemodeDecoderManagerChild::CanSend method. r=mattwoodrow
The base IProtocol class already provides this.

Differential Revision: https://phabricator.services.mozilla.com/D82501
2020-07-09 07:47:42 +00:00
Jean-Yves Avenard 8d3ffdc6c3 Bug 1649974 - P2. Use a TaskQueue with media threadpool for RemoteDecoderManagerParent. r=mattwoodrow
Sync dispatch are being used; due to how the background taskqueue is setup this could cause a hang if if also called from a background taskqueue.

Differential Revision: https://phabricator.services.mozilla.com/D82500
2020-07-09 10:13:48 +00:00
Csoregi Natalia 56aa86bead Backed out changeset 6318d54b7068 (bug 1112392) for bustages on tab_capturer.cc. CLOSED TREE 2020-07-10 04:52:56 +03:00
Randell Jesup 9756342857 Bug 1112392: Move webrtc Tab Sharing to work in e10s/fission r=dminor
Also we drop support for an independent-of-scroll/viewport capture, which
the old Tab Sharing supported, for security reasons (and we don't need it).

Differential Revision: https://phabricator.services.mozilla.com/D80974
2020-07-10 01:00:51 +00:00
Tom Prince 204d796929 Bug 1651731: [lint] Python and shell files without `#!` should not be executable; r=linter-reviewers,perftest-reviewers,geckoview-reviewers,agi,sylvestre,sparky
Differential Revision: https://phabricator.services.mozilla.com/D82954
2020-07-09 20:29:18 +00:00
Tom Prince 2c52622b85 Bug 1651731: [lint] Add a bunch more types of files that should never be executable; r=linter-reviewers,perftest-reviewers,geckoview-reviewers,preferences-reviewers,agi,sylvestre,sparky
Differential Revision: https://phabricator.services.mozilla.com/D82953
2020-07-09 21:28:49 +00:00
Csoregi Natalia 6be2db575b Backed out changeset 20e97810b319 (bug 1112392) for bustages on tab_capturer.h. CLOSED TREE 2020-07-10 00:40:42 +03:00
Randell Jesup 084100482a Bug 1112392: Move webrtc Tab Sharing to work in e10s/fission r=dminor
Also we drop support for an independent-of-scroll/viewport capture, which
the old Tab Sharing supported, for security reasons (and we don't need it).

Differential Revision: https://phabricator.services.mozilla.com/D80974
2020-07-09 20:34:15 +00:00
Alex Chronopoulos 6b9ccb2cb2 Bug 1651049 - Mochitest to verify the failed scenario. r=padenot
Differential Revision: https://phabricator.services.mozilla.com/D82865
2020-07-09 14:32:21 +00:00
Alex Chronopoulos d4383d4b9d Bug 1651049 - Move the sink change logic in MediaStreamRenderer. r=padenot
The MediaStreamRenderer handles the AudioOutput of an HTMLMediaElement. it register/unregister the AudioOutput according to the rendering status. The sink-change follows the logic of AudioOutput thus it has been moved in it.

The previous way created an error when the element had been muted and the sink had been changed before the source MediaStream was attached to the element. The error occured because it was possible, the same entry to be registered more than once in the AudioOutput's list, which resulted in the track to be unmuted when it should not.

Differential Revision: https://phabricator.services.mozilla.com/D82529
2020-07-09 14:32:21 +00:00
Razvan Maries b34b73644f Bug 1650930 - Disabled test_bug1027864.html. r=jmaher
Differential Revision: https://phabricator.services.mozilla.com/D82880
2020-07-09 11:49:32 +00:00
Dan Minor a86224d9f7 Bug 1621500 - Use serial queue for video decoding on OS X; r=ng
The DISPATCH_QUEUE_PRIORITY_DEFAULT queue currently in use starts tasks as they
arrive rather than running tasks sequentially. By using a dedicated serial queue,
frames will be encoded and delivered in the order in which they are added to the
queue. It also makes it possible to post a task to the queue when video capture
is stopped, which can guarantee that all frames have been delivered before stop
completes. This should fix a crash we're seeing in DeliverCapturedFrame which
appears to be caused by racing between the main thread in Stop() and the capture
thread in captureOutput. The new queue is set to target the
DISPATCH_QUEUE_PRIORITY_DEFAULT, so tasks will still run there. This should give
us serial execution without the overhead of starting a new thread to manage our
queue.

The new upstream implementation creates a serial queue rather than using
DISPATCH_QUEUE_PRIORITY_DEFAULT. It also raises the priority of the queue above
default, but I think that should wait for a separate bug.

Differential Revision: https://phabricator.services.mozilla.com/D82721
2020-07-08 17:27:09 +00:00
Razvan Maries 05fa077757 Backed out 5 changesets (bug 1650996, bug 1649974) for perma failures on Android 7.0. CLOSED TREE
Backed out changeset 8f8174ba409d (bug 1650996)
Backed out changeset 374598f9c37a (bug 1650996)
Backed out changeset 236757acc073 (bug 1650996)
Backed out changeset 89d5cabfa2df (bug 1649974)
Backed out changeset 6e475ddbd18c (bug 1649974)
2020-07-09 10:33:45 +03:00
Jean-Yves Avenard 090a977b95 Bug 1650277 - P3. Use a media taskqueue with the MediaManager. r=jib
Rename PostTask methods into Dispatch to be more in-line with the current naming convention as PostTask pretty much always referred to the MessageLoop's method.

Differential Revision: https://phabricator.services.mozilla.com/D82159
2020-07-09 06:12:10 +00:00
Jean-Yves Avenard 7920483bbe Bug 1650277 - P2. Ensure the CubebDeviceEnumerator is shutdown after the MTAThread. r=kinetik
On Windows the CubebDeviceEnumerator needs to run on an MTA thread; to achieve that goal we use the EnsureMTA utility.
EnsureMTA relies on a MTA thread to exist which will be destroyed when XPCOM shuts down ; as such we must shutdown the CubebDeviceEnumerator during the same shutdown phase.

ClearOnShutdown registrars are processed in LIFO order, so as the CubebDeviceEnumerator constructor uses EnsureMTA we are guaranteed that the CubebDeviceEnumerator clearOnShutdown will be processed before the EnsureMTA thread shutdown.
The CubebDeviceEnumerator needs to be shutdown before cubeb; which is also guaranteed as the cubeb instance is destroyed during the final XPCOM shutdown stage.

Fix GetSafety() thread-safety.

CubebDeviceEnumerator should be a static non-refcounted singleton on the stack really which would made the code much simpler, unfortunately its gtests rely on having the Shutdown method present to force re-scanning the devices and work with the mock cubeb.

Differential Revision: https://phabricator.services.mozilla.com/D82158
2020-07-09 06:11:57 +00:00
Jean-Yves Avenard f3f56245eb Bug 1650277 - P1. Let CubebDeviceEnumerator worry about MTA requirements. r=kinetik
Ths helps not having to worry about how to create the thread; which could be probablematic when running off a thread pool.

Differential Revision: https://phabricator.services.mozilla.com/D82142
2020-07-09 06:11:45 +00:00
Jean-Yves Avenard 8c4180fca5 Bug 1650996 - P3. Have RemoteDecoderManagerChild use a TaskQueue over a media threadpool. r=mjf
Differential Revision: https://phabricator.services.mozilla.com/D82503
2020-07-09 06:00:53 +00:00
Jean-Yves Avenard a3e2ecf7c4 Bug 1650996 - P2. Always initialise the RemoteDecoderChild manager thread. r=mjf
This allows to simplify the lifetime management off the RemoteDecoderModule's mManagerThread member.

Differential Revision: https://phabricator.services.mozilla.com/D82502
2020-07-09 05:57:22 +00:00
Jean-Yves Avenard 788bbafac7 Bug 1650996 - P1. Remove RemodeDecoderManagerChild::CanSend method. r=mattwoodrow
The base IProtocol class already provides this.

Differential Revision: https://phabricator.services.mozilla.com/D82501
2020-07-08 14:06:48 +00:00
Jean-Yves Avenard 0f9c0d79c6 Bug 1649974 - P2. Use a TaskQueue with media threadpool for RemoteDecoderManagerParent. r=mattwoodrow
Sync dispatch are being used; due to how the background taskqueue is setup this could cause a hang if if also called from a background taskqueue.

Differential Revision: https://phabricator.services.mozilla.com/D82500
2020-07-09 02:46:55 +00:00
Mihai Alexandru Michis b29ef28dc4 Backed out 2 changesets (bug 1649974) as requested by jyavenard.
CLOSED TREE

Backed out changeset 4d7301e8eeb3 (bug 1649974)
Backed out changeset 69bacb6e8287 (bug 1649974)
2020-07-09 05:43:59 +03:00
Jean-Yves Avenard 16f75a9f90 Bug 1649974 - P2. Use a TaskQueue with media threadpool for RemoteDecoderManagerParent. r=mattwoodrow
Sync dispatch are being used; due to how the background taskqueue is setup this could cause a hang if if also called from a background taskqueue.

Differential Revision: https://phabricator.services.mozilla.com/D82500
2020-07-08 13:15:42 +00:00
alwu 9d553eb412 Bug 1649358 - return `UNKNOWN_ACTION` when fail to get autoplay permission r=bryce
We can have different autoplay permission setting for specific sites, and those setting can override the global autoplay setting.

Eg. Global permission setting is `Block Audio & Video` but site A is being set to `Block Audio Only`, then when inaudible video wants to start on siteA, it would be allowed to autoplay.

Returning `DENY_ACTION` is like specifically modifying the site permission setting, but in those cases, we should return `UNKNOWN_ACTION` because we are actually not able to check the site permission.

Differential Revision: https://phabricator.services.mozilla.com/D82570
2020-07-07 19:03:29 +00:00
Dan Minor d8e1e4a499 Bug 1650945 - Fix error message in IIRFilterNode::Create; r=padenot
Differential Revision: https://phabricator.services.mozilla.com/D82716
2020-07-08 14:05:33 +00:00
Bogdan Tara 0867b964e2 Backed out 5 changesets (bug 1650996, bug 1649974) for hazard failures CLOSED TREE
Backed out changeset de5e55b59a31 (bug 1650996)
Backed out changeset 35faa46f46f1 (bug 1650996)
Backed out changeset 6f779a3875a8 (bug 1650996)
Backed out changeset fac1e5a07a6c (bug 1649974)
Backed out changeset 3c5157a9e872 (bug 1649974)
2020-07-08 16:07:56 +03:00
Paul Adenot 1707079c2d Bug 1650181 - Null-check when getting default output device info, because there can be no output device. r=achronop
Differential Revision: https://phabricator.services.mozilla.com/D82560
2020-07-08 09:07:48 +00:00
Bogdan Tara 3fa273fbc7 Backed out 3 changesets (bug 1650277) for RunWatchdog crashes CLOSED TREE
Backed out changeset 07863e9844f0 (bug 1650277)
Backed out changeset 1bf131a86868 (bug 1650277)
Backed out changeset 11aa7071f858 (bug 1650277)
2020-07-08 11:07:49 +03:00
Jean-Yves Avenard 81add09c0e Bug 1650277 - P3. Use a media taskqueue with the MediaManager. r=jib
Rename PostTask methods into Dispatch to be more in-line with the current naming convention as PostTask pretty much always referred to the MessageLoop's method.

Differential Revision: https://phabricator.services.mozilla.com/D82159
2020-07-08 07:04:23 +00:00
Jean-Yves Avenard a056adde5c Bug 1650277 - P2. Ensure the CubebDeviceEnumerator is shutdown after the MTAThread. r=kinetik
On Windows the CubebDeviceEnumerator needs to run on an MTA thread; to achieve that goal we use the EnsureMTA utility.
EnsureMTA relies on a MTA thread to exist which will be destroyed when XPCOM shuts down ; as such we must shutdown the CubebDeviceEnumerator during the same shutdown phase.

ClearOnShutdown registrars are processed in LIFO order, so as the CubebDeviceEnumerator constructor uses EnsureMTA we are guaranteed that the CubebDeviceEnumerator clearOnShutdown will be processed before the EnsureMTA thread shutdown.
The CubebDeviceEnumerator needs to be shutdown before cubeb; which is also guaranteed as the cubeb instance is destroyed during the final XPCOM shutdown stage.

Fix GetSafety() thread-safety.

CubebDeviceEnumerator should be a static non-refcounted singleton on the stack really which would made the code much simpler, unfortunately its gtests rely on having the Shutdown method present to force re-scanning the devices and work with the mock cubeb.

Differential Revision: https://phabricator.services.mozilla.com/D82158
2020-07-08 03:59:29 +00:00
Jean-Yves Avenard bd343a92a2 Bug 1650277 - P1. Let CubebDeviceEnumerator worry about MTA requirements. r=kinetik
Ths helps not having to worry about how to create the thread; which could be probablematic when running off a thread pool.

Differential Revision: https://phabricator.services.mozilla.com/D82142
2020-07-08 03:59:22 +00:00
Jean-Yves Avenard ae45d4a7e0 Bug 1650996 - P3. Have RemoteDecoderManagerChild use a TaskQueue over a media threadpool. r=mjf
Differential Revision: https://phabricator.services.mozilla.com/D82503
2020-07-08 06:35:55 +00:00
Jean-Yves Avenard a7619dfaf8 Bug 1650996 - P2. Always initialise the RemoteDecoderChild manager thread. r=mjf
This allows to simplify the lifetime management off the RemoteDecoderModule's mManagerThread member.

Differential Revision: https://phabricator.services.mozilla.com/D82502
2020-07-08 04:21:25 +00:00
Jean-Yves Avenard f1cd4ddc78 Bug 1650996 - P1. Remove RemodeDecoderManagerChild::CanSend method. r=mattwoodrow
The base IProtocol class already provides this.

Differential Revision: https://phabricator.services.mozilla.com/D82501
2020-07-08 06:35:31 +00:00
Jean-Yves Avenard f5267597e4 Bug 1649974 - P2. Use a TaskQueue with media threadpool for RemoteDecoderManagerParent. r=mattwoodrow
Sync dispatch are being used; due to how the background taskqueue is setup this could cause a hang if if also called from a background taskqueue.

Differential Revision: https://phabricator.services.mozilla.com/D82500
2020-07-08 06:35:31 +00:00
Jean-Yves Avenard fe08ecbad5 Bug 1650260 - Remove assertion. r=bryce
While the duration returned by the demuxer is typically equal to the decoded size; recent cases have shown that this isn't always the case.

Now, the only way you can encounter this bug is if the user has set some pref. the audio BlankDecoderModule is never used by default; only the video one.

Differential Revision: https://phabricator.services.mozilla.com/D82138
2020-07-06 22:04:41 +00:00
Sylvestre Ledru caf785c695 Bug 1519636 - Reformat recent changes to the Google coding style r=andi
# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D82178
2020-07-04 09:38:43 +00:00
Paul Adenot bea4d42fdf Bug 1646743 - Don't attempt to get the output latency from the graph after and AudioContext has been shutdown. r=karlt
Depends on D80696

Differential Revision: https://phabricator.services.mozilla.com/D80836
2020-06-29 10:37:14 +00:00
Corentin Arnould a4fc56119e Bug 1650030 - Revert changes for bug 1618225. r=padenot
Differential Revision: https://phabricator.services.mozilla.com/D82197
2020-07-03 14:27:59 +00:00
Paul Adenot 1684c22031 Bug 1649691 - Make static assert less strict in MPSCQueue.h. r=achronop
Differential Revision: https://phabricator.services.mozilla.com/D81818
2020-07-03 12:24:37 +00:00
Jean-Yves Avenard 8fd158d479 Bug 1649684 - Use the current nsISerialEventTarget with the various process hosts. r=nika
In all those cases, the current nsISerialEventTarget is either the main thread or the MessageChannel's nsISerialEventTarget (since bug 1634846)

Differential Revision: https://phabricator.services.mozilla.com/D81966
2020-07-02 22:59:24 +00:00
alwu d1dde804d7 Bug 1643513 - part4 : add test. r=chunmin
Differential Revision: https://phabricator.services.mozilla.com/D81003
2020-07-02 17:46:38 +00:00
alwu 0c227d097b Bug 1643513 - part3 : add `onpositionstatechange` event handler on MediaController. r=chunmin,smaug
What this patch do are
- add `onpositionstatechange` event handler on MediaController
- `PositionStateEvent` would be sent to `positionstatechange` event handler

The advantage of doing so is
- to allow us to listen to the position change on the media controller interface (that can be used for testing and the future plan, the media hub)

Differential Revision: https://phabricator.services.mozilla.com/D80791
2020-07-02 19:41:22 +00:00
alwu f7b14399a5 Bug 1643513 - part2 : notify position state change when media session updates the position state. r=chunmin
What this patch do are
- propagate the position state change from the media session

The advantage of doing so is
- to allow us to notify this change to `MediaController` and eventually would notify that to `MediaControlKeySource`

Differential Revision: https://phabricator.services.mozilla.com/D80790
2020-07-02 01:23:24 +00:00
alwu 58beb8029a Bug 1643513 - part1 : set media position state to the key source. r=chunmin
What this patch do are
- to add `SetPositionState()` on `MediaControlKeySource`
- notify `MediaControlKeySource` when the main controller's position state changes

The advantage of doing so is
- to allow `MediaControlKeySource` to know the position state change so that it can update the display content (eg. showing the duration or the progress bar of playback)

Differential Revision: https://phabricator.services.mozilla.com/D80789
2020-07-02 19:18:48 +00:00
Dan Minor 3e6667d061 Bug 1646220 - Remove unlinkCapturer from VideoCaptureAndroid; r=ng
Differential Revision: https://phabricator.services.mozilla.com/D81374
2020-06-29 18:45:45 +00:00
Csoregi Natalia 4dcffa68cd Backed out 9 changesets (bug 1619953) for causing leaks. CLOSED TREE
Backed out changeset 9f610c8c44de (bug 1619953)
Backed out changeset 4e66983a4f00 (bug 1619953)
Backed out changeset 38aac5691967 (bug 1619953)
Backed out changeset 062c0c9b132f (bug 1619953)
Backed out changeset 830eb658d70e (bug 1619953)
Backed out changeset fccda4625d51 (bug 1619953)
Backed out changeset 4668c99560de (bug 1619953)
Backed out changeset 77c24528c8c2 (bug 1619953)
Backed out changeset b79dc688bfc9 (bug 1619953)
2020-07-02 17:58:57 +03:00
Subhamoy Sengupta 5a4cd913cb Bug 1619953 - P1 - Added missing include in PChromiumCDM.ipdl r=baku
This fix was required for subsequent patches to build successfully, because adding new source files exposed missing dependencies in unified sources.

Differential Revision: https://phabricator.services.mozilla.com/D75290
2020-07-02 13:37:13 +00:00
Alex Chronopoulos 679c0cbb7a Bug 1649058 - Replace MozPromise with SyncRunnable and assert not main thread. r=jya
Differential Revision: https://phabricator.services.mozilla.com/D81998
2020-07-02 12:20:24 +00:00
Martin Stransky 1b5c4db7c6 Bug 1649675 [Linux] Use DRM or Wayland VA-API display according to pref, r=jya
Depends on D81967

Differential Revision: https://phabricator.services.mozilla.com/D81968
2020-07-02 10:31:45 +00:00
Martin Stransky 8ea058903b Bug 1649675 [Linux] Load vaGetDisplayDRM() from libva-drm.so.2 for VA-API DRM display, r=jya
In order to implement VA-API playback we need a VADisplay connection.

According to preference load libva-wayland.so.2 or libva-drm.so.2 libraries
and dlsym vaGetDisplayWl or vaGetDisplayDRM to get VADisplay for VA-API decoding.

Differential Revision: https://phabricator.services.mozilla.com/D81967
2020-07-02 10:31:37 +00:00
Jean-Yves Avenard 8fc6e95f6c Bug 1649294 - Make RemoteDecoder use a background taskqueue. r=mattwoodrow,andi
There's a small race that can happen when the remote decoder gets shutdown during xpcom shutdown; that would cause GetCurrentSerialEventTarget to return null. Leading to an assertion failure in ActorLifecycleProxy thread-safety check when PRemoteDecoderManagerParent gets destroyed.

So we use a background taskqueue instead and cleanup a bit the threading code in there allowed thanks to the TaskQueue ability to not require an explicit shutdown.

Differential Revision: https://phabricator.services.mozilla.com/D81287
2020-07-02 00:26:46 +00:00
alwu 314c3e4ea8 Bug 1649636 - part2 : implement `SetEnableFullScreen()` and `SetEnablePictureInPictureMode()` on `MediaControlKeyManager`. r=chunmin
We forgot to implement those two methods on `MediaControlKeyManager`, which would result in not able to propagate those update to the real key source that handle the platform level APIs, such as MPRIS, SMTC.

Differential Revision: https://phabricator.services.mozilla.com/D81882
2020-07-02 00:10:07 +00:00
alwu a40cc076e4 Bug 1649636 - part1 : update controlled tab Id to the key source. r=chunmin
On GeckoView, when we update the property on the key source, such as the playback state, metadata. We want to know which tab that those properties change belong to.

Therefore, we create a method `SetControlledTabBrowsingContextId()` to tell the key source which tab is being controlled and all properties update should belong to that tab.

Differential Revision: https://phabricator.services.mozilla.com/D81881
2020-07-02 00:09:50 +00:00
Martin Stransky 54e081868e Bug 1649120 [Linux] Rename Wayland/DMABuf config functions at ffmpeg, r=jya
Depends on D81514

Differential Revision: https://phabricator.services.mozilla.com/D81515
2020-07-01 11:22:35 +00:00
David Major 7aafdc2a60 Bug 1649540 - Remove unified files workaround for MSVC in dom/media r=jya
We no longer need to worry about MSVC issues.

Differential Revision: https://phabricator.services.mozilla.com/D81730
2020-07-01 06:42:46 +00:00
Simon Giesecke 9364b353d4 Bug 1648010 - Remove NS_NAMED_LITERAL_CSTRING and NS_NAMED_LITERAL_STRING macros. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D80631
2020-07-01 08:42:31 +00:00
Simon Giesecke e3c223da3e Bug 1648010 - Fix uses of NS_LITERAL_STRING with C string literals. r=geckoview-reviewers,agi,froydnj
Differential Revision: https://phabricator.services.mozilla.com/D80861
2020-07-01 08:34:12 +00:00
Simon Giesecke cd8b8939b9 Bug 1648010 - Replace uses of NS_LITERAL_STRING/NS_LITERAL_CSTRING macros by _ns literals. r=geckoview-reviewers,jgilbert,agi,hsivonen,froydnj
Differential Revision: https://phabricator.services.mozilla.com/D80860
2020-07-01 08:29:29 +00:00
Paul Adenot aa36b57271 Bug 1649233 - When profiling, record the theoretical budget with a single payload. r=gerald
Differential Revision: https://phabricator.services.mozilla.com/D81593
2020-06-30 14:25:27 +00:00
Narcis Beleuzu 3de598d4a7 Backed out 2 changesets (bug 1649233) for bustages on ProfilerMarkerPayload.h . CLOSED TREE
Backed out changeset 399e54895a75 (bug 1649233)
Backed out changeset 3955edb371cf (bug 1649233)
2020-06-30 16:36:06 +03:00
Paul Adenot 76b771b47c Bug 1649233 - When profiling, record the theoretical budget with a single payload. r=gerald
Differential Revision: https://phabricator.services.mozilla.com/D81593
2020-06-30 09:05:00 +00:00
Alex Chronopoulos 5e3fa4ab8b Bug 1648732 - Fine tune the check for available frames in AudioResampler. r=padenot
In AudioResampler the resampling of a buffer happens on pieces of 128 or 256 frames. Before resampling, the number of available frames is checked for the whole buffer and for the individual smaller pieces. When the whole buffer is checked we need to check for one extra frame in order to compensate the case that one individual resampling has consumed an extra frame, something that is normal and happens periodically.

Differential Revision: https://phabricator.services.mozilla.com/D81321
2020-06-30 11:33:03 +00:00
Narcis Beleuzu 3700aab557 Backed out 7 changesets (bug 1634846, bug 1647628, bug 1649294, bug 1647112) for webgl-conf crashes. CLOSED TREE
Backed out changeset 4441d06e96c3 (bug 1647628)
Backed out changeset 4efaf32bc8f7 (bug 1647112)
Backed out changeset 2d24ad813039 (bug 1647112)
Backed out changeset fda262d73a13 (bug 1649294)
Backed out changeset 5863f9c5229f (bug 1634846)
Backed out changeset bca79526745d (bug 1634846)
Backed out changeset d539408a0048 (bug 1634846)
2020-06-30 09:50:00 +03:00
Nico Grunbaum f8f21f2398 Bug 1648600 - add SDP parsing errors to SDP history;r=dminor,jib,emilio
Differential Revision: https://phabricator.services.mozilla.com/D81265
2020-06-30 02:38:40 +00:00
Nico Grunbaum c78d9cccad Bug 1644709 - Add PeerConnection configuration to about:webrtc;r=dminor,jib,webidl,smaug
Differential Revision: https://phabricator.services.mozilla.com/D80787
2020-06-30 02:35:36 +00:00
Jean-Yves Avenard c251c5b2c7 Bug 1649294 - Make RemoteDecoder use a background taskqueue. r=mattwoodrow
There's a small race that can happen when the remote decoder gets shutdown during xpcom shutdown; that would cause GetCurrentSerialEventTarget to return null. Leading to an assertion failure in ActorLifecycleProxy thread-safety check when PRemoteDecoderManagerParent gets destroyed.

So we use a background taskqueue instead and cleanup a bit the threading code in there allowed thanks to the TaskQueue ability to not require an explicit shutdown.

Differential Revision: https://phabricator.services.mozilla.com/D81287
2020-06-30 02:50:38 +00:00
alwu 654853348d Bug 1647070 - part2 : address null image case. r=chunmin
The image container might be null, so we should handle this case properly as a fail case.

Differential Revision: https://phabricator.services.mozilla.com/D80745
2020-06-25 00:03:24 +00:00
Junior Hsu 4a986df77d Bug 1633935 - P6 Skip one media track failure caused by performance gain, r=alwu
Depends on D76972

Differential Revision: https://phabricator.services.mozilla.com/D76973
2020-06-30 00:33:26 +00:00
Jean-Yves Avenard 5a39f11397 Bug 1648363 - Don't use AbstractThread with GMP service. r=jolin
Currently that thread is always the main thread; but really it doesn't have to be.

We make this use a generic nsISerialEventTarget and rename some members to better reflect what thread is doing what.

Differential Revision: https://phabricator.services.mozilla.com/D81079
2020-06-27 01:26:37 +00:00
Razvan Maries dcaaec0f7b Bug 1304480 - Disabled test_background_video_suspend.html on Android. r=jmaher
Differential Revision: https://phabricator.services.mozilla.com/D81401
2020-06-26 22:06:35 +00:00
Dan Minor 375174f174 Bug 1648123 - Add exception and nullptr checks after calling getDeviceInfo; r=ng
Differential Revision: https://phabricator.services.mozilla.com/D81315
2020-06-26 20:13:21 +00:00
Paul Adenot 36b91efcb0 Bug 1648059 - Switch to async tracing in AudioStream.cpp and GraphDriver.cpp. r=alwu
Differential Revision: https://phabricator.services.mozilla.com/D80859
2020-06-25 22:26:31 +00:00
Emilio Cobos Álvarez 7c995807da Bug 1646936 - Generate a single metadata file in the objdir, and feed it to cbindgen. r=glandium
Differential Revision: https://phabricator.services.mozilla.com/D80360
2020-06-26 10:41:26 +00:00
Coroiu Cristina 302c2fa31a Backed out changeset 8f948dd74aba (bug 1646936) for SM and Toolchain failures on a CLOSED TREE 2020-06-26 13:08:09 +03:00
Emilio Cobos Álvarez 9c7c03bf30 Bug 1646936 - Generate a single metadata file in the objdir, and feed it to cbindgen. r=glandium
Differential Revision: https://phabricator.services.mozilla.com/D80360
2020-06-26 09:37:16 +00:00
Jan-Ivar Bruaroey 07bb0b994c Bug 1579261 - Remove getUserMedia, getDisplayMedia & mozGetUserMedia cross-origin probes. r=ng
Differential Revision: https://phabricator.services.mozilla.com/D80769
2020-06-24 17:31:07 +00:00
Butkovits Atila 6d4dc7f680 Backed out 13 changesets (bug 1633935) as requested by Junior. CLOSED TREE
Backed out changeset 398fc19f5f6a (bug 1633935)
Backed out changeset 25822279ba5b (bug 1633935)
Backed out changeset e87b11c172b9 (bug 1633935)
Backed out changeset 709f8d50aa33 (bug 1633935)
Backed out changeset 3b268ac50692 (bug 1633935)
Backed out changeset ac9c5c1e5162 (bug 1633935)
Backed out changeset 292a5b34e9f7 (bug 1633935)
Backed out changeset 6251c22cc8f1 (bug 1633935)
Backed out changeset 73b51a139c91 (bug 1633935)
Backed out changeset 2a9873ad6856 (bug 1633935)
Backed out changeset be03e0e7b645 (bug 1633935)
Backed out changeset df5abc2c0734 (bug 1633935)
Backed out changeset 19dcca77a1cf (bug 1633935)
2020-06-25 20:25:36 +03:00
Alex Chronopoulos 2a30ab0b26 Bug 1513745 - Wait for input audio to arrive before start recording it. r=padenot
The error indicates that test timeouts because there is no audio in the output. As a workaround the the test will wait for audio in the input and then will start recording and checking the output.

Differential Revision: https://phabricator.services.mozilla.com/D81116
2020-06-25 15:10:49 +00:00
Paul Adenot 39504b3094 Bug 1645416 - Fix the TracePayload layout on 32bits and re-enable the static assert that check the struct has a size that is a power of two. r=achronop
Differential Revision: https://phabricator.services.mozilla.com/D80696
2020-06-25 12:33:31 +00:00
Chris Fronk 6f84249b41 Bug 1337953 - Make nsDeque templated on pointer type r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D79629
2020-06-25 02:39:23 +00:00
Karl Tomlinson a235906df6 Bug 1647750 error out when AudioWorkletProcessor#process() detaches output Float32Array r=padenot
Differential Revision: https://phabricator.services.mozilla.com/D80804
2020-06-25 02:09:39 +00:00
Karl Tomlinson 7fd5763b3a Bug 1647750 use MakeScopeExit() to avoid repetition of error paths r=padenot
Differential Revision: https://phabricator.services.mozilla.com/D80803
2020-06-24 09:29:38 +00:00
Noemi Erli fa3b2d4906 Backed out changeset 4ae7220cf7d8 (bug 1645416) for causing Linux build bustages a=backout 2020-06-25 02:08:43 +03:00
Paul Adenot 25c8980495 Bug 1645416 - Fix the TracePayload layout on 32bits and re-enable the static assert that check the struct has a size that is a power of two. r=achronop
Differential Revision: https://phabricator.services.mozilla.com/D80696
2020-06-24 14:31:07 +00:00
Paul Adenot fc302cd8b4 Bug 1647717 - Fix audio thread registration to the profiler in AudioStream.cpp. r=achronop
More or less the same as GraphDriver.cpp but simpler because there is only one
return statement.

Differential Revision: https://phabricator.services.mozilla.com/D80857
2020-06-24 12:45:36 +00:00
Razvan Maries 15c6376141 Backed out changeset 3a956cf3b8d3 (bug 1645416) for build bustages on MPSCQueue.h. CLOSED TREE 2020-06-24 15:31:34 +03:00
Paul Adenot 1a80554253 Bug 1645416 - Fix the TracePayload layout on 32bits and re-enable the static assert that check the struct has a size that is a power of two. r=achronop
Differential Revision: https://phabricator.services.mozilla.com/D80696
2020-06-24 12:05:04 +00:00
Corentin Arnould 76419cd0d4 Bug 1618225 - Added wpt test for loop with duration r=padenot
Silenced the mochitest

Differential Revision: https://phabricator.services.mozilla.com/D79875
2020-06-24 12:00:18 +00:00
Corentin Arnould 2ef567c825 Bug 1618225 - Updated mochitest for loop with duration r=padenot
Differential Revision: https://phabricator.services.mozilla.com/D79874
2020-06-24 12:00:11 +00:00
Corentin Arnould d3cc80aa8c Bug 1618225 - Set stop time when using loop with duration. r=padenot
The AudioBufferSourceNode can now be looping and stop after duration.

Differential Revision: https://phabricator.services.mozilla.com/D79873
2020-06-24 11:59:53 +00:00
alwu 2c3533116e Bug 1642715 - part7 : add test. r=chunmin
Differential Revision: https://phabricator.services.mozilla.com/D79786
2020-06-24 00:46:51 +00:00
alwu 4f5d63572f Bug 1642715 - part6 : notify change for fullscreen and picture-in-picture. r=chunmin
This patch would
- introduce new methods `SetEnableFullScreen()` and `SetEnablePictureInPictureMode()` on `MediaControlKeySource`
- notify the change of enabling/disabling the fullscreen and picture-in-picture mode to `MediaControlKeySource`

The advantage of doing this is
- to allow the key source to do corresponding operations when media enters/leaves the fullscreen/picture-in-picture
eg. GeckoView would use them to implement its API, `onFullscreen()` and `onPictureInPicture()`

Differential Revision: https://phabricator.services.mozilla.com/D79785
2020-06-24 05:54:03 +00:00
alwu d72eadc6eb Bug 1642715 - part5 : activate a controller when its media enters fullscreen or picture-in-picture mode. r=chunmin
This patch would
- active the controller when it enters fullscreen or picture-in-picture mode

The advantage of doing this is
- allow to control media even if media doesn't start

Differential Revision: https://phabricator.services.mozilla.com/D79766
2020-06-24 05:53:36 +00:00
alwu 1c96a4a7d4 Bug 1642715 - part4 : notify media controller when media enters/leaves fullscreen. r=chunmin,smaug
This patch would
- notify media controller when media enters/leaves fullscreen

The advantage of doing this is
- prework of being able to control media when media enters fullscreen

Differential Revision: https://phabricator.services.mozilla.com/D79765
2020-06-24 05:53:08 +00:00
alwu b83eca9ce8 Bug 1642715 - part3 : prevent controlling inactive controller. r=chunmin
This patch would
- stop notifying media key to media in content process is the controller is inactive

The advantage of doing this is
- to prevent unexpectedly controlling an inactive controller

Differential Revision: https://phabricator.services.mozilla.com/D79235
2020-06-24 05:52:40 +00:00
alwu 305a14713f Bug 1642715 - part1 : move timer to media controller. r=chunmin
This patch would
- move the mechanism of creating a stop timer from media element to media controller

The advantage of doing this is
- to remove redundant timers in the content process, because we only need to maintain one global timer for a whole tab

Differential Revision: https://phabricator.services.mozilla.com/D79233
2020-06-24 05:52:30 +00:00
Junior Hsu 9c796f571b Bug 1633935 - P6 Skip one media track failure caused by performance gain, r=alwu
Depends on D76972

Differential Revision: https://phabricator.services.mozilla.com/D76973
2020-06-23 16:57:21 +00:00
alwu 790d329788 Bug 1645852 - do not call `BrowsingContext::Get()` after XPCOM shutdown. r=bryce
If XPCOM has been shutdown, then we should not access the `BrowsingContext::Get()` because `sBrowsingContexts` has also been destroyed.

Differential Revision: https://phabricator.services.mozilla.com/D80559
2020-06-23 18:39:57 +00:00
Andrew McCreight 01610277f9 Bug 1647795 - Remove some uses of "blacklist" from dom/ipc/. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D80694
2020-06-23 17:50:23 +00:00
Paul Adenot bdd0a1286c Bug 1646348 - Fix unified compilation. r=achronop
Differential Revision: https://phabricator.services.mozilla.com/D80467
2020-06-23 16:43:52 +00:00
Paul Adenot f2a2fb7d24 Bug 1646348 - Use the AudioThreadRegistry in GraphDriver.cpp. r=achronop
This patch changes the type of mAudioThreadId because `std:🧵:id` is
non-memovable and AudioThreadRegistry uses an nsTArray, that needs elements to
be memovable.

Differential Revision: https://phabricator.services.mozilla.com/D80466
2020-06-23 16:43:40 +00:00
Paul Adenot ddee5175d5 Bug 1646348 - Expose an AudioThreadRegistry in CubebUtils. r=achronop
Differential Revision: https://phabricator.services.mozilla.com/D80465
2020-06-23 16:43:22 +00:00
Paul Adenot a995dc9849 Bug 1646348 - Introduce the AudioThreadRegistry. r=achronop
This keeps track of how many users of an audio thread there is, and takes care
of registring or unregistring those threads to the Gecko Profiler.

Differential Revision: https://phabricator.services.mozilla.com/D80464
2020-06-23 16:43:09 +00:00
Paul Adenot 5272ad6142 Bug 1646348 - Fix audio thread registration in GraphDriver.cpp. r=achronop
Differential Revision: https://phabricator.services.mozilla.com/D80000
2020-06-23 16:42:57 +00:00
Dan Minor 56605a5c2c Bug 1647368 - Update build files; r=ng
Depends on D80545

Differential Revision: https://phabricator.services.mozilla.com/D80546
2020-06-22 21:10:05 +00:00
Dan Minor 63eae5e0e9 Bug 1647368 - Fix include paths in moved files; r=ng
Depends on D80544

Differential Revision: https://phabricator.services.mozilla.com/D80545
2020-06-22 21:09:52 +00:00
Dan Minor 0868cb89d3 Bug 1647368 - Move objc video capture code to dom/media/systemservices; r=ng
All changes in these files are a result of code formatting being applied.
When these files were under webrtc, they were treated as third party code and
not formatting. By moving them, formatting is now applied.

Differential Revision: https://phabricator.services.mozilla.com/D80544
2020-06-22 21:09:34 +00:00
Danny b870232f08 Bug 1622660 - Removed else after return r=sotaro
Differential Revision: https://phabricator.services.mozilla.com/D80471
2020-06-23 10:47:05 +00:00
Butkovits Atila 7916df7f02 Backed out changeset 5614bcd268d1 (bug 1337953) for bustage at FuzzyLayer.cpp. CLOSED TREE 2020-06-23 11:01:37 +03:00
Jean-Yves Avenard 87438519f0 Bug 1637500 - P2. Rename methods as they are not always dealing with "threads". r=froydnj
Before P1, GetCurrentThreadSerialEventTarget would have always returned the same data as NS_GetCurrentThread, making the comment incorrect Now it will properly return the running TaskQueue if any.

This change of name more clearly exposes what they are doing, as we aren't always dealing with threads directly; but a nsISerialEventTarget

Differential Revision: https://phabricator.services.mozilla.com/D80354
2020-06-23 05:05:36 +00:00
Chris Fronk cea9cef934 Bug 1337953 - Make nsDeque templated on pointer type r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D79629
2020-06-23 00:58:13 +00:00
alwu 110c2fe364 Bug 1642590 - part2 : add test. r=bryce
Differential Revision: https://phabricator.services.mozilla.com/D79926
2020-06-17 20:50:08 +00:00
tkhan 6ccabd4784 Bug 1602668 - M(1) manifest and test changes. r=kmag,karlt,necko-reviewers,valentin
Differential Revision: https://phabricator.services.mozilla.com/D70362
2020-06-22 19:09:49 +00:00
Jean-Yves Avenard ea34205395 Bug 1646054 - P1. Remove EventTargetWrapper class. r=froydnj
We also establish the intent of bug 1602167 on the TaskQueue object

Differential Revision: https://phabricator.services.mozilla.com/D80351
2020-06-22 13:55:21 +00:00
Andrea Marchesini 7468c2f663 Bug 1642667 - Isolate alt-srv and connection pool per first-party when privacy.partition.network_state is set to true - part 2 - tests, r=dragana,necko-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D78083
2020-06-22 11:03:24 +00:00
Alex Chronopoulos 1de9bc130a Bug 1493990 - Return a null device id when the device is the default one. r=jib.
When the default sink (sink-id equal to an empty string) has been requested,  null device-id is returned. The device-id is propagated all the way down to cubeb. When cubeb is configured with null device-id the default device is chosen. In addition to that, on default device change the new default will be followed. This aligns with the expected behavior for the default sink.

Differential Revision: https://phabricator.services.mozilla.com/D77810
2020-06-12 15:18:53 +00:00
Alex Chronopoulos a5751a189f Bug 1493990 - Enhance AudioStreamTrack to set output device and handle the connection between different graphs. r=padenot
A new method has been added in AudioStreamTrack to allow the change of the output device. Also, the methods that add/remove the AudioOutput or Volume have been enhanced to use the CrossGraphManager, when available, in order to set the AudioOutput or volume to the correct MediaTrack.

Differential Revision: https://phabricator.services.mozilla.com/D77808
2020-06-12 14:03:30 +00:00
Alex Chronopoulos 4a4c9eae75 Bug 1493990 - Create two new MediaTrack able to transfer the audio data between different threads. r=padenot.
The name of the two new tracks is CrossGraphTransmitter and CrossGraphReceiver. They are used together to transfer the audio data of the transmitter to the receiver which belongs to different MTG. In addition to that a CrossGraphManager class has been created that creates the connection between the transmitter and the receiver and can redirect to the correct track some operations like the volume change etc.

Differential Revision: https://phabricator.services.mozilla.com/D77807
2020-06-18 13:58:06 +00:00
Corentin Arnould 5d8eb750cd Bug 1615130 - Fix uninitialized data. r=padenot
Values are set to 0 by default rather than uninitialized. It is useful when JSContext is null.

Differential Revision: https://phabricator.services.mozilla.com/D79986
2020-06-22 10:21:40 +00:00
Martin Stransky 1e7a50774c Bug 1645704 [Wayland] Rename WaylandDMABufSurface to DMABufSurface at ffmpeg, r=jya
Prepare ffmpeg decoding module to X11 dmabuf implementation. In order to cover both X11 and Wayland backend do:

- Use DMABUFSurfaceImage instead of WaylandDMABUFSurfaceImage
- Use DMABufSurface instead of WaylandDMABufSurface
- Rename former DMABufSurface to DMABufSurfaceWrapper to state it actually wraps the DMABufSurface.
- Use DMABufSurfaceYUV instead of WaylandDMABufSurfaceNV12

Differential Revision: https://phabricator.services.mozilla.com/D79638
2020-06-21 13:59:09 +00:00
Chun-Min Chang ce90d9b622 Bug 1623971 - P19: Resolve fetching upon image is ready r=alwu
The FetchImageHelp doesn't need to decode the fetched image before
handing the image to its caller since the decoded raw data won't be used
in the caller. The ImagePromise can be resolved upon image is fetched
(ready) instead.

Differential Revision: https://phabricator.services.mozilla.com/D79736
2020-06-19 00:21:31 +00:00
Chun-Min Chang ab055d290e Bug 1623971 - P17: Set media-session's MediaImage to the SMTC interface r=alwu,thomasmo
This patch does the following things:
1. Use `FetchImageHelper` to fetch the MediaImage defined in
   media-session
2. Upon the above image is fetched, set it to the SMTC's thumbnail

Differential Revision: https://phabricator.services.mozilla.com/D77893
2020-06-19 00:21:21 +00:00
Alex Chronopoulos 4c1d0136c9 Bug 1584959 - Avoid calling the converter if the conversion is not possible. r=bryce
Differential Revision: https://phabricator.services.mozilla.com/D56736
2020-06-18 15:50:03 +00:00
Cosmin Sabou 6822e213d4 Backed out changeset f26dbc8340cf (bug 1646348) for assertion failures on core/platform.cpp. CLOSED TREE 2020-06-18 17:18:25 +03:00
Paul Adenot e6c3203e23 Bug 1646348 - Fix audio thread registration in GraphDriver.cpp. r=achronop
Differential Revision: https://phabricator.services.mozilla.com/D80000
2020-06-18 13:23:09 +00:00
alwu ed71ecf758 Bug 1631336 - always disconnect the request. r=bryce
Differential Revision: https://phabricator.services.mozilla.com/D79389
2020-06-17 14:58:22 +00:00
Nicholas Nethercote a8f5f49b8a Bug 1645982 - Rename some service getters in `Services.py` to better match the types. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D79791
2020-06-16 23:32:21 +00:00
alwu 9687d47fe3 Bug 1644479 - replace assertions with early returns. r=chunmin
Still can not figure out how did we enable the same action twice, because we would only update the action change when the action handler is set from `null` to `something` or from `something` to `nothing` [1]. In addition, the browsing context Id for a media session is always unchanged, so it's guarantee to set the action on the correct `MediaSessionInfo`.

However, in order to avoid having more crashes, I have to change the assertions to early returns and add logs to help us be aware of this issue if it happens again.

[1] https://searchfox.org/mozilla-central/rev/fac90408bcf52ca88a3dcd2ef30a379b68ab24e2/dom/media/mediasession/MediaSession.cpp#71-75

Differential Revision: https://phabricator.services.mozilla.com/D78947
2020-06-16 19:05:02 +00:00
Sylvestre Ledru 85c05f3a47 Bug 1519636 - Reformat recent changes to the Google coding style r=andi
# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D79795
2020-06-16 14:37:23 +00:00
Paul Adenot 1d21042226 Bug 1645766 - Fix build failure in AsyncLogger.h on ppc64le. r=achronop
Thanks to Dan Horák <dan@danny.cz> for the report and fix suggestion.

Differential Revision: https://phabricator.services.mozilla.com/D79683
2020-06-15 13:45:08 +00:00
Martin Stransky 4dbb2503ff Bug 1629788 [Wayland] Implement SW decoding to WaylandDMABufSurface, r=jya
- Use WaylandDMABufSurface for SW decoded frames when they can be converted to NV12 format.
- Rename VAAPIFrameHolder to DMABufSurface and use it as general placeholder for WaylandDMABufSurface surface.
  It's used for VA-API/SW video playback and holds decoded video images until thery are used by gecko rendering engine.
- Implmenet a linked list of DMABufSurface where recently used frames are stored. The frames are recycled by ffmpeg
  decoder for VA-API and SW video playback.

Differential Revision: https://phabricator.services.mozilla.com/D78292
2020-06-13 18:38:38 +00:00
Jean-Yves Avenard 9a7590fb88 Bug 1634904 - Use the last sample's input time when draining. r=bryce
The AAC MFT has a latency of one packet (1024 frames); when we drain the decoder to retrieve that last data, it sets the the decoded data start time to the time of the end of the previous data.

this is the right thing to do under most cases; however when dealing with content with broken timestamps it can lead to bad A/V sync.

Differential Revision: https://phabricator.services.mozilla.com/D79456
2020-06-12 18:51:20 +00:00
Bogdan Tara f3d007c8fd Backed out 3 changesets (bug 1629788) for WaylandDMABufSurface.cpp related bustages CLOSED TREE
Backed out changeset 31fba4d1fe1d (bug 1629788)
Backed out changeset 9d1e4da287a6 (bug 1629788)
Backed out changeset 23791ccf64dd (bug 1629788)
2020-06-13 13:56:04 +03:00
Martin Stransky 6518d7373b Bug 1629788 [Wayland] Implement SW decoding to WaylandDMABufSurface, r=jya
- Use WaylandDMABufSurface for SW decoded frames when they can be converted to NV12 format.
- Rename VAAPIFrameHolder to DMABufSurface and use it as general placeholder for WaylandDMABufSurface surface.
  It's used for VA-API/SW video playback and holds decoded video images until thery are used by gecko rendering engine.
- Implmenet a linked list of DMABufSurface where recently used frames are stored. The frames are recycled by ffmpeg
  decoder for VA-API and SW video playback.

Differential Revision: https://phabricator.services.mozilla.com/D78292
2020-06-13 10:35:40 +00:00
Karl Tomlinson 209a34c2b7 Bug 1642849 shut down MediaTrackGraph from AudioContext when window will be destroyed r=padenot
Differential Revision: https://phabricator.services.mozilla.com/D74814
2020-06-12 03:53:34 +00:00
Paul Adenot f8dfbc795e Bug 1626918 - Properly check thread id when running with cubeb not sandboxed on a CLOSED TREE.
Differential Revision: https://phabricator.services.mozilla.com/D79486
2020-06-12 15:19:25 +00:00
Paul Adenot a0218e46e7 Bug 1626918 - Don't require POT for queue items on windows/android for now, on a CLOSED TREE
This is tracked in bug 1645416.

Differential Revision: https://phabricator.services.mozilla.com/D79473
2020-06-12 14:28:33 +00:00
Paul Adenot d6a6773f04 Bug 1626918 - Don't register the audio callback thread when using audioipc: it's already registered. r=achronop
Depends on D78510

Differential Revision: https://phabricator.services.mozilla.com/D79460
2020-06-12 13:33:04 +00:00
Paul Adenot 32561dcfc4 Bug 1626918 - Have a fixed size buffer for the message part of the tracing. r=achronop
Differential Revision: https://phabricator.services.mozilla.com/D78510
2020-06-12 13:14:21 +00:00
Paul Adenot 3162f50be2 Bug 1626918 - Don't start/stop the real-time tracing code from the objects they measure. r=achronop
The profile now handles this.

Differential Revision: https://phabricator.services.mozilla.com/D78506
2020-06-12 13:41:12 +00:00
Paul Adenot 33cf21901b Bug 1626918 - Register the audio callback thread(s) to the Gecko profiler even when it changes. r=achronop
Differential Revision: https://phabricator.services.mozilla.com/D78504
2020-06-12 13:32:49 +00:00
Paul Adenot 52ebdcabd2 Bug 1626918 - Teach AsyncLogger to output profiler markers. r=gerald
Differential Revision: https://phabricator.services.mozilla.com/D78501
2020-06-12 13:12:59 +00:00
Paul Adenot 3b72f1fb2f Bug 1626918 - Split the MPSC queue in its own file, and generalize it for any type. r=achronop
The allocation still needs to be a power of two so the ergonomics are not
amazing, but this will do until we replace with a buffer-based MPSC ringbuffer.

Differential Revision: https://phabricator.services.mozilla.com/D78499
2020-06-12 13:12:55 +00:00
Paul Adenot 14a4e78f84 Bug 1626918 - Push PID and TIP gathering to AsyncLogger. r=achronop
Differential Revision: https://phabricator.services.mozilla.com/D78498
2020-06-12 13:12:50 +00:00
Paul Adenot 7f0910f11a Bug 1626918 - Push the JSON serialization logic for MOZ_LOG output in AsyncLogger, prepare for another mode. r=achronop
Differential Revision: https://phabricator.services.mozilla.com/D78496
2020-06-12 13:11:47 +00:00
Karl Tomlinson f426576017 Bug 1644647 reject promises for Close AudioContextOperations run after forced graph shutdown r=padenot
and re-enable OnStateChanged() transition assertions.

Rejecting the promise avoids having AudioContextOperation promises resolve out
of order when AudioContextOperationControlMessage::RunDuringShutdown()
resolves a Close operation shortly after Run() for a previous operation has
queued its update via mUpdateRunnables.  mUpdateRunnables are run after
controlMessagesToRunDuringShutdown.
https://searchfox.org/mozilla-central/rev/ea7f70dac1c5fd18400f6d2a92679777d4b21492/dom/media/MediaTrackGraph.cpp#1793,1803

AudioContext::Shutdown() takes care of rejecting JS Promises when the window
is being destroyed.

Differential Revision: https://phabricator.services.mozilla.com/D79055
2020-06-12 02:38:35 +00:00
Jean-Yves Avenard 8e4b7ba238 Bug 1644009 - P4. Revert "Bug 1592488 - P7. Ensure an AbstractThread exists with RemoteDecoder manager thread." r=mattwoodrow
DirectTask dispatching will now be directly handled by nsThread.

Differential Revision: https://phabricator.services.mozilla.com/D79088
2020-06-12 05:09:48 +00:00
Karl Tomlinson 632dfeb6cc Bug 1638243 reject promises for Resume AudioContextOperations that have not run by graph shutdown r=padenot
The promises are rejected before shutting down threads so that they don't need
to wait for nested event loops to exit.

Differential Revision: https://phabricator.services.mozilla.com/D76807
2020-06-12 01:12:56 +00:00
Karl Tomlinson 41f6931d73 Bug 1644647 rewrite AudioContextOperation handling using PendingResumeOperation r=padenot
The key change here is that AudioContextOperation promises for the same
AudioContext are resolved in order as long as the graph is running.
There is one remaining case where AudioContextOperation promises can be
resolved out of order, which is when
AudioContextOperationControlMessage::RunDuringShutdown() resolves a Close
operation shortly after Run() has queued its update via mUpdateRunnables.
mUpdateRunnables are run after controlMessagesToRunDuringShutdown.
https://searchfox.org/mozilla-central/rev/ea7f70dac1c5fd18400f6d2a92679777d4b21492/dom/media/MediaTrackGraph.cpp#1793,1803

Pending resume operations are now stored on the graph instead of on
mNextDriver.  This means there is no need to move operations between drivers
when switching from one mNextDriver to another, the code for which was
previously missing.

Suspend operations are performed immediately, because even a callback driver
can render nothing.  Tracks are not resumed until either there is an
AudioCallbackDriver to deliver the rendered audio or the Resume operation is
canceled by a subsequent Suspend.

While the graph is running, DispatchToMainThreadStableState() is used
consistently, whereas previously this was mixed with direct Dispatch() to the
main thread, which could have the runnable Run() before main thread state had
been updated for rendering up to the time of a Suspend.

Differential Revision: https://phabricator.services.mozilla.com/D76806
2020-06-11 08:52:00 +00:00
Karl Tomlinson ea503f2013 Bug 1644647 - introduce PendingResumeOperation r=padenot
Differential Revision: https://phabricator.services.mozilla.com/D76805
2020-06-12 02:17:33 +00:00
Karl Tomlinson 9f36b6849d Bug 1644647 use AudioContextOperation::Resume to start realtime AudioNodeTracks r=padenot
This provides that a new track does not start processing before existing
tracks in the AudioContext, which may not be resumed until an
AudioCallbackDriver is running.

Depends on D79048

Differential Revision: https://phabricator.services.mozilla.com/D79049
2020-06-12 00:50:34 +00:00
Karl Tomlinson 8ebfa90f03 Bug 1644647 use the same mechanism for the first suspended->running transition as for others r=padenot
Differential Revision: https://phabricator.services.mozilla.com/D79048
2020-06-11 08:51:17 +00:00
Karl Tomlinson b46ca09637 Bug 1644647 explicitly initialize mFallbackDriverState r=padenot
There is no change in behavior here because the default constructor is zero initialized
https://searchfox.org/mozilla-central/rev/bc3600def806859c31b2c7ac06e3d69271052a89/mfbt/Atomics.h#287
and None is zero.
https://searchfox.org/mozilla-central/rev/bc3600def806859c31b2c7ac06e3d69271052a89/dom/media/GraphDriver.h#763

Differential Revision: https://phabricator.services.mozilla.com/D79043
2020-06-12 01:02:18 +00:00
Karl Tomlinson 32c6cac7db Bug 1644647 - Bug 1285290 use strong pointers for tracks in ApplyAudioContextOperation() r=padenot
This will be helpful when delaying resumption of tracks until there is an AudioCallbackDriver.

The memory for the array is also transferred to the callee to save an allocation.

Differential Revision: https://phabricator.services.mozilla.com/D76801
2020-06-12 01:02:18 +00:00
Bryce Seager van Dyk ac666e8dcb Bug 1643375 - Remove VideoData::YCbCrBuffer::Plane::mOffset. r=alwu
Because we store each plane's data pointer we don't need to store a separate
offset, we can just roll that offset into the pointer for that plane.

This helps remove a lot of code where we're not using the offset anyway, and in
the Chromium CDM case we simply roll the offset into our data pointer.

Differential Revision: https://phabricator.services.mozilla.com/D78320
2020-06-11 23:04:55 +00:00
Razvan Maries 6425307954 Backed out 2 changesets (bug 1642667) for perma failures on test_peerConnection_basicAudioNATRelay.html. CLOSED TREE
Backed out changeset 94d3e7706178 (bug 1642667)
Backed out changeset f17d5aa45ecc (bug 1642667)
2020-06-12 00:46:08 +03:00
Andrea Marchesini c1c4f9f3ca Bug 1642667 - Isolate alt-srv and connection pool per first-party when privacy.partition.network_state is set to true - part 2 - tests, r=dragana,necko-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D78083
2020-06-10 13:38:24 +00:00
Alex Chronopoulos ff12e214be Bug 1644524 - Fix a gtest to assert the initial state sooner. r=padenot
Differential Revision: https://phabricator.services.mozilla.com/D79078
2020-06-11 13:21:09 +00:00
Nico Grunbaum 5442b2eb88 Bug 1624967 - Display entire SDP history about:webrtc;r=dminor,webidl,smaug,flod
Differential Revision: https://phabricator.services.mozilla.com/D78866
2020-06-10 13:51:41 +00:00
Nico Grunbaum 8108184b4f Bug 1637450 - Add Video Frame statistics to about:webrtc;r=bwc,webidl,smaug
Differential Revision: https://phabricator.services.mozilla.com/D75073
2020-06-10 16:34:25 +00:00
Narcis Beleuzu 86aa1a058e Backed out 2 changesets (bug 1642667) for mda failures on test_peerConnection_basicAudioNATRelay.html . CLOSED TREE
Backed out changeset c1672891baf5 (bug 1642667)
Backed out changeset 4745600e205a (bug 1642667)
2020-06-10 16:34:45 +03:00
Andrea Marchesini 3ba071fd19 Bug 1642667 - Isolate alt-srv and connection pool per first-party when privacy.partition.network_state is set to true - part 2 - tests, r=dragana,necko-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D78083
2020-06-09 11:55:21 +00:00
Simon Giesecke 9029b95922 Bug 1643289 - Move elements where possible in nsTPriorityQueue instead of copying them. r=froydnj
Also remove redundant check in Push method on result of infallible operation,
and change its return type to void.

Differential Revision: https://phabricator.services.mozilla.com/D78249
2020-06-10 10:46:34 +00:00
Simon Giesecke 82dc9b2271 Bug 1642949 - Replace uses of RemoveElementAt by RemoveLastElement/PopLastElement where possible. r=necko-reviewers,froydnj
Differential Revision: https://phabricator.services.mozilla.com/D78027
2020-06-10 10:46:14 +00:00
Butkovits Atila e3dce68834 Backed out 3 changesets (bug 1643289, bug 1642949) for causing failure at test_headless_screenshot.html. CLOSED TREE
Backed out changeset 98c420f73380 (bug 1643289)
Backed out changeset 9447ea8910aa (bug 1643289)
Backed out changeset 0c827da9d847 (bug 1642949)
2020-06-10 10:07:23 +03:00
Simon Giesecke 6944416c7e Bug 1643289 - Move elements where possible in nsTPriorityQueue instead of copying them. r=froydnj
Also remove redundant check in Push method on result of infallible operation,
and change its return type to void.

Differential Revision: https://phabricator.services.mozilla.com/D78249
2020-06-10 05:45:45 +00:00
Simon Giesecke d419f0ff08 Bug 1642949 - Replace uses of RemoveElementAt by RemoveLastElement/PopLastElement where possible. r=necko-reviewers,froydnj
Differential Revision: https://phabricator.services.mozilla.com/D78027
2020-06-10 05:49:28 +00:00
Simon Giesecke ca2d0aaa68 Bug 1644403 - Fix inconsistent uses of CopyableAutoTArray and Clone. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D78893
2020-06-09 14:27:20 +00:00
Dan Minor f8f95a8f04 Bug 1643155 - Rename obfuscate_host_addresses pref; r=ng,mkaply
Renaming this to blocklist, as this is a list of sites for which hostname
obfuscation is disabled.

Differential Revision: https://phabricator.services.mozilla.com/D78681
2020-06-09 09:30:04 +00:00
alwu 934302cd0d Bug 1640998 - part9 : use `MediaControlKey` to replace `MediaControlKeysEvent` r=chunmin,agi,geckoview-reviewers
This patch will
- remove `MediaControlKeysEvent` and use `MediaControlKey` to replace it
- rename names for all `MediaControlKey` related methods, functions, classes and descriptions

The advantage of doing so are
- remove the duplicated type so that we only need to maintain `MediaControlKey`

Differential Revision: https://phabricator.services.mozilla.com/D78140
2020-06-09 02:59:57 +00:00
alwu 1b2d8c78ce Bug 1640998 - part8 : add test. r=chunmin
Differential Revision: https://phabricator.services.mozilla.com/D77758
2020-06-08 23:27:19 +00:00
alwu 0d200dff8a Bug 1640998 - part7 : create `MediaController` webidl. r=chunmin,smaug
This patch will
- create a chrome-only webdil interface `MediaController`
- expose supported keys via `MediaController` webidl interface

The advantage of doing so are
- to have a dedicated interface that is only used for MediaController that can be used for testing and our future plan (media hub)

More Details :
Currently, we access media controller's from `ChromeUtils` [1], but it causes a problem of creating a duplicated enum of the enum which we want to expose into Chrome JS.

Instead, we should create a media controller interface to access all its attibutes, which is more easier and clean.

In addition, we're planning to have a something like Chrome's media hub [2]. In order to do that, we have to expose some JS methods to allow us to control playback directly from Chrome JS.

[1] https://searchfox.org/mozilla-central/rev/559b25eb41c1cbffcb90a34e008b8288312fcd25/dom/chrome-webidl/ChromeUtils.webidl#485-493
[2] https://blog.google/products/chrome/manage-audio-and-video-in-chrome/

Differential Revision: https://phabricator.services.mozilla.com/D77757
2020-06-08 18:51:12 +00:00
alwu 5aa603709c Bug 1640998 - part6 : only notify the active media session's metadata change. r=chunmin
This patch will
- prevent dispatching metadata change event for non-active media session (we only care about the event from the active media session)

The advantage of doing so are
-  reduce some unnecessary code running

Differential Revision: https://phabricator.services.mozilla.com/D77756
2020-06-08 18:51:10 +00:00
alwu 15d6f8b8ae Bug 1640998 - part5 : set supported keys to the event source r=chunmin
This patch will
- add a method `SetSupportedMediaKeys()` on `MediaControlKeysEventSource`
- set main controller's supported key to the event source

The advantage of doing so are
- to allow the event source knowing which key is supported in order to determine the displayed UI button

Differential Revision: https://phabricator.services.mozilla.com/D77200
2020-06-09 02:23:35 +00:00
alwu d05ba91da0 Bug 1640998 - part4 : update supported action changes from the content process. r=chunmin
This patch will
- tell the media controll supported action changes when media session updates its action handler

The advantage of doing so are
- to sync the status between media session in content process and the `MediaSessionInfo` in chrome process

Differential Revision: https://phabricator.services.mozilla.com/D77199
2020-06-08 22:16:46 +00:00
alwu 258a1fae24 Bug 1640998 - part3 : add methods to update supported action from media sessions. r=chunmin
This patch will
- add methods to allow media controller to enable/disable action for specific media session

The advantage of doing so are
- to know the supported actions for each media session

Differential Revision: https://phabricator.services.mozilla.com/D77198
2020-06-08 18:50:53 +00:00
alwu 337718365e Bug 1640998 - part2 : use `ContentMediaAgent` to update media session's related information. r=chunmin
This patch will
- `ContentMediaAgent` as the only class to propagate the information to chrome process

The advantage of doing so are
- to group all methods involving IPC in one place, that would be easier to see what information would be propagated to chrome process

Differential Revision: https://phabricator.services.mozilla.com/D77197
2020-06-08 18:50:45 +00:00
alwu cc64086a9c Bug 1640998 - part1 : make `ContentMediaAgent` inherit from `IMediaInfoUpdater`. r=chunmin
This patch will
- make `ContentMediaAgent` inherit from `IMediaInfoUpdater`
- move `MediaPlaybackState` and `MediaAudibleState` to `MediaPlaybackStatus.h`

The advantage of doing so are
- to force all methods which are related with updating information from content process to chrome process to be manged by `IMediaInfoUpdater`. It can help us only put the descriptive comment for methods on one place. (on `IMediaInfoUpdater`)

Differential Revision: https://phabricator.services.mozilla.com/D77196
2020-06-08 22:08:26 +00:00
Bryce Seager van Dyk defad44097 Bug 1623651 - Update enums that have changed with CDM header bump. r=alwu,dminor
The CDM header bump has moved some enums, as well as using enum classes instead
of old style enums. This patch updates consumers of these enums to be compatible
with the new headers.

Drive by remove `using namespace cdm` from a couple of files as
- In some places I'd already been using fully qualified names.
- I prefer the fully qualified names as they make it clear when enums are coming
  from the cdm namespace and `cdm::` is not a particularly more verbose thing to
  have on identifiers.

Differential Revision: https://phabricator.services.mozilla.com/D78343
2020-06-08 19:02:05 +00:00
Bryce Seager van Dyk 6b306da146 Bug 1623651 - Pull new CDM headers from Chromium. r=alwu,dminor
Headers are pulled from Chromium revision
bc262e26cd2dca812f05bdad3b37398839e63007.

Differential Revision: https://phabricator.services.mozilla.com/D78341
2020-06-05 19:28:05 +00:00
Simon Giesecke ebbc7ae838 Bug 1642989 - Use RemoveLastElements instead of RemoveElementsAt where possible. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D78049
2020-06-08 08:50:15 +00:00
Simon Giesecke 13502cf27c Bug 1642991 - Use RemoveElementsBy where easily possible. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D78055
2020-06-08 09:01:48 +00:00
Dan Minor 3d136c71fc Bug 1641600 - Remove check that bytesSent >= packetsSent in pc.js; r=ng
With RTX and transport-cc enabled, it is possible to send padding packets prior
to any media being sent (see comments in RTPSender::SendPadData). But padding
bytes are counted separate from payload bytes and so do not show up in
bytesSent, which means that is possible that we've sent packets, but not bytes,
as far as the stats are concerned. This leads to frequent intermittent failures
while running tests on Android hardware.

Depends on D77815

Differential Revision: https://phabricator.services.mozilla.com/D78287
2020-06-05 12:10:59 +00:00
alwu 417a2878ea Bug 1643509 - update `ParamTraits<mozilla::dom::MediaControlKeysEvent>` to sync with `MediaControlKeysEvent` r=mccr8
The first value in `MediaControlKeysEvent` is `eFocus`, so we should also update its `ParamTraits`.

[1] https://searchfox.org/mozilla-central/rev/598e50d2c3cd81cd616654f16af811adceb08f9f/dom/media/mediacontrol/MediaControlKeysEvent.h#23

Differential Revision: https://phabricator.services.mozilla.com/D78410
2020-06-05 10:56:20 +00:00
Nico Grunbaum 79a227b703 Bug 1615191 - P1 - implement remoteTimestamp for RTCRemoteOutboundRtpStreamStats;r=dminor,smaug
r?smaug for WebIDL review

Differential Revision: https://phabricator.services.mozilla.com/D78003
2020-06-05 11:41:24 +00:00