[vlc-devel] libvlc access to each frame..
basos g
noxelia at gmail.com
Wed Mar 25 14:29:31 CET 2009
2009/3/23 buhochileno at gmail.com <buhochileno at gmail.com>
> buhochileno at gmail.com wrote:
>
>> [...]
>>
>
> Ok, I get the idea, so step 1 for me: write a basic simple working C
>> example using libvlc (currently I have a couple using libvlc from c#, best
>> to start trying directly from C to start, so do you have one arround?, I
>> find one on the vlc wiki but is for libvlc/vlc 0.8 and many things
>> change..). Step 2: add the "callback filter" as in the example that you show
>> me also directly in C to start and ....Step 3: add a delegate from c# as the
>> callback to that filter...
>>
>> [...]
>>
> Ok, some updates: vlc compiled from sources and now looking at the
> motiondetection.c filter module. Also I have a running simple C program that
> use libvlc, unfortunately it use the old libvlc API, so trying to figure
> out the necesary changes....
> Next: I going to try to rip out all the unnecesary code from
> motiondetection.c to make a "callback module"....
>
> Any sugestions?, I'm on the right path?
>
> Thanks...
>
> Mauricio
>
For the libvlc example code, i have posted an example for the new 0.9.x
library (as an example code for the pending wxVLCBackend, thats another
story though). You can find a simple c source here
http://wiki.videolan.org/WxVLCBackend .
I think you got the idea. Base your work on motion detect and try to make
a callback filter. Later on the callback filter implementation remember to
take care when you implement the callback config option, especially on what
type should it be based (string, integer).
Also, as a design approach suggestion, think if you could achieve your work
inside vlc code space, implementing a new videofilter. This would simplify
some things. You could communicate with libvlc with events for example (for
sporadic async tasks), or write a file from vlc to hard disk, or whatever.
Lastly remember that filter code should be damn fast. E.g. on my previous
example for disk access, it would not be smart to write from the video
filter thread. For timy tasks use another thread.
also another WARNING, video filter proccessing is succeptible to
latency,e.g. frames might start dropping if proccessed to late. But for this
issue there might be a buffering option somewhere in vlc that i haven't
found yet.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20090325/e971a87d/attachment.html>
More information about the vlc-devel
mailing list