[vlc-devel] [PATCH 2/4] vgl: expose opengl callbacks through libvlc
pierre at videolabs.io
Wed Jul 4 16:46:16 CEST 2018
Concerning the create(size)/destroy callbacks, we can get the informations from the resize callback in opengl module. The main advantage is that it rely on existing mechanism and doesn't interfere with vout_helper.
Though I see some drawbacks:
- resize callback isn't call with opengl context. though, we can still enforce that.
- we won't get notified when the resources aren't needed anymore.
- resize is called several times, without actual size changes.
For actual resize, as far as I understand, the opengl module is closed and reopen on format change, so the case seems handled in the V1 of my patches.
If there is actual cases where the resolution would change without a recreation of the opengl module, I'd be interested in sample.
So I have mixed feelings about this change.
On mercredi 4 juillet 2018 10:45:17 CEST Rémi Denis-Courmont wrote:
> I don't know if the size should be exposed to the backend. But AFAIK, the size can change during the lifetime of the GL backend, so it can probably not be tied to an initialization callback. Also, I would be prepared that the size is not even known yet when the GL is needed.
> Le 4 juillet 2018 11:13:57 GMT+03:00, Pierre Lamot <pierre at videolabs.io> a écrit :
> >> > + * \param opaque private pointer passed to the @a
> >> > libvlc_video_set_opengl_callbacks() [IN]
> >> > + * \param enter true before
> >> > performing the rendering, false after [IN]
> >> > + * \version LibVLC 4.0.0 or
> >> > later
> >> > + */
> >> > +typedef void (*libvlc_gl_render_cb)(void* opaque, bool enter);
> >> I don't really see why this should be different from everything else
> >- a post-
> >> render swap callback.
> >The idea was to let the user set up his context before rendering (ie:
> >select the right FBO), I thought
> >it was easier this way. This might work with a single post render swap,
> >I'll try to do it this way.
> >> In fact, special snowflake callbacks are notorious problems when
> >> the backends.
> >I can make it two callbacks, but i don't think that's your point.
> >Pierre Lamot
> >vlc-devel mailing list
> >To unsubscribe or modify your subscription options:
More information about the vlc-devel