#include <filethread.h>
Inherits Thread.

Definition at line 29 of file filethread.h.
| FileThread::FileThread | ( | File * | file, | |
| int | do_audio, | |||
| int | do_video | |||
| ) |
Definition at line 27 of file filethread.C.
References create_objects(), and reset().

| FileThread::~FileThread | ( | ) |
Definition at line 36 of file filethread.C.
References delete_objects().

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

| void FileThread::reset | ( | ) |
Definition at line 43 of file filethread.C.
References audio_buffer, disable_read, done, file_lock, frame_lock, input_lock, is_reading, is_writing, last_buffer, MAX_READ_FRAMES, output_lock, output_size, read_frames, read_position, read_wait_lock, start_position, total_frames, user_wait_lock, and video_buffer.
Referenced by delete_objects(), and FileThread().
| int FileThread::start_writing | ( | ) |
Referenced by File::start_audio_thread(), and File::start_video_thread().
| int FileThread::start_writing | ( | long | buffer_size, | |
| int | color_model, | |||
| int | ring_buffers, | |||
| int | compressed | |||
| ) |
Definition at line 325 of file filethread.C.
References File::asset, audio_buffer, VFrame::calculate_data_size(), Asset::channels, current_buffer, do_audio, do_video, done, file, file_lock, Asset::height, input_lock, is_writing, last_buffer, layer, Asset::layers, local_buffer, Mutex::lock(), output_lock, output_size, return_value, Thread::start(), Mutex::unlock(), video_buffer, and Asset::width.

| int FileThread::stop_writing | ( | ) |
Definition at line 264 of file filethread.C.
References File::asset, audio_buffer, buffer_size, Asset::channels, current_buffer, do_audio, do_video, file, file_lock, input_lock, is_writing, Thread::join(), last_buffer, layer, Asset::layers, Mutex::lock(), Condition::lock(), output_lock, ring_buffers, swap_buffer(), Mutex::unlock(), and video_buffer.
Referenced by File::stop_audio_thread(), and File::stop_video_thread().

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

| int FileThread::read_frame | ( | VFrame * | frame | ) |
Definition at line 500 of file filethread.C.
References cmodel_transfer(), VFrame::copy_params(), disable_read, VFrame::equal_stacks(), file, FileThreadFrame::frame, frame_lock, VFrame::get_color_model(), VFrame::get_h(), VFrame::get_rows(), VFrame::get_u(), VFrame::get_v(), VFrame::get_w(), VFrame::get_y(), layer, FileThreadFrame::layer, Condition::lock(), Mutex::lock(), MAX_READ_FRAMES, memcpy, FileThreadFrame::position, File::read_frame(), read_frames, read_position, read_wait_lock, File::set_layer(), File::set_video_position(), start_position, total_frames, Condition::unlock(), Mutex::unlock(), and user_wait_lock.
Referenced by File::read_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().

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

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

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

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

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

| void FileThread::run | ( | ) | [virtual] |
Implements Thread.
Definition at line 120 of file filethread.C.
References File::asset, audio_buffer, compressed, disable_read, do_audio, do_video, done, file, file_lock, FileThreadFrame::frame, frame_lock, File::get_best_colormodel(), Asset::height, input_lock, is_reading, last_buffer, FileThreadFrame::layer, layer, Asset::layers, local_buffer, Condition::lock(), Mutex::lock(), MAX_READ_FRAMES, output_lock, output_size, VFrame::params_match(), FileThreadFrame::position, File::read_frame(), read_frames, read_wait_lock, return_value, ring_buffers, File::set_layer(), File::set_video_position(), start_position, total_frames, Condition::unlock(), Mutex::unlock(), user_wait_lock, video_buffer, Asset::width, File::write_compressed_frame(), File::write_frames(), and File::write_samples().

| 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().
| double*** FileThread::audio_buffer |
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().
| long* FileThread::output_size |
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 85 of file filethread.h.
Referenced by delete_objects(), get_audio_buffer(), get_video_buffer(), reset(), run(), start_writing(), and stop_writing().
Definition at line 87 of file filethread.h.
Referenced by create_objects(), delete_objects(), reset(), run(), start_writing(), and stop_writing().
Definition at line 88 of file filethread.h.
Referenced by get_audio_buffer(), get_video_buffer(), start_writing(), stop_writing(), swap_buffer(), and write_buffer().
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 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().
| int FileThread::done |
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().
| FileThreadFrame* FileThread::read_frames[MAX_READ_FRAMES] |
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 119 of file filethread.h.
Referenced by create_objects(), delete_objects(), read_frame(), reset(), run(), set_layer(), set_video_position(), and stop_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().
| int64_t FileThread::start_position |
Definition at line 127 of file filethread.h.
Referenced by read_frame(), reset(), run(), and set_video_position().
| int64_t FileThread::read_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().
1.5.5