[vlc-devel] [PATCH 1/6] libvlc: rename libvlc_video_set_output_callbacks

Rémi Denis-Courmont remi at remlab.net
Fri Jan 25 17:23:25 CET 2019


It's "really about" providing an OpenGL context and a surface. While I agree that "output" is not the best of name, "surface" does not strike me as much of an improvement - compare "glcontext" or "glsurface".

Le 25 janvier 2019 17:47:00 GMT+02:00, Steve Lhomme <robux4 at ycbcr.xyz> a écrit :
>It's really about surface rendering
>---
> doc/libvlc/sdl_opengl_player.cpp  |  4 ++--
> include/vlc/libvlc_media_player.h | 16 ++++++++--------
> lib/libvlc.sym                    |  2 +-
> lib/media_player.c                |  2 +-
> 4 files changed, 12 insertions(+), 12 deletions(-)
>
>diff --git a/doc/libvlc/sdl_opengl_player.cpp
>b/doc/libvlc/sdl_opengl_player.cpp
>index d34b99b268..10a01c2a17 100644
>--- a/doc/libvlc/sdl_opengl_player.cpp
>+++ b/doc/libvlc/sdl_opengl_player.cpp
>@@ -16,7 +16,7 @@
> #include <vlc/vlc.h>
> 
> /*
>- * This program show how to use libvlc_video_set_output_callbacks API.
>+ * This program show how to use libvlc_video_set_surface_callbacks
>API.
>  *
>  * The main idea is to set up libvlc to render into FBO, and to use a
>* triple buffer mechanism to share textures between VLC and the
>rendering
>@@ -79,7 +79,7 @@ public:
>             return false;
>         }
>         // Define the opengl rendering callbacks
>-        libvlc_video_set_output_callbacks(m_mp,
>libvlc_video_engine_opengl,
>+        libvlc_video_set_surface_callbacks(m_mp,
>libvlc_video_engine_opengl,
>             setup, cleanup, resize, swap,
>             make_current, get_proc_address,
>             this);
>diff --git a/include/vlc/libvlc_media_player.h
>b/include/vlc/libvlc_media_player.h
>index 2e4aff7a2b..e75d7a3534 100644
>--- a/include/vlc/libvlc_media_player.h
>+++ b/include/vlc/libvlc_media_player.h
>@@ -459,7 +459,7 @@ void libvlc_video_set_format_callbacks(
>libvlc_media_player_t *mp,
> /**
>  * Callback prototype called to initialize user data.
>  *
>- * \param opaque private pointer passed to the @a
>libvlc_video_set_output_callbacks() [IN]
>+ * \param opaque private pointer passed to the @a
>libvlc_video_set_surface_callbacks() [IN]
>  * \return true on success
>  * \version LibVLC 4.0.0 or later
>  */
>@@ -469,7 +469,7 @@ typedef bool (*libvlc_video_setup_cb)(void*
>opaque);
> /**
>  * Callback prototype called to release user data
>  *
>- * \param opaque private pointer passed to the @a
>libvlc_video_set_output_callbacks() [IN]
>+ * \param opaque private pointer passed to the @a
>libvlc_video_set_surface_callbacks() [IN]
>  * \version LibVLC 4.0.0 or later
>  */
> typedef void (*libvlc_video_cleanup_cb)(void* opaque);
>@@ -477,7 +477,7 @@ typedef void (*libvlc_video_cleanup_cb)(void*
>opaque);
> /**
>  * Callback prototype called on video size changes
>  *
>- * \param opaque private pointer passed to the @a
>libvlc_video_set_output_callbacks() [IN]
>+ * \param opaque private pointer passed to the @a
>libvlc_video_set_surface_callbacks() [IN]
>  * \param width video width in pixel [IN]
>  * \param height video height in pixel [IN]
>  * \version LibVLC 4.0.0 or later
>@@ -488,7 +488,7 @@ typedef void (*libvlc_video_update_output_cb)(void*
>opaque, unsigned width, unsi
> /**
>  * Callback prototype called after performing drawing calls.
>  *
>- * \param opaque private pointer passed to the @a
>libvlc_video_set_output_callbacks() [IN]
>+ * \param opaque private pointer passed to the @a
>libvlc_video_set_surface_callbacks() [IN]
>  * \version LibVLC 4.0.0 or later
>  */
> typedef void (*libvlc_video_swap_cb)(void* opaque);
>@@ -496,7 +496,7 @@ typedef void (*libvlc_video_swap_cb)(void* opaque);
> /**
>  * Callback prototype to set up the OpenGL context for rendering
>  *
>- * \param opaque private pointer passed to the @a
>libvlc_video_set_output_callbacks() [IN]
>+ * \param opaque private pointer passed to the @a
>libvlc_video_set_surface_callbacks() [IN]
>* \param enter true to set the context as current, false to unset it
>[IN]
>  * \return true on success
>  * \version LibVLC 4.0.0 or later
>@@ -506,7 +506,7 @@ typedef bool (*libvlc_video_makeCurrent_cb)(void*
>opaque, bool enter);
> /**
>  * Callback prototype to load opengl functions
>  *
>- * \param opaque private pointer passed to the @a
>libvlc_video_set_output_callbacks() [IN]
>+ * \param opaque private pointer passed to the @a
>libvlc_video_set_surface_callbacks() [IN]
>  * \param fct_name name of the opengl function to load
>  * \return a pointer to the named OpenGL function the NULL otherwise
>  * \version LibVLC 4.0.0 or later
>@@ -515,7 +515,7 @@ typedef void*
>(*libvlc_video_getProcAddress_cb)(void* opaque, const char* fct_na
> 
> /**
>  * Enumeration of the Video engine to be used on output.
>- * can be passed to @a libvlc_video_set_output_callbacks
>+ * can be passed to @a libvlc_video_set_surface_callbacks
>  */
> typedef enum libvlc_video_engine_t {
>     libvlc_video_engine_opengl,
>@@ -543,7 +543,7 @@ typedef enum libvlc_video_engine_t {
>  * \version LibVLC 4.0.0 or later
>  */
> LIBVLC_API
>-int libvlc_video_set_output_callbacks( libvlc_media_player_t *mp,
>+int libvlc_video_set_surface_callbacks( libvlc_media_player_t *mp,
>                                         libvlc_video_engine_t engine,
>                                        libvlc_video_setup_cb setup_cb,
>                                    libvlc_video_cleanup_cb cleanup_cb,
>diff --git a/lib/libvlc.sym b/lib/libvlc.sym
>index 285cf4f7af..e948b57120 100644
>--- a/lib/libvlc.sym
>+++ b/lib/libvlc.sym
>@@ -246,7 +246,7 @@ libvlc_video_set_crop_geometry
> libvlc_video_set_deinterlace
> libvlc_video_set_format
> libvlc_video_set_format_callbacks
>-libvlc_video_set_output_callbacks
>+libvlc_video_set_surface_callbacks
> libvlc_video_set_key_input
> libvlc_video_set_logo_int
> libvlc_video_set_logo_string
>diff --git a/lib/media_player.c b/lib/media_player.c
>index 4079efd4b0..5b42feba37 100644
>--- a/lib/media_player.c
>+++ b/lib/media_player.c
>@@ -1160,7 +1160,7 @@ void libvlc_video_set_format(
>libvlc_media_player_t *mp, const char *chroma,
>     var_SetInteger( mp, "vmem-pitch", pitch );
> }
> 
>-int libvlc_video_set_output_callbacks( libvlc_media_player_t *mp,
>+int libvlc_video_set_surface_callbacks( libvlc_media_player_t *mp,
>                                         libvlc_video_engine_t engine,
>                                        libvlc_video_setup_cb setup_cb,
>                                    libvlc_video_cleanup_cb cleanup_cb,
>-- 
>2.17.1
>
>_______________________________________________
>vlc-devel mailing list
>To unsubscribe or modify your subscription options:
>https://mailman.videolan.org/listinfo/vlc-devel

-- 
Envoyé de mon appareil Android avec Courriel K-9 Mail. Veuillez excuser ma brièveté.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20190125/5576981e/attachment.html>


More information about the vlc-devel mailing list