#include <filebase.h>
Inherited by FileAC3, FileAVI, FileCR2, FileDV, FileGIF, FileList, FileMOV, FileMPEG, FileOGG, FileSndFile, FileVorbis, and FileYUV.

Public Member Functions | |
| FileBase (Asset *asset, File *file) | |
| virtual | ~FileBase () |
| int | get_mode (char *mode, int rd, int wr) |
| int | reset_parameters () |
| virtual void | get_parameters (BC_WindowBase *parent_window, Asset *asset, BC_WindowBase **format_window, int audio_options, int video_options, int lock_compressor) |
| virtual int | get_index (char *index_path) |
| virtual int | check_header () |
| virtual int | reset_parameters_derived () |
| virtual int | read_header () |
| virtual int | open_file (int rd, int wr) |
| virtual int | close_file () |
| virtual int | close_file_derived () |
| int | set_dither () |
| virtual int | seek_end () |
| virtual int | seek_start () |
| virtual int64_t | get_video_position () |
| virtual int64_t | get_audio_position () |
| virtual int | set_video_position (int64_t x) |
| virtual int | set_audio_position (int64_t x) |
| virtual int64_t | get_memory_usage () |
| virtual int | write_samples (double **buffer, int64_t len) |
| virtual int | write_frames (VFrame ***frames, int len) |
| virtual int | read_compressed_frame (VFrame *buffer) |
| virtual int | write_compressed_frame (VFrame *buffers) |
| virtual int64_t | compressed_frame_size () |
| virtual int | read_samples (double *buffer, int64_t len) |
| virtual int | prefer_samples_float () |
| virtual int | read_samples_float (float *buffer, int64_t len) |
| virtual int | read_frame (VFrame *frame) |
| virtual int | colormodel_supported (int colormodel) |
| virtual int | can_copy_from (Edit *edit, int64_t position) |
| virtual int | get_render_strategy (ArrayList< int > *render_strategies) |
Protected Member Functions | |
| int64_t | samples_to_raw (char *out_buffer, float **in_buffer, int64_t input_len, int bits, int channels, int byte_order, int signed_) |
| int | raw_to_samples (float *out_buffer, char *in_buffer, int64_t samples, int bits, int channels, int channel, int feather, float lfeather_len, float lfeather_gain, float lfeather_slope) |
| int | overlay_float_buffer (float *out_buffer, float *in_buffer, int64_t samples, float lfeather_len, float lfeather_gain, float lfeather_slope) |
| int64_t | frame_to_raw (unsigned char *out_buffer, VFrame *in_frame, int w, int h, int use_alpha, int use_float, int color_model) |
| int | get_audio_buffer (char **buffer, int64_t len, int64_t bits, int64_t channels) |
| int | get_float_buffer (float **buffer, int64_t len) |
| int | get_video_buffer (unsigned char **buffer, int depth) |
| int | get_row_pointers (unsigned char *buffer, unsigned char ***pointers, int depth) |
| int64_t | ima4_samples_to_bytes (int64_t samples, int channels) |
| int64_t | ima4_bytes_to_samples (int64_t bytes, int channels) |
Static Protected Member Functions | |
| static int | search_render_strategies (ArrayList< int > *render_strategies, int render_strategy) |
| static int | match4 (char *in, char *out) |
Protected Attributes | |
| char * | audio_buffer_in |
| char * | audio_buffer_out |
| float * | float_buffer |
| unsigned char * | video_buffer_in |
| unsigned char * | video_buffer_out |
| unsigned char ** | row_pointers_in |
| unsigned char ** | row_pointers_out |
| int64_t | prev_buffer_position |
| int64_t | prev_frame_position |
| int64_t | prev_bytes |
| int64_t | prev_len |
| int | prev_track |
| int | prev_layer |
| Asset * | asset |
| int | wr |
| int | rd |
| int | dither |
| int | internal_byte_order |
| File * | file |
Private Member Functions | |
| float | ulawtofloat (char ulaw) |
| char | floattoulaw (float value) |
| int | generate_ulaw_tables () |
| int | delete_ulaw_tables () |
| int | init_ima4 () |
| int | delete_ima4 () |
| int | ima4_decode_block (int16_t *output, unsigned char *input) |
| int | ima4_decode_sample (int *predictor, int nibble, int *index, int *step) |
| int | ima4_encode_block (unsigned char *output, int16_t *input, int step, int channel) |
| int | ima4_encode_sample (int *last_sample, int *last_index, int *nibble, int next_sample) |
Private Attributes | |
| float * | ulawtofloat_table |
| float * | ulawtofloat_ptr |
| unsigned char * | floattoulaw_table |
| unsigned char * | floattoulaw_ptr |
| int * | last_ima4_samples |
| int * | last_ima4_indexes |
| int | ima4_block_size |
| int | ima4_block_samples |
| OverlayFrame * | overlayer |
Static Private Attributes | |
| static int | ima4_step [89] |
| static int | ima4_index [16] |
Friends | |
| class | File |
| class | FileList |
| class | FrameWriter |
Definition at line 18 of file filebase.h.
Definition at line 12 of file filebase.C.
References get_byte_order(), init_ima4(), internal_byte_order, overlayer, and reset_parameters().

| FileBase::~FileBase | ( | ) | [virtual] |
Definition at line 22 of file filebase.C.
References audio_buffer_in, audio_buffer_out, delete_ima4(), float_buffer, overlayer, row_pointers_in, row_pointers_out, video_buffer_in, and video_buffer_out.

| int FileBase::get_mode | ( | char * | mode, | |
| int | rd, | |||
| int | wr | |||
| ) |
Definition at line 79 of file filebase.C.
References asset, fclose(), fopen(), and Asset::path.

| int FileBase::reset_parameters | ( | ) |
Definition at line 55 of file filebase.C.
References audio_buffer_in, audio_buffer_out, delete_ulaw_tables(), dither, float_buffer, floattoulaw_table, prev_buffer_position, prev_bytes, prev_frame_position, prev_layer, prev_len, prev_track, rd, reset_parameters_derived(), row_pointers_in, row_pointers_out, ulawtofloat_table, video_buffer_in, video_buffer_out, and wr.
Referenced by FileVorbis::close_file(), FileMPEG::close_file(), FileMOV::close_file(), FileList::close_file(), close_file(), FileAC3::close_file(), FileGIF::close_file_derived(), FileAC3::FileAC3(), FileBase(), FileGIF::FileGIF(), FileList::FileList(), FileMOV::FileMOV(), FileMPEG::FileMPEG(), FileOGG::FileOGG(), and FileVorbis::FileVorbis().

| virtual void FileBase::get_parameters | ( | BC_WindowBase * | parent_window, | |
| Asset * | asset, | |||
| BC_WindowBase ** | format_window, | |||
| int | audio_options, | |||
| int | video_options, | |||
| int | lock_compressor | |||
| ) | [inline, virtual] |
Definition at line 37 of file filebase.h.
| virtual int FileBase::get_index | ( | char * | index_path | ) | [inline, virtual] |
Reimplemented in FileMPEG.
Definition at line 46 of file filebase.h.
Referenced by File::get_index().
| virtual int FileBase::check_header | ( | ) | [inline, virtual] |
Definition at line 47 of file filebase.h.
| virtual int FileBase::reset_parameters_derived | ( | ) | [inline, virtual] |
Reimplemented in FileAC3, FileDV, FileGIF, FileList, FileMOV, FileMPEG, FileOGG, and FileVorbis.
Definition at line 48 of file filebase.h.
Referenced by reset_parameters().
| virtual int FileBase::read_header | ( | ) | [inline, virtual] |
| virtual int FileBase::open_file | ( | int | rd, | |
| int | wr | |||
| ) | [inline, virtual] |
Reimplemented in FileAC3, FileAVI, FileCR2, FileDV, FileGIF, FileList, FileMOV, FileMPEG, FileOGG, FileSndFile, FileVorbis, and FileYUV.
Definition at line 50 of file filebase.h.
Referenced by File::open_file().
| int FileBase::close_file | ( | ) | [virtual] |
Reimplemented in FileAC3, FileAVI, FileCR2, FileList, FileMOV, FileMPEG, FileOGG, FileSndFile, FileVorbis, and FileYUV.
Definition at line 35 of file filebase.C.
References audio_buffer_in, audio_buffer_out, close_file_derived(), delete_ima4(), float_buffer, reset_parameters(), row_pointers_in, row_pointers_out, video_buffer_in, and video_buffer_out.
Referenced by FileVorbis::close_file(), FileSndFile::close_file(), FileMPEG::close_file(), FileMOV::close_file(), FileList::close_file(), FileAC3::close_file(), File::close_file(), FileDV::~FileDV(), and FileGIF::~FileGIF().

| virtual int FileBase::close_file_derived | ( | ) | [inline, virtual] |
Reimplemented in FileDV, FileGIF, and FileOGG.
Definition at line 52 of file filebase.h.
Referenced by close_file().
| int FileBase::set_dither | ( | ) |
| virtual int FileBase::seek_end | ( | ) | [inline, virtual] |
Definition at line 54 of file filebase.h.
| virtual int FileBase::seek_start | ( | ) | [inline, virtual] |
Definition at line 55 of file filebase.h.
| virtual int64_t FileBase::get_video_position | ( | ) | [inline, virtual] |
| virtual int64_t FileBase::get_audio_position | ( | ) | [inline, virtual] |
| virtual int FileBase::set_video_position | ( | int64_t | x | ) | [inline, virtual] |
Reimplemented in FileAVI, FileDV, FileMOV, FileMPEG, FileOGG, and FileYUV.
Definition at line 58 of file filebase.h.
Referenced by File::set_video_position().
| virtual int FileBase::set_audio_position | ( | int64_t | x | ) | [inline, virtual] |
Reimplemented in FileAVI, FileDV, FileMOV, FileMPEG, FileOGG, and FileSndFile.
Definition at line 59 of file filebase.h.
Referenced by File::set_audio_position().
| virtual int64_t FileBase::get_memory_usage | ( | ) | [inline, virtual] |
Reimplemented in FileEXR, FileGIF, FileList, FileMOV, FileMPEG, and FileTGA.
Definition at line 63 of file filebase.h.
Referenced by File::get_memory_usage().
| virtual int FileBase::write_samples | ( | double ** | buffer, | |
| int64_t | len | |||
| ) | [inline, virtual] |
Reimplemented in FileAC3, FileAVI, FileDV, FileMOV, FileMPEG, FileOGG, FileSndFile, and FileVorbis.
Definition at line 65 of file filebase.h.
Referenced by File::write_samples().
| virtual int FileBase::write_frames | ( | VFrame *** | frames, | |
| int | len | |||
| ) | [inline, virtual] |
Reimplemented in FileAVI, FileDV, FileList, FileMOV, FileMPEG, FileOGG, and FileYUV.
Definition at line 67 of file filebase.h.
Referenced by File::write_frames().
| virtual int FileBase::read_compressed_frame | ( | VFrame * | buffer | ) | [inline, virtual] |
Reimplemented in FileAVI, FileDV, and FileMOV.
Definition at line 68 of file filebase.h.
Referenced by File::read_compressed_frame().
| virtual int FileBase::write_compressed_frame | ( | VFrame * | buffers | ) | [inline, virtual] |
Reimplemented in FileAVI, FileDV, and FileMOV.
Definition at line 69 of file filebase.h.
Referenced by File::write_compressed_frame().
| virtual int64_t FileBase::compressed_frame_size | ( | ) | [inline, virtual] |
Reimplemented in FileAVI, FileDV, and FileMOV.
Definition at line 70 of file filebase.h.
Referenced by File::compressed_frame_size().
| virtual int FileBase::read_samples | ( | double * | buffer, | |
| int64_t | len | |||
| ) | [inline, virtual] |
Reimplemented in FileAVI, FileDV, FileMOV, FileMPEG, FileOGG, FileSndFile, and FileVorbis.
Definition at line 72 of file filebase.h.
Referenced by File::read_samples().
| virtual int FileBase::prefer_samples_float | ( | ) | [inline, virtual] |
Reimplemented in FileMPEG, and FileVorbis.
Definition at line 75 of file filebase.h.
Referenced by File::read_samples().
| virtual int FileBase::read_samples_float | ( | float * | buffer, | |
| int64_t | len | |||
| ) | [inline, virtual] |
Reimplemented in FileMPEG, and FileVorbis.
Definition at line 76 of file filebase.h.
Referenced by File::read_samples().
| virtual int FileBase::read_frame | ( | VFrame * | frame | ) | [inline, virtual] |
| virtual int FileBase::colormodel_supported | ( | int | colormodel | ) | [inline, virtual] |
| virtual int FileBase::can_copy_from | ( | Edit * | edit, | |
| int64_t | position | |||
| ) | [inline, virtual] |
| virtual int FileBase::get_render_strategy | ( | ArrayList< int > * | render_strategies | ) | [inline, virtual] |
Definition at line 85 of file filebase.h.
| int FileBase::search_render_strategies | ( | ArrayList< int > * | render_strategies, | |
| int | render_strategy | |||
| ) | [static, protected] |
Definition at line 155 of file filebase.C.
References ArrayList< TYPE >::total, and ArrayList< TYPE >::values.
| int64_t FileBase::samples_to_raw | ( | char * | out_buffer, | |
| float ** | in_buffer, | |||
| int64_t | input_len, | |||
| int | bits, | |||
| int | channels, | |||
| int | byte_order, | |||
| int | signed_ | |||
| ) | [protected] |
Definition at line 7 of file filebaseaudio.C.
References asset, bytes, File::bytes_per_sample(), Asset::channels, dither, file, floattoulaw(), generate_ulaw_tables(), get_byte_order(), and swap_bytes().

| int FileBase::raw_to_samples | ( | float * | out_buffer, | |
| char * | in_buffer, | |||
| int64_t | samples, | |||
| int | bits, | |||
| int | channels, | |||
| int | channel, | |||
| int | feather, | |||
| float | lfeather_len, | |||
| float | lfeather_gain, | |||
| float | lfeather_slope | |||
| ) | [protected] |
Definition at line 212 of file filebaseaudio.C.
References File::bytes_per_sample(), CENTER_MACRO1, CENTER_MACRO2, file, generate_ulaw_tables(), LFEATHER_MACRO1, LFEATHER_MACRO2, READ_16_MACRO, READ_24_MACRO, READ_8_MACRO, and READ_ULAW_MACRO.

| int FileBase::overlay_float_buffer | ( | float * | out_buffer, | |
| float * | in_buffer, | |||
| int64_t | samples, | |||
| float | lfeather_len, | |||
| float | lfeather_gain, | |||
| float | lfeather_slope | |||
| ) | [protected] |
Definition at line 349 of file filebaseaudio.C.
References CENTER_MACRO1, CENTER_MACRO2, LFEATHER_MACRO1, and LFEATHER_MACRO2.
| int64_t FileBase::frame_to_raw | ( | unsigned char * | out_buffer, | |
| VFrame * | in_frame, | |||
| int | w, | |||
| int | h, | |||
| int | use_alpha, | |||
| int | use_float, | |||
| int | color_model | |||
| ) | [protected] |
| int FileBase::get_audio_buffer | ( | char ** | buffer, | |
| int64_t | len, | |||
| int64_t | bits, | |||
| int64_t | channels | |||
| ) | [protected] |
Definition at line 369 of file filebaseaudio.C.
References bytes, File::bytes_per_sample(), file, and prev_bytes.

| int FileBase::get_float_buffer | ( | float ** | buffer, | |
| int64_t | len | |||
| ) | [protected] |
| int FileBase::get_video_buffer | ( | unsigned char ** | buffer, | |
| int | depth | |||
| ) | [protected] |
Definition at line 113 of file filebase.C.
References asset, bytes, Asset::height, and Asset::width.
| int FileBase::get_row_pointers | ( | unsigned char * | buffer, | |
| unsigned char *** | pointers, | |||
| int | depth | |||
| ) | [protected] |
| int FileBase::match4 | ( | char * | in, | |
| char * | out | |||
| ) | [static, protected] |
Definition at line 144 of file filebase.C.
Referenced by FilePNG::can_copy_from(), FileMOV::can_copy_from(), FileJPEGList::can_copy_from(), FileJPEG::can_copy_from(), FileDV::can_copy_from(), FileMOV::compressiontostr(), FileMOV::format_to_asset(), FileMOV::get_best_colormodel(), and FileMOV::write_frames().
| int64_t FileBase::ima4_samples_to_bytes | ( | int64_t | samples, | |
| int | channels | |||
| ) | [protected] |
Definition at line 235 of file filebaseima4.C.
References bytes, ima4_block_samples, and ima4_block_size.
| int64_t FileBase::ima4_bytes_to_samples | ( | int64_t | bytes, | |
| int | channels | |||
| ) | [protected] |
Definition at line 241 of file filebaseima4.C.
References ima4_block_samples, ima4_block_size, and samples.
| float FileBase::ulawtofloat | ( | char | ulaw | ) | [private] |
| char FileBase::floattoulaw | ( | float | value | ) | [private] |
Definition at line 15 of file filebaseulaw.C.
References floattoulaw_ptr.
Referenced by samples_to_raw().
| int FileBase::generate_ulaw_tables | ( | ) | [private] |
Definition at line 26 of file filebaseulaw.C.
References floattoulaw_ptr, floattoulaw_table, uBIAS, uCLIP, ulawtofloat_ptr, and ulawtofloat_table.
Referenced by raw_to_samples(), and samples_to_raw().
| int FileBase::delete_ulaw_tables | ( | ) | [private] |
Definition at line 101 of file filebaseulaw.C.
References floattoulaw_table, and ulawtofloat_table.
Referenced by reset_parameters().
| int FileBase::init_ima4 | ( | ) | [private] |
Definition at line 28 of file filebaseima4.C.
References asset, Asset::channels, ima4_block_samples, ima4_block_size, last_ima4_indexes, and last_ima4_samples.
Referenced by FileBase().
| int FileBase::delete_ima4 | ( | ) | [private] |
Definition at line 36 of file filebaseima4.C.
References last_ima4_indexes, and last_ima4_samples.
Referenced by close_file(), and ~FileBase().
| int FileBase::ima4_decode_block | ( | int16_t * | output, | |
| unsigned char * | input | |||
| ) | [private] |
Definition at line 44 of file filebaseima4.C.
| int FileBase::ima4_decode_sample | ( | int * | predictor, | |
| int | nibble, | |||
| int * | index, | |||
| int * | step | |||
| ) | [private] |
| int FileBase::ima4_encode_block | ( | unsigned char * | output, | |
| int16_t * | input, | |||
| int | step, | |||
| int | channel | |||
| ) | [private] |
Definition at line 129 of file filebaseima4.C.
References asset, Asset::channels, ima4_block_size, ima4_encode_sample(), last_ima4_indexes, and last_ima4_samples.

| int FileBase::ima4_encode_sample | ( | int * | last_sample, | |
| int * | last_index, | |||
| int * | nibble, | |||
| int | next_sample | |||
| ) | [private] |
Definition at line 186 of file filebaseima4.C.
References ima4_index, ima4_step, and step.
Referenced by ima4_encode_block().
friend class File [friend] |
Definition at line 25 of file filebase.h.
friend class FileList [friend] |
Definition at line 26 of file filebase.h.
friend class FrameWriter [friend] |
char* FileBase::audio_buffer_in [protected] |
Definition at line 134 of file filebase.h.
Referenced by close_file(), reset_parameters(), and ~FileBase().
char * FileBase::audio_buffer_out [protected] |
Definition at line 134 of file filebase.h.
Referenced by close_file(), reset_parameters(), and ~FileBase().
float* FileBase::float_buffer [protected] |
Definition at line 135 of file filebase.h.
Referenced by close_file(), reset_parameters(), and ~FileBase().
unsigned char* FileBase::video_buffer_in [protected] |
Definition at line 136 of file filebase.h.
Referenced by close_file(), reset_parameters(), and ~FileBase().
unsigned char * FileBase::video_buffer_out [protected] |