<div class="gmail_quote"><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div class="im"><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<br>
<br>
You could implement a video filter (extfilter) (taking another as a<br>
guideline (e.g. blur or motion detect) that has a<br>
  p_sys->pf_frame_callback ( picture_t*) function pointer.<br>
Also you could init this pointer with a config var (e.g.<br>
--extfilter-filter-callback=0x43454343 )<br>
<br>
  <br>
</blockquote></div>
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...)<div class="im"></div></blockquote>
<div><br>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 callback.<br>For this to be accompished your new filter should accept a configuration parameter that should carry that external functions address. <br>
When your ext program should intialize libvlc (libvlc_new) it should provide this parameter.<br>For example :<br><br>void MyFilterCallback( picture_t* p_in, picture_t* p_out )<br>{<br>   // make proccessing on p_in,<br>   // store on the preallocated p_out<br>
}<br><br>void main()<br>{<br>  <br>    char* psz_callback;<br><br>    sprintf( psz_callback, "%x", MyFilterCallback )<br><br>     char* args[10];<br>     args[0] = "--video-filte"; args[1] = "extfilter"<br>
     args[2] = "--extfilter-callback" ; args[3] = psz_callback<br>     args[4] = NULL ;<br><br> <br>     libvlc_new (args ) ;<br>   //........... <br> <br>}<br><br><br>The callback config could be of type string and parsed inside the extfilter init function as a pointer.<br>
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.<br>
<br> </div><div> </div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div class="im"><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
 have a Filter function on the extfilter filter like this ( no<br>
memory management code on this example) :<br>
<br>
Filter( p_pic )<br>
{<br>
   if ( p_sys->pf_frame_callback )<br>
        p_out = p_sys->pf_frame_callback( p_pic )<br>
   else<br>
        p_out = p_pic  ;<br>
 return p_pic<br>
}<br>
<br>
<br>
<br>
Also with the internal vlc_includes you could apply modification or<br>
filters to the picture_t struct.<br>
<br>
  <br>
</blockquote></div>
the filters need to be compiled wih vlc?</blockquote><div class="h5"><br>Maybe there are other ways (look in <a href="http://wiki.videolan.org">wiki.videolan.org</a> and <a href="http://forum.videolan.org">forum.videolan.org</a>)<br>
<br>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.<br>
 <br>
Good luck<br> basos<br></div></div><br>