[vlc-commits] libvlc: rename TitleChanged to TitleSelectionChanged

Thomas Guillem git at videolan.org
Mon May 4 10:08:52 CEST 2020


vlc | branch: master | Thomas Guillem <thomas at gllm.fr> | Mon Apr 27 20:12:42 2020 +0200| [d8ad21de04808b74d05a6cd6df6f5696a4119374] | committer: Thomas Guillem

libvlc: rename TitleChanged to TitleSelectionChanged

In 3.0, this event was sent for a new selection and for a new list.

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=d8ad21de04808b74d05a6cd6df6f5696a4119374
---

 include/vlc/libvlc_events.h | 7 ++++---
 lib/media_player.c          | 4 ++--
 2 files changed, 6 insertions(+), 5 deletions(-)

diff --git a/include/vlc/libvlc_events.h b/include/vlc/libvlc_events.h
index 62a81104da..0580888c4f 100644
--- a/include/vlc/libvlc_events.h
+++ b/include/vlc/libvlc_events.h
@@ -104,8 +104,8 @@ enum libvlc_event_e {
     libvlc_MediaPlayerPositionChanged,
     libvlc_MediaPlayerSeekableChanged,
     libvlc_MediaPlayerPausableChanged,
-    libvlc_MediaPlayerTitleChanged,
-    libvlc_MediaPlayerSnapshotTaken,
+    /* libvlc_MediaPlayerTitleChanged, */
+    libvlc_MediaPlayerSnapshotTaken = libvlc_MediaPlayerPausableChanged + 2,
     libvlc_MediaPlayerLengthChanged,
     libvlc_MediaPlayerVout,
     libvlc_MediaPlayerScrambledChanged,
@@ -118,6 +118,7 @@ enum libvlc_event_e {
     libvlc_MediaPlayerUnmuted,
     libvlc_MediaPlayerAudioVolume,
     libvlc_MediaPlayerAudioDevice,
+    libvlc_MediaPlayerTitleSelectionChanged,
     libvlc_MediaPlayerChapterChanged,
 
     /**
@@ -266,7 +267,7 @@ typedef struct libvlc_event_t
         struct
         {
             int new_title;
-        } media_player_title_changed;
+        } media_player_title_selection_changed;
         struct
         {
             int new_seekable;
diff --git a/lib/media_player.c b/lib/media_player.c
index 96af310c34..42d20537c6 100644
--- a/lib/media_player.c
+++ b/lib/media_player.c
@@ -343,8 +343,8 @@ on_title_selection_changed(vlc_player_t *player,
     libvlc_media_player_t *mp = data;
 
     libvlc_event_t event;
-    event.type = libvlc_MediaPlayerTitleChanged;
-    event.u.media_player_title_changed.new_title = new_idx;
+    event.type = libvlc_MediaPlayerTitleSelectionChanged;
+    event.u.media_player_title_selection_changed.new_title = new_idx;
 
     libvlc_event_send(&mp->event_manager, &event);
 }



More information about the vlc-commits mailing list