[vlc-devel] [RFC 5/8] libvlc: pass the video output callbacks using a structure

Rémi Denis-Courmont remi at remlab.net
Tue Nov 20 17:30:01 CET 2018


Le tiistaina 20. marraskuuta 2018, 17.42.39 EET Steve Lhomme a écrit :
> This way it can be expanded in the future without changing existing code.

Yeah, in theory, you could add new optional callbacks. But if you need to 
change/remove callbacks then it won't work. It's much simpler for application 
developers to just get a new structure and a new function.

Also this forces to allocate the callback structure on heap instead of in 
data.relro section where it really belongs.

-- 
レミ・デニ-クールモン
http://www.remlab.net/





More information about the vlc-devel mailing list