|
VLC 4.0.0-dev
|
libvlc_parser_t is an abstract representation of a parser More...
Files | |
| file | libvlc_parser.h |
| LibVLC parser API. | |
Data Structures | |
| union | libvlc_thumbnailer_seek_value_t |
| Thumbnailer seek value. More... | |
| struct | libvlc_parser_cbs |
| struct defining callbacks for libvlc_parser_queue More... | |
| struct | libvlc_parser_request_t |
| struct defining a parse request More... | |
| struct | libvlc_thumbnailer_cbs |
| struct defining callbacks for libvlc_parser_queue_thumbnailing More... | |
| struct | libvlc_thumbnailer_request_t |
| struct defining a thumbnailer request More... | |
| struct | libvlc_parser_cfg |
| struct defining parser configuration More... | |
Enumerations | |
| enum | libvlc_media_parse_flag_t { libvlc_media_parse = 0x01 , libvlc_media_fetch_local = 0x02 , libvlc_media_fetch_network = 0x04 , libvlc_media_do_interact = 0x08 } |
| Parse flags used by libvlc_parser_request_t. More... | |
| enum | libvlc_parser_status_t { libvlc_parser_status_failed , libvlc_parser_status_timeout , libvlc_parser_status_cancelled , libvlc_parser_status_done } |
| Outcome of a finished parse request, reported by libvlc_parser_cbs::on_parsed. More... | |
| enum | libvlc_thumbnailer_seek_type_t { libvlc_thumbnailer_seek_none , libvlc_thumbnailer_seek_time , libvlc_thumbnailer_seek_pos } |
| Thumbnailer seek type. More... | |
| enum | libvlc_thumbnailer_seek_speed_t { libvlc_media_thumbnail_seek_precise , libvlc_media_thumbnail_seek_fast } |
| Thumbnailer seek speed. More... | |
Functions | |
| libvlc_parser_t * | libvlc_parser_new (libvlc_instance_t *inst, const struct libvlc_parser_cfg *cfg) |
| Create a parser. | |
| void | libvlc_parser_destroy (libvlc_parser_t *parser) |
| Destroy a parser and free resources. | |
| libvlc_parser_task * | libvlc_parser_queue (libvlc_parser_t *parser, const libvlc_parser_request_t *req, const struct libvlc_parser_cbs *cbs, void *cbs_opaque) |
| Parse a media asynchronously. | |
| libvlc_parser_task * | libvlc_parser_queue_thumbnailing (libvlc_parser_t *parser, const libvlc_thumbnailer_request_t *req, const struct libvlc_thumbnailer_cbs *cbs, void *cbs_opaque) |
| Generate a thumbnail asynchronously. | |
| size_t | libvlc_parser_cancel_request (libvlc_parser_t *parser, libvlc_parser_task *task) |
| Cancel a parser request. | |
| libvlc_media_t * | libvlc_parser_task_get_media (libvlc_parser_task *task) |
| Fetch the media associated with the task handle. | |
| void | libvlc_parser_task_release (libvlc_parser_task *task) |
| Release a parser task handle. | |
libvlc_parser_t is an abstract representation of a parser
| typedef enum libvlc_media_parse_flag_t libvlc_media_parse_flag_t |
Parse flags used by libvlc_parser_request_t.
| typedef struct libvlc_media_t libvlc_media_t |
| typedef struct libvlc_parser_request_t libvlc_parser_request_t |
A parser request object.
| typedef enum libvlc_parser_status_t libvlc_parser_status_t |
Outcome of a finished parse request, reported by libvlc_parser_cbs::on_parsed.
| typedef struct libvlc_parser_t libvlc_parser_t |
| typedef struct libvlc_parser_task libvlc_parser_task |
Opaque handle of a parsing/thumbnailing task.
Identifies a task request submitted via libvlc_parser_queue() or libvlc_parser_queue_thumbnailing(). It can be passed to libvlc_parser_cancel_request() to cancel that request.
| typedef struct libvlc_picture_list_t libvlc_picture_list_t |
| typedef struct libvlc_picture_t libvlc_picture_t |
| typedef enum libvlc_picture_type_t libvlc_picture_type_t |
| typedef struct libvlc_thumbnailer_request_t libvlc_thumbnailer_request_t |
A thumbnailer request object.
Thumbnailer seek speed.
Thumbnailer seek type.
| typedef union libvlc_thumbnailer_seek_value_t libvlc_thumbnailer_seek_value_t |
Thumbnailer seek value.
The active member is selected based on the associated libvlc_thumbnailer_seek_type_t.
Parse flags used by libvlc_parser_request_t.
| Enumerator | |
|---|---|
| libvlc_media_parse | Parse media. |
| libvlc_media_fetch_local | Fetch meta and cover art using local resources. |
| libvlc_media_fetch_network | Fetch meta and cover art using network resources. |
| libvlc_media_do_interact | Interact with the user (via libvlc_dialog_cbs) when preparsing this item (and not its sub items). Set this flag in order to receive a callback when the input is asking for credentials. |
Outcome of a finished parse request, reported by libvlc_parser_cbs::on_parsed.
| size_t libvlc_parser_cancel_request | ( | libvlc_parser_t * | parser, |
| libvlc_parser_task * | task ) |
Cancel a parser request.
| parser | the parser |
| task | A parser task returned by libvlc_parser_queue(), libvlc_parser_queue_thumbnailing() or NULL to cancel all requests. |
References LIBVLC_API.
| void libvlc_parser_destroy | ( | libvlc_parser_t * | parser | ) |
Destroy a parser and free resources.
All pending and running tasks are cancelled, and reported as cancelled via callback. This API waits for all worker threads to join.
| parser | the parser |
References LIBVLC_API.
| libvlc_parser_t * libvlc_parser_new | ( | libvlc_instance_t * | inst, |
| const struct libvlc_parser_cfg * | cfg ) |
Create a parser.
| inst | LibVLC instance to create parser with |
| cfg | a pointer to a valid configuration struct |
| libvlc_parser_task * libvlc_parser_queue | ( | libvlc_parser_t * | parser, |
| const libvlc_parser_request_t * | req, | ||
| const struct libvlc_parser_cbs * | cbs, | ||
| void * | cbs_opaque ) |
Parse a media asynchronously.
This fetches (local or network) art, meta data and/or tracks information.
If the request is successfully queued, the libvlc_parser_cbs::on_parsed callback is guaranteed to be called
| parser | the parser |
| req | a pointer to a valid request struct |
| cbs | a pointer to a valid callbacks struct. The pointed struct must be kept alive (and not modified) by the caller until libvlc_parser_cbs.on_parsed is called for the returned task handle. |
| cbs_opaque | an opaque pointer to be passed to the callbacks |
References LIBVLC_API.
| libvlc_parser_task * libvlc_parser_queue_thumbnailing | ( | libvlc_parser_t * | parser, |
| const libvlc_thumbnailer_request_t * | req, | ||
| const struct libvlc_thumbnailer_cbs * | cbs, | ||
| void * | cbs_opaque ) |
Generate a thumbnail asynchronously.
If the request is successfully queued, the libvlc_thumbnailer_cbs::on_ended callback is guaranteed to be called
| parser | the parser |
| req | a pointer to a valid request struct |
| cbs | a pointer to a valid callbacks struct. The pointed struct must be kept alive (and not modified) by the caller until libvlc_thumbnailer_cbs.on_ended is called for the returned task handle. |
| cbs_opaque | an opaque pointer to be passed to the callbacks |
| libvlc_media_t * libvlc_parser_task_get_media | ( | libvlc_parser_task * | task | ) |
Fetch the media associated with the task handle.
| task | A parser task returned by libvlc_parser_queue() or libvlc_parser_queue_thumbnailing() |
| void libvlc_parser_task_release | ( | libvlc_parser_task * | task | ) |
Release a parser task handle.
| task | the parser task handle |
References LIBVLC_API.