source: trunk/src/testing/app/hd-video-player/DecklinkCaptureDlg.h @ 4

Revision 4, 5.4 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: DecklinkCaptureDlg.h,v 1.5 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#pragma once
46#include "afxwin.h"
47#include "Utils.h"
48
49// CDecklinkCaptureDlg dialog
50class CDecklinkCaptureDlg : public CDialog
51{
52// Construction
53public:
54        CDecklinkCaptureDlg(CWnd* pParent = NULL);      // standard constructor
55        ~CDecklinkCaptureDlg();
56// Dialog Data
57        enum { IDD = IDD_DECKLINKCAPTURE_DIALOG };
58
59protected:
60        virtual void DoDataExchange(CDataExchange* pDX);        // DDX/DDV support
61
62        afx_msg void OnCbnSelchangeComboVideodevice();
63        afx_msg void OnCbnSelchangeComboAudiodevice();
64        afx_msg void OnCbnSelchangeComboVideoformats();
65        afx_msg void OnCbnSelchangeComboAudioformats();
66        afx_msg void OnBnClickedCheckAudiomute();
67        afx_msg void OnBnClickedButtonBrowse();
68        afx_msg void OnBnClickedButtonCapture();
69        afx_msg void OnBnClickedButtonStop();
70        afx_msg void OnCbnSelchangeComboCompression();
71        afx_msg void OnBnClickedSageStart();
72        afx_msg void OnBnClickedSageStop();
73        afx_msg void OnCbnSelchangeSageAddr();
74        afx_msg void OnEnChangeSageEditIp();
75// Implementation
76protected:
77        HICON m_hIcon;
78
79        // Generated message map functions
80        virtual BOOL OnInitDialog();
81        virtual BOOL DestroyWindow();
82        afx_msg void OnSysCommand(UINT nID, LPARAM lParam);
83        afx_msg void OnPaint();
84        afx_msg HCURSOR OnQueryDragIcon();
85        DECLARE_MESSAGE_MAP()
86
87        virtual LRESULT WindowProc(UINT message, WPARAM wParam, LPARAM lParam);
88        void HandleGraphEvent();
89
90private:
91        IGraphBuilder* m_pGraph;
92        IBaseFilter* m_pVideoCapture;
93        IBaseFilter* m_pAudioCapture;
94        IBaseFilter* m_pVideoRenderer;
95        IBaseFilter* m_pSmartT;
96
97        IMediaControl* m_pControl;
98
99        IVideoWindow* m_pIVW;   // for the preview window
100        IMediaEventEx* m_pMediaEvent;   // for the preview window
101
102        DWORD m_ROTRegister;
103
104        CComboBox m_videoDeviceCtrl;
105        CComboBox m_audioDeviceCtrl;
106        CComboBox m_videoFormatCtrl;
107        CComboBox m_audioFormatCtrl;
108        CComboBox m_compressionCtrl;
109        CComboBox m_sageStreamCtrl;
110        CComboBox m_framerateCtrl;
111
112        CButton m_MuteCtrl;
113
114        CEdit m_sageIPCtrl;
115
116        CStatic m_preview;
117        BOOL m_bAudioMute;
118        int m_compressor;
119        int m_framerate;
120        BOOL m_bEnableCompressionCtrl;
121        enum { ENC_NONE, ENC_DV, ENC_WM };
122        //enum { COLOR_RGB24, COLOR_16 };
123
124        CString m_captureFile;
125        CEdit m_captureFileCtrl;
126
127        VIDEOINFOHEADER m_vihDefault;
128        WAVEFORMATEX m_wfexDefault;
129        CRegUtils m_regUtils;
130
131        HRESULT CreatePreviewGraph();
132        HRESULT CreateCaptureGraph(bool sage=false);
133        HRESULT CreateUncompressedCaptureGraph();
134        HRESULT CreateDVCaptureGraph();
135        HRESULT CreateWMCaptureGraph();
136        HRESULT ConfigureWMEncoder(IBaseFilter* pASFWriter);
137        HRESULT DestroyGraph(bool sage=false);
138
139        void InitialiseVideoPreview(void);
140
141        HRESULT PopulateDeviceControl(const GUID* pCategory, CComboBox* pCtrl);
142        HRESULT PopulateVideoControl();
143        HRESULT PopulateAudioControl();
144        HRESULT PopulateCompressionControl();
145
146        int  ChangeMasterIP(int index);
147        void EnableControls(void);
148        void DisableControls(void);
149
150        int LoadIpInfo();
151
152        void QueryRegistry(void);
153        afx_msg void OnBnClickedButtonCodecproperties();
154public:
155        afx_msg void OnBnClickedSageReg();
156        afx_msg void OnCbnSelchangeComboFramerate();
157        afx_msg void OnCbnSelchangeComboCompression2();
158};
Note: See TracBrowser for help on using the repository browser.