[vlc-devel] [PATCH 2/9] libvlc: add a callback to notify the host when the rendering starts/ends

Steve Lhomme robux4 at ycbcr.xyz
Mon Jan 21 09:42:44 CET 2019

On 18/01/2019 18:27, Alexandre Janniaux wrote:
> Le ven. 18 janv. 2019 à 17:46, Rémi Denis-Courmont <remi at remlab.net> a écrit :
>> Le perjantaina 18. tammikuuta 2019, 15.58.58 EET Steve Lhomme a écrit :
>>> This is going to be necessary for Direct3D rendering as we will need to
>>> share the rendering context on both sides.
>> No. The API was deliberately made to look like GL/GL ES so it is easy to use.
>> Just because we are free to break ABI at the moment does not mean that we
>> should mess with existing API designs. If you cannot fit your use case in the
>> existing API, then most likely you should not be using it.

I tend to agree, OpenGL and D3D work quite differently. A host is not 
going to switch from one to the other easily so I guess it doesn't add 
much to merge them. It's just harder to read.

> I would say it is exactly the right time to break this if it can be
> generalised to
> more use cases, as libvlc 3.x is ough to be an LTS version.
> However, this is starting to be a lot of callbacks, maybe using a structure of
> callback would be clearer?

I did that before but the alloc/release doesn't add much. In fact it 
makes it easier to forget a callback.

More information about the vlc-devel mailing list