|
"You need to install DirectX, which is available freely from Microsoft. You can download DirectX 9.0 from Microsoft.
For development, install DirectX 9.0 SDK. You can download DirectX 9.0 SDK from Microsoft. "
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
Also be aware that DirectShow has been removed from the latest update to DirectX (April 2005) and is now part of the Platform SDK.
You can get it by downloading the Microsoft® Windows Server 2003 SP1 Platform SDK - April 2005 Edition if you are not using an earlier version of DirectX. If you use the web installation package you can just download the DirectShow elements of the SDK.
Cheers,
Jason.
Melbourne. Australia.
modified 10-Jul-19 21:02pm.
|
|
|
|
|
thanks guys I never would have known... all these things.
|
|
|
|
|
|
Hi, it is possible to capture video from different sources at the same time using only one capture card?
Excellent
|
|
|
|
|
Does anyone know how I could modify the CCaptureVideo class to call a callback function when each frame of video is grabbed, and if so how would it be done? This would be useful for me as I’m writing an application to grab and buffer images for storage rather than display live images. I could use the callback function to trigger image storage code when each new frame of video arrives.
Nice code btw. CPU sits idle grabbing live video.
Cheers,
Matt.
|
|
|
|
|
Hi palm,
I got your source codes for live video and when I tryed to compile it .. I got the following messages:
--------------------Configuration: LiveVideo - Win32 Debug--------------------
Compiling...
CaptureVideo.cpp
c:\arquivos de programas\microsoft directx 9.0 sdk (december 2004)\include\strmif.h(1024) : error C2146: syntax error : missing ';' before identifier 'HSEMAPHORE'
c:\arquivos de programas\microsoft directx 9.0 sdk (december 2004)\include\strmif.h(1024) : fatal error C1004: unexpected end of file found
LiveVideo.cpp
c:\arquivos de programas\microsoft directx 9.0 sdk (december 2004)\include\strmif.h(1024) : error C2146: syntax error : missing ';' before identifier 'HSEMAPHORE'
c:\arquivos de programas\microsoft directx 9.0 sdk (december 2004)\include\strmif.h(1024) : fatal error C1004: unexpected end of file found
LiveVideoDlg.cpp
c:\arquivos de programas\microsoft directx 9.0 sdk (december 2004)\include\strmif.h(1024) : error C2146: syntax error : missing ';' before identifier 'HSEMAPHORE'
c:\arquivos de programas\microsoft directx 9.0 sdk (december 2004)\include\strmif.h(1024) : fatal error C1004: unexpected end of file found
Generating Code...
Error executing cl.exe.
LiveVideo.exe - 6 error(s), 0 warning(s)
I wonder if you could help me out with that couse i don't understando what's going on.
thank you... by the way great work on the code ...
Marcus Augustus
|
|
|
|
|
I have same errors....
|
|
|
|
|
I have same problems.Did you solve this problem, plesa give information about this problem.
shayirli@yahoo.com
Sezgin
Shayirli
|
|
|
|
|
Please somebody that has the error i have the same error and i dont know how can i do it?
please give us the solution ???
my email is santano@hotmail.com
i dont care of the trobble
|
|
|
|
|
It will be terrible, I replace functions
e.g.
// ICaptureGraphBuilder2* m_pCapture ;
ICaptureGraphBuilder* m_pCapture ;
and
// hr = CoCreateInstance (CLSID_CaptureGraphBuilder2 , NULL, CLSCTX_INPROC,
// IID_ICaptureGraphBuilder2, (void **) &m_pCapture);
hr = CoCreateInstance (CLSID_CaptureGraphBuilder , NULL, CLSCTX_INPROC,
IID_ICaptureGraphBuilder, (void **) &m_pCapture);
// hr = CoCreateInstance (CLSID_CaptureGraphBuilder2 , NULL, CLSCTX_INPROC,
// IID_ICaptureGraphBuilder2, (void **) &m_pCaptureMoniker);
hr = CoCreateInstance (CLSID_CaptureGraphBuilder , NULL, CLSCTX_INPROC,
IID_ICaptureGraphBuilder, (void **) &m_pCaptureMoniker);
// hr = m_pCaptureMoniker->RenderStream (&PIN_CATEGORY_PREVIEW, &MEDIATYPE_Video,
// pBaseFilter, NULL, NULL);
hr = m_pCaptureMoniker->RenderStream (&PIN_CATEGORY_PREVIEW,
pBaseFilter, NULL, NULL);
// hr = m_pCapture->FindInterface(&PIN_CATEGORY_CAPTURE,
// &MEDIATYPE_Interleaved, pSrcF,
// IID_IAMCrossbar, (void **)&pX);
hr = m_pCapture->FindInterface(&PIN_CATEGORY_CAPTURE,
pSrcF,
IID_IAMCrossbar, (void **)&pX);
// if(hr != NOERROR)
// hr = m_pCapture->FindInterface(&PIN_CATEGORY_CAPTURE,
// &MEDIATYPE_Video, pSrcF,
// IID_IAMCrossbar, (void **)&pX);
if(hr != NOERROR)
hr = m_pCapture->FindInterface(&PIN_CATEGORY_CAPTURE,
pSrcF,
IID_IAMCrossbar, (void **)&pX);
/*
hr = m_pCapture->FindInterface(&PIN_CATEGORY_CAPTURE,
&MEDIATYPE_Interleaved, pSrcF,
IID_IAMCrossbar, (void **)&pX);
if(hr != NOERROR)
hr = m_pCapture->FindInterface(&PIN_CATEGORY_CAPTURE,
&MEDIATYPE_Video, pSrcF,
IID_IAMCrossbar, (void **)&pX);
*/
hr = m_pCapture->FindInterface(&PIN_CATEGORY_CAPTURE,
pSrcF,
IID_IAMCrossbar, (void **)&pX);
if(hr != NOERROR)
hr = m_pCapture->FindInterface(&PIN_CATEGORY_CAPTURE,
pSrcF,
IID_IAMCrossbar, (void **)&pX);
Delete
// wsprintfW(wsz, L"FilterGraph %08x pid %08x\0", (DWORD_PTR)pUnkGraph,
// GetCurrentProcessId());
// _vsntprintf(szBuffer, NUMCHARS - 1, szFormat, pArgs);
// va_end(pArgs);
Dillian
|
|
|
|
|
I have the same errors as well.
Does anyone now why?
|
|
|
|
|
ME too!!! some one plz send what to do?????????
|
|
|
|
|
You must have an older version of SDK
Only those that were published before Summer 2004 work with VisualC++6.
Download the right one on the Microsoft Site , by looking for " Directx SDK"
|
|
|
|
|
Nice peace of code.
Would it be possible to easily stream the video content to file? Like an AVI or MPEG file for example?
Sorry not up on DirectX things!
Cheers
--
The Obliterator
|
|
|
|
|
Generally, yes, but not in this example. You might have to look out for custom DirectShow filters, if you want streaming into MPEG format, but that's up one's toes with DirectShow
C++ libraries at a give-away price on www.neatcpp.com: TWAIN, DirectShow, Interprocess Communications, etc...
|
|
|
|
|
The work is excellent. But how to get the video send to other network.
Waiting for your reply soon. I want to create the live video conference.
|
|
|
|
|
Hi , I just downloaded the code but there is no demo (exe file ) there .Actually I am new to directx and when i downloaded the source code , and tried to build it , i got the following errors :
Deleting intermediate files and output files for project 'LiveVideo - Win32 Debug'.
--------------------Configuration: LiveVideo - Win32 Debug--------------------
Compiling resources...
Compiling...
StdAfx.cpp
Compiling...
CaptureVideo.cpp
c:\bala\livevideo_demo\capturevideo.h(114) : error C2143: syntax error : missing ';' before '*'
c:\bala\livevideo_demo\capturevideo.h(114) : error C2501: 'ICaptureGraphBuilder2' : missing storage-class or type specifiers
c:\bala\livevideo_demo\capturevideo.h(114) : error C2501: 'm_pCapture' : missing storage-class or type specifiers
c:\bala\livevideo_demo\capturevideo.h(122) : error C2143: syntax error : missing ';' before '*'
c:\bala\livevideo_demo\capturevideo.h(122) : error C2501: 'ICaptureGraphBuilder2' : missing storage-class or type specifiers
c:\bala\livevideo_demo\capturevideo.h(122) : error C2501: 'm_pCaptureMoniker' : missing storage-class or type specifiers
C:\Bala\LiveVideo_demo\CaptureVideo.cpp(33) : error C2065: 'm_pCapture' : undeclared identifier
C:\Bala\LiveVideo_demo\CaptureVideo.cpp(40) : error C2065: 'm_pCaptureMoniker' : undeclared identifier
C:\Bala\LiveVideo_demo\CaptureVideo.cpp(104) : error C2065: 'CLSID_CaptureGraphBuilder2' : undeclared identifier
C:\Bala\LiveVideo_demo\CaptureVideo.cpp(105) : error C2065: 'IID_ICaptureGraphBuilder2' : undeclared identifier
C:\Bala\LiveVideo_demo\CaptureVideo.cpp(315) : error C2065: 'LONG_PTR' : undeclared identifier
C:\Bala\LiveVideo_demo\CaptureVideo.cpp(315) : error C2059: syntax error : ')'
C:\Bala\LiveVideo_demo\CaptureVideo.cpp(316) : error C2143: syntax error : missing ';' before '{'
C:\Bala\LiveVideo_demo\CaptureVideo.cpp(342) : error C2227: left of '->SetFiltergraph' must point to class/struct/union
C:\Bala\LiveVideo_demo\CaptureVideo.cpp(381) : error C2227: left of '->RenderStream' must point to class/struct/union
C:\Bala\LiveVideo_demo\CaptureVideo.cpp(442) : error C2065: 'wsprintfW_instead_use_StringCbPrintfW_or_StringCchPrintfW' : undeclared identifier
C:\Bala\LiveVideo_demo\CaptureVideo.cpp(442) : error C2065: 'DWORD_PTR' : undeclared identifier
C:\Bala\LiveVideo_demo\CaptureVideo.cpp(442) : error C2146: syntax error : missing ')' before identifier 'pUnkGraph'
C:\Bala\LiveVideo_demo\CaptureVideo.cpp(443) : error C2059: syntax error : ')'
C:\Bala\LiveVideo_demo\CaptureVideo.cpp(509) : error C2227: left of '->Release' must point to class/struct/union
C:\Bala\LiveVideo_demo\CaptureVideo.cpp(538) : error C2227: left of '->Release' must point to class/struct/union
C:\Bala\LiveVideo_demo\CaptureVideo.cpp(713) : error C2227: left of '->SetFiltergraph' must point to class/struct/union
C:\Bala\LiveVideo_demo\CaptureVideo.cpp(721) : error C2227: left of '->RenderStream' must point to class/struct/union
C:\Bala\LiveVideo_demo\CaptureVideo.cpp(862) : error C2059: syntax error : ')'
C:\Bala\LiveVideo_demo\CaptureVideo.cpp(863) : error C2143: syntax error : missing ';' before '{'
C:\Bala\LiveVideo_demo\CaptureVideo.cpp(868) : error C2065: 'EC_DEVICE_LOST' : undeclared identifier
C:\Bala\LiveVideo_demo\CaptureVideo.cpp(868) : error C2051: case expression not constant
C:\Bala\LiveVideo_demo\CaptureVideo.cpp(920) : error C2146: syntax error : missing ')' before identifier 'pUnkGraph'
C:\Bala\LiveVideo_demo\CaptureVideo.cpp(921) : error C2059: syntax error : ')'
C:\Bala\LiveVideo_demo\CaptureVideo.cpp(964) : error C2065: '_vsntprintf_instead_use_StringCbVPrintf_or_StringCchVPrintf' : undeclared identifier
C:\Bala\LiveVideo_demo\CaptureVideo.cpp(1001) : error C2227: left of '->FindInterface' must point to class/struct/union
C:\Bala\LiveVideo_demo\CaptureVideo.cpp(1005) : error C2227: left of '->FindInterface' must point to class/struct/union
C:\Bala\LiveVideo_demo\CaptureVideo.cpp(1067) : error C2227: left of '->FindInterface' must point to class/struct/union
C:\Bala\LiveVideo_demo\CaptureVideo.cpp(1071) : error C2227: left of '->FindInterface' must point to class/struct/union
C:\Bala\LiveVideo_demo\CaptureVideo.cpp(1145) : error C2227: left of '->FindInterface' must point to class/struct/union
C:\Bala\LiveVideo_demo\CaptureVideo.cpp(1149) : error C2227: left of '->FindInterface' must point to class/struct/union
LiveVideo.cpp
c:\bala\livevideo_demo\capturevideo.h(114) : error C2143: syntax error : missing ';' before '*'
c:\bala\livevideo_demo\capturevideo.h(114) : error C2501: 'ICaptureGraphBuilder2' : missing storage-class or type specifiers
c:\bala\livevideo_demo\capturevideo.h(114) : error C2501: 'm_pCapture' : missing storage-class or type specifiers
c:\bala\livevideo_demo\capturevideo.h(122) : error C2143: syntax error : missing ';' before '*'
c:\bala\livevideo_demo\capturevideo.h(122) : error C2501: 'ICaptureGraphBuilder2' : missing storage-class or type specifiers
c:\bala\livevideo_demo\capturevideo.h(122) : error C2501: 'm_pCaptureMoniker' : missing storage-class or type specifiers
LiveVideoDlg.cpp
c:\bala\livevideo_demo\capturevideo.h(114) : error C2143: syntax error : missing ';' before '*'
c:\bala\livevideo_demo\capturevideo.h(114) : error C2501: 'ICaptureGraphBuilder2' : missing storage-class or type specifiers
c:\bala\livevideo_demo\capturevideo.h(114) : error C2501: 'm_pCapture' : missing storage-class or type specifiers
c:\bala\livevideo_demo\capturevideo.h(122) : error C2143: syntax error : missing ';' before '*'
c:\bala\livevideo_demo\capturevideo.h(122) : error C2501: 'ICaptureGraphBuilder2' : missing storage-class or type specifiers
c:\bala\livevideo_demo\capturevideo.h(122) : error C2501: 'm_pCaptureMoniker' : missing storage-class or type specifiers
Generating Code...
Error executing cl.exe.
LiveVideo.exe - 48 error(s), 0 warning(s)
I ahve installed DirectX9 SDK as well as I have Visual Studio 6.0 but as soon as I build it , these errors come up .
Could you guide me as to how to rectify these errors ?
Regards ,
Joshilay
|
|
|
|
|
set the include directories
tools->options->directories/ C:\DXSDK\INCLUDE
tools->options->libraries/ C:\DXSDK\LIB
project->settings->link tab and in the object/library modules write strmiids.lib quartz.lib
Your errors will be solved.
|
|
|
|
|
I downloaded ur project because I am trying to capture video from usb attached web cam but I am getting the same 46 error messages
d:\download\livevideo\capturevideo.h(114) : error C2143: syntax error : missing ';' before '*'
d:\download\livevideo\capturevideo.h(114) : error C2501: 'ICaptureGraphBuilder2' : missing storage-class or type specifiers
d:\download\livevideo\capturevideo.h(114) : error C2501: 'm_pCapture' : missing storage-class or type specifiers
d:\download\livevideo\capturevideo.h(122) : error C2143: syntax error : missing ';' before '*'
d:\download\livevideo\capturevideo.h(122) : error C2501: 'ICaptureGraphBuilder2' : missing storage-class or type specifiers
d:\download\livevideo\capturevideo.h(122) : error C2501: 'm_pCaptureMoniker' : missing storage-class or type specifiers
D:\DownLoad\LiveVideo\CaptureVideo.cpp(33) : error C2065: 'm_pCapture' : undeclared identifier
D:\DownLoad\LiveVideo\CaptureVideo.cpp(40) : error C2065: 'm_pCaptureMoniker' : undeclared identifier
D:\DownLoad\LiveVideo\CaptureVideo.cpp(104) : error C2065: 'CLSID_CaptureGraphBuilder2' : undeclared identifier
D:\DownLoad\LiveVideo\CaptureVideo.cpp(105) : error C2065: 'IID_ICaptureGraphBuilder2' : undeclared identifier
D:\DownLoad\LiveVideo\CaptureVideo.cpp(315) : error C2065: 'LONG_PTR' : undeclared identifier
D:\DownLoad\LiveVideo\CaptureVideo.cpp(315) : error C2059: syntax error : ')'
D:\DownLoad\LiveVideo\CaptureVideo.cpp(316) : error C2143: syntax error : missing ';' before '{'
D:\DownLoad\LiveVideo\CaptureVideo.cpp(342) : error C2227: left of '->SetFiltergraph' must point to class/struct/union
D:\DownLoad\LiveVideo\CaptureVideo.cpp(381) : error C2227: left of '->RenderStream' must point to class/struct/union
D:\DownLoad\LiveVideo\CaptureVideo.cpp(442) : error C2065: 'DWORD_PTR' : undeclared identifier
D:\DownLoad\LiveVideo\CaptureVideo.cpp(442) : error C2146: syntax error : missing ')' before identifier 'pUnkGraph'
D:\DownLoad\LiveVideo\CaptureVideo.cpp(443) : error C2059: syntax error : ')'
D:\DownLoad\LiveVideo\CaptureVideo.cpp(509) : error C2227: left of '->Release' must point to class/struct/union
D:\DownLoad\LiveVideo\CaptureVideo.cpp(538) : error C2227: left of '->Release' must point to class/struct/union
D:\DownLoad\LiveVideo\CaptureVideo.cpp(713) : error C2227: left of '->SetFiltergraph' must point to class/struct/union
D:\DownLoad\LiveVideo\CaptureVideo.cpp(721) : error C2227: left of '->RenderStream' must point to class/struct/union
D:\DownLoad\LiveVideo\CaptureVideo.cpp(862) : error C2059: syntax error : ')'
D:\DownLoad\LiveVideo\CaptureVideo.cpp(863) : error C2143: syntax error : missing ';' before '{'
D:\DownLoad\LiveVideo\CaptureVideo.cpp(868) : error C2065: 'EC_DEVICE_LOST' : undeclared identifier
D:\DownLoad\LiveVideo\CaptureVideo.cpp(868) : error C2051: case expression not constant
D:\DownLoad\LiveVideo\CaptureVideo.cpp(920) : error C2146: syntax error : missing ')' before identifier 'pUnkGraph'
D:\DownLoad\LiveVideo\CaptureVideo.cpp(921) : error C2059: syntax error : ')'
D:\DownLoad\LiveVideo\CaptureVideo.cpp(1001) : error C2227: left of '->FindInterface' must point to class/struct/union
D:\DownLoad\LiveVideo\CaptureVideo.cpp(1005) : error C2227: left of '->FindInterface' must point to class/struct/union
D:\DownLoad\LiveVideo\CaptureVideo.cpp(1067) : error C2227: left of '->FindInterface' must point to class/struct/union
D:\DownLoad\LiveVideo\CaptureVideo.cpp(1071) : error C2227: left of '->FindInterface' must point to class/struct/union
D:\DownLoad\LiveVideo\CaptureVideo.cpp(1145) : error C2227: left of '->FindInterface' must point to class/struct/union
D:\DownLoad\LiveVideo\CaptureVideo.cpp(1149) : error C2227: left of '->FindInterface' must point to class/struct/union
LiveVideo.cpp
d:\download\livevideo\capturevideo.h(114) : error C2143: syntax error : missing ';' before '*'
d:\download\livevideo\capturevideo.h(114) : error C2501: 'ICaptureGraphBuilder2' : missing storage-class or type specifiers
d:\download\livevideo\capturevideo.h(114) : error C2501: 'm_pCapture' : missing storage-class or type specifiers
d:\download\livevideo\capturevideo.h(122) : error C2143: syntax error : missing ';' before '*'
d:\download\livevideo\capturevideo.h(122) : error C2501: 'ICaptureGraphBuilder2' : missing storage-class or type specifiers
d:\download\livevideo\capturevideo.h(122) : error C2501: 'm_pCaptureMoniker' : missing storage-class or type specifiers
LiveVideoDlg.cpp
d:\download\livevideo\capturevideo.h(114) : error C2143: syntax error : missing ';' before '*'
d:\download\livevideo\capturevideo.h(114) : error C2501: 'ICaptureGraphBuilder2' : missing storage-class or type specifiers
d:\download\livevideo\capturevideo.h(114) : error C2501: 'm_pCapture' : missing storage-class or type specifiers
d:\download\livevideo\capturevideo.h(122) : error C2143: syntax error : missing ';' before '*'
d:\download\livevideo\capturevideo.h(122) : error C2501: 'ICaptureGraphBuilder2' : missing storage-class or type specifiers
d:\download\livevideo\capturevideo.h(122) : error C2501: 'm_pCaptureMoniker' : missing storage-class or type specifiers
I am new to directx.
I have installed directx SDk but still I am getting this errors.
Please help me
S.Yamini
|
|
|
|
|
Looks to me like a mess with DirectX SDK installation, nothing else
So, if you haven't got one yet, then you should, before trying to use DirectShow.
C++ libraries at a give-away price on www.neatcpp.com: TWAIN, DirectShow, Interprocess Communications, etc...
|
|
|
|
|
You never send live video over network when organizing a conference, unless you got an all-time gigabit ethernet able to handle that Instead, you grab and send out compressed single frames at a speed and with resolution dependant on the channel bandwidth, imho.
C++ libraries at a give-away price on www.neatcpp.com: TWAIN, DirectShow, Interprocess Communications, etc...
|
|
|
|
|
I would like to access this form of raw data and transmit it to another computer, which will then decode the data and display in the user interface. How do I do a sequential frame capture. Are these files, or the stream of data held in some sort of buffer?
Andrew
|
|
|
|
|
anybody know how to save a picture from the video stream anybody allready use the IBasicVideo2 Object or IBasicVideo Object to capture a picture???
best regards
;P;) Martin B ;)
|
|
|
|
|
|