* Create a function to Update input item from an other one. This function
updates the value: `psz_name`, `psz_uri`, `i_duration`, `es_vec` and
`p_meta`.
Two callbacks are triggered with the event INPUT_EVENT_SUBITEMS:
* `input_item_parser_cbs_t::on_subtree_added`, which transfers
ownership to its listener.
* `vlc_player_cbs::on_media_subitems_changed`, which sends a
`const input_item_node_t` to its listeners and then frees the node.
And put the vlc_object_t argument in 1st, to behave like most API.
cf. 9c57c2ccb991047d8132deaa1875a2501fcaac20
This will allow adding extra params easily, like:
- bool parse_subitems (to remove input_item_t.i_preparse_depth)
- bool interact (to remove input_item_t.b_preparse_interact)
include/vlc_input_item.h:588: error: argument 'status' of command @param is not found in the argument list of vlc_readdir_helper_additem(struct vlc_readdir_helper *p_rdh, const char *psz_uri, const char *psz_flatpath, const char *psz_filename, int i_type, int i_net, input_item_t **created_item)
include/vlc_input_item.h:579: error: The following parameter of vlc_readdir_helper_finish(struct vlc_readdir_helper *p_rdh, bool b_success) is not documented:
parameter 'p_rdh'
include/vlc_input_item.h:568: warning: The following parameter of vlc_readdir_helper_init(struct vlc_readdir_helper *p_rdh, vlc_object_t *p_obj, input_item_node_t *p_node) is not documented:
parameter 'p_obj'
For input items without a know type (imem access for example) preparsing
is not possible. With this option we allow forcing the preparsing in that
case, optionally. By default the current behavior remains the same.
In the access modules, we would like to be able to send file properties such as size directly
to the input item. But no reference to this item is accessible.
This field will allow you to retrieve the item created by the function.
This will be used by libvlc_media to store the media instance into an
input_item. This will allow to get the media corresponding to an item
when propagating media events.
We already count the number of displayed frames, the number of dropped frames
(called lost). We should also count the frames that are actually displayed but
not in the desired time. It usually indicates the decoder is too slow or the
rendering to the display is too slow even though it may not be directly
visible (movements not smooth).
Reminder of the current behavior: the meta fetcher is either always triggered
after the preparser is finished or manually.
This commit aims to give more controls so that the meta fetcher is not
necessarily triggered after a preparsng.
The current behavior of macOS/playlist/mediatree is unchanged (the components
touching the preparser).
Here are the API changes for
libvlc_MetadataRequest():
- Can't be called without a valid META_REQUEST_OPTION_SCOPE_* flag
- The flag META_REQUEST_OPTION_SCOPE_* is not fetching meta anymore. Use
(META_REQUEST_OPTION_SCOPE_*|META_REQUEST_OPTION_FETCH_*) to fetch meta when
the preparsing ends.
libvlc_ArtRequest():
- Can't be called without a valid META_REQUEST_OPTION_FETCH_* flag.
- The META_REQUEST_OPTION_FETCH_NETWORK flag will now only fetch meta via
network.
libvlc_media_parse_with_options():
- The flag libvlc_media_parse_* is not fetching meta anymore. Use
libvlc_media_fetch_* to fetch meta when the preparsing ends.
- The libvlc_media_fetch_network flag will now only fetch meta via network.
This effectively split input_item_parser_id_Release in 2 functions,
allowing an asynchronous cancellation to occur.
Otherwise, the input thread would invoke the callback synchronously
while the thread cancelling the preparser is blocked joining the input
thread. Both those thread are very likely to be called with a mutex
held, which would cause a deadlock.
This function doesn't use a background thread, contrary to
libvlc_MetadataRequest(). It will be used by the Medialibrary that has its own
background thread.
The function input_item_node_RemoveNode(), declared in vlc_input_item.h,
was not exported (contrary to input_item_node_AppendNode()).
Signed-off-by: Thomas Guillem <thomas@gllm.fr>
Expose a function which does not lock internally so that we can retrieve
several meta values in a row without locking/unlocking.
Signed-off-by: Thomas Guillem <thomas@gllm.fr>
Notify "fetch ended" in callbacks.
This will allow to move the "preparse ended" trigger from the fetcher to
the preparser, and make the fetcher more independant.