[vlc-commits] libvlc: remove the _gl_ from the video output callbacks API
Steve Lhomme
git at videolan.org
Wed Jan 16 13:03:44 CET 2019
vlc | branch: master | Steve Lhomme <robux4 at ycbcr.xyz> | Tue Nov 20 09:45:51 2018 +0100| [dad77ea95c03de2115f28f1ca6040aba9ed4ecf5] | committer: Steve Lhomme
libvlc: remove the _gl_ from the video output callbacks API
And rename the matching variables to "vout-cb-*"
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=dad77ea95c03de2115f28f1ca6040aba9ed4ecf5
---
include/vlc/libvlc_media_player.h | 24 ++++++++++++------------
lib/media_player.c | 36 ++++++++++++++++++------------------
modules/video_output/vgl.c | 12 ++++++------
3 files changed, 36 insertions(+), 36 deletions(-)
diff --git a/include/vlc/libvlc_media_player.h b/include/vlc/libvlc_media_player.h
index 5a05c1e322..49b1b4c7e8 100644
--- a/include/vlc/libvlc_media_player.h
+++ b/include/vlc/libvlc_media_player.h
@@ -429,7 +429,7 @@ void libvlc_video_set_callbacks( libvlc_media_player_t *mp,
* \return true on success
* \version LibVLC 4.0.0 or later
*/
-typedef bool (*libvlc_gl_setup_cb)(void* opaque);
+typedef bool (*libvlc_video_setup_cb)(void* opaque);
/**
@@ -438,7 +438,7 @@ typedef bool (*libvlc_gl_setup_cb)(void* opaque);
* \param opaque private pointer passed to the @a libvlc_video_set_output_callbacks() [IN]
* \version LibVLC 4.0.0 or later
*/
-typedef void (*libvlc_gl_cleanup_cb)(void* opaque);
+typedef void (*libvlc_video_cleanup_cb)(void* opaque);
/**
* Callback prototype called on video size changes
@@ -448,7 +448,7 @@ typedef void (*libvlc_gl_cleanup_cb)(void* opaque);
* \param height video height in pixel [IN]
* \version LibVLC 4.0.0 or later
*/
-typedef void (*libvlc_update_output_cb)(void* opaque, unsigned width, unsigned height);
+typedef void (*libvlc_video_update_output_cb)(void* opaque, unsigned width, unsigned height);
/**
@@ -457,7 +457,7 @@ typedef void (*libvlc_update_output_cb)(void* opaque, unsigned width, unsigned h
* \param opaque private pointer passed to the @a libvlc_video_set_output_callbacks() [IN]
* \version LibVLC 4.0.0 or later
*/
-typedef void (*libvlc_gl_swap_cb)(void* opaque);
+typedef void (*libvlc_video_swap_cb)(void* opaque);
/**
* Callback prototype to set up the OpenGL context for rendering
@@ -467,7 +467,7 @@ typedef void (*libvlc_gl_swap_cb)(void* opaque);
* \return true on success
* \version LibVLC 4.0.0 or later
*/
-typedef bool (*libvlc_gl_makeCurrent_cb)(void* opaque, bool enter);
+typedef bool (*libvlc_video_makeCurrent_cb)(void* opaque, bool enter);
/**
* Callback prototype to load opengl functions
@@ -477,7 +477,7 @@ typedef bool (*libvlc_gl_makeCurrent_cb)(void* opaque, bool enter);
* \return a pointer to the named OpenGL function the NULL otherwise
* \version LibVLC 4.0.0 or later
*/
-typedef void* (*libvlc_gl_getProcAddress_cb)(void* opaque, const char* fct_name);
+typedef void* (*libvlc_video_getProcAddress_cb)(void* opaque, const char* fct_name);
/**
* Enumeration of the Video engine to be used on output.
@@ -510,12 +510,12 @@ typedef enum libvlc_video_engine_t {
LIBVLC_API
void libvlc_video_set_output_callbacks( libvlc_media_player_t *mp,
libvlc_video_engine_t engine,
- libvlc_gl_setup_cb setup_cb,
- libvlc_gl_cleanup_cb cleanup_cb,
- libvlc_update_output_cb update_output_cb,
- libvlc_gl_swap_cb swap_cb,
- libvlc_gl_makeCurrent_cb makeCurrent_cb,
- libvlc_gl_getProcAddress_cb getProcAddress_cb,
+ libvlc_video_setup_cb setup_cb,
+ libvlc_video_cleanup_cb cleanup_cb,
+ libvlc_video_update_output_cb update_output_cb,
+ libvlc_video_swap_cb swap_cb,
+ libvlc_video_makeCurrent_cb makeCurrent_cb,
+ libvlc_video_getProcAddress_cb getProcAddress_cb,
void* opaque );
/**
diff --git a/lib/media_player.c b/lib/media_player.c
index 7f64ad238c..89ba10d638 100644
--- a/lib/media_player.c
+++ b/lib/media_player.c
@@ -639,13 +639,13 @@ libvlc_media_player_new( libvlc_instance_t *instance )
var_Create (mp, "vmem-height", VLC_VAR_INTEGER | VLC_VAR_DOINHERIT);
var_Create (mp, "vmem-pitch", VLC_VAR_INTEGER | VLC_VAR_DOINHERIT);
- var_Create( mp, "vgl-opaque", VLC_VAR_ADDRESS );
- var_Create( mp, "vgl-setup-cb", VLC_VAR_ADDRESS );
- var_Create( mp, "vgl-cleanup-cb", VLC_VAR_ADDRESS );
+ var_Create( mp, "vout-cb-opaque", VLC_VAR_ADDRESS );
+ var_Create( mp, "vout-cb-setup", VLC_VAR_ADDRESS );
+ var_Create( mp, "vout-cb-cleanup", VLC_VAR_ADDRESS );
var_Create( mp, "vout-cb-update-output", VLC_VAR_ADDRESS );
- var_Create( mp, "vgl-swap-cb", VLC_VAR_ADDRESS );
- var_Create( mp, "vgl-get-proc-address-cb", VLC_VAR_ADDRESS );
- var_Create( mp, "vgl-make-current-cb", VLC_VAR_ADDRESS );
+ var_Create( mp, "vout-cb-swap", VLC_VAR_ADDRESS );
+ var_Create( mp, "vout-cb-get-proc-address", VLC_VAR_ADDRESS );
+ var_Create( mp, "vout-cb-make-current", VLC_VAR_ADDRESS );
var_Create (mp, "avcodec-hw", VLC_VAR_STRING);
var_Create (mp, "drawable-xid", VLC_VAR_INTEGER);
@@ -1162,12 +1162,12 @@ void libvlc_video_set_format( libvlc_media_player_t *mp, const char *chroma,
void libvlc_video_set_output_callbacks( libvlc_media_player_t *mp,
libvlc_video_engine_t engine,
- libvlc_gl_setup_cb setup_cb,
- libvlc_gl_cleanup_cb cleanup_cb,
- libvlc_update_output_cb update_output_cb,
- libvlc_gl_swap_cb swap_cb,
- libvlc_gl_makeCurrent_cb makeCurrent_cb,
- libvlc_gl_getProcAddress_cb getProcAddress_cb,
+ libvlc_video_setup_cb setup_cb,
+ libvlc_video_cleanup_cb cleanup_cb,
+ libvlc_video_update_output_cb update_output_cb,
+ libvlc_video_swap_cb swap_cb,
+ libvlc_video_makeCurrent_cb makeCurrent_cb,
+ libvlc_video_getProcAddress_cb getProcAddress_cb,
void* opaque )
{
#ifdef __ANDROID__
@@ -1188,13 +1188,13 @@ void libvlc_video_set_output_callbacks( libvlc_media_player_t *mp,
var_SetString ( mp, "gl", "vgl");
}
- var_SetAddress( mp, "vgl-opaque", opaque );
- var_SetAddress( mp, "vgl-setup-cb", setup_cb );
- var_SetAddress( mp, "vgl-cleanup-cb", cleanup_cb );
+ var_SetAddress( mp, "vout-cb-opaque", opaque );
+ var_SetAddress( mp, "vout-cb-setup", setup_cb );
+ var_SetAddress( mp, "vout-cb-cleanup", cleanup_cb );
var_SetAddress( mp, "vout-cb-update-output", update_output_cb );
- var_SetAddress( mp, "vgl-swap-cb", swap_cb );
- var_SetAddress( mp, "vgl-get-proc-address-cb", getProcAddress_cb );
- var_SetAddress( mp, "vgl-make-current-cb", makeCurrent_cb );
+ var_SetAddress( mp, "vout-cb-swap", swap_cb );
+ var_SetAddress( mp, "vout-cb-get-proc-address", getProcAddress_cb );
+ var_SetAddress( mp, "vout-cb-make-current", makeCurrent_cb );
}
diff --git a/modules/video_output/vgl.c b/modules/video_output/vgl.c
index c7bc5491bb..3617a096a0 100644
--- a/modules/video_output/vgl.c
+++ b/modules/video_output/vgl.c
@@ -113,13 +113,13 @@ static int Open(vlc_object_t *object)
if( !sys )
return VLC_ENOMEM;
- sys->opaque = var_InheritAddress(gl, "vgl-opaque");
- sys->setupCb = var_InheritAddress(gl, "vgl-setup-cb");
- sys->cleanupCb = var_InheritAddress(gl, "vgl-cleanup-cb");
+ sys->opaque = var_InheritAddress(gl, "vout-cb-opaque");
+ sys->setupCb = var_InheritAddress(gl, "vout-cb-setup");
+ sys->cleanupCb = var_InheritAddress(gl, "vout-cb-cleanup");
sys->resizeCb = var_InheritAddress(gl, "vout-cb-update-output");
- SET_CALLBACK_ADDR(sys->swapCb, "vgl-swap-cb");
- SET_CALLBACK_ADDR(sys->makeCurrentCb, "vgl-make-current-cb");
- SET_CALLBACK_ADDR(sys->getProcAddressCb, "vgl-get-proc-address-cb");
+ SET_CALLBACK_ADDR(sys->swapCb, "vout-cb-swap");
+ SET_CALLBACK_ADDR(sys->makeCurrentCb, "vout-cb-make-current");
+ SET_CALLBACK_ADDR(sys->getProcAddressCb, "vout-cb-get-proc-address");
gl->makeCurrent = MakeCurrent;
gl->releaseCurrent = ReleaseCurrent;
More information about the vlc-commits
mailing list