class PVideoChannel: public PChannel

A class representing a video channel.

Inheritance:


Public Methods

[more]virtual PINDEX GetGrabWidth ()
Return the width of the currently selected grabbing device
[more]virtual PINDEX GetGrabHeight ()
Return the height of the currently selected grabbing device
[more]BOOL Write (const void * buf, PINDEX len)
Low level write to the channel, which is data to be rendered to the local video display device
[more]virtual BOOL Redraw (const void * frame)
Cause the referenced data to be drawn to the previously defined media
[more]virtual void SetRenderNow (int _now)
Set the current time
[more]PINDEX GetRenderWidth ()
Return the previously specified width
[more]PINDEX GetRenderHeight ()
Return the previously specified height
[more]virtual void SetRenderFrameSize (int _width, int _height)
Specifiy the width and height of the video stream, which is to be rendered onto the previously specified device
[more]virtual void SetGrabberFrameSize (int _width, int _height)
Specifiy the width and height of the video stream, which is to be extracted from the previously specified device
[more]virtual void AttachVideoPlayer (PVideoOutputDevice * device)
Attach a user specific class for rendering video
[more]virtual void AttachVideoReader (PVideoInputDevice * device)
Attach a user specific class for acquiring video
[more]virtual BOOL IsGrabberOpen ()
See if the grabber is open
[more]virtual BOOL IsRenderOpen ()
See if the rendering device is open

Public

[more] Construction
[more] Open functions

Protected Fields

[more]PVideoInputDevice* mpInput
Specified video device name, eg /dev/video0.
[more]PVideoOutputDevice* mpOutput
For grabbing video from the camera.


Inherited from PChannel:

Public Methods

ostatic BOOL ConvertOSError( int libcReturnValue, Errors & lastError, int & osError )

Public

Overrides from class PObject

Information functions

Reading functions

Writing functions

Miscellaneous functions

Error functions

Protected Fields

oint os_handle
oErrors lastErrorCode[NumErrorGroups+1]
oint lastErrorNumber[NumErrorGroups+1]
oPINDEX lastReadCount
oPINDEX lastWriteCount
oPTimeInterval readTimeout
oPTimeInterval writeTimeout

Protected Methods

ovirtual BOOL ConvertOSError( int libcReturnValue, ErrorGroup group = LastGeneralError )
oBOOL SetErrorValues( Errors errorCode, int osError, ErrorGroup group = LastGeneralError )
oint ReadCharWithTimeout( PTimeInterval & timeout )


Inherited from PObject:

Public

Run Time Type functions

Comparison functions

I/O functions


Documentation

A class representing a video channel. This class is provided mainly for the playback or recording of video on the system.

Note that this video channel is implicitly a series of frames in YUV411P format. No conversion is performed on data to/from the channel.

o Construction

o PVideoChannel()
Create a video channel.

o PVideoChannel( const PString & device, Directions dir )
Create a video channel. Create a reference to the video drivers for the platform.
Parameters:
device - Name of video driver/device
dir - Video I/O direction

o Open functions

oBOOL Open( const PString & device, Directions dir )
Open the specified device for playing or recording. The device name is platform specific and is as returned in the GetDevices() function.

Returns:
TRUE if the video device is valid for playing/recording.
Parameters:
device - Name of video driver/device
dir - Video I/O direction

oBOOL IsOpen() const
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.

ostatic PStringList GetDeviceNames( Directions dir )
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.

Returns:
An array of platform dependent strings for each video player/recorder.

ostatic PString GetDefaultDevice( Directions dir )
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.

Returns:
A platform dependent string for the video player/recorder.

ovirtual PINDEX GetGrabWidth()
Return the width of the currently selected grabbing device

ovirtual PINDEX GetGrabHeight()
Return the height of the currently selected grabbing device

oBOOL Write(const void * buf, PINDEX len)
Low level write to the channel, which is data to be rendered to the local video display device

ovirtual BOOL Redraw(const void * frame)
Cause the referenced data to be drawn to the previously defined media

ovirtual void SetRenderNow(int _now)
Set the current time

oPINDEX GetRenderWidth()
Return the previously specified width

oPINDEX GetRenderHeight()
Return the previously specified height

ovirtual void SetRenderFrameSize(int _width, int _height)
Specifiy the width and height of the video stream, which is to be rendered onto the previously specified device

ovirtual void SetGrabberFrameSize(int _width, int _height)
Specifiy the width and height of the video stream, which is to be extracted from the previously specified device

ovirtual void AttachVideoPlayer(PVideoOutputDevice * device)
Attach a user specific class for rendering video

ovirtual void AttachVideoReader(PVideoInputDevice * device)
Attach a user specific class for acquiring video

ovirtual BOOL IsGrabberOpen()
See if the grabber is open

ovirtual BOOL IsRenderOpen()
See if the rendering device is open

oPVideoInputDevice* mpInput
Specified video device name, eg /dev/video0.

oPVideoOutputDevice* mpOutput
For grabbing video from the camera.


This class has no child classes.

Alphabetic index HTML hierarchy of classes or Java



This page was generated with the help of DOC++.