#include <video.h>
Inheritance diagram for PVideoChannel:
Construction | |
enum | Directions { Recorder, Player } |
PVideoChannel () | |
Create a video channel. | |
PVideoChannel (const PString &device, Directions dir) | |
~PVideoChannel () | |
Open functions | |
BOOL | Open (const PString &device, Directions dir) |
BOOL | IsOpen () const |
PStringList | GetDeviceNames (Directions dir) |
PString | GetDefaultDevice (Directions dir) |
Public Types | |
Public Member Functions | |
virtual PINDEX | GetGrabWidth () |
virtual PINDEX | GetGrabHeight () |
virtual BOOL | Read (void *buf, PINDEX len) |
BOOL | Write (const void *buf, PINDEX len) |
virtual BOOL | Redraw (const void *frame) |
PINDEX | GetRenderWidth () |
PINDEX | GetRenderHeight () |
virtual void | SetRenderFrameSize (int _width, int _height) |
virtual void | SetGrabberFrameSize (int _width, int _height) |
virtual void | AttachVideoPlayer (PVideoOutputDevice *device, BOOL keepCurrent=TRUE) |
virtual void | AttachVideoReader (PVideoInputDevice *device, BOOL keepCurrent=TRUE) |
virtual PVideoInputDevice * | GetVideoReader () |
virtual PVideoOutputDevice * | GetVideoPlayer () |
virtual BOOL | IsGrabberOpen () |
virtual BOOL | IsRenderOpen () |
BOOL | DisplayRawData (void *videoBuffer) |
virtual void | CloseVideoReader () |
virtual void | CloseVideoPlayer () |
void | RestrictAccess () |
void | EnableAccess () |
BOOL | ToggleVFlipInput () |
virtual BOOL | Close () |
virtual PString | GetName () const |
PString | GetErrorText () const |
Protected Attributes | |
Directions | direction |
PString | deviceName |
PVideoInputDevice * | mpInput |
Specified video device name, eg /dev/video0. | |
PVideoOutputDevice * | mpOutput |
For grabbing video from the camera. | |
PMutex | accessMutex |
For displaying video on the screen. | |
Static Protected Attributes | |
PMutex | dictMutex |
Note that this video channel is implicitly a series of frames in YUV411P format. No conversion is performed on data to/from the channel.
|
|
|
Create a video channel.
|
|
Create a video channel. Create a reference to the video drivers for the platform.
|
|
|
|
Attach a user specific class for rendering video If keepCurrent is true, an abort is caused when the program attempts to attach a new player when there is already a video player attached. If keepCurrent is false, the existing video player is deleted before attaching the new player. |
|
Attach a user specific class for acquiring video If keepCurrent is true, an abort is caused when the program attempts to attach a new reader when there is already a video reader attached. If keepCurrent is false, the existing video reader is deleted before attaching the new reader. |
|
Close the channel, shutting down the link to the data source.
Reimplemented from PChannel. |
|
Destroy the attached video display class. |
|
Destroy the attached grabber class. |
|
Get data from the attached inputDevice, and display on the attached ouptutDevice. |
|
Allow free access to this video channel. |
|
Get the name for the default video devices/driver that is on this platform. Note that a named device may not necessarily do both playing and recording so the arrays returned with the #dir# parameter in each value is not necessarily the same.
|
|
Get all of the names for video devices/drivers that are available on this platform. Note that a named device may not necessarily do both playing and recording so the arrays returned with the #dir# parameter in each value is not necessarily the same.
|
|
|
|
Return the height of the currently selected grabbing device. |
|
Return the width of the currently selected grabbing device. |
|
Get the platform and I/O channel type name of the channel. For example, it would return the filename in PFile# type channels.
Reimplemented from PChannel. |
|
Return the previously specified height. |
|
Return the previously specified width. |
|
Return a pointer to the class for displaying video |
|
Return a pointer to the class for acquiring video |
|
See if the grabber is open |
|
return True if one (or both) of the video device class pointers is non NULL. If either pointer is non NULL, then a device is ready to be written to, which indicates this channel is open. Reimplemented from PChannel. |
|
See if the rendering device is open |
|
Open the specified device for playing or recording. The device name is platform specific and is as returned in the GetDevices() function.
|
|
Low level read from the channel. This function may block until the requested number of characters were read or the read timeout was reached. The GetLastReadCount() function returns the actual number of bytes read. The GetErrorCode() function should be consulted after Read() returns FALSE to determine what caused the failure.
Reimplemented from PChannel. |
|
Cause the referenced data to be drawn to the previously defined media |
|
Restrict others from using this video channel. |
|
Specifiy the width and height of the video stream, which is to be extracted from the previously specified device. |
|
Specifiy the width and height of the video stream, which is to be rendered onto the previously specified device. |
|
Toggle the vertical flip state of the video grabber. |
|
Low level write to the channel, which is data to be rendered to the local video display device. Reimplemented from PChannel. |
|
For displaying video on the screen.
|
|
|
|
|
|
|
|
Specified video device name, eg /dev/video0.
|
|
For grabbing video from the camera.
|