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

Record Class Reference

#include <record.h>

List of all members.

Public Member Functions

 Record (MWindow *mwindow, RecordMenuItem *menu_item)
 ~Record ()
void run ()
int load_defaults ()
int save_defaults ()
Batchnew_batch ()
void delete_batch ()
void activate_batch (int number, int stop_operation)
void change_editing_batch (int number)
void close_output_file ()
void delete_batch (int number)
void swap_batches (int number1, int number2)
void get_audio_write_length (int &buffer_size, int &fragment_size)
int open_input_devices (int duplex, int context)
int close_input_devices ()
void start_file_threads ()
int start_recording (int duplex, int context)
int record_frame ()
int start_monitor ()
int pause_monitor ()
int resume_monitor ()
int stop_operation (int resume_monitor)
int stop_duplex ()
void stop_file_threads ()
int stop_monitor ()
int get_in_length ()
int set_video_picture ()
void set_translation (int x, int y)
int set_channel (int channel)
void set_channel (Channel *channel)
int has_signal ()
void toggle_label ()
void configure_batches ()
void source_to_text (char *string, Batch *batch)
int open_output_file ()
int delete_output_file ()
int init_next_file ()
void rewind_file ()
ArrayList< Channel * > * get_video_inputs ()
char * get_channeldb_prefix ()
int get_next_batch ()
Batchget_current_batch ()
Batchget_editing_batch ()
char * current_mode ()
char * current_source ()
int get_current_channel ()
int get_editing_channel ()
void get_current_time (double &seconds, int &day)
Channelget_current_channel_struct ()
char * current_news ()
double * current_start ()
double * current_duration ()
Assetcurrent_asset ()
int * current_offset_type ()
int64_t sync_position ()
double current_display_position ()
int64_t current_audio_position ()
int64_t current_duration_samples ()
int64_t current_video_position ()
int64_t current_duration_frames ()
int64_t batch_video_offset ()
void start_over ()
int set_script (FileXML *script)
int run_script (Asset *asset, int &do_audio, int &do_video)
int save_engine_defaults ()
float get_min_db ()
int get_samplerate ()
float get_framerate ()
int get_everyframe ()
int get_time_format ()
int get_realtime ()
float get_frame_rate ()
char * get_in_path ()
char * get_video_inpath ()
int get_video_driver ()
int get_vu_format ()
int get_rec_mode ()
int set_rec_mode (int value)
int set_loop_duration (int64_t value)
int use_floatingpoint ()
int get_out_length ()
int64_t get_out_buffersize ()
int get_software_positioning ()
int64_t get_in_buffersize ()
int get_video_buffersize ()
int get_video_capturesize ()
int get_meter_over_hold (int divisions)
int get_meter_peak_hold (int divisions)
int get_meter_speed ()
int64_t get_playback_buffer ()
int enable_duplex ()

Public Attributes

Assetdefault_asset
ArrayList< Batch * > batches
int load_mode
int do_audio
int do_video
int monitor_audio
int monitor_video
int video_window_open
int prompt_cancel
int fixed_compression
int current_batch
int editing_batch
ChannelDBchanneldb
Channelmaster_channel
LoadModeloadmode
MWindowmwindow
RecordGUIrecord_gui
RecordMonitorrecord_monitor
RecordThreadmonitor_engine
RecordThreadrecord_engine
AudioDeviceadevice
VideoDevicevdevice
Filefile
PlaybackEngineduplex_engine
RecordWindowrecord_window
Timer monitor_timer
int capture_state
int video_x
int video_y
float video_zoom
int reverse_interlace
int color_model
PictureConfigpicture
int fill_frames
EDLedl
Mutex * window_lock
int current_channel
FileXMLscript
RecordMenuItemmenu_item
int realtime
int to_tracks
int64_t loop_duration
int64_t startsource_sample
int64_t endsource_sample
int64_t startsource_frame
int64_t endsource_frame
int64_t dc_offset [MAXCHANNELS]
int append_to_file
int record_mode
int frame_w
int frame_h
int video_window_w
int cpus


Detailed Description

Definition at line 49 of file record.h.


Constructor & Destructor Documentation

Record::Record MWindow mwindow,
RecordMenuItem menu_item
 

Definition at line 108 of file record.C.

References adevice, capture_state, channeldb, current_batch, editing_batch, file, master_channel, picture, script, vdevice, and window_lock.

Record::~Record  ) 
 

Definition at line 126 of file record.C.

References channeldb, master_channel, picture, and window_lock.


Member Function Documentation

void Record::activate_batch int  number,
int  stop_operation
 

Definition at line 573 of file record.C.

References Batch::calculate_news(), close_output_file(), current_batch, current_display_position(), get_current_batch(), record_gui, stop_operation(), RecordGUI::update_batch_tools(), RecordGUI::update_batches(), and RecordGUI::update_position().

Referenced by delete_batch(), RecordGUIActivateBatch::handle_event(), and RecordThread::run().

int64_t Record::batch_video_offset  ) 
 

Definition at line 847 of file record.C.

References default_asset, Batch::file_offset, Asset::frame_rate, and get_current_batch().

void Record::change_editing_batch int  number  ) 
 

Definition at line 616 of file record.C.

References editing_batch, record_gui, and RecordGUI::update_batch_tools().

Referenced by RecordGUIBatches::selection_changed().

int Record::close_input_devices  ) 
 

Definition at line 1070 of file record.C.

References adevice, AudioDevice::close_all(), VideoDevice::close_all(), and vdevice.

Referenced by RecordThread::pause_recording(), and RecordThread::run().

void Record::close_output_file  ) 
 

Definition at line 777 of file record.C.

References File::close_file(), file, mwindow, SigHandler::pull_file(), and MWindow::sighandler.

Referenced by activate_batch(), and run().

void Record::configure_batches  ) 
 

Definition at line 292 of file record.C.

References batches, Batch::calculate_news(), Asset::copy_format(), default_asset, Batch::get_current_asset(), and Asset::path.

Referenced by run().

Asset * Record::current_asset  ) 
 

Definition at line 902 of file record.C.

References batches, and current_batch.

int64_t Record::current_audio_position  ) 
 

Definition at line 853 of file record.C.

References default_asset, file, Batch::file_offset, File::get_audio_position(), get_current_batch(), and Asset::sample_rate.

double Record::current_display_position  ) 
 

Definition at line 876 of file record.C.

References Batch::current_frame, Batch::current_sample, default_asset, Batch::file_offset, Asset::frame_rate, get_current_batch(), Asset::sample_rate, and Asset::video_data.

Referenced by activate_batch(), RecordThread::do_cron(), RecordVideo::run(), RecordAudio::run(), and toggle_label().

double * Record::current_duration  ) 
 

Definition at line 932 of file record.C.

References batches, and current_batch.

Referenced by RecordVideo::run(), and RecordAudio::run().

int64_t Record::current_duration_frames  ) 
 

Definition at line 942 of file record.C.

References batches, current_batch, default_asset, and Asset::frame_rate.

int64_t Record::current_duration_samples  ) 
 

Definition at line 937 of file record.C.

References batches, current_batch, default_asset, and Asset::sample_rate.

char * Record::current_mode  ) 
 

Definition at line 842 of file record.C.

References get_current_batch(), Batch::mode_to_text(), and record_mode.

char * Record::current_news  ) 
 

Definition at line 897 of file record.C.

References batches, and current_batch.

int * Record::current_offset_type  ) 
 

Definition at line 947 of file record.C.

References batches, and current_batch.

char * Record::current_source  ) 
 

Definition at line 892 of file record.C.

References get_current_batch(), and Batch::get_source_text().

double * Record::current_start  ) 
 

Definition at line 907 of file record.C.

References batches, and current_batch.

int64_t Record::current_video_position  ) 
 

Definition at line 863 of file record.C.

References default_asset, file, Batch::file_offset, Asset::frame_rate, get_current_batch(), File::get_video_position(), and Asset::sample_rate.

void Record::delete_batch int  number  ) 
 

void Record::delete_batch  ) 
 

Definition at line 588 of file record.C.

References activate_batch(), batches, current_batch, editing_batch, record_gui, and RecordGUI::update_batch_tools().

Referenced by RecordGUIDeleteBatch::handle_event().

int Record::delete_output_file  ) 
 

Definition at line 643 of file record.C.

References _, fclose(), file, fopen(), Batch::get_current_asset(), get_current_batch(), Batch::news, Asset::path, record_gui, remove(), and RecordGUI::update_batches().

Referenced by open_output_file(), RecordThread::run(), and start_recording().

int Record::enable_duplex  ) 
 

Definition at line 1303 of file record.C.

References MWindow::edl, EDLSession::enable_duplex, mwindow, and EDL::session.

Referenced by RecordEngine::get_duplex_enable(), and RecordEngine::start_saving().

void Record::get_audio_write_length int &  buffer_size,
int &  fragment_size
 

Definition at line 797 of file record.C.

References CLAMP, default_asset, MWindow::edl, mwindow, EDLSession::record_speed, EDLSession::record_write_length, Asset::sample_rate, and EDL::session.

Referenced by RecordAudio::arm_recording(), and RecordThread::run().

char * Record::get_channeldb_prefix  ) 
 

Definition at line 325 of file record.C.

References VideoInConfig::driver, MWindow::edl, mwindow, EDL::session, and EDLSession::vconfig_in.

Referenced by run(), and ChannelEditThread::run().

Batch * Record::get_current_batch  ) 
 

Definition at line 812 of file record.C.

References batches, and current_batch.

Referenced by activate_batch(), batch_video_offset(), Batch::calculate_news(), current_audio_position(), current_display_position(), current_mode(), current_source(), current_video_position(), delete_output_file(), RecordThread::do_cron(), get_current_channel(), init_next_file(), open_output_file(), RecordVideo::rewind_file(), rewind_file(), RecordVideo::run(), RecordThread::run(), RecordAudio::run(), start_over(), RecordAudio::sync_position(), toggle_label(), and RecordGUI::update_labels().

int Record::get_current_channel  ) 
 

Definition at line 912 of file record.C.

References Batch::channel, and get_current_batch().

Referenced by get_current_channel_struct(), and open_input_devices().

Channel * Record::get_current_channel_struct  ) 
 

Definition at line 922 of file record.C.

References channeldb, ChannelDB::get(), get_current_channel(), and ChannelDB::size().

Referenced by ChannelPicker::get_current_channel_struct().

void Record::get_current_time double &  seconds,
int &  day
 

Definition at line 1251 of file record.C.

Referenced by RecordThread::do_cron(), and RecordThread::run().

Batch * Record::get_editing_batch  ) 
 

Definition at line 832 of file record.C.

References batches, and editing_batch.

Referenced by get_editing_channel(), RecordMode::handle_event(), RecordPath::handle_event(), new_batch(), ChannelEditThread::run(), set_channel(), and RecordGUI::update_batch_tools().

int Record::get_editing_channel  ) 
 

Definition at line 917 of file record.C.

References Batch::channel, and get_editing_batch().

Referenced by ChannelPicker::get_current_channel_number().

int Record::get_everyframe  ) 
 

Definition at line 1294 of file record.C.

References MWindow::edl, mwindow, EDL::session, and EDLSession::video_every_frame.

float Record::get_frame_rate  ) 
 

Definition at line 1275 of file record.C.

Referenced by RecordEngine::get_frame_rate().

float Record::get_framerate  ) 
 

Referenced by RecordEngine::goto_next_label(), RecordEngine::goto_prev_label(), RecordEngine::initialize(), and RecordEngine::start_over().

int64_t Record::get_in_buffersize  ) 
 

Definition at line 1299 of file record.C.

References MWindow::edl, mwindow, EDLSession::record_write_length, and EDL::session.

int Record::get_in_length  ) 
 

Definition at line 1190 of file record.C.

References default_asset, MWindow::edl, mwindow, EDLSession::record_speed, Asset::sample_rate, and EDL::session.

Referenced by open_input_devices().

char* Record::get_in_path  ) 
 

int Record::get_meter_over_hold int  divisions  ) 
 

int Record::get_meter_peak_hold int  divisions  ) 
 

int Record::get_meter_speed  ) 
 

Definition at line 1301 of file record.C.

References MWindow::edl, mwindow, EDLSession::record_speed, and EDL::session.

Referenced by RecordEngine::get_in_length(), and RecordEngine::get_meter_speed().

float Record::get_min_db  ) 
 

Definition at line 1288 of file record.C.

References MWindow::edl, EDLSession::min_meter_db, mwindow, and EDL::session.

Referenced by RecordEngine::get_min_db().

int Record::get_next_batch  ) 
 

Definition at line 820 of file record.C.

References batches, and current_batch.

Referenced by RecordThread::run().

int64_t Record::get_out_buffersize  ) 
 

Definition at line 1298 of file record.C.

References MWindow::edl, mwindow, EDLSession::playback_buffer, and EDL::session.

int Record::get_out_length  ) 
 

Definition at line 1296 of file record.C.

References MWindow::edl, mwindow, EDLSession::playback_buffer, and EDL::session.

int64_t Record::get_playback_buffer  ) 
 

Definition at line 1304 of file record.C.

References MWindow::edl, mwindow, EDLSession::playback_buffer, and EDL::session.

int Record::get_realtime  ) 
 

Definition at line 1300 of file record.C.

References realtime.

int Record::get_rec_mode  ) 
 

Definition at line 1290 of file record.C.

References record_mode.

int Record::get_samplerate  ) 
 

Referenced by RecordEngine::absolute_monitor_position(), RecordEngine::absolute_preview_position(), RecordEngine::absolute_record_position(), RecordEngine::goto_next_label(), RecordEngine::goto_prev_label(), RecordEngine::initialize(), RecordEngine::run_script(), and RecordEngine::set_loop_duration().

int Record::get_software_positioning  ) 
 

Definition at line 1297 of file record.C.

References MWindow::edl, mwindow, EDLSession::record_software_position, and EDL::session.

Referenced by RecordEngine::open_input_devices(), and RecordEngine::open_output_devices().

int Record::get_time_format  ) 
 

Definition at line 1270 of file record.C.

References MWindow::edl, mwindow, EDL::session, and EDLSession::time_format.

Referenced by RecordEngine::get_time_format().

int Record::get_video_buffersize  ) 
 

Definition at line 1293 of file record.C.

References MWindow::edl, mwindow, EDL::session, and EDLSession::video_write_length.

int Record::get_video_capturesize  ) 
 

int Record::get_video_driver  ) 
 

char* Record::get_video_inpath  ) 
 

ArrayList< Channel * > * Record::get_video_inputs  ) 
 

Definition at line 952 of file record.C.

References default_asset, VideoDevice::get_inputs(), vdevice, and Asset::video_data.

Referenced by ChannelPicker::get_video_inputs().

int Record::get_vu_format  ) 
 

Definition at line 1287 of file record.C.

References MWindow::edl, EDLSession::meter_format, mwindow, and EDL::session.

Referenced by RecordEngine::get_vu_format().

int Record::has_signal  ) 
 

Definition at line 1245 of file record.C.

References VideoDevice::has_signal(), and vdevice.

Referenced by ChannelPicker::has_signal().

int Record::init_next_file  ) 
 

Definition at line 716 of file record.C.

References Batch::assets, File::close_file(), Batch::current_asset, default_asset, file, get_current_batch(), mwindow, open_output_file(), Asset::path, SigHandler::pull_file(), and MWindow::sighandler.

int Record::load_defaults  ) 
 

Definition at line 135 of file record.C.

References EDLSession::aconfig_in, Batch::assets, Batch::channel, Asset::channels, dc_offset, default_asset, MWindow::defaults, VideoInConfig::driver, Batch::duration, MWindow::edl, Batch::enabled, fill_frames, Asset::frame_rate, VideoInConfig::h, Asset::height, VideoInConfig::in_framerate, AudioInConfig::in_samplerate, Asset::layers, PictureConfig::load_defaults(), Asset::load_defaults(), load_mode, MAXCHANNELS, monitor_audio, monitor_video, mwindow, new_batch(), Asset::path, picture, Batch::record_mode, reverse_interlace, Asset::sample_rate, EDL::session, Batch::start_day, Batch::start_time, Batch::start_type, Asset::vcodec, EDLSession::vconfig_in, video_window_open, video_x, video_y, video_zoom, VideoInConfig::w, and Asset::width.

Referenced by run().

Batch * Record::new_batch  ) 
 

Definition at line 622 of file record.C.

References batches, Batch::calculate_news(), Asset::copy_format(), Batch::copy_from(), Batch::create_default_path(), Batch::create_objects(), default_asset, editing_batch, Batch::get_current_asset(), get_editing_batch(), mwindow, record_gui, and RecordGUI::update_batch_tools().

Referenced by RecordGUINewBatch::handle_event(), and load_defaults().

int Record::open_input_devices int  duplex,
int  context
 

Definition at line 979 of file record.C.

References EDLSession::aconfig_duplex, EDLSession::aconfig_in, adevice, Asset::audio_data, VideoDevice::channel, Asset::channels, color_model, PictureConfig::copy_usage(), Channel::copy_usage(), dc_offset, default_asset, Asset::dither, MWindow::edl, Asset::frame_rate, VideoDevice::get_best_colormodel(), get_current_channel(), get_in_length(), AudioInConfig::is_duplex(), Asset::jpeg_quality, master_channel, mwindow, AudioDevice::open_duplex(), VideoDevice::open_input(), AudioDevice::open_input(), AudioDevice::open_output(), VideoDevice::picture, picture, Tracks::playable_audio_tracks(), EDLSession::playback_buffer, EDLSession::real_time_playback, EDLSession::record_software_position, reverse_interlace, Asset::sample_rate, EDL::session, VideoDevice::set_adevice(), set_channel(), AudioDevice::set_dc_offset(), VideoDevice::set_field_order(), VideoDevice::set_quality(), AudioDevice::set_record_dither(), AudioDevice::set_software_positioning(), AudioDevice::set_vdevice(), EDL::tracks, EDLSession::vconfig_in, vdevice, Asset::video_data, video_x, video_y, and video_zoom.

Referenced by resume_monitor(), RecordThread::run(), start_monitor(), and start_recording().

int Record::open_output_file  ) 
 

Definition at line 676 of file record.C.

References Batch::calculate_news(), default_asset, IndexFile::delete_index(), delete_output_file(), file, Asset::frame_rate, Batch::get_current_asset(), get_current_batch(), mwindow, File::open_file(), MWindow::preferences, Preferences::processors, SigHandler::push_file(), record_gui, Asset::sample_rate, File::set_processors(), MWindow::sighandler, and RecordGUI::update_batches().

Referenced by init_next_file(), and RecordThread::run().

int Record::pause_monitor  ) 
 

Definition at line 1143 of file record.C.

References capture_state, monitor_engine, and RecordThread::pause_recording().

Referenced by start_recording().

int Record::record_frame  ) 
 

int Record::resume_monitor  ) 
 

Definition at line 1152 of file record.C.

References capture_state, monitor_engine, monitor_timer, open_input_devices(), and RecordThread::resume_recording().

Referenced by RecordThread::run().

void Record::rewind_file  ) 
 

Definition at line 739 of file record.C.

References Asset::audio_data, Batch::current_frame, Batch::current_sample, default_asset, file, Asset::frame_rate, get_current_batch(), record_gui, File::set_audio_position(), File::set_video_position(), RecordGUI::update_position(), and Asset::video_data.

Referenced by RecordThread::run().

void Record::run  ) 
 

Definition at line 347 of file record.C.

References _, EDLSession::aspect_h, EDLSession::aspect_w, MWindow::asset_to_edl(), Batch::assets, batches, channeldb, FormatCheck::check_format(), MWindow::clear(), close_output_file(), configure_batches(), EDL::copy_session(), EDL::create_objects(), RecordWindow::create_objects(), current_batch, RecordMenuItem::current_state, default_asset, VideoInConfig::driver, editing_batch, edl, MWindow::edl, fixed_compression, get_channeldb_prefix(), Batch::get_current_asset(), VideoDevice::get_vcodec(),