VuoVideoCapture implementation.
Definition in file VuoVideoCapture.mm.
Go to the source code of this file.
Classes | |
struct | VuoVideoCaptureInternal |
Data for a video capture instance. More... | |
class | VuoVideoCaptureDeviceListener |
A singleton class that listens for changes in available video input devices. More... | |
class | VuoVideoCaptureDelegate |
Callback to process captured frames. More... | |
Functions | |
static void | VuoVideoCapture_enableTethering () |
Enable support for video capture from tethered iOS devices. More... | |
void | VuoVideoCapture_openDevice (VuoVideoCaptureInternal *vci) |
Tries to find and open an AVCaptureDevice matching the VuoVideoInputDevice spec. More... | |
void | VuoVideoCapture_checkPendingDevices (void *) |
Attempts to open each device that has been requested but hasn't yet been successfully opened. More... | |
void | VuoVideoCapture_init () |
Starts listening for device-change notifications. More... | |
void | VuoVideoCapture_removeOnDevicesChangedCallback (VuoOutputTrigger(devicesDidChange, VuoList_VuoVideoInputDevice)) |
Removes an output trigger from the VuoVideoCaptureDeviceListener TriggerSet. More... | |
void | VuoVideoCapture_addOnDevicesChangedCallback (VuoOutputTrigger(devicesDidChange, VuoList_VuoVideoInputDevice)) |
Adds an output trigger to the VuoVideoCaptureDeviceListener TriggerSet to be fired when available input devices changes. More... | |
NSString * | VuoVideoCapture_getVendorNameForUniqueID (NSString *uniqueID) |
Given a uniqueID string (e.g., 0x1a11000005ac8510 , from -[QTCaptureDevice uniqueID] ), searches the IORegistry to find a matching FireWire or USB device, and returns the Vendor Name string. More... | |
VuoText | VuoVideoCapture_getDeviceName (AVCaptureDevice *dev) |
Returns a display name for the specified device. More... | |
VuoList_VuoVideoInputDevice | VuoVideoCapture_getInputDevices (void) |
Returns a list of all available video capture devices. More... | |
void | VuoVideoCapture_free (void *p) |
Releases video capture objects. More... | |
static void | VuoVideoCapture_freeCallback (VuoImage imageToFree) |
Does nothing. More... | |
VuoVideoCapture | VuoVideoCapture_make (VuoVideoInputDevice inputDevice, VuoOutputTrigger(receivedFrame, VuoVideoFrame)) |
Creates a new VuoVideoCapture instance for receiving video frames from inputDevice . More... | |
void | VuoVideoCapture_setSize (VuoVideoCapture p, VuoInteger width, VuoInteger height) |
Specifies the desired image size. More... | |
void | VuoVideoCapture_startListening (VuoVideoCapture p) |
Begins receiving frames. More... | |
void | VuoVideoCapture_stopListening (VuoVideoCapture p) |
Stops receiving frames (starts ignoring/dropping them). More... | |
void | VuoVideoCapture_setCallback (VuoVideoCapture p, VuoOutputTrigger(receivedFrame, VuoVideoFrame)) |
Sets the image callback. More... | |
Variables | |
static dispatch_queue_t | VuoVideoCapture_pendingDevicesQueue |
Serializes access to VuoVideoCapture_pendingDevices . More... | |
static std::set< VuoVideoCaptureInternal * > | VuoVideoCapture_pendingDevices |
Devices that have been requested but haven't yet been successfully opened. More... | |
static VuoVideoCaptureDeviceListener * | deviceListener |
A static reference to the VuoVideoCaptureDeviceListener singleton. More... | |
void VuoVideoCapture_addOnDevicesChangedCallback | ( | VuoOutputTrigger(devicesDidChange, VuoList_VuoVideoInputDevice) | ) |
Adds an output trigger to the VuoVideoCaptureDeviceListener TriggerSet to be fired when available input devices changes.
Definition at line 222 of file VuoVideoCapture.mm.
void VuoVideoCapture_checkPendingDevices | ( | void * | ) |
Attempts to open each device that has been requested but hasn't yet been successfully opened.
This function may only be called on dispatch queue VuoVideoCapture_pendingDevicesQueue
.
Definition at line 113 of file VuoVideoCapture.mm.
|
static |
Enable support for video capture from tethered iOS devices.
Definition at line 51 of file VuoVideoCapture.mm.
void VuoVideoCapture_free | ( | void * | p | ) |
Releases video capture objects.
Blocks until all captured frames have been fired.
Definition at line 737 of file VuoVideoCapture.mm.
|
static |
Does nothing.
Definition at line 380 of file VuoVideoCapture.mm.
VuoText VuoVideoCapture_getDeviceName | ( | AVCaptureDevice * | dev | ) |
Returns a display name for the specified device.
Definition at line 309 of file VuoVideoCapture.mm.
VuoList_VuoVideoInputDevice VuoVideoCapture_getInputDevices | ( | void | ) |
Returns a list of all available video capture devices.
Returns the available input devices at this moment.
Definition at line 351 of file VuoVideoCapture.mm.
NSString* VuoVideoCapture_getVendorNameForUniqueID | ( | NSString * | uniqueID | ) |
Given a uniqueID
string (e.g., 0x1a11000005ac8510
, from -[QTCaptureDevice uniqueID]
), searches the IORegistry to find a matching FireWire or USB device, and returns the Vendor Name string.
The returned string has a retain count +1, so the caller should release it.
Definition at line 235 of file VuoVideoCapture.mm.
void VuoVideoCapture_init | ( | ) |
Starts listening for device-change notifications.
Definition at line 199 of file VuoVideoCapture.mm.
VuoVideoCapture VuoVideoCapture_make | ( | VuoVideoInputDevice | inputDevice, |
VuoOutputTrigger(receivedFrame, VuoVideoFrame) | |||
) |
Creates a new VuoVideoCapture instance for receiving video frames from inputDevice
.
Creates a new VuoVideoCapture device.
Definition at line 524 of file VuoVideoCapture.mm.
void VuoVideoCapture_openDevice | ( | VuoVideoCaptureInternal * | vci | ) |
Tries to find and open an AVCaptureDevice matching the VuoVideoInputDevice spec.
Definition at line 469 of file VuoVideoCapture.mm.
void VuoVideoCapture_removeOnDevicesChangedCallback | ( | VuoOutputTrigger(devicesDidChange, VuoList_VuoVideoInputDevice) | ) |
Removes an output trigger from the VuoVideoCaptureDeviceListener TriggerSet.
Definition at line 213 of file VuoVideoCapture.mm.
void VuoVideoCapture_setCallback | ( | VuoVideoCapture | p, |
VuoOutputTrigger(receivedFrame, VuoVideoFrame) | |||
) |
Sets the image callback.
Definition at line 725 of file VuoVideoCapture.mm.
void VuoVideoCapture_setSize | ( | VuoVideoCapture | p, |
VuoInteger | width, | ||
VuoInteger | height | ||
) |
Specifies the desired image size.
Definition at line 599 of file VuoVideoCapture.mm.
void VuoVideoCapture_startListening | ( | VuoVideoCapture | p | ) |
Begins receiving frames.
Begins listening for video frames on the selected input device.
Definition at line 691 of file VuoVideoCapture.mm.
void VuoVideoCapture_stopListening | ( | VuoVideoCapture | p | ) |
Stops receiving frames (starts ignoring/dropping them).
Definition at line 708 of file VuoVideoCapture.mm.
|
static |
A static reference to the VuoVideoCaptureDeviceListener singleton.
Definition at line 194 of file VuoVideoCapture.mm.
|
static |
Devices that have been requested but haven't yet been successfully opened.
Definition at line 104 of file VuoVideoCapture.mm.
|
static |
Serializes access to VuoVideoCapture_pendingDevices
.
Definition at line 103 of file VuoVideoCapture.mm.