i'm using codegear C++ builder compiler. i'm a new with c++ language.
i tried to compile your code but there is an error. it show like the specific library required for the code to work. may i know the LIBRARY needed for your code?
plz emel me ..i do really nid your concern... for my undergraduate final year project ...
my emel :
really looking fwd for ur reply.. :D
I'm using a logitech quickcam pro9000 webcam, and I cant choose a higher res than 640x480 in the video format dialog. Is there any way of capturing with the full res of 1600x1200 with this class ???
thanks in advance
I modified the programm to continuously capture frames and display them. However, after a while my ram fills up. The strange thing about it is that the programm itself takes only 17 mb in the processes list, but my overall ram usage increases steadily until I exit that programm.
If I look at the ram usage of your example without changes, the ram usage increases by about 400bk everytime I grab a new frame. I don't think I've made any mistakes, but I really can't find anything wrong. Please help!
Re: Third buffer
Posted by Walegwa
on 12/18/2007 03:33am
If you don't see it, I probably imagined it--as I said I didn't get a chance to take a good look at your code. Also I didn't understand whether you're saying that you're having the same problem as before (increasing memory usage) or there is a new problem. I suggest you comment out most of your code and test the smallest action your program performs. If that's not the source of the problem, reinstate one more action. Do this more and more until you identify the offending portion. Sorry not to give you more specific advice but reading other people's code is tricky and time-consuming. All the best.
I didn't have time to take a good look at your code, but I see that you delete two buffers, but you create three. Is that right? By the way codeguru formats comments poorly. It you don't use html to format them yourself they stretch beyond the screen. And then when you want to edit, the edit button is sometimes covered by an ad! Hopefully someone who can do something about the problem will read this.
Since I dod not need the save frame feature anymore, I just merged the stuff from the CBmpUtils file into the main file. I'm having a destructor for that variable, however, it is called pBitmap in my verion. Here you can have a look at it:
I left my calculations out because that would be too much :P They should not be the cause of the problem.
The captured bitmap resides in a CBmpUtils
object, and I did not put any code in the
destructor for that class. So I think therein
lies the problem. See whether the following
change in bmpUtils.cpp does the trick:
delete pbmi; // or should this be delete??
Im working on a project which needs a camera preview in a child window. Im using a CapCreateCaptureWindow function from vfw library. Everything works, but it makes application work really slowly. I wanted to create another thread (_createthread...) in application to operate previewing. In the thread's function there is : capGrabFrame(hwndC)only; anyway it acts the same like without the thread. And when i'm creating capture window in a thread (not like before in WM_CREATE event) the window doesnt even appears. Can you help me with it?
Re: VFW in another Windows thread?
Posted by Walegwa
on 02/09/2007 03:47am
I think you should use DirectShow which to the best of my knowledge handles multithreading automatically. I have a somewhat outdated article on it, but the demo does work and you can start from there and then investigate further. The link is http://www.codeguru.com/cpp/g-m/multimedia/video/article.php/c9551
I'm using Borland C++ Builder and your works runs pretty smootly...
But I'm working with two or more webcams, and I need to choose wich webcam will be captured...
How can I do this? I don't want to use Directx... With Netmeeting we can choose the webcam source from the Video For Windows Dialog configuration...
Thanks in advance...
Posted by alch32
on 06/19/2006 07:46pm
i'm interested to establish netmeeting call and change web cam of control.In netmeeting can be in fly but in SDK i can't do it.I searching dessesperate this function but i dont find nothing of this can help me please?
After I've posted my question, I've tryied to create TWO objects of the CbmpUtils class.
When the second object is started, an "Choose Source" dialog open, then I can select my second webcam.
Now I'm trying to select it automatically, because in my Project I will capture about 10 webcams... And choose all those webcams at every run of the program will be very anoying and time consuming.. :)
I am also doing a similar project as yours. The aim is to create a xtra which can capture the image from a usb camera in director. However, I am new to the Xtra programming. So could you please give me an example of your work? Thanks a lot!
About the Xtra
Posted by Walegwa
on 02/17/2005 08:19pm
If you haven't already, get familiar with the DrAccess example xtra that comes with the XDK, particularly the readMedia function. It reads a bitmap from file and can be changed to get it from a camera using CVFWCapture. I can send you some of my code by replying to you if you send me email.
The program looks excellent.But when i run the application/program only a window with title WebCam Capture appears. The web cam is not detected and nor the image is captured. At this point i don't what to do? I use a Logitech webcam.
What I need to add or modify the program, for it to capture the image from the webcam.
Please help me out in solving this problem.
Waiting for ur reply.
Re: How to get the program started?
Posted by Walegwa
on 10/08/2004 06:17pm
I don't really have enough informaiton to answer your question (nor can I since I'm not there where you are :). But one scenario I've encountered is that when you have two programs that use the camera and you run one and close it, it might not disconnect the video driver and so when you run the other the connection fails. Does your camera work with other programs? If so, try running this program before those others. I don't think you need to modify the program since you're not even connecting to the driver. Once you connect, the capture should work. (Of course, make sure the camera is plugged in :)
Nothing against your approach;but you might be interested in the article at:
which discusses how to mix MOA and MFC (mmmm... XTRAlicious...)
Cheers - chas
MFC and MOA
Posted by Walegwa
on 07/26/2004 12:07am
Yes, I'm aware of the printomatic article. Other Xtra developers who tried it said it didn't work anymore at the time I wrote the article. Also, I wrote the article, not for Xtra developers, but for a lot of other people who were requesting my class after I added a comment to Ken's article saying I had an MFC-free version. I think these people were users of other compilers, e.g., Borland. And now, as you might already know, Macromedia has fixed the problem in their latest XDK (came out this summer) and include instructions in the readme file on how to prepare to use MFC.