FileMPEG Class Reference

#include <filempeg.h>

Inherits FileBase.

Collaboration diagram for FileMPEG:

Collaboration graph
[legend]

Public Member Functions

 FileMPEG (Asset *asset, File *file)
 ~FileMPEG ()
int open_file (int rd, int wr)
int close_file ()
int create_index ()
int get_index (char *index_path)
int set_video_position (int64_t x)
int set_audio_position (int64_t x)
int write_samples (double **buffer, int64_t len)
int write_frames (VFrame ***frames, int len)
int read_frame (VFrame *frame)
int read_samples (double *buffer, int64_t len)
int read_samples_float (float *buffer, int64_t len)
int prefer_samples_float ()
int64_t get_memory_usage ()
int colormodel_supported (int colormodel)
int can_copy_from (Edit *edit, int64_t position)

Static Public Member Functions

static void get_parameters (BC_WindowBase *parent_window, Asset *asset, BC_WindowBase *&format_window, int audio_options, int video_options)
static int check_sig (Asset *asset)
static void get_info (Asset *asset, int64_t *bytes, int *stracks)
static int get_best_colormodel (Asset *asset, int driver)
static char * strtocompression (char *string)
static char * compressiontostr (char *string)

Private Member Functions

void to_streamchannel (int channel, int &stream_out, int &channel_out)
int reset_parameters_derived ()
void append_vcommand_line (const char *string)
void append_acommand_line (const char *string)

Private Attributes

mpeg3_tfd
FileMPEGVideovideo_out
ArrayList< char * > vcommand_line
FILE * dvb_out
FILE * mjpeg_out
int mjpeg_error
Conditionnext_frame_lock
Conditionnext_frame_done
int mjpeg_eof
int wrote_header
unsigned char * mjpeg_y
unsigned char * mjpeg_u
unsigned char * mjpeg_v
char mjpeg_command [BCTEXTLEN]
FileMPEGAudioaudio_out
ArrayList< char * > acommand_line
VFrametemp_frame
unsigned char * toolame_temp
int toolame_allocation
int toolame_result
float * lame_temp [2]
int lame_allocation
char * lame_output
int lame_output_allocation
FILE * lame_fd
int lame_started
lame_global_flags * lame_global

Friends

class FileMPEGVideo
class FileMPEGAudio

Detailed Description

Definition at line 38 of file filempeg.h.


Constructor & Destructor Documentation

FileMPEG::FileMPEG ( Asset asset,
File file 
)

Definition at line 68 of file filempeg.C.

References Asset::byte_order, Asset::format, next_frame_done, next_frame_lock, and FileBase::reset_parameters().

Here is the call graph for this function:

FileMPEG::~FileMPEG (  ) 

Definition at line 79 of file filempeg.C.

References close_file(), next_frame_done, and next_frame_lock.

Here is the call graph for this function:


Member Function Documentation

void FileMPEG::get_parameters ( BC_WindowBase parent_window,
Asset asset,
BC_WindowBase *&  format_window,
int  audio_options,
int  video_options 
) [static]

Definition at line 86 of file filempeg.C.

References MPEGConfigVideo::create_objects(), MPEGConfigAudio::create_objects(), Asset::format, BC_WindowBase::run_window(), and window.

Referenced by File::get_options().

Here is the call graph for this function:

int FileMPEG::check_sig ( Asset asset  )  [static]

Definition at line 111 of file filempeg.C.

References mpeg3_check_sig(), and Asset::path.

Referenced by File::open_file().

Here is the call graph for this function:

void FileMPEG::get_info ( Asset asset,
int64_t *  bytes,
int *  stracks 
) [static]

Definition at line 116 of file filempeg.C.

References error(), fd, mpeg3_close(), mpeg3_get_bytes(), mpeg3_open(), mpeg3_subtitle_tracks(), and Asset::path.

Referenced by AssetEditWindow::create_objects().

Here is the call graph for this function:

int FileMPEG::open_file ( int  rd,
int  wr 
) [virtual]

Reimplemented from FileBase.

Definition at line 162 of file filempeg.C.

References _, Asset::ampeg_bitrate, Asset::ampeg_derivative, append_acommand_line(), append_vcommand_line(), Asset::aspect_ratio, aspect_ratio_codes, FileBase::asset, Asset::audio_data, Asset::audio_length, audio_out, BC_ILACE_MODE_UNDETECTED, BCTEXTLEN, Asset::channels, CLAMP, File::cpus, create_index(), dvb_out, eprintf, EQUIV, error(), fd, FileBase::file, FileMPEGAudio, FileMPEGVideo, fopen(), Asset::format, Asset::frame_rate, frame_rate_code, frame_rate_codes, Asset::height, Asset::interlace_mode, lame_fd, lame_global, Asset::layers, mjpeg_command, MJPEG_EXE, mjpeg_out, mpeg3_audio_channels(), mpeg3_audio_samples(), mpeg3_colormodel(), mpeg3_frame_rate(), mpeg3_has_audio(), mpeg3_has_video(), MPEG3_INVALID_TOC_VERSION, mpeg3_open(), mpeg3_sample_rate(), mpeg3_set_cpus(), mpeg3_show_subtitle(), MPEG3_TOC_DATE_MISMATCH, mpeg3_total_astreams(), mpeg3_total_vstreams(), mpeg3_video_frames(), mpeg3_video_height(), mpeg3_video_width(), MPEG3_YUV422P, MPEG_YUV420, MPEG_YUV422, Asset::path, File::playback_subtitle, Asset::sample_rate, SET_TRACE, Thread::start(), Asset::video_data, Asset::video_length, video_out, Asset::vmpeg_bitrate, Asset::vmpeg_cmodel, Asset::vmpeg_denoise, Asset::vmpeg_derivative, Asset::vmpeg_field_order, Asset::vmpeg_fix_bitrate, Asset::vmpeg_iframe_distance, Asset::vmpeg_pframe_distance, Asset::vmpeg_preset, Asset::vmpeg_progressive, Asset::vmpeg_quantization, Asset::vmpeg_seq_codes, and Asset::width.

Here is the call graph for this function:

int FileMPEG::close_file (  )  [virtual]

int FileMPEG::create_index (  ) 

int FileMPEG::get_index ( char *  index_path  )  [virtual]

int FileMPEG::set_video_position ( int64_t  x  )  [virtual]

Reimplemented from FileBase.

Definition at line 821 of file filempeg.C.

References File::current_layer, fd, FileBase::file, and mpeg3_set_frame().

Here is the call graph for this function:

int FileMPEG::set_audio_position ( int64_t  x  )  [virtual]

Reimplemented from FileBase.

Definition at line 797 of file filempeg.C.

References File::current_channel, fd, FileBase::file, mpeg3_get_sample(), mpeg3_set_sample(), and to_streamchannel().

Here is the call graph for this function:

int FileMPEG::write_samples ( double **  buffer,
int64_t  len 
) [virtual]

int FileMPEG::write_frames ( VFrame ***  frames,
int  len 
) [virtual]

int FileMPEG::read_frame ( VFrame frame  )  [virtual]

int FileMPEG::read_samples ( double *  buffer,
int64_t  len 
) [virtual]

Reimplemented from FileBase.

Definition at line 1210 of file filempeg.C.

References File::current_channel, File::current_sample, fd, FileBase::file, mpeg3_read_audio(), mpeg3_set_sample(), and to_streamchannel().

Here is the call graph for this function:

int FileMPEG::read_samples_float ( float *  buffer,
int64_t  len 
) [virtual]

Reimplemented from FileBase.

Definition at line 1248 of file filempeg.C.

References File::current_channel, File::current_sample, fd, FileBase::file, mpeg3_read_audio(), mpeg3_set_sample(), and to_streamchannel().

Here is the call graph for this function:

int FileMPEG::prefer_samples_float (  )  [virtual]

Reimplemented from FileBase.

Definition at line 1243 of file filempeg.C.

int64_t FileMPEG::get_memory_usage (  )  [virtual]

Reimplemented from FileBase.

Definition at line 833 of file filempeg.C.

References fd, mpeg3_memory_usage(), and FileBase::rd.

Here is the call graph for this function:

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

int FileMPEG::colormodel_supported ( int  colormodel  )  [virtual]

Reimplemented from FileBase.

Definition at line 732 of file filempeg.C.

int FileMPEG::can_copy_from ( Edit edit,
int64_t  position 
) [virtual]

Reimplemented from FileBase.

Definition at line 791 of file filempeg.C.

References fd.

char * FileMPEG::strtocompression ( char *  string  )  [static]

Definition at line 1278 of file filempeg.C.

char * FileMPEG::compressiontostr ( char *  string  )  [static]

Definition at line 1283 of file filempeg.C.

void FileMPEG::to_streamchannel ( int  channel,
int &  stream_out,
int &  channel_out 
) [private]

Definition at line 1201 of file filempeg.C.

References File::current_channel, fd, FileBase::file, mpeg3_audio_channels(), and mpeg3_total_astreams().

Referenced by read_samples(), read_samples_float(), and set_audio_position().

Here is the call graph for this function:

int FileMPEG::reset_parameters_derived (  )  [private, virtual]

void FileMPEG::append_vcommand_line ( const char *  string  )  [private]

Definition at line 616 of file filempeg.C.

References ArrayList< TYPE >::append(), and vcommand_line.

Referenced by open_file().

Here is the call graph for this function:

void FileMPEG::append_acommand_line ( const char *  string  )  [private]

Definition at line 625 of file filempeg.C.

References acommand_line, and ArrayList< TYPE >::append().

Referenced by open_file().

Here is the call graph for this function:


Friends And Related Function Documentation

friend class FileMPEGVideo [friend]

Definition at line 44 of file filempeg.h.

Referenced by open_file().

friend class FileMPEGAudio [friend]

Definition at line 45 of file filempeg.h.

Referenced by open_file().


Field Documentation

mpeg3_t* FileMPEG::fd [private]

Definition at line 92 of file filempeg.h.

Referenced by close_file(), open_file(), reset_parameters_derived(), and write_frames().

Definition at line 94 of file filempeg.h.

Referenced by append_vcommand_line(), close_file(), and FileMPEGVideo::run().

FILE* FileMPEG::dvb_out [private]

Definition at line 100 of file filempeg.h.

Referenced by close_file(), open_file(), and reset_parameters_derived().

FILE* FileMPEG::mjpeg_out [private]

Definition at line 106 of file filempeg.h.

Referenced by close_file(), open_file(), reset_parameters_derived(), and FileMPEGVideo::run().

int FileMPEG::mjpeg_error [private]

Definition at line 107 of file filempeg.h.

Referenced by reset_parameters_derived(), FileMPEGVideo::run(), and write_frames().

Definition at line 108 of file filempeg.h.

Referenced by close_file(), FileMPEG(), FileMPEGVideo::run(), write_frames(), and ~FileMPEG().

Definition at line 109 of file filempeg.h.

Referenced by FileMPEG(), FileMPEGVideo::run(), write_frames(), and ~FileMPEG().

int FileMPEG::mjpeg_eof [private]

Definition at line 110 of file filempeg.h.

Referenced by close_file(), reset_parameters_derived(), and FileMPEGVideo::run().

int FileMPEG::wrote_header [private]

Definition at line 111 of file filempeg.h.

Referenced by reset_parameters_derived(), and FileMPEGVideo::run().

unsigned char* FileMPEG::mjpeg_y [private]

Definition at line 112 of file filempeg.h.

Referenced by FileMPEGVideo::run(), and write_frames().

unsigned char* FileMPEG::mjpeg_u [private]

Definition at line 113 of file filempeg.h.

Referenced by FileMPEGVideo::run(), and write_frames().

unsigned char* FileMPEG::mjpeg_v [private]

Definition at line 114 of file filempeg.h.

Referenced by FileMPEGVideo::run(), and write_frames().

char FileMPEG::mjpeg_command[BCTEXTLEN] [private]

Definition at line 115 of file filempeg.h.

Referenced by open_file().

Definition at line 123 of file filempeg.h.

Referenced by close_file(), open_file(), and reset_parameters_derived().

Definition at line 125 of file filempeg.h.

Referenced by append_acommand_line(), close_file(), and FileMPEGAudio::run().

Definition at line 130 of file filempeg.h.

Referenced by close_file(), reset_parameters_derived(), and write_frames().

unsigned char* FileMPEG::toolame_temp [private]

Definition at line 132 of file filempeg.h.

Referenced by close_file(), reset_parameters_derived(), and write_samples().

Definition at line 133 of file filempeg.h.

Referenced by reset_parameters_derived(), and write_samples().

int FileMPEG::toolame_result [private]

Definition at line 134 of file filempeg.h.

Referenced by reset_parameters_derived(), and FileMPEGAudio::run().

float* FileMPEG::lame_temp[2] [private]

Definition at line 137 of file filempeg.h.

Referenced by close_file(), reset_parameters_derived(), and write_samples().

Definition at line 138 of file filempeg.h.

Referenced by reset_parameters_derived(), and write_samples().

char* FileMPEG::lame_output [private]

Definition at line 139 of file filempeg.h.

Referenced by close_file(), reset_parameters_derived(), and write_samples().

Definition at line 140 of file filempeg.h.

Referenced by reset_parameters_derived(), and write_samples().

FILE* FileMPEG::lame_fd [private]

Definition at line 141 of file filempeg.h.

Referenced by close_file(), open_file(), reset_parameters_derived(), and write_samples().

int FileMPEG::lame_started [private]

Definition at line 143 of file filempeg.h.

Referenced by reset_parameters_derived(), and write_samples().

lame_global_flags* FileMPEG::lame_global [private]

Definition at line 145 of file filempeg.h.

Referenced by close_file(), open_file(), reset_parameters_derived(), and write_samples().


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

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