mirror of https://code.videolan.org/videolan/vlc
lib: set libvlc_media_parse_local > 0
This will allow to use the preparser to only fetch metadata.
This commit is contained in:
parent
dc397a76c1
commit
a82b097615
|
@ -147,29 +147,29 @@ typedef enum libvlc_media_parse_flag_t
|
|||
/**
|
||||
* Parse media if it's a local file
|
||||
*/
|
||||
libvlc_media_parse_local = 0x00,
|
||||
libvlc_media_parse_local = 0x01,
|
||||
/**
|
||||
* Parse media even if it's a network file
|
||||
*/
|
||||
libvlc_media_parse_network = 0x01,
|
||||
libvlc_media_parse_network = 0x02,
|
||||
/**
|
||||
* Fetch meta and cover art using local resources
|
||||
*/
|
||||
libvlc_media_fetch_local = 0x02,
|
||||
libvlc_media_fetch_local = 0x04,
|
||||
/**
|
||||
* Fetch meta and cover art using network resources
|
||||
*/
|
||||
libvlc_media_fetch_network = 0x04,
|
||||
libvlc_media_fetch_network = 0x08,
|
||||
/**
|
||||
* 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.
|
||||
*/
|
||||
libvlc_media_do_interact = 0x08,
|
||||
libvlc_media_do_interact = 0x10,
|
||||
/**
|
||||
* Force parsing the media even if it would be skipped.
|
||||
*/
|
||||
libvlc_media_no_skip = 0x10,
|
||||
libvlc_media_no_skip = 0x20,
|
||||
} libvlc_media_parse_flag_t;
|
||||
|
||||
/**
|
||||
|
|
|
@ -839,7 +839,7 @@ int libvlc_media_parse_request(libvlc_instance_t *inst, libvlc_media_t *media,
|
|||
|
||||
libvlc_int_t *libvlc = inst->p_libvlc_int;
|
||||
input_item_t *item = media->p_input_item;
|
||||
input_item_meta_request_option_t parse_scope = META_REQUEST_OPTION_SCOPE_LOCAL;
|
||||
input_item_meta_request_option_t parse_scope = 0;
|
||||
int ret;
|
||||
unsigned int ref = atomic_load_explicit(&media->worker_count,
|
||||
memory_order_relaxed);
|
||||
|
@ -853,6 +853,8 @@ int libvlc_media_parse_request(libvlc_instance_t *inst, libvlc_media_t *media,
|
|||
memory_order_relaxed,
|
||||
memory_order_relaxed));
|
||||
|
||||
if (parse_flag & libvlc_media_parse_local)
|
||||
parse_scope |= META_REQUEST_OPTION_SCOPE_LOCAL;
|
||||
if (parse_flag & libvlc_media_parse_network)
|
||||
parse_scope |= META_REQUEST_OPTION_SCOPE_NETWORK;
|
||||
if (parse_flag & libvlc_media_fetch_local)
|
||||
|
|
Loading…
Reference in New Issue