[vlc-devel] [RFC 1/6] libvlc: add rendering callbacks for D3D11 and D3D9

Rémi Denis-Courmont remi at remlab.net
Thu May 2 16:29:26 CEST 2019


Le torstaina 2. toukokuuta 2019, 11.04.42 EEST Steve Lhomme a écrit :
> > I really don't think that a type-unsafe API is a good idea for LibVLC.
> > It's
> > already hard enough to get right.
> 
> It's a balance between simplicity and safety.

No. Proper type-safe callbacks are simpler to document and implement. This is 
only a balance between making it easier for the one VLC developer vs everybody 
else.

> Having to handle a
> message/control means you need to understand what is in "input" and in
> "output". It's exactly the same has having to add a callback with the
> proper parameters, you also need to understand them.

Sure, you have to know what you are doing either way. That is not a 
justification for not providing type safety in my book.

> > What's the point of this static assertion? Structures of different types
> > cannot alias even if they have the same layout and representation, AFAIK.
> Because the libvlc API mimicks the vlc_vout_display API I did for rendering:
> https://code.videolan.org/robUx4/vlc/blob/libvlc/callbacks/59/include/vlc_v
> out_display.h#L458

I don't think LibVLC API should, or even can, mimick the vout display API, 
since the latter is not supposed to be stable.

-- 
Rémi Denis-Courmont
http://www.remlab.net/





More information about the vlc-devel mailing list