Vuo  2.3.2
Classes | Functions | Variables
VuoVideoCapture.mm File Reference

Description

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 VuoVideoCaptureDeviceListenerdeviceListener
 A static reference to the VuoVideoCaptureDeviceListener singleton. More...
 

Function Documentation

◆ VuoVideoCapture_addOnDevicesChangedCallback()

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 221 of file VuoVideoCapture.mm.

◆ VuoVideoCapture_checkPendingDevices()

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 112 of file VuoVideoCapture.mm.

◆ VuoVideoCapture_enableTethering()

static void VuoVideoCapture_enableTethering ( )
static

Enable support for video capture from tethered iOS devices.

Definition at line 49 of file VuoVideoCapture.mm.

◆ VuoVideoCapture_free()

void VuoVideoCapture_free ( void *  p)

Releases video capture objects.

Blocks until all captured frames have been fired.

Definition at line 752 of file VuoVideoCapture.mm.

◆ VuoVideoCapture_freeCallback()

static void VuoVideoCapture_freeCallback ( VuoImage  imageToFree)
static

Does nothing.

Definition at line 383 of file VuoVideoCapture.mm.

◆ VuoVideoCapture_getDeviceName()

VuoText VuoVideoCapture_getDeviceName ( AVCaptureDevice *  dev)

Returns a display name for the specified device.

Definition at line 308 of file VuoVideoCapture.mm.

◆ VuoVideoCapture_getInputDevices()

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 350 of file VuoVideoCapture.mm.

◆ VuoVideoCapture_getVendorNameForUniqueID()

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 234 of file VuoVideoCapture.mm.

◆ VuoVideoCapture_init()

void VuoVideoCapture_init ( )

Starts listening for device-change notifications.

Definition at line 198 of file VuoVideoCapture.mm.

◆ VuoVideoCapture_make()

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 533 of file VuoVideoCapture.mm.

◆ VuoVideoCapture_openDevice()

void VuoVideoCapture_openDevice ( VuoVideoCaptureInternal vci)

Tries to find and open an AVCaptureDevice matching the VuoVideoInputDevice spec.

Definition at line 475 of file VuoVideoCapture.mm.

◆ VuoVideoCapture_removeOnDevicesChangedCallback()

void VuoVideoCapture_removeOnDevicesChangedCallback ( VuoOutputTrigger(devicesDidChange, VuoList_VuoVideoInputDevice )

Removes an output trigger from the VuoVideoCaptureDeviceListener TriggerSet.

Definition at line 212 of file VuoVideoCapture.mm.

◆ VuoVideoCapture_setCallback()

void VuoVideoCapture_setCallback ( VuoVideoCapture  p,
VuoOutputTrigger(receivedFrame, VuoVideoFrame  
)

Sets the image callback.

Definition at line 740 of file VuoVideoCapture.mm.

◆ VuoVideoCapture_setSize()

void VuoVideoCapture_setSize ( VuoVideoCapture  p,
VuoInteger  width,
VuoInteger  height 
)

Specifies the desired image size.

Definition at line 614 of file VuoVideoCapture.mm.

◆ VuoVideoCapture_startListening()

void VuoVideoCapture_startListening ( VuoVideoCapture  p)

Begins receiving frames.

Begins listening for video frames on the selected input device.

Definition at line 706 of file VuoVideoCapture.mm.

◆ VuoVideoCapture_stopListening()

void VuoVideoCapture_stopListening ( VuoVideoCapture  p)

Stops receiving frames (starts ignoring/dropping them).

Definition at line 723 of file VuoVideoCapture.mm.

Variable Documentation

◆ deviceListener

VuoVideoCaptureDeviceListener* deviceListener
static

A static reference to the VuoVideoCaptureDeviceListener singleton.

Definition at line 193 of file VuoVideoCapture.mm.

◆ VuoVideoCapture_pendingDevices

std::set<VuoVideoCaptureInternal *> VuoVideoCapture_pendingDevices
static

Devices that have been requested but haven't yet been successfully opened.

Definition at line 103 of file VuoVideoCapture.mm.

◆ VuoVideoCapture_pendingDevicesQueue

dispatch_queue_t VuoVideoCapture_pendingDevicesQueue
static

Serializes access to VuoVideoCapture_pendingDevices.

Definition at line 102 of file VuoVideoCapture.mm.