
Go to the source code of this file.
Defines | |
| #define | LIBVLC_USE_PTHREAD 1 |
| #define | LIBVLC_USE_PTHREAD_CANCEL 1 |
| #define | _APPLE_C_SOURCE 1 |
| #define | VLC_THREAD_PRIORITY_LOW 0 |
| #define | VLC_THREAD_PRIORITY_INPUT 10 |
| #define | VLC_THREAD_PRIORITY_AUDIO 5 |
| #define | VLC_THREAD_PRIORITY_VIDEO 0 |
| #define | VLC_THREAD_PRIORITY_OUTPUT 15 |
| #define | VLC_THREAD_PRIORITY_HIGHEST 20 |
| #define | VLC_STATIC_MUTEX PTHREAD_MUTEX_INITIALIZER |
| #define | vlc_cleanup_push(routine, arg) pthread_cleanup_push (routine, arg) |
| Registers a new procedure to run if the thread is cancelled (or otherwise exits prematurely). | |
| #define | vlc_cleanup_pop() pthread_cleanup_pop (0) |
| Removes a cleanup procedure that was previously registered with vlc_cleanup_push(). | |
| #define | vlc_cleanup_run() pthread_cleanup_pop (1) |
| Removes a cleanup procedure that was previously registered with vlc_cleanup_push(), and executes it. | |
| #define | mutex_cleanup_push(lock) vlc_cleanup_push (vlc_cleanup_lock, lock) |
| #define | vlc_spin_lock vlc_mutex_lock |
| #define | vlc_spin_unlock vlc_mutex_unlock |
| #define | vlc_spin_destroy vlc_mutex_destroy |
| #define | vlc_thread_create(P_THIS, PSZ_NAME, FUNC, PRIORITY) vlc_thread_create( VLC_OBJECT(P_THIS), __FILE__, __LINE__, PSZ_NAME, FUNC, PRIORITY ) |
| #define | vlc_thread_set_priority(P_THIS, PRIORITY) __vlc_thread_set_priority( VLC_OBJECT(P_THIS), __FILE__, __LINE__, PRIORITY ) |
| #define | vlc_thread_join(P_THIS) __vlc_thread_join( VLC_OBJECT(P_THIS) ) |
Typedefs | |
| typedef pthread_t | vlc_thread_t |
| typedef pthread_mutex_t | vlc_mutex_t |
| typedef pthread_cond_t | vlc_cond_t |
| typedef sem_t | vlc_sem_t |
| typedef pthread_rwlock_t | vlc_rwlock_t |
| typedef pthread_key_t | vlc_threadvar_t |
| typedef struct vlc_timer * | vlc_timer_t |
| typedef vlc_mutex_t | vlc_spinlock_t |
Functions | |
| void | vlc_mutex_init (vlc_mutex_t *) |
| void | vlc_mutex_init_recursive (vlc_mutex_t *) |
| void | vlc_mutex_destroy (vlc_mutex_t *) |
| Destroys a mutex. | |
| void | vlc_mutex_lock (vlc_mutex_t *) |
| Acquires a mutex. | |
| int | vlc_mutex_trylock (vlc_mutex_t *) |
| Acquires a mutex if and only if it is not currently held by another thread. | |
| void | vlc_mutex_unlock (vlc_mutex_t *) |
| Releases a mutex (or crashes if the mutex is not locked by the caller). | |
| void | vlc_cond_init (vlc_cond_t *) |
| void | vlc_cond_destroy (vlc_cond_t *) |
| Destroys a condition variable. | |
| void | vlc_cond_signal (vlc_cond_t *) |
| Wakes up one thread waiting on a condition variable, if any. | |
| void | vlc_cond_broadcast (vlc_cond_t *) |
| Wakes up all threads (if any) waiting on a condition variable. | |
| void | vlc_cond_wait (vlc_cond_t *, vlc_mutex_t *) |
| Waits for a condition variable. | |
| int | vlc_cond_timedwait (vlc_cond_t *, vlc_mutex_t *, mtime_t) |
| Waits for a condition variable up to a certain date. | |
| void | vlc_sem_init (vlc_sem_t *, unsigned) |
| Initializes a semaphore. | |
| void | vlc_sem_destroy (vlc_sem_t *) |
| Destroys a semaphore. | |
| int | vlc_sem_post (vlc_sem_t *) |
| Increments the value of a semaphore. | |
| void | vlc_sem_wait (vlc_sem_t *) |
| Atomically wait for the semaphore to become non-zero (if needed), then decrements it. | |
| void | vlc_rwlock_init (vlc_rwlock_t *) |
| Initializes a read/write lock. | |
| void | vlc_rwlock_destroy (vlc_rwlock_t *) |
| Destroys an initialized unused read/write lock. | |
| void | vlc_rwlock_rdlock (vlc_rwlock_t *) |
| Acquires a read/write lock for reading. | |
| void | vlc_rwlock_wrlock (vlc_rwlock_t *) |
| Acquires a read/write lock for writing. | |
| void | vlc_rwlock_unlock (vlc_rwlock_t *) |
| Releases a read/write lock. | |
| int | vlc_threadvar_create (vlc_threadvar_t *, void(*)(void *)) |
| Allocates a thread-specific variable. | |
| void | vlc_threadvar_delete (vlc_threadvar_t *) |
| int | vlc_threadvar_set (vlc_threadvar_t, void *) |
| Sets a thread-specific variable. | |
| void * | vlc_threadvar_get (vlc_threadvar_t) |
| Gets the value of a thread-local variable for the calling thread. | |
| int | vlc_thread_create (vlc_object_t *, const char *, int, const char *, void *(*)(vlc_object_t *), int) |
| int | __vlc_thread_set_priority (vlc_object_t *, const char *, int, int) |
| void | __vlc_thread_join (vlc_object_t *) |
| int | vlc_clone (vlc_thread_t *, void *(*)(void *), void *, int) |
| void | vlc_cancel (vlc_thread_t) |
| Marks a thread as cancelled. | |
| void | vlc_join (vlc_thread_t, void **) |
| Waits for a thread to complete (if needed), then destroys it. | |
| void | vlc_control_cancel (int cmd,...) |
| int | vlc_timer_create (vlc_timer_t *, void(*)(void *), void *) |
| Initializes an asynchronous timer. | |
| void | vlc_timer_destroy (vlc_timer_t) |
| Destroys an initialized timer. | |
| void | vlc_timer_schedule (vlc_timer_t, bool, mtime_t, mtime_t) |
| Arm or disarm an initialized timer. | |
| unsigned | vlc_timer_getoverrun (vlc_timer_t) |
| Fetch and reset the overrun counter for a timer. | |
| int | vlc_savecancel (void) |
| Save the current cancellation state (enabled or disabled), then disable cancellation for the calling thread. | |
| void | vlc_restorecancel (int state) |
| Restore the cancellation state for the calling thread. | |
| void | vlc_testcancel (void) |
| Issues an explicit deferred cancellation point. | |
| static void | vlc_cleanup_lock (void *lock) |
| static void | vlc_spin_init (vlc_spinlock_t *spin) |
| static void | barrier (void) |
| Issues a full memory barrier. | |
| #define _APPLE_C_SOURCE 1 |
| #define LIBVLC_USE_PTHREAD 1 |
| #define LIBVLC_USE_PTHREAD_CANCEL 1 |
| #define mutex_cleanup_push | ( | lock | ) | vlc_cleanup_push (vlc_cleanup_lock, lock) |
Referenced by block_FifoGet(), block_FifoPace(), block_FifoShow(), event_async_loop(), GetUnused(), KeepAliveThread(), Run(), and TsRun().
| #define vlc_cleanup_pop | ( | ) | pthread_cleanup_pop (0) |
Removes a cleanup procedure that was previously registered with vlc_cleanup_push().
Referenced by ALSAThread(), block_FifoGet(), block_FifoPace(), block_File(), event_async_loop(), GetUnused(), KeepAliveThread(), rtp_dgram_recv(), rtp_stream_recv(), Run(), ThreadSend(), ThreadWrite(), and TsRun().
| #define vlc_cleanup_push | ( | routine, | |||
| arg | ) | pthread_cleanup_push (routine, arg) |
Registers a new procedure to run if the thread is cancelled (or otherwise exits prematurely).
Any call to vlc_cleanup_push() must paired with a call to either vlc_cleanup_pop() or vlc_cleanup_run(). Branching into or out of the block between these two function calls is not allowed (read: it will likely crash the whole process). If multiple procedures are registered, they are handled in last-in first-out order.
| routine | procedure to call if the thread ends | |
| arg | argument for the procedure |
Referenced by ALSAThread(), rtp_thread(), Run(), Thread(), and TsRun().
| #define vlc_cleanup_run | ( | ) | pthread_cleanup_pop (1) |
Removes a cleanup procedure that was previously registered with vlc_cleanup_push(), and executes it.
Referenced by block_FifoShow(), rtp_thread(), Run(), Thread(), and TsRun().
| #define vlc_spin_destroy vlc_mutex_destroy |
Referenced by barrier(), Destroy(), libvlc_log_close(), vlc_object_destroy(), vlc_release(), and vout_statistic_Clean().
| #define vlc_spin_lock vlc_mutex_lock |
Referenced by __vlc_object_hold(), __vlc_object_release(), __vlc_object_set_destructor(), activity_cb(), barrier(), Filter(), handler(), interface_changed_cb(), item_changed_cb(), libvlc_log_clear(), libvlc_log_count(), libvlc_log_get_iterator(), libvlc_log_iterator_next(), MotionBlurCallback(), playlist_current_cb(), PreciseRotateCallback(), process_events(), RenderBlur(), vlc_gc_init(), vlc_hold(), vlc_release(), vout_statistic_GetReset(), and vout_statistic_Update().
| #define vlc_spin_unlock vlc_mutex_unlock |
Referenced by __vlc_object_hold(), __vlc_object_release(), __vlc_object_set_destructor(), activity_cb(), barrier(), Filter(), handler(), interface_changed_cb(), item_changed_cb(), libvlc_log_clear(), libvlc_log_count(), libvlc_log_get_iterator(), libvlc_log_iterator_next(), MotionBlurCallback(), playlist_current_cb(), PreciseRotateCallback(), process_events(), RenderBlur(), vlc_gc_init(), vlc_hold(), vlc_release(), vout_statistic_GetReset(), and vout_statistic_Update().
| #define VLC_STATIC_MUTEX PTHREAD_MUTEX_INITIALIZER |
| #define vlc_thread_create | ( | P_THIS, | |||
| PSZ_NAME, | |||||
| FUNC, | |||||
| PRIORITY | ) | vlc_thread_create( VLC_OBJECT(P_THIS), __FILE__, __LINE__, PSZ_NAME, FUNC, PRIORITY ) |
| #define vlc_thread_join | ( | P_THIS | ) | __vlc_thread_join( VLC_OBJECT(P_THIS) ) |
Referenced by Atmo_Shutdown(), Callback(), CheckAndStopFadeThread(), Close(), CloseEncoder(), Del(), DStreamDelete(), input_DecoderDelete(), intf_DestroyAll(), LoopInput(), Open(), release_input_thread(), Run(), stop_osdvnc(), demux_sys_t::StopUiThread(), Stress(), system_End(), CThread::Terminate(), transcode_video_close(), vlm_ControlMediaInstanceStart(), vlm_MediaInstanceDelete(), vlm_OnMediaUpdate(), and vnc_worker_thread().
| #define VLC_THREAD_PRIORITY_AUDIO 5 |
Referenced by input_DecoderNew().
| #define VLC_THREAD_PRIORITY_HIGHEST 20 |
Referenced by Open().
| #define VLC_THREAD_PRIORITY_INPUT 10 |
Referenced by DecoderOpen(), input_Start(), Open(), Run(), stream_DemuxNew(), vlc_timer_schedule(), and vlc_timer_thread().
| #define VLC_THREAD_PRIORITY_LOW 0 |
Referenced by __vlm_New(), VLCPlaylist::addNode:, Atmo_Shutdown(), CreateFilter(), EmOpen(), EventThreadStart(), httpd_TLSHostNew(), Init(), intf_Create(), libvlc_event_async_init(), VLCMain::manage, MMSTUOpen(), Open(), Open_LuaIntf(), Play(), playlist_Activate(), playlist_fetcher_Push(), playlist_preparser_Push(), CThread::Run(), Run(), demux_sys_t::StartUiThread(), StateCallback(), system_Init(), VLCControls::toggleVarThread:, and vnc_worker_thread().
| #define VLC_THREAD_PRIORITY_OUTPUT 15 |
Referenced by __vout_Create(), CreateFilter(), Open(), and OpenDisplay().
| #define VLC_THREAD_PRIORITY_VIDEO 0 |
Referenced by EncodeVideo(), and input_DecoderNew().
| #define vlc_thread_set_priority | ( | P_THIS, | |||
| PRIORITY | ) | __vlc_thread_set_priority( VLC_OBJECT(P_THIS), __FILE__, __LINE__, PRIORITY ) |
Referenced by VLCPlaylist::addNode:, CreateFilter(), Init(), VLCMain::manage, Run(), and VLCControls::toggleVarThread:.
| typedef pthread_cond_t vlc_cond_t |
| typedef pthread_mutex_t vlc_mutex_t |
| typedef pthread_rwlock_t vlc_rwlock_t |
| typedef sem_t vlc_sem_t |
| typedef vlc_mutex_t vlc_spinlock_t |
| typedef pthread_t vlc_thread_t |
| typedef pthread_key_t vlc_threadvar_t |
| typedef struct vlc_timer* vlc_timer_t |
| void __vlc_thread_join | ( | vlc_object_t * | ) |
References vlc_object_internals_t::b_thread, HANDLE, msg_Dbg, vlc_object_internals_t::thread_id, vlc_internals, and vlc_join().
| int __vlc_thread_set_priority | ( | vlc_object_t * | , | |
| const char * | , | |||
| int | , | |||
| int | ||||
| ) |
| static void barrier | ( | void | ) | [inline, static] |
Issues a full memory barrier.
References vlc_spin_destroy, vlc_spin_init(), vlc_spin_lock, and vlc_spin_unlock.
Referenced by __pl_Hold(), libvlc_InternalCleanup(), and video_new_buffer_decoder().
| void vlc_cancel | ( | vlc_thread_t | thread_id | ) |
Marks a thread as cancelled.
Next time the target thread reaches a cancellation point (while not having disabled cancellation), it will run its cancellation cleanup handler, the thread variable destructors, and terminate. vlc_join() must be used afterward regardless of a thread being cancelled or not.
References vlc_cancel_self().
Referenced by Close(), libvlc_event_async_fini(), MMSTUClose(), vlc_thread_cancel(), and vlc_timer_schedule().
| static void vlc_cleanup_lock | ( | void * | lock | ) | [inline, static] |
References vlc_mutex_unlock().
| int vlc_clone | ( | vlc_thread_t * | , | |
| void * | *)(void *, | |||
| void * | , | |||
| int | ||||
| ) |
| void vlc_cond_broadcast | ( | vlc_cond_t * | p_condvar | ) |
Wakes up all threads (if any) waiting on a condition variable.
| p_cond | condition variable |
Referenced by block_FifoEmpty(), block_FifoGet(), block_FifoWake(), event_async_loop(), TriggerCallback(), vlc_rwlock_unlock(), vout_snapshot_End(), and vout_snapshot_Set().
| void vlc_cond_destroy | ( | vlc_cond_t * | p_condvar | ) |
Destroys a condition variable.
No threads shall be waiting or signaling the condition.
| p_condvar | condition variable to destroy |
References VLC_THREAD_ASSERT.
Referenced by AudioStreamChangeFormat(), block_FifoRelease(), Close(), Close_LuaIntf(), CloseEncoder(), CommonClose(), DecoderClose(), DecoderOpen(), DeleteDecoder(), Destructor(), EventThreadDestroy(), CAtmoLiveView::Execute(), httpd_TLSHostNew(), KillerThread(), libvlc_event_async_fini(), libvlc_InternalDestroy(), MMSTUClose(), MMSTUOpen(), Open(), playlist_Destructor(), playlist_fetcher_Delete(), playlist_preparser_Delete(), transcode_video_close(), vlc_object_destroy(), vlc_rwlock_destroy(), vlc_timer_destroy(), vout_Destructor(), vout_snapshot_Clean(), WaitPreparsed(), BDAOutput::~BDAOutput(), and CAtmoExternalCaptureInput::~CAtmoExternalCaptureInput().
| void vlc_cond_init | ( | vlc_cond_t * | ) |
References CLOCK_MONOTONIC.
Referenced by __vlc_custom_create(), __vout_Create(), AudioStreamChangeFormat(), BDAOutput::BDAOutput(), block_FifoNew(), CommonOpen(), Create(), CreateDecoder(), DecoderOpen(), EncodeVideo(), EventThreadCreate(), CAtmoLiveView::Execute(), httpd_TLSHostNew(), KillerThread(), libvlc_event_async_init(), libvlc_InternalCreate(), MMSTUOpen(), Open(), Open_LuaIntf(), playlist_Create(), playlist_fetcher_New(), playlist_preparser_New(), vlc_rwlock_init(), vlc_timer_create(), vout_snapshot_Init(), and WaitPreparsed().
| void vlc_cond_signal | ( | vlc_cond_t * | p_condvar | ) |
Wakes up one thread waiting on a condition variable, if any.
| p_condvar | condition variable |
References VLC_THREAD_ASSERT.
Referenced by AddToQueue(), Block(), block_FifoPut(), Close_LuaIntf(), CloseEncoder(), Control(), DecodeBlock(), DecoderClose(), DecoderFlush(), DecoderPlayAudio(), DecoderPlaySout(), DecoderPlaySpu(), DecoderPlayVideo(), DecoderProcessOnFlush(), DecoderSignalBuffering(), DecoderThread(), DecOpen(), CAtmoExternalCaptureInput::DeliverNewSourceDataPaket(), DestroyPicture(), EventThread(), CmdReleaseVoutWindow::execute(), CmdNewVoutWindow::execute(), FfmpegExecute(), GoAndPreparse(), input_ControlPush(), input_DecoderChangePause(), input_DecoderDelete(), input_DecoderFrameNext(), input_DecoderStartBuffering(), input_DecoderStopBuffering(), InputEvent(), ItemToNode(), libvlc_event_async_dispatch(), libvlc_Quit(), playlist_Deactivate(), playlist_LiveSearchUpdate(), playlist_SendAddNotify(), playlist_TreeMove(), playlist_TreeMoveMany(), PlaylistNext(), PlaylistVAControl(), BDAOutput::Push(), RandomCallback(), CapturePin::Receive(), rtmp_handler_invoke(), Run(), RunThread(), StreamListener(), CThread::Terminate(), Thread(), ThreadControl(), transcode_video_close(), transcode_video_process(), UrlsChange(), video_widget_ready(), vlc_rwlock_unlock(), vlc_timer_do(), vout_ChangePause(), vout_Close(), vout_DisplayPicture(), vout_DropPicture(), vout_FixLeaks(), vout_Flush(), and vout_NextPicture().
| int vlc_cond_timedwait | ( | vlc_cond_t * | p_condvar, | |
| vlc_mutex_t * | p_mutex, | |||
| mtime_t | deadline | |||
| ) |
Waits for a condition variable up to a certain date.
This works like vlc_cond_wait(), except for the additional timeout.
| p_condvar | condition variable to wait on | |
| p_mutex | mutex which is unlocked while waiting, then locked again when waking up. | |
| deadline | absolute timeout |
References CLOCK_FREQ, lldiv(), mdate(), lldiv_t::quot, lldiv_t::rem, vlc_testcancel(), and VLC_THREAD_ASSERT.
Referenced by AudioStreamChangeFormat(), ControlPop(), DecoderWaitDate(), BDAOutput::Pop(), Run(), RunThread(), CThread::ThreadSleep(), vout_snapshot_Get(), and WaitPreparsed().
| void vlc_cond_wait | ( | vlc_cond_t * | p_condvar, | |
| vlc_mutex_t * | p_mutex | |||
| ) |
Waits for a condition variable.
The calling thread will be suspended until another thread calls vlc_cond_signal() or vlc_cond_broadcast() on the same condition variable, the thread is cancelled with vlc_cancel(), or the system causes a "spurious" unsolicited wake-up.
A mutex is needed to wait on a condition variable. It must not be a recursive mutex. Although it is possible to use the same mutex for multiple condition, it is not valid to use different mutexes for the same condition variable at the same time from different threads.
In case of thread cancellation, the mutex is always locked before cancellation proceeds.
The canonical way to use a condition variable to wait for event foobar is:
vlc_mutex_lock (&lock); mutex_cleanup_push (&lock); // release the mutex in case of cancellation while (!foobar) vlc_cond_wait (&wait, &lock); --- foobar is now true, do something about it here -- vlc_cleanup_run (); // release the mutex
| p_condvar | condition variable to wait on | |
| p_mutex | mutex which is unlocked while waiting, then locked again when waking up. | |
| deadline | absolute timeout |
References vlc_testcancel(), and VLC_THREAD_ASSERT.
Referenced by __vout_Create(), block_FifoGet(), block_FifoPace(), block_FifoShow(), DecodeBlock(), DecoderFlush(), DecoderOpen(), DecoderThread(), DecoderWaitUnblock(), Demux(), ErrorThread(), event_async_loop(), EventThreadStart(), FfmpegExecute(), GetUnused(), VoutManager::getWindow(), input_DecoderWaitBuffering(), KeepAliveThread(), KillerThread(), libvlc_event_async_ensure_listener_removal(), libvlc_InternalWait(), LoopRequest(), OpenWindow(), playlist_fetcher_Delete(), playlist_preparser_Delete(), ReadCompressed(), VoutManager::releaseWindow(), rtmp_connect_active(), rtmp_connect_passive(), Run(), Thread(), TsRun(), vlc_rwlock_rdlock(), vlc_rwlock_wrlock(), vlc_timer_destroy(), vlclua_lock_and_wait(), and vout_NextPicture().
| void vlc_control_cancel | ( | int | cmd, | |
| ... | ||||
| ) |
References cancel_key, vlc_cancel_t::cleaners, vlc_cancel_t::killed, and vlc_threadvar_get().
Referenced by vlc_cancel_self().
| void vlc_join | ( | vlc_thread_t | handle, | |
| void ** | result | |||
| ) |
Waits for a thread to complete (if needed), then destroys it.
This is a cancellation point; in case of cancellation, the join does _not_ occur.
| handle | thread handle | |
| p_result | [OUT] pointer to write the thread return value or NULL |
References vlc_testcancel(), and VLC_THREAD_ASSERT.
Referenced by __vlc_thread_join(), Close(), Close_LuaIntf(), DecoderClose(), DecoderOpen(), EventThreadStart(), EventThreadStop(), libvlc_event_async_fini(), MMSTUClose(), playlist_Deactivate(), vlc_timer_schedule(), vlm_Destructor(), and vout_Close().
| void vlc_mutex_destroy | ( | vlc_mutex_t * | p_mutex | ) |
Destroys a mutex.
The mutex must not be locked.
| p_mutex | mutex to destroy |
References VLC_THREAD_ASSERT.
Referenced by __vlm_New(), aout_DecDelete(), aout_Destructor(), AudioStreamChangeFormat(), block_FifoRelease(), Close(), Close_LuaIntf(), CloseDecoder(), CloseEncoder(), ClosePostproc(), CloseServer(), CloseVideo(), CommonClose(), CreateFilter(), Deactivate(), DecoderClose(), DecoderOpen(), DecSysRelease(), DeleteDecoder(), Destroy(), DestroyFilter(), Destructor(), DllMain(), End(), EsOutDelete(), demux_sys_t::EventThread(), EventThreadDestroy(), FreeMutex(), httpd_TLSHostNew(), input_clock_Delete(), input_item_Clean(), input_resource_Delete(), KillerThread(), libvlc_event_async_fini(), libvlc_event_manager_release(), libvlc_InternalDestroy(), libvlc_media_list_player_release(), libvlc_media_list_release(), libvlc_media_list_view_release(), libvlc_media_player_destroy(), libvlc_media_player_new(), libvlc_release(), main(), MediaDel(), MMSTUClose(), MMSTUOpen(), Open(), OpenServer(), picture_fifo_Delete(), playlist_Destructor(), playlist_fetcher_Delete(), playlist_preparser_Delete(), RtspUnsetup(), sout_DeleteInstance(), spu_Destroy(), transcode_video_close(), vlc_event_manager_fini(), vlc_module_destruct(), vlc_object_destroy(), vlc_rwlock_destroy(), vlc_timer_destroy(), vlm_Destructor(), vout_DeleteDisplay(), vout_Destructor(), vout_snapshot_Clean(), BDAOutput::~BDAOutput(), CAtmoDynData::~CAtmoDynData(), CAtmoExternalCaptureInput::~CAtmoExternalCaptureInput(), demux_sys_t::~demux_sys_t(), and FullscreenControllerWidget::~FullscreenControllerWidget().
| void vlc_mutex_init | ( | vlc_mutex_t * | ) |
Referenced by __aout_New(), __sout_NewInstance(), __spu_Create(), __var_Create(), __vlc_custom_create(), __vlc_event_manager_init(), __vlm_New(), __vout_Create(), Activate(), AudioStreamChangeFormat(), BDAOutput::BDAOutput(), block_FifoNew(), CommonOpen(), Create(), CreateDecoder(), CreateFilter(), DecNew(), DecoderOpen(), demux_sys_t::demux_sys_t(), DisplayNew(), DllMain(), EncodeVideo(), EventThreadCreate(), httpd_StreamNew(), httpd_TLSHostNew(), Init(), input_clock_New(), input_item_Init(), input_resource_New(), KillerThread(), libvlc_event_async_init(), libvlc_event_manager_new(), libvlc_InternalCreate(), libvlc_media_list_new(), libvlc_media_list_player_new(), libvlc_media_list_view_new(), libvlc_media_player_new(), libvlc_new(), main(), MediaNew(), MMSTUOpen(), Open(), Open_LuaIntf(), OpenCommon(), OpenDecoder(), OpenPostproc(), OpenServer(), picture_fifo_New(), playlist_Create(), playlist_fetcher_New(), playlist_preparser_New(), RtspSetup(), demux_sys_t::StartUiThread(), stats_NewInputStats(), VideoWindow::VideoWindow(), vlc_module_create(), vlc_mutex_lock(), vlc_mutex_trylock(), vlc_rwlock_init(), vlc_spin_init(), vlc_timer_create(), and vout_snapshot_Init().
| void vlc_mutex_init_recursive | ( | vlc_mutex_t * | ) |
| void vlc_mutex_lock | ( | vlc_mutex_t * | p_mutex | ) |
Acquires a mutex.
If needed, waits for any other thread to release it. Beware of deadlocks when locking multiple mutexes at the same time, or when using mutexes from callbacks. This function is not a cancellation-point.
| p_mutex | mutex initialized with vlc_mutex_init() or vlc_mutex_init_recursive() |
References vlc_mutex_init(), vlc_mutex_lock(), vlc_mutex_unlock(), and VLC_THREAD_ASSERT.
Referenced by __config_GetPsz(), __config_LoadConfigFile(), __config_PutPsz(), __config_ResetAll(), __module_InitBank(), __osd_ButtonFind(), __osd_ButtonSelect(), __osd_MenuActivate(), __osd_MenuCreate(), __osd_MenuDelete(), __osd_MenuDown(), __osd_MenuHide(), __osd_MenuNext(), __osd_MenuPrev(), __osd_MenuShow(), __osd_MenuUp(), __osd_Volume(), __stats_TimerClean(), __stats_TimerDump(), __stats_TimersCleanAll(), __stats_TimersDumpAll(), __stats_TimerStart(), __stats_TimerStop(), __str_format_meta(), __var_AddCallback(), __var_Change(), __var_Create(), __var_DelCallback(), __var_Destroy(), __var_GetAndSet(), __var_TriggerCallback(), __var_Type(), __vlc_event_attach(), __vlc_object_kill(), __vlm_New(), __vout_Create(), __vout_Request(), AcquireDrawable(), ActiveKeyCallback(), Add(), AddOut(), AddToQueue(), AdjustCallback(), AllCallback(), aout_lock_input(), aout_lock_input_fifos(), aout_lock_mixer(), aout_lock_output_fifo(), aout_new_buffer(), AReadBlock(), AReadStream(), Art(), ArtCachePath(), AssHandleHold(), AssHandleRelease(), Atmo_Shutdown(), AudioStreamChangeFormat(), BandsCallback(), Block(), block_FifoEmpty(), block_FifoGet(), block_FifoPace(), block_FifoPut(), block_FifoShow(), block_FifoWake(), BlockDecode(), BluescreenCallback(), ButtonUpdate(), CacheChanged(), callback(), cb_delete(), cb_fetch(), cb_store(), ChangeKeyCallback(), Close(), Close_LuaIntf(), CloseDecoder(), CloseWindow(), CommandThread(), config_AutoSaveConfigFile(), Control(), ControlPop(), ControlReduce(), ControlReopenDevice(), VideoWindow::ControlWindow(), Create(), CreateFilter(), Decode(), DecodeBlock(), DecodePacket(), DecoderClose(), DecoderDecodeAudio(), DecoderDecodeVideo(), DecoderGetCc(), DecoderGetDisplayDate(), DecoderIsFlushing(), DecoderOpen(), DecoderPlayAudio(), DecoderPlaySout(), DecoderPlaySpu(), DecoderPlayVideo(), DecoderProcessOnFlush(), DecoderProcessSpu(), DecoderSignalBuffering(), DecoderThread(), DecoderWaitDate(), DecodeVideo(), DecOpen(), DecSysHold(), DecSysRelease(), Del(), DeleteDecoder(), CAtmoExternalCaptureInput::DeliverNewSourceDataPaket(), DelOut(), Demux(), DemuxFile(), DemuxOpen(), DesktopCallback(), DetachAout(), dialog_GetProvider(), dialog_Register(), dialog_Unregister(), DirectDrawUpdateOverlay(), DirectXEventProc(), DisplayVideo(), DoChildren(), DumpCommand(), End(), CapturePin::EndFlush(), EqzFilter(), EraseCallback(), EsOutAdd(), EsOutControl(), EsOutDel(), EsOutMeta(), EsOutProgramEpg(), EsOutSend(), event_attach(), demux_sys_t::EventKey(), EventKey(), demux_sys_t::EventMouse(), EventThread(), demux_sys_t::EventThread(), EventThreadGetAndResetHasMoved(), EventThreadRetreiveChanges(), EventThreadStart(), EventThreadStop(), EventThreadUpdateSourceAndPlace(), EventThreadUpdateTitle(), EventThreadUpdateWindowPosition(), EventThreadUseOverlay(), CAtmoLiveView::Execute(), CmdReleaseVoutWindow::execute(), CmdNewVoutWindow::execute(), ExtractCallback(), FakeCallback(), Fetch(), FfmpegExecute(), Filter(), FilterCallback(), FilterPacked(), FilterPlanar(), FilterSub(), FilterVideo(), AsyncQueue::flush(), FreePictureVec(), FullscreenControllerWidget::fullscreenChanged(), GatherPES(), GetInputMeta(), VideoWindow::GetWindow(), VoutManager::getWindow(), gnutls_Deinit(), gnutls_Init(), GradientCallback(), HoldAout(), HoldVout(), HoldVouts(), httpd_TLSHostNew(), Inhibit(), InitThread(), InitVideo(), input_clock_ChangePause(), input_clock_ChangeRate(), input_clock_ChangeSystemOrigin(), input_clock_ConvertTS(), input_clock_GetJitter(), input_clock_GetRate(), input_clock_GetState(), input_clock_GetWakeup(), input_clock_Reset(), input_clock_SetJitter(), input_clock_Update(), input_ControlPush(), input_DecoderChangeDelay(), input_DecoderChangePause(), input_DecoderDelete(), input_DecoderFrameNext(), input_DecoderGetCcState(), input_DecoderHasFormatChanged(), input_DecoderIsCcPresent(), input_DecoderSetCcState(), input_DecoderStartBuffering(), input_DecoderStopBuffering(), input_DecoderWaitBuffering(), input_ExtractAttachmentAndCacheArt(), input_item_AddInfo(), input_item_AddOption(), input_item_AddSubItem(), input_item_CopyOptions(), input_item_DelInfo(), input_item_GetDuration(), input_item_GetInfo(), input_item_GetMeta(), input_item_GetName(), input_item_GetTitleFbName(), input_item_GetURI(), input_item_HasErrorWhenReading(), input_item_IsArtFetched(), input_item_IsPreparsed(), input_item_MetaMatch(), input_item_NewWithType(), input_item_SetArtFetched(), input_item_SetArtNotFound(), input_item_SetDuration(), input_item_SetEpg(), input_item_SetEpgOffline(), input_item_SetErrorWhenReading(), input_item_SetMeta(), input_item_SetName(), input_item_SetPreparsed(), input_item_SetURI(), input_item_WriteMeta(), input_resource_Detach(), input_resource_HasVout(), input_resource_RequestAout(), input_resource_RequestSout(), input_resource_RequestVout(), input_resource_SetInput(), input_Stop(), input_UpdateStatistic(), input_vaControl(), InputSourceInit(), InputSourceMeta(), intf_Create(), intf_DestroyAll(), ItemChange(), KeepAliveThread(), KeyEvent(), KillerThread(), libvlc_event_async_dispatch(), libvlc_event_detach(), libvlc_event_manager_register_event_type(), libvlc_event_send(), libvlc_InternalCreate(), libvlc_InternalDestroy(), libvlc_InternalWait(), libvlc_lock(), libvlc_media_list_lock(), libvlc_media_list_media(), libvlc_media_list_release(), libvlc_media_list_retain(), libvlc_media_list_set_media(), libvlc_media_list_view_event_manager(), libvlc_media_list_view_parent_media_list(), libvlc_media_list_view_release(), libvlc_media_list_view_retain(), libvlc_Quit(), libvlc_release(), libvlc_retain(), libvlc_setup_threads(), lock(), CAtmoDynData::LockCriticalSection(), LogoCallback(), main(), MainLoopInterface(), Manage(), MarqueeCallback(), MaskCallback(), media_player_reached_end(), MediaAddES(), MediaDel(), MediaDelES(), MediaNew(), mms_CommandSend(), module_EndBank(), MosaicCallback(), Mouse(), MouseEvent(), msg_Create(), msg_Destroy(), mvar_InfoSetNew(), ItemInfoDialog::OnOk(), onSystrayChange(), onTaskBarChange(), OnTopCallback(), Opaque(), Open(), OpenAudio(), OpenDecoder(), OpenVideo(), OpenWindow(), ParseExecute(), picture_fifo_Flush(), picture_fifo_OffsetDate(), picture_fifo_Peek(), picture_fifo_Pop(), picture_fifo_Push(), playlist_fetcher_Delete(), playlist_fetcher_Push(), playlist_LiveSearchUpdateInternal(), playlist_Lock(), playlist_preparser_Delete(), playlist_preparser_Push(), PlaylistNext(), Position(), PositionChanged(), PostprocPict(), PPChangeMode(), PreampCallback(), Preparse(), PresetCallback(), process_server_message(), MessagesView::Pulse(), AsyncQueue::push(), PushPicture(), PuzzleCallback(), queue_lock(), RateChanged(), Raw1394Handler(), ReadCompressed(), ReadMetaData(), CapturePin::Receive(), Redraw(), ReleaseDrawable(), VideoWindow::ReleaseWindow(), VoutManager::releaseWindow(), Render(), RequestAout(), RequestPage(), RequestVout(), rtmp_connect_active(), rtmp_connect_passive(), rtmp_handler_invoke(), rtp_process(), rtp_thread(), RtspDelId(), RtspHandler(), Run(), RunIntf(), RunThread(), SaveConfigFile(), ScalingCallback(), SDLCallback(), SendIn(), SendOut(), FullscreenControllerWidget::setVoutList(), SharpenCallback(), sout_AnnounceRegisterSDP(), sout_AnnounceUnRegister(), sout_InputDelete(), sout_InputNew(), sout_InputSendBuffer(), spu_DisplaySubpicture(), spu_new_buffer(), spu_OffsetSubtitleDate(), spu_RenderSubpictures(), spu_SortSubpictures(), SpuClearChannel(), SpuControl(), StateCallback(), StateChanged(), Statistics(), stats_ComputeInputStats(), stats_DumpInputStats(), stats_ReinitInputStats(), StillTimer(), StreamListener(), SubFilterCallback(), SwitchDisplay(), CThread::Terminate(), Thread(), ThreadControl(), ThreadSend(), CThread::ThreadSleep(), transcode_video_close(), transcode_video_process(), TriggerCallback(), TSDate(), TsRun(), TwoPassCallback(), uninstall_media_player_observer(), InputStatsPanel::update(), ExtraMetaPanel::update(), UpdateBookmarksOption(), FileInfo::UpdateFileInfo(), ItemInfoDialog::UpdateInfo(), UpdateRegions(), UpdateSPU(), updateStatistics(), VLCInfo::updateStatistics:, UrlsChange(), var_GetChecked(), var_SetChecked(), video_del_buffer_filter(), video_widget_ready(), VideoFilter2Callback(), vlc_avcodec_mutex(), vlc_event_detach(), vlc_event_manager_register_event_type(), vlc_event_send(), vlc_gcrypt_init(), vlc_mutex_lock(), vlc_mutex_trylock(), vlc_object_get_name(), vlc_object_set_name(), vlc_object_waitpipe(), vlc_osso_unblank(), vlc_rwlock_rdlock(), vlc_rwlock_unlock(), vlc_rwlock_wrlock(), vlc_threads_setup(), vlc_timer_destroy(), vlc_timer_do(), vlc_timer_getoverrun(), vlc_timer_schedule(), vlc_timer_thread(), vlclua_lock_and_wait(), vlm_Control(), vlm_Delete(), vlm_ExecuteCommand(), vlm_MediaVodControl(), vnc_worker_thread(), VolumeChanged(), vout_AreDisplayPicturesInvalid(), vout_ChangePause(), vout_Close(), vout_CountPictureAvailable(), vout_CreatePicture(), vout_DestroyPicture(), vout_DisplayPicture(), vout_DisplayTitle(), vout_DropPicture(), vout_FixLeaks(), vout_Flush(), vout_LinkPicture(), vout_ManageDisplay(), vout_new_buffer(), vout_NextPicture(), vout_SetDisplayFullscreen(), vout_SetDisplayOnTop(), vout_snapshot_End(), vout_snapshot_Get(), vout_snapshot_Set(), vout_UnlinkPicture(), VoutDisplayEvent(), VoutDisplayEventMouse(), WaitPreparsed(), and WindowOpen().
| int vlc_mutex_trylock | ( | vlc_mutex_t * | p_mutex | ) |
Acquires a mutex if and only if it is not currently held by another thread.
This function never sleeps and can be used in delay-critical code paths. This function is not a cancellation-point.
Beware: If this function fails, then the mutex is held... by another thread. The calling thread must deal with the error appropriately. That typically implies postponing the operations that would have required the mutex. If the thread cannot defer those operations, then it must use vlc_mutex_lock(). If in doubt, use vlc_mutex_lock() instead.
| p_mutex | mutex initialized with vlc_mutex_init() or vlc_mutex_init_recursive() |
References vlc_mutex_init(), vlc_mutex_lock(), vlc_mutex_unlock(), and VLC_THREAD_ASSERT.
Referenced by vout_snapshot_IsRequested().
| void vlc_mutex_unlock | ( | vlc_mutex_t * | p_mutex | ) |
Releases a mutex (or crashes if the mutex is not locked by the caller).
| p_mutex | mutex locked with vlc_mutex_lock(). |
References VLC_THREAD_ASSERT.
Referenced by __config_GetPsz(), __config_LoadConfigFile(), __config_PutPsz(), __config_ResetAll(), __osd_ButtonFind(), __osd_ButtonSelect(), __osd_MenuActivate(), __osd_MenuCreate(), __osd_MenuDelete(), __osd_MenuDown(), __osd_MenuHide(), __osd_MenuNext(), __osd_MenuPrev(), __osd_MenuShow(), __osd_MenuUp(), __osd_Volume(), __stats_TimerClean(), __stats_TimerDump(), __stats_TimersCleanAll(), __stats_TimersDumpAll(), __stats_TimerStart(), __stats_TimerStop(), __str_format_meta(), __var_AddCallback(), __var_Change(), __var_Create(), __var_DelCallback(), __var_Destroy(), __var_GetAndSet(), __var_TriggerCallback(), __var_Type(), __vlc_event_attach(), __vlc_object_kill(), __vlm_New(), __vout_Create(), __vout_Request(), AcquireDrawable(), ActiveKeyCallback(), Add(), AddOut(), AddToQueue(), AdjustCallback(), AllCallback(), aout_new_buffer(), aout_Restart(), aout_unlock_input(), aout_unlock_input_fifos(), aout_unlock_mixer(), aout_unlock_output_fifo(), AReadBlock(), AReadStream(), Art(), ArtCachePath(), AssHandleHold(), AssHandleRelease(), Atmo_Shutdown(), AudioStreamChangeFormat(), BandsCallback(), Block(), block_FifoEmpty(), block_FifoGet(), block_FifoPace(), block_FifoPut(), block_FifoWake(), BlockDecode(), BluescreenCallback(), ButtonUpdate(), CacheChanged(), callback(), cb_delete(), cb_fetch(), cb_store(), ChangeKeyCallback(), Close(), Close_LuaIntf(), CloseDecoder(), CloseWindow(), CommandThread(), config_AutoSaveConfigFile(), Control(), ControlPop(), ControlReduce(), ControlReopenDevice(), VideoWindow::ControlWindow(), Create(), CreateFilter(), Decode(), DecodeBlock(), DecodePacket(), DecoderClose(), DecoderDecodeAudio(), DecoderDecodeVideo(), DecoderGetCc(), DecoderGetDisplayDate(), DecoderIsFlushing(), DecoderOpen(), DecoderPlayAudio(), DecoderPlaySout(), DecoderPlaySpu(), DecoderPlayVideo(), DecoderProcessOnFlush(), DecoderProcessSpu(), DecoderSignalBuffering(), DecoderThread(), DecoderWaitDate(), DecodeVideo(), DecOpen(), DecSysHold(), DecSysRelease(), Del(), DeleteDecoder(), CAtmoExternalCaptureInput::DeliverNewSourceDataPaket(), DelOut(), Demux(), DemuxFile(), DemuxOpen(), DesktopCallback(), DetachAout(), dialog_GetProvider(), dialog_Register(), dialog_Unregister(), DirectDrawUpdateOverlay(), DirectXEventProc(), DisplayVideo(), DoChildren(), DumpCommand(), End(), CapturePin::EndFlush(), EqzFilter(), EraseCallback(), EsOutAdd(), EsOutControl(), EsOutDel(), EsOutMeta(), EsOutProgramEpg(), EsOutSend(), event_attach(), demux_sys_t::EventKey(), EventKey(), demux_sys_t::EventMouse(), EventThread(), demux_sys_t::EventThread(), EventThreadGetAndResetHasMoved(), EventThreadRetreiveChanges(), EventThreadStart(), EventThreadStop(), EventThreadUpdateSourceAndPlace(), EventThreadUpdateTitle(), EventThreadUpdateWindowPosition(), EventThreadUseOverlay(), CAtmoLiveView::Execute(), CmdReleaseVoutWindow::execute(), CmdNewVoutWindow::execute(), ExtractCallback(), FakeCallback(), Fetch(), FfmpegExecute(), Filter(), FilterCallback(), FilterPacked(), FilterPlanar(), FilterSub(), FilterVideo(), AsyncQueue::flush(), FreePictureVec(), FullscreenControllerWidget::fullscreenChanged(), GatherPES(), GetInputMeta(), VideoWindow::GetWindow(), VoutManager::getWindow(), gnutls_Deinit(), gnutls_Init(), GradientCallback(), HoldAout(), HoldVout(), HoldVouts(), httpd_TLSHostNew(), Inhibit(), InitThread(), InitVideo(), input_clock_ChangePause(), input_clock_ChangeRate(), input_clock_ChangeSystemOrigin(), input_clock_ConvertTS(), input_clock_GetJitter(), input_clock_GetRate(), input_clock_GetState(), input_clock_GetWakeup(), input_clock_Reset(), input_clock_SetJitter(), input_clock_Update(), input_ControlPush(), input_DecoderChangeDelay(), input_DecoderChangePause(), input_DecoderDelete(), input_DecoderFrameNext(), input_DecoderGetCcState(), input_DecoderHasFormatChanged(), input_DecoderIsCcPresent(), input_DecoderSetCcState(), input_DecoderStartBuffering(), input_DecoderStopBuffering(), input_DecoderWaitBuffering(), input_ExtractAttachmentAndCacheArt(), input_item_AddInfo(), input_item_AddOption(), input_item_AddSubItem(), input_item_CopyOptions(), input_item_DelInfo(), input_item_GetDuration(), input_item_GetInfo(), input_item_GetMeta(), input_item_GetName(), input_item_GetTitleFbName(), input_item_GetURI(), input_item_HasErrorWhenReading(), input_item_IsArtFetched(), input_item_IsPreparsed(), input_item_MetaMatch(), input_item_NewWithType(), input_item_SetArtFetched(), input_item_SetArtNotFound(), input_item_SetDuration(), input_item_SetEpg(), input_item_SetEpgOffline(), input_item_SetErrorWhenReading(), input_item_SetMeta(), input_item_SetName(), input_item_SetPreparsed(), input_item_SetURI(), input_item_WriteMeta(), input_resource_Detach(), input_resource_HasVout(), input_resource_RequestAout(), input_resource_RequestSout(), input_resource_RequestVout(), input_resource_SetInput(), input_Stop(), input_UpdateStatistic(), input_vaControl(), InputSourceInit(), InputSourceMeta(), intf_Create(), intf_DestroyAll(), ItemChange(), KeepAliveThread(), KeyEvent(), KillerThread(), libvlc_event_async_dispatch(), libvlc_event_detach(), libvlc_event_manager_register_event_type(), libvlc_event_send(), libvlc_InternalCreate(), libvlc_InternalDestroy(), libvlc_InternalWait(), libvlc_media_list_media(), libvlc_media_list_release(), libvlc_media_list_retain(), libvlc_media_list_set_media(), libvlc_media_list_unlock(), libvlc_media_list_view_event_manager(), libvlc_media_list_view_parent_media_list(), libvlc_media_list_view_release(), libvlc_media_list_view_retain(), libvlc_Quit(), libvlc_release(), libvlc_retain(), libvlc_setup_threads(), libvlc_unlock(), LogoCallback(), main(), MainLoopInterface(), Manage(), MarqueeCallback(), MaskCallback(), media_player_reached_end(), MediaAddES(), MediaDel(), MediaDelES(), MediaNew(), mms_CommandSend(), module_EndBank(), module_LoadPlugins(), MosaicCallback(), Mouse(), MouseEvent(), msg_Create(), msg_Destroy(), mvar_InfoSetNew(), ItemInfoDialog::OnOk(), onSystrayChange(), onTaskBarChange(), OnTopCallback(), Opaque(), Open(), OpenAudio(), OpenDecoder(), OpenVideo(), OpenWindow(), ParseExecute(), picture_fifo_Flush(), picture_fifo_OffsetDate(), picture_fifo_Peek(), picture_fifo_Pop(), picture_fifo_Push(), playlist_fetcher_Delete(), playlist_fetcher_Push(), playlist_LiveSearchUpdateInternal(), playlist_preparser_Delete(), playlist_preparser_Push(), playlist_Unlock(), PlaylistNext(), Position(), PositionChanged(), PostprocPict(), PPChangeMode(), PreampCallback(), Preparse(), PresetCallback(), process_server_message(), MessagesView::Pulse(), AsyncQueue::push(), PushPicture(), PuzzleCallback(), queue_unlock(), RateChanged(), Raw1394Handler(), ReadCompressed(), ReadMetaData(), CapturePin::Receive(), Redraw(), ReleaseDrawable(), VideoWindow::ReleaseWindow(), VoutManager::releaseWindow(), Render(), RequestAout(), RequestPage(), RequestVout(), rtmp_connect_active(), rtmp_connect_passive(), rtmp_handler_invoke(), rtp_process(), rtp_thread(), RtspDelId(), RtspHandler(), Run(), RunIntf(), RunThread(), SaveConfigFile(), ScalingCallback(), SDLCallback(), SendIn(), SendOut(), FullscreenControllerWidget::setVoutList(), SharpenCallback(), sout_AnnounceRegisterSDP(), sout_AnnounceUnRegister(), sout_InputDelete(), sout_InputNew(), sout_InputSendBuffer(), spu_DisplaySubpicture(), spu_new_buffer(), spu_OffsetSubtitleDate(), spu_RenderSubpictures(), spu_SortSubpictures(), SpuClearChannel(), SpuControl(), StateCallback(), StateChanged(), Statistics(), stats_ComputeInputStats(), stats_DumpInputStats(), stats_ReinitInputStats(), StillTimer(), StreamListener(), SubFilterCallback(), SwitchDisplay(), CThread::Terminate(), Thread(), ThreadControl(), ThreadSend(), CThread::ThreadSleep(), transcode_video_close(), transcode_video_process(), TriggerCallback(), TSDate(), TwoPassCallback(), uninstall_media_player_observer(), unlock(), CAtmoDynData::UnLockCriticalSection(), InputStatsPanel::update(), ExtraMetaPanel::update(), UpdateBookmarksOption(), FileInfo::UpdateFileInfo(), ItemInfoDialog::UpdateInfo(), UpdateRegions(), UpdateSPU(), updateStatistics(), VLCInfo::updateStatistics:, UrlsChange(), var_GetChecked(), var_SetChecked(), video_del_buffer_filter(), video_widget_ready(), VideoFilter2Callback(), vlc_avcodec_mutex(), vlc_cleanup_lock(), vlc_event_detach(), vlc_event_manager_register_event_type(), vlc_event_send(), vlc_gcrypt_init(), vlc_mutex_lock(), vlc_mutex_trylock(), vlc_object_get_name(), vlc_object_set_name(), vlc_osso_unblank(), vlc_rwlock_rdlock(), vlc_rwlock_unlock(), vlc_rwlock_wrlock(), vlc_threads_setup(), vlc_timer_destroy(), vlc_timer_do(), vlc_timer_getoverrun(), vlc_timer_schedule(), vlc_timer_thread(), vlclua_lock_and_wait(), vlm_Control(), vlm_Delete(), vlm_ExecuteCommand(), vlm_MediaVodControl(), vnc_worker_thread(), VolumeChanged(), vout_AreDisplayPicturesInvalid(), vout_ChangePause(), vout_Close(), vout_CountPictureAvailable(), vout_CreatePicture(), vout_DestroyPicture(), vout_DisplayPicture(), vout_DisplayTitle(), vout_DropPicture(), vout_FixLeaks(), vout_Flush(), vout_LinkPicture(), vout_ManageDisplay(), vout_new_buffer(), vout_NextPicture(), vout_SetDisplayFullscreen(), vout_SetDisplayOnTop(), vout_snapshot_End(), vout_snapshot_Get(), vout_snapshot_IsRequested(), vout_snapshot_Set(), vout_UnlinkPicture(), VoutDisplayEvent(), VoutDisplayEventMouse(), WaitPreparsed(), and WindowOpen().
| void vlc_restorecancel | ( | int | state | ) |
Restore the cancellation state for the calling thread.
| state | previous state as returned by vlc_savecancel(). |
References cancel_key, vlc_cancel_t::killable, VLC_THREAD_ASSERT, vlc_thread_fatal(), and vlc_threadvar_get().
Referenced by __net_Read(), __vlc_custom_create(), __vlc_object_kill(), __vlc_object_release(), ALSAFill(), AppThread(), CommandThread(), DecoderThread(), DStreamThread(), EventThread(), demux_sys_t::EventThread(), KeepAliveThread(), MainLoop(), Manage(), MsgCallback(), MyThread(), OSSThread(), Overflow(), PrintMsg(), PrintObject(), QNXaoutThread(), QueueMsg(), rtp_recv(), rtp_thread(), Run(), RunIntf(), RunQtThread(), Thread(), ThreadControl(), ThreadSend(), TimeoutPrevention(), TsRun(), update_request_thread(), vlc_thread_fatal(), and vnc_worker_thread().
| void vlc_rwlock_destroy | ( | vlc_rwlock_t * | ) |
Destroys an initialized unused read/write lock.
References vlc_cond_destroy(), vlc_mutex_destroy(), and VLC_THREAD_ASSERT.
Referenced by msg_Destroy().
| void vlc_rwlock_init | ( | vlc_rwlock_t * | ) |
Initializes a read/write lock.
References vlc_cond_init(), and vlc_mutex_init().
Referenced by msg_Create().
| void vlc_rwlock_rdlock | ( | vlc_rwlock_t * | lock | ) |
Acquires a read/write lock for reading.
Recursion is allowed.
References vlc_cond_wait(), vlc_mutex_lock(), vlc_mutex_unlock(), and VLC_THREAD_ASSERT.
Referenced by QueueMsg().
| void vlc_rwlock_unlock | ( | vlc_rwlock_t * | ) |
Releases a read/write lock.
References vlc_cond_broadcast(), vlc_cond_signal(), vlc_mutex_lock(), vlc_mutex_unlock(), and VLC_THREAD_ASSERT.
Referenced by __msg_DisableObjectPrinting(), __msg_EnableObjectPrinting(), msg_Subscribe(), msg_Unsubscribe(), and QueueMsg().
| void vlc_rwlock_wrlock | ( | vlc_rwlock_t * | lock | ) |
Acquires a read/write lock for writing.
Recursion is not allowed.
References vlc_cond_wait(), vlc_mutex_lock(), vlc_mutex_unlock(), and VLC_THREAD_ASSERT.
Referenced by __msg_DisableObjectPrinting(), __msg_EnableObjectPrinting(), msg_Subscribe(), and msg_Unsubscribe().
| int vlc_savecancel | ( | void | ) |
Save the current cancellation state (enabled or disabled), then disable cancellation for the calling thread.
This function must be called before entering a piece of code that is not cancellation-safe, unless it can be proven that the calling thread will not be cancelled.
References cancel_key, vlc_cancel_t::killable, VLC_THREAD_ASSERT, and vlc_threadvar_get().
Referenced by __net_Read(), __vlc_custom_create(), __vlc_object_kill(), __vlc_object_release(), ALSAFill(), AppThread(), CommandThread(), DecoderThread(), DStreamThread(), EventThread(), demux_sys_t::EventThread(), KeepAliveThread(), MainLoop(), Manage(), MsgCallback(), MyThread(), OSSThread(), Overflow(), PrintMsg(), PrintObject(), QNXaoutThread(), QueueMsg(), rtp_recv(), rtp_thread(), Run(), RunIntf(), RunQtThread(), Thread(), ThreadControl(), ThreadSend(), TimeoutPrevention(), TsRun(), update_request_thread(), vlc_thread_fatal(), and vnc_worker_thread().
| void vlc_sem_destroy | ( | vlc_sem_t * | ) |
Destroys a semaphore.
References VLC_THREAD_ASSERT.
Referenced by Close(), Open(), and vlm_OnMediaUpdate().
| void vlc_sem_init | ( | vlc_sem_t * | , | |
| unsigned | ||||
| ) |
| int vlc_sem_post | ( | vlc_sem_t * | ) |
Increments the value of a semaphore.
References VLC_THREAD_ASSERT.
Referenced by InputEventPreparse(), and Thread().
| void vlc_sem_wait | ( | vlc_sem_t * | ) |
Atomically wait for the semaphore to become non-zero (if needed), then decrements it.
References vlc_testcancel(), and VLC_THREAD_ASSERT.
Referenced by ALSAThread(), and vlm_OnMediaUpdate().
| static void vlc_spin_init | ( | vlc_spinlock_t * | spin | ) | [inline, static] |
References vlc_mutex_init().
Referenced by __vlc_custom_create(), barrier(), Create(), libvlc_log_open(), vlc_gc_init(), and vout_statistic_Init().
| void vlc_testcancel | ( | void | ) |
Issues an explicit deferred cancellation point.
This has no effect if thread cancellation is disabled. This can be called when there is a rather slow non-sleeping operation. This is also used to force a cancellation point in a function that would otherwise "not always" be a one (block_FifoGet() is an example).
References cancel_key, vlc_cancel_t::cleaners, vlc_cancel_t::killable, vlc_cancel_t::killed, and vlc_threadvar_get().
Referenced by block_FifoGet(), block_FifoPace(), block_FifoShow(), mwait(), SigThread(), vlc_cond_timedwait(), vlc_cond_wait(), vlc_join(), vlc_poll(), and vlc_sem_wait().
| int vlc_thread_create | ( | vlc_object_t * | , | |
| const char * | , | |||
| int | , | |||
| const char * | , | |||
| void * | *)(vlc_object_t *, | |||
| int | ||||
| ) |
| int vlc_threadvar_create | ( | vlc_threadvar_t * | key, | |
| void(*)(void *) | destr | |||
| ) |
Allocates a thread-specific variable.
| key | where to store the thread-specific variable handle | |
| destr | a destruction callback. It is called whenever a thread exits and the thread-specific variable has a non-NULL value. |
References VLC_UNUSED.
Referenced by DllMain(), libvlc_event_async_init(), libvlc_setup_threads(), and msg_Create().
| void vlc_threadvar_delete | ( | vlc_threadvar_t * | ) |
Referenced by DllMain(), libvlc_event_async_fini(), libvlc_setup_threads(), and msg_Destroy().
| void* vlc_threadvar_get | ( | vlc_threadvar_t | key | ) |
Gets the value of a thread-local variable for the calling thread.
This function cannot fail.
Referenced by current_thread_is_asynch_thread(), get_error(), GetContext(), vlc_control_cancel(), vlc_restorecancel(), vlc_savecancel(), and vlc_testcancel().
| int vlc_threadvar_set | ( | vlc_threadvar_t | key, | |
| void * | value | |||
| ) |
Sets a thread-specific variable.
| key | thread-local variable key (created with vlc_threadvar_create()) | |
| value | new value for the variable for the calling thread |
| key | thread-local variable key (created with vlc_threadvar_create()) | |
| value | new value for the variable for the calling thread |
Referenced by event_async_loop(), GetContext(), libvlc_clearerr(), libvlc_vprinterr(), and vlc_entry().
| int vlc_timer_create | ( | vlc_timer_t * | id, | |
| void(*)(void *) | func, | |||
| void * | data | |||
| ) |
Initializes an asynchronous timer.
| id | pointer to timer to be initialized | |
| func | function that the timer will call | |
| data | parameter for the timer function |
References vlc_timer::data, vlc_timer::func, vlc_timer::handle, vlc_timer::interval, INVALID_HANDLE_VALUE, vlc_timer::lock, vlc_timer::overruns, timer, vlc_timer::users, vlc_timer::value, vlc_cond_init(), vlc_mutex_init(), and vlc_timer::wait.
Referenced by Activate(), CreateFilter(), main(), Open(), and rtp_thread().
| void vlc_timer_destroy | ( | vlc_timer_t | timer | ) |
Destroys an initialized timer.
If needed, the timer is first disarmed. This function is undefined if the specified timer is not initialized.
| timer | timer to destroy |
References vlc_timer::handle, INVALID_HANDLE_VALUE, vlc_timer::lock, vlc_timer::users, vlc_cond_destroy(), vlc_cond_wait(), vlc_mutex_destroy(), vlc_mutex_lock(), vlc_mutex_unlock(), vlc_timer_schedule(), and vlc_timer::wait.
Referenced by Close(), Deactivate(), DestroyFilter(), main(), and timer_cleanup().
| unsigned vlc_timer_getoverrun | ( | vlc_timer_t | timer | ) |
Fetch and reset the overrun counter for a timer.
| timer | initialized timer |
References vlc_timer::lock, vlc_timer::overruns, vlc_mutex_lock(), and vlc_mutex_unlock().
Referenced by callback(), and main().
| void vlc_timer_schedule | ( | vlc_timer_t | timer, | |
| bool | absolute, | |||
| mtime_t | value, | |||
| mtime_t | interval | |||
| ) |
Arm or disarm an initialized timer.
This functions overrides any previous call to itself.
| timer | initialized timer | |
| absolute | the timer value origin is the same as mdate() if true, the timer value is relative to now if false. | |
| value | zero to disarm the timer, otherwise the initial time to wait before firing the timer. | |
| interval | zero to fire the timer just once, otherwise the timer repetition interval. |
References __MAX, __MIN, vlc_timer::handle, vlc_timer::interval, INVALID_HANDLE_VALUE, vlc_timer::lock, lock, mdate(), vlc_timer::thread, vlc_timer::value, vlc_cancel(), vlc_clone(), vlc_join(), vlc_mutex_lock(), vlc_mutex_unlock(), VLC_STATIC_MUTEX, VLC_THREAD_PRIORITY_INPUT, vlc_timer_do(), and vlc_timer_thread().
Referenced by Control(), CreateFilter(), Demux(), Inhibit(), main(), Open(), rtp_process(), and vlc_timer_destroy().
1.5.6