source: trunk/src/testing/app/hd-video-player/DecklinkCapture.cpp @ 4

Revision 4, 4.2 KB checked in by ajaworski, 13 years ago (diff)

Added modified SAGE sources

Line 
1/******************************************************************************
2 * SAGE - Scalable Adaptive Graphics Environment
3 *
4 * Copyright (C) 2004 Electronic Visualization Laboratory,
5 * University of Illinois at Chicago
6 *
7 * All rights reserved.
8 *
9 * Redistribution and use in source and binary forms, with or without
10 * modification, are permitted provided that the following conditions are met:
11 *
12 *  * Redistributions of source code must retain the above copyright
13 *    notice, this list of conditions and the following disclaimer.
14 *  * Redistributions in binary form must reproduce the above
15 *    copyright notice, this list of conditions and the following disclaimer
16 *    in the documentation and/or other materials provided with the distribution.
17 *  * Neither the name of the University of Illinois at Chicago nor
18 *    the names of its contributors may be used to endorse or promote
19 *    products derived from this software without specific prior written permission.
20 *
21 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
22 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
23 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
24 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
25 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
26 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
27 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
28 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
29 * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
30 * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
31 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
32 *
33 * Direct questions, comments etc about SAGE to http://www.evl.uic.edu/cavern/forum/
34 *
35 *****************************************************************************/
36
37//-----------------------------------------------------------------------------
38// $Id: DecklinkCapture.cpp,v 1.2 2006/04/11 01:11:07 ivanr Exp $
39//
40// Desc: DirectShow capture sample
41//
42// Copyright (c) Blackmagic Design 2005. All rights reserved.
43//-----------------------------------------------------------------------------
44
45#include "stdafx.h"
46
47#include "DecklinkCapture.h"
48#include "DecklinkCaptureDlg.h"
49
50#ifdef _DEBUG
51#define new DEBUG_NEW
52#endif
53
54
55// CDecklinkCaptureApp
56
57BEGIN_MESSAGE_MAP(CDecklinkCaptureApp, CWinApp)
58        ON_COMMAND(ID_HELP, CWinApp::OnHelp)
59END_MESSAGE_MAP()
60
61
62// CDecklinkCaptureApp construction
63
64CDecklinkCaptureApp::CDecklinkCaptureApp()
65{
66        // TODO: add construction code here,
67        // Place all significant initialization in InitInstance
68}
69
70
71// The one and only CDecklinkCaptureApp object
72
73CDecklinkCaptureApp theApp;
74
75
76// CDecklinkCaptureApp initialization
77
78BOOL CDecklinkCaptureApp::InitInstance()
79{
80        // InitCommonControls() is required on Windows XP if an application
81        // manifest specifies use of ComCtl32.dll version 6 or later to enable
82        // visual styles.  Otherwise, any window creation will fail.
83        InitCommonControls();
84
85        CWinApp::InitInstance();
86
87        AfxEnableControlContainer();
88
89        CoInitialize(NULL);
90
91        // Standard initialization
92        // If you are not using these features and wish to reduce the size
93        // of your final executable, you should remove from the following
94        // the specific initialization routines you do not need
95        // Change the registry key under which our settings are stored
96        // TODO: You should modify this string to be something appropriate
97        // such as the name of your company or organization
98        SetRegistryKey(_T("Local AppWizard-Generated Applications"));
99
100        CDecklinkCaptureDlg dlg;
101        m_pMainWnd = &dlg;
102        INT_PTR nResponse = dlg.DoModal();
103        if (nResponse == IDOK)
104        {
105                // TODO: Place code here to handle when the dialog is
106                //  dismissed with OK
107        }
108        else if (nResponse == IDCANCEL)
109        {
110                // TODO: Place code here to handle when the dialog is
111                //  dismissed with Cancel
112        }
113
114        CoUninitialize();
115
116        // Since the dialog has been closed, return FALSE so that we exit the
117        //  application, rather than start the application's message pump.
118        return FALSE;
119}
Note: See TracBrowser for help on using the repository browser.