Gabriele Svelto
91ba6f771f
Bug 1758468
- Factor out the function to generate stable, anonymous IDs r=padenot
...
Differential Revision: https://phabricator.services.mozilla.com/D142549
2022-04-12 12:31:27 +00:00
Cosmin Sabou
c27d26edc4
Backed out 2 changesets (bug 1758468
) for causing web midi related mochitest failures. CLOSED TREE
...
Backed out changeset cfba299e5067 (bug 1758468
)
Backed out changeset c0eb987d0f76 (bug 1758468
)
2022-04-11 21:30:27 +03:00
Gabriele Svelto
cfcb4cf83c
Bug 1758468
- Factor out the function to generate stable, anonymous IDs r=padenot
...
Differential Revision: https://phabricator.services.mozilla.com/D142549
2022-04-11 17:43:08 +00:00
Karl Tomlinson
6711292cb5
Bug 1753316 remove unnecessary sSingletonMutex r=jib
...
This was added due to a mistaken reading of the thread on which sSingleton was
cleared.
https://phabricator.services.mozilla.com/D48512#1545100
Differential Revision: https://phabricator.services.mozilla.com/D140035
2022-03-18 00:57:06 +00:00
Karl Tomlinson
1c4ac2ab20
Bug 1753316 allow GetBackend() to continue as normal after main thread shutdown r=jib
...
GetBackend() is used only on the media thread, on which mBackend is shut down
after main thread MediaManager shutdown.
Creating a backend on the media thread shortly after sHasMainThreadShutdown is
set on the main thread is not necessarily any different from creating shortly
before sHasMainThreadShutdown is set. The simplest way to handle these is to
take the same code path in each case.
MediaEventListener::operator=() will assert if another backend is created
after a previous backend is shutdown.
https://searchfox.org/mozilla-central/rev/8e1eb5cbd89a2455c34032d921f8de28261d016b/dom/media/MediaEventSource.h#336
https://searchfox.org/mozilla-central/rev/2a0b0ababd4541ecffb74cbe0820a9d0a25da636/dom/media/MediaManager.cpp#3112
Depends on D140031
Differential Revision: https://phabricator.services.mozilla.com/D140032
2022-03-17 20:56:07 +00:00
Randell Jesup
fcaf70841e
Bug 1207753 - Add MOZ_UNANNOTATED to all Mutexes/Monitors r=nika,kershaw
...
Differential Revision: https://phabricator.services.mozilla.com/D140849
2022-03-16 18:47:08 +00:00
Noemi Erli
2390d257e6
Backed out changeset 12a59e5a50bf (bug 1207753) for causing build bustage CLOSED TREE
2022-03-16 18:32:51 +02:00
Randell Jesup
4b033a5256
Bug 1207753 - Add MOZ_UNANNOTATED to all Mutexes/Monitors r=nika,kershaw
...
Differential Revision: https://phabricator.services.mozilla.com/D140849
2022-03-16 16:16:14 +00:00
Butkovits Atila
927ad62c6a
Backed out changeset a68ee4b09f92 (bug 1207753) for causing Hazard bustages. CLOSED TREE
2022-03-16 14:38:14 +02:00
Randell Jesup
7d4b5fae04
Bug 1207753 - Add MOZ_UNANNOTATED to all Mutexes/Monitors r=nika,kershaw
...
Differential Revision: https://phabricator.services.mozilla.com/D140849
2022-03-16 12:01:14 +00:00
Karl Tomlinson
ae8f8e7132
Bug 1753131 - Dispatch devicechange events even without an actively capturing MediaStreamTrack r=jib
...
"fully active and has focus" is now a sufficient condition for dispatching "devicechange" events if the change in devices should be visible from enumerateDevices().
https://github.com/w3c/mediacapture-main/pull/574/files#diff-1217ca1c44ff30a33dd50c49d03b5cadc9633c789df8ff9370ed4a42859e1211R3146
Permissions checks are replaced with [[canExposeCameraInfo]] and [[canExposeMicrophoneInfo]] slots set by getUserMedia().
https://github.com/w3c/mediacapture-main/pull/641
https://github.com/w3c/mediacapture-main/pull/773
The "media.navigator.permission.disabled" pref is no longer involved in "devicechange" dispatch decisions.
Differential Revision: https://phabricator.services.mozilla.com/D132908
2022-02-02 19:46:19 +00:00
Karl Tomlinson
e0c198f175
Bug 1753131 provide a method to return a cached list of physical devices r=jib
...
The same list of physical devices can, in a subsequent patch, be returned to
multiple Windows, so that their MediaDevices objects can efficiently keep (and
share) a record of the set of devices when the last "devicechange" event was
queued.
Differential Revision: https://phabricator.services.mozilla.com/D132903
2022-02-02 09:18:18 +00:00
Karl Tomlinson
43d441f9ab
Bug 1732409 move GetPrincipalKey() call to AnonymizeDevices() r=jib
...
reducing the complexity in EnumerateDevicesImpl() and facilitating a future
call to perform a similar operation in an enumerateDevices() refactor for
device-change event analysis.
Differential Revision: https://phabricator.services.mozilla.com/D132899
2021-12-26 22:24:13 +00:00
Karl Tomlinson
829f90aa36
Bug 1732409 consolidate camera and microphone preference handling into EnumerateRawDevices r=jib
...
This is performed for
"media.navigator.streams.fake"
"media.video_loopback_dev"
"media.audio_loopback_dev"
Depends on D132897
Differential Revision: https://phabricator.services.mozilla.com/D132898
2021-12-26 01:38:59 +00:00
Butkovits Atila
748f564f7a
Backed out 6 changesets (bug 1732409) for causing failures at test_bug386782.html. CLOSED TREE
...
Backed out changeset 39bcb53f30ba (bug 1732409)
Backed out changeset 0a6943f27392 (bug 1732409)
Backed out changeset a82289f4ec60 (bug 1732409)
Backed out changeset 748715ddf3c0 (bug 1732409)
Backed out changeset 3f3fe6a97855 (bug 1732409)
Backed out changeset 21564d1c7057 (bug 1732409)
2021-12-21 18:09:11 +02:00
Karl Tomlinson
26b695c671
Bug 1732409 consolidate camera and microphone preference handling into EnumerateRawDevices r=jib
...
This is performed for
"media.navigator.streams.fake"
"media.video_loopback_dev"
"media.audio_loopback_dev"
Depends on D132897
Differential Revision: https://phabricator.services.mozilla.com/D132898
2021-12-21 08:58:47 +00:00
Karl Tomlinson
468a65168d
Bug 1744364 limit coalescing of device list change handling to 1 second r=jib
...
Depends on D132891
Differential Revision: https://phabricator.services.mozilla.com/D132892
2021-12-21 06:52:05 +00:00
Karl Tomlinson
f7b8b829fc
Bug 1744364 move contents of delayed device change handling lambda to a method r=jib
...
This will simplify invocation from more than one call site.
Depends on D132890
Differential Revision: https://phabricator.services.mozilla.com/D132891
2021-12-21 06:52:05 +00:00
Karl Tomlinson
69f72a8656
Bug 1744364 remove unnecessary MediaManager::mDeviceIDs r=jib
...
GetUserMediaWindowListener() does not have active listeners for speakers.
Depends on D132889
Differential Revision: https://phabricator.services.mozilla.com/D132890
2021-12-21 06:52:04 +00:00
Karl Tomlinson
4285787652
Bug 1744358 create MediaEngineSources on demand at getUserMedia() instead of enumerateDevices() r=jib
...
Differential Revision: https://phabricator.services.mozilla.com/D132888
2021-12-21 04:05:29 +00:00
Karl Tomlinson
206367bcaa
Bug 1744358 move constructor parameter scary from MediaEngineSource to MediaDevice r=jib
...
MediaDevice is where this is used, and this change will be necessary to
construct sources after devices.
Depends on D132884
Differential Revision: https://phabricator.services.mozilla.com/D132885
2021-12-21 04:05:27 +00:00
Karl Tomlinson
38002b7658
Bug 1744350 use different types to distinguish MediaDevice objects that have Window-specific anonymized fields set r=jib
...
This will also simplify referencing a MediaDevice from a MediaEngineSource
without creating a reference cycle when mSource later moves from MediaDevice
to LocalMediaDevice.
Differential Revision: https://phabricator.services.mozilla.com/D132884
2021-12-21 02:43:29 +00:00
Karl Tomlinson
eda27bb86c
Bug 1744350 consistently provide device sets by return value instead of side-effects r=jib
...
for clearer indication of data flow.
https://google.github.io/styleguide/cppguide.html#Inputs_and_Outputs
SelectSettings() is modified to reject instead of resolve its promise on
failure to provide more intuitive execution paths.
These changes also allow the removal of a lambda function that existed solely
to convert between the calling conventions, and better align with a subsequent
change to use different types to distinguish raw and window-specific media
device info objects.
Differential Revision: https://phabricator.services.mozilla.com/D132883
2021-12-21 02:43:29 +00:00
Karl Tomlinson
94977fc618
Bug 1744346 consistently store raw MediaDevice ids and name in raw fields r=jib
...
to clarify which data is used by getters.
Differential Revision: https://phabricator.services.mozilla.com/D132882
2021-12-21 00:28:07 +00:00
Karl Tomlinson
cbb8cb44e2
Bug 1744346 simplify MediaDevice group id changes r=jib
...
Depends on D132879
Differential Revision: https://phabricator.services.mozilla.com/D132880
2021-12-17 05:54:28 +00:00
Karl Tomlinson
388a704752
Bug 1744346 remove unused raw MediaDevice constructor parameter aRawID r=jib
...
This may have been unused since a different constructor was added for AnonymizeDevices() in
https://hg.mozilla.org/mozilla-central/rev/d4d476a32ea823ee98a40bedbcdd509dee5dc84c#l3.256
Depends on D132878
Differential Revision: https://phabricator.services.mozilla.com/D132879
2021-12-17 05:54:28 +00:00
Karl Tomlinson
79aa7ea4c8
Bug 1744346 remove unused nsIMediaDevice properties r=jib
...
Depends on D132877
Differential Revision: https://phabricator.services.mozilla.com/D132878
2021-12-17 05:54:28 +00:00
Karl Tomlinson
5b0374554e
Bug 1744346 consolidate boolean device enumeration parameters into a flags parameter r=jib
...
The key motivator here was the misleading aForceNoPermRequest parameter.
This came from an unreviewed change in response to a review request.
https://phabricator.services.mozilla.com/D14575?vs=44463&id=47352#inline-82282
The newer variable name described the opposite of its use, but its usage was
not negated.
The logical change to the AllowPermissionRequest flag no longer passed from
MediaDevices::GetSinkDevice() has little effect because any permission
required would be obtained from getUserMedia() or selectAudioOutput() prior to
setSinkId(). A permission request is not expected during setSinkId().
The EnumerateAudioOutputs flag removes some use of the confusing
MediaSinkEnum::Other and makes the long list of parameters slightly easier to
read.
Differential Revision: https://phabricator.services.mozilla.com/D132875
2021-12-17 05:54:27 +00:00
Karl Tomlinson
0a5870dc7b
Bug 1732410 use object instead of subject principal for chrome enumerateDevices() resistFingerprinting override r=jib,emilio
...
This will simplify data structures for pending enumerateDevices() operations.
The subject principal was added for
https://bugzilla.mozilla.org/show_bug.cgi?id=1372073#c28
I don't see any current chrome callers, but chrome should be able to call this
method on a chrome document for real values. Chrome should have no need
to call this on a content document.
Differential Revision: https://phabricator.services.mozilla.com/D127049
2021-10-11 05:18:59 +00:00
Karl Tomlinson
b53e11a558
Bug 1734267 remove unused aWindowId parameter from MediaEngine::EnumerateDevices() r=pehrsons
...
Added in https://hg.mozilla.org/mozilla-central/rev/f0219139820a .
Unused since https://hg.mozilla.org/mozilla-central/rev/1248d2f659a9 .
Differential Revision: https://phabricator.services.mozilla.com/D127603
2021-10-08 09:26:53 +00:00
Karl Tomlinson
832509f1a5
Bug 1493982 move GetSinkDevice() to MediaDevices for access to device exposure history r=jib
...
Depends on D118443
Differential Revision: https://phabricator.services.mozilla.com/D118444
2021-07-06 23:37:32 +00:00
Karl Tomlinson
dc10b56462
Bug 1493982 remove declaration of missing EnumerateDevices() method r=jib
...
Depends on D117985
Differential Revision: https://phabricator.services.mozilla.com/D118436
2021-06-25 08:26:13 +00:00
Karl Tomlinson
6578d4262f
Bug 1716494 assert that GetSinkDevice() is called only in secure context r=jib
...
Differential Revision: https://phabricator.services.mozilla.com/D117985
2021-06-25 04:32:55 +00:00
Karl Tomlinson
fd16b4ad67
Bug 1709474 send selectAudioOutput requests to app r=jib
...
Differential Revision: https://phabricator.services.mozilla.com/D108385
2021-05-06 08:02:39 +00:00
Karl Tomlinson
bd3b9693bd
Bug 1709474 add a helper method for bypassing permission prompt r=jib
...
Differential Revision: https://phabricator.services.mozilla.com/D108384
2021-05-06 08:02:38 +00:00
Karl Tomlinson
9f60769705
Bug 1709474 move mozGetUserMediaDevices from Navigator to GetUserMediaRequest r=jib,webidl,geckoview-reviewers,smaug,agi
...
Differential Revision: https://phabricator.services.mozilla.com/D111565
2021-05-06 05:16:49 +00:00
Csoregi Natalia
8cad1a2512
Backed out 2 changesets (bug 1709484, bug 1709474) for geckoview fails on testDeviceRecordingEventAudioAndVideo. CLOSED TREE
...
Backed out changeset 069415280f6d (bug 1709474)
Backed out changeset 3853186911c9 (bug 1709484)
2021-05-06 03:38:52 +03:00
Karl Tomlinson
10fe97e403
Bug 1709474 move mozGetUserMediaDevices from Navigator to GetUserMediaRequest r=jib,webidl,geckoview-reviewers,smaug,agi
...
Differential Revision: https://phabricator.services.mozilla.com/D111565
2021-05-05 23:04:13 +00:00
Karl Tomlinson
75943ec6c2
Bug 1709474 - rename nsIDOMNavigatorUserMedia.idl to nsIMediaDevice.idl r=jib
...
This is more appropriate since
https://hg.mozilla.org/mozilla-central/rev/db29f053e54ef83da3e313de6e85f3b850faa543#l5.12
and helps generated webidl bindings find the right header.
Differential Revision: https://phabricator.services.mozilla.com/D111564
2021-05-04 22:03:01 +00:00
Karl Tomlinson
c91d7ab856
Bug 1698238 replace bool aIsChrome parameters with CallerType r=pehrsons
...
Differential Revision: https://phabricator.services.mozilla.com/D111568
2021-04-15 06:40:03 +00:00
Karl Tomlinson
088d1e6ddd
Bug 1698238 rename DevicesPromise to DeviceSetPromise r=pehrsons
...
for better distinction from DevicePromise.
Differential Revision: https://phabricator.services.mozilla.com/D111567
2021-04-13 01:32:56 +00:00
Karl Tomlinson
70ab80c671
Bug 1698238 Add SelectAudioOutputTask r=jib,pehrsons
...
Differential Revision: https://phabricator.services.mozilla.com/D108382
2021-04-13 01:32:54 +00:00
Andreas Pehrson
57605900f2
Bug 1395819 - Make SourceListeners per-device and rename them DeviceListener to reflect this. r=jib
...
This patch makes MediaManager notify of recording-device-events as soon as any
gUM-track has ended, as opposed to when all tracks in a gUM-request have ended.
This effectively makes temporary permissions per-track rather than per-request.
Differential Revision: https://phabricator.services.mozilla.com/D109943
2021-04-07 12:39:54 +00:00
Alexandru Michis
6cc119870c
Backed out 3 changesets (bug 1395819) for causing cpp failures in MediaManager.cpp
...
CLOSED TREE
Backed out changeset 813c7ce3607b (bug 1395819)
Backed out changeset 46083fddeb0d (bug 1395819)
Backed out changeset 990441f04a86 (bug 1395819)
2021-04-06 19:13:45 +03:00
Andreas Pehrson
5af8f11c55
Bug 1395819 - Make SourceListeners per-device and rename them DeviceListener to reflect this. r=jib
...
This patch makes MediaManager notify of recording-device-events as soon as any
gUM-track has ended, as opposed to when all tracks in a gUM-request have ended.
This effectively makes temporary permissions per-track rather than per-request.
Differential Revision: https://phabricator.services.mozilla.com/D109943
2021-04-06 14:54:01 +00:00
Karl Tomlinson
4edc99c000
Bug 1698238 convert some `typedef`s to `using` for modernize-use-using r=jib,pehrsons
...
https://clang.llvm.org/extra/clang-tidy/checks/modernize-use-using.html
Differential Revision: https://phabricator.services.mozilla.com/D108396
2021-03-30 07:52:13 +00:00
Karl Tomlinson
42f47f0844
Bug 1698238 remove unused mozGetUserMediaDevices() constraints parameter r=pehrsons,webidl,smaug
...
Differential Revision: https://phabricator.services.mozilla.com/D108372
2021-03-30 07:52:12 +00:00
Alexandru Michis
1b37371a3f
Backed out 7 changesets (bug 1698238) for causing mda failures in mozGetUserMediaDevices.
...
CLOSED TREE
Backed out changeset ced3a595578f (bug 1698238)
Backed out changeset 9fbbeadcb724 (bug 1698238)
Backed out changeset 90315eae4c9d (bug 1698238)
Backed out changeset ef9119db5670 (bug 1698238)
Backed out changeset 936e27e7b234 (bug 1698238)
Backed out changeset 6f32420b1ca5 (bug 1698238)
Backed out changeset 39d307ba24d4 (bug 1698238)
2021-03-30 07:20:46 +03:00
Karl Tomlinson
990239fa5b
Bug 1698238 convert some `typedef`s to `using` for modernize-use-using r=jib,pehrsons
...
https://clang.llvm.org/extra/clang-tidy/checks/modernize-use-using.html
Differential Revision: https://phabricator.services.mozilla.com/D108396
2021-03-29 23:42:51 +00:00
Karl Tomlinson
52c860d12c
Bug 1698238 remove unused mozGetUserMediaDevices() constraints parameter r=pehrsons,webidl,smaug
...
Depends on D108371
Differential Revision: https://phabricator.services.mozilla.com/D108372
2021-03-29 23:42:49 +00:00