Controls any video capture devices that might be available. More...
|Receives callbacks with images from a CameraDevice. More...|
|const String &||getName () const noexcept|
|Returns the name of this device. More...|
|Component *||createViewerComponent ()|
|Creates a component that can be used to display a preview of the video from this camera. More...|
|void||startRecordingToFile (const File &file, int quality=2)|
|Starts recording video to the specified file. More...|
|Stops recording, after a call to startRecordingToFile(). More...|
|Time||getTimeOfFirstRecordedFrame () const|
|After calling stopRecording(), this method can be called to return the timestamp of the first frame that was written to the file. More...|
|void||addListener (Listener *listenerToAdd)|
|Adds a listener to receive images from the camera. More...|
|void||removeListener (Listener *listenerToRemove)|
|Removes a listener that was previously added with addListener(). More...|
|static StringArray||getAvailableDevices ()|
|Returns a list of the available cameras on this machine. More...|
|static CameraDevice *||openDevice (int deviceIndex, int minWidth=128, int minHeight=64, int maxWidth=1024, int maxHeight=768, bool highQuality=true)|
|Opens a camera device. More...|
|static String||getFileExtension ()|
|Returns the file extension that should be used for the files that you pass to startRecordingToFile(). More...|
Controls any video capture devices that might be available.
Use getAvailableDevices() to list the devices that are attached to the system, then call openDevice to open one for use. Once you have a CameraDevice object, you can get a viewer component from it, and use its methods to stream to a file or capture still-frames.
Constructor & Destructor Documentation
Member Function Documentation
Returns a list of the available cameras on this machine.
You can open one of these devices by calling openDevice().
Opens a camera device.
The index parameter indicates which of the items returned by getAvailableDevices() to open.
The size constraints allow the method to choose between different resolutions if the camera supports this. If the resolution cam't be specified (e.g. on the Mac) then these will be ignored.
On Mac, if highQuality is false, then the camera will be opened in preview mode which will allow the OS to drop frames if the computer cannot keep up in processing the frames.
Returns the name of this device.
Creates a component that can be used to display a preview of the video from this camera.
|void CameraDevice::startRecordingToFile||(||const File &||file,|
Starts recording video to the specified file.
You should use getFileExtension() to find out the correct extension to use for your filename.
If the file exists, it will be deleted before the recording starts.
This method may not start recording instantly, so if you need to know the exact time at which the file begins, you can call getTimeOfFirstRecordedFrame() after the recording has finished.
The quality parameter can be 0, 1, or 2, to indicate low, medium, or high. It may or may not be used, depending on the driver.
Stops recording, after a call to startRecordingToFile().
Returns the file extension that should be used for the files that you pass to startRecordingToFile().
This may be platform-specific, e.g. ".mov" or ".avi".
After calling stopRecording(), this method can be called to return the timestamp of the first frame that was written to the file.
|void CameraDevice::addListener||(||Listener *||listenerToAdd||)|
Adds a listener to receive images from the camera.
Be very careful not to delete the listener without first removing it by calling removeListener().
|void CameraDevice::removeListener||(||Listener *||listenerToRemove||)|
Removes a listener that was previously added with addListener().
The documentation for this class was generated from the following file:
Generated on Fri Jan 12 2018 09:51:17 for JUCE by 1.8.13