Could some learned guru explain to me why is passing a file (path) to this DirectShow "method" so convoluted?
Here is the definition in DirectShow, the variable is “LPCWSTR”:
( long pointer char wide string ????)
Here is may attempt to use it, per MS documentation, but it fails:
hr = pGraph->AddSourceFilter( L"I:\\Briefcase OpenLW\\0 tcc_mdi\\V1\\TCC_MDI_1\\OpenCamera\\DirectShow_test.txt",
<b>I have not check the return the value of hr , not yet.</b>
Here is another usage in dvapp ( SDK 8.1)
HRESULT CDVGraph::MakeFileToDvGraph_Type1(TCHAR* InputFileName)
m_iGraphType = GRAPH_FILE_TO_DV;
HRESULT hr = S_OK;
USES_CONVERSION; <b>// did I missed this ??</b>
// Add the file as source filter to the graph
hr = m_pGraph->AddSourceFilter(T2W (InputFileName ), T2W(InputFileName), &m_pInputFileFilter);
CHECK_ERROR( TEXT(" CDVGraph::MakeFileToDvGraph_Type1::m_pGraph->AddSourceFilter failed."), hr);
OK , I got the DirectShow to "play" an image from a camera in right splitter view of my MFC application. Now I need to capture a single frame and process it in differet splitter pane.
So if I can grab a frame , convert it to bitmap and than to OpenCV image I'be all set.
AFter finding ISamplerGrabber I also found this nice note included in MS documentation about ISampleGrabber.
Are these MS guys for real?
I sure hate to use something they do not support in next month.
<b>Note [Deprecated. This API may be removed from future releases of Windows.]</b>
Your posts made me curious. After some hunting around, I discovered that the new multimedia thing is... "Microsoft Media Foundation", which looks like in improved version of DirectShow. It's Windows Vista and later. (If I get crazy enough, I may rework an interactive multimedia product I created in the 90s using VFW to use this.)
thanks for the link.
At this point I am pretty much stuck with DirectShow and would like to finish it.
After breif scan of the article it sure looks as people who like to do something serious;me excluded, I am doing this for "fun"; with video feel pretty much same about convoluted approach by MS.
It reminds me how they struggled with Windows form get-go ( who remembers Window ME?) and IE went pretty much same.
Yes, I know you are working with VC6. I really just posted my comment and the link to that article as a response to Joe Woodbury mentioning the new Microsoft Media Foundation technology. I was not trying to get you to pursue it at this point.
"When you don't know what you're doing it's best to do it quickly" - Jase #DuckDynasty
In C/C++ single bits are acessed by using logical operators (and: &, or: |, xor: ^, not: ~) with masks with only one bit set. Additional bit operators are the shift left and right operators. An example would be counting the number of bits set in a variable:
unsigned CountBits(unsigned nVal)
unsigned nCount = 0;
// test if lowest bit is set
if (nVal & 1)
// shift value right by one bit
nVal >>= 1;
i found a method on the internet.
In the New Project dialog box select "New" and select "Custom Appwizard", enter the new project name, click the [OK] button. "Custom 1 of 2 AppWizardStep" dialog box appeared, and then select "An existing Project" item, click the [Next] button. "Custom 2 of 2 AppWizardStep" dialog box appeared, select an existing project file name, and click the [Finish] button. After the compiler generates an identical to an existing project but can be renamed engineering AppWizard.
however, when i used this method to make it,and after i compiled it, an error is coming:
--------------------Configuration: Luoyang - Win32 Pseudo-Debug--------------------
LINK : error : Internal error during ReadSymbolTable
ExceptionCode = C0000005
ExceptionFlags = 00000000
ExceptionAddress = 004623F2
NumberParameters = 00000002
ExceptionInformation[ 0] = 00000000
ExceptionInformation[ 1] = 00000008
Eax = 3FFFAFEC Esp = 0012E6A0
Ebx = 00000002 Ebp = 005D1B3A
Ecx = 3FFFAFEC Esi = 3FFFB3E0
Edx = 00000000 Edi = 3FFFB3E0
Eip = 004623F2 EFlags = 00010246
SegCs = 0000001B SegDs = 00000023
SegSs = 00000023 SegEs = 00000023
SegFs = 0000003B SegGs = 00000000
Dr0 = 0012E6A0 Dr3 = 00000002
Dr1 = 005D1B3A Dr6 = 3FFFAFEC
Dr2 = 00000000 Dr7 = 00000000
Error executing link.exe.
Tool execution canceled by user.
i don't know weather i make myself clear. because my English is very poor, but i really need your help.
Last Visit: 31-Dec-99 19:00 Last Update: 28-Nov-23 10:35