File Class Reference

#include <file.h>

Collaboration diagram for File:

Collaboration graph
[legend]

Public Member Functions

 File ()
 ~File ()
int get_options (FormatTools *format, int audio_options, int video_options)
int raise_window ()
void close_window ()
int set_processors (int cpus)
int set_preload (int64_t size)
void set_subtitle (int value)
void set_interpolate_raw (int value)
void set_white_balance_raw (int value)
void set_asset (Asset *asset)
void set_cache_frames (int value)
int purge_cache ()
int open_file (Preferences *preferences, Asset *asset, int rd, int wr, int64_t base_samplerate, float base_framerate)
int get_index (char *index_path)
int start_audio_thread (int64_t buffer_size, int ring_buffers)
int stop_audio_thread ()
int start_video_thread (int64_t buffer_size, int color_model, int ring_buffers, int compressed)
int stop_video_thread ()
int start_video_decode_thread ()
FileThreadget_video_thread ()
int close_file (int ignore_thread=0)
int64_t get_audio_length (int64_t base_samplerate=-1)
int64_t get_video_length (float base_framerate=-1)
int64_t get_audio_position (int64_t base_samplerate=-1)
int64_t get_video_position (float base_framerate=-1)
int write_samples (double **buffer, int64_t len)
int write_frames (VFrame ***frames, int len)
double ** get_audio_buffer ()
VFrame *** get_video_buffer ()
FrameCacheget_frame_cache ()
int write_audio_buffer (int64_t len)
int write_video_buffer (int64_t len)
int set_channel (int channel)
int set_audio_position (int64_t position, float base_samplerate)
int read_samples (double *buffer, int64_t len, int64_t base_samplerate, float *buffer_float=0)
int set_layer (int layer, int is_thread=0)
int set_video_position (int64_t position, float base_framerate=-1, int is_thread=0)
int read_frame (VFrame *frame, int is_thread=0)
int can_copy_from (Edit *edit, int64_t position, int output_w, int output_h)
int get_render_strategy (ArrayList< int > *render_strategies)
int64_t compressed_frame_size ()
int read_compressed_frame (VFrame *buffer)
int write_compressed_frame (VFrame *buffer)
int get_best_colormodel (int driver)
int colormodel_supported (int colormodel)
int64_t get_memory_usage ()
int bytes_per_sample (int bits)

Static Public Member Functions

static int get_best_colormodel (Asset *asset, int driver)
static int supports_video (ArrayList< PluginServer * > *plugindb, char *format)
static int supports_audio (ArrayList< PluginServer * > *plugindb, char *format)
static char * get_tag (int format)
static int supports_video (int format)
static int supports_audio (int format)
static int strtoformat (char *format)
static char * formattostr (int format)
static int strtoformat (ArrayList< PluginServer * > *plugindb, char *format)
static char * formattostr (ArrayList< PluginServer * > *plugindb, int format)
static int strtobits (char *bits)
static char * bitstostr (int bits)
static int str_to_byteorder (char *string)
static char * byteorder_to_str (int byte_order)
static PackagingEnginenew_packaging_engine (Asset *asset)

Data Fields

Assetasset
FileBasefile
FileThreadaudio_thread
FileThreadvideo_thread
VFrametemp_frame
Resampleresample
Resample_floatresample_float
Conditionwrite_lock
int cpus
int64_t playback_preload
int playback_subtitle
int interpolate_raw
int white_balance_raw
int64_t current_sample
int64_t current_frame
int current_channel
int current_layer
int64_t normalized_sample
int64_t normalized_sample_rate
Preferencespreferences

Private Member Functions

void reset_parameters ()

Private Attributes

int getting_options
BC_WindowBaseformat_window
Mutexformat_completion
FrameCacheframe_cache
int use_cache

Detailed Description

Definition at line 29 of file file.h.


Constructor & Destructor Documentation

File::File (  ) 

Definition at line 42 of file file.C.

References asset, cpus, format_completion, frame_cache, reset_parameters(), and write_lock.

Here is the call graph for this function:

File::~File (  ) 


Member Function Documentation

int File::get_options ( FormatTools format,
int  audio_options,
int  video_options 
)

int File::raise_window (  ) 

Definition at line 92 of file file.C.

References BC_WindowBase::flush(), format_window, getting_options, and BC_WindowBase::raise_window().

Referenced by FormatTools::set_audio_options(), and FormatTools::set_video_options().

Here is the call graph for this function:

void File::close_window (  ) 

Definition at line 102 of file file.C.

References format_window, getting_options, BC_WindowBase::lock_window(), BC_WindowBase::set_done(), and BC_WindowBase::unlock_window().

Referenced by FormatTools::close_format_windows().

Here is the call graph for this function:

int File::set_processors ( int  cpus  ) 

int File::set_preload ( int64_t  size  ) 

Definition at line 276 of file file.C.

References playback_preload.

Referenced by CICacheItem::CICacheItem().

void File::set_subtitle ( int  value  ) 

Definition at line 282 of file file.C.

References playback_subtitle.

Referenced by CICacheItem::CICacheItem().

void File::set_interpolate_raw ( int  value  ) 

Definition at line 287 of file file.C.

References interpolate_raw.

Referenced by CICacheItem::CICacheItem().

void File::set_white_balance_raw ( int  value  ) 

Definition at line 292 of file file.C.

References white_balance_raw.

Referenced by CICacheItem::CICacheItem().

void File::set_asset ( Asset asset  ) 

Definition at line 265 of file file.C.

References Asset::copy_from().

Here is the call graph for this function:

void File::set_cache_frames ( int  value  ) 

Definition at line 297 of file file.C.

References use_cache.

Referenced by VModule::import_frame(), VRender::process_buffer(), and VEdit::read_frame().

int File::purge_cache (  ) 

Definition at line 302 of file file.C.

References CacheBase::delete_oldest(), and frame_cache.

Referenced by CICache::delete_oldest().

Here is the call graph for this function:

int File::open_file ( Preferences preferences,
Asset asset,
int  rd,
int  wr,
int64_t  base_samplerate,
float  base_framerate 
)

int File::get_index ( char *  index_path  ) 

Definition at line 602 of file file.C.

References file, and FileBase::get_index().

Referenced by MainIndexes::add_next_asset(), and IndexFile::create_index().

Here is the call graph for this function:

int File::start_audio_thread ( int64_t  buffer_size,
int  ring_buffers 
)

Definition at line 613 of file file.C.

References audio_thread, and FileThread::start_writing().

Referenced by APluginArray::create_buffers(), PackageRenderer::create_engine(), and RecordThread::run().

Here is the call graph for this function:

int File::stop_audio_thread (  ) 

Definition at line 650 of file file.C.

References audio_thread, and FileThread::stop_writing().

Referenced by close_file(), RecordThread::run(), PackageRenderer::stop_output(), and APluginArray::~APluginArray().

Here is the call graph for this function:

int File::start_video_thread ( int64_t  buffer_size,
int  color_model,
int  ring_buffers,
int  compressed 
)

Definition at line 623 of file file.C.

References FileThread::start_writing(), and video_thread.

Referenced by VPluginArray::create_buffers(), PackageRenderer::create_engine(), RecordVideo::rewind_file(), and RecordThread::run().

Here is the call graph for this function:

int File::stop_video_thread (  ) 

int File::start_video_decode_thread (  ) 

Definition at line 639 of file file.C.

References asset, Asset::format, FileThread::start_reading(), and video_thread.

Referenced by VModule::import_frame(), VRender::process_buffer(), and VEdit::read_frame().

Here is the call graph for this function:

FileThread * File::get_video_thread (  ) 

Definition at line 673 of file file.C.

References video_thread.

int File::close_file ( int  ignore_thread = 0  ) 

int64_t File::get_audio_length ( int64_t  base_samplerate = -1  ) 

int64_t File::get_video_length ( float  base_framerate = -1  ) 

int64_t File::get_audio_position ( int64_t  base_samplerate = -1  ) 

int64_t File::get_video_position ( float  base_framerate = -1  ) 

Definition at line 736 of file file.C.

References asset, current_frame, and Asset::frame_rate.

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

int File::write_samples ( double **  buffer,
int64_t  len 
)

Definition at line 854 of file file.C.

References asset, Asset::audio_length, current_sample, file, Condition::lock(), normalized_sample, Condition::unlock(), write_lock, and FileBase::write_samples().

Referenced by FileThread::run().

Here is the call graph for this function:

int File::write_frames ( VFrame ***  frames,
int  len 
)

Definition at line 872 of file file.C.

References asset, current_frame, file, Condition::lock(), Condition::unlock(), Asset::video_length, FileBase::write_frames(), and write_lock.

Referenced by PackageRenderer::direct_frame_copy(), and FileThread::run().

Here is the call graph for this function:

double ** File::get_audio_buffer (  ) 

Definition at line 928 of file file.C.

References audio_thread, and FileThread::get_audio_buffer().

Referenced by PackageRenderer::do_audio(), APluginArray::get_buffers(), APluginArray::process_loop(), RecordAudio::run(), and RecordAudio::write_buffer().

Here is the call graph for this function:

VFrame *** File::get_video_buffer (  ) 

Definition at line 934 of file file.C.

References FileThread::get_video_buffer(), and video_thread.

Referenced by VPluginArray::get_buffers(), VPluginArray::process_loop(), RecordVideo::rewind_file(), RecordVideo::run(), and RecordVideo::write_buffer().

Here is the call graph for this function:

FrameCache * File::get_frame_cache (  ) 

Definition at line 1484 of file file.C.

References frame_cache.

int File::write_audio_buffer ( int64_t  len  ) 

Definition at line 907 of file file.C.

References audio_thread, and FileThread::write_buffer().

Referenced by PackageRenderer::do_audio(), RecordAudio::write_buffer(), and APluginArray::write_buffers().

Here is the call graph for this function:

int File::write_video_buffer ( int64_t  len  ) 

Definition at line 917 of file file.C.

References video_thread, and FileThread::write_buffer().

Referenced by PackageRenderer::direct_frame_copy(), PackageRenderer::stop_output(), RecordVideo::write_buffer(), and VPluginArray::write_buffers().

Here is the call graph for this function:

int File::set_channel ( int  channel  ) 

int File::set_audio_position ( int64_t  position,
float  base_samplerate 
)

int File::read_samples ( double *  buffer,
int64_t  len,
int64_t  base_samplerate,
float *  buffer_float = 0 
)

int File::set_layer ( int  layer,
int  is_thread = 0 
)

int File::set_video_position ( int64_t  position,
float  base_framerate = -1,
int  is_thread = 0 
)

int File::read_frame ( VFrame frame,
int  is_thread = 0 
)

int File::can_copy_from ( Edit edit,
int64_t  position,
int  output_w,
int  output_h 
)

Definition at line 1129 of file file.C.

References Edit::asset, FileBase::can_copy_from(), file, Asset::height, and Asset::width.

Referenced by PackageRenderer::direct_copy_possible().

Here is the call graph for this function:

int File::get_render_strategy ( ArrayList< int > *  render_strategies  ) 

int64_t File::compressed_frame_size (  ) 

Definition at line 1028 of file file.C.

References FileBase::compressed_frame_size(), and file.

Here is the call graph for this function:

int File::read_compressed_frame ( VFrame buffer  ) 

Definition at line 1019 of file file.C.

References current_frame, file, and FileBase::read_compressed_frame().

Here is the call graph for this function:

int File::write_compressed_frame ( VFrame buffer  ) 

Definition at line 895 of file file.C.

References asset, current_frame, file, Condition::lock(), Condition::unlock(), Asset::video_length, FileBase::write_compressed_frame(), and write_lock.

Referenced by FileThread::run().

Here is the call graph for this function:

int File::get_best_colormodel ( int  driver  ) 

int File::get_best_colormodel ( Asset asset,
int  driver 
) [static]

int File::colormodel_supported ( int  colormodel  ) 

Definition at line 1463 of file file.C.

References BC_RGB888, FileBase::colormodel_supported(), and file.

Referenced by read_frame().

Here is the call graph for this function:

int64_t File::get_memory_usage (  ) 

int File::supports_video ( ArrayList< PluginServer * > *  plugindb,
char *  format 
) [static]

Definition at line 1489 of file file.C.

References strtoformat().

Referenced by Render::check_asset(), FormatCheck::check_format(), and MenuVEffectThread::get_derived_attributes().

Here is the call graph for this function:

int File::supports_audio ( ArrayList< PluginServer * > *  plugindb,
char *  format 
) [static]

Definition at line 1497 of file file.C.

References strtoformat().

Referenced by Render::check_asset(), FormatCheck::check_format(), and MenuAEffectThread::get_derived_attributes().

Here is the call graph for this function:

char * File::get_tag ( int  format  )  [static]

Definition at line 1569 of file file.C.

Referenced by FormatTools::update_extension().

int File::supports_video ( int  format  )  [static]

Definition at line 1506 of file file.C.

int File::supports_audio ( int  format  )  [static]

Definition at line 1541 of file file.C.

int File::strtoformat ( char *  format  )  [static]

char * File::formattostr ( int  format  )  [static]

int File::strtoformat ( ArrayList< PluginServer * > *  plugindb,
char *  format 
) [static]

Definition at line 1149 of file file.C.

References _, PNG_NAME, and VORBIS_NAME.

char * File::formattostr ( ArrayList< PluginServer * > *  plugindb,
int  format 
) [static]

Definition at line 1218 of file file.C.

References _, PNG_NAME, and VORBIS_NAME.

int File::strtobits ( char *  bits  )  [static]

Definition at line 1319 of file file.C.

References _.

Referenced by BitsPopupText::handle_event().

char * File::bitstostr ( int  bits  )  [static]

int File::str_to_byteorder ( char *  string  )  [static]

Definition at line 1367 of file file.C.

References _.

Referenced by ByteOrderText::handle_event().

char * File::byteorder_to_str ( int  byte_order  )  [static]

Definition at line 1373 of file file.C.

References _.

Referenced by ByteOrderPopup::create_objects().

int File::bytes_per_sample ( int  bits  ) 

PackagingEngine * File::new_packaging_engine ( Asset asset  )  [static]

Definition at line 1600 of file file.C.

References Asset::format.

Referenced by PackageDispatcher::create_packages().

void File::reset_parameters (  )  [private]


Field Documentation

Definition at line 212 of file file.h.

Referenced by get_memory_usage(), read_frame(), reset_parameters(), and ~File().

Definition at line 215 of file file.h.

Referenced by close_file(), read_samples(), reset_parameters(), and set_audio_position().

Definition at line 216 of file file.h.

Referenced by close_file(), read_samples(), and reset_parameters().

Definition at line 220 of file file.h.

Referenced by File(), write_compressed_frame(), write_frames(), write_samples(), and ~File().

Definition at line 222 of file file.h.

Referenced by set_preload().

Definition at line 223 of file file.h.

Referenced by FileMPEG::open_file(), reset_parameters(), and set_subtitle().

Definition at line 224 of file file.h.

Referenced by FileCR2::read_frame(), reset_parameters(), and set_interpolate_raw().

Definition at line 225 of file file.h.

Referenced by FileCR2::read_frame(), and set_white_balance_raw().

Definition at line 238 of file file.h.

Referenced by get_audio_position(), reset_parameters(), and set_audio_position().

Definition at line 239 of file file.h.

Referenced by FileMPEG::create_index(), and reset_parameters().

int File::getting_options [private]

Definition at line 246 of file file.h.

Referenced by close_window(), get_options(), raise_window(), reset_parameters(), and ~File().

Definition at line 247 of file file.h.

Referenced by close_window(), get_options(), raise_window(), reset_parameters(), and ~File().

Definition at line 248 of file file.h.

Referenced by File(), get_options(), and ~File().

Definition at line 249 of file file.h.

Referenced by File(), get_frame_cache(), get_memory_usage(), purge_cache(), read_frame(), and ~File().

int File::use_cache [private]

Definition at line 251 of file file.h.

Referenced by read_frame(), reset_parameters(), and set_cache_frames().


The documentation for this class was generated from the following files:

Generated on Mon Apr 28 14:24:46 2008 for Cinelerra by  doxygen 1.5.5