[vlc-devel] libvlc access to each frame..
noxelia at gmail.com
Fri Mar 20 14:39:26 CET 2009
>> You could implement a video filter (extfilter) (taking another as a
>> guideline (e.g. blur or motion detect) that has a
>> p_sys->pf_frame_callback ( picture_t*) function pointer.
>> Also you could init this pointer with a config var (e.g.
>> --extfilter-filter-callback=0x43454343 )
> no idea where to start to look on the vlc code...Do you know if it is
> posible to access to that function pointer from libvlc? (in that way I can
> make a wraper for that function pointer...)
Take another video filter as a guideline and impement a new one that does
not filter the picture but instead calls an external to libvlc function
For this to be accompished your new filter should accept a configuration
parameter that should carry that external functions address.
When your ext program should intialize libvlc (libvlc_new) it should provide
For example :
void MyFilterCallback( picture_t* p_in, picture_t* p_out )
// make proccessing on p_in,
// store on the preallocated p_out
sprintf( psz_callback, "%x", MyFilterCallback )
args = "--video-filte"; args = "extfilter"
args = "--extfilter-callback" ; args = psz_callback
args = NULL ;
libvlc_new (args ) ;
The callback config could be of type string and parsed inside the extfilter
init function as a pointer.
It could be of type int but i don't know if is a long long (64 bit) or just
long (32 bit). On the latter case it could not store a hole function pointer
on the new 64 bit platforms. This detail needs special care anyway.
> have a Filter function on the extfilter filter like this ( no
>> memory management code on this example) :
>> Filter( p_pic )
>> if ( p_sys->pf_frame_callback )
>> p_out = p_sys->pf_frame_callback( p_pic )
>> p_out = p_pic ;
>> return p_pic
>> Also with the internal vlc_includes you could apply modification or
>> filters to the picture_t struct.
> the filters need to be compiled wih vlc?
Maybe there are other ways (look in wiki.videolan.org and forum.videolan.org
But i suggest to waste some time making your own vlc build and that hack on
top of it. There are nice build tutorial on the wiki (look for compile vlc).
But you may have to make a bigger effort when compiling on windows.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the vlc-devel