Thread Class Reference

#include <thread.h>

Inherited by APluginThread, AssetEdit, AssetRemoveThread, AudioDevice, AVC1394TransportThread, AWindow, BatchRenderLoadList, BatchRenderSaveList, BC_Clipboard, BC_DialogThread, BC_NewFolderThread, BC_ProgressBox, BC_Repeater, BC_Synchronous, BC_WindowEvents, BlurEngine, BlurZoomThread, BRender, BRenderThread, BrowseButton, ChannelEditEditThread, ChannelEditPictureThread, ChannelEditThread, ClipEdit, ColorBalanceEngine, ColorThread, CommonRender, CropVideo, CWindow, CWindowTool, DBXThread, DC_Offset, DelayAudioThread, DeleteAllIndexes, DriveSync, DV1394Input, DVBTuneStatus, DVBTuneThread, EditSvgButton, EndRecordThread, ExportEDL, FeatherEdits [private], FileMOVThread, FileMPEGAudio, FileMPEGVideo, FileThread, FlipBookThread, FormatAThread, FormatVThread, GWindow, IndexThread, InvertThread, KeepaliveThread, LabelEdit, LevelWindow, LoadClient, LoadFileThread, LoadPrevious, MainIndexes, ManualGoto, MenuEffectThread, MWindow, NewFolderThread, NewSvgButton, NewThread, OilThread, PasteTransition, PlaybackEngine, PluginDialogThread, PolarEngine, PreferencesThread, QuarkEngine, Quit, Record, RecordAudio, RecordMonitor, RecordMonitorThread, RecordStartoverThread, RecordStatusThread, RecordThread, RecordVideo, ReIndex, RemoveThread, Render, RenderEngine, RenderFarmClientThread, RenderFarmKeepalive, RenderFarmServerThread, RenderFarmWatchdog, RenderProgress, ResizeTrackThread, ResourceThread, ReverbEngine, ReverbLoadPrevThread, ReverbLoadThread, ReverbSaveThread, RotateEngine, SaveAs, ScaleThread, ScanThread, SetFormatThread, SharpenEngine, SharpenThread, SvgInkscapeThread, SynthThread, ThreadExec, ThreadIndexer, ThreadLoader, Tracking, TransitionLengthThread, VDeviceBUZInput, VideoWindow, VWindow, VWindow, WhirlEngine, WhirlThread, YUVEngine, and YUVThread.


Public Member Functions

 Thread (int synchronous=0, int realtime=0, int autodelete=0)
virtual ~Thread ()
void start ()
int end (pthread_t tid)
int end ()
int cancel ()
int join ()
int suspend_thread ()
int continue_thread ()
int exit_thread ()
int enable_cancel ()
int disable_cancel ()
int get_cancel_enabled ()
int running ()
int set_synchronous (int value)
int set_realtime (int value=1)
int set_autodelete (int value)
int get_autodelete ()
int get_realtime ()
int get_synchronous ()
int get_tid ()

Static Public Member Functions

static int calculate_realtime ()

Protected Member Functions

virtual void run ()=0

Static Private Member Functions

static void * entrypoint (void *parameters)

Private Attributes

int synchronous
int realtime
int autodelete
int thread_running
pthread_t tid
int tid_valid
int cancel_enabled


Detailed Description

Definition at line 12 of file thread.h.


Constructor & Destructor Documentation

Thread::Thread ( int  synchronous = 0,
int  realtime = 0,
int  autodelete = 0 
)

Definition at line 12 of file thread.C.

References cancel_enabled, thread_running, tid, and tid_valid.

Thread::~Thread (  )  [virtual]

Definition at line 23 of file thread.C.


Member Function Documentation

void * Thread::entrypoint ( void *  parameters  )  [static, private]

Definition at line 27 of file thread.C.

References autodelete, cancel_enabled, NULL, realtime, run(), synchronous, thread_running, and tid.

Referenced by start().

Here is the call graph for this function:

virtual void Thread::run (  )  [protected, pure virtual]

Implemented in APluginThread, ARender, AssetEdit, AssetRemoveThread, AudioDevice, AVC1394TransportThread, AWindow, BatchRenderSaveList, BatchRenderLoadList, BRender, BRenderThread, BrowseButton, ChannelEditThread, ScanThread, ChannelEditEditThread, ChannelEditPictureThread, ClipEdit, CommonRender, CropVideo, CWindow, CWindowTool, DC_Offset, DeleteAllIndexes, DriveSync, DV1394Input, DVBTuneThread, DVBTuneStatus, ExportEDL, FeatherEdits, FileMOVThread, FileMPEGVideo, FileMPEGAudio, FileThread, FlipBookThread, FormatAThread, FormatVThread, GWindow, IndexThread, LabelEdit, LevelWindow, LoadClient, LoadFileThread, LoadPrevious, MainIndexes, ManualGoto, MenuEffectThread, MWindow, NewThread, NewFolderThread, PlaybackEngine, PluginDialogThread, PreferencesThread, Quit, Record, RecordAudio, EndRecordThread, RecordStartoverThread, RecordStatusThread, RecordMonitor, RecordMonitorThread, RecordThread, RecordVideo, ReIndex, RemoveThread, RenderProgress, Render, RenderEngine, RenderFarmServerThread, RenderFarmWatchdog, RenderFarmClientThread, RenderFarmKeepalive, ResizeTrackThread, ResourceThread, SaveAs, ScaleThread, SetFormatThread, ThreadExec, ThreadIndexer, ThreadLoader, Tracking, PasteTransition, TransitionLengthThread, VDeviceBUZInput, KeepaliveThread, VideoWindow, VRender, VWindow, BC_Clipboard, BC_DialogThread, BC_NewFolderThread, BC_ProgressBox, BC_Repeater, BC_Synchronous, BC_WindowEvents, RotateEngine, BlurEngine, BlurZoomThread, ColorBalanceEngine, ColorThread, DBXThread, DelayAudioThread, InvertThread, OilThread, PolarEngine, QuarkEngine, SharpenThread, ReverbEngine, ReverbLoadPrevThread, ReverbSaveThread, ReverbLoadThread, SharpenEngine, NewSvgButton, EditSvgButton, SvgInkscapeThread, SynthThread, WhirlEngine, WhirlThread, YUVEngine, and YUVThread.

Referenced by entrypoint().

void Thread::start (  ) 

Reimplemented in BRenderThread, ScanThread, DV1394Input, MWindow, VDeviceBUZInput, BC_DialogThread, BC_Synchronous, and BC_WindowEvents.

Definition at line 56 of file thread.C.

References calculate_realtime(), entrypoint(), realtime, synchronous, thread_running, tid, and tid_valid.

Referenced by ARender::arm_playback(), RecordVideo::arm_recording(), RecordAudio::arm_recording(), DC_Offset::calibrate_dc_offset(), VWindow::copy(), LoadServer::create_clients(), ClipEdit::create_clip(), FileMPEG::create_index(), ResourceThread::create_objects(), RemoveThread::create_objects(), RecordMonitor::create_objects(), RecordGUI::create_objects(), PlaybackEngine::create_objects(), ResourceThread::do_audio(), Cursor_::draw(), AssetEdit::edit_asset(), ChannelEditEditThread::edit_channel(), ClipEdit::edit_clip(), LabelEdit::edit_label(), ChannelEditPictureThread::edit_picture(), EditSvgButton::handle_event(), NewSvgButton::handle_event(), ReverbLoadPrev::handle_event(), ReverbSave::handle_event(), ReverbLoad::handle_event(), TransitionPopupLength::handle_event(), SetFormat::handle_event(), Scale::handle_event(), SaveAs::handle_event(), Save::handle_event(), ReIndex::handle_event(), RecordGUIRewind::handle_event(), RecordGUIStartOver::handle_event(), RecordMenuItem::handle_event(), Quit::handle_event(), PreferencesMenuitem::handle_event(), New::handle_event(), MenuEffectItem::handle_event(), MenuEffects::handle_event(), Load::handle_event(), FeatherEdits::handle_event(), DeleteAllIndexes::handle_event(), CropVideo::handle_event(), ChannelButton::handle_event(), BrowseButton::handle_event(), BatchRenderLoadList::handle_event(), BatchRenderSaveList::handle_event(), AssetPopupDiskRemove::handle_event(), RenderFarmClientThread::init_client_keepalive(), BC_Repeater::initialize(), BRenderThread::initialize(), BRender::initialize(), RenderFarmClientThread::main_loop(), FileMPEG::open_file(), DVBTune::open_tuner(), ManualGoto::open_window(), ColorBalanceMain::process_buffer(), Reverb::process_realtime(), BlurMain::process_realtime(), ARender::reverse_buffer(), RotateFrame::RotateFrame(), ThreadIndexer::run(), RecordThread::run(), Record::run(), DC_Offset::run(), TimeBar::select_region(), FormatTools::set_audio_options(), FormatTools::set_video_options(), FileThread::set_video_position(), Synth::show_gui(), SharpenMain::show_gui(), DelayAudio::show_gui(), BlurZoomMain::show_gui(), BC_WindowEvents::start(), BC_DialogThread::start(), VDeviceBUZInput::start(), EndRecordThread::start(), MWindow::start(), MainProgressBar::start(), DV1394Input::start(), ScanThread::start(), Render::start_batches(), ThreadIndexer::start_build(), IndexThread::start_build(), BC_Clipboard::start_clipboard(), ThreadExec::start_command(), RenderEngine::start_command(), CommonRender::start_command(), FileMOVThread::start_encoding(), Render::start_interactive(), ExportEDL::start_interactive(), KeepaliveThread::start_keepalive(), RenderFarmServerThread::start_loop(), MainIndexes::start_loop(), BC_NewFolderThread::start_new_folder(), NewFolderThread::start_new_folder(), VRender::start_playback(), Tracking::start_playback(), RecordMonitorThread::start_playback(), AudioDevice::start_playback(), Render::start_progress(), RecordThread::start_recording(), AudioDevice::start_recording(), ColorThread::start_window(), ResizeTrackThread::start_window(), PluginDialogThread::start_window(), FileThread::start_writing(), and VWindowEditing::to_clip().

Here is the call graph for this function:

int Thread::end ( pthread_t  tid  ) 

Definition at line 89 of file thread.C.

References tid_valid.

int Thread::end (  ) 

int Thread::cancel (  ) 

int Thread::join (  ) 

Definition at line 115 of file thread.C.

References autodelete, synchronous, tid, and tid_valid.

Referenced by AudioDevice::close_all(), FileThread::set_layer(), FileThread::set_video_position(), ScanThread::start(), KeepaliveThread::stop(), IndexThread::stop_build(), BC_Clipboard::stop_clipboard(), FileMOVThread::stop_encoding(), MainIndexes::stop_loop(), Tracking::stop_playback(), RecordMonitorThread::stop_playback(), BC_ProgressBox::stop_progress(), FileThread::stop_reading(), RecordVideo::stop_recording(), RecordThread::stop_recording(), FileThread::stop_writing(), CommonRender::wait_for_completion(), AudioDevice::wait_for_completion(), PlaybackEngine::wait_render_engine(), AVC1394TransportThread::~AVC1394TransportThread(), BatchRenderLoadList::~BatchRenderLoadList(), BatchRenderSaveList::~BatchRenderSaveList(), BC_DialogThread::~BC_DialogThread(), BC_Repeater::~BC_Repeater(), BC_WindowEvents::~BC_WindowEvents(), BlurEngine::~BlurEngine(), BRender::~BRender(), BRenderThread::~BRenderThread(), BrowseButton::~BrowseButton(), ColorBalanceEngine::~ColorBalanceEngine(), CWindowTool::~CWindowTool(), DriveSync::~DriveSync(), DV1394Input::~DV1394Input(), DVBTuneStatus::~DVBTuneStatus(), DVBTuneThread::~DVBTuneThread(), EndRecordThread::~EndRecordThread(), FileMPEGAudio::~FileMPEGAudio(), FileMPEGVideo::~FileMPEGVideo(), LevelWindow::~LevelWindow(), LoadClient::~LoadClient(), ManualGoto::~ManualGoto(), PlaybackEngine::~PlaybackEngine(), RecordMonitor::~RecordMonitor(), RecordStartoverThread::~RecordStartoverThread(), RecordStatusThread::~RecordStatusThread(), RenderFarmKeepalive::~RenderFarmKeepalive(), RenderFarmServerThread::~RenderFarmServerThread(), RenderFarmWatchdog::~RenderFarmWatchdog(), RenderProgress::~RenderProgress(), ResizeTrackThread::~ResizeTrackThread(), ReverbEngine::~ReverbEngine(), RotateEngine::~RotateEngine(), ScanThread::~ScanThread(), SharpenEngine::~SharpenEngine(), ThreadExec::~ThreadExec(), Tracking::~Tracking(), VDeviceBUZInput::~VDeviceBUZInput(), and VideoWindow::~VideoWindow().

int Thread::suspend_thread (  ) 

Definition at line 162 of file thread.C.

References tid, and tid_valid.

int Thread::continue_thread (  ) 

Definition at line 168 of file thread.C.

References tid, and tid_valid.

int Thread::exit_thread (  ) 

Definition at line 150 of file thread.C.

References synchronous, tid, and tid_valid.

int Thread::enable_cancel (  ) 

int Thread::disable_cancel (  ) 

int Thread::get_cancel_enabled (  ) 

Definition at line 145 of file thread.C.

References cancel_enabled.

int Thread::running (  ) 

int Thread::set_synchronous ( int  value  ) 

int Thread::set_realtime ( int  value = 1  ) 

int Thread::set_autodelete ( int  value  ) 

Definition at line 191 of file thread.C.

References autodelete.

int Thread::get_autodelete (  ) 

Definition at line 197 of file thread.C.

References autodelete.

int Thread::get_realtime (  ) 

Reimplemented in Record.

Definition at line 214 of file thread.C.

References realtime.

int Thread::calculate_realtime (  )  [static]

Definition at line 207 of file thread.C.

Referenced by start().

int Thread::get_synchronous (  ) 

Definition at line 202 of file thread.C.

References synchronous.

int Thread::get_tid (  ) 

Definition at line 219 of file thread.C.

References tid.


Field Documentation

int Thread::synchronous [private]

int Thread::realtime [private]

Reimplemented in MenuEffectThread, and Record.

Definition at line 46 of file thread.h.

Referenced by entrypoint(), get_realtime(), set_realtime(), and start().

int Thread::autodelete [private]

Definition at line 47 of file thread.h.

Referenced by entrypoint(), get_autodelete(), join(), and set_autodelete().

int Thread::thread_running [private]

Reimplemented in PreferencesThread.

Definition at line 48 of file thread.h.

Referenced by entrypoint(), running(), start(), and Thread().

pthread_t Thread::tid [private]

Reimplemented in AVC1394TransportThread.

Definition at line 49 of file thread.h.

Referenced by cancel(), continue_thread(), entrypoint(), exit_thread(), get_tid(), join(), start(), suspend_thread(), and Thread().

int Thread::tid_valid [private]

Definition at line 50 of file thread.h.

Referenced by cancel(), continue_thread(), end(), exit_thread(), join(), start(), suspend_thread(), and Thread().

int Thread::cancel_enabled [private]

Definition at line 51 of file thread.h.

Referenced by disable_cancel(), enable_cancel(), entrypoint(), get_cancel_enabled(), and Thread().


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

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