#include <file.h>

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 () |
| FileThread * | get_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 () |
| FrameCache * | get_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 PackagingEngine * | new_packaging_engine (Asset *asset) |
Data Fields | |
| Asset * | asset |
| FileBase * | file |
| FileThread * | audio_thread |
| FileThread * | video_thread |
| VFrame * | temp_frame |
| Resample * | resample |
| Resample_float * | resample_float |
| Condition * | write_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 |
| Preferences * | preferences |
Private Member Functions | |
| void | reset_parameters () |
Private Attributes | |
| int | getting_options |
| BC_WindowBase * | format_window |
| Mutex * | format_completion |
| FrameCache * | frame_cache |
| int | use_cache |
Definition at line 29 of file file.h.
| File::File | ( | ) |
Definition at line 42 of file file.C.
References asset, cpus, format_completion, frame_cache, reset_parameters(), and write_lock.

| File::~File | ( | ) |
Definition at line 52 of file file.C.
References asset, close_file(), Garbage::delete_object(), format_completion, format_window, frame_cache, getting_options, Mutex::lock(), BC_WindowBase::set_done(), temp_frame, Mutex::unlock(), and write_lock.

| int File::get_options | ( | FormatTools * | format, | |
| int | audio_options, | |||
| int | video_options | |||
| ) |
Definition at line 113 of file file.C.
References _, FormatTools::asset, asset, ErrorBox::create_objects(), Asset::format, format_completion, format_window, BC_WindowBase::get_abs_cursor_x(), BC_WindowBase::get_abs_cursor_y(), FileOGG::get_parameters(), FileTIFF::get_parameters(), FileTGA::get_parameters(), FilePNG::get_parameters(), FileYUV::get_parameters(), FileEXR::get_parameters(), FileJPEG::get_parameters(), FileAVI::get_parameters(), FileMPEG::get_parameters(), FileMOV::get_parameters(), FileSndFile::get_parameters(), FileDV::get_parameters(), FileAC3::get_parameters(), getting_options, Mutex::lock(), FormatTools::locked_compressor, FormatTools::plugindb, BC_WindowBase::run_window(), Mutex::unlock(), and FormatTools::window.
Referenced by FormatVThread::run(), and FormatAThread::run().

| 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().

| 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().

| int File::set_processors | ( | int | cpus | ) |
Definition at line 270 of file file.C.
Referenced by CICacheItem::CICacheItem(), PackageRenderer::create_output(), Record::open_output_file(), and MenuEffectThread::run().
| 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().

| 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().

| int File::open_file | ( | Preferences * | preferences, | |
| Asset * | asset, | |||
| int | rd, | |||
| int | wr, | |||
| int64_t | base_samplerate, | |||
| float | base_framerate | |||
| ) |
Definition at line 317 of file file.C.
References FileMOV::check_sig(), FileMPEG::check_sig(), FileVorbis::check_sig(), FileOGG::check_sig(), FileTIFF::check_sig(), FileTGA::check_sig(), FileCR2::check_sig(), FileYUV::check_sig(), FileEXR::check_sig(), FileJPEG::check_sig(), FilePNG::check_sig(), FileSndFile::check_sig(), FileDV::check_sig(), Asset::copy_from(), Asset::dither, fclose(), file, fopen(), Asset::format, fread(), FileBase::open_file(), Asset::path, and FileBase::set_dither().
Referenced by MainIndexes::add_next_asset(), CICacheItem::CICacheItem(), PackageRenderer::create_output(), MWindow::load_filenames(), Record::open_output_file(), IndexFile::open_source(), PackagingEngineOGG::packages_are_done(), and MenuEffectThread::run().

| 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().

| 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().

| 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().

| 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().

| int File::stop_video_thread | ( | ) |
Definition at line 661 of file file.C.
References FileThread::stop_reading(), FileThread::stop_writing(), and video_thread.
Referenced by close_file(), PackageRenderer::direct_frame_copy(), VModule::import_frame(), VRender::process_buffer(), VEdit::read_frame(), RecordVideo::rewind_file(), RecordThread::run(), PackageRenderer::stop_output(), and VPluginArray::~VPluginArray().

| 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().

| FileThread * File::get_video_thread | ( | ) |
| int File::close_file | ( | int | ignore_thread = 0 |
) |
Definition at line 572 of file file.C.
References asset, Asset::audio_length, FileBase::close_file(), current_frame, current_sample, file, resample, resample_float, reset_parameters(), stop_audio_thread(), stop_video_thread(), Asset::video_length, and FileBase::wr.
Referenced by PackageRenderer::close_output(), Record::close_output_file(), IndexFile::create_index(), Record::init_next_file(), PackagingEngineOGG::packages_are_done(), MenuEffectThread::run(), SigHandler::signal_handler(), RecordEngine::start_over(), Record::start_over(), and ~File().

| int64_t File::get_audio_length | ( | int64_t | base_samplerate = -1 |
) |
Definition at line 707 of file file.C.
References asset, Asset::audio_length, and Asset::sample_rate.
Referenced by IndexFile::create_index(), ResourceThread::do_audio(), IndexFile::get_required_scale(), RecordEngine::initialize(), and RecordEngine::start_over().
| int64_t File::get_video_length | ( | float | base_framerate = -1 |
) |
Definition at line 721 of file file.C.
References asset, Asset::frame_rate, and Asset::video_length.
Referenced by VModule::import_frame(), RecordEngine::initialize(), and RecordEngine::start_over().
| int64_t File::get_audio_position | ( | int64_t | base_samplerate = -1 |
) |
Definition at line 744 of file file.C.
References asset, current_sample, normalized_sample, normalized_sample_rate, and Asset::sample_rate.
Referenced by Record::current_audio_position(), Resample_float::resample(), and Resample::resample().
| 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().

| 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().

| 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().

| 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().

| FrameCache * File::get_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().

| 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().

| int File::set_channel | ( | int | channel | ) |
Definition at line 678 of file file.C.
References current_channel, and file.
Referenced by IndexFile::create_index(), ResourceThread::do_audio(), ResourcePixmap::draw_audio_source(), and AModule::render().
| int File::set_audio_position | ( | int64_t | position, | |
| float | base_samplerate | |||
| ) |
Definition at line 765 of file file.C.
References asset, current_sample, file, normalized_sample, normalized_sample_rate, REPOSITION, resample, Resample::reset(), Units::round(), Asset::sample_rate, and FileBase::set_audio_position().
Referenced by IndexFile::create_index(), ResourceThread::do_audio(), ResourcePixmap::draw_audio_source(), Resample_float::read_chunk(), Resample::read_chunk(), AModule::render(), and Record::rewind_file().

| int File::read_samples | ( | double * | buffer, | |
| int64_t | len, | |||
| int64_t | base_samplerate, | |||
| float * | buffer_float = 0 | |||
| ) |
Definition at line 941 of file file.C.
References asset, Asset::audio_length, Asset::channels, current_channel, current_sample, file, normalized_sample, FileBase::prefer_samples_float(), FileBase::read_samples(), FileBase::read_samples_float(), Resample_float::resample(), Resample::resample(), resample, resample_float, and Asset::sample_rate.
Referenced by IndexFile::create_index(), ResourceThread::do_audio(), ResourcePixmap::draw_audio_source(), Resample_float::read_chunk(), Resample::read_chunk(), and AModule::render().

| int File::set_layer | ( | int | layer, | |
| int | is_thread = 0 | |||
| ) |
Definition at line 689 of file file.C.
References current_layer, file, FileThread::set_layer(), and video_thread.
Referenced by AssetPicon::create_objects(), ResourceThread::do_video(), VModule::import_frame(), VEdit::read_frame(), FileThread::read_frame(), and FileThread::run().

| int File::set_video_position | ( | int64_t | position, | |
| float | base_framerate = -1, |
|||
| int | is_thread = 0 | |||
| ) |
Definition at line 822 of file file.C.
References asset, current_frame, file, Asset::frame_rate, FileBase::set_video_position(), FileThread::set_video_position(), and video_thread.
Referenced by AssetPicon::create_objects(), ResourceThread::do_video(), RecordEngine::goto_next_label(), RecordEngine::goto_prev_label(), VModule::import_frame(), VRender::process_buffer(), VEdit::read_frame(), FileThread::read_frame(), RecordVideo::rewind_file(), Record::rewind_file(), and FileThread::run().
