Passing argument, callback to module...

This forum is about all development around libVLC.
wcoder
Blank Cone
Blank Cone
Posts: 26
Joined: 30 Mar 2014 12:56

Passing argument, callback to module...

Postby wcoder » 19 Apr 2014 20:00

Hi,

I'm writing a video-out module using libvlc 2.1.2 on debian x86, i'm analysing in-tree module to learn how this kind of module work...

vlc_module_begin ... vlc_module_end seems to be use to pass argument and may be callback

ex : add_string( "fb-chroma", NULL, CHROMA_TEXT, CHROMA_LONGTEXT, true )
Seems to be used to change fourcc of frame buffer on fb.

on vmen in the past vmem-lock seems to be used to pass callback using :
sprintf(clock, "%lld", (long long int)(intptr_t)lock);
I don't found the module part is was replace by this
add_obsolete_string("vmem-lock") /* obsoleted since 1.1.1 */

To i need to convert fonction address to string, pass it to the module, convert it to pointer, and finalty use it ?

It's seems to be dirty\not safe... do i need to use a specific calling convention like __stdcall with COM under windows ?

Thanks for your help,

WCdr

Return to “Development around libVLC”

Who is online

Users browsing this forum: No registered users and 15 guests