[vlc-commits] [Git][videolan/vlc][master] 12 commits: input: move StartTitle up

Felix Paul Kühne (@fkuehne) gitlab at videolan.org
Mon Dec 1 10:24:08 UTC 2025



Felix Paul Kühne pushed to branch master at VideoLAN / VLC


Commits:
03e595ea by Thomas Guillem at 2025-12-01T10:36:08+01:00
input: move StartTitle up

To avoid forward declaration in the next commit.

No functional changes.

- - - - -
30ce0032 by Thomas Guillem at 2025-12-01T10:36:08+01:00
input: refactor, use and rework StartTitle()

No functional changes.

- - - - -
331d06bc by Thomas Guillem at 2025-12-01T10:36:08+01:00
input: refactor, add ResetPosition()

No functional changes.

- - - - -
4ced8e7e by Thomas Guillem at 2025-12-01T10:36:08+01:00
input: move EOF handling in else{}

No functional changes

- - - - -
a1b192fb by Thomas Guillem at 2025-12-01T10:36:08+01:00
input: add external EOF handling

The INPUT_EVENT_EOF listener can return true if it handles the EOF itself.
In that case, the input_thread_t will wait for any controls
(input_Stop() will definitively stop it).

No changes if the event is not handled.

- - - - -
8b8743f4 by Thomas Guillem at 2025-12-01T10:36:08+01:00
input: add INPUT_CONTROL_RESET_POSITION

- - - - -
05f7c478 by Thomas Guillem at 2025-12-01T10:36:08+01:00
player: add vlc_player_SetPlayAndPause

The input_thread_t is not handling "play-and-pause" anymore.

- - - - -
f23ae418 by Thomas Guillem at 2025-12-01T10:36:08+01:00
player: add vlc_player_SetRepeatCount

The input_thread_t is not handling "input-repeat" anymore.

- - - - -
1153d74b by Thomas Guillem at 2025-12-01T10:36:08+01:00
playlist: remove STOPPED_PAUSE

It's now 100% handled by the player.

- - - - -
caf9439d by Thomas Guillem at 2025-12-01T10:36:08+01:00
libvlc: handle "play-and-pause"

- - - - -
6dec40d4 by Thomas Guillem at 2025-12-01T10:36:08+01:00
libvlc: handle "input-repeat"

- - - - -
f5acff75 by Thomas Guillem at 2025-12-01T10:36:08+01:00
test: player: add eof.c

Test vlc_player_SetPlayAndPause() and vlc_player_SetRepeatCount()

- - - - -


17 changed files:

- include/vlc_player.h
- include/vlc_playlist.h
- modules/gui/qt/playlist/playlist_controller.hpp
- src/input/input.c
- src/input/input_internal.h
- src/input/var.c
- src/libvlc.c
- src/libvlccore.sym
- src/player/input.c
- src/player/player.c
- src/player/player.h
- src/playlist/control.c
- src/playlist/player.c
- test/Makefile.am
- test/src/meson.build
- test/src/player/common.h
- + test/src/player/eof.c


Changes:

=====================================
include/vlc_player.h
=====================================
@@ -155,6 +155,24 @@ vlc_player_CondWait(vlc_player_t *player, vlc_cond_t *cond);
 VLC_API void
 vlc_player_SetStartPaused(vlc_player_t *player, bool start_paused);
 
+/**
+ * Pause when reaching EOF
+ *
+ * @param player locked player instance
+ * @param play_and_pause true to pause the player when reaching EOF
+ */
+VLC_API void
+vlc_player_SetPlayAndPause(vlc_player_t *player, bool play_and_pause);
+
+/**
+ * Repeat playback when reaching EOF
+ *
+ * @param player locked player instance
+ * @param repeat_count number of time to restart the same media
+ */
+VLC_API void
+vlc_player_SetRepeatCount(vlc_player_t *player, unsigned repeat_count);
+
 /**
  * Enable or disable pause on cork event
  *


=====================================
include/vlc_playlist.h
=====================================
@@ -176,8 +176,6 @@ enum vlc_playlist_preparsing
 enum vlc_playlist_media_stopped_action {
     /** Continue (or stop if there is no next media), default behavior */
     VLC_PLAYLIST_MEDIA_STOPPED_CONTINUE,
-    /** Pause when reaching the end of file */
-    VLC_PLAYLIST_MEDIA_STOPPED_PAUSE,
     /** Stop, even if there is a next media to play */
     VLC_PLAYLIST_MEDIA_STOPPED_STOP,
     /** Exit VLC */


=====================================
modules/gui/qt/playlist/playlist_controller.hpp
=====================================
@@ -84,7 +84,6 @@ public:
     enum MediaStopAction
     {
         MEDIA_STOPPED_CONTINUE = VLC_PLAYLIST_MEDIA_STOPPED_CONTINUE,
-        MEDIA_STOPPED_PAUSE = VLC_PLAYLIST_MEDIA_STOPPED_PAUSE,
         MEDIA_STOPPED_STOP = VLC_PLAYLIST_MEDIA_STOPPED_STOP,
         MEDIA_STOPPED_EXIT = VLC_PLAYLIST_MEDIA_STOPPED_EXIT
     };


=====================================
src/input/input.c
=====================================
@@ -454,6 +454,39 @@ bool input_Stopped( input_thread_t *input )
     return ret;
 }
 
+static void StartTitle( input_thread_t * p_input, bool restart )
+{
+    input_thread_private_t *priv = input_priv(p_input);
+    vlc_value_t val;
+
+    /* Start title/chapter */
+    val.i_int = priv->master->i_title_start - priv->master->i_title_offset;
+    if( val.i_int > 0 && val.i_int < priv->master->i_title )
+        input_ControlPushHelper( p_input, INPUT_CONTROL_SET_TITLE, &val );
+    else if( restart )
+    {
+        val.i_int = 0;
+        input_ControlPushHelper( p_input, INPUT_CONTROL_SET_TITLE, &val );
+    }
+
+    val.i_int = priv->master->i_seekpoint_start -
+                priv->master->i_seekpoint_offset;
+    if( val.i_int > 0 /* TODO: check upper boundary */ )
+        input_ControlPushHelper( p_input, INPUT_CONTROL_SET_SEEKPOINT, &val );
+}
+
+static void ResetPosition( input_thread_t *p_input )
+{
+    input_thread_private_t *priv = input_priv(p_input);
+    StartTitle( p_input, true );
+
+    /* Seek to start position */
+    if( priv->i_start > 0 )
+        input_SetTime( p_input, 0, false );
+    else
+        input_SetPosition( p_input, 0.0f, false );
+}
+
 /*****************************************************************************
  * Main loop: Fill buffers from access, and demux
  *****************************************************************************/
@@ -519,44 +552,6 @@ static void MainLoopDemux( input_thread_t *p_input, bool *pb_changed )
         SlaveDemux( p_input );
 }
 
-static int MainLoopTryRepeat( input_thread_t *p_input )
-{
-    int i_repeat = var_GetInteger( p_input, "input-repeat" );
-    if( i_repeat <= 0 )
-        return VLC_EGENERIC;
-
-    vlc_value_t val;
-
-    msg_Dbg( p_input, "repeating the same input (%d)", i_repeat );
-    if( i_repeat > 0 )
-    {
-        i_repeat--;
-        var_SetInteger( p_input, "input-repeat", i_repeat );
-    }
-
-    input_thread_private_t *priv = input_priv(p_input);
-    /* Seek to start title/seekpoint */
-    val.i_int = priv->master->i_title_start - priv->master->i_title_offset;
-    if( val.i_int < 0 || val.i_int >= priv->master->i_title )
-        val.i_int = 0;
-    input_ControlPushHelper( p_input,
-                       INPUT_CONTROL_SET_TITLE, &val );
-
-    val.i_int = priv->master->i_seekpoint_start -
-                priv->master->i_seekpoint_offset;
-    if( val.i_int > 0 /* TODO: check upper boundary */ )
-        input_ControlPushHelper( p_input,
-                           INPUT_CONTROL_SET_SEEKPOINT, &val );
-
-    /* Seek to start position */
-    if( priv->i_start > 0 )
-        input_SetTime( p_input, 0, false );
-    else
-        input_SetPosition( p_input, 0.0f, false );
-
-    return VLC_SUCCESS;
-}
-
 static vlc_tick_t InputSourceGetLength( input_source_t *source, input_item_t *item,
                                         bool *live )
 {
@@ -648,9 +643,7 @@ static void MainLoop( input_thread_t *p_input, bool b_interactive )
     if( b_interactive && var_InheritBool( p_input, "start-paused" ) )
         ControlPause( p_input, vlc_tick_now() );
 
-    bool b_pause_after_eof = b_interactive &&
-                           var_InheritBool( p_input, "play-and-pause" );
-    bool b_paused_at_eof = false;
+    bool eof_signaled = false;
 
     demux_t *p_demux = input_priv(p_input)->master->p_demux;
     const bool b_can_demux = p_demux->ops != NULL ?
@@ -681,32 +674,30 @@ static void MainLoop( input_thread_t *p_input, bool b_interactive )
                 if( b_force_update )
                     i_intf_update = 0;
 
-                b_paused_at_eof = false;
+                eof_signaled = false;
             }
             else if( !es_out_IsEmpty( input_priv(p_input)->p_es_out ) )
             {
                 msg_Dbg( p_input, "waiting decoder fifos to empty" );
                 i_wakeup = vlc_tick_now() + INPUT_IDLE_SLEEP;
             }
-            /* Pause after eof only if the input is pausable.
-             * This way we won't trigger timeshifting for nothing */
-            else if( b_pause_after_eof && input_priv(p_input)->master->b_can_pause )
-            {
-                if( b_paused_at_eof )
-                    break;
-
-                input_control_param_t param;
-                param.val.i_int = PAUSE_S;
-
-                msg_Dbg( p_input, "pausing at EOF (pause after each)");
-                Control( p_input, INPUT_CONTROL_SET_STATE, param );
-
-                b_paused = true;
-                b_paused_at_eof = true;
-            }
             else
             {
-                if( MainLoopTryRepeat( p_input ) )
+                bool eof_handled;
+                if( !eof_signaled )
+                {
+                    eof_handled =
+                        input_SendEvent(p_input, &(struct vlc_input_event) {
+                            .type = INPUT_EVENT_EOF,
+                        });
+                    eof_signaled = true;
+                }
+                else
+                    eof_handled = true;
+
+                if (eof_handled)
+                    i_wakeup = -1;
+                else
                     break;
             }
 
@@ -892,22 +883,6 @@ static void FillFileStatsIfAny( input_thread_t * p_input )
         input_item_AddStat( priv->p_item, "mtime", mtime );
 }
 
-static void StartTitle( input_thread_t * p_input )
-{
-    input_thread_private_t *priv = input_priv(p_input);
-    vlc_value_t val;
-
-    /* Start title/chapter */
-    val.i_int = priv->master->i_title_start - priv->master->i_title_offset;
-    if( val.i_int > 0 && val.i_int < priv->master->i_title )
-        input_ControlPushHelper( p_input, INPUT_CONTROL_SET_TITLE, &val );
-
-    val.i_int = priv->master->i_seekpoint_start -
-                priv->master->i_seekpoint_offset;
-    if( val.i_int > 0 /* TODO: check upper boundary */ )
-        input_ControlPushHelper( p_input, INPUT_CONTROL_SET_SEEKPOINT, &val );
-}
-
 static void SetStopStart( input_thread_t * p_input )
 {
     input_thread_private_t *priv = input_priv(p_input);
@@ -1357,7 +1332,7 @@ static int Init( input_thread_t * p_input )
 
     if( priv->type != INPUT_TYPE_PREPARSING )
     {
-        StartTitle( p_input );
+        StartTitle( p_input, false );
         SetSubtitlesOptions( p_input );
         LoadSlaves( p_input );
         InitPrograms( p_input );
@@ -2286,6 +2261,10 @@ static bool Control( input_thread_t *p_input,
             break;
         }
 
+        case INPUT_CONTROL_RESET_POSITION:
+            ResetPosition( p_input );
+            break;
+
         case INPUT_CONTROL_ADD_SLAVE:
             if( param.val.p_address )
             {


=====================================
src/input/input_internal.h
=====================================
@@ -82,6 +82,9 @@ typedef enum input_event_type_e
     INPUT_EVENT_STATE,
     /* b_dead is true */
     INPUT_EVENT_DEAD,
+    /* If the event is not handled, or if the listener is returning false,
+     * the input will be stopped normally at EOF */
+    INPUT_EVENT_EOF,
 
     /* "rate" has changed */
     INPUT_EVENT_RATE,
@@ -556,6 +559,8 @@ enum input_control_e
 
     INPUT_CONTROL_SET_BOOKMARK,
 
+    INPUT_CONTROL_RESET_POSITION,
+
     INPUT_CONTROL_NAV_ACTIVATE, // NOTE: INPUT_CONTROL_NAV_* values must be
     INPUT_CONTROL_NAV_UP,       // contiguous and in the same order as
     INPUT_CONTROL_NAV_DOWN,     // INPUT_NAV_* and DEMUX_NAV_*.


=====================================
src/input/var.c
=====================================
@@ -81,8 +81,6 @@ void vlc_object_InitInputConfig(vlc_object_t *obj,
         var_Create(obj, "sout-spu", VLC_VAR_BOOL | inherit_flag);
         var_Create(obj, "sout-keep",  VLC_VAR_BOOL | inherit_flag);
 
-        var_Create(obj, "input-repeat",
-                    VLC_VAR_INTEGER|inherit_flag);
         var_Create(obj, "start-time", VLC_VAR_FLOAT|inherit_flag);
         var_Create(obj, "stop-time", VLC_VAR_FLOAT|inherit_flag);
         var_Create(obj, "run-time", VLC_VAR_FLOAT|inherit_flag);


=====================================
src/libvlc.c
=====================================
@@ -461,13 +461,13 @@ PlaylistConfigureFromVariables(vlc_playlist_t *playlist, vlc_object_t *obj)
         media_stopped_action = VLC_PLAYLIST_MEDIA_STOPPED_EXIT;
     else if (var_InheritBool(obj, "play-and-stop"))
         media_stopped_action = VLC_PLAYLIST_MEDIA_STOPPED_STOP;
-    else if (var_InheritBool(obj, "play-and-pause"))
-        media_stopped_action = VLC_PLAYLIST_MEDIA_STOPPED_PAUSE;
     else
         media_stopped_action = VLC_PLAYLIST_MEDIA_STOPPED_CONTINUE;
 
     bool start_paused = var_InheritBool(obj, "start-paused");
     bool playlist_cork = var_InheritBool(obj, "playlist-cork");
+    bool play_and_pause = var_InheritBool(obj, "play-and-pause");
+    unsigned repeat_count = var_InheritInteger(obj, "input-repeat");
 
     vlc_playlist_Lock(playlist);
     vlc_playlist_SetPlaybackOrder(playlist, order);
@@ -480,6 +480,8 @@ PlaylistConfigureFromVariables(vlc_playlist_t *playlist, vlc_object_t *obj)
      * implementation detail */
     vlc_player_SetStartPaused(player, start_paused);
     vlc_player_SetPauseOnCork(player, playlist_cork);
+    vlc_player_SetPlayAndPause(player, play_and_pause);
+    vlc_player_SetRepeatCount(player, repeat_count);
 
     vlc_playlist_Unlock(playlist);
 }


=====================================
src/libvlccore.sym
=====================================
@@ -940,6 +940,8 @@ vlc_player_SetEsIdDelay
 vlc_player_SetRecordingEnabled
 vlc_player_SetRenderer
 vlc_player_SetStartPaused
+vlc_player_SetPlayAndPause
+vlc_player_SetRepeatCount
 vlc_player_SetSubtitleTextScale
 vlc_player_SetTeletextEnabled
 vlc_player_SetTeletextTransparency


=====================================
src/player/input.c
=====================================
@@ -926,6 +926,22 @@ input_thread_Events(input_thread_t *input_thread,
             vlc_player_input_HandleStateEvent(input, event->state.value,
                                               event->state.date);
             break;
+        case INPUT_EVENT_EOF:
+            if (player->play_and_pause)
+            {
+                vlc_player_Pause(player);
+                handled = true;
+            }
+            else if (input->repeat > 0)
+            {
+                input->repeat--;
+                handled =
+                    input_ControlPush(input->thread,
+                                      INPUT_CONTROL_RESET_POSITION, NULL) == 0;
+            }
+            else
+                handled = false;
+            break;
         case INPUT_EVENT_RATE:
             input->rate = event->rate;
             vlc_player_SendEvent(player, on_rate_changed, input->rate);
@@ -1192,6 +1208,8 @@ vlc_player_input_New(vlc_player_t *player, input_item_t *item)
         .cbs_data = input,
     };
 
+    input->repeat = player->repeat;
+
     input->thread = input_Create(player, item, &cfg);
     if (!input->thread)
     {


=====================================
src/player/player.c
=====================================
@@ -1238,6 +1238,20 @@ vlc_player_SetStartPaused(vlc_player_t *player, bool start_paused)
     player->start_paused = start_paused;
 }
 
+void
+vlc_player_SetPlayAndPause(vlc_player_t *player, bool play_and_pause)
+{
+    vlc_player_assert_locked(player);
+    player->play_and_pause = play_and_pause;
+}
+
+void
+vlc_player_SetRepeatCount(vlc_player_t *player, unsigned repeat_count)
+{
+    vlc_player_assert_locked(player);
+    player->repeat = repeat_count;
+}
+
 static void
 vlc_player_SetPause(vlc_player_t *player, bool pause)
 {
@@ -2015,6 +2029,9 @@ vlc_player_New(vlc_object_t *parent, enum vlc_player_lock_type lock_type)
     player->video_string_ids = player->audio_string_ids =
     player->sub_string_ids = NULL;
 
+    player->play_and_pause = false;
+    player->repeat = 0;
+
 #define VAR_CREATE(var, flag) do { \
     if (var_Create(player, var, flag) != VLC_SUCCESS) \
         goto error; \
@@ -2045,7 +2062,6 @@ vlc_player_New(vlc_object_t *parent, enum vlc_player_lock_type lock_type)
     /* TODO: Override these variables since the player handle media ended
      * action itself. */
     VAR_CREATE("start-paused", VLC_VAR_BOOL);
-    VAR_CREATE("play-and-pause", VLC_VAR_BOOL);
 
     /* Initialize the shared HTTP cookie jar */
     vlc_value_t cookies;


=====================================
src/player/player.h
=====================================
@@ -129,6 +129,8 @@ struct vlc_player_input
         bool has_video_tracks;
         bool has_audio_tracks;
     } ml;
+
+    unsigned repeat;
 };
 
 struct vlc_player_listener_id
@@ -246,6 +248,7 @@ struct vlc_player_t
     vlc_cond_t start_delay_cond;
 
     bool start_paused;
+    bool play_and_pause;
 
     bool pause_on_cork;
     bool corked;
@@ -279,6 +282,7 @@ struct vlc_player_t
 #define VLC_PLAYER_EOS_BURST_THRESHOLD VLC_TICK_FROM_MS(250)
     vlc_tick_t last_eos;
     unsigned eos_burst_count;
+    unsigned repeat;
 
     bool deleting;
     struct


=====================================
src/playlist/control.c
=====================================
@@ -439,7 +439,6 @@ vlc_playlist_UpdateNextMedia(vlc_playlist_t *playlist)
     switch (playlist->stopped_action)
     {
         case VLC_PLAYLIST_MEDIA_STOPPED_CONTINUE:
-        case VLC_PLAYLIST_MEDIA_STOPPED_PAUSE:
         case VLC_PLAYLIST_MEDIA_STOPPED_EXIT:
         {
             ssize_t index = vlc_playlist_GetNextMediaIndex(playlist);


=====================================
src/playlist/player.c
=====================================
@@ -206,8 +206,6 @@ vlc_playlist_SetMediaStoppedAction(vlc_playlist_t *playlist,
 {
     vlc_playlist_AssertLocked(playlist);
     playlist->stopped_action = action;
-    var_SetBool(playlist->player, "play-and-pause",
-                action == VLC_PLAYLIST_MEDIA_STOPPED_PAUSE);
     vlc_playlist_UpdateNextMedia(playlist);
     vlc_playlist_Notify(playlist, on_media_stopped_action_changed, action);
 }


=====================================
test/Makefile.am
=====================================
@@ -11,6 +11,7 @@ player_programs = \
 	test_src_player_attachments \
 	test_src_player_capabilities \
 	test_src_player_discontinuities \
+	test_src_player_eof \
 	test_src_player_errors \
 	test_src_player_es_selection \
 	test_src_player_lifecycle \
@@ -224,6 +225,9 @@ test_src_player_capabilities_LDADD = $(LIBVLCCORE) $(LIBVLC) $(LIBM)
 test_src_player_discontinuities_SOURCES = src/player/common.h src/player/modules.c \
 	src/player/discontinuities.c
 test_src_player_discontinuities_LDADD = $(LIBVLCCORE) $(LIBVLC) $(LIBM)
+test_src_player_eof_SOURCES = src/player/common.h src/player/modules.c \
+	src/player/eof.c
+test_src_player_eof_LDADD = $(LIBVLCCORE) $(LIBVLC) $(LIBM)
 test_src_player_errors_SOURCES = src/player/common.h src/player/modules.c \
 	src/player/errors.c
 test_src_player_errors_LDADD = $(LIBVLCCORE) $(LIBVLC) $(LIBM)


=====================================
test/src/meson.build
=====================================
@@ -138,6 +138,17 @@ vlc_tests += {
     'module_depends' : vlc_plugins_targets.keys()
 }
 
+vlc_tests += {
+    'name' : 'test_src_player_eof',
+    'sources' : files(
+        'player/common.h',
+        'player/modules.c',
+        'player/eof.c'),
+    'suite' : ['src', 'test_src'],
+    'link_with' : [libvlc, libvlccore],
+    'module_depends' : vlc_plugins_targets.keys()
+}
+
 vlc_tests += {
     'name' : 'test_src_player_errors',
     'sources' : files(


=====================================
test/src/player/common.h
=====================================
@@ -650,6 +650,18 @@ state_equal(vec_on_state_changed *vec, int location, enum vlc_player_state state
     assert(state_equal(ctx, -1, VLC_PLAYER_STATE_STOPPED)); \
 } while(0)
 
+
+static inline size_t
+get_buffering_count(struct ctx *ctx)
+{
+    vec_on_buffering_changed *vec = &ctx->report.on_buffering_changed;
+    size_t count = 0;
+    for (size_t i = 0; i < vec->size; ++i)
+        if (vec->data[i] == 1.0f)
+            count++;
+    return count;
+}
+
 static inline void
 ctx_reset(struct ctx *ctx)
 {
@@ -1118,6 +1130,8 @@ test_end(struct ctx *ctx)
 
     player_set_rate(ctx, 1.0f);
     vlc_player_SetStartPaused(player, false);
+    vlc_player_SetPlayAndPause(player, false);
+    vlc_player_SetRepeatCount(player, 0);
 
     ctx_reset(ctx);
 }


=====================================
test/src/player/eof.c
=====================================
@@ -0,0 +1,74 @@
+// SPDX-License-Identifier: LGPL-2.1-or-later
+/*****************************************************************************
+ * eof.c: EOF player test
+ *****************************************************************************
+ * Copyright (C) 2018-2025 VLC authors and VideoLAN
+ *****************************************************************************/
+
+#include "common.h"
+
+static void
+test_play_pause(struct ctx *ctx)
+{
+    test_log("play_pause\n");
+
+    vlc_player_t *player = ctx->player;
+    vlc_player_SetPlayAndPause(player, true);
+
+    struct media_params params = DEFAULT_MEDIA_PARAMS(VLC_TICK_FROM_MS(100));
+    player_set_next_mock_media(ctx, "media1", &params);
+    player_start(ctx);
+
+    /* Check the PlayAndPause if pausing at EOF */
+    wait_state(ctx, VLC_PLAYER_STATE_PLAYING);
+    wait_state(ctx, VLC_PLAYER_STATE_PAUSED);
+
+    vlc_player_SetTime(player, 0);
+    vlc_player_Resume(player);
+
+    /* Check we can resume the playback and pause again */
+    wait_state(ctx, VLC_PLAYER_STATE_PLAYING);
+    wait_state(ctx, VLC_PLAYER_STATE_PAUSED);
+
+    /* Check we stay paused */
+    vlc_tick_sleep(VLC_TICK_FROM_MS(100));
+    assert_state(ctx, VLC_PLAYER_STATE_PAUSED);
+    test_prestop(ctx);
+
+    vlc_player_Stop(player);
+
+    test_end(ctx);
+}
+
+static void
+test_repeat(struct ctx *ctx)
+{
+    test_log("repeat\n");
+
+    vlc_player_t *player = ctx->player;
+    const unsigned repeat_count = 3;
+    vlc_player_SetRepeatCount(player, repeat_count);
+
+    struct media_params params = DEFAULT_MEDIA_PARAMS(VLC_TICK_FROM_MS(100));
+    player_set_next_mock_media(ctx, "media1", &params);
+    player_start(ctx);
+
+    wait_state(ctx, VLC_PLAYER_STATE_PLAYING);
+    wait_state(ctx, VLC_PLAYER_STATE_STOPPED);
+
+    /* Check buffering count match the repeat count */
+    assert(get_buffering_count(ctx) ==  repeat_count + 1 /* initial buffering */);
+
+    test_end(ctx);
+}
+
+int
+main(void)
+{
+    struct ctx ctx;
+    ctx_init(&ctx, 0);
+    test_play_pause(&ctx);
+    test_repeat(&ctx);
+    ctx_destroy(&ctx);
+    return 0;
+}



View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/c6c4fb85305760e2b65cba64f98133bde95f0f58...f5acff75a9996b04b08f68fb09ee55158ea35b65

-- 
View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/c6c4fb85305760e2b65cba64f98133bde95f0f58...f5acff75a9996b04b08f68fb09ee55158ea35b65
You're receiving this email because of your account on code.videolan.org.


VideoLAN code repository instance


More information about the vlc-commits mailing list