C++/VB - QueryInterface crashes Skype after 8 time call
Asked By testdevelopertes
30-Oct-09 07:36 PM
Hi
I am using this code:
http://tmhare.mvps.org/downloads/vcam.zip
If you check the code, you will see:
HRESULT CVCamStream::QueryInterface(REFIID riid, void **ppv)
{
// Standard OLE stuff
if(riid == _uuidof(IAMStreamConfig))
*ppv = (IAMStreamConfig*)this;
else if(riid == _uuidof(IKsPropertySet))
*ppv = (IKsPropertySet*)this;
else
return CSourceStream::QueryInterface(riid, ppv);
AddRef();
return S_OK;
}
After a lot of trace, I see it works well when I call it from AmCap,
Yahoo Messenger, MSN, etc.
Just when I load it in Skype, After 3 times calling QueryInterface and
those calls go to this part:
return CSourceStream::QueryInterface(riid, ppv);
After 3-4 times calling that part of code, I get exception and entire
Skype.exe crashes...
Any ideas?
IAMStreamConfig
(1)
IKsPropertySet
(1)
CVCamStream
(1)
CvCreateCameraCapture
(1)
CSourceStream
(1)
CvReleaseCapture
(1)
QueryInterface
(1)
AddRef
(1)
vcam + opencv ,I cannot realease the cam replied to testdevelopertes
Hi to everyone,
I have another question.
I am using this code ,too:
http://tmhare.mvps.org/downloads/vcam.zip
My purpose is to capture a frame from a usb cam and process the data and
broadcast the video stream over skype.
For image processing, I use opencv libraries. For capturing,
I use this command "capture = cvCreateCameraCapture(0);"
I use this comand for realeasing "cvReleaseCapture( &capture );"
but I cannot realase the cam it after I call this function. When I run the
cam once on the skype once, it works fine , but as a second time, it shows
nothing on the screen because the cam is still in used.
If anyone did this kind of application, and If the one helps me, I would be
happy a lot.
I also checked the directshow examples how to capture a frame from a cam. I
have some application in my PC. But I am not able to combine them with vcam.
Thank you ,
Enes Dayangac
enesdayangac@gmail.com

Questions about IAMStreamConfig C++ / VB Hey gang, Here is a snippet of what I am doing to retrieve video capture pin info: IAMStreamConfig* pStreamConfig = NULL; hr = pin-> QueryInterface(IID_IAMStreamConfig, (void * *) &pStreamConfig); if(SUCCEEDED(hr)) { int iCount = 0; int as represented in GraphEdit.exe). Anybody have any ideas? Thanks / Loren Win32 DirectX Video Discussions IAMStreamConfig (1) GetNumberOfCapabilities (1) IEnumMediaTypes (1) EnumMediaTypes (1) IStreamConfig (1) GetStreamCaps (1) QueryInterface (1) PStreamConfig (1 did attempt to implement the IEnumMediaTypes on the IPin interface with the same results as IAMStreamConfig (1 AMT) for this particular device. I am not sure what you meant by the mvpnews at riseoftheants dot com / / http: / / www.riseoftheants.com / mmx / faq.htm keywords: Questions, about, IAMStreamConfig description: Hey gang, Here is a snippet of what I am doing to retrieve video capture pin info: IAMStreamConfig* pStreamConfig = NULL; hr = pin-QueryInterface(IID_IAM
is highly appreciated. Regards, Albert Win32 DirectX Video Discussions VIDEOINFOHEADER2and (1) IVMRDeinterlaceControl9 (1) ISampleGrabberCB (1) IAMStreamConfig (1) BmiHeader.biSizeImage (1) GetCurrentImage (1) BindToObject (1) IBaseFilter (1) From: "Albert Pinto" What video configure it to output progressive frames, the only DirectShow standard way would be if the IAMStreamConfig interface on the capture source's output pin offered VIDEOINFOHEADER alongside VIDEOINFOHEADER2 (VIH frames are to do it. The only standard way, if supported by your capture driver, is through IAMStreamConfig, as I explained 2 messages ago. If it is supported, yes. - - / / Alessandro Angeli / / MVP :: DirectShow
output (a parser / splitter). So your choices are: - a push source (possibly based on CSource+CSourceStream) that fetches the bytes internally - a parser / splitter, that feches the bytes from an upstream services all tracks and pushes samples to pins previously associated with the tracks. So CSource / CSourceStream might be a bit too far down the inheritance hierarchy for me. I will need source filter. It is easier to start off with CBaseFilter / CBaseOutputPin than to adapt CSource / CSourceStream to your own threading model. What you probably want is a CBaseOutputQueue per output pin
PVideoCaptureFilter.CoCreateInstance (1) PImageSinkFilter.CoCreateInstance (1) PVideoCaptureFilter.QueryInterface (1) PImageSinkFilter.QueryInterface (1) PFilterGraph.CoCreateInstance (1) IAMStreamConfig (1) IMGSinkFilter (1) From: "Jack Harris" [. . .] I cannot see anywhere in your code where you www.riseoftheants.com / mmx / faq.htm Sorry, forgot to include the code for SetCameraResolution CComPtr<IAMStreamConfig> pConfig; / / hResult = m_pCaptureGraphBuilder-> FindInterface(&PIN_CATEGORY_CAPTURE, &MEDIATYPE_Video, m_pVideoCaptureFilter, IID_IAMStreamConfig, (void* *)&pConfig); hResult = m_pCaptureGraphBuilder-> FindInterface(&PIN_CATEGORY_STILL, &MEDIATYPE_Video
am kinda confused and overwhelmed :-) Thank you very much! Win32 DirectX Video Discussions URLReader (1) CSourceStream (1) PIDs (1) BaseClasses (1) DirectShow (1) GraphEdit (1) CSource (1) Buffersize (1) From: "theLittleFunnyBoy output pins and mapping the appropriate PIDs in graphedit. Yes, I am using the BaseClasses (CSourceStream, CSource). Why does the Demux care about where and how I get the data? As