[vlc-devel] [PATCH] libvlc: merge libvlc_MediaParsedStatus and libvlc_MediaParsedCharged events
Rémi Denis-Courmont
remi at remlab.net
Mon May 23 21:23:53 CEST 2016
On Monday 23 May 2016 18:39:32 Thomas Guillem wrote:
> Because having two differents events for the same objective is way too
> confusing (libvlc_MediaParsedStatus was recently added by me).
>
> libvlc_MediaParsedCharged is now always sent after a call to
> libvlc_media_parse_*() (this was not the case if the pre-parsing was
> skipped).
>
> The core vlc_InputItemPreparsedChanged event is now only attached from the
> media player. This allows the libvlc_MediaParsedCharged event to be sent
> when a media is parsed from a media player.
>
> /!\ Behavior change in libvlc API /!\
>
> libvlc_event_t.u.media_parsed_changed.new_status changed from an int to a
> libvlc_media_parsed_status_t. Before this patch, this value was always set
> to true, even in case of parse failure/skipped. Now this value can be
> skipped (1), failed (2) or done (3). There should be no changes for users
> that were checking if new_status was true, since this events was called for
> these 3 cases (that are all > 0).
> ---
> include/vlc/libvlc_events.h | 7 +---
> include/vlc/libvlc_media.h | 14 +++----
> lib/event.c | 1 -
> lib/media.c | 98
> +++++++++++++++++++-------------------------- lib/media_internal.h |
> 2 +-
> lib/media_player.c | 35 ++++++++++++++++
> test/libvlc/media.c | 10 ++---
> 7 files changed, 90 insertions(+), 77 deletions(-)
>
> diff --git a/include/vlc/libvlc_events.h b/include/vlc/libvlc_events.h
> index 45ce86e..05666a3 100644
> --- a/include/vlc/libvlc_events.h
> +++ b/include/vlc/libvlc_events.h
> @@ -53,7 +53,6 @@ enum libvlc_event_e {
> libvlc_MediaFreed,
> libvlc_MediaStateChanged,
> libvlc_MediaSubItemTreeAdded,
> - libvlc_MediaParsedStatus,
>
> libvlc_MediaPlayerMediaChanged=0x100,
> libvlc_MediaPlayerNothingSpecial,
> @@ -141,7 +140,7 @@ typedef struct libvlc_event_t
> } media_duration_changed;
> struct
> {
> - int new_status;
> + libvlc_media_parsed_status_t new_status;
That´s not universally binary compatible.
> } media_parsed_changed;
> struct
> {
--
Rémi Denis-Courmont
http://www.remlab.net/
More information about the vlc-devel
mailing list