[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Are MFC- Direct show applications Portable.

Posted on 2009-02-17
9
Medium Priority
?
547 Views
Last Modified: 2012-05-06
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?
0
Comment
Question by:kishan66
  • 5
  • 4
9 Comments
 
LVL 86

Expert Comment

by:jkr
ID: 23662859
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/
0
 

Author Comment

by:kishan66
ID: 23664218
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.
0
 
LVL 86

Expert Comment

by:jkr
ID: 23664253
You mean like creating an installer for that application?
0
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 

Author Comment

by:kishan66
ID: 23664423
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.
0
 
LVL 86

Expert Comment

by:jkr
ID: 23664466
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

0
 

Author Comment

by:kishan66
ID: 23671332
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.
0
 
LVL 86

Expert Comment

by:jkr
ID: 23716314
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)
0
 

Author Comment

by:kishan66
ID: 23725906
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


 
0
 
LVL 86

Accepted Solution

by:
jkr earned 1500 total points
ID: 23751107
Basically, the answer is "yes" (even though MFC isn't portable). The main problem will be to guarantee the bandwith so that all participants can see each other without too much "lagging". For that, you will have to use a conpressing codec (such as MPEG), but that is a matter of how you set up your DirectShow filter graph.
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article will show you some of the more useful Standard Template Library (STL) algorithms through the use of working examples.  You will learn about how these algorithms fit into the STL architecture, how they work with STL containers, and why t…
Many modern programming languages support the concept of a property -- a class member that combines characteristics of both a data member and a method.  These are sometimes called "smart fields" because you can add logic that is applied automaticall…
The viewer will learn how to user default arguments when defining functions. This method of defining functions will be contrasted with the non-default-argument of defining functions.
The viewer will learn how to clear a vector as well as how to detect empty vectors in C++.
Suggested Courses

834 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question