|
VLC 4.0.0-dev
|
Files | |
| file | vlc_preparser.h |
| VLC Preparser API. | |
Data Structures | |
| struct | vlc_preparser_cbs |
| struct | vlc_thumbnailer_cbs |
| Preparser thumbnailer callbacks. More... | |
| struct | vlc_thumbnailer_to_files_cbs |
| Preparser thumbnailer to file callbacks. More... | |
| struct | vlc_thumbnailer_arg |
| Thumbnailer argument. More... | |
| struct | vlc_thumbnailer_output |
| Thumbnailer output argument. More... | |
| struct | vlc_preparser_cfg |
| Preparser creation configuration. More... | |
Macros | |
| #define | VLC_PREPARSER_TYPE_PARSE 0x01 |
| #define | VLC_PREPARSER_TYPE_FETCHMETA_LOCAL 0x02 |
| #define | VLC_PREPARSER_TYPE_FETCHMETA_NET 0x04 |
| #define | VLC_PREPARSER_TYPE_THUMBNAIL 0x08 |
| #define | VLC_PREPARSER_TYPE_THUMBNAIL_TO_FILES 0x10 |
| #define | VLC_PREPARSER_TYPE_FETCHMETA_ALL (VLC_PREPARSER_TYPE_FETCHMETA_LOCAL|VLC_PREPARSER_TYPE_FETCHMETA_NET) |
| #define | VLC_PREPARSER_OPTION_INTERACT 0x1000 |
| #define | VLC_PREPARSER_OPTION_SUBITEMS 0x2000 |
Typedefs | |
| typedef struct vlc_preparser_t | vlc_preparser_t |
| Preparser opaque structure. | |
| typedef struct vlc_preparser_req | vlc_preparser_req |
| Preparser request opaque handle. | |
Enumerations | |
| enum | vlc_thumbnailer_format { VLC_THUMBNAILER_FORMAT_PNG , VLC_THUMBNAILER_FORMAT_WEBP , VLC_THUMBNAILER_FORMAT_JPEG } |
| Thumbnailer output format. More... | |
Functions | |
| vlc_preparser_t * | vlc_preparser_New (vlc_object_t *obj, const struct vlc_preparser_cfg *cfg) |
| This function creates the preparser object and thread. | |
| vlc_preparser_req * | vlc_preparser_Push (vlc_preparser_t *preparser, input_item_t *item, int type_option, const struct vlc_preparser_cbs *cbs, void *cbs_userdata) |
| This function enqueues the provided item to be preparsed or fetched. | |
| vlc_preparser_req * | vlc_preparser_GenerateThumbnail (vlc_preparser_t *preparser, input_item_t *item, const struct vlc_thumbnailer_arg *arg, const struct vlc_thumbnailer_cbs *cbs, void *cbs_userdata) |
| This function enqueues the provided item for generating a thumbnail. | |
| int | vlc_preparser_GetBestThumbnailerFormat (enum vlc_thumbnailer_format *format, const char **out_ext) |
| Get the best possible format. | |
| int | vlc_preparser_CheckThumbnailerFormat (enum vlc_thumbnailer_format format) |
| Check if the format is handled by VLC. | |
| vlc_preparser_req * | vlc_preparser_GenerateThumbnailToFiles (vlc_preparser_t *preparser, input_item_t *item, const struct vlc_thumbnailer_arg *arg, const struct vlc_thumbnailer_output *outputs, size_t output_count, const struct vlc_thumbnailer_to_files_cbs *cbs, void *cbs_userdata) |
| This function generates a thumbnail to one or several files. | |
| size_t | vlc_preparser_Cancel (vlc_preparser_t *preparser, vlc_preparser_req *req) |
| This function cancels ongoing or queued preparsing/thumbnail generation for a given request handle. | |
| input_item_t * | vlc_preparser_req_GetItem (vlc_preparser_req *req) |
| Fetch the input item associated with the request. | |
| void | vlc_preparser_req_Release (vlc_preparser_req *req) |
| Release a preparser request handle. | |
| void | vlc_preparser_Delete (vlc_preparser_t *preparser) |
| This function destroys the preparser object and thread. | |
| void | vlc_preparser_SetTimeout (vlc_preparser_t *preparser, vlc_tick_t timeout) |
| Do not use, libVLC only fonction, will be removed soon. | |
| #define VLC_PREPARSER_OPTION_INTERACT 0x1000 |
| #define VLC_PREPARSER_OPTION_SUBITEMS 0x2000 |
| #define VLC_PREPARSER_TYPE_FETCHMETA_ALL (VLC_PREPARSER_TYPE_FETCHMETA_LOCAL|VLC_PREPARSER_TYPE_FETCHMETA_NET) |
| #define VLC_PREPARSER_TYPE_FETCHMETA_LOCAL 0x02 |
| #define VLC_PREPARSER_TYPE_FETCHMETA_NET 0x04 |
| #define VLC_PREPARSER_TYPE_PARSE 0x01 |
| #define VLC_PREPARSER_TYPE_THUMBNAIL 0x08 |
| #define VLC_PREPARSER_TYPE_THUMBNAIL_TO_FILES 0x10 |
| typedef struct vlc_preparser_req vlc_preparser_req |
Preparser request opaque handle.
Identifies a request submitted via vlc_preparser_Push(), vlc_preparser_GenerateThumbnail(), or vlc_preparser_GenerateThumbnailToFiles(). It can be passed to vlc_preparser_Cancel() to cancel that request.
| typedef struct vlc_preparser_t vlc_preparser_t |
Preparser opaque structure.
The preparser object will retrieve the meta data of any given input item in an asynchronous way. It will also issue art fetching requests.
| size_t vlc_preparser_Cancel | ( | vlc_preparser_t * | preparser, |
| vlc_preparser_req * | req | ||
| ) |
This function cancels ongoing or queued preparsing/thumbnail generation for a given request handle.
| preparser | the preparser object |
| req | request handle returned by vlc_preparser_Push(), vlc_preparser_GenerateThumbnail(), or vlc_preparser_GenerateThumbnailToFiles(). Pass NULL to cancel all pending and running tasks. |
on_ended callback will be triggered with -EINTR status.References vlc_preparser_operations::cancel, vlc_preparser_t::ops, and vlc_preparser_t::sys.
Referenced by vlc_playlist_Clear(), vlc_playlist_Remove(), and vlc_playlist_Replace().
| int vlc_preparser_CheckThumbnailerFormat | ( | enum vlc_thumbnailer_format | format | ) |
Check if the format is handled by VLC.
| format | format to check |
References CheckThumbnailerFormat().
| void vlc_preparser_Delete | ( | vlc_preparser_t * | preparser | ) |
This function destroys the preparser object and thread.
| preparser | the preparser object All pending input items will be released. |
References vlc_preparser_operations::delete, vlc_preparser_t::ops, and vlc_preparser_t::sys.
Referenced by vlc_playlist_Delete(), and vlc_playlist_New().
| vlc_preparser_req * vlc_preparser_GenerateThumbnail | ( | vlc_preparser_t * | preparser, |
| input_item_t * | item, | ||
| const struct vlc_thumbnailer_arg * | arg, | ||
| const struct vlc_thumbnailer_cbs * | cbs, | ||
| void * | cbs_userdata | ||
| ) |
This function enqueues the provided item for generating a thumbnail.
| preparser | the preparser object |
| item | a valid item to generate the thumbnail for |
| arg | pointer to the arg struct, NULL for default options |
| cbs | callback to listen to events (can't be NULL) |
| cbs_userdata | opaque pointer used by the callbacks |
The provided input_item will be held by the thumbnailer and can safely be released safely after calling this function.
References vlc_preparser_operations::generate_thumbnail, vlc_preparser_t::ops, and vlc_preparser_t::sys.
| vlc_preparser_req * vlc_preparser_GenerateThumbnailToFiles | ( | vlc_preparser_t * | preparser, |
| input_item_t * | item, | ||
| const struct vlc_thumbnailer_arg * | arg, | ||
| const struct vlc_thumbnailer_output * | outputs, | ||
| size_t | output_count, | ||
| const struct vlc_thumbnailer_to_files_cbs * | cbs, | ||
| void * | cbs_userdata | ||
| ) |
This function generates a thumbnail to one or several files.
| preparser | the preparser object |
| item | a valid item to generate the thumbnail for |
| arg | pointer to the arg struct, NULL for default options |
| outputs | array of outputs, one file will be generated per output for a single thumbnail |
| output_count | outputs array size, must be > 1 |
| cbs | callback to listen to events (can't be NULL) |
| cbs_userdata | opaque pointer used by the callbacks |
The provided input_item will be held by the thumbnailer and can safely be released safely after calling this function.
References vlc_preparser_operations::generate_thumbnail_to_files, vlc_preparser_t::ops, and vlc_preparser_t::sys.
| int vlc_preparser_GetBestThumbnailerFormat | ( | enum vlc_thumbnailer_format * | format, |
| const char ** | out_ext | ||
| ) |
Get the best possible format.
| [out] | format | pointer to the best format |
| [out] | out_ext | pointer to the extension of the format |
References CheckThumbnailerFormat().
| vlc_preparser_t * vlc_preparser_New | ( | vlc_object_t * | obj, |
| const struct vlc_preparser_cfg * | cfg | ||
| ) |
This function creates the preparser object and thread.
| obj | the parent object |
| cfg | a pointer to a valid confiuration struct |
References vlc_preparser_cfg::external_process, vlc_preparser_t::sys, vlc_preparser_external_New(), and vlc_preparser_internal_New().
Referenced by vlc_playlist_New().
| vlc_preparser_req * vlc_preparser_Push | ( | vlc_preparser_t * | preparser, |
| input_item_t * | item, | ||
| int | type_option, | ||
| const struct vlc_preparser_cbs * | cbs, | ||
| void * | cbs_userdata | ||
| ) |
This function enqueues the provided item to be preparsed or fetched.
The input item is retained until the preparsing is done or until the preparser object is deleted.
| preparser | the preparser object |
| item | a valid item to preparse |
| type_option | a combination of VLC_PREPARSER_TYPE_* and VLC_PREPARSER_OPTION_* flags. The type must be in the set specified in vlc_preparser_New() (it is possible to select less types). |
| cbs | callback to listen to events (can't be NULL) |
| cbs_userdata | opaque pointer used by the callbacks |
References vlc_preparser_t::ops, vlc_preparser_operations::push, and vlc_preparser_t::sys.
Referenced by vlc_media_tree_Preparse(), and vlc_playlist_AutoPreparse().
| input_item_t * vlc_preparser_req_GetItem | ( | vlc_preparser_req * | req | ) |
Fetch the input item associated with the request.
| req | request handle returned by vlc_preparser_Push(), vlc_preparser_GenerateThumbnail(), or vlc_preparser_GenerateThumbnailToFiles(). |
References vlc_preparser_req_operations::get_item, and vlc_preparser_req::ops.
Referenced by media_subtree_changed(), media_subtree_preparse_ended(), and on_preparse_ended().
| void vlc_preparser_req_Release | ( | vlc_preparser_req * | req | ) |
Release a preparser request handle.
| req | the preparser request handle |
References vlc_preparser_req::ops, and vlc_preparser_req_operations::release.
Referenced by media_subtree_preparse_ended(), on_preparse_ended(), OnArtFetchEnded(), ParserRun(), preparser_Cancel(), ThumbnailerRun(), and ThumbnailerToFilesRun().
| void vlc_preparser_SetTimeout | ( | vlc_preparser_t * | preparser, |
| vlc_tick_t | timeout | ||
| ) |
Do not use, libVLC only fonction, will be removed soon.
References vlc_preparser_t::ops, vlc_preparser_operations::set_timeout, and vlc_preparser_t::sys.