Name Description Size
android_video_capture
CamerasChild.cpp 19358
CamerasChild.h 10635
CamerasParent.cpp 50087
CamerasParent.h IsExclusive = 7035
CamerasTypes.cpp 839
CamerasTypes.h 2013
MediaChild.cpp 3177
MediaChild.h 1626
MediaParent.cpp 16123
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 4613
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. 10526
moz.build 3436
objc_video_capture
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 2800
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 5594
video_engine
VideoEngine.cpp 6622
VideoEngine.h Returns a non-negative capture identifier or -1 on failure. 4098
VideoFrameUtils.cpp 3467
VideoFrameUtils.h namespace mozilla 1677