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

開発環境(Visual C++)


ファイル別処理内訳

/common/Utils.cpp Utils.h定義クラス処理
/include/Utils.h クラス定義ヘッダ
/include/DecklinkInterface.h ドライバ制御(?)

DecklinkCapture.h クラス定義ヘッダ
DecklinkCaptureDlg.h フォーム処理定義ヘッダ
resource.h winアプリフォームID管理
stdafx.h 他ヘッダーの読み込みとwinアプリ定義
DecklinkCapture.cpp DecklinkCapture.h定義クラス処理
DecklinkCaptureDlg.cpp DecklinkCaptureDlg.h定義クラス処理
stdafx.cpp

クラス(/include/Utils.h)

  • CDSUtils
AddFilter(IGraphBuilder* pGraph, const GUID &clsid, LPCWSTR pName, IBaseFilter** ppFilter)
フィルター追加
説明:Attempts to locate a filter of a given class ID and name and add it to the graph

AddFilter2(IGraphBuilder* pGraph, const GUID &clsid, LPCWSTR pName, IBaseFilter** ppFilter)
フィルター追加
説明:Attempts to locate a filter of a given class category and name

RemoveGraphFromRot(DWORD pdwRegister)
レジストからフィルター読み込み
説明:Removes a filter graph from the Running Object Table

GetUnconnectedPin(IBaseFilter* pFilter, PIN_DIRECTION PinDir, IPin** ppPin)
説明:Attemptes to locate an unconnected pin on filter

GetPin(IBaseFilter* pFilter, const wchar_t* pName, IPin** ppPin)
説明:Find the pin of the specified name on the given filter
This method leaves an outstanding reference on the pin if successful

GetPin(IBaseFilter* pFilter, const GUID* pFormat, PIN_DIRECTION PinDir, IPin** ppPin)
説明:Find the pin of the specified format type on the given filter
This method leaves an outstanding reference on the pin if successful

ConnectFilters(IGraphBuilder* pGraph, IBaseFilter* pUpstream, wchar_t* pUpstreamPinName, IBaseFilter* pDownstream, wchar_t* pDownstreamPinName)
説明:Connects two filters using the pin names, if no name is supplied the first
unconnected pin is used

ConnectFilters(IGraphBuilder* pGraph, IBaseFilter* pUpstream, IBaseFilter* pDownstream, const GUID* pFormat)
説明:Connects two filters by finding a pin on the upstream filter with the specified
major format type, e.g. For connecting an audio pin to a downstream filter

RenderFilter(IGraphBuilder* pGraph, IBaseFilter* pUpstream, wchar_t* pUpstreamPinName)
説明:Renders the named output pin of the filter, or the first unconnected output if
no name is provided

DisconnectAllPins(IGraphBuilder* pGraph)
説明:Disconnect all the pins of the filters in a graph

FindFilterInterface(IBaseFilter* pFilter, const IID& riid, void** ppvInterface)
説明:Attempt to locate the specified interface

FindPinInterface(IBaseFilter* pFilter, wchar_t* pName, const IID& riid, void** ppvInterface)
説明:Attempt to locate the interface on the named pin or on the first pin if no
name is provided.

FindPinInterface(IBaseFilter* pFilter, const GUID* pFormat, PIN_DIRECTION PinDir, const IID& riid, void** ppvInterface)
説明:Attempt to locate the interface on the pin with the specified format or on the first pin if no
format is provided.

AddGraphToRot(IUnknown* pUnkGraph, DWORD* pdwRegister)
説明:Adds a DirectShow filter graph to the Running Object Table,
allowing GraphEdit to "spy" on a remote filter graph.

  • CRegUtils
CRegUtils()
レジストリ取得
説明:Constructor

~CRegUtils()
レジストリ閉じる
説明:Destructor

Open(LPCTSTR lpSubKey)
サブキーオープン
説明:Opens the specified subkey

Create(LPCTSTR lpSubKey)
サブキー生成
説明:Creates the specified subkey

Close()
サブキー終了
説明:Closes the subkey

SetString(LPCTSTR valueName, const BYTE* lpData, DWORD cbData)
string形式設定
説明:Set the key for the named value of type string

GetString(LPCTSTR valueName, LPBYTE lpData, DWORD cbData)
string取得
説明:Query the key for the named value of type string

SetBinary(LPCTSTR valueName, const BYTE* lpData, DWORD cbData)
バイナリ形式設定
説明:Set the key for the named value of type binary

GetBinary(LPCTSTR valueName, LPBYTE lpData, DWORD cbData)
バイナリ取得
説明:Query the key for the named value of type binary

SetDword(LPCTSTR valueName, const BYTE* lpData, DWORD cbData)
Dword形式設定
説明:Set the key for the named value of type DWORD

GetDword(LPCTSTR valueName, LPBYTE lpData, DWORD cbData)
Dword取得
説明:Query the key for the named value of type DWORD

  • CUtils
GetBMIHeader(const AM_MEDIA_TYPE* pamt)
静止画保存
説明:Returns the BITMAPINFOHEADER structure from media type format extension

GetBMIHeader(const CMediaType& mt)
静止画保存
説明:Returns the BITMAPINFOHEADER structure from media type format extension

GetAvgTimePerFrame(const AM_MEDIA_TYPE* pamt)
平均FPS取得
説明:Returns the average time per frame from media type format extension

GetImageSize(BITMAPINFOHEADER* pbmih)
サイズ取得
説明:Calculates the image size

  • FPS定義(?)
UNITS = 10 ^ 7  
UNITS / 30 = 30 fps;
UNITS / 20 = 20 fps, etc
const REFERENCE_TIME FPS_30 = UNITS / 30;
const REFERENCE_TIME FPS_2997 = UNITS * 1001 / 30000;
const REFERENCE_TIME FPS_25 = UNITS / 25;
const REFERENCE_TIME FPS_24 = UNITS / 24;
const REFERENCE_TIME FPS_23976 = UNITS * 1001 / 24000;
const REFERENCE_TIME FPS_20 = UNITS / 20;
const REFERENCE_TIME FPS_10 = UNITS / 10;
const REFERENCE_TIME FPS_5 = UNITS / 5;
const REFERENCE_TIME FPS_4 = UNITS / 4;
const REFERENCE_TIME FPS_3 = UNITS / 3;
const REFERENCE_TIME FPS_2 = UNITS / 2;
const REFERENCE_TIME FPS_1 = UNITS / 1;

クラス(DecklinkCapture.h)

  • CDecklinkCaptureApp
CDecklinkCaptureApp()
説明:CDecklinkCaptureApp construction

InitInstance()
説明:CDecklinkCaptureApp initialization

サンプル


XBox360専用プレビューツール

添付ファイル