#include <VideoDevice.h>
Inheritance diagram for CVideoDevice:

This class is the (abstract) base of all platform dependant classes. It has the common functionality of video capturing:
(*) This is mainly due to the Windows platform, because there it is the driver that supplies the various dialogs that control the parameters of the device like width & height, brightness, input, tuner frequency, etc. This in contrast to Linux, which has it all wrapped up in the Video4Linux API. The behaviour is simulated under Linux :-)
The class supports output in both RGB and YUV (4:2:0) format; a caller has to specify which format he desires (maybe even both). CVideoDevice internally transforms one format to the other. If no format is specified, no image is captured!
Support for TV tuners is also built in; the user can specify a list of presets through a dialog supplied by this class.
|
|
|
|
|
|
|
|
|
|
|
Destroys the object; also closes the associated file descriptor |
|
|
|
|
|
|
|
||||||||||||
|
The frequency or norm changed. |
|
|
The video input channel has changed. |
|
|
|
|
|
Closes the device provisionally. This function decrements the usage counter of the VideoDevice. If the counter reaches 0, the device is really closed. See also Open(). |
|
|
The device is being closed by the last user; the device is not accessible |
|
|
The device is being closed by the last user; the device is not accessible |
|
|
|
|
|
|
|
|
Create our VideoFrames list. Call this function when you have created your RGB/YUV images. It will create m_Buffers CVideoFrames, mapped to these RGB/YUV images. Initially all frames are placed on the empty list. |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Enable/disable retrieval of RGB image(s). This tells the object if RGB images are desired. This will help in selecting the proper PALETTE for the device. Both RGB and YUV images may be enabled. See also EnableYUV. Multiple calls to EnableRGB(TRUE) will require the same amount of calls to EnableRGB(FALSE) to turn RGB retrieval completely off. |
|
|
|
|
|
Enable/disable retrieval of YUV image(s). This tells the object if YUV (planar) images are desired. This will help in selecting the proper PALETTE for the device. Both YUV and RGB images may be enabled. See also EnableRGB. Multiple calls to EnableYUV(TRUE) will require the same amount of calls to EnableYUV(FALSE) to turn YUV retrieval completely off. |
|
|
|
|
|
An error occured. err_num is one of the errno values. |
|
|
An error occured. err_num is one of the errno values. |
|
|
|
|
|
Implemented in CVideoDeviceLinux, and CVideoDeviceWin32. |
|
|
The frame rate has been changed. |
|
|
New framerate |
|
|
One ore more new image(s) is(are) available. |
|
|
Returns an audio input channel (source) object.
|
|
|
Return number of audio channels on the device. Note! There is no SelectAudioInput! I suppose it's switched together with the video input... Also there is no way to find out to which audio input is associated with which video input. It looks more like this class is meant for manipulating the FM sound decoder on the tuner than really setting anything on the input. |
|
|
Return brightness setting of device.
Reimplemented in CVideoDeviceLinux. |
|
|
|
|
|
Return available buffers.
|
|
|
|
|
|
Return colour saturation setting of device.
Reimplemented in CVideoDeviceLinux. |
|
|
Return information in XML subtree. This function returns the common part of the video device as an XML node. Specifically, it contains the TV channel/tuner part. You should overload this function in your OS-specific subclass, and merge this node with the private settings from your device. Reimplemented in CVideoDeviceLinux. |
|
|
Return contrast setting of device.
Reimplemented in CVideoDeviceLinux. |
|
|
Return info of the current TV channel.
|
|
|
Return current input.
|
|
|
Reimplemented in CVideoDeviceLinux, and CVideoDeviceWin32. |
|
|
System dependant descriptor to device. File descriptor under Unix, WHND under Windows; should be casted to apropriate type. Only valid when the device is open! Implemented in CVideoDeviceLinux, and CVideoDeviceWin32. |
|
|
Get a videoframe that can be filled.
This function will return NULL when no CVideoFrame is available. See also ReturnFillFrame |
|
|
Returns the current framerate.
Returns -1 in case of error. Reimplemented in CVideoDeviceLinux. |
|
|
Return hue (color shift) setting of device.
Reimplemented in CVideoDeviceLinux. |
|
|
Get currently selected input.
Usually this variable will be initialized during SetConfiguration(). Implemented in CVideoDeviceLinux. |
|
|
|
|
|
Returns internal name of device. This function returns the name of the device through the V4L interface. |
|
|
Return the latest video frame. This will return a (shallow copy) of CVideoFrame. Delete the object when you're done with it. |
|
|
Return the maximum image size this device supports.
Not all sizes between the minimum and maximum size may be allowed by the device; however, there is currently no way to retrieve a list of possible sizes. It's safest to stick to CIF (352x288) and SIF (320x240) formats and subsizes hereof, and VGA. Also it's wise to use to multiples of 8 in both directions. SetSize will return FALSE when the size was rejected by the driver. Reimplemented in CVideoDeviceLinux. |
|
|
Return number of mmaped() buffers.
|
|
|
Return the minimum image size this device supports.
Reimplemented in CVideoDeviceLinux. |
|
|
|
|
|
Returns device inode name. This function returns the name of the device inode, like /dev/video0, /dev/video1, etc. |
|
|
Implemented in CVideoDeviceLinux. |
|
|
Get number of tuners attached to this video device.
You may have to select a specific input to watch TV; some cards also have S-VHS or composite input. Unfortunately it is not possible to determine to which input a tuner is attached. Implemented in CVideoDeviceLinux. |
|
|
Return number of programmed TV channels.
It is not possible to define new channels directly in CVideoDevice; this is left to the TunerDialog. You can only query and select them.
|
|
|
Get an RGB image.
When buffering is active any of the previous images in the buffer can be retrieved. The 'offset' parameter indicates the negative offset in the (circular) list of images. When offset = 0 (the default) the latest image is returned; when offset = 1 is the previous image, offset = 2 the image before that, etc. up to the number of Buffers - 1. If offset is outside the range a NULL pointer will be returned. |
|
|
Returns serial number of device, when available.
|
|
|
Return current size from the driver.
|
|
|
|
|
|
Implemented in CVideoDeviceLinux. |