[vlc-commits] [Git][videolan/vlc][master] 8 commits: lib: document internal play/intf/exit functions

Steve Lhomme (@robUx4) gitlab at videolan.org
Fri Feb 2 10:52:28 UTC 2024



Steve Lhomme pushed to branch master at VideoLAN / VLC


Commits:
bcd17cd1 by Thomas Guillem at 2024-02-02T10:31:30+00:00
lib: document internal play/intf/exit functions

- - - - -
70dc1f94 by Thomas Guillem at 2024-02-02T10:31:30+00:00
bin: use libvlc_Internal API directly

- - - - -
fae1ff40 by Thomas Guillem at 2024-02-02T10:31:30+00:00
test: use libvlc_Internal API directly

- - - - -
0777655b by Thomas Guillem at 2024-02-02T10:31:30+00:00
lib: remove libvlc_playlist_play

libvlc_InternalPlay() should be used instead (from bin and test). This
function was confusing as the started playlist was not controllable by
the LibVLC API.

- - - - -
1aa19adf by Thomas Guillem at 2024-02-02T10:31:30+00:00
lib: remove libvlc_add_intf

libvlc_InternalAddIntf should be used instead (from bin and test). This
function was confusing as the playlist used by the interface was not
controllable by the LibVLC API.

- - - - -
6cc7cf1a by Thomas Guillem at 2024-02-02T10:31:30+00:00
lib: remove empty playlist.c

- - - - -
712878c0 by Thomas Guillem at 2024-02-02T10:31:30+00:00
lib: remove libvlc_set_exit_handler

libvlc_SetExitHandler should be used instead (from bin and test). This
function was confusing as the playlist used by the interface was not
controllable by the LibVLC API.

- - - - -
515ed469 by Thomas Guillem at 2024-02-02T10:31:30+00:00
lib: remove deprecated.h

There is no more deprecated functions.

In case, we need to deprecate new functions in a future release, we can
just add LIBVLC_DEPRECATED, and leave the function in its original
header.

- - - - -


25 changed files:

- bin/Makefile.am
- bin/darwinvlc.m
- bin/meson.build
- bin/vlc.c
- bin/winvlc.c
- include/meson.build
- − include/vlc/deprecated.h
- include/vlc/libvlc.h
- include/vlc/vlc.h
- lib/Makefile.am
- lib/core.c
- lib/libvlc.sym
- lib/libvlc_internal.h
- lib/meson.build
- − lib/playlist.c
- po/POTFILES.in
- src/test/headers.c
- test/iosvlc.m
- test/modules/lua/extension.c
- test/modules/misc/medialibrary.c
- test/modules/stream_out/transcode.c
- test/src/input/decoder/input_decoder.c
- test/src/misc/image.c
- test/src/misc/image_cvpx.c
- test/src/video_output/video_output.c


Changes:

=====================================
bin/Makefile.am
=====================================
@@ -26,7 +26,7 @@ endif
 #
 # Main VLC executable
 #
-vlc_LDADD = ../lib/libvlc.la
+vlc_LDADD = ../lib/libvlc.la ../src/libvlccore.la
 vlc_CPPFLAGS = $(AM_CPPFLAGS)
 if !HAVE_WIN32
 vlc_SOURCES = vlc.c override.c


=====================================
bin/darwinvlc.m
=====================================
@@ -41,6 +41,7 @@
 #import <Breakpad/Breakpad.h>
 #endif
 
+#include "../lib/libvlc_internal.h"
 
 /**
  * Handler called when VLC asks to terminate the program.
@@ -269,15 +270,16 @@ int main(int i_argc, const char *ppsz_argv[])
         return 1;
 
     int ret = 1;
-    libvlc_set_exit_handler(vlc, vlc_terminate, NULL);
+    libvlc_SetExitHandler(vlc->p_libvlc_int, vlc_terminate, NULL);
     libvlc_set_app_id(vlc, "org.VideoLAN.VLC", PACKAGE_VERSION, PACKAGE_NAME);
     libvlc_set_user_agent(vlc, "VLC media player", "VLC/"PACKAGE_VERSION);
 
-    if (libvlc_add_intf(vlc, NULL)) {
+    if (libvlc_InternalAddIntf(vlc->p_libvlc_int, NULL)) {
         fprintf(stderr, "VLC cannot start any interface. Exiting.\n");
         goto out;
     }
-    libvlc_playlist_play(vlc);
+
+    libvlc_InternalPlay(vlc->p_libvlc_int);
 
     /*
      * Run the main loop. If the mac interface is not initialized, only the CoreFoundation


=====================================
bin/meson.build
=====================================
@@ -20,7 +20,7 @@ if build_vlc and (host_system != 'darwin' or have_osx)
 
     executable('vlc',
         vlc_sources,
-        link_with: [libvlc],
+        link_with: [libvlc, libvlccore],
         include_directories: [vlc_include_dirs],
         dependencies: vlc_deps,
         install: true,
@@ -32,7 +32,7 @@ if build_vlc and (host_system != 'darwin' or have_osx)
 
     executable('vlc-static',
         vlc_sources,
-        link_with: [libvlc],
+        link_with: [libvlc, libvlccore],
         include_directories: [vlc_include_dirs],
         dependencies: vlc_deps,
         c_args: [vlc_top_builddir_def, vlc_top_srcdir_def],


=====================================
bin/vlc.c
=====================================
@@ -40,6 +40,8 @@
 #endif
 #include <unistd.h>
 
+#include "../lib/libvlc_internal.h"
+
 #ifdef __OS2__
 # include <iconv.h>
 
@@ -232,17 +234,17 @@ int main(int argc, const char *argv[])
         return 1;
 
     int ret = 1;
-    libvlc_set_exit_handler (vlc, vlc_kill, &self);
+    libvlc_SetExitHandler(vlc->p_libvlc_int, vlc_kill, &self);
     libvlc_set_app_id (vlc, "org.VideoLAN.VLC", PACKAGE_VERSION, PACKAGE_NAME);
     libvlc_set_user_agent (vlc, "VLC media player", "VLC/"PACKAGE_VERSION);
 
-    if (libvlc_add_intf (vlc, NULL))
+    if (libvlc_InternalAddIntf (vlc->p_libvlc_int, NULL))
     {
         fprintf(stderr, "%s: cannot start any interface. Exiting.\n", argv[0]);
         goto out;
     }
 
-    libvlc_playlist_play (vlc);
+    libvlc_InternalPlay (vlc->p_libvlc_int);
 
     /* Qt insists on catching SIGCHLD via signal handler. To work around that,
      * unblock it after all our child threads are created. */


=====================================
bin/winvlc.c
=====================================
@@ -40,6 +40,8 @@
 #include <io.h>
 #include <shlobj.h>
 
+#include "../lib/libvlc_internal.h"
+
 #ifdef HAVE_BREAKPAD
 void CheckCrashDump( const wchar_t* crashdump_path );
 void* InstallCrashHandler( const wchar_t* crashdump_path );
@@ -242,12 +244,12 @@ int WINAPI WinMain( HINSTANCE hInstance, HINSTANCE hPrevInstance,
     {
         HANDLE sem = CreateSemaphore(NULL, 0, 1, NULL);
 
-        libvlc_set_exit_handler(vlc, vlc_kill, &sem);
+        libvlc_SetExitHandler(vlc->p_libvlc_int, vlc_kill, &sem);
         libvlc_set_app_id (vlc, "org.VideoLAN.VLC", PACKAGE_VERSION,
                            PACKAGE_NAME);
         libvlc_set_user_agent (vlc, "VLC media player", "VLC/"PACKAGE_VERSION);
-        libvlc_add_intf (vlc, NULL);
-        libvlc_playlist_play (vlc);
+        libvlc_InternalAddIntf (vlc->p_libvlc_int, NULL);
+        libvlc_InternalPlay (vlc->p_libvlc_int);
 
         WaitForSingleObject(sem, INFINITE);
         CloseHandle(sem);


=====================================
include/meson.build
=====================================
@@ -12,7 +12,6 @@ install_headers(
     'vlc/libvlc_media_track.h',
     'vlc/libvlc_picture.h',
     'vlc/libvlc_renderer_discoverer.h',
-    'vlc/deprecated.h',
     'vlc/libvlc_version.h',
     'vlc/libvlc_video.h',
     subdir: 'vlc')


=====================================
include/vlc/deprecated.h deleted
=====================================
@@ -1,57 +0,0 @@
-/*****************************************************************************
- * deprecated.h:  libvlc deprecated API
- *****************************************************************************
- * Copyright (C) 1998-2008 VLC authors and VideoLAN
- *
- * Authors: Clément Stenac <zorglub at videolan.org>
- *          Jean-Paul Saman <jpsaman at videolan.org>
- *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as published by
- * the Free Software Foundation; either version 2.1 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
- *****************************************************************************/
-
-#ifndef LIBVLC_DEPRECATED_H
-#define LIBVLC_DEPRECATED_H 1
-
-# ifdef __cplusplus
-extern "C" {
-# endif
-
-/**
- * \ingroup libvlc
- * \defgroup libvlc_playlist LibVLC playlist (legacy)
- * @deprecated Use @ref libvlc_media_list instead.
- * @{
- * \file
- * LibVLC deprecated playlist API
- */
-
-/**
- * Start playing (if there is any item in the playlist).
- *
- * Additional playlist item options can be specified for addition to the
- * item before it is played.
- *
- * \param p_instance the playlist instance
- */
-LIBVLC_DEPRECATED LIBVLC_API
-void libvlc_playlist_play( libvlc_instance_t *p_instance );
-
-/** @}*/
-
-# ifdef __cplusplus
-}
-# endif
-
-#endif /* _LIBVLC_DEPRECATED_H */


=====================================
include/vlc/libvlc.h
=====================================
@@ -202,36 +202,6 @@ LIBVLC_API libvlc_instance_t *libvlc_retain( libvlc_instance_t *p_instance );
  */
 LIBVLC_API int libvlc_abi_version(void);
 
-/**
- * Try to start a user interface for the libvlc instance.
- *
- * \param p_instance the instance
- * \param name interface name, or NULL for default
- * \return 0 on success, -1 on error.
- */
-LIBVLC_API
-int libvlc_add_intf( libvlc_instance_t *p_instance, const char *name );
-
-/**
- * Registers a callback for the LibVLC exit event. This is mostly useful if
- * the VLC playlist and/or at least one interface are started with
- * libvlc_playlist_play() or libvlc_add_intf() respectively.
- * Typically, this function will wake up your application main loop (from
- * another thread).
- *
- * \note This function should be called before the playlist or interface are
- * started. Otherwise, there is a small race condition: the exit event could
- * be raised before the handler is registered.
- *
- * \param p_instance LibVLC instance
- * \param cb callback to invoke when LibVLC wants to exit,
- *           or NULL to disable the exit handler (as by default)
- * \param opaque data pointer for the callback
- */
-LIBVLC_API
-void libvlc_set_exit_handler( libvlc_instance_t *p_instance,
-                              void (*cb) (void *), void *opaque );
-
 /**
  * Sets the application name. LibVLC passes this as the user agent string
  * when a protocol requires it.


=====================================
include/vlc/vlc.h
=====================================
@@ -47,7 +47,6 @@ extern "C" {
 #include "libvlc_events.h"
 #include "libvlc_dialog.h"
 #include "libvlc_version.h"
-#include "deprecated.h"
 
 # ifdef __cplusplus
 }


=====================================
lib/Makefile.am
=====================================
@@ -8,7 +8,6 @@ BUILT_SOURCES = $(nodist_pkginclude_HEADERS)
 CLEANFILES = $(BUILT_SOURCES) $(pkgconfig_DATA)
 
 pkginclude_HEADERS = \
-	../include/vlc/deprecated.h \
 	../include/vlc/libvlc.h \
 	../include/vlc/libvlc_dialog.h \
 	../include/vlc/libvlc_events.h \
@@ -38,7 +37,6 @@ libvlc_la_SOURCES = \
 	renderer_discoverer.c \
 	error.c \
 	log.c \
-	playlist.c \
 	video.c \
 	audio.c \
 	event.c \


=====================================
lib/core.c
=====================================
@@ -102,13 +102,6 @@ void libvlc_release( libvlc_instance_t *p_instance )
     }
 }
 
-void libvlc_set_exit_handler( libvlc_instance_t *p_i, void (*cb) (void *),
-                              void *data )
-{
-    libvlc_int_t *p_libvlc = p_i->p_libvlc_int;
-    libvlc_SetExitHandler( p_libvlc, cb, data );
-}
-
 void libvlc_set_user_agent (libvlc_instance_t *p_i,
                             const char *name, const char *http)
 {


=====================================
lib/libvlc.sym
=====================================
@@ -1,6 +1,5 @@
 libvlc_errmsg
 libvlc_clearerr
-libvlc_add_intf
 libvlc_audio_equalizer_get_amp_at_index
 libvlc_audio_equalizer_get_band_count
 libvlc_audio_equalizer_get_band_frequency
@@ -210,7 +209,6 @@ libvlc_media_set_meta_extra
 libvlc_media_get_meta_extra_names
 libvlc_media_meta_extra_names_release
 libvlc_new
-libvlc_playlist_play
 libvlc_release
 libvlc_renderer_item_name
 libvlc_renderer_item_type
@@ -266,7 +264,6 @@ libvlc_video_set_teletext
 libvlc_video_take_snapshot
 libvlc_video_new_viewpoint
 libvlc_video_update_viewpoint
-libvlc_set_exit_handler
 libvlc_audio_filter_list_get
 libvlc_video_filter_list_get
 libvlc_module_description_list_release


=====================================
lib/libvlc_internal.h
=====================================
@@ -47,10 +47,48 @@ VLC_API int libvlc_InternalInit( libvlc_int_t *, int, const char *ppsz_argv[] );
 VLC_API void libvlc_InternalCleanup( libvlc_int_t * );
 VLC_API void libvlc_InternalDestroy( libvlc_int_t * );
 
-VLC_API int libvlc_InternalAddIntf( libvlc_int_t *, const char * );
-VLC_API void libvlc_InternalPlay( libvlc_int_t * );
+/**
+ * Try to start a user interface for the libvlc instance.
+ *
+ * \param libvlcint the internal instance
+ * \param name interface name, or NULL for default
+ * \return 0 on success, -1 on error.
+ */
+VLC_API int libvlc_InternalAddIntf( libvlc_int_t *libvlcint, const char *name );
+
+/**
+ * Start playing the main playlist
+ *
+ * The main playlist can only be populated via an interface created by the
+ * libvlc_InternalAddIntf() function. The control and media flow will only be
+ * controlled by the interface previously added.
+ *
+ * One of these 2 functions (libvlc_InternalAddIntf() or libvlc_InternalPlay())
+ * will trigger the creation of an internal playlist and player.
+ *
+ * \param libvlcint the internal instance
+ */
+VLC_API void libvlc_InternalPlay( libvlc_int_t *libvlcint );
 VLC_API void libvlc_InternalWait( libvlc_int_t * );
-VLC_API void libvlc_SetExitHandler( libvlc_int_t *, void (*) (void *), void * );
+
+/**
+ * Registers a callback for the LibVLC exit event. This is mostly useful if
+ * the VLC playlist and/or at least one interface are started with
+ * libvlc_InternalPlay() or libvlc_InternalAddIntf () respectively.
+ * Typically, this function will wake up your application main loop (from
+ * another thread).
+ *
+ * \note This function should be called before the playlist or interface are
+ * started. Otherwise, there is a small race condition: the exit event could
+ * be raised before the handler is registered.
+ *
+ * \param libvlcint the internal instance
+ * \param cb callback to invoke when LibVLC wants to exit,
+ *           or NULL to disable the exit handler (as by default)
+ * \param opaque data pointer for the callback
+ */
+VLC_API void libvlc_SetExitHandler( libvlc_int_t *libvlcint, void (*cb) (void *),
+                                    void *opaque );
 
 /***************************************************************************
  * Opaque structures for libvlc API


=====================================
lib/meson.build
=====================================
@@ -4,7 +4,6 @@ libvlc_sources = [
     'renderer_discoverer.c',
     'error.c',
     'log.c',
-    'playlist.c',
     'video.c',
     'audio.c',
     'event.c',


=====================================
lib/playlist.c deleted
=====================================
@@ -1,50 +0,0 @@
-/*****************************************************************************
- * playlist.c: libvlc new API playlist handling functions
- *****************************************************************************
- * Copyright (C) 2005 VLC authors and VideoLAN
- *
- * Authors: Clément Stenac <zorglub at videolan.org>
- *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as published by
- * the Free Software Foundation; either version 2.1 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
- *****************************************************************************/
-
-#ifdef HAVE_CONFIG_H
-# include "config.h"
-#endif
-
-#include "libvlc_internal.h"
-#include "../src/libvlc.h"
-
-#include <vlc/vlc.h>
-
-#include <assert.h>
-
-void libvlc_playlist_play( libvlc_instance_t *p_instance )
-{
-    libvlc_InternalPlay( p_instance->p_libvlc_int );
-}
-
-int libvlc_add_intf( libvlc_instance_t *p_instance, const char *name )
-{
-    if( libvlc_InternalAddIntf( p_instance->p_libvlc_int, name ))
-    {
-        if( name != NULL )
-            libvlc_printerr("interface \"%s\" initialization failed", name );
-        else
-            libvlc_printerr("default interface initialization failed");
-        return -1;
-    }
-    return 0;
-}


=====================================
po/POTFILES.in
=====================================
@@ -14,7 +14,6 @@ include/vlc_config.h
 include/vlc_config_cat.h
 include/vlc_configuration.h
 include/vlc_demux.h
-include/vlc/deprecated.h
 include/vlc_epg.h
 include/vlc_es.h
 include/vlc_es_out.h
@@ -143,7 +142,6 @@ lib/media_list.c
 lib/media_list_path.h
 lib/media_list_player.c
 lib/media_player.c
-lib/playlist.c
 lib/video.c
 
 # modules


=====================================
src/test/headers.c
=====================================
@@ -32,7 +32,6 @@
 #endif
 
 #include <vlc/vlc.h>
-#include <vlc/deprecated.h>
 #include <vlc/libvlc.h>
 #include <vlc/libvlc_events.h>
 #include <vlc/libvlc_media.h>


=====================================
test/iosvlc.m
=====================================
@@ -38,6 +38,8 @@
 
 #include <TargetConditionals.h>
 
+#include "../lib/libvlc_internal.h"
+
 @interface AppDelegate : UIResponder <UIApplicationDelegate> {
     @public
     libvlc_instance_t *_libvlc;
@@ -131,10 +133,11 @@
 #endif
 
     /* Start glue interface, see code below */
-    libvlc_add_intf(_libvlc, "ios_interface,none");
+
+    libvlc_InternalAddIntf(_libvlc->p_libvlc_int, "ios_interface,none");
 
     /* Start parsing arguments and eventual playback */
-    libvlc_playlist_play(_libvlc);
+    libvlc_InternalPlay(_libvlc);
 
     return YES;
 }


=====================================
test/modules/lua/extension.c
=====================================
@@ -43,6 +43,8 @@
 
 #include <limits.h>
 
+#include "../lib/libvlc_internal.h"
+
 const char vlc_module_name[] = MODULE_STRING;
 
 static int exitcode = 0;
@@ -142,8 +144,8 @@ int main(void)
 
     libvlc_instance_t *vlc = libvlc_new(ARRAY_SIZE(args), args);
 
-    libvlc_add_intf(vlc, MODULE_STRING);
-    libvlc_playlist_play(vlc);
+    libvlc_InternalAddIntf(vlc->p_libvlc_int, MODULE_STRING);
+    libvlc_InternalPlay(vlc->p_libvlc_int);
 
     libvlc_release(vlc);
     return 0;


=====================================
test/modules/misc/medialibrary.c
=====================================
@@ -43,6 +43,8 @@
 #include <vlc_media_library.h>
 #include <ftw.h>
 
+#include "../lib/libvlc_internal.h"
+
 const char vlc_module_name[] = MODULE_STRING;
 
 static int exitcode = 0;
@@ -125,8 +127,8 @@ int main(void)
 
     libvlc_instance_t *vlc = libvlc_new(ARRAY_SIZE(args), args);
 
-    libvlc_add_intf(vlc, MODULE_STRING);
-    libvlc_playlist_play(vlc);
+    libvlc_InternalAddIntf(vlc->p_libvlc_int, MODULE_STRING);
+    libvlc_InternalPlay(vlc->p_libvlc_int);
 
     libvlc_release(vlc);
 


=====================================
test/modules/stream_out/transcode.c
=====================================
@@ -45,6 +45,7 @@
 #include <limits.h>
 
 #include "transcode.h"
+#include "../lib/libvlc_internal.h"
 
 static const char dec_dev_arg[] = "--dec-dev=" MODULE_STRING;
 
@@ -400,7 +401,7 @@ int main( int argc, char **argv )
 {
     (void)argc; (void)argv;
 #ifndef ENABLE_SOUT
-    (void) libvlc_playlist_play;
+    (void) libvlc_InternalPlay;
     return 77;
 #endif
     test_init();
@@ -412,8 +413,8 @@ int main( int argc, char **argv )
 
     libvlc_instance_t *vlc = libvlc_new(ARRAY_SIZE(args), args);
 
-    libvlc_add_intf(vlc, MODULE_STRING);
-    libvlc_playlist_play(vlc);
+    libvlc_InternalAddIntf(vlc->p_libvlc_int, MODULE_STRING);
+    libvlc_InternalPlay(vlc->p_libvlc_int);
 
     libvlc_release(vlc);
     assert(transcode_scenarios_count == current_scenario);


=====================================
test/src/input/decoder/input_decoder.c
=====================================
@@ -45,6 +45,7 @@
 #include <limits.h>
 
 #include "input_decoder.h"
+#include "../lib/libvlc_internal.h"
 
 const char vlc_module_name[] = MODULE_STRING;
 
@@ -479,8 +480,8 @@ int main( int argc, char **argv )
 
     libvlc_instance_t *vlc = libvlc_new(ARRAY_SIZE(args), args);
 
-    libvlc_add_intf(vlc, MODULE_STRING);
-    libvlc_playlist_play(vlc);
+    libvlc_InternalAddIntf(vlc->p_libvlc_int, MODULE_STRING);
+    libvlc_InternalPlay(vlc->p_libvlc_int);
 
     libvlc_release(vlc);
     assert(input_decoder_scenarios_count == current_scenario);


=====================================
test/src/misc/image.c
=====================================
@@ -42,6 +42,8 @@
 
 #include <limits.h>
 
+#include "../lib/libvlc_internal.h"
+
 const char vlc_module_name[] = MODULE_STRING;
 
 static atomic_bool encoder_opened = false;
@@ -154,8 +156,8 @@ int main(void)
 
     libvlc_instance_t *vlc = libvlc_new(ARRAY_SIZE(args), args);
 
-    libvlc_add_intf(vlc, MODULE_STRING);
-    libvlc_playlist_play(vlc);
+    libvlc_InternalAddIntf(vlc->p_libvlc_int, MODULE_STRING);
+    libvlc_InternalPlay(vlc->p_libvlc_int);
 
     libvlc_release(vlc);
 


=====================================
test/src/misc/image_cvpx.c
=====================================
@@ -41,6 +41,8 @@
 
 #include <limits.h>
 
+#include "../lib/libvlc_internal.h"
+
 const char vlc_module_name[] = MODULE_STRING;
 
 static int OpenIntf(vlc_object_t *root)
@@ -113,8 +115,8 @@ int main()
 
     libvlc_instance_t *vlc = libvlc_new(ARRAY_SIZE(args), args);
 
-    libvlc_add_intf(vlc, MODULE_STRING);
-    libvlc_playlist_play(vlc);
+    libvlc_InternalAddIntf(vlc->p_libvlc_int, MODULE_STRING);
+    libvlc_InternalPlay(vlc->p_libvlc_int);
 
     libvlc_release(vlc);
 


=====================================
test/src/video_output/video_output.c
=====================================
@@ -43,6 +43,7 @@
 #include <limits.h>
 
 #include "video_output.h"
+#include "../lib/libvlc_internal.h"
 
 static const char dec_dev_arg[] = "--dec-dev=" MODULE_STRING;
 
@@ -294,8 +295,9 @@ int main( int argc, char **argv )
 
     libvlc_instance_t *vlc = libvlc_new(ARRAY_SIZE(args), args);
 
-    libvlc_add_intf(vlc, MODULE_STRING);
-    libvlc_playlist_play(vlc);
+
+    libvlc_InternalAddIntf(vlc->p_libvlc_int, MODULE_STRING);
+    libvlc_InternalPlay(vlc->p_libvlc_int);
 
     libvlc_release(vlc);
     assert(vout_scenarios_count == current_scenario);



View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/352b88c10636b86f5aca08f610cb9cc8127df950...515ed469c8760b6b5719818c006ef78af992416e

-- 
View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/352b88c10636b86f5aca08f610cb9cc8127df950...515ed469c8760b6b5719818c006ef78af992416e
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