[vtkusers] vtkVideoSource

David Gobbi dgobbi at imaging.robarts.ca
Wed Dec 8 11:24:17 EST 2004


Hi Simon,

I can't comment on observing the "Modified" event because I've never
tried doing that with vtkVideoSource.  In fact, the vtkMILVideoSource
(the one that I used the most) does Modified() calls from a separate
thread, and triggering an Update from any thread other than the main
thread would probably cause things to break horribly.

However, with regards to separating the video source from the frame
buffer, I wrote a couple classes to do precisely that but I didn't
finish integrating them before I my PhD was completed.  If you're
interested in finishing the job, I can send these classes along to you.

Cheers,
 - David

On Wed, 8 Dec 2004, Simon Drouin wrote:

> Hi,
>
> I'm using vtkVideoSource in a program.  I 'm watching the "Modified"
> event. When it is trigered, I call Update. The windows that display
> video are all watching the "Modified" event of the vtkVideoSource output
> (vtkImageData) so that when Update is called, they should be notified
> and get the chance to render.
>
> My problem is that the Update function of vtkVideoSource eventually
> sends a Modified event too and since my function that watches the
> "Modified" event calls Update, I end up with and infinite loop.
>
> I would like to add an event that is more specific that "Modified" and
> that is triggered when something in the framebuffer has changed. This
> event should be called when a new frame is grabbed, when the framebuffer
> index is changed and when the framebuffer is updated.
>
> So here's my questions:
>
> How should I add this event? Should I use an already existing event type
> (which one?) or create a new one?
>
> How do I submit my code?
>
>
> btw, I just finished coding vtkV4L2VideoSource (Video for Linux 2 video
> source). I will eventually like to submit that too.
>
> Also, am I the only vtkVideoSource user that feels the video source and
> the frame buffer its using should be in 2 different classes.
>
> Thanks in advance for your help.
>
> Simon Drouin
> _______________________________________________
> This is the private VTK discussion list.
> Please keep messages on-topic. Check the FAQ at: http://www.vtk.org/Wiki/VTK_FAQ
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtkusers
>




More information about the vtkusers mailing list