Name Description Size
CamerasChild.cpp 20255
CamerasChild.h 10446
CamerasParent.cpp 40367
CamerasParent.h 6327
CamerasTypes.h 964
MediaChild.cpp 3231
MediaChild.h 1626
MediaParent.cpp 16137
MediaParent.h Dummy class to avoid a templated class being passed to the refcounting macro (see Bug 1334421 for what happens then) 2801
MediaSystemResourceClient.cpp 1685
MediaSystemResourceClient.h This is a base class for listener callbacks. This callback is invoked when the media system resource reservation state is changed. 2800
MediaSystemResourceManager.cpp static 10552
MediaSystemResourceManager.h Manage media system resource allocation requests within a process. 2157
MediaSystemResourceManagerChild.cpp 1219
MediaSystemResourceManagerChild.h Handle MediaSystemResourceManager's IPC 1780
MediaSystemResourceManagerParent.cpp fail 2338
MediaSystemResourceManagerParent.h Handle MediaSystemResourceManager's IPC 1871
MediaSystemResourceMessageUtils.h 818
MediaSystemResourceService.cpp static 6478
MediaSystemResourceService.h Manage media system resource allocation requests within system. 2614
MediaSystemResourceTypes.h 710
MediaTaskUtils.h media::NewTaskFrom() - Create a Task from a lambda. Similar to media::NewRunnableFrom() - Create an nsRunnable from a lambda. 1308
MediaUtils.cpp 1062
MediaUtils.h media::NewRunnableFrom() - Create a Runnable from a lambda. Passing variables (closures) to an async function is clunky with Runnable: void Foo() { class FooRunnable : public Runnable { public: FooRunnable(const Bar &aBar) : mBar(aBar) {} NS_IMETHOD Run() override { // Use mBar } private: RefPtr<Bar> mBar; }; RefPtr<Bar> bar = new Bar(); NS_DispatchToMainThread(new FooRunnable(bar); } It's worse with more variables. Lambdas have a leg up with variable capture: void Foo() { RefPtr<Bar> bar = new Bar(); NS_DispatchToMainThread(media::NewRunnableFrom([bar]() mutable { // use bar })); } Capture is by-copy by default, so the nsRefPtr 'bar' is safely copied for access on the other thread (threadsafe refcounting in bar is assumed). The 'mutable' keyword is only needed for non-const access to bar. 11955
OSXRunLoopSingleton.cpp This is needed so that AudioUnit listeners get called on this thread, and not the main thread. If we don't do that, they are not called, or a crash occur, depending on the OSX version. 1426
OSXRunLoopSingleton.h This function tells CoreAudio to use its own thread for device change notifications, and can be called from any thread without external synchronization. 729
OpenSLESProvider.cpp static 5535
OpenSLESProvider.h Realize is always in synchronous mode. 2013
PCameras.ipdl 2741
PMedia.ipdl Requests a potentially persistent unique secret key for each principal. Has no expiry, but is cleared by age along with cookies. This is needed by mediaDevices.enumerateDevices() to produce persistent deviceIds that wont work cross-origin. If this OriginAttributes dictionary has the privateBrowsing flag set to false, a key for this origin is returned from a primary pool of temporal in-memory keys and persistent keys read from disk. If no key exists, a temporal one is created. If aPersist is true and key is temporal, the key is promoted to persistent. Once persistent, a key cannot become temporal again. If the OriginAttributes dictionary has the privateBrowsing flag set to true, a different key for this origin is returned from a secondary pool that is never persisted to disk, and aPersist is ignored. 1843
PMediaSystemResourceManager.ipdl The PMediaSystemResourceManager is a sub-protocol in PImageBridge 1031
ShmemPool.cpp 2599
ShmemPool.h 5692
VideoEngine.cpp 8029
VideoEngine.h Returns an existing or creates a new new DeviceInfo. Camera info is cached to prevent repeated lengthy polling for "realness" of the hardware devices. Other types of capture, e.g. screen share info, are cached for 1 second. This could be handled in a more elegant way in the future. @return on failure the shared_ptr will be null, otherwise it will contain a DeviceInfo. @see bug 1305212 https://bugzilla.mozilla.org/show_bug.cgi?id=1305212 3299
VideoFrameUtils.cpp 3474
VideoFrameUtils.h namespace mozilla 1677
android_video_capture 5
moz.build 3379
objc_video_capture 8
video_engine 7