FileThread Class Reference

#include <filethread.h>

Inherits Thread.

Collaboration diagram for FileThread:

Collaboration graph
[legend]

Public Member Functions

 FileThread (File *file, int do_audio, int do_video)
 ~FileThread ()
void create_objects (File *file, int do_audio, int do_video)
void delete_objects ()
void reset ()
int start_writing ()
int start_writing (long buffer_size, int color_model, int ring_buffers, int compressed)
int stop_writing ()
int start_reading ()
int stop_reading ()
int read_frame (VFrame *frame)
int set_video_position (int64_t position)
int set_layer (int layer)
int read_buffer ()
int64_t get_memory_usage ()
int write_buffer (long size)
double ** get_audio_buffer ()
VFrame *** get_video_buffer ()
void run ()
int swap_buffer ()

Data Fields

double *** audio_buffer
VFrame **** video_buffer
long * output_size
int * is_compressed
Condition ** output_lock
Condition ** input_lock
Mutexfile_lock
int current_buffer
int local_buffer
int * last_buffer
int return_value
int do_audio
int do_video
Filefile
int ring_buffers
int buffer_size
int color_model
int compressed
int is_reading
int is_writing
int done
int total_frames
FileThreadFrameread_frames [MAX_READ_FRAMES]
int disable_read
Conditionread_wait_lock
Conditionuser_wait_lock
Mutexframe_lock
int64_t start_position
int64_t read_position
int layer

Detailed Description

Definition at line 29 of file filethread.h.


Constructor & Destructor Documentation

FileThread::FileThread ( File file,
int  do_audio,
int  do_video 
)

Definition at line 27 of file filethread.C.

References create_objects(), and reset().

Here is the call graph for this function:

FileThread::~FileThread (  ) 

Definition at line 36 of file filethread.C.

References delete_objects().

Here is the call graph for this function:


Member Function Documentation

void FileThread::create_objects ( File file,
int  do_audio,
int  do_video 
)

Definition at line 67 of file filethread.C.

References file_lock, frame_lock, MAX_READ_FRAMES, read_frames, read_wait_lock, and user_wait_lock.

Referenced by FileThread().

void FileThread::delete_objects (  ) 

Definition at line 83 of file filethread.C.

References file_lock, frame_lock, input_lock, last_buffer, output_lock, output_size, read_wait_lock, reset(), ring_buffers, and user_wait_lock.

Referenced by ~FileThread().

Here is the call graph for this function:

void FileThread::reset (  ) 

int FileThread::start_writing (  ) 

int FileThread::start_writing ( long  buffer_size,
int  color_model,
int  ring_buffers,
int  compressed 
)

int FileThread::stop_writing (  ) 

int FileThread::start_reading (  ) 

Definition at line 432 of file filethread.C.

References disable_read, done, and is_reading.

Referenced by File::start_video_decode_thread().

int FileThread::stop_reading (  ) 

Definition at line 443 of file filethread.C.

References done, is_reading, Thread::join(), read_wait_lock, Thread::running(), and Condition::unlock().

Referenced by File::stop_video_thread().

Here is the call graph for this function:

int FileThread::read_frame ( VFrame frame  ) 

int FileThread::set_video_position ( int64_t  position  ) 

Definition at line 454 of file filethread.C.

References disable_read, Thread::join(), MAX_READ_FRAMES, read_position, read_wait_lock, Thread::start(), start_position, total_frames, and Condition::unlock().

Referenced by File::set_video_position().

Here is the call graph for this function:

int FileThread::set_layer ( int  layer  ) 

Definition at line 487 of file filethread.C.

References disable_read, Thread::join(), read_wait_lock, total_frames, and Condition::unlock().

Referenced by File::set_layer().

Here is the call graph for this function:

int FileThread::read_buffer (  ) 

int64_t FileThread::get_memory_usage (  ) 

Definition at line 604 of file filethread.C.

References FileThreadFrame::frame, frame_lock, VFrame::get_data_size(), Mutex::lock(), MAX_READ_FRAMES, read_frames, and Mutex::unlock().

Referenced by File::get_memory_usage().

Here is the call graph for this function:

int FileThread::write_buffer ( long  size  ) 

Definition at line 632 of file filethread.C.

References current_buffer, output_lock, output_size, return_value, and Condition::unlock().

Referenced by File::write_audio_buffer(), and File::write_video_buffer().

Here is the call graph for this function:

double ** FileThread::get_audio_buffer (  ) 

Definition at line 616 of file filethread.C.

References audio_buffer, current_buffer, input_lock, Condition::lock(), and swap_buffer().

Referenced by File::get_audio_buffer().

Here is the call graph for this function:

VFrame *** FileThread::get_video_buffer (  ) 

Definition at line 624 of file filethread.C.

References current_buffer, input_lock, Condition::lock(), swap_buffer(), and video_buffer.

Referenced by File::get_video_buffer().

Here is the call graph for this function:

void FileThread::run (  )  [virtual]

int FileThread::swap_buffer (  ) 

Definition at line 642 of file filethread.C.

References current_buffer, and ring_buffers.

Referenced by get_audio_buffer(), get_video_buffer(), and stop_writing().


Field Documentation

Definition at line 79 of file filethread.h.

Referenced by get_audio_buffer(), reset(), run(), start_writing(), and stop_writing().

Definition at line 81 of file filethread.h.

Referenced by get_video_buffer(), reset(), run(), start_writing(), and stop_writing().

Definition at line 82 of file filethread.h.

Referenced by delete_objects(), reset(), run(), start_writing(), and write_buffer().

Definition at line 84 of file filethread.h.

Definition at line 85 of file filethread.h.

Referenced by delete_objects(), reset(), run(), start_writing(), stop_writing(), and write_buffer().

Definition at line 87 of file filethread.h.

Referenced by create_objects(), delete_objects(), reset(), run(), start_writing(), and stop_writing().

Definition at line 89 of file filethread.h.

Referenced by run(), and start_writing().

Definition at line 90 of file filethread.h.

Referenced by delete_objects(), reset(), run(), start_writing(), and stop_writing().

Definition at line 91 of file filethread.h.

Referenced by run(), start_writing(), and write_buffer().

Definition at line 92 of file filethread.h.

Referenced by run(), start_writing(), and stop_writing().

Definition at line 93 of file filethread.h.

Referenced by run(), start_writing(), and stop_writing().

Definition at line 94 of file filethread.h.

Referenced by read_frame(), run(), start_writing(), and stop_writing().

Definition at line 95 of file filethread.h.

Referenced by delete_objects(), run(), stop_writing(), and swap_buffer().

Definition at line 96 of file filethread.h.

Referenced by stop_writing().

Definition at line 98 of file filethread.h.

Referenced by FileTIFF::write_frame().

Definition at line 100 of file filethread.h.

Referenced by run().

Definition at line 103 of file filethread.h.

Referenced by reset(), run(), start_reading(), and stop_reading().

Definition at line 104 of file filethread.h.

Referenced by reset(), start_writing(), and stop_writing().

Definition at line 105 of file filethread.h.

Referenced by reset(), run(), start_reading(), start_writing(), and stop_reading().

Definition at line 112 of file filethread.h.

Referenced by read_frame(), reset(), run(), set_layer(), and set_video_position().

Definition at line 114 of file filethread.h.

Referenced by create_objects(), get_memory_usage(), read_frame(), reset(), and run().

Definition at line 117 of file filethread.h.

Referenced by read_frame(), reset(), run(), set_layer(), set_video_position(), and start_reading().

Definition at line 121 of file filethread.h.

Referenced by create_objects(), delete_objects(), read_frame(), reset(), and run().

Definition at line 123 of file filethread.h.

Referenced by create_objects(), delete_objects(), get_memory_usage(), read_frame(), reset(), and run().

Definition at line 127 of file filethread.h.

Referenced by read_frame(), reset(), run(), and set_video_position().

Definition at line 129 of file filethread.h.

Referenced by read_frame(), reset(), and set_video_position().

Definition at line 131 of file filethread.h.

Referenced by read_frame(), run(), start_writing(), and stop_writing().


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

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