V4LSrc Class Reference
[Node Classes]
A source for grabbing video from V4L cards.
More...
#include <V4LSrc.h>
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
|
|
Defines which channel to grab video from.
|
Constructor & Destructor Documentation
|
|
Definition at line 48 of file V4LSrc.cxx. References pixelFormat, videoDevice, videoHeight, and videoWidth. |
|
|
Definition at line 62 of file V4LSrc.cxx. References videoBuffer, videoFd, and videoInfo. |
Member Function Documentation
|
|
releases the videoframe (which was previously locked by the process fucntion.
Definition at line 213 of file V4LSrc.cxx. |
|
|
Updates the video frame at its context object.
Definition at line 176 of file V4LSrc.cxx. References V4LMCapture(), V4LMSync(), videoBuffer, videoFd, videoFrame, and videoInfo. |
|
||||||||||||
|
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. |
|
|
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
|
|
Holds the pixel format used.
Definition at line 121 of file V4LSrc.h. Referenced by setParameter(), start(), and V4LSrc(). |
|
|
Capture buffer.
|
|
|
Defines video channel. (Composite|SVideo|TV). Default is Composite.
Definition at line 118 of file V4LSrc.h. Referenced by setParameter(), and start(). |
|
|
Video device.
|
|
|
Video stream descriptor.
|
|
|
Switches between the frame buffers (2 are currently used).
|
|
|
Height of video frame.
Definition at line 112 of file V4LSrc.h. Referenced by setParameter(), start(), and V4LSrc(). |
|
|
Video info.
|
|
|
Defines video mode. Can take values (PAL | NTSC). Default is PAL.
Definition at line 115 of file V4LSrc.h. Referenced by setParameter(), and start(). |
|
|
Defines the v4l pixel format (Used internally).
Definition at line 126 of file V4LSrc.h. Referenced by setParameter(), and start(). |
|
|
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:
