Am Thu, 03 May 2007 04:00:48 -0400 schrieb MacArthur, Ian \(SELEX\) \(UK\):
>> [..] I've found a library which must be called from >> within an separate thread. This library waits for a new video >> frame (inside the thread) and returns after a frame is >> fetched. Now I have a RGB frame, but > > Hmmm, when I did this I looked at a lot of libs, but they turned out to > be harder to use with fltk than just using DirectShow itself... I'm absolute now DirectX-Expert, nor do I "love" the windows API. I've found a renderer which creates it's own window. But thats not what I need. > Which lib have you picked? I'm not realy shure, but one of these: * portVideo[1] which uses DSVideoLib[2] for the direct show stuff * libGraph[3] which is windows only. [1] http://sourceforge.net/projects/portvideo [2] http://sourceforge.net/projects/dsvideolib [3] http://tmhare.mvps.org/ > Anyway, what I ended up with was just deriving from Fl_Window and using > fl_xid(this); to get its HWND to pass to my DirectShow code. Which DirectShow component (name/classid?) can handle a HWND? This solution would be good enough for me too. ;-) Last year I've written an application using a firewire camera with an SDK for VisualC++ and MFC. They have used a "listener" class to hide the thread. This class has had a frameReady method, which was called to draw the frame. I've done this with a memDC and the BitBlt functions (*StretchBltMode, StretchDIBits and BitBlt). It was more a hack than "well designed". > Sure - it is just a wrapper for win32 threads. Should I use the typical lock, or is that not necesarry? Do I need locking if I go the BitBlt way? >> For now I've always written fixed sized applications with >> fltk. How do I resize a main window (note, there are some >> buttons below `video frame widget') where the `video frame >> widget' depends on the selected video size. I need to resize >> it from within the application. The user should not be able >> to resize it. > > The position() and resize() methods allow the program to move / resize > the program windows, although you might have to do some work to keep all > the widgets in sync if the embedded video window changes its size > "spontaneously"! Should I pack the group with the buttons (fixed) and the box with the video (resizeable) into a resizable goup, and this group into an fixed windows? The idea is, that I hope to / have to change the size of the window (by software not by user) to get the video box resized. Is this possible? _______________________________________________ fltk-dev mailing list [email protected] http://lists.easysw.com/mailman/listinfo/fltk-dev
