[vlc-devel] [PATCH] libvlc: add a bool return value to the resize callback

Rémi Denis-Courmont remi at remlab.net
Thu Nov 15 19:47:39 CET 2018


The size is a notification, not a request, from the system via the window. It is not possible to "fail" a notification. The return value here is void very much on purpose.

Nack.

Le 15 novembre 2018 15:20:28 GMT+02:00, Steve Lhomme <robux4 at ycbcr.xyz> a écrit :
>For some reason it may be impossible to the host to provide a context
>with the
>given size.
>---
> include/vlc/libvlc_media_player.h | 3 ++-
> modules/video_output/vgl.c        | 2 +-
> 2 files changed, 3 insertions(+), 2 deletions(-)
>
>diff --git a/include/vlc/libvlc_media_player.h
>b/include/vlc/libvlc_media_player.h
>index 73dadda3ba..987fd40c9d 100644
>--- a/include/vlc/libvlc_media_player.h
>+++ b/include/vlc/libvlc_media_player.h
>@@ -446,9 +446,10 @@ typedef void (*libvlc_gl_cleanup_cb)(void*
>opaque);
>* \param opaque private pointer passed to the @a
>libvlc_video_set_opengl_callbacks() [IN]
>  * \param width video width in pixel [IN]
>  * \param height video height in pixel [IN]
>+ * \return true on success
>  * \version LibVLC 4.0.0 or later
>  */
>-typedef void (*libvlc_gl_resize_cb)(void* opaque, unsigned width,
>unsigned height);
>+typedef bool (*libvlc_gl_resize_cb)(void* opaque, unsigned width,
>unsigned height);
> 
> 
> /**
>diff --git a/modules/video_output/vgl.c b/modules/video_output/vgl.c
>index 6a69a3751e..1a1d537edc 100644
>--- a/modules/video_output/vgl.c
>+++ b/modules/video_output/vgl.c
>@@ -33,7 +33,7 @@ struct vout_display_sys_t
> {
>     void (*cleanupCb)(void* opaque);
>     bool (*setupCb)(void* opaque);
>-    void (*resizeCb)(void* opaque, unsigned, unsigned);
>+    bool (*resizeCb)(void* opaque, unsigned, unsigned);
>     void (*swapCb)(void* opaque);
>     bool (*makeCurrentCb)(void* opaque, bool);
>     void* (*getProcAddressCb)(void* opaque, const char *name);
>-- 
>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/20181115/d99909b8/attachment.html>


More information about the vlc-devel mailing list