DecklinkCaptureDlg.h


※上記の広告は60日以上更新のないWIKIに表示されています。更新することで広告が下部へ移動します。

//-----------------------------------------------------------------------------
// $Id: DecklinkCaptureDlg.h,v 1.5 2006/04/11 01:11:07 ivanr Exp $
//
// Desc: DirectShow capture sample
//
// Copyright (c) Blackmagic Design 2005. All rights reserved.
//-----------------------------------------------------------------------------

#pragma once
#include "afxwin.h"
#include "Utils.h"

// CDecklinkCaptureDlg dialog
class CDecklinkCaptureDlg : public CDialog
{
// Construction
public:
CDecklinkCaptureDlg(CWnd* pParent = NULL); // standard constructor

// Dialog Data
enum { IDD = IDD_DECKLINKCAPTURE_DIALOG };

protected:
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support

afx_msg void OnCbnSelchangeComboVideodevice();
afx_msg void OnCbnSelchangeComboAudiodevice();
afx_msg void OnCbnSelchangeComboVideoformats();
afx_msg void OnCbnSelchangeComboAudioformats();
afx_msg void OnBnClickedCheckAudiomute();
afx_msg void OnBnClickedButtonBrowse();
afx_msg void OnBnClickedButtonCapture();
afx_msg void OnBnClickedButtonStop();
afx_msg void OnCbnSelchangeComboCompression();

// Implementation
protected:
HICON m_hIcon;

// Generated message map functions
virtual BOOL OnInitDialog();
virtual BOOL DestroyWindow();
afx_msg void OnSysCommand(UINT nID, LPARAM lParam);
afx_msg void OnPaint();
afx_msg HCURSOR OnQueryDragIcon();
DECLARE_MESSAGE_MAP()

virtual LRESULT WindowProc(UINT message, WPARAM wParam, LPARAM lParam);
void HandleGraphEvent();

private:
IGraphBuilder* m_pGraph;
IBaseFilter* m_pVideoCapture;
IBaseFilter* m_pAudioCapture;
IBaseFilter* m_pVideoRenderer;
IBaseFilter* m_pSmartT;

IMediaControl* m_pControl;

IVideoWindow* m_pIVW; // for the preview window
IMediaEventEx* m_pMediaEvent; // for the preview window

DWORD m_ROTRegister;

CComboBox m_videoDeviceCtrl;
CComboBox m_audioDeviceCtrl;
CComboBox m_videoFormatCtrl;
CComboBox m_audioFormatCtrl;
CComboBox m_compressionCtrl;
CStatic m_preview;
BOOL m_bAudioMute;
int m_compressor;
BOOL m_bEnableCompressionCtrl;
enum { ENC_NONE, ENC_DV, ENC_WM };

CString m_captureFile;
CEdit m_captureFileCtrl;

VIDEOINFOHEADER m_vihDefault;
WAVEFORMATEX m_wfexDefault;
CRegUtils m_regUtils;

HRESULT CreatePreviewGraph();
HRESULT CreateCaptureGraph();
HRESULT CreateUncompressedCaptureGraph();
HRESULT CreateDVCaptureGraph();
HRESULT CreateWMCaptureGraph();
HRESULT ConfigureWMEncoder(IBaseFilter* pASFWriter);
HRESULT DestroyGraph();

void InitialiseVideoPreview(void);

HRESULT PopulateDeviceControl(const GUID* pCategory, CComboBox* pCtrl);
HRESULT PopulateVideoControl();
HRESULT PopulateAudioControl();
HRESULT PopulateCompressionControl();

void EnableControls(void);
void DisableControls(void);

void QueryRegistry(void);
};
ツールボックス

下から選んでください:

新しいページを作成する
ヘルプ / FAQ もご覧ください。