Main Page | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Class Members | File Members

VDeviceV4L Class Reference

#include <vdevicev4l.h>

Inheritance diagram for VDeviceV4L:

VDeviceBase List of all members.

Public Member Functions

 VDeviceV4L (VideoDevice *device)
 ~VDeviceV4L ()
int initialize ()
int open_input ()
int close_all ()
int read_buffer (VFrame *frame)
int get_best_colormodel (Asset *asset)
int set_channel (Channel *channel)
int set_picture (PictureConfig *picture)

Private Member Functions

int set_cloexec_flag (int desc, int value)
int set_mute (int muted)
int v4l1_get_inputs ()
int v4l1_set_mute (int muted)
unsigned long translate_colormodel (int colormodel)
int v4l1_set_channel (Channel *channel)
int v4l1_get_norm (int norm)
int v4l1_set_picture (PictureConfig *picture)
void v4l1_start_capture ()
int capture_frame (int capture_frame_number)
int wait_v4l_frame ()
int read_v4l_frame (VFrame *frame)
int frame_to_vframe (VFrame *frame, unsigned char *input)
int next_frame (int previous_frame)
int close_v4l ()
int unmap_v4l_shmem ()
int v4l_init ()

Private Attributes

int input_fd
int output_fd
unsigned long device_colormodel
int colormodel
video_capability cap1
video_window window_params
video_picture picture_params
video_mbuf capture_params
char * capture_buffer
int capture_frame_number
int read_frame_number
int shared_memory
int initialization_complete
int got_first_frame

Detailed Description

Definition at line 8 of file vdevicev4l.h.


Constructor & Destructor Documentation

VDeviceV4L::VDeviceV4L VideoDevice device  ) 
 

Definition at line 27 of file vdevicev4l.C.

References initialize().

VDeviceV4L::~VDeviceV4L  ) 
 

Definition at line 33 of file vdevicev4l.C.


Member Function Documentation

int VDeviceV4L::capture_frame int  capture_frame_number  )  [private]
 

Definition at line 376 of file vdevicev4l.C.

References VDeviceBase::device, device_colormodel, video_mmap::format, video_mmap::frame, VideoInConfig::h, video_mmap::height, VideoDevice::in_config, input_fd, VIDIOCMCAPTURE, VideoInConfig::w, and video_mmap::width.

Referenced by read_buffer(), and v4l1_start_capture().

int VDeviceV4L::close_all  )  [virtual]
 

Reimplemented from VDeviceBase.

Definition at line 74 of file vdevicev4l.C.

References close_v4l().

int VDeviceV4L::close_v4l  )  [private]
 

Definition at line 80 of file vdevicev4l.C.

References input_fd, and unmap_v4l_shmem().

Referenced by close_all().

int VDeviceV4L::frame_to_vframe VFrame *  frame,
unsigned char *  input
[private]
 

Definition at line 409 of file vdevicev4l.C.

References colormodel, video_window::height, height, MIN, video_window::width, width, and window_params.

Referenced by read_v4l_frame().

int VDeviceV4L::get_best_colormodel Asset asset  )  [virtual]
 

Reimplemented from VDeviceBase.

Definition at line 242 of file vdevicev4l.C.

References colormodel, VDeviceBase::device, device_colormodel, VideoInConfig::driver, File::get_best_colormodel(), VideoDevice::in_config, initialization_complete, translate_colormodel(), and v4l_init().

int VDeviceV4L::initialize  ) 
 

Definition at line 37 of file vdevicev4l.C.

References capture_buffer, capture_frame_number, initialization_complete, read_frame_number, and shared_memory.

Referenced by VDeviceV4L().

int VDeviceV4L::next_frame int  previous_frame  )  [private]
 

Definition at line 508 of file vdevicev4l.C.

References VideoInConfig::capture_length, capture_params, VDeviceBase::device, video_mbuf::frames, VideoDevice::in_config, and MIN.

Referenced by read_buffer().

int VDeviceV4L::open_input  )  [virtual]
 

Reimplemented from VDeviceBase.

Definition at line 47 of file vdevicev4l.C.

References VideoDevice::channel, VDeviceBase::device, VideoDevice::in_config, input_fd, VideoDevice::picture, PictureConfig::use_brightness, PictureConfig::use_color, PictureConfig::use_contrast, Channel::use_fine, Channel::use_frequency, PictureConfig::use_hue, Channel::use_input, Channel::use_norm, PictureConfig::use_whiteness, v4l1_get_inputs(), and VideoInConfig::v4l_in_device.

int VDeviceV4L::read_buffer VFrame *  frame  )  [virtual]
 

Reimplemented from VDeviceBase.

Definition at line 516 of file vdevicev4l.C.

References capture_buffer, capture_frame(), capture_frame_number, capture_params, got_first_frame, input_fd, next_frame(), read_v4l_frame(), shared_memory, video_mbuf::size, v4l1_start_capture(), and wait_v4l_frame().

int VDeviceV4L::read_v4l_frame VFrame *  frame  )  [private]
 

Definition at line 399 of file vdevicev4l.C.

References capture_buffer, capture_frame_number, capture_params, frame_to_vframe(), and video_mbuf::offsets.

Referenced by read_buffer().

int VDeviceV4L::set_channel Channel channel  )  [virtual]
 

Reimplemented from VDeviceBase.

Definition at line 284 of file vdevicev4l.C.

References v4l1_set_channel().

int VDeviceV4L::set_cloexec_flag int  desc,
int  value
[private]
 

Definition at line 227 of file vdevicev4l.C.

Referenced by v4l_init().

int VDeviceV4L::set_mute int  muted  )  [private]
 

Definition at line 198 of file vdevicev4l.C.

References v4l1_set_mute().

Referenced by v4l_init().

int VDeviceV4L::set_picture PictureConfig picture  )  [virtual]
 

Reimplemented from VDeviceBase.

Definition at line 344 of file vdevicev4l.C.

References v4l1_set_picture().

Referenced by v4l_init().

unsigned long VDeviceV4L::translate_colormodel int  colormodel  )  [private]
 

Definition at line 268 of file vdevicev4l.C.

References VIDEO_PALETTE_RGB24, VIDEO_PALETTE_YUV411P, VIDEO_PALETTE_YUV420P, VIDEO_PALETTE_YUV422, and VIDEO_PALETTE_YUV422P.

Referenced by get_best_colormodel().

int VDeviceV4L::unmap_v4l_shmem  )  [private]
 

Definition at line 87 of file vdevicev4l.C.

References capture_buffer, capture_params, shared_memory, and video_mbuf::size.

Referenced by close_v4l().

int VDeviceV4L::v4l1_get_inputs  )  [private]
 

Definition at line 173 of file vdevicev4l.C.

References video_channel::channel, VDeviceBase::device, Channel::device_name, input_fd, VideoDevice::input_sources, video_channel::name, and VIDIOCGCHAN.

Referenced by open_input().

int VDeviceV4L::v4l1_get_norm int  norm  )  [private]
 

Definition at line 333 of file vdevicev4l.C.

References NTSC, PAL, SECAM, VIDEO_MODE_NTSC, VIDEO_MODE_PAL, and VIDEO_MODE_SECAM.

Referenced by v4l1_set_channel().

int VDeviceV4L::v4l1_set_channel Channel channel  )  [private]
 

Definition at line 289 of file vdevicev4l.C.

References chanlists, video_channel::channel, Channel::entry, Channel::fine_tune, video_channel::flags, CHANLIST::freq, Channel::freqtable, Channel::input, input_fd, CHANLISTS::list, video_tuner::mode, Channel::norm, video_channel::norm, video_tuner::tuner, v4l1_get_norm(), VIDEO_VC_TUNER, VIDIOCGCHAN, VIDIOCGTUNER, VIDIOCSCHAN, VIDIOCSFREQ, and VIDIOCSTUNER.

Referenced by set_channel().

int VDeviceV4L::v4l1_set_mute int  muted  )  [private]
 

Definition at line 205 of file vdevicev4l.C.

References video_audio::bass, video_audio::flags, input_fd, video_audio::treble, VIDEO_AUDIO_MUTE, VIDEO_AUDIO_VOLUME, VIDIOCGAUDIO, VIDIOCSAUDIO, and video_audio::volume.

Referenced by set_mute().

int VDeviceV4L::v4l1_set_picture PictureConfig picture  )  [private]
 

Definition at line 350 of file vdevicev4l.C.

References video_picture::brightness, PictureConfig::brightness, PictureConfig::color, video_picture::colour, video_picture::contrast, PictureConfig::contrast, contrast, video_picture::depth, device_colormodel, video_picture::hue, PictureConfig::hue, input_fd, video_picture::palette, picture_params, VIDIOCGPICT, VIDIOCSPICT, video_picture::whiteness, and PictureConfig::whiteness.

Referenced by set_picture().

void VDeviceV4L::v4l1_start_capture  )  [private]
 

Definition at line 160 of file vdevicev4l.C.

References capture_frame(), VideoInConfig::capture_length, capture_params, VDeviceBase::device, video_mbuf::frames, VideoDevice::in_config, and MIN.

Referenced by read_buffer().

int VDeviceV4L::v4l_init  )  [private]
 

Definition at line 99 of file vdevicev4l.C.

References capture_buffer, capture_frame_number, capture_params, video_window::chromakey, video_window::clipcount, VDeviceBase::device, video_window::flags, got_first_frame, VideoInConfig::h, video_window::height, VideoDevice::in_config, input_fd, set_cloexec_flag(), set_mute(), set_picture(), shared_memory, video_mbuf::size, VideoInConfig::v4l_in_device, VIDIOCGMBUF, VIDIOCGWIN, VIDIOCSWIN, VideoInConfig::w, video_window::width, window_params, video_window::x, and video_window::y.

Referenced by get_best_colormodel().

int VDeviceV4L::wait_v4l_frame  )  [private]
 

Definition at line 390 of file vdevicev4l.C.

References capture_frame_number, input_fd, and VIDIOCSYNC.

Referenced by read_buffer().


Member Data Documentation

struct video_capability VDeviceV4L::cap1 [private]
 

Definition at line 48 of file vdevicev4l.h.

char* VDeviceV4L::capture_buffer [private]
 

Definition at line 54 of file vdevicev4l.h.

Referenced by initialize(), read_buffer(), read_v4l_frame(), unmap_v4l_shmem(), and v4l_init().

int VDeviceV4L::capture_frame_number [private]
 

Definition at line 55 of file vdevicev4l.h.

Referenced by initialize(), read_buffer(), read_v4l_frame(), v4l_init(), and wait_v4l_frame().

struct video_mbuf VDeviceV4L::capture_params [private]
 

Definition at line 51 of file vdevicev4l.h.

Referenced by next_frame(), read_buffer(), read_v4l_frame(), unmap_v4l_shmem(), v4l1_start_capture(), and v4l_init().

int VDeviceV4L::colormodel [private]
 

Definition at line 45 of file vdevicev4l.h.

Referenced by frame_to_vframe(), and get_best_colormodel().

unsigned long VDeviceV4L::device_colormodel [private]
 

Definition at line 43 of file vdevicev4l.h.

Referenced by capture_frame(), get_best_colormodel(), and v4l1_set_picture().

int VDeviceV4L::got_first_frame [private]
 

Definition at line 59 of file vdevicev4l.h.

Referenced by read_buffer(), and v4l_init().

int VDeviceV4L::initialization_complete [private]
 

Definition at line 58 of file vdevicev4l.h.

Referenced by get_best_colormodel(), and initialize().

int VDeviceV4L::input_fd [private]
 

Definition at line 41 of file vdevicev4l.h.

Referenced by capture_frame(), close_v4l(), open_input(), read_buffer(), v4l1_get_inputs(), v4l1_set_channel(), v4l1_set_mute(), v4l1_set_picture(), v4l_init(), and wait_v4l_frame().

int VDeviceV4L::output_fd [private]
 

Definition at line 41 of file vdevicev4l.h.

struct video_picture VDeviceV4L::picture_params [private]
 

Definition at line 50 of file vdevicev4l.h.

Referenced by v4l1_set_picture().

int VDeviceV4L::read_frame_number [private]
 

Definition at line 56 of file vdevicev4l.h.

Referenced by initialize().

int VDeviceV4L::shared_memory [private]
 

Definition at line 57 of file vdevicev4l.h.

Referenced by initialize(), read_buffer(), unmap_v4l_shmem(), and v4l_init().

struct video_window VDeviceV4L::window_params [private]
 

Definition at line 49 of file vdevicev4l.h.

Referenced by frame_to_vframe(), and v4l_init().


The documentation for this class was generated from the following files:
Generated on Sun Jan 8 13:39:28 2006 for Cinelerra-svn by  doxygen 1.4.4