VLC 4.0.0-dev
|
Data Structures | |
struct | vlc_thumbnailer_t |
struct | seek_target |
struct | vlc_thumbnailer_request_t |
Typedefs | |
typedef struct vlc_thumbnailer_request_t | task_t |
Functions | |
static void | RunnableRun (void *) |
static task_t * | TaskNew (vlc_thumbnailer_t *thumbnailer, input_item_t *item, struct seek_target seek_target, bool fast_seek, vlc_thumbnailer_cb cb, void *userdata, vlc_tick_t timeout) |
static void | TaskRelease (task_t *task) |
static void | NotifyThumbnail (task_t *task, picture_t *pic) |
static void | on_thumbnailer_input_event (input_thread_t *input, const struct vlc_input_event *event, void *userdata) |
static void | Interrupt (task_t *task) |
static task_t * | RequestCommon (vlc_thumbnailer_t *thumbnailer, struct seek_target seek_target, enum vlc_thumbnailer_seek_speed speed, input_item_t *item, vlc_tick_t timeout, vlc_thumbnailer_cb cb, void *userdata) |
task_t * | vlc_thumbnailer_RequestByTime (vlc_thumbnailer_t *thumbnailer, vlc_tick_t time, enum vlc_thumbnailer_seek_speed speed, input_item_t *item, vlc_tick_t timeout, vlc_thumbnailer_cb cb, void *userdata) |
vlc_thumbnailer_RequestByTime Requests a thumbnailer at a given time More... | |
task_t * | vlc_thumbnailer_RequestByPos (vlc_thumbnailer_t *thumbnailer, double pos, enum vlc_thumbnailer_seek_speed speed, input_item_t *item, vlc_tick_t timeout, vlc_thumbnailer_cb cb, void *userdata) |
vlc_thumbnailer_RequestByTime Requests a thumbnailer at a given time More... | |
void | vlc_thumbnailer_DestroyRequest (vlc_thumbnailer_t *thumbnailer, task_t *task) |
vlc_thumbnailer_DestroyRequest Destroy a thumbnail request More... | |
vlc_thumbnailer_t * | vlc_thumbnailer_Create (vlc_object_t *parent) |
vlc_thumbnailer_Create Creates a thumbnailer object More... | |
void | vlc_thumbnailer_Release (vlc_thumbnailer_t *thumbnailer) |
vlc_thumbnailer_Release releases a thumbnailer and cancel all pending requests More... | |
typedef struct vlc_thumbnailer_request_t task_t |
|
static |
References vlc_cond_signal(), vlc_mutex_lock(), and vlc_mutex_unlock().
Referenced by vlc_thumbnailer_DestroyRequest().
References task::userdata.
Referenced by RunnableRun().
|
static |
References END_S, ERROR_S, INPUT_EVENT_STATE, INPUT_EVENT_THUMBNAIL_READY, picture_Hold(), vlc_input_event::state, vlc_input_event::thumbnail, vlc_input_event::type, vlc_runnable::userdata, vlc_input_event_state::value, vlc_cond_signal(), vlc_mutex_lock(), vlc_mutex_unlock(), and VLC_UNUSED.
Referenced by RunnableRun().
|
static |
References vlc_thumbnailer_t::executor, task::runnable, TaskNew(), vlc_runnable::userdata, vlc_atomic_rc_inc(), vlc_executor_Submit(), and VLC_THUMBNAILER_SEEK_FAST.
Referenced by vlc_thumbnailer_RequestByPos(), and vlc_thumbnailer_RequestByTime().
|
static |
References input_Close(), input_Create, input_SetPosition(), input_SetTime(), input_Start(), input_Stop(), INPUT_TYPE_THUMBNAILING, task::item, NotifyThumbnail(), on_thumbnailer_input_event(), vlc_thumbnailer_t::parent, picture_Release(), TaskRelease(), task::timeout, vlc_runnable::userdata, vlc_cond_timedwait(), vlc_cond_wait(), vlc_mutex_lock(), vlc_mutex_unlock(), VLC_SUCCESS, vlc_thread_set_name(), VLC_TICK_INVALID, and vlc_tick_now().
Referenced by TaskNew().
|
static |
References input_item_Hold(), task::item, vlc_runnable::run, task::runnable, RunnableRun(), task::timeout, vlc_runnable::userdata, task::userdata, vlc_atomic_rc_init(), vlc_cond_init(), and vlc_mutex_init().
Referenced by RequestCommon().
|
static |
References input_item_Release(), task::item, and vlc_atomic_rc_dec().
Referenced by RunnableRun(), and vlc_thumbnailer_DestroyRequest().
vlc_thumbnailer_t * vlc_thumbnailer_Create | ( | vlc_object_t * | p_parent | ) |
vlc_thumbnailer_Create Creates a thumbnailer object
parent | A VLC object |
References vlc_thumbnailer_t::executor, vlc_thumbnailer_t::parent, unlikely, and vlc_executor_New().
Referenced by libvlc_InternalInit().
void vlc_thumbnailer_DestroyRequest | ( | vlc_thumbnailer_t * | thumbnailer, |
vlc_thumbnailer_request_t * | request | ||
) |
vlc_thumbnailer_DestroyRequest Destroy a thumbnail request
thumbnailer | A thumbnailer object |
request | An opaque thumbnail request object |
The request can be destroyed before receiving a callback (in that case, the callback won't be called) or after (to release resources).
References vlc_thumbnailer_t::executor, Interrupt(), task::runnable, TaskRelease(), vlc_atomic_rc_dec(), and vlc_executor_Cancel().
void vlc_thumbnailer_Release | ( | vlc_thumbnailer_t * | thumbnailer | ) |
vlc_thumbnailer_Release releases a thumbnailer and cancel all pending requests
thumbnailer | A thumbnailer object |
References vlc_thumbnailer_t::executor, and vlc_executor_Delete().
Referenced by libvlc_InternalCleanup().
task_t * vlc_thumbnailer_RequestByPos | ( | vlc_thumbnailer_t * | thumbnailer, |
double | pos, | ||
enum vlc_thumbnailer_seek_speed | speed, | ||
input_item_t * | input_item, | ||
vlc_tick_t | timeout, | ||
vlc_thumbnailer_cb | cb, | ||
void * | user_data | ||
) |
vlc_thumbnailer_RequestByTime Requests a thumbnailer at a given time
thumbnailer | A thumbnailer object |
pos | The position at which the thumbnail should be taken |
speed | The seeking speed |
input_item | The input item to generate the thumbnail for |
timeout | A timeout value, or VLC_TICK_INVALID to disable timeout |
cb | A user callback to be called on completion (success & error) |
user_data | An opaque value, provided as pf_cb's first parameter |
If this function returns a valid request object, the callback is guaranteed to be called, even in case of later failure (except if destroyed early by the user). The returned request object must be freed with vlc_thumbnailer_DestroyRequest(). The provided input_item will be held by the thumbnailer and can safely be released after calling this function.
References seek_target::pos, RequestCommon(), seek_target::type, and seek_target::VLC_THUMBNAILER_SEEK_POS.
task_t * vlc_thumbnailer_RequestByTime | ( | vlc_thumbnailer_t * | thumbnailer, |
vlc_tick_t | time, | ||
enum vlc_thumbnailer_seek_speed | speed, | ||
input_item_t * | input_item, | ||
vlc_tick_t | timeout, | ||
vlc_thumbnailer_cb | cb, | ||
void * | user_data | ||
) |
vlc_thumbnailer_RequestByTime Requests a thumbnailer at a given time
thumbnailer | A thumbnailer object |
time | The time at which the thumbnail should be taken |
speed | The seeking speed |
input_item | The input item to generate the thumbnail for |
timeout | A timeout value, or VLC_TICK_INVALID to disable timeout |
cb | A user callback to be called on completion (success & error) |
user_data | An opaque value, provided as pf_cb's first parameter |
If this function returns a valid request object, the callback is guaranteed to be called, even in case of later failure (except if destroyed early by the user). The returned request object must be freed with vlc_thumbnailer_DestroyRequest(). The provided input_item will be held by the thumbnailer and can safely be released safely after calling this function.
References RequestCommon(), seek_target::time, seek_target::type, and seek_target::VLC_THUMBNAILER_SEEK_TIME.