Link to home
Start Free TrialLog in
Avatar of kishan66
kishan66Flag for United States of America

asked on

Are MFC- Direct show applications Portable.

Hi,
i am trying to build MFC application ,which does live video capturing and presenting using Direct Show.
can you tell me whether the code(application) is portable?
i mean will that run in Macintosh too?
Avatar of jkr
jkr
Flag of Germany image

No, that code is not portable - there is no equivalent for DirectShow and /or MFC on neither Mac OS X nor Linux or other UN*X flavours. If you want that to be portable, you should take a look at OpenGL (http://en.wikipedia.org/wiki/OpenGL) instead. Regarding MFC, wxWidgets would be a good replacement, chec kout http://wxwidgets.org/
Avatar of kishan66

ASKER

So , can i use win32 application and build the application(portable) for "live video capturing "  using vc++2008.

can you even mention me some good tutorials regarding this.
You mean like creating an installer for that application?
Soory if i am not making it clear.

Initially , i developed a application using "MFC-DirectShow" to capture live video and present on the screen(both locally done).
but as the application which is built is not portable,  now i am trying to rebuild again from scratch by creating win32application rather than a MFC.

so i juts want to make sure this new application is portable or not?
if portable, can you guide me or give me some sample code about the video capturing through webcam using vc++2008.
If you are already using MFC and want to rewrite that as a Windows application, that won't be portable either. A plain Win32 project still is too Windows specific. OpenCV (http://www.cs.iit.edu/~agam/cs512/lect-notes/opencv-intro/opencv-intro.html) might help a lot here regarding capturing and displaying, e.g.
CvCapture* capture = cvCaptureFromCAM(0);
 
IplImage* img = 0; 
if(!cvGrabFrame(capture)){              // capture a frame 
  printf("Could not grab a frame\n\7");
  exit(0);
}
img=cvRetrieveFrame(capture);           // retrieve the captured frame

Open in new window

so you mean to say..
1).all win32(console/projects) and MFC applications will not work in other OS. right?

2) can you even tell me if i use this OpenCV , can i even write application where i can broadcast the live Video.

3) Can i write OpenCV code using vc++2008 and compile.(if it is a stupid question.. please excuse me as i have no knowledge about these things)

End Product:: have to build an application where participents can see each other live. suppose if two people are participation uisng our application(some thing like game) they should able to see each other.

please answer me point wise.
1.) You can - to some extent at least - keep the source code compatible for more than one platform by using multiplatform libraries such as OpenCV

2.) Hm, what do you mean by "broadcast" the video? Ooops, read the footer later: Technically that is possible, you'd have to write client/server socket applications and send the data over a network, that should be possible - within some limitations, though.

3.) Well, OpenCV is well-documented and there are a lot of samples available. So I'd say that this is just a matter of time ;o)
Hi jkr,

really appreciate your help.

have one more doubt.
(All these doubts due to lack of knowledge in windows programming/c++).
***End Product:: have to build an application where participents can see each other live. suppose if two people are participation uisng our application(some thing like game) they should able to see each other.

can i develop the above application using MFC with out DirectShow API.
-----i think i am repeating this question as no one answered me back .-----

Thanks


 
ASKER CERTIFIED SOLUTION
Avatar of jkr
jkr
Flag of Germany image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial