The Machine Perception Toolbox

[Introduction]- [News]- [Download]- [Screenshots]- [Manual (pdf)]- [Forums]- [API Reference]- [Repository ]

 

Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

CVideoDemoApp Class Reference

#include <VideoDemo.h>

Collaboration diagram for CVideoDemoApp:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 CVideoDemoApp ()
virtual BOOL InitInstance ()
afx_msg void OnAppAbout ()
afx_msg void OnAppProject ()
afx_msg void OnFileSavevideo ()

Public Attributes

MPDirectShow m_directShow

Constructor & Destructor Documentation

CVideoDemoApp  ) 
 

Definition at line 31 of file VideoDemo.cpp.

00032 {
00033         // TODO: add construction code here,
00034         // Place all significant initialization in InitInstance
00035 }


Member Function Documentation

BOOL InitInstance  )  [virtual]
 

Definition at line 45 of file VideoDemo.cpp.

References BOOL, dl_capture, DeviceList::DoModal(), MPDirectShow::GetVideoDevices(), m_directShow, MPDirectShow::RunDirectShow(), DeviceList::setDirectShow(), Projectsbox::setDirectShow(), CMainFrame::setDirectShow(), and MPDirectShow::SetVideoDevices().

00046 {
00047         AfxEnableControlContainer();
00048 
00049         // Standard initialization
00050         // If you are not using these features and wish to reduce the size
00051         //  of your final executable, you should remove from the following
00052         //  the specific initialization routines you do not need.
00053 
00054 #ifdef _AFXDLL
00055         Enable3dControls();                     // Call this when using MFC in a shared DLL
00056 #else
00057         Enable3dControlsStatic();       // Call this when linking to MFC statically
00058 #endif
00059 
00060         // Change the registry key under which our settings are stored.
00061         // TODO: You should modify this string to be something appropriate
00062         // such as the name of your company or organization.
00063         SetRegistryKey(_T("Local AppWizard-Generated Applications"));
00064 
00065 
00066         // To create the main window, this code creates a new frame window
00067         // object and then sets it as the application's main window object.
00068 
00069         CMainFrame* pFrame = new CMainFrame;
00070         m_pMainWnd = pFrame;
00071         pFrame->setDirectShow(&m_directShow);
00072 
00073         // create and load the frame with its resources
00074 
00075         pFrame->LoadFrame(IDR_MAINFRAME,
00076                 WS_OVERLAPPEDWINDOW | FWS_ADDTOTITLE, NULL,
00077                 NULL);
00078 
00079         Projectsbox project;
00080         project.setDirectShow(&m_directShow);
00081         project.DoModal();
00082 
00083         int totalDevicesFound;
00084          if(m_directShow.GetVideoDevices() == 0)
00085                 {
00086                         MessageBox(NULL, (LPCTSTR)"Video device not found", NULL, MB_OK); 
00087                         exit (-1);
00088                 }
00089          m_directShow.SetVideoDevices(0);
00090         DeviceList deviceList;
00091         deviceList.setDirectShow(&m_directShow, totalDevicesFound, dl_capture);
00092         deviceList.DoModal();
00093         m_directShow.RunDirectShow(pFrame->m_hWnd);
00094         //SetThreadPriority(GetCurrentThread(), THREAD_PRIORITY_NORMAL-1);
00095 
00096         
00097         // The one and only window has been initialized, so show and update it.
00098         pFrame->ShowWindow(SW_SHOW);
00099         pFrame->UpdateWindow();
00100 
00101         return TRUE;
00102 }

Here is the call graph for this function:

void OnAppAbout  ) 
 

Definition at line 158 of file VideoDemo.cpp.

00159 {
00160         CAboutDlg aboutDlg;
00161         aboutDlg.DoModal();
00162 }

void OnAppProject  ) 
 

Definition at line 169 of file VideoDemo.cpp.

References m_directShow, and Projectsbox::setDirectShow().

00170 {
00171         Projectsbox project;
00172         project.setDirectShow(&m_directShow);
00173         project.DoModal();
00174         
00175 }

Here is the call graph for this function:

void OnFileSavevideo  ) 
 

Definition at line 177 of file VideoDemo.cpp.

References m_directShow, and SaveVideo::setDirectShow().

00178 {
00179         SaveVideo saveVideo;
00180         saveVideo.setDirectShow(&m_directShow);
00181         saveVideo.DoModal();
00182         
00183 }

Here is the call graph for this function:


Member Data Documentation

MPDirectShow m_directShow
 

Definition at line 27 of file VideoDemo.h.

Referenced by InitInstance(), OnAppProject(), and OnFileSavevideo().


The documentation for this class was generated from the following files:
Generated on Mon Nov 8 17:08:30 2004 for MPT by  doxygen 1.3.9.1