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

VideoDevice Class Reference

#include <videodevice.h>

List of all members.

Public Member Functions

 VideoDevice (MWindow *mwindow=0)
 ~VideoDevice ()
int close_all ()
int open_input (VideoInConfig *config, int input_x, int input_y, float input_z, float frame_rate)
int is_compressed (int use_file, int use_fixed)
int get_best_colormodel (Asset *asset)
int set_adevice (AudioDevice *adevice)
int get_failed ()
int interrupt_crash ()
int set_translation (int input_x, int input_y)
int set_channel (Channel *channel)
void set_quality (int quality)
int set_field_order (int odd_field_first)
int set_latency_counter (int value)
int set_picture (PictureConfig *picture)
int capture_frame (int frame_number)
int read_buffer (VFrame *frame)
int has_signal ()
int frame_to_vframe (VFrame *frame, unsigned char *input)
int initialize ()
ArrayList< Channel * > * get_inputs ()
Channelnew_input_source (char *device_name)
BC_Bitmap * get_bitmap ()
int set_cloexec_flag (int desc, int value)
int open_output (VideoOutConfig *config, float rate, int out_w, int out_h, Canvas *output, int single_frame)
void set_cpus (int cpus)
int start_playback ()
int interrupt_playback ()
void new_output_buffers (VFrame **outputs, int colormodel)
int wait_for_startup ()
int wait_for_completion ()
int output_visible ()
int stop_playback ()
void goose_input ()
long current_position ()
int write_buffer (VFrame **outputs, EDL *edl)
int update_translation ()

Static Public Member Functions

static int is_compressed (int driver, int use_file, int use_fixed)
static char * get_vcodec (int driver)
static char * drivertostr (int driver)

Public Attributes

int interrupt
int output_format
int is_playing_back
AudioDeviceadevice
int sharing
int done_sharing
Mutex * sharing_lock
float orate
float irate
Timer buffer_timer
Timer rate_timer
int out_w
int out_h
int r
int w
long frame_delay
int cpus
int is_recording
float frame_rate
int frame_in_capture_x1
int frame_in_capture_x2
int frame_in_capture_y1
int frame_in_capture_y2
int capture_in_frame_x1
int capture_in_frame_x2
int capture_in_frame_y1
int capture_in_frame_y2
int capture_w
int capture_h
int input_x
int input_y
float input_z
int new_input_x
int new_input_y
float new_input_z
int frame_resized
int latency_counter
int capturing
int swap_bytes
ArrayList< Channel * > input_sources
int odd_field_first
int quality
int single_frame
Channelchannel
int channel_changed
Mutex * channel_lock
int picture_changed
PictureConfigpicture
Mutex * picture_lock
VDeviceBaseinput_base
VDeviceBaseoutput_base
VideoInConfigin_config
VideoOutConfigout_config
KeepaliveThreadkeepalive
MWindowmwindow


Detailed Description

Definition at line 63 of file videodevice.h.


Constructor & Destructor Documentation

VideoDevice::VideoDevice MWindow mwindow = 0  ) 
 

Definition at line 98 of file videodevice.C.

References channel, channel_lock, in_config, initialize(), out_config, picture, picture_lock, and sharing_lock.

VideoDevice::~VideoDevice  ) 
 

Definition at line 112 of file videodevice.C.

References channel, channel_lock, in_config, input_sources, out_config, picture, picture_lock, and sharing_lock.


Member Function Documentation

int VideoDevice::capture_frame int  frame_number  ) 
 

int VideoDevice::close_all  ) 
 

Definition at line 295 of file videodevice.C.

References capturing, VDeviceBase::close_all(), initialize(), input_base, input_sources, keepalive, output_base, r, KeepaliveThread::stop(), and w.

Referenced by RecordEngine::close_input_devices(), Record::close_input_devices(), RenderEngine::close_output(), PackageRenderer::stop_output(), and RecordMonitor::~RecordMonitor().

long VideoDevice::current_position  ) 
 

char * VideoDevice::drivertostr int  driver  )  [static]
 

Definition at line 249 of file videodevice.C.

int VideoDevice::frame_to_vframe VFrame *  frame,
unsigned char *  input
 

int VideoDevice::get_best_colormodel Asset asset  ) 
 

Definition at line 287 of file videodevice.C.

References VDeviceBase::get_best_colormodel(), and input_base.

Referenced by RecordVideo::get_capture_frame(), RecordMonitorThread::init_output_format(), Record::open_input_devices(), RecordVideo::rewind_file(), and RecordThread::run().

BC_Bitmap * VideoDevice::get_bitmap  ) 
 

Definition at line 624 of file videodevice.C.

References VDeviceBase::get_bitmap(), and output_base.

int VideoDevice::get_failed  ) 
 

Definition at line 363 of file videodevice.C.

References KeepaliveThread::get_failed(), and keepalive.

Referenced by RecordVideo::stop_recording().

ArrayList< Channel * > * VideoDevice::get_inputs  ) 
 

Definition at line 345 of file videodevice.C.

References input_sources.

Referenced by RecordEngine::get_video_inputs(), and Record::get_video_inputs().

char * VideoDevice::get_vcodec int  driver  )  [static]
 

Definition at line 230 of file videodevice.C.

Referenced by Record::run().

void VideoDevice::goose_input  ) 
 

Definition at line 591 of file videodevice.C.

References VDeviceBase::goose_input(), and input_base.

int VideoDevice::has_signal  ) 
 

Definition at line 490 of file videodevice.C.

References VDeviceBase::has_signal(), and input_base.

Referenced by Record::has_signal().

int VideoDevice::initialize  ) 
 

Definition at line 124 of file videodevice.C.

References adevice, capturing, channel_changed, cpus, done_sharing, frame_resized, input_base, input_x, input_y, input_z, interrupt, irate, is_playing_back, is_recording, keepalive, orate, out_h, out_w, output_base, output_format, picture_changed, quality, r, sharing, sharing_lock, single_frame, swap_bytes, and w.

Referenced by close_all(), and VideoDevice().

int VideoDevice::interrupt_crash  ) 
 

Definition at line 371 of file videodevice.C.

References input_base, and VDeviceBase::interrupt_crash().

Referenced by RecordVideo::stop_recording().

int VideoDevice::interrupt_playback  ) 
 

Definition at line 606 of file videodevice.C.

References interrupt.

Referenced by RenderEngine::interrupt_playback().

int VideoDevice::is_compressed int  use_file,
int  use_fixed
 

Definition at line 224 of file videodevice.C.

References VideoInConfig::driver, in_config, and is_compressed().

int VideoDevice::is_compressed int  driver,
int  use_file,
int  use_fixed
[static]
 

Definition at line 214 of file videodevice.C.

Referenced by is_compressed(), RecordVideo::read_buffer(), RecordVideo::rewind_file(), RecordThread::run(), and Record::run().

Channel * VideoDevice::new_input_source char *  device_name  ) 
 

Definition at line 350 of file videodevice.C.

References Channel::device_name, and input_sources.

void VideoDevice::new_output_buffers VFrame **  outputs,
int  colormodel
 

Definition at line 596 of file videodevice.C.

References MAX_CHANNELS, VDeviceBase::new_output_buffer(), and output_base.

Referenced by PackageRenderer::do_video(), RecordMonitorThread::new_output_frame(), and VRender::process_buffer().

int VideoDevice::open_input VideoInConfig config,
int  input_x,
int  input_y,
float  input_z,
float  frame_rate
 

Definition at line 152 of file videodevice.C.

References capturing, VideoInConfig::driver, in_config, input_base, keepalive, VDeviceBase::open_input(), r, and KeepaliveThread::start_keepalive().

Referenced by Record::open_input_devices().

int VideoDevice::open_output VideoOutConfig config,
float  rate,
int  out_w,
int  out_h,
Canvas output,
int  single_frame
 

Definition at line 523 of file videodevice.C.

References VideoOutConfig::driver, VDeviceBase::open_output(), orate, out_config, output_base, and w.

Referenced by PackageRenderer::create_engine(), RecordMonitor::create_objects(), and RenderEngine::open_output().

int VideoDevice::output_visible  ) 
 

Definition at line 619 of file videodevice.C.

References output_base, and VDeviceBase::output_visible().

Referenced by PackageRenderer::do_video().

int VideoDevice::read_buffer VFrame *  frame  ) 
 

Definition at line 497 of file videodevice.C.

References KeepaliveThread::capturing, capturing, input_base, keepalive, VDeviceBase::read_buffer(), and KeepaliveThread::reset_keepalive().

Referenced by RecordVideo::read_buffer().

int VideoDevice::set_adevice AudioDevice adevice  ) 
 

Definition at line 338 of file videodevice.C.

Referenced by RecordEngine::open_input_devices(), Record::open_input_devices(), and RenderEngine::open_output().

int VideoDevice::set_channel Channel channel  ) 
 

Definition at line 390 of file videodevice.C.

References channel_changed, channel_lock, Channel::copy_settings(), input_base, output_base, and VDeviceBase::set_channel().

Referenced by RecordEngine::change_channel(), RenderEngine::open_output(), and Record::set_channel().

int VideoDevice::set_cloexec_flag int  desc,
int  value
 

Definition at line 630 of file videodevice.C.

void VideoDevice::set_cpus int  cpus  ) 
 

Definition at line 409 of file videodevice.C.

Referenced by RenderEngine::open_output().

int VideoDevice::set_field_order int  odd_field_first  ) 
 

Definition at line 384 of file videodevice.C.

Referenced by Record::open_input_devices(), and RecordVideo::run().

int VideoDevice::set_latency_counter int  value  ) 
 

Definition at line 484 of file videodevice.C.

References latency_counter.

int VideoDevice::set_picture PictureConfig picture  ) 
 

Definition at line 414 of file videodevice.C.

References PictureConfig::copy_settings(), input_base, picture_changed, picture_lock, and VDeviceBase::set_picture().

Referenced by RecordEngine::set_video_picture(), and Record::set_video_picture().

void VideoDevice::set_quality int  quality  ) 
 

Definition at line 404 of file videodevice.C.

Referenced by Record::open_input_devices(), and RenderEngine::open_output().

int VideoDevice::set_translation int  input_x,
int  input_y
 

Definition at line 377 of file videodevice.C.

Referenced by Record::set_translation().

int VideoDevice::start_playback  ) 
 

Definition at line 573 of file videodevice.C.

References interrupt, is_playing_back, output_base, and VDeviceBase::start_playback().

Referenced by PackageRenderer::create_engine(), and RenderEngine::start_video().

int VideoDevice::stop_playback  ) 
 

Definition at line 583 of file videodevice.C.

References interrupt, is_playing_back, output_base, and VDeviceBase::stop_playback().

Referenced by PackageRenderer::stop_output().

int VideoDevice::update_translation  ) 
 

Definition at line 427 of file videodevice.C.

References capture_h, capture_in_frame_x1, capture_in_frame_x2, capture_in_frame_y1, capture_in_frame_y2, capture_w, VideoInConfig::driver, frame_in_capture_x1, frame_in_capture_x2, frame_in_capture_y1, frame_in_capture_y2, frame_resized, VideoInConfig::h, in_config, input_x, input_y, input_z, new_input_x, new_input_y, new_input_z, and VideoInConfig::w.

int VideoDevice::wait_for_completion  ) 
 

int VideoDevice::wait_for_startup  ) 
 

int VideoDevice::write_buffer VFrame **  outputs,
EDL edl
 

Definition at line 612 of file videodevice.C.

References output_base, and VDeviceBase::write_buffer().

Referenced by PackageRenderer::do_video(), VRender::flash_output(), and RecordMonitorThread::show_output_frame().


Member Data Documentation

AudioDevice* VideoDevice::adevice
 

Definition at line 165 of file videodevice.h.

Referenced by initialize().

Timer VideoDevice::buffer_timer
 

Definition at line 175 of file videodevice.h.

int VideoDevice::capture_h
 

Definition at line 194 of file videodevice.h.

Referenced by update_translation().

int VideoDevice::capture_in_frame_x1
 

Definition at line 192 of file videodevice.h.

Referenced by update_translation().

int VideoDevice::capture_in_frame_x2
 

Definition at line 192 of file videodevice.h.

Referenced by update_translation().

int VideoDevice::capture_in_frame_y1
 

Definition at line 192 of file videodevice.h.

Referenced by update_translation().

int VideoDevice::capture_in_frame_y2
 

Definition at line 192 of file videodevice.h.

Referenced by update_translation().

int VideoDevice::capture_w
 

Definition at line 194 of file videodevice.h.

Referenced by update_translation().

int VideoDevice::capturing
 

Definition at line 203 of file videodevice.h.

Referenced by close_all(), initialize(), open_input(), and read_buffer().

Channel* VideoDevice::channel
 

Definition at line 216 of file videodevice.h.

Referenced by VDeviceV4L::open_input(), VDeviceBUZ::open_input(), Record::open_input_devices(), VideoDevice(), and ~VideoDevice().

int VideoDevice::channel_changed
 

Definition at line 218 of file videodevice.h.

Referenced by initialize(), and set_channel().

Mutex* VideoDevice::channel_lock
 

Definition at line 219 of file videodevice.h.

Referenced by set_channel(), VideoDevice(), and ~VideoDevice().

int VideoDevice::cpus
 

Definition at line 185 of file videodevice.h.

Referenced by initialize(), and VDeviceBUZ::write_buffer().

int VideoDevice::done_sharing
 

Definition at line 169 of file videodevice.h.

Referenced by initialize().

long VideoDevice::frame_delay
 

Definition at line 183 of file videodevice.h.

int VideoDevice::frame_in_capture_x1
 

Definition at line 191 of file videodevice.h.

Referenced by update_translation().

int VideoDevice::frame_in_capture_x2
 

Definition at line 191 of file videodevice.h.

Referenced by update_translation().

int VideoDevice::frame_in_capture_y1
 

Definition at line 191 of file videodevice.h.

Referenced by update_translation().

int VideoDevice::frame_in_capture_y2
 

Definition at line 191 of file videodevice.h.

Referenced by update_translation().

float VideoDevice::frame_rate
 

Definition at line 189 of file videodevice.h.

int VideoDevice::frame_resized
 

Definition at line 200 of file videodevice.h.

Referenced by initialize(), and update_translation().

VideoInConfig* VideoDevice::in_config
 

Definition at line 232 of file videodevice.h.

Referenced by VDeviceV4L::capture_frame(), VDeviceV4L::get_best_colormodel(), VDeviceBase::get_best_colormodel(), is_compressed(), VDeviceV4L::next_frame(), open_input(), VDeviceX11::open_input(), VDeviceV4L::open_input(), VDeviceLML::open_input(), VDeviceBUZ::open_input_core(), DV1394Input::run(), VDeviceBUZInput::start(), update_translation(), VDeviceV4L::v4l1_start_capture(), VDeviceV4L::v4l_init(), VideoDevice(), and ~VideoDevice().

VDeviceBase* VideoDevice::input_base
 

Definition at line 230 of file videodevice.h.

Referenced by close_all(), get_best_colormodel(), goose_input(), has_signal(), initialize(), interrupt_crash(), open_input(), read_buffer(), set_channel(), and set_picture().

ArrayList<Channel*> VideoDevice::input_sources
 

Definition at line 208 of file videodevice.h.

Referenced by close_all(), get_inputs(), new_input_source(), VDeviceBUZ::open_input_core(), VDeviceV4L::v4l1_get_inputs(), and ~VideoDevice().

int VideoDevice::input_x
 

Definition at line 195 of file videodevice.h.

Referenced by initialize(), VDeviceX11::read_buffer(), and update_translation().

int VideoDevice::input_y
 

Definition at line 195 of file videodevice.h.

Referenced by initialize(), VDeviceX11::read_buffer(), and update_translation().

float VideoDevice::input_z
 

Definition at line 196 of file videodevice.h.

Referenced by initialize(), and update_translation().

int VideoDevice::interrupt
 

Definition at line 160 of file videodevice.h.

Referenced by initialize(), interrupt_playback(), VRender::run(), start_playback(), and stop_playback().

float VideoDevice::irate
 

Definition at line 173 of file videodevice.h.

Referenced by initialize().

int VideoDevice::is_playing_back
 

Definition at line 163 of file videodevice.h.

Referenced by initialize(), start_playback(), and stop_playback().

int VideoDevice::is_recording
 

Definition at line 188 of file videodevice.h.

Referenced by initialize().

KeepaliveThread* VideoDevice::keepalive
 

Definition at line 234 of file videodevice.h.

Referenced by close_all(), get_failed(), initialize(), open_input(), and read_buffer().

int VideoDevice::latency_counter
 

Definition at line 202 of file videodevice.h.

Referenced by set_latency_counter().

MWindow* VideoDevice::mwindow
 

Definition at line 235 of file videodevice.h.

int VideoDevice::new_input_x
 

Definition at line 198 of file videodevice.h.

Referenced by update_translation().

int VideoDevice::new_input_y
 

Definition at line 198 of file videodevice.h.

Referenced by update_translation().

float VideoDevice::new_input_z
 

Definition at line 199 of file videodevice.h.

Referenced by update_translation().

int VideoDevice::odd_field_first
 

Definition at line 209 of file videodevice.h.

Referenced by VDeviceLML::read_buffer(), and VDeviceBUZ::read_buffer().

float VideoDevice::orate
 

Definition at line 173 of file videodevice.h.

Referenced by initialize(), and open_output().

VideoOutConfig* VideoDevice::out_config
 

Definition at line 233 of file videodevice.h.

Referenced by VDeviceX11::new_output_buffer(), open_output(), VDeviceLML::open_output(), VDeviceBUZ::open_output_core(), DV1394Input::run(), VideoDevice(), VDeviceX11::write_buffer(), VDeviceBUZ::write_buffer(), and ~VideoDevice().

int VideoDevice::out_h
 

Definition at line 179 of file videodevice.h.

Referenced by VDeviceX11::close_all(), initialize(), VDeviceX11::new_output_buffer(), VDeviceBUZ::new_output_buffer(), VDeviceBUZ::open_output_core(), and VDeviceBUZ::write_buffer().

int VideoDevice::out_w
 

Definition at line 179 of file videodevice.h.

Referenced by VDeviceX11::close_all(), initialize(), VDeviceX11::new_output_buffer(), VDeviceBUZ::new_output_buffer(), VDeviceBUZ::open_output_core(), and VDeviceBUZ::write_buffer().

VDeviceBase* VideoDevice::output_base
 

Definition at line 231 of file videodevice.h.

Referenced by close_all(), get_bitmap(), initialize(), new_output_buffers(), open_output(), output_visible(), set_channel(), start_playback(), stop_playback(), and write_buffer().

int VideoDevice::output_format
 

Definition at line 162 of file videodevice.h.

Referenced by initialize().

PictureConfig* VideoDevice::picture
 

Definition at line 223 of file videodevice.h.

Referenced by VDeviceV4L::open_input(), VDeviceBUZ::open_input(), Record::open_input_devices(), VideoDevice(), and ~VideoDevice().

int VideoDevice::picture_changed
 

Definition at line 222 of file videodevice.h.

Referenced by initialize(), and set_picture().

Mutex* VideoDevice::picture_lock
 

Definition at line 224 of file videodevice.h.

Referenced by set_picture(), VideoDevice(), and ~VideoDevice().

int VideoDevice::quality
 

Definition at line 211 of file videodevice.h.

Referenced by initialize(), VDeviceBUZ::open_input_core(), and VDeviceBUZ::write_buffer().

int VideoDevice::r
 

Definition at line 181 of file videodevice.h.

Referenced by close_all(), VDeviceLML::close_all(), VDeviceBUZ::close_input_core(), initialize(), open_input(), VDeviceBUZ::set_channel(), and VDeviceBUZ::set_picture().

Timer VideoDevice::rate_timer
 

Definition at line 177 of file videodevice.h.

int VideoDevice::sharing
 

Definition at line 167 of file videodevice.h.

Referenced by initialize().

Mutex* VideoDevice::sharing_lock
 

Definition at line 170 of file videodevice.h.

Referenced by initialize(), VideoDevice(), and ~VideoDevice().

int VideoDevice::single_frame
 

Definition at line 213 of file videodevice.h.

Referenced by VDeviceX11::close_all(), VDeviceX11::get_best_colormodel(), initialize(), VDeviceX11::open_output(), VDeviceX11::start_playback(), VDeviceX11::stop_playback(), and VDeviceX11::write_buffer().

int VideoDevice::swap_bytes
 

Definition at line 204 of file videodevice.h.

Referenced by initialize().

int VideoDevice::w
 

Definition at line 181 of file videodevice.h.

Referenced by close_all(), VDeviceLML::close_all(), VDeviceBUZ::close_output_core(), initialize(), open_output(), and VideoWindow::original_size().


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