<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title></title>
</head>
<body>
<div name="messageBodySection">I don't think it's any notification. It's not an event it's a callback, used when rendering is done in a host app. And it tells the app the size it's going to use to render. It may have to allocate some texture and it may fail (4K rgba for example).
<div>I'm not sure rendering will work if the resizing fails.</div>
<div><br /></div>
<div>Later I'd like to signal the bit depth, the HDR format and possibly the pixel format (it may not be RGB).</div>
</div>
<div name="messageReplySection">On 15 Nov 2018 at 19:47 +0100, Rémi Denis-Courmont <remi@remlab.net>, wrote:<br />
<blockquote type="cite" style="margin: 5px 5px; padding-left: 10px; border-left: thin solid #1abc9c;">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.<br />
<br />
Nack.<br />
<br />
<div class="gmail_quote">Le 15 novembre 2018 15:20:28 GMT+02:00, Steve Lhomme <robux4@ycbcr.xyz> a écrit :
<blockquote class="gmail_quote" style="margin: 5px 5px; padding-left: 10px; border-left: thin solid #e67e22;">
<pre class="k9mail">For some reason it may be impossible to the host to provide a context with the<br />given size.</pre>
<hr />
<pre> include/vlc/libvlc_media_player.h | 3 ++-<br /> modules/video_output/vgl.c | 2 +-<br /> 2 files changed, 3 insertions(+), 2 deletions(-)<br /><br />diff --git a/include/vlc/libvlc_media_player.h b/include/vlc/libvlc_media_player.h<br />index 73dadda3ba..987fd40c9d 100644<br />--- a/include/vlc/libvlc_media_player.h<br />+++ b/include/vlc/libvlc_media_player.h<br />@@ -446,9 +446,10 @@ typedef void (*libvlc_gl_cleanup_cb)(void* opaque);<br /> * \param opaque private pointer passed to the @a libvlc_video_set_opengl_callbacks() [IN]<br /> * \param width video width in pixel [IN]<br /> * \param height video height in pixel [IN]<br />+ * \return true on success<br /> * \version LibVLC 4.0.0 or later<br /> */<br />-typedef void (*libvlc_gl_resize_cb)(void* opaque, unsigned width, unsigned height);<br />+typedef bool (*libvlc_gl_resize_cb)(void* opaque, unsigned width, unsigned height);<br /> <br /> <br /> /**<br />diff --git a/modules/video_output/vgl.c b/modules/video_output/vgl.c<br />index 6a69a3751e..1a1d537edc 100644<br />--- a/modules/video_output/vgl.c<br />+++ b/modules/video_output/vgl.c<br />@@ -33,7 +33,7 @@ struct vout_display_sys_t<br /> {<br /> void (*cleanupCb)(void* opaque);<br /> bool (*setupCb)(void* opaque);<br />- void (*resizeCb)(void* opaque, unsigned, unsigned);<br />+ bool (*resizeCb)(void* opaque, unsigned, unsigned);<br /> void (*swapCb)(void* opaque);<br /> bool (*makeCurrentCb)(void* opaque, bool);<br /> void* (*getProcAddressCb)(void* opaque, const char *name);</pre></blockquote>
</div>
<br />
--<br />
Envoyé de mon appareil Android avec Courriel K-9 Mail. Veuillez excuser ma brièveté.</blockquote>
</div>
</body>
</html>