Name Description Size
android_video_capture 5
CamerasChild.cpp 19131
CamerasChild.h 10545
CamerasParent.cpp 44639
CamerasParent.h 6432
CamerasTypes.h 963
MediaChild.cpp 3205
MediaChild.h 1626
MediaParent.cpp 16115
MediaParent.h Dummy class to avoid a templated class being passed to the refcounting macro (see Bug 1334421 for what happens then) 2775
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 10652
MediaSystemResourceManager.h Manage media system resource allocation requests within a process. 2163
MediaSystemResourceManagerChild.cpp 1193
MediaSystemResourceManagerChild.h Handle MediaSystemResourceManager's IPC 1780
MediaSystemResourceManagerParent.cpp fail 2296
MediaSystemResourceManagerParent.h Handle MediaSystemResourceManager's IPC 1845
MediaSystemResourceMessageUtils.h 817
MediaSystemResourceService.cpp static 6423
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, but ignore the return value from the lambda. Prefer NS_NewRunnableFunction(), which provides a specific name, unless the lambda really must have a non-void return value that is to be ignored. 1512
MediaUtils.cpp 3742
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. 10234
moz.build 3243
objc_video_capture 8
OpenSLESProvider.cpp static 5535
OpenSLESProvider.h Realize is always in synchronous mode. 2029
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. 1442
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
PCameras.ipdl 2782
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. 1937
PMediaSystemResourceManager.ipdl The PMediaSystemResourceManager is a sub-protocol in PImageBridge 1047
ShmemPool.cpp 2599
ShmemPool.h 5730
video_engine 9
VideoEngine.cpp 8010
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 3318
VideoFrameUtils.cpp 3467
VideoFrameUtils.h namespace mozilla 1677