|
First, do you have any experience programming DirectShow - it's not trivial!
To work with an analogue input device is really no different to using a digital device. If you enumerate the available video capture devices you analogue card should be in the list. If it isn't then you don't have a WDM driver for the card and you can't use it with DirectShow.
Having found your device you'll need to add it to a filter graph and then check whether it's analogue input pin is connected to a video cross bar filter - this allows you to select which video input (on a multiple input card) you'll be taking the signal from (S-Video in your case).
You'll then need to set the cross bar to connect your chosen input pin to the cross bar output pin that's connected to the filter representing your device.
After this a call to GraphBuilder RenderStream for the capture pin on the capture filter will build the rest of the filter graph and you'll be able to render the output.
Of course there are LOTS of other things to consider and lots of other things you could do - such as recording to a file etc. The DirectX SDK has good documentation on DirectShow but be prepared to invest some time and effort - you won't be able to put somehting together quickly.
By the way, to better understand filter graphs you can try playing with GraphEdt.exe which is part of the SDK. In fact this is probably a good place to start with your capture card - try this:
1. Run graphedt
2. Select Graph|Insert filters
3. Open the Video capture sources list
4. Double click your capture card
5. Close the Insert filter dialog
6. Right click the capture pin on the filter and select Render Pin
7. Play the graph - you should see you video in a window.
Note: You may need to play with the video cross bar filter if it's present in the graph.
Good luck, Chris
|
|
|
|
|
Hi Chris, I can't find this graphics card in GraphEdit's Video Capture Sources, but there is a MVR-D2000 Series kernel mode driver(WDM) under sound video and game controllers in Device Manager, how could this be?
|
|
|
|
|
I want to design a small utility that locks the system and asks for a password to free it again( similar to a password protected screensaver) I tried to use a SYSTEM MODAL dialog box, but it is not working ?!I'm using VC++ 6.0.
|
|
|
|
|
Windows 2000 and above have a function called LockWorkStation() that locks the system. A user must then type in the username and password to gain access to the system. This is a system-defined function.
To make your own "similar" utility, write a screen saver! Your screen saver need not "behave" like a screen saver drawing graphics and stuff, but it will do what you want, without having to write too much code..
HTH
Bikram
|
|
|
|
|
How about:
SystemParametersInfo(SPI_SETSCREENSAVEACTIVE, TRUE, NULL, SPIF_SENDCHANGE);
"The pointy end goes in the other man." - Antonio Banderas (Zorro, 1998)
|
|
|
|
|
Hi:
1)I add an icon(256 color) to the tray。It works well in winxp,but in win2k ,the icon doesn't show correctly(it becomes ugly),how to resolve this problem?
2)I handle the onmousewheel message by myself, but how could I know how many lines I should scroll in this message?
Thanks
Benben
|
|
|
|
|
1) Did you also add a 16x16 version of the icon to the icon group?
2) Uhm... wasn't there a parameter in the OnMouseWheel function that tells you how many notches were scrolled? Multiply it with the UINT nLinesPerScroll after you called
SystemParameterInfo(SPI_GETWHEELSCROLLLINES, NULL, (LPVOID(&nLinesPerScroll)), NULL);
Wlx
P.S. If the SystemParameterInfo doesn't work, I probably casted the third parameter the wrong way.
|
|
|
|
|
Hi all..
I have been searching for long time for encoding Arabic txt by UCS-2 I found this code in VB that give me the correct result when I tried to write such function in VC++ I keep having error in the part where the BYTE variable when I add the string value to it ..
this is the VB function :
Public Function ArabicHex(b() As Byte) As String
Dim s As String, h As String
Dim i As Integer
i = 0
s = ""
While i <= UBound(b)
h = Right("00" & Hex(b(i)), 2)
i = i + 1
h = Right("00" & Hex(b(i)), 2) & h
If h = "000D" Then h = ""
s = s & h
i = i + 1
Wend
ArabicHex = s
End Function
this is the VC++ function :
CString s,h1,h2,h,x;
x="A";
int i;
TBYTE *b;
b=x; /// here where I am getting the error
i=0;
s="";
int xlen=x.GetLength();
while (i < xlen*8)
{
h1.Format("%02x",b[i]);
i++;
h2.Format("%02x",b[i]);
if (h.Compare("000D"))
h=" ";
h=h1+h2;
s=s+h;
i++;
}
now .. i need some one to help me correct the error io the VC++ function
|
|
|
|
|
Try this:
b = (TBYTE*)x.GetBuffer(x.GetLength());
or
b = (TBYTE*)LPCTSTR(x);
Bikram
|
|
|
|
|
thanx .. i tried them and they remove the error ... but i stil unable to get the right valuse for arabic char
in VB the code i get for charater "ب" is 0628
while in VC++ function i get for thye same character 00C8
i change the VC++ like that :
-----------------------------------------------------------
CString s,h1,h2,h,x;
x="ب";
int i;
TBYTE *b;
b=(TBYTE*)x.GetBuffer(x.GetLength());
i=0;
s="";
int xlen=x.GetLength();
while (i <= xlen)
{
h1.Format("%02x",b[i]);
i++;
h2.Format("%02x",b[i]);
i++;
h=h2+h1;
s=s+h;
}
MessageBox(s);
----------------------------------------------------------
so any idea for this differen valuse i get ..?????????!!!!!!
|
|
|
|
|
Just a thought is UNICODE defined?
Papa
while (TRUE)
Papa.WillLove ( Bebe ) ;
|
|
|
|
|
|
i have a working c++ program which clusters multidensional numeric data and intend to display the results in a VRML frame within my c++ any ideas?
|
|
|
|
|
While I have had some experience using VRML for data visualization, I find it helpful to use the program just to write the data into a VRML file and then use a separate browser to view it. The reason is that it makes sharing data with others much easier.
Dave
"You can say that again." -- Dept. of Redundancy Dept.
|
|
|
|
|
plz can any one help me how access the variable(cstring or int )which is intialized in the other class(dialog box). i am not able to do with the conventional method i,e creating a object and accessing the variable
Cdialog1 same; (where "Cdialog" is class and "same" is an object)
same.array1; (array1 is an varaible of object "same")
the above method is not working please can any one guide me....
|
|
|
|
|
Q: How is a variable of an object of class type accessed?
A: Make the variable public.
Dialog boxes in MFC programs are represented as classes, for example, CAboutDlg, CTestDlg, etc.
Just move that variable(s) to public section of the class definition.
Maxwell Chen
|
|
|
|
|
declare same as extern in the cpp file where u want to access its member,
then call like same.array1
It's not a bug, it's an undocumented feature. suhredayan@omniquad.com
messenger :suhredayan@hotmail.com
|
|
|
|
|
CDialog is an MFC class, you have to create your own Dialog (eg. LogonDialog) and derive this from CDialog.
You can create your array (preferably in the PRIVATE part) in this class, then you write a PUBLIC function which returns your array.
thus:
int[] LogonDialog::GetArray(){
return array;
}
this should get you on the move. (yes you can declare your array public, but this is no good incapsultation)
|
|
|
|
|
What Exactly is the difference between vc++ and vc++.net? Do you think .net is the wave of the future? What reasons are the to stay out of the whole tangled web of .net??
Anyone??
|
|
|
|
|
Just the product names.
As the TV commercials:
For example, Ford Mondeo, year(s) later, you see Ford Mondeo MetroStar;
Toyota Corolla, and year(s) later, there's Toyota All-New Corolla Altis;
Mitsubishi Lancer, and later the Mitsubishi Lancer Galant, Lancer Virage.
Maxwell Chen
|
|
|
|
|
VC++.NET is actually VC++ 7. It has a more conformance compiler, higher version STL, IDE and etc.
The .NET imply that the VC++.NET is capable of writing .NET gargage collector (gc in short) codes easily in C++ language . Using VC.NET, you can easily access the .NET assemblies functions and feature as though as it is part of language.
For more , check Microsoft VC.NET product site.
Sonork 100.41263:Anthony_Yio
Life is about experiencing ...
|
|
|
|
|
As I understand it, VC++.Net incorporates the idea of a common runtime library, the CLR, that is installed with the .Net Framework. This allows a developer to use whatever .Net-enabled language is most convenient for the task at hand to create a program that will be compatible with other pieces written in other languages. Previous versions of C++ made it difficult to use, for instance, a control developed in VB, because of differences in the internal implementations of variable types and procedures. In the .Net scenario, all languages utilize the same libraries, and modules written in any language are interoperable. In theory, you can bang out a GUI on VB, a language nicely suited for that task, and implement the computation-intensive parts of the program in VC++, without having to worry about type conversions and such to accomodate the different ways these are implemented in each language.
There are probably several other reasons to adopt the .Net approach, but my understanding is limited by my lack of experience with it. I'll leave it to others to elaborate...
Some people think of it as a six-pack; I consider it more of a support group.
|
|
|
|
|
I have set up the executable directory and it runs the new compiler.
But I get about 30 errors in my program that never showed up with the old compiler.
They appear to all arise from <code><afxtempl.h></code> (MFC 6).
I think it is to do with the new ISO conformance. I looked at the msdn library, and there are a few breaking changes todo with templates, but since im not very good with the technical error jargon, I don't have a clue what to do.
Could some look into it and tell me what i need to edit to get it to work?
I was really hoping I could save me a few $'s and just upgrade the compiler not the IDE, since all the new IDE features are mainly for .NET (which I don't care much about)
|
|
|
|
|
Edit: I have tried CalcDynamicLayout(80, LM_HORZ|LM_LENGTHY); inside CMainFrame::OnCreate after the bar has been created and no luck
How can I set the width or height of a CControlBar programmatically after it is created? The control bar when first created is large (very wide) and i'm not using SaveBarState or anything so each time program loads the control bar is huge???
I plan on eventually using LoadBarState, but how do I resize a control bar when application first run???
Thanks
Cheers
How do I print my voice mail?
|
|
|
|
|
CControlBar is a derived class from CWnd. You can apply any function related to CWnd on it.
|
|
|
|