This removes all references to application capture except from MediaSourceEnum.
That was left in place so as to not change the enumerated values used
for WEBRTC_GET_USER_MEDIA_TYPE telemetry.
Differential Revision: https://phabricator.services.mozilla.com/D28089
--HG--
extra : moz-landing-system : lando
When unplugging a camera in use in a video-only gUM capture, we see a crash in
GetUserMediaWindowListener::Remove when trying to use `aListener` after its last
reference was removed from an nsRefPtrHashTable at the beginning of the method.
As `aListener` was a rawptr, neither this method itself, nor its caller, kept it
alive.
Making this method take a RefPtr instead of a rawptr solves this issue.
This patch also converts other similar rawptrs for good measure.
Differential Revision: https://phabricator.services.mozilla.com/D27520
--HG--
extra : moz-landing-system : lando
These once served a caching-and-reuse purpose it seems, but it makes less sense
when sources are not shared.
There seems to still be functioning code to re-use fake audio devices, but this
seems like premature optimization. Especially since we don't care much about
fake devices in release.
This patch removes it all, together with some plumbing around the mechanism.
Differential Revision: https://phabricator.services.mozilla.com/D24902
--HG--
extra : moz-landing-system : lando
The handle was used to keep separate allocations of the same source in a single
process apart. Sources no longer use sharing, so we no longer need allocations
or their handles even as a concept.
Differential Revision: https://phabricator.services.mozilla.com/D24901
--HG--
extra : moz-landing-system : lando
This moves the responsibility of forwarding NotifyPull() from the graph thread
to MediaEngineSources out of MediaManager and into the sources themselves. This
is better aligned with how the sources work, since not all sources need pulling.
This also clarifies lifetime management of these listeners in relation to when
pulling is enabled for a track, since the sources are already handling enabling
pulling themselves.
Differential Revision: https://phabricator.services.mozilla.com/D24896
--HG--
extra : moz-landing-system : lando
nsIDOMGetUserMediaErrorCallback, nsIDOMGetUserMediaSuccessCallback,
and nsIGetUserMediaDevicesSuccessCallback were completely unused, so
they could just go away and all the code got simpler.
Differential Revision: https://phabricator.services.mozilla.com/D23782
--HG--
extra : moz-landing-system : lando
This will mean that in places like the tight loop in GetTypeIndex()
we would no longer require calling strlen() on the input type argument
once per loop iteration.
Depends on D20236
Differential Revision: https://phabricator.services.mozilla.com/D20237
--HG--
extra : moz-landing-system : lando
The problem here is that the MediaStreamGraphImpl::mInputDeviceID is not reset after a device unplug. On a device-remove event of the active device MediaStreamGraphImpl::mInputDeviceID is reset when MediaStreamGraphImpl::CloseAudioInput is being executed. This method will not be executed if the new enumeration, on the MediaManager::OnDeviceChange, is returning the old outdated list of devices. This patch increases the wait time before the new enumeration in order to allow the system to update the provided device list.
Differential Revision: https://phabricator.services.mozilla.com/D17843
--HG--
extra : moz-landing-system : lando
Otherwise we risk building up a buffer in the microphone source from when
Start() is run until pulling is enabled. This manifests itself as input latency
to the user.
Differential Revision: https://phabricator.services.mozilla.com/D15194
--HG--
extra : moz-landing-system : lando
All subclasses are now returning NS_OK, so there's no point in keeping nsresult
as the return type.
Differential Revision: https://phabricator.services.mozilla.com/D15193
--HG--
extra : moz-landing-system : lando
Summary: Really sorry for the size of the patch. It's mostly automatic
s/nsIDocument/Document/ but I had to fix up in a bunch of places manually to
add the right namespacing and such.
Overall it's not a very interesting patch I think.
nsDocument.cpp turns into Document.cpp, nsIDocument.h into Document.h and
nsIDocumentInlines.h into DocumentInlines.h.
I also changed a bunch of nsCOMPtr usage to RefPtr, but not all of it.
While fixing up some of the bits I also removed some unneeded OwnerDoc() null
checks and such, but I didn't do anything riskier than that.
There's no guarantee a backend exists when a MediaManager does, and
crash-stats shows that shutdown can occur between posting a task and running
it, making it illegal to create a backend anew.
We're safer off avoiding creating a new backend. The cleanup step we're trying
to do is only effective if a backend already exists anyway.
Differential Revision: https://phabricator.services.mozilla.com/D15631
--HG--
extra : moz-landing-system : lando