[vlc-commits] input: rename vout added/removed to started/stopped

Steve Lhomme git at videolan.org
Fri Oct 18 09:46:58 CEST 2019


vlc | branch: master | Steve Lhomme <robux4 at ycbcr.xyz> | Fri Oct 11 09:24:35 2019 +0200| [24c985267c6a481e1dbe2f6cbf4902b7d55509b3] | committer: Steve Lhomme

input: rename vout added/removed to started/stopped

This is the real event the player is looking for. It doesn't care if a vout has
been created but is dormant.

No functional changes.

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

 src/input/decoder.c        | 12 ++++++------
 src/input/decoder.h        |  4 ++--
 src/input/es_out.c         | 12 ++++++------
 src/input/input_internal.h |  4 ++--
 src/player/input.c         |  4 ++--
 5 files changed, 18 insertions(+), 18 deletions(-)

diff --git a/src/input/decoder.c b/src/input/decoder.c
index d191da2a74..1d2b85b9ad 100644
--- a/src/input/decoder.c
+++ b/src/input/decoder.c
@@ -575,7 +575,7 @@ static int CreateVoutIfNeeded(struct decoder_owner *p_owner)
     if (CreateDisplay( p_owner, dec_dev, p_vout ) != 0)
         p_vout = NULL;
     if (p_vout)
-        decoder_Notify(p_owner, on_vout_added, p_vout, order);
+        decoder_Notify(p_owner, on_vout_started, p_vout, order);
 
     vlc_mutex_lock( &p_owner->lock );
     p_owner->p_vout = p_vout;
@@ -670,7 +670,7 @@ static subpicture_t *ModuleThread_NewSpuBuffer( decoder_t *p_dec,
         if( p_owner->p_vout )
         {
             assert(p_owner->i_spu_channel != VOUT_SPU_CHANNEL_INVALID);
-            decoder_Notify(p_owner, on_vout_deleted, p_owner->p_vout);
+            decoder_Notify(p_owner, on_vout_stopped, p_owner->p_vout);
 
             vlc_mutex_lock( &p_owner->lock );
             vout_UnregisterSubpictureChannel(p_owner->p_vout,
@@ -688,7 +688,7 @@ static subpicture_t *ModuleThread_NewSpuBuffer( decoder_t *p_dec,
     if( p_owner->p_vout != p_vout )
     {
         if (p_owner->p_vout) /* notify the previous vout deletion unlocked */
-            decoder_Notify(p_owner, on_vout_deleted, p_owner->p_vout);
+            decoder_Notify(p_owner, on_vout_stopped, p_owner->p_vout);
 
         vlc_mutex_lock(&p_owner->lock);
 
@@ -723,7 +723,7 @@ static subpicture_t *ModuleThread_NewSpuBuffer( decoder_t *p_dec,
         vlc_mutex_unlock(&p_owner->lock);
 
         assert(channel_order != VLC_VOUT_ORDER_NONE);
-        decoder_Notify(p_owner, on_vout_added, p_vout, channel_order);
+        decoder_Notify(p_owner, on_vout_started, p_vout, channel_order);
     }
     else
         vout_Release(p_vout);
@@ -1998,7 +1998,7 @@ static void DeleteDecoder( decoder_t * p_dec )
                     vout_Cancel(vout, false);
                     p_owner->vout_thread_added = false;
                 }
-                decoder_Notify(p_owner, on_vout_deleted, vout);
+                decoder_Notify(p_owner, on_vout_stopped, vout);
                 input_resource_PutVout(p_owner->p_resource, vout);
             }
             break;
@@ -2008,7 +2008,7 @@ static void DeleteDecoder( decoder_t * p_dec )
             if( p_owner->p_vout )
             {
                 assert( p_owner->i_spu_channel != VOUT_SPU_CHANNEL_INVALID );
-                decoder_Notify(p_owner, on_vout_deleted, p_owner->p_vout);
+                decoder_Notify(p_owner, on_vout_stopped, p_owner->p_vout);
 
                 vout_UnregisterSubpictureChannel( p_owner->p_vout,
                                                   p_owner->i_spu_channel );
diff --git a/src/input/decoder.h b/src/input/decoder.h
index 04b64ac713..af9f7c7bdb 100644
--- a/src/input/decoder.h
+++ b/src/input/decoder.h
@@ -30,10 +30,10 @@
 
 struct input_decoder_callbacks {
     /* notifications */
-    void (*on_vout_added)(decoder_t *decoder, vout_thread_t *vout,
+    void (*on_vout_started)(decoder_t *decoder, vout_thread_t *vout,
                           enum vlc_vout_order vout_order,
                           void *userdata);
-    void (*on_vout_deleted)(decoder_t *decoder, vout_thread_t *vout,
+    void (*on_vout_stopped)(decoder_t *decoder, vout_thread_t *vout,
                             void *userdata);
     void (*on_thumbnail_ready)(decoder_t *decoder, picture_t *pic,
                                void *userdata);
diff --git a/src/input/es_out.c b/src/input/es_out.c
index 7279259ebb..cfcc6df2b7 100644
--- a/src/input/es_out.c
+++ b/src/input/es_out.c
@@ -270,7 +270,7 @@ static inline int EsOutGetClosedCaptionsChannel( const es_format_t *p_fmt )
         vlc_list_foreach( pos, (!fetes_i ? &p_sys->es : &p_sys->es_slaves), node )
 
 static void
-decoder_on_vout_added(decoder_t *decoder, vout_thread_t *vout,
+decoder_on_vout_started(decoder_t *decoder, vout_thread_t *vout,
                       enum vlc_vout_order order, void *userdata)
 {
     (void) decoder;
@@ -283,7 +283,7 @@ decoder_on_vout_added(decoder_t *decoder, vout_thread_t *vout,
         return;
 
     struct vlc_input_event_vout event = {
-        .action = VLC_INPUT_EVENT_VOUT_ADDED,
+        .action = VLC_INPUT_EVENT_VOUT_STARTED,
         .vout = vout,
         .order = order,
         .id = &id->id,
@@ -293,7 +293,7 @@ decoder_on_vout_added(decoder_t *decoder, vout_thread_t *vout,
 }
 
 static void
-decoder_on_vout_deleted(decoder_t *decoder, vout_thread_t *vout, void *userdata)
+decoder_on_vout_stopped(decoder_t *decoder, vout_thread_t *vout, void *userdata)
 {
     (void) decoder;
 
@@ -305,7 +305,7 @@ decoder_on_vout_deleted(decoder_t *decoder, vout_thread_t *vout, void *userdata)
         return;
 
     struct vlc_input_event_vout event = {
-        .action = VLC_INPUT_EVENT_VOUT_DELETED,
+        .action = VLC_INPUT_EVENT_VOUT_STOPPED,
         .vout = vout,
         .order = VLC_VOUT_ORDER_NONE,
         .id = &id->id,
@@ -402,8 +402,8 @@ decoder_get_attachments(decoder_t *decoder,
 }
 
 static const struct input_decoder_callbacks decoder_cbs = {
-    .on_vout_added = decoder_on_vout_added,
-    .on_vout_deleted = decoder_on_vout_deleted,
+    .on_vout_started = decoder_on_vout_started,
+    .on_vout_stopped = decoder_on_vout_stopped,
     .on_thumbnail_ready = decoder_on_thumbnail_ready,
     .on_new_video_stats = decoder_on_new_video_stats,
     .on_new_audio_stats = decoder_on_new_audio_stats,
diff --git a/src/input/input_internal.h b/src/input/input_internal.h
index 203131e7be..83f3a9e899 100644
--- a/src/input/input_internal.h
+++ b/src/input/input_internal.h
@@ -244,8 +244,8 @@ struct vlc_input_event_signal {
 struct vlc_input_event_vout
 {
     enum {
-        VLC_INPUT_EVENT_VOUT_ADDED,
-        VLC_INPUT_EVENT_VOUT_DELETED,
+        VLC_INPUT_EVENT_VOUT_STARTED,
+        VLC_INPUT_EVENT_VOUT_STOPPED,
     } action;
     vout_thread_t *vout;
     enum vlc_vout_order order;
diff --git a/src/player/input.c b/src/player/input.c
index be1544d4d9..18d2646663 100644
--- a/src/player/input.c
+++ b/src/player/input.c
@@ -626,7 +626,7 @@ vlc_player_input_HandleVoutEvent(struct vlc_player_input *input,
 
     switch (ev->action)
     {
-        case VLC_INPUT_EVENT_VOUT_ADDED:
+        case VLC_INPUT_EVENT_VOUT_STARTED:
             trackpriv->vout = ev->vout;
             vlc_player_SendEvent(player, on_vout_changed,
                                  VLC_PLAYER_VOUT_STARTED, ev->vout,
@@ -638,7 +638,7 @@ vlc_player_input_HandleVoutEvent(struct vlc_player_input *input,
                 vlc_player_vout_AddCallbacks(player, ev->vout);
             }
             break;
-        case VLC_INPUT_EVENT_VOUT_DELETED:
+        case VLC_INPUT_EVENT_VOUT_STOPPED:
             if (is_video_es)
             {
                 /* Un-register vout callbacks before the vout list event */



More information about the vlc-commits mailing list