OpenVideo Documentation

   Main Page       Modules       Class Hierarchy       Alphabetical List       Compound List       File List       Compound Members       Related Pages   

V4LSrc Class Reference
[Node Classes]

A source for grabbing video from V4L cards. More...

#include <V4LSrc.h>

List of all members.

Public Types

enum  VideoChannel { VideoTVSource = 0, VideoCompositeSource = 1, VideoSVideoSource = 2 }

Public Member Functions

 V4LSrc ()
 ~V4LSrc ()
virtual bool setParameter (std::string key, std::string value)
virtual void start ()
virtual void process ()
virtual void postProcess ()

Protected Attributes

char videoDevice [40]
int videoWidth
int videoHeight
int videoMode
VideoChannel videoChannel
PIXEL_FORMAT pixelFormat

Private Attributes

int videoPixelFormat
V4LMMInfo videoInfo
unsigned char * videoBuffer
int videoFd
int videoFrame


Detailed Description

A source for grabbing video from V4L cards.

This node can grab video from V4L cards (bt878 capture cards). The node takes the following parameters (default values in parentheses): width: Width of capture frame (640). height: Height of capture frame (480). device: The device to capture from (/dev/video0) format: The pixel format to pass on to downstream nodes (B8G8R8). videoMode: The video mode to use for grabbing (PAL). videoChannel: Channel to capture from (Composite).

Definition at line 58 of file V4LSrc.h.


Member Enumeration Documentation

enum V4LSrc::VideoChannel
 

Defines which channel to grab video from.

Enumeration values:
VideoTVSource 
VideoCompositeSource 
VideoSVideoSource 

Definition at line 66 of file V4LSrc.h.


Constructor & Destructor Documentation

V4LSrc::V4LSrc  ) 
 

Definition at line 48 of file V4LSrc.cxx.

References pixelFormat, videoDevice, videoHeight, and videoWidth.

V4LSrc::~V4LSrc  ) 
 

Definition at line 62 of file V4LSrc.cxx.

References videoBuffer, videoFd, and videoInfo.


Member Function Documentation

void V4LSrc::postProcess  )  [virtual]
 

releases the videoframe (which was previously locked by the process fucntion.

Definition at line 213 of file V4LSrc.cxx.

void V4LSrc::process  )  [virtual]
 

Updates the video frame at its context object.

Definition at line 176 of file V4LSrc.cxx.

References V4LMCapture(), V4LMSync(), videoBuffer, videoFd, videoFrame, and videoInfo.

bool V4LSrc::setParameter std::string  key,
std::string  value
[virtual]
 

Sets all relevant parameters.

Definition at line 219 of file V4LSrc.cxx.

References openvideo::FORMAT_B8G8R8, openvideo::FORMAT_B8G8R8X8, openvideo::FORMAT_L8, openvideo::FORMAT_R5G6B5, pixelFormat, V4L_FORMAT_RGB16, V4L_FORMAT_RGB24, V4L_FORMAT_RGB32, V4L_FORMAT_Y8, videoChannel, VideoCompositeSource, videoHeight, videoMode, videoPixelFormat, VideoSVideoSource, VideoTVSource, and videoWidth.

void V4LSrc::start  )  [virtual]
 

This function calls intializes the videowrapper lib.

it then opens and starts the video stream. Finally it creates a new context where it puts the video specific data on.

Definition at line 76 of file V4LSrc.cxx.

References V4LFormat::format, V4LFormat::height, pixelFormat, V4LGetCaps(), V4LMCapture(), V4LMGetFormat(), V4LMGetMMInfo(), V4LMSetFormat(), V4LSetBrightness(), V4LSetContrast(), V4LSetHue(), V4LSetSaturation(), V4LSetSource(), videoBuffer, videoChannel, videoDevice, videoFd, videoFrame, videoHeight, videoInfo, videoMode, videoPixelFormat, videoWidth, and V4LFormat::width.


Member Data Documentation

PIXEL_FORMAT V4LSrc::pixelFormat [protected]
 

Holds the pixel format used.

Definition at line 121 of file V4LSrc.h.

Referenced by setParameter(), start(), and V4LSrc().

unsigned char* V4LSrc::videoBuffer [private]
 

Capture buffer.

Definition at line 132 of file V4LSrc.h.

Referenced by process(), start(), and ~V4LSrc().

VideoChannel V4LSrc::videoChannel [protected]
 

Defines video channel. (Composite|SVideo|TV). Default is Composite.

Definition at line 118 of file V4LSrc.h.

Referenced by setParameter(), and start().

char V4LSrc::videoDevice[40] [protected]
 

Video device.

Definition at line 106 of file V4LSrc.h.

Referenced by start(), and V4LSrc().

int V4LSrc::videoFd [private]
 

Video stream descriptor.

Definition at line 135 of file V4LSrc.h.

Referenced by process(), start(), and ~V4LSrc().

int V4LSrc::videoFrame [private]
 

Switches between the frame buffers (2 are currently used).

Definition at line 138 of file V4LSrc.h.

Referenced by process(), and start().

int V4LSrc::videoHeight [protected]
 

Height of video frame.

Definition at line 112 of file V4LSrc.h.

Referenced by setParameter(), start(), and V4LSrc().

V4LMMInfo V4LSrc::videoInfo [private]
 

Video info.

Definition at line 129 of file V4LSrc.h.

Referenced by process(), start(), and ~V4LSrc().

int V4LSrc::videoMode [protected]
 

Defines video mode. Can take values (PAL | NTSC). Default is PAL.

Definition at line 115 of file V4LSrc.h.

Referenced by setParameter(), and start().

int V4LSrc::videoPixelFormat [private]
 

Defines the v4l pixel format (Used internally).

Definition at line 126 of file V4LSrc.h.

Referenced by setParameter(), and start().

int V4LSrc::videoWidth [protected]
 

Width of video frame.

Definition at line 109 of file V4LSrc.h.

Referenced by setParameter(), start(), and V4LSrc().


The documentation for this class was generated from the following files:
 This page was generated at Wed May 31 13:04:17 2006 for OpenVideo by Doxygen.
 If you have any comments, please send a message to schmalstieg@icg.tu-graz.ac.at.
www.studierstube.org