[vlc-devel] [PATCH 3/3] Revert "vout: add vout_Pause"

Thomas Guillem thomas at gllm.fr
Mon May 13 13:21:44 CEST 2019


Not used anymore, cf. previous commit.

This reverts commit be5856e51f84237c7008c1ea9385be2b0b28d849.
---
 src/video_output/video_output.c  | 53 +++-----------------------------
 src/video_output/vout_internal.h |  3 --
 2 files changed, 4 insertions(+), 52 deletions(-)

diff --git a/src/video_output/video_output.c b/src/video_output/video_output.c
index d2f3e18f11..fbdacc55f6 100644
--- a/src/video_output/video_output.c
+++ b/src/video_output/video_output.c
@@ -1303,11 +1303,8 @@ static void vout_FlushUnlocked(vout_thread_t *vout, bool below,
     picture_fifo_Flush(vout->p->decoder_fifo, date, below);
     vout_FilterFlush(vout->p->display);
 
-    if (vout->p->clock)
-    {
-        vlc_clock_Reset(vout->p->clock);
-        vlc_clock_SetDelay(vout->p->clock, vout->p->delay);
-    }
+    vlc_clock_Reset(vout->p->clock);
+    vlc_clock_SetDelay(vout->p->clock, vout->p->delay);
 
     vlc_mutex_lock(&vout->p->spu_lock);
     if (vout->p->spu)
@@ -1646,14 +1643,10 @@ noreturn static void *Thread(void *object)
         } else {
             deadline = VLC_TICK_INVALID;
         }
-
-        while (!vout_control_Pop(&sys->control, &cmd, deadline) || sys->paused)
-        {
+        while (!vout_control_Pop(&sys->control, &cmd, deadline)) {
             int canc = vlc_savecancel();
             ThreadControl(vout, cmd);
             vlc_restorecancel(canc);
-            if (sys->paused)
-                deadline = INT64_MAX;
         }
 
         int canc = vlc_savecancel();
@@ -1702,45 +1695,9 @@ void vout_StopDisplay(vout_thread_t *vout)
     spu_Detach(sys->spu);
     sys->mouse_event = NULL;
     sys->clock = NULL;
-    sys->paused = false;
     video_format_Clean(&sys->original);
 }
 
-static void vout_Resume(vout_thread_t *vout, const vout_configuration_t *cfg,
-                        input_thread_t *input)
-{
-    vout_thread_sys_t *sys = vout->p;
-
-    vout_control_Hold(&sys->control);
-    assert(sys->paused);
-
-    sys->clock = cfg->clock;
-    if (input != NULL)
-        spu_Attach(sys->spu, input);
-    sys->mouse_event = cfg->mouse_event;
-    sys->mouse_opaque = cfg->mouse_opaque;
-
-    sys->delay = sys->spu_delay = 0;
-    sys->rate = sys->spu_rate = 1.f;
-    sys->delay = sys->spu_delay = 0;
-
-    sys->paused = false;
-    vout_control_Release(&sys->control);
-}
-
-void vout_Pause(vout_thread_t *vout)
-{
-    vout_thread_sys_t *sys = vout->p;
-
-    vout_control_Hold(&sys->control);
-    vout_FlushUnlocked(vout, true, INT64_MAX);
-    vout_FlushSubpictureChannel(vout, -1);
-    sys->mouse_event = NULL;
-    sys->clock = NULL;
-    sys->paused = true;
-    vout_control_Release(&sys->control);
-}
-
 void vout_Stop(vout_thread_t *vout)
 {
     vout_thread_sys_t *sys = vout->p;
@@ -1878,7 +1835,6 @@ vout_thread_t *vout_Create(vlc_object_t *object)
     vlc_mutex_init(&sys->spu_lock);
     sys->spu = spu_Create(vout, vout);
 
-    sys->paused = false;
     vout_control_Init(&sys->control);
 
     sys->title.show     = var_InheritBool(vout, "video-title-show");
@@ -1948,8 +1904,7 @@ int vout_Request(const vout_configuration_t *cfg, input_thread_t *input)
     if (video_format_IsSimilar(&original, &sys->original)) {
         if (cfg->dpb_size <= sys->dpb_size) {
             video_format_Clean(&original);
-
-            vout_Resume(vout, cfg, input);
+            /* It is assumed that the SPU input matches input already. */
             return 0;
         }
         msg_Warn(vout, "DPB need to be increased");
diff --git a/src/video_output/vout_internal.h b/src/video_output/vout_internal.h
index 0b7118e832..129d0993cf 100644
--- a/src/video_output/vout_internal.h
+++ b/src/video_output/vout_internal.h
@@ -76,7 +76,6 @@ struct vout_thread_sys_t
     vlc_tick_t      spu_delay;
 
     /* */
-    bool            paused;
     video_format_t  original;   /* Original format ie coming from the decoder */
     struct {
         struct {
@@ -220,8 +219,6 @@ int vout_Request(const vout_configuration_t *cfg, input_thread_t *input);
  */
 void vout_Stop(vout_thread_t *);
 
-void vout_Pause(vout_thread_t *vout);
-
 /**
  * Stop the display plugin, but keep its window plugin for later reuse.
  */
-- 
2.20.1



More information about the vlc-devel mailing list