約 5,201,562 件
https://w.atwiki.jp/tbparanoia/pages/12.html
Kensington 七陽商事:サポート窓口は、2014年8月25日より アコ・ブランズ・ジャパン株式会社へ変更 アコ・ブランズ・ジャパン: 型番 名称 発売日 ケーブル 操作 ボール径 ボタン数 読取方式 解像度 スクロール JANコード 価格.com 62358 Turbo Mouse Plus ADB 人差指 57mm 2 62360 Turbo Mouse 3 ADB 人差指 57mm 2 ステンレスローラー式 64110 Turbo Mouse 4 ADB 人差指 57mm 2 ステンレスローラー式 64210 Turbo Mouse 5 ADB 人差指 57mm 4 ステンレスローラー式 026490269364210 Turbo Mouse 5 USB/ADB 人差指 57mm 4 ステンレスローラー式 仕様表 026460269264213 Expert Mouse Pro USB/PS2 人差指 57mm 11 ステンレスローラー式 ホイール 仕様表 64214 Turbo Mouse Pro USB 人差指 57mm 11 ステンレスローラー式 ホイール 64215 Expert Mouse 5 Serial/PS2 人差指 57mm 4 ステンレスローラー式 026510269464217 Expert Mouse 5 USB/PS2 人差指 57mm 4 ステンレスローラー式 64220 Orbit ADB 人差指 40mm 2 ゴム巻きシャフト式 64221 Orbit Serial 人差指 40mm 2 ゴム巻きシャフト式 0264264224 Orbit USB for Mac USB/ADB 人差指 40mm 2 ゴム巻きシャフト式 0264164226 Orbit USB/PS2 人差指 40mm 2 ゴム巻きシャフト式 64227 TurboBall 有線 人差指 51mm 5 ゴム巻きシャフト式 64232 Orbit3D USB 人差指 40mm 2 ゴム巻きシャフト式 64240 Turbo Mouse Pro Wireless 無線 人差指 57mm 11 ステンレスローラー式 ホイール 仕様表 64245.jpg 64245 Expert Mouse Pro Wireless 無線 人差指 57mm 11 ステンレスローラー式 ホイール 仕様表 026970269964292 Orbit Elite 有線 人差指 40mm 2 ゴム巻きシャフト式 4580123130304 仕様表 64293 Orbit Elite Wireless 無線 人差指 40mm 2 ゴム巻きシャフト式 6432564325AKT4325 ExpertMouse OpticalBlackExpert Mouse Optical Trackball 2004/07/23 有線 人差指 55mm 4(6) 光学式 スクロールリング 45801231302364995364270410 仕様表 6432764327AKT-4327 Orbit OpticalOrbit Optical Trackball 2004/07/23 有線 人差指 40mm 2(3) 光学式 45801231302434995364270427 仕様表 64329 Expert Mouse Wireless 無線 人差指 55mm 4(6) 光学式 スクロールリング 64374 ExpertMouse White 2005/02/10 有線 人差指 55mm 4(6) 光学式 スクロールリング 4580123130373 64383 ExpertMouse Pink 2005/10/05 有線 人差指 55mm 4(6) 光学式 スクロールリング 4580123130397 64384 Orbit Optical PINK 2005/10/05 有線 人差指 40mm 2(3) 光学式 0264464660 TurboRing 有線 人差指 51mm 3 ゴム巻きシャフト式 仕様表 7232772327JPKT-2327 SlimBlade TrackballSlimBlade Trackball 2009/04/10 有線 人差指 55mm 4(6) レーザー式 横捻り 458012313047245801231305194995364270434 仕様表 7233772337JPKT-2337 OrbitTrackball with Scroll RingOrbit Scroll Ring Trackball 2009/11/062009/12/28 有線 人差指 40mm 2(3) 光学式 スクロールリング 458012313050245801231305264995364270441 仕様表 K72352JPKT-2352 Orbit Wireless Mobile TrackballOrbit Wireless Mobile Trackball 2011/10/21 無線 人差指 32mm 2(3) レーザー式 タッチスクローリング 45801231305334995364270458 仕様表 K72359JP Expert Mouse Wireless Trackball 2016/02/19 無線Bluetooth 人差指 55mm 4(6) レーザー式 500dpi スクロールリング 4995364270403 仕様表 型番についての覚え書き 64325(Expert Mouse7)以前 1.日本版独自の型番 同一製品でも本家型番とは別系統となる日本版独自の型番を使用していた。 64325(Expert Mouse7)以降は米国版との統一がなされたようだが、64660(TurboRing)のみ例外である。 2.日本版には複数の型番が存在 Expert Mouse 5 USB/PS2には、型番02651と型番02694がある。 本体裏面シールにはModel #02651Y、Model #002694Aと記載されている。 製品仕様に相違があるのか、単なる出荷ロットの違いだけなのかは不明。 3.コネクタによって複数の型番が存在 初代OrbitはADB版(64220)、Serial版(64221)、USB for Mac版(64226)、USB/PS2版(64226)と4つの型番が存在する。 他モデルについても同様である。 4.Expert MouseとTurbo Mouseの名称 Windows用はExpert Mouse、Mac用はTurbo Mouseの名称でリリースされる。 ただし、Turbo MouseがMac用ADB接続という訳ではない。Turbo Mouse 5(64210)、Turbo Mouse Pro(64214)はUSB接続である。 64325(Expert Mouse7)以後 1.型番の統一 本家型番と統一され、日本独自の型番がなくなった。 基本は数字5桁で、本体裏面シールには"K99999"と記載される。 Slimbladeの場合、本体裏面の記載はP/N K72327。 本家公式サイトにK72327EU、日本公式サイトに72327JPと書かれているが本体裏面の記載は同一。 型番の相違部分は、パッケージ(付属品)のみと思われる。 2.価格.comの価格調査 2016年02月19日、Amazonに従来の型番とは異なる下記2つが登録される。 "KT-4327"(Orbit Optical) "KT-2352"(Orbit Wireless Mobile Trackball) これに伴い、価格.comに価格表示がされなくなった。(廃盤扱い) 価格.comの追跡調査は、Amazonの商品登録と連動しているのか? 3.ビッグカメラ販売サイト 下記3つが販売される。こちらはAmazonに未登録、価格.com表示は従来のまま。 "KT4325"(ExpertMouse5) "KT-2327"(SlimBlade Trackball) "KT-2337"(OrbitTrackball with Scroll Ring) 専用ソフトウェア Kensington 七陽商事:ソフトウェア ドライバ、MouseWorks 5.50等 Kensington アコ・ブランズ・ジャパン:最新版TrackballWorks 注意事項: 1.ExpertMousePro(EM6)以前 ExpertMousePro以前の製品はWindowsVista以降に対応していない。 これは専用ソフトウェアMouseWorksがWindowsVista未対応のため。 2.新製品とTrackballWorks 新製品発売後は、TrackballWorksを最新版にすること。 Expert Mouse Wireless Trackballは、TrackballWorks1.3以前では認識されない。 ITmedia PC USER 2004/09/10 七陽商事、Kensington製光学式マウス、トラックボールなど10製品を発売 2005/01/26 トラックボールKensington製トラックボールに国内限定モデル――七陽商事 2005/09/22 七陽商事、限定ピンクカラーのKensingtonトラックボール 2009/04/07 Kensington製多機能トラックボール「SlimBlade Trackball」国内販売開始 2012/01/24 ちょっと気になる入力デバイス:持ち運べる本格派トラックボール――「Orbit Wireless Mobile Trackball」を試す PC Watch 2009/03/24:ひねってスクロールする「SlimBlade Trackball」レビュー 2009/12/04:【連載リレーコラム】買い物山脈 Kensington「Orbit Trackball with Scroll Ring」 ~スクロールリングを搭載した低価格トラックボール 2015/04/16:【やじうまミニレビュー】ケンジントン「OrbitTrackball with Scroll Ring」 ~実売3千円で購入可能、左右どちらの手でも使えるトラックボール 2015/04/30:【やじうまミニレビュー】ケンジントン「ExpertMouse OpticalBlack」 ~4ボタン+同時押し2ボタンが利用可能、左手でも使えるトラックボール ASCII.jp 2001/01/06:11ボタンをフルカスタマイズ可能な高機能トラックボールが登場 2002/10/04:ボール部が青く光るトラックボール「Orbit Elite」が登場! 2005/02/02:MJSOFT、『KENSINGTON EXPERT MOUSE』の日本限定カラーを20台発売 2009/04/10:トラックボール好き待望!? Kensingtonのニューモデル発売! ヲチモノ 2010/07/23:【トラックボール】ケンジントン 『Orbit Trackball with Scroll Ring』 レビューチェック 2011/08/07:【トラックボール】Kensington 『Orbit Wireless Mobile Trackball』 画像など 2011/10/28:【トラックボール】Kensington 『Orbit Wireless Mobile Trackball』 レビューチェック 2014/09/16:Kensingtonのトラックボール『SlimBlade Trackball』が10,000円を切る 2014/10/24:Kensingtonのトラックボール『Orbit Wireless』が4,000円を切る 2015/02/18:Kensingtonのトラックボール『SlimBlade Trackball』が7,400円弱まで値下がる 2016/01/06:Kensington、定番トラックボールのワイヤレスモデル『Expert Mouse Wireless Trackball』 2016/05/10:【トラックボール】Kensington 『Expert Mouse Wireless Trackball』 レビューチェック 個人サイト Track Ballを掃除しよう! Turbo Mouse Ver.3.0(#62360)、Turbo Mouse Ver.5.0(#64210)、Orbit(#64220 64226)、TurboRing(#64660)、Orbit Optical(#64327)
https://w.atwiki.jp/bmd_intensity/pages/37.html
Intensity公式サイト他、ツール、便利リンクなど (便利ツールとかぶるけど、公式を含めたリンク一覧がほしかったので) 公式サイト キャプチャソフト 動作報告、情報提供ページなど 公式サイト 公式(English) 公式(日本語) キャプチャソフト くすのき電算室くすのきTVHD くすのきTV Aggregat(アグレガート) ふぬああ 動作報告、情報提供ページなど HDTVキャプチャー機器まとめwiki IntensityとIntensity proについて PV3の私的まとめ Intensityまとめ Vegas Pro 9でIntensity Proを使用する 窓の杜 DirectShow対応ビデオキャプチャーカード経由の映像を快適に録画「アマレコTV」
https://w.atwiki.jp/e2200hd/
1,920×1,080ドットのフルHDパネルを採用しHDMIも備えた液晶ディスプレイ 世界初という21.5型/1,920×1,080ドットのパネルを搭載した液晶ディスプレイ 輝度は300cd/m2、コントラスト比は1,000:1 バックライトの制御でコントラストを拡張する「DCR」機能を搭載 従来モデルのDCRでは2,500:1または4,000:1までの拡張だったが、新モデルでは1万:1を実現した) 世界初という21.5型/1,920×1,080ドットのパネルを搭載した液晶ディスプレイ 現行スレ {BenQ E2420HD M2400HD G2420HD V2400 eco 39枚目 http //hibari.2ch.net/test/read.cgi/hard/1299093162/} ■製品情報 http //www.benq.co.jp/products/LCD/ XL2420T http //www.benq.co.jp/products/LCD/?product=1727 V2420H http //www.benq.co.jp/products/LCD/?product=1662 V2420HP http //www.benq.co.jp/products/LCD/?product=1694 V2220HP http //www.benq.co.jp/products/LCD/?product=628 GL2430HM http //www.benq.co.jp/products/LCD/?product=1730 G2420HDBL http //www.benq.co.jp/products/LCD/?product=1615 G2222HDL http //www.benq.co.jp/products/LCD/?product=1617 E2220HD http //www.benq.co.jp/products/LCD/?product=1559 E2420HD http //www.benq.co.jp/products/LCD/?product=1561 G2222HD http //www.benq.co.jp/products/LCD/?product=1623 G2420HD http //www.benq.co.jp/products/LCD/?product=1514 M2700HD http //www.benq.co.jp/products/LCD/?product=1625 E2200HD http //www.benq.co.jp/products/LCD/?product=1368 E2400HD http //www.benq.co.jp/products/LCD/?product=1376 E2220HD http //www.benq.co.jp/products/LCD/?product=1559 E2420HD http //www.benq.co.jp/products/LCD/?product=1561 M2200HD http //www.benq.co.jp/products/LCD/?product=1377 M2400HD http //www.benq.co.jp/products/LCD/?product=1378 G2220HD http //www.benq.co.jp/products/LCD/?product=1450 G2411HD http //www.benq.co.jp/products/LCD/?product=1451 G2420HD http //www.benq.co.jp/products/LCD/?product=1514 V2200 eco http //www.benq.co.jp/products/LCD/?product=1566 V2400 eco http //www.benq.co.jp/products/LCD/?product=1558 G2420HDBL http //www.benq.co.jp/products/LCD/?product=1615 G2222HDL http //www.benq.co.jp/products/LCD/?product=1617 G2222HD http //www.benq.co.jp/products/LCD/?product=1623 V2420H http //www.benq.co.jp/products/LCD/?product=1662 V2420HP http //www.benq.co.jp/products/LCD/?product=1694 V2220HP http //www.benq.co.jp/products/LCD/?product=628 EW2420(VAパネル+LED) ttp //news.ecoustics.com/bbs/messages/10381/641656.html VW2420H VW2220H(VAパネル+LED) ttp //news.ecoustics.com/bbs/messages/10381/641640.html 商品名 E2200HD M2200HD E2400HD 画像 実売価格目安 25,000円前後 30,000円前後 30,000円前後 発売日 9月27日発売 10月中旬発売 9月30日発売 サイズ 21.5型ワイド 24型ワイド 筐体色 グロッシーブラック グロッシーホワイト グロッシーブラック 解像度 1920x1080 (HD1080) 画素ピッチ(mm) 0.248 0.276 輝度 300 cd/㎡ コントラスト比 1000 1 (DCR 10000 1 ) 応答速度 5ms / 2ms(GTG) 表示領域 476.64x268.11 mm 531.36×298.89 mm 色再現性 約1677万色 視野角 170/160 (CR =10) 入力信号 D-sub / DVI-D (HDCP) / HDMI / Audio in / ヘッドホン端子 走査周波数 (水平) 30~83(KHz) 垂直周波数 50~76(Hz) 消費電力 最大45W 最大48W 最大55W 電源 内蔵 スピーカー 1Wx2 主な特徴 Senseye+Photo AMA I Key sRGB Kensington VESAマウント 100x100mm ティルト角度 -5°/20° -5°/21° 外形寸法(W×H×D) 522.8x407.8x186.8 mm 582.6×451×197.4 mm 重量 4.8 kg 7 kg 主な付属品 ドライバーCD(マニュアル・クイックスタートガイド含む) 電源ケーブル D-subケーブル DVIケーブル オーディオケーブル ― ― USBケーブル ― ― Webカメラ ― 適合規格 TCO 03 *偽アフィWiki注意 www1.atwiki.jp/2200hd/
https://w.atwiki.jp/intensity/pages/29.html
//----------------------------------------------------------------------------- // $Id DecklinkCaptureDlg.cpp,v 1.9 2006/04/11 01 11 07 ivanr Exp $ // // Desc DirectShow capture sample // // Copyright (c) Blackmagic Design 2005. All rights reserved. //----------------------------------------------------------------------------- #include "stdafx.h" #include "DecklinkCapture.h" #include "DecklinkCaptureDlg.h" #include initguid.h // TODO move this to a lib #include "DecklinkSample_uuids.h" #undef lstrlenW #ifdef _DEBUG #define new DEBUG_NEW #endif #define WM_GRAPHNOTIFYWM_APP+1// for Filter Graph event notification //----------------------------------------------------------------------------- // CAboutDlg //----------------------------------------------------------------------------- // CAboutDlg dialog used for App About class CAboutDlg public CDialog { public CAboutDlg(); // Dialog Data enum { IDD = IDD_ABOUTBOX }; protected virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support // Implementation protected DECLARE_MESSAGE_MAP() }; CAboutDlg CAboutDlg() CDialog(CAboutDlg IDD) { } void CAboutDlg DoDataExchange(CDataExchange* pDX) { CDialog DoDataExchange(pDX); } BEGIN_MESSAGE_MAP(CAboutDlg, CDialog) END_MESSAGE_MAP() //----------------------------------------------------------------------------- // CDecklinkCaptureDlg dialog //----------------------------------------------------------------------------- //----------------------------------------------------------------------------- // Constructor // CDecklinkCaptureDlg CDecklinkCaptureDlg(CWnd* pParent /*=NULL*/) CDialog(CDecklinkCaptureDlg IDD, pParent) , m_pIVW(NULL) { m_hIcon = AfxGetApp()- LoadIcon(IDR_MAINFRAME); } //----------------------------------------------------------------------------- // DoDataExchange // void CDecklinkCaptureDlg DoDataExchange(CDataExchange* pDX) { CDialog DoDataExchange(pDX); DDX_Control(pDX, IDC_COMBO_VIDEOFORMATS, m_videoFormatCtrl); DDX_Control(pDX, IDC_COMBO_AUDIOFORMATS, m_audioFormatCtrl); DDX_Control(pDX, IDC_STATIC_PREVIEW, m_preview); DDX_Control(pDX, IDC_EDIT_CAPTUREFILE, m_captureFileCtrl); DDX_Control(pDX, IDC_COMBO_COMPRESSION, m_compressionCtrl); DDX_Control(pDX, IDC_COMBO_VIDEODEVICE, m_videoDeviceCtrl); DDX_Control(pDX, IDC_COMBO_AUDIODEVICE, m_audioDeviceCtrl); } BEGIN_MESSAGE_MAP(CDecklinkCaptureDlg, CDialog) ON_WM_SYSCOMMAND() ON_WM_PAINT() ON_WM_QUERYDRAGICON() //}}AFX_MSG_MAP ON_CBN_SELCHANGE(IDC_COMBO_VIDEOFORMATS, OnCbnSelchangeComboVideoformats) ON_CBN_SELCHANGE(IDC_COMBO_AUDIOFORMATS, OnCbnSelchangeComboAudioformats) ON_BN_CLICKED(IDC_CHECK_AUDIOMUTE, OnBnClickedCheckAudiomute) ON_BN_CLICKED(IDC_BUTTON_BROWSE, OnBnClickedButtonBrowse) ON_BN_CLICKED(IDC_BUTTON_CAPTURE, OnBnClickedButtonCapture) ON_BN_CLICKED(IDC_BUTTON_STOP, OnBnClickedButtonStop) ON_CBN_SELCHANGE(IDC_COMBO_COMPRESSION, OnCbnSelchangeComboCompression) ON_CBN_SELCHANGE(IDC_COMBO_VIDEODEVICE, OnCbnSelchangeComboVideodevice) ON_CBN_SELCHANGE(IDC_COMBO_AUDIODEVICE, OnCbnSelchangeComboAudiodevice) END_MESSAGE_MAP() //----------------------------------------------------------------------------- // CDecklinkCaptureDlg message handlers //----------------------------------------------------------------------------- //----------------------------------------------------------------------------- // OnInitDialog // Called before the dialog is displayed, use this message handler to initialise // our app BOOL CDecklinkCaptureDlg OnInitDialog() { CDialog OnInitDialog(); // Add "About..." menu item to system menu. // IDM_ABOUTBOX must be in the system command range. ASSERT((IDM_ABOUTBOX 0xFFF0) == IDM_ABOUTBOX); ASSERT(IDM_ABOUTBOX 0xF000); CMenu* pSysMenu = GetSystemMenu(FALSE); if (pSysMenu != NULL) { CString strAboutMenu; strAboutMenu.LoadString(IDS_ABOUTBOX); if (!strAboutMenu.IsEmpty()) { pSysMenu- AppendMenu(MF_SEPARATOR); pSysMenu- AppendMenu(MF_STRING, IDM_ABOUTBOX, strAboutMenu); } } // Set the icon for this dialog. The framework does this automatically // when the application s main window is not a dialog SetIcon(m_hIcon, TRUE);// Set big icon SetIcon(m_hIcon, FALSE);// Set small icon // create a basic capture graph and preview the incoming video m_pGraph = NULL; m_pVideoCapture = NULL; m_pAudioCapture = NULL; m_pVideoRenderer = NULL; m_pSmartT = NULL; m_pControl = NULL; m_pIVW = NULL; m_pMediaEvent = NULL; m_ROTRegister = 0; m_bAudioMute = FALSE; m_compressor = 0; m_bEnableCompressionCtrl = TRUE; m_captureFile = " Select File "; // initialise default video media type ZeroMemory( m_vihDefault, sizeof(m_vihDefault)); m_vihDefault.AvgTimePerFrame = 333667; m_vihDefault.bmiHeader.biWidth = 720; m_vihDefault.bmiHeader.biHeight = 486; m_vihDefault.bmiHeader.biBitCount = 16; m_vihDefault.bmiHeader.biCompression = YVYU ; // initialise default audio media type ZeroMemory( m_wfexDefault, sizeof(m_wfexDefault)); m_wfexDefault.nChannels = 2;// the only field of interest // retrieve last state QueryRegistry(); m_captureFileCtrl.SetWindowText(m_captureFile); EnableControls(); // create a preview graph // add the filters that will be used by all the graphs; preview, uncompressed capture, dv capture, // mpeg capture and windows media capture HRESULT hr = CoCreateInstance(CLSID_FilterGraph, NULL, CLSCTX_INPROC_SERVER, IID_IGraphBuilder, reinterpret_cast void** ( m_pGraph)); if (SUCCEEDED(hr)) { #ifdef _DEBUG hr = CDSUtils AddGraphToRot(m_pGraph, m_ROTRegister); #endif hr = m_pGraph- QueryInterface(IID_IMediaControl, reinterpret_cast void** ( m_pControl)); if (SUCCEEDED(hr)) { // locate the video capture devices hr = PopulateDeviceControl( CLSID_VideoInputDeviceCategory, m_videoDeviceCtrl); if (SUCCEEDED(hr)) { hr = PopulateDeviceControl( CLSID_AudioInputDeviceCategory, m_audioDeviceCtrl); if (SUCCEEDED(hr)) { PWSTR pVideoName = (PWSTR)m_videoDeviceCtrl.GetItemData(m_videoDeviceCtrl.SetCurSel(0)); PWSTR pAudioName = (PWSTR)m_audioDeviceCtrl.GetItemData(m_audioDeviceCtrl.SetCurSel(0)); if (pVideoName pAudioName) { hr = CDSUtils AddFilter2(m_pGraph, CLSID_VideoInputDeviceCategory, pVideoName, m_pVideoCapture); if (SUCCEEDED(hr)) { hr = CDSUtils AddFilter2(m_pGraph, CLSID_AudioInputDeviceCategory, pAudioName, m_pAudioCapture); if (SUCCEEDED(hr)) { PopulateVideoControl();// populate the video format control with the video formats of the currently selected device PopulateAudioControl();// populate the audio format control with the audio formats of the currently selected device PopulateCompressionControl(); // locate video screen renderer for the preview window hr = CDSUtils AddFilter(m_pGraph, CLSID_VideoRendererDefault, L"Video Renderer", m_pVideoRenderer); if (SUCCEEDED(hr)) { hr = CreatePreviewGraph(); } } } } } } } } return TRUE; // return TRUE unless you set the focus to a control } //----------------------------------------------------------------------------- // DestroyWindow // Called when the window is being destroyed, clean up and free all resources. BOOL CDecklinkCaptureDlg DestroyWindow() { m_regUtils.Close(); #ifdef _DEBUG CDSUtils RemoveGraphFromRot(m_ROTRegister); #endif DestroyGraph(); SAFE_RELEASE(m_pControl); // Hide Video Window and remove owner. This has to be done prior to // destroying any window that displays video/still. if (m_pIVW) { m_pIVW- put_Visible(OAFALSE); m_pIVW- put_Owner(NULL); } SAFE_RELEASE(m_pIVW); SAFE_RELEASE(m_pMediaEvent); SAFE_RELEASE(m_pVideoRenderer); SAFE_RELEASE(m_pAudioCapture); SAFE_RELEASE(m_pVideoCapture); SAFE_RELEASE(m_pGraph); // free mediatypes attached to format controls int count = m_videoFormatCtrl.GetCount(); for (int item=0; item count; ++item) { DeleteMediaType((AM_MEDIA_TYPE*)m_videoFormatCtrl.GetItemData(item)); } count = m_audioFormatCtrl.GetCount(); for (int item=0; item count; ++item) { DeleteMediaType((AM_MEDIA_TYPE*)m_audioFormatCtrl.GetItemData(item)); } // release the device names attached to the item s data count = m_videoDeviceCtrl.GetCount(); for (item=0; item count; ++item) { PWSTR pName = (PWSTR)m_videoDeviceCtrl.GetItemData(item); delete [] pName; } count = m_audioDeviceCtrl.GetCount(); for (item=0; item count; ++item) { PWSTR pName = (PWSTR)m_audioDeviceCtrl.GetItemData(item); delete [] pName; } return CDialog DestroyWindow(); } //----------------------------------------------------------------------------- // OnSysCommand // void CDecklinkCaptureDlg OnSysCommand(UINT nID, LPARAM lParam) { if ((nID 0xFFF0) == IDM_ABOUTBOX) { CAboutDlg dlgAbout; dlgAbout.DoModal(); } else { CDialog OnSysCommand(nID, lParam); } } //----------------------------------------------------------------------------- // OnPaint // If you add a minimize button to your dialog, you will need the code below // to draw the icon. For MFC applications using the document/view model, // this is automatically done for you by the framework. void CDecklinkCaptureDlg OnPaint() { if (IsIconic()) { CPaintDC dc(this); // device context for painting SendMessage(WM_ICONERASEBKGND, reinterpret_cast WPARAM (dc.GetSafeHdc()), 0); // Center icon in client rectangle int cxIcon = GetSystemMetrics(SM_CXICON); int cyIcon = GetSystemMetrics(SM_CYICON); CRect rect; GetClientRect( rect); int x = (rect.Width() - cxIcon + 1) / 2; int y = (rect.Height() - cyIcon + 1) / 2; // Draw the icon dc.DrawIcon(x, y, m_hIcon); } else { CDialog OnPaint(); } } //----------------------------------------------------------------------------- // HandleGraphEvent // At the moment we just read the event, discard it and release memory used to store it. void CDecklinkCaptureDlg HandleGraphEvent(void) { LONG lEventCode, lEventParam1, lEventParam2; if (!m_pMediaEvent) { return; } while (SUCCEEDED(m_pMediaEvent- GetEvent( lEventCode, reinterpret_cast LONG_PTR * ( lEventParam1), reinterpret_cast LONG_PTR * ( lEventParam2), 0))) { // just free memory associated with event m_pMediaEvent- FreeEventParams(lEventCode, lEventParam1, lEventParam2); } } //----------------------------------------------------------------------------- // WindowProc // Have to add our own message handling loop to handle events from the preview video // window and to pass Window events onto it - this is so it redraws itself correctly etc. LRESULT CDecklinkCaptureDlg WindowProc(UINT message, WPARAM wParam, LPARAM lParam) { switch (message) { case WM_GRAPHNOTIFY HandleGraphEvent(); break; } // Pass all msgs to video window. vid window exists as child of static // picture frame. This ensures video window redraws itself etc. if (m_pIVW) { m_pIVW- NotifyOwnerMessage(reinterpret_cast LONG_PTR (m_hWnd) /* from me */, message, wParam, lParam); } return CDialog WindowProc(message, wParam, lParam); } //----------------------------------------------------------------------------- // OnQueryDragIcon // The system calls this function to obtain the cursor to display while the user drags // the minimized window. HCURSOR CDecklinkCaptureDlg OnQueryDragIcon() { return static_cast HCURSOR (m_hIcon); } //----------------------------------------------------------------------------- // CreatePreviewGraph // Create a graph to preview the input // NOTE There are many ways of building graphs, you could opt for the ICaptureGraphBuilder interface which would // make things are lot simpler, however it doesn t always build the most efficient graphs. HRESULT CDecklinkCaptureDlg CreatePreviewGraph() { HRESULT hr = S_OK; if (m_pGraph) { // locate smart-T // NOTE The smart-T appears to hold references to its upstream connections even when its input pin // is diconnected. The smart-T has to be removed from the graph in order to clear these references which // is why the filter is enumerated and added every time the preview graph is built and removed whenever // it is destroyed. ASSERT(NULL == m_pSmartT); hr = CDSUtils AddFilter(m_pGraph, CLSID_SmartTee, L"Smart Tee", m_pSmartT); if (SUCCEEDED(hr)) { // DV preview is slightly different to all other previews if (ENC_DV != m_compressionCtrl.GetItemData(m_compressionCtrl.GetCurSel())) { // uncompressed, mpeg and wm preview // create the following // // Decklink Video Capture - Smart-T - AVI Decompressor - Video Renderer // Decklink Audio Capture - Default Audio Renderer // // render the preview pin on the smart-T filter // first connect the Decklink video capture pin to the smart-T hr = CDSUtils ConnectFilters(m_pGraph, m_pVideoCapture, NULL, m_pSmartT, NULL); if (SUCCEEDED(hr)) { // now connect the preview pin of the smart-T to the video renderer hr = CDSUtils ConnectFilters(m_pGraph, m_pSmartT, L"Preview", m_pVideoRenderer, NULL); } } else { // DV Preview // create the following // // Decklink Video Capture - AVI Decompressor - Smart-T - Colour Space Converter - Video Renderer // Decklink Audio Capture - Default Audio Renderer // // this is a more efficient graph than created by the ICaptureGraphBuilder2 interface // add the AVI decompressor and colour space converter filters CComPtr IBaseFilter pAVIDecompressor = NULL; hr = CDSUtils AddFilter(m_pGraph, CLSID_AVIDec, L"AVI Decompressor", pAVIDecompressor); if (SUCCEEDED(hr)) { CComPtr IBaseFilter pColourSpaceConverter = NULL; hr = CDSUtils AddFilter(m_pGraph, CLSID_Colour, L"Color Space Converter", pColourSpaceConverter); if (SUCCEEDED(hr)) { // conect the Decklink video capture pin to the AVI decompressor hr = CDSUtils ConnectFilters(m_pGraph, m_pVideoCapture, NULL, pAVIDecompressor, NULL); if (SUCCEEDED(hr)) { // connect AVI decompressor to the smart-T hr = CDSUtils ConnectFilters(m_pGraph, pAVIDecompressor, NULL, m_pSmartT, NULL); if (SUCCEEDED(hr)) { // connect the preview pin of the smart-T to the colour space converter hr = CDSUtils ConnectFilters(m_pGraph, m_pSmartT, L"Preview", pColourSpaceConverter, NULL); if (SUCCEEDED(hr)) { // connect the colour space converter to the video renderer hr = CDSUtils ConnectFilters(m_pGraph, pColourSpaceConverter, NULL, m_pVideoRenderer, NULL); } } } } } } } } else { hr = E_POINTER; } if (SUCCEEDED(hr)) { // the video path has been connected, initialise the preview window InitialiseVideoPreview(); // optionally connect the audio path if (FALSE == m_bAudioMute) { // connect the Decklink audio capture pin to the mux hr = CDSUtils RenderFilter(m_pGraph, m_pAudioCapture, L"Capture"); } // run the graph so that we can preview the input video if (m_pControl) { hr = m_pControl- Run(); } else { hr = E_POINTER; } } return hr; } //----------------------------------------------------------------------------- // CreateCaptureGraph // Create a graph to capture the input HRESULT CDecklinkCaptureDlg CreateCaptureGraph() { HRESULT hr = S_OK; // tack the file writer onto the preview graph if (m_pGraph m_pControl) { // stop the graph as we are about to modify it m_pControl- Stop(); // remove the default audio renderer so the Decklink audio capture filter // can be connected to the AVI mux, we will not preview audio whilst capturing CComPtr IPin pIPinOutput = NULL; hr = CDSUtils GetPin(m_pAudioCapture, L"Capture", pIPinOutput); if (SUCCEEDED(hr)) { // to disconnect both pins must be disconnected // find the pin connected to the Decklink audio capture pin CComPtr IPin pIPinConnection = NULL; hr = pIPinOutput- ConnectedTo( pIPinConnection); if (SUCCEEDED(hr)) { // disconnect the pins hr = m_pGraph- Disconnect(pIPinOutput); hr = m_pGraph- Disconnect(pIPinConnection); // get the owning filter of the downstream pin and remove it from the graph PIN_INFO pinInfo = {0}; hr = pIPinConnection- QueryPinInfo( pinInfo); if (SUCCEEDED(hr)) { if (pinInfo.pFilter) { hr = m_pGraph- RemoveFilter(pinInfo.pFilter); pinInfo.pFilter- Release(); } } } } // retrieve the capture filename m_captureFileCtrl.GetWindowText(m_captureFile); // store filename USES_CONVERSION; WCHAR captureFile[MAX_PATH]; wcsncpy(captureFile, A2W(m_captureFile), MAX_PATH); EXECUTE_ASSERT(ERROR_SUCCESS == m_regUtils.SetString("CaptureFile", reinterpret_cast const BYTE* (captureFile), sizeof(captureFile))); // decide the type of capture graph to build switch (m_compressionCtrl.GetItemData(m_compressionCtrl.GetCurSel())) { default case ENC_NONE hr = CreateUncompressedCaptureGraph(); break; case ENC_DV hr = CreateDVCaptureGraph(); break; case ENC_WM hr = CreateWMCaptureGraph(); break; } if (FAILED(hr)) { // there was a problem building the capture graph, issue a message // and rebuild preview graph char buffer[128]; StringCbPrintfA(buffer, sizeof(buffer), "The error 0x%08lx was detected when creating the capture graph with the following file name \r\n\r\n %s ", hr, m_captureFile); MessageBox(buffer, _T("Error"), MB_ICONERROR); OnBnClickedButtonStop();// destroy broken capture graph, build preview graph and enable controls } } else { hr = E_POINTER; } return hr; } //----------------------------------------------------------------------------- // CreateUncompressedCaptureGraph // Create an optimum uncompressed capture graph HRESULT CDecklinkCaptureDlg CreateUncompressedCaptureGraph() { HRESULT hr = S_OK; // uncompressed capture // locate the AVI mux and file writer filters and add them to the graph CComPtr IBaseFilter pAVIMux = NULL; hr = CDSUtils AddFilter(m_pGraph, CLSID_AviDest , L"AVI Mux", pAVIMux); if (SUCCEEDED(hr)) { CComPtr IBaseFilter pFileWriter = NULL; hr = CDSUtils AddFilter(m_pGraph, CLSID_FileWriter, L"File writer", pFileWriter); if (SUCCEEDED(hr)) { // set the output filename CComQIPtr IFileSinkFilter, IID_IFileSinkFilter pIFS = pFileWriter; if (pIFS) { USES_CONVERSION;// for T2W macro hr = pIFS- SetFileName(T2W(m_captureFile), NULL); if (SUCCEEDED(hr)) { // connect the smart-T capture pin to the mux hr = CDSUtils ConnectFilters(m_pGraph, m_pSmartT, L"Capture", pAVIMux, NULL); if (SUCCEEDED(hr)) { // connect the mux to the file writer hr = CDSUtils ConnectFilters(m_pGraph, pAVIMux, NULL, pFileWriter, NULL); if (SUCCEEDED(hr)) { // video path connected now optionally connect the audio path if (FALSE == m_bAudioMute) { // connect the Decklink audio capture pin to the mux hr = CDSUtils ConnectFilters(m_pGraph, m_pAudioCapture, L"Capture", pAVIMux, NULL); } if (SUCCEEDED(hr)) { m_pControl- Run(); } } } } } } } return hr; } //----------------------------------------------------------------------------- // CreateDVCaptureGraph // Create an optimum DV capture graph // NOTE that this will only work for SD HRESULT CDecklinkCaptureDlg CreateDVCaptureGraph() { HRESULT hr = S_OK; // locate the DV encoder, AVI mux and file writer filters and add them to the graph CComPtr IBaseFilter pDVEncoder = NULL; hr = CDSUtils AddFilter(m_pGraph, CLSID_DVVideoEnc, L"DV Video Encoder", pDVEncoder); if (SUCCEEDED(hr)) { CComPtr IBaseFilter pAVIMux = NULL; hr = CDSUtils AddFilter(m_pGraph, CLSID_AviDest , L"AVI Mux", pAVIMux); if (SUCCEEDED(hr)) { CComPtr IBaseFilter pFileWriter = NULL; hr = CDSUtils AddFilter(m_pGraph, CLSID_FileWriter, L"File writer", pFileWriter); if (SUCCEEDED(hr)) { // set the output filename CComQIPtr IFileSinkFilter, IID_IFileSinkFilter pIFS = pFileWriter; if (pIFS) { USES_CONVERSION;// for T2W macro hr = pIFS- SetFileName(T2W(m_captureFile), NULL); if (SUCCEEDED(hr)) { // configure the DV encoder CComQIPtr IDVEnc, IID_IDVEnc pIDV = pDVEncoder; if (pIDV) { // located a DV compression filter, set the format int videoFormat, dvFormat, resolution; hr = pIDV- get_IFormatResolution( videoFormat, dvFormat, resolution, FALSE, NULL); if (SUCCEEDED(hr)) { ASSERT(DVENCODERFORMAT_DVSD == dvFormat); ASSERT(DVENCODERRESOLUTION_720x480 == resolution); if ((DVENCODERVIDEOFORMAT_NTSC == videoFormat) (576 == m_vihDefault.bmiHeader.biHeight)) { // set the encoder to PAL if its NTSC videoFormat = DVENCODERVIDEOFORMAT_PAL; hr = pIDV- put_IFormatResolution(videoFormat, dvFormat, resolution, FALSE, NULL); } else if ((DVENCODERVIDEOFORMAT_PAL == videoFormat) (486 == m_vihDefault.bmiHeader.biHeight)) { // set the encoder to NTSC if its PAL videoFormat = DVENCODERVIDEOFORMAT_NTSC; hr = pIDV- put_IFormatResolution(videoFormat, dvFormat, resolution, FALSE, NULL); } } } if (SUCCEEDED(hr)) { // if the format is PAL, insert the Decklink field swap filter, PAL DV is the opposite // field order to PAL SD if (576 == m_vihDefault.bmiHeader.biHeight) { CComPtr IBaseFilter pPALFieldSwap = NULL; hr = CDSUtils AddFilter(m_pGraph, CLSID_DecklinkFieldSwap, L"Decklink PAL Field Swap", pPALFieldSwap); if (SUCCEEDED(hr)) { // connect the smart-T capture pin to the PAL field swap filter hr = CDSUtils ConnectFilters(m_pGraph, m_pSmartT, L"Capture", pPALFieldSwap, NULL); if (SUCCEEDED(hr)) { // connect the field swap filter to the DV encoder hr = CDSUtils ConnectFilters(m_pGraph, pPALFieldSwap, NULL, pDVEncoder, NULL); } } } else { // connect the smart-T capture pin to the DV Encoder hr = CDSUtils ConnectFilters(m_pGraph, m_pSmartT, L"Capture", pDVEncoder, NULL); } if (SUCCEEDED(hr)) { // connect the DV encoder output to the AVI mux hr = CDSUtils ConnectFilters(m_pGraph, pDVEncoder, NULL, pAVIMux, NULL); if (SUCCEEDED(hr)) { // connect the mux to the file writer hr = CDSUtils ConnectFilters(m_pGraph, pAVIMux, NULL, pFileWriter, NULL); if (SUCCEEDED(hr)) { // video path connected now optionally connect the audio path if (FALSE == m_bAudioMute) { // connect the Decklink audio capture pin to the mux hr = CDSUtils ConnectFilters(m_pGraph, m_pAudioCapture, L"Capture", pAVIMux, NULL); } if (SUCCEEDED(hr)) { m_pControl- Run(); } } } } } } } } } } return hr; } //----------------------------------------------------------------------------- // CreateWMCaptureGraph // Create an optimum Windows Media capture graph HRESULT CDecklinkCaptureDlg CreateWMCaptureGraph() { HRESULT hr = S_OK; // locate the asf writer filter and add it to the graph CComPtr IBaseFilter pASFWriter = NULL; hr = CDSUtils AddFilter(m_pGraph, CLSID_WMAsfWriter, L"WM ASF Writer", pASFWriter); if (SUCCEEDED(hr)) { // set the output filename CComQIPtr IFileSinkFilter, IID_IFileSinkFilter pIFS = pASFWriter; if (pIFS) { USES_CONVERSION;// for T2W macro hr = pIFS- SetFileName(T2W(m_captureFile), NULL); if (SUCCEEDED(hr)) { hr = ConfigureWMEncoder(pASFWriter); } } if (SUCCEEDED(hr)) { if (FALSE == m_bAudioMute) { // connect the Decklink audio capture pin to the ASF writer hr = CDSUtils ConnectFilters(m_pGraph, m_pAudioCapture, pASFWriter, MEDIATYPE_Audio); } if (SUCCEEDED(hr)) { // connect the smart-T capture pin to the ASF writer hr = CDSUtils ConnectFilters(m_pGraph, m_pSmartT, pASFWriter, MEDIATYPE_Video); if (SUCCEEDED(hr)) { m_pControl- Run(); } } } } return hr; } //----------------------------------------------------------------------------- // ConfigureWMEncoder // Configure the Windows Media encoder HRESULT CDecklinkCaptureDlg ConfigureWMEncoder(IBaseFilter* pASFWriter) { HRESULT hr = S_OK; // modify the video output resolution of a system profile if (pASFWriter) { // simple system profile encoding CComQIPtr IConfigAsfWriter, IID_IConfigAsfWriter pICW = pASFWriter; if (pICW) { //NOTE You could just use the following for a default system profile //hr = pICW- ConfigureFilterUsingProfileGuid(WMProfile_XXX);// RE wmsysprf.h //NOTE If you want video only capture you must modify the profile to remove the audio // otherwise encoding will fail // Load a system profile and modify the resolution of the video output // NOTE The scope of the encoding is enormous, this just demonstrates how to change // the output video resolution from 320x240 to something larger. // Changing the resolution affects coding performance, it is likely that the encoder will // start to drop frames after a while. Using WM9 codecs will probably improve performance // and that has been left to the reader... ;o) // // get a profile manager CComPtr IWMProfileManager pIWMProfileManager = NULL; hr = WMCreateProfileManager( pIWMProfileManager); if (SUCCEEDED(hr)) { // load a system profile to modify CComPtr IWMProfile pIWMProfile = NULL; // NOTE Any WMProfile_XXX could be used here, or create a custom profile from scratch hr = pIWMProfileManager- LoadProfileByID(WMProfile_V80_FAIRVBRVideo, pIWMProfile); if (SUCCEEDED(hr)) { // search the streams for the video stream and attempt to modify the video size DWORD cbStreams = 0; hr = pIWMProfile- GetStreamCount( cbStreams); if (SUCCEEDED(hr)) { IWMStreamConfig* pIWMStreamConfig = NULL; GUID streamType = {0}; DWORD stream; if (m_bAudioMute) { // remove the audio stream for video only capture for (stream=0; stream cbStreams; ++stream) { hr = pIWMProfile- GetStream(stream, pIWMStreamConfig); if (SUCCEEDED(hr)) { hr = pIWMStreamConfig- GetStreamType( streamType); if (SUCCEEDED(hr)) { if (MEDIATYPE_Audio == streamType) { if (SUCCEEDED(pIWMProfile- RemoveStream(pIWMStreamConfig))) { --cbStreams; } SAFE_RELEASE(pIWMStreamConfig); break; } } } } } for (stream=0; stream cbStreams; ++stream) { hr = pIWMProfile- GetStream(stream, pIWMStreamConfig); if (SUCCEEDED(hr)) { hr = pIWMStreamConfig- GetStreamType( streamType); if (SUCCEEDED(hr) (MEDIATYPE_Video == streamType)) { // found the video stream CComQIPtr IWMMediaProps, IID_IWMMediaProps pIWMMediaProps = pIWMStreamConfig; if (pIWMMediaProps) { // get the size of the media type WM_MEDIA_TYPE* pMediaType = NULL; DWORD cbMediaType = 0; hr = pIWMMediaProps- GetMediaType(pMediaType, cbMediaType); if (SUCCEEDED(hr)) { pMediaType = (WM_MEDIA_TYPE*)new char [cbMediaType]; if (pMediaType) { hr = pIWMMediaProps- GetMediaType(pMediaType, cbMediaType); if (SUCCEEDED(hr)) { BITMAPINFOHEADER* pbmih = NULL; if (WMFORMAT_VideoInfo == pMediaType- formattype) { WMVIDEOINFOHEADER* pvih = (WMVIDEOINFOHEADER*)pMediaType- pbFormat; pbmih = pvih- bmiHeader; } else if (WMFORMAT_MPEG2Video == pMediaType- formattype) { WMVIDEOINFOHEADER2* pvih = (WMVIDEOINFOHEADER2*) ((WMMPEG2VIDEOINFO*)pMediaType- pbFormat)- hdr; pbmih = pvih- bmiHeader; } if (pbmih) { // modify the video dimensions, set the property, reconfigure the stream // and then configure the ASF writer with this modified profile pbmih- biWidth = 640;// was 320; pbmih- biHeight = 480;// was 240; pbmih- biSizeImage = pbmih- biWidth * pbmih- biHeight * pbmih- biBitCount / 8;// NOTE This calculation is not correct for all bit depths hr = pIWMMediaProps- SetMediaType(pMediaType); if (SUCCEEDED(hr)) { // config the ASF writer filter to use this modified system profile hr = pIWMProfile- ReconfigStream(pIWMStreamConfig); if (SUCCEEDED(hr)) { hr = pICW- ConfigureFilterUsingProfile(pIWMProfile); } } } } delete [] (char*)pMediaType; } } } } SAFE_RELEASE(pIWMStreamConfig); } } } } } /* // modify other ASF writer properties IServiceProvider* pProvider = NULL; hr = pASFWriter- QueryInterface(IID_IServiceProvider, reinterpret_cast void** ( pProvider)); if (SUCCEEDED(hr)) { IID_IWMWriterAdvanced2* pWMWA2 = NULL; hr = pProvider- QueryService(IID_IID_IWMWriterAdvanced2, IID_IID_IWMWriterAdvanced2, reinterpret_cast void** ( pWMWA2)); if (SUCCEEDED(hr)) { // set the deinterlace mode pWMWA2- GetInputSetting(...); SAFE_RELEASE(pWMWA2); } SAFE_RELEASE(pProvider); } */ } } else { hr = E_INVALIDARG; } return hr; } //----------------------------------------------------------------------------- // DestroyGraph // Remove all intermediate filters, keep any Decklink and video render filters as // these are used by all the graphs. HRESULT CDecklinkCaptureDlg DestroyGraph() { HRESULT hr = S_OK; if (m_pGraph m_pControl) { m_pControl- Stop(); // release our outstanding reference on this filter so it can be removed from the graph SAFE_RELEASE(m_pSmartT); // retrieve the name of the capture device, don t remove it in this method PWSTR pNameVideoCapture = (PWSTR)m_videoDeviceCtrl.GetItemData(m_videoDeviceCtrl.GetCurSel()); PWSTR pNameAudioCapture = (PWSTR)m_audioDeviceCtrl.GetItemData(m_audioDeviceCtrl.GetCurSel()); CComPtr IEnumFilters pEnum = NULL; hr = m_pGraph- EnumFilters( pEnum); if (SUCCEEDED(hr)) { IBaseFilter* pFilter = NULL; while (S_OK == pEnum- Next(1, pFilter, NULL)) { FILTER_INFO filterInfo = {0}; hr = pFilter- QueryFilterInfo( filterInfo); if (SUCCEEDED(hr)) { SAFE_RELEASE(filterInfo.pGraph); if ((NULL == wcsstr(filterInfo.achName, pNameVideoCapture)) (NULL == wcsstr(filterInfo.achName, pNameAudioCapture)) (NULL == wcsstr(filterInfo.achName, L"Video Renderer"))) { hr = m_pGraph- RemoveFilter(pFilter); if (SUCCEEDED(hr)) { hr = pEnum- Reset(); } } } SAFE_RELEASE(pFilter); } } } else { hr = E_POINTER; } return hr; } //----------------------------------------------------------------------------- // InitialiseVideoPreview // In short get the video screen renderer to draw into the picture control, which is our preview window // the following code sets this up, in addition to adding the HandleGraphEvent and WindowProc methods // read the DXSDK docos for more detailed information void CDecklinkCaptureDlg InitialiseVideoPreview(void) { // modify the preview window if (m_pVideoRenderer) { if (NULL == m_pIVW) { if (SUCCEEDED(m_pVideoRenderer- QueryInterface(IID_IVideoWindow, reinterpret_cast void** ( m_pIVW)))) { // get the window to handle redraws, etc // Set msg drain of VideoWindow to point to our dialog window. The dialog s // window procedure then handles events from the VideoWindow. HRESULT hr = m_pIVW- put_MessageDrain(reinterpret_cast OAHWND (m_hWnd)); if (NULL == m_pMediaEvent) { // Make graph send WM_GRAPHNOTIFY when it wants our attention see "Learning // When an Event Occurs" in the DX9 documentation. hr = m_pGraph- QueryInterface(IID_IMediaEventEx, reinterpret_cast void** ( m_pMediaEvent)); if (SUCCEEDED(hr)) { hr = m_pMediaEvent- SetNotifyWindow(reinterpret_cast OAHWND (m_hWnd), WM_GRAPHNOTIFY, 0); } // object created for it. RECT rc; m_preview.GetClientRect( rc); m_pIVW- SetWindowPosition(rc.left, rc.top, rc.right - rc.left, rc.bottom - rc.top); // VideoWindow is a child window of the bounding rect hr = m_pIVW- put_WindowStyle(WS_CHILD); hr = m_pIVW- put_Owner(reinterpret_cast OAHWND (m_preview.GetSafeHwnd())); hr = m_pIVW- SetWindowForeground(-1); } } } } } //----------------------------------------------------------------------------- // PopulateDeviceControl // Fill device combo box with available devices of the specified category HRESULT CDecklinkCaptureDlg PopulateDeviceControl(const GUID* pCategory, CComboBox* pCtrl) { HRESULT hr = S_OK; if (pCategory pCtrl) { // first enumerate the system devices for the specifed class and filter name CComPtr ICreateDevEnum pSysDevEnum = NULL; hr = CoCreateInstance(CLSID_SystemDeviceEnum, NULL, CLSCTX_INPROC_SERVER, IID_ICreateDevEnum, reinterpret_cast void** ( pSysDevEnum)); if (SUCCEEDED(hr)) { CComPtr IEnumMoniker pEnumCat = NULL; hr = pSysDevEnum- CreateClassEnumerator(*pCategory, pEnumCat, 0); if (S_OK == hr) { IMoniker* pMoniker = NULL; bool Loop = true; while ((S_OK == pEnumCat- Next(1, pMoniker, NULL)) Loop) { IPropertyBag* pPropBag = NULL; hr = pMoniker- BindToStorage(0, 0, IID_IPropertyBag, reinterpret_cast void** ( pPropBag)); if (SUCCEEDED(hr)) { VARIANT varName; VariantInit( varName); hr = pPropBag- Read(L"FriendlyName", varName, 0); if (SUCCEEDED(hr)) { size_t len = wcslen(varName.bstrVal) + 1; PWSTR pName = new WCHAR [len]; StringCchCopyW(pName, len, varName.bstrVal); CW2AEX buf(varName.bstrVal); pCtrl- SetItemData(pCtrl- AddString(buf), (DWORD)pName); } VariantClear( varName); // contained within a loop, decrement the reference count SAFE_RELEASE(pPropBag); } SAFE_RELEASE(pMoniker); } } } } else { hr = E_POINTER; } return hr; } //----------------------------------------------------------------------------- // PopulateVideoControl // Fill video format combo box with supported video formats using the IAMStreamConfig // interface. HRESULT CDecklinkCaptureDlg PopulateVideoControl() { HRESULT hr = S_OK; if (m_pVideoCapture) { // free mediatypes attached to format controls int count = m_videoFormatCtrl.GetCount(); if (count) { for (int item=0; item count; ++item) { DeleteMediaType((AM_MEDIA_TYPE*)m_videoFormatCtrl.GetItemData(item)); } m_videoFormatCtrl.ResetContent(); } // locate the video capture pin and QI for stream control CComPtr IAMStreamConfig pISC = NULL; hr = CDSUtils FindPinInterface(m_pVideoCapture, MEDIATYPE_Video, PINDIR_OUTPUT, IID_IAMStreamConfig, reinterpret_cast void** ( pISC)); if (SUCCEEDED(hr)) { // loop through all the capabilities (video formats) and populate the control int count, size; hr = pISC- GetNumberOfCapabilities( count, size); if (SUCCEEDED(hr)) { if (sizeof(VIDEO_STREAM_CONFIG_CAPS) == size) { AM_MEDIA_TYPE* pmt = NULL; VIDEO_STREAM_CONFIG_CAPS vscc; VIDEOINFOHEADER* pvih = NULL; for (int index=0; index count; ++index) { hr = pISC- GetStreamCaps(index, pmt, reinterpret_cast BYTE* ( vscc)); if (SUCCEEDED(hr)) { char buffer[128]; WORD PixelFormat; float FrameRate; ZeroMemory(buffer, sizeof(buffer)); pvih = (VIDEOINFOHEADER*)pmt- pbFormat; char* pPixelFormatLUT[] = {"4 2 2", "4 4 4"}; if (pvih- bmiHeader.biBitCount == 16) PixelFormat = 8; else if (pvih- bmiHeader.biBitCount == 20) PixelFormat = 10; else PixelFormat = pvih- bmiHeader.biBitCount; // provide a useful description of the formats if (486 == pvih- bmiHeader.biHeight) { if (417083 == pvih- AvgTimePerFrame) { StringCbPrintfA(buffer, sizeof(buffer), "NTSC %d-bit %s (3 2 pulldown removal)", PixelFormat, pPixelFormatLUT[(30 == PixelFormat)]); } else { StringCbPrintfA(buffer, sizeof(buffer), "NTSC %d-bit %s", PixelFormat, pPixelFormatLUT[(30 == PixelFormat)]); } } else if (576 == pvih- bmiHeader.biHeight) { StringCbPrintfA(buffer, sizeof(buffer), "PAL %d-bit %s", PixelFormat, pPixelFormatLUT[(30 == PixelFormat)]); } else { char* pFrameRateFormat[] = {"%.2f", "%.0f"}; FrameRate = (float)(long)UNITS / pvih- AvgTimePerFrame; if ((720 == pvih- bmiHeader.biHeight) (59.94 FrameRate)) { if ((FrameRate - (int)FrameRate) 0.01) { StringCbPrintfA(buffer, sizeof(buffer), "HD720 %.2fp %d-bit %s (Overcranked 60p)", FrameRate, PixelFormat, pPixelFormatLUT[(30 == PixelFormat)]); } else { StringCbPrintfA(buffer, sizeof(buffer), "HD720 %.0fp %d-bit %s (Overcranked 60p)", FrameRate, PixelFormat, pPixelFormatLUT[(30 == PixelFormat)]); } } else if ((720 == pvih- bmiHeader.biHeight) (59.94 = FrameRate)) { if ((FrameRate - (int)FrameRate) 0.01) { StringCbPrintfA(buffer, sizeof(buffer), "HD720 %.2fp %d-bit %s", FrameRate, PixelFormat, pPixelFormatLUT[(30 == PixelFormat)]); } else { StringCbPrintfA(buffer, sizeof(buffer), "HD720 %.0fp %d-bit %s", FrameRate, PixelFormat, pPixelFormatLUT[(30 == PixelFormat)]); } } else if ((1080 == pvih- bmiHeader.biHeight) (50.00 = FrameRate)) { if ((FrameRate - (int)FrameRate) 0.01) { StringCbPrintfA(buffer, sizeof(buffer), "HD1080 %.2fi %d-bit %s", FrameRate, PixelFormat, pPixelFormatLUT[(30 == PixelFormat)]); } else { StringCbPrintfA(buffer, sizeof(buffer), "HD1080 %.0fi %d-bit %s", FrameRate, PixelFormat, pPixelFormatLUT[(30 == PixelFormat)]); } } else { if ((FrameRate - (int)FrameRate) 0.01) { StringCbPrintfA(buffer, sizeof(buffer), "HD1080 %.2fPsF %d-bit %s", FrameRate, PixelFormat, pPixelFormatLUT[(30 == PixelFormat)]); } else { StringCbPrintfA(buffer, sizeof(buffer), "HD1080 %.0fPsF %d-bit %s", FrameRate, PixelFormat, pPixelFormatLUT[(30 == PixelFormat)]); } } } // add the item description to combo box int n = m_videoFormatCtrl.AddString(buffer); // store media type pointer in item s data section m_videoFormatCtrl.SetItemData(n, (DWORD_PTR)pmt); // set default format if ((pvih- AvgTimePerFrame == m_vihDefault.AvgTimePerFrame) (pvih- bmiHeader.biWidth == m_vihDefault.bmiHeader.biWidth) (pvih- bmiHeader.biHeight == m_vihDefault.bmiHeader.biHeight) (pvih- bmiHeader.biBitCount == m_vihDefault.bmiHeader.biBitCount)) { m_videoFormatCtrl.SetCurSel(n); pISC- SetFormat(pmt); } } } } else { m_videoFormatCtrl.AddString("ERROR Unable to retrieve video formats"); } } } } else { hr = E_POINTER; } return hr; } //----------------------------------------------------------------------------- // PopulateAudioControl // Fill audio format combo box with supported audio formats using the IAMStreamConfig // interface. HRESULT CDecklinkCaptureDlg PopulateAudioControl() { HRESULT hr = S_OK; if (m_pAudioCapture) { // free mediatypes attached to format controls int count = m_audioFormatCtrl.GetCount(); if (count) { for (int item=0; item count; ++item) { DeleteMediaType((AM_MEDIA_TYPE*)m_audioFormatCtrl.GetItemData(item)); } m_audioFormatCtrl.ResetContent(); } // locate the audio capture pin and QI for stream control CComPtr IAMStreamConfig pISC = NULL; hr = CDSUtils FindPinInterface(m_pAudioCapture, MEDIATYPE_Audio, PINDIR_OUTPUT, IID_IAMStreamConfig, reinterpret_cast void** ( pISC)); if (SUCCEEDED(hr)) { // loop through all the capabilities (audio formats) and populate the control int count, size; hr = pISC- GetNumberOfCapabilities( count, size); if (SUCCEEDED(hr)) { if (sizeof(AUDIO_STREAM_CONFIG_CAPS) == size) { AM_MEDIA_TYPE* pmt = NULL; AUDIO_STREAM_CONFIG_CAPS ascc; WAVEFORMATEX* pwfex = NULL; for (int index=0; index count; ++index) { hr = pISC- GetStreamCaps(index, pmt, reinterpret_cast BYTE* ( ascc)); if (SUCCEEDED(hr)) { char buffer[32]; ZeroMemory(buffer, sizeof(buffer)); pwfex = (WAVEFORMATEX*)pmt- pbFormat; // provide a useful description of the formats if (1 == pwfex- nChannels) { StringCbPrintfA(buffer, sizeof(buffer), "%d channel, %2.1fkHz, %d-bit", (int)pwfex- nChannels, (float)pwfex- nSamplesPerSec / 1000, (int)pwfex- wBitsPerSample); } else { StringCbPrintfA(buffer, sizeof(buffer), "%d channels, %2.1fkHz, %d-bit", (int)pwfex- nChannels, (float)pwfex- nSamplesPerSec / 1000, (int)pwfex- wBitsPerSample); } // add the item description to combo box int n = m_audioFormatCtrl.AddString(buffer); // store media type pointer in item s data section m_audioFormatCtrl.SetItemData(n, (DWORD_PTR)pmt); // set default format if ((pwfex- wFormatTag == m_wfexDefault.wFormatTag) (pwfex- nChannels == m_wfexDefault.nChannels) (pwfex- nSamplesPerSec == m_wfexDefault.nSamplesPerSec) (pwfex- nAvgBytesPerSec == m_wfexDefault.nAvgBytesPerSec)) { m_audioFormatCtrl.SetCurSel(n); pISC- SetFormat(pmt); } } } } else { m_audioFormatCtrl.AddString("ERROR Unable to retrieve audio formats"); } } } } else { hr = E_POINTER; } return hr; } //----------------------------------------------------------------------------- // PopulateCompressionControl // Fill compression control with a selection of video compressors, locate the // encoders and add them to the combo box if they exist. HRESULT CDecklinkCaptureDlg PopulateCompressionControl() { int n = m_compressionCtrl.AddString("Uncompressed"); m_compressionCtrl.SetItemData(n, (DWORD_PTR)ENC_NONE); // search for the DV encoder, MPEG encoder and WM encoder IBaseFilter* pFilter = NULL; HRESULT hr = CoCreateInstance(CLSID_DVVideoEnc, 0, CLSCTX_INPROC_SERVER, IID_IBaseFilter, reinterpret_cast void** ( pFilter)); if (SUCCEEDED(hr)) { n = m_compressionCtrl.SetCurSel(m_compressionCtrl.AddString("DV Video Encoder")); m_compressionCtrl.SetItemData(n, (DWORD_PTR)ENC_DV); SAFE_RELEASE(pFilter); } hr = CoCreateInstance(CLSID_WMAsfWriter, 0, CLSCTX_INPROC_SERVER, IID_IBaseFilter, reinterpret_cast void** ( pFilter)); if (SUCCEEDED(hr)) { n = m_compressionCtrl.SetCurSel(m_compressionCtrl.AddString("Windows Media Encoder")); m_compressionCtrl.SetItemData(n, (DWORD_PTR)ENC_WM); SAFE_RELEASE(pFilter); } m_compressionCtrl.SetCurSel(m_compressor); return S_OK; } //----------------------------------------------------------------------------- // OnCbnSelchangeComboVideodevice // Rebuild graph with selected capture device void CDecklinkCaptureDlg OnCbnSelchangeComboVideodevice() { SAFE_RELEASE(m_pVideoCapture);// release our outstanding reference // remove intermediate filters, since the device selection has changed the capture device will also be removed HRESULT hr = DestroyGraph(); if (SUCCEEDED(hr)) { // rebuild graph with new capture device selection PWSTR pName = (PWSTR)m_videoDeviceCtrl.GetItemData(m_videoDeviceCtrl.GetCurSel()); if (pName) { hr = CDSUtils AddFilter2(m_pGraph, CLSID_VideoInputDeviceCategory, pName, m_pVideoCapture); if (SUCCEEDED(hr)) { // as the device has changed get the current operating format so that the control // and display this as the current selection CComPtr IAMStreamConfig pISC = NULL; hr = CDSUtils FindPinInterface(m_pVideoCapture, MEDIATYPE_Video, PINDIR_OUTPUT, IID_IAMStreamConfig, reinterpret_cast void** ( pISC)); if (SUCCEEDED(hr)) { // get the current format of the device to set the current selection of the control AM_MEDIA_TYPE* pamt = NULL; hr = pISC- GetFormat( pamt); if (SUCCEEDED(hr)) { if (pamt- pbFormat) { m_vihDefault = *(VIDEOINFOHEADER*)pamt- pbFormat; } DeleteMediaType(pamt); } } hr = PopulateVideoControl();// repopulate the control with formats from the new device if (SUCCEEDED(hr)) { hr = CreatePreviewGraph();// rebuild the graph with the new device } } } else { hr = E_POINTER; } } } //----------------------------------------------------------------------------- // OnCbnSelchangeComboAudiodevice // Rebuild graph with selected capture device void CDecklinkCaptureDlg OnCbnSelchangeComboAudiodevice() { SAFE_RELEASE(m_pAudioCapture);// release our outstanding reference // remove intermediate filters, since the device selection has changed the capture device will also be removed HRESULT hr = DestroyGraph(); if (SUCCEEDED(hr)) { PWSTR pName = (PWSTR)m_audioDeviceCtrl.GetItemData(m_audioDeviceCtrl.GetCurSel()); if (pName) { hr = CDSUtils AddFilter2(m_pGraph, CLSID_AudioInputDeviceCategory, pName, m_pAudioCapture); if (SUCCEEDED(hr)) { // as the device has changed get the current operating format so that the control // and display this as the current selection CComPtr IAMStreamConfig pISC = NULL; hr = CDSUtils FindPinInterface(m_pAudioCapture, MEDIATYPE_Audio, PINDIR_OUTPUT, IID_IAMStreamConfig, reinterpret_cast void** ( pISC)); if (SUCCEEDED(hr)) { // get the current format of the device to set the current selection of the control AM_MEDIA_TYPE* pamt = NULL; hr = pISC- GetFormat( pamt); if (SUCCEEDED(hr)) { if (pamt- pbFormat) { m_wfexDefault = *(WAVEFORMATEX*)pamt- pbFormat; } DeleteMediaType(pamt); } } hr = PopulateAudioControl();// repopulate the control with formats from the new device if (SUCCEEDED(hr)) { hr = CreatePreviewGraph();// rebuild the graph with the new device } } } else { hr = E_POINTER; } } } //----------------------------------------------------------------------------- // OnCbnSelchangeComboVideoformats // Rebuild preview graph if format selection changed void CDecklinkCaptureDlg OnCbnSelchangeComboVideoformats() { HRESULT hr = DestroyGraph(); if (SUCCEEDED(hr)) { // locate the video capture pin and QI for stream control CComPtr IAMStreamConfig pISC = NULL; hr = CDSUtils FindPinInterface(m_pVideoCapture, MEDIATYPE_Video, PINDIR_OUTPUT, IID_IAMStreamConfig, reinterpret_cast void** ( pISC)); if (SUCCEEDED(hr)) { // set the new media format AM_MEDIA_TYPE* pmt = (AM_MEDIA_TYPE*)m_videoFormatCtrl.GetItemData(m_videoFormatCtrl.GetCurSel()); m_vihDefault = *(VIDEOINFOHEADER*)pmt- pbFormat; ASSERT(sizeof(VIDEOINFOHEADER) = pmt- cbFormat); hr = pISC- SetFormat(pmt); if (SUCCEEDED(hr)) { // save the new format EXECUTE_ASSERT(ERROR_SUCCESS == m_regUtils.SetBinary("VideoFormat", reinterpret_cast const BYTE* ( m_vihDefault), sizeof(m_vihDefault))); // update compression control, we don t have an HD compression filter so disable compression for HD formats if (576 m_vihDefault.bmiHeader.biHeight) { m_compressor = 0; m_compressionCtrl.SetCurSel(m_compressor); // save the new state EXECUTE_ASSERT(ERROR_SUCCESS == m_regUtils.SetBinary("VideoCompressor", reinterpret_cast const BYTE* ( m_compressor), sizeof(m_compressor))); m_bEnableCompressionCtrl = FALSE; } else { m_bEnableCompressionCtrl = TRUE; } EnableControls(); // rebuild the graph hr = CreatePreviewGraph(); } } } } //----------------------------------------------------------------------------- // OnCbnSelchangeComboAudioformats // Rebuild preview graph if format selection changed void CDecklinkCaptureDlg OnCbnSelchangeComboAudioformats() { HRESULT hr = DestroyGraph(); if (SUCCEEDED(hr)) { // locate the audio capture pin and QI for stream control CComPtr IAMStreamConfig pISC = NULL; hr = CDSUtils FindPinInterface(m_pAudioCapture, MEDIATYPE_Audio, PINDIR_OUTPUT, IID_IAMStreamConfig, reinterpret_cast void** ( pISC)); if (SUCCEEDED(hr)) { // set the new media format AM_MEDIA_TYPE* pmt = (AM_MEDIA_TYPE*)m_audioFormatCtrl.GetItemData(m_audioFormatCtrl.GetCurSel()); m_wfexDefault = *(WAVEFORMATEX*)pmt- pbFormat; ASSERT(sizeof(WAVEFORMATEX) == pmt- cbFormat); hr = pISC- SetFormat(pmt); if (SUCCEEDED(hr)) { // save the new format EXECUTE_ASSERT(ERROR_SUCCESS == m_regUtils.SetBinary("AudioFormat", reinterpret_cast const BYTE* ( m_wfexDefault), sizeof(m_wfexDefault))); // rebuild the graph hr = CreatePreviewGraph(); } } } } //----------------------------------------------------------------------------- // OnCbnSelchangeComboCompression // Rebuild preview graph if compression selection changed void CDecklinkCaptureDlg OnCbnSelchangeComboCompression() { HRESULT hr = DestroyGraph(); if (SUCCEEDED(hr)) { // save the new state m_compressor = m_compressionCtrl.GetCurSel(); EXECUTE_ASSERT(ERROR_SUCCESS == m_regUtils.SetBinary("VideoCompressor", reinterpret_cast const BYTE* ( m_compressor), sizeof(m_compressor))); // rebuild the graph hr = CreatePreviewGraph(); } } //----------------------------------------------------------------------------- // OnBnClickedCheckAudiomute // Rebuild the capture graph to reflect the new audio setting void CDecklinkCaptureDlg OnBnClickedCheckAudiomute() { CButton* pCheck = (CButton*)GetDlgItem(IDC_CHECK_AUDIOMUTE); if (pCheck) { m_bAudioMute = pCheck- GetState() 0x0003; HRESULT hr = DestroyGraph(); if (SUCCEEDED(hr)) { // save the new state EXECUTE_ASSERT(ERROR_SUCCESS == m_regUtils.SetBinary("AudioMute", reinterpret_cast const BYTE* ( m_bAudioMute), sizeof(m_bAudioMute))); // rebuild the graph which reflects the new audio setting hr = CreatePreviewGraph(); } } } //----------------------------------------------------------------------------- // OnBnClickedButtonBrowse // Create a file open dialog to browse for a file location void CDecklinkCaptureDlg OnBnClickedButtonBrowse() { char BASED_CODE szFilters[] = "Windows Media Files|*.avi;*.asf;*.wmv|All Files (*.*)|*.*||"; char* pExt[] = {"*.avi", "*.avi", "*.asf;*.wmv"}; CFileDialog FileDlg(TRUE, "Windows Media Files", pExt[m_compressor], 0, szFilters, this); if (FileDlg.DoModal() == IDOK) { m_captureFile = FileDlg.GetPathName(); m_captureFileCtrl.SetWindowText(m_captureFile); } } //----------------------------------------------------------------------------- // OnBnClickedButtonCapture // Create a capture graph a start capture void CDecklinkCaptureDlg OnBnClickedButtonCapture() { HRESULT hr = CreateCaptureGraph(); if (SUCCEEDED(hr)) { if (m_pControl) { hr = m_pControl- Run(); if (SUCCEEDED(hr)) { DisableControls(); } } } } //----------------------------------------------------------------------------- // OnBnClickedButtonStop // Stop capture and revert to preview void CDecklinkCaptureDlg OnBnClickedButtonStop() { HRESULT hr = DestroyGraph(); if (SUCCEEDED(hr)) { hr = CreatePreviewGraph(); if (SUCCEEDED(hr)) { EnableControls(); } } } //----------------------------------------------------------------------------- // EnableControls // void CDecklinkCaptureDlg EnableControls(void) { CWnd* pWnd = GetDlgItem(IDC_COMBO_VIDEOFORMATS); pWnd- EnableWindow(TRUE); pWnd = GetDlgItem(IDC_COMBO_AUDIOFORMATS); pWnd- EnableWindow(TRUE); pWnd = GetDlgItem(IDC_CHECK_AUDIOMUTE); pWnd- EnableWindow(TRUE); pWnd = GetDlgItem(IDC_COMBO_COMPRESSION); m_bEnableCompressionCtrl = (576 m_vihDefault.bmiHeader.biHeight) ? FALSE TRUE;// don t have an HDV codec do disable compression control for HD formats pWnd- EnableWindow(m_bEnableCompressionCtrl); pWnd = GetDlgItem(IDC_EDIT_CAPTUREFILE); pWnd- EnableWindow(TRUE); pWnd = GetDlgItem(IDC_BUTTON_BROWSE); pWnd- EnableWindow(TRUE); pWnd = GetDlgItem(IDC_BUTTON_CAPTURE); pWnd- EnableWindow(TRUE); pWnd = GetDlgItem(IDC_BUTTON_STOP); pWnd- EnableWindow(FALSE); } //----------------------------------------------------------------------------- // DisableControls // void CDecklinkCaptureDlg DisableControls(void) { CWnd* pWnd = GetDlgItem(IDC_COMBO_VIDEOFORMATS); pWnd- EnableWindow(FALSE); pWnd = GetDlgItem(IDC_COMBO_AUDIOFORMATS); pWnd- EnableWindow(FALSE); pWnd = GetDlgItem(IDC_CHECK_AUDIOMUTE); pWnd- EnableWindow(FALSE); pWnd = GetDlgItem(IDC_COMBO_COMPRESSION); pWnd- EnableWindow(FALSE); pWnd = GetDlgItem(IDC_EDIT_CAPTUREFILE); pWnd- EnableWindow(FALSE); pWnd = GetDlgItem(IDC_BUTTON_BROWSE); pWnd- EnableWindow(FALSE); pWnd = GetDlgItem(IDC_BUTTON_CAPTURE); pWnd- EnableWindow(FALSE); pWnd = GetDlgItem(IDC_BUTTON_STOP); pWnd- EnableWindow(TRUE); } //----------------------------------------------------------------------------- // QueryRegistry // retrieve previous media formats from registry void CDecklinkCaptureDlg QueryRegistry(void) { if (ERROR_SUCCESS == m_regUtils.Open("DecklinkCaptureSample")) { EXECUTE_ASSERT(ERROR_SUCCESS == m_regUtils.GetBinary("VideoFormat", reinterpret_cast LPBYTE ( m_vihDefault), sizeof(m_vihDefault))); EXECUTE_ASSERT(ERROR_SUCCESS == m_regUtils.GetBinary("AudioFormat", reinterpret_cast LPBYTE ( m_wfexDefault), sizeof(m_wfexDefault))); EXECUTE_ASSERT(ERROR_SUCCESS == m_regUtils.GetBinary("AudioMute", reinterpret_cast LPBYTE ( m_bAudioMute), sizeof(m_bAudioMute))); EXECUTE_ASSERT(ERROR_SUCCESS == m_regUtils.GetBinary("VideoCompressor", reinterpret_cast LPBYTE ( m_compressor), sizeof(m_compressor))); WCHAR captureFile[MAX_PATH]; ZeroMemory(captureFile, sizeof(captureFile)); EXECUTE_ASSERT(ERROR_SUCCESS == m_regUtils.GetString("CaptureFile", reinterpret_cast LPBYTE (captureFile), sizeof(captureFile))); m_captureFile = captureFile; } else { // create the key and registry values if (ERROR_SUCCESS == m_regUtils.Create("DecklinkCaptureSample")) { EXECUTE_ASSERT(ERROR_SUCCESS == m_regUtils.SetBinary("VideoFormat", reinterpret_cast const BYTE* ( m_vihDefault), sizeof(m_vihDefault))); EXECUTE_ASSERT(ERROR_SUCCESS == m_regUtils.SetBinary("AudioFormat", reinterpret_cast const BYTE* ( m_wfexDefault), sizeof(m_wfexDefault))); EXECUTE_ASSERT(ERROR_SUCCESS == m_regUtils.SetBinary("AudioMute", reinterpret_cast const BYTE* ( m_bAudioMute), sizeof(m_bAudioMute))); EXECUTE_ASSERT(ERROR_SUCCESS == m_regUtils.SetBinary("VideoCompressor", reinterpret_cast const BYTE* ( m_compressor), sizeof(m_compressor))); } } // update mute audio check box control CButton* pButton = (CButton*)GetDlgItem(IDC_CHECK_AUDIOMUTE); pButton- SetCheck(m_bAudioMute); }
https://w.atwiki.jp/bmd_intensity/pages/17.html
開発環境(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 nameand 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 サンプル http //www13.atwiki.jp/bmd_intensity?cmd=upload act=open pageid=17 file=SDK.zip
https://w.atwiki.jp/bmd_intensity/pages/31.html
公式サポート情報 初心者なんですけど… キャプチャソフトが見当たらないんですけど… (win) 「Blackmagic Media Express」がゴミ過ぎるんだけど…(win) キャプチャソフトが見当たらないんですけど… (Mac) ハイビジョンキャプチャするとコマ落ちするんですけど… (win/mac) キャプチャーにRAID(ストライピング)は、絶対必要? 「No Video Input」って出るんだけど…(win/mac) コンポーネントを認識しないんだけど…(win) S端子を使いたいんだけど……(win/mac) プログレッシブ(480p)には対応していますか?(win/mac) ふぬああでお勧めのコーデックは?(win) ふぬああで画面に横網が入るんですがどうにかなりませんか?(win) ふぬああでVIDEO FORMATを変更しても反映されません(win) ふぬああで可逆圧縮キャプすると色が薄くなるんだけど… 1280x720、1920x1080以外でキャプチャーしたいんだけど… ふぬああでオーディオプレビュー時に「ブツブツ」と音がする コンポーネント入力時、コピワン(CGMS-A)は機能してますか?(win/mac) BDレコーダやPS3等をHDMIから直で取り込みできますか?(win/mac) 店頭でIntensity無印/Proが見当たりません><(win) 正直PV3と比べてどうよ?(win) PCのスペックが低いんですが…(win) AVIキャプチャした結果の映像が早回しになるんですが…(win/mac?) AVIキャプチャした結果の映像が遅回しになるんですが…(win/mac?) Windows Home Server で動く? スルー出力に遅延はある?(win/mac) 64bitOSでも安定して動く? X58マザーには非対応? VistaでのくすのきTV Aggregatインストール方法 vistaや7でアマレコTVを起動する方法 キャプ、プレビュー、設定が上手くいかない時 Vistaや7で動作安定しない場合・・・ 公式サポート情報 Intensity 分類抽出:http //www.blackmagic-design.com/jp/support/product.asp?fmProduct=21 Intensity Pro 分類抽出:http //www.blackmagic-design.com/jp/support/product.asp?fmProduct=22 Intensity(Pro含) 語句関連抽出:http //www.blackmagic-design.com/jp/support/keyword.asp?fmKeyword=intensity 初心者なんですけど… BMDは企業向けメーカーなので末端の一般ユーザーの事なんて全く考えていない設計です 何事にも動じず、キャプチャについて調べまくる気力がない人にはお勧めできません キャプチャソフトが見当たらないんですけど… (win) Intensityのインストールディスクのドライバが 1.2以下のものにはキャプチャツールは付属していません 1.3から「Blackmagic Media Express」というアプリが インストールされるようになりました 本家から最新のものをインストールしましょう 本家サポートURL http //www.blackmagic-design.jp/support/ Ver2.0.3 1280x800に対応。 「Blackmagic Media Express」がゴミ過ぎるんだけど…(win) 元々BMD社は企業向けAV周辺機器メーカーです (テレビ局やハリウッドでの実績を数多く所有します) その為、自社開発又は大手メーカーのアプリケーションを 前提としていて当たり前 以下本家より抜粋 「Apple Final Cut ProやAdobe Premiere ProとIntensityを組み合わせた 編集システムは業務/放送対応システムです。 映像と音声が完全に同期した正確なバッチキャプチャと、完全なAV同期を 実現します。」 正直BMD社推奨のPremiereは重すぎなので2chではふぬああがお勧め キャプチャソフトが見当たらないんですけど… (Mac) ダメだったソフト iMovie、QuickTimeX、FinalCatExpress、iChat、VLC、イメージキャプチャ → カメラが接続されてません 難有りだが使えるソフト AdobePremiere → プレビューに5~10秒くらいの遅延 Skype → 320x240くらいでしかプレビュー出来ず MediaExpress → 非アクティブで映像停止 まともに使えるソフト QTRex → 実用レベルだけど0.5秒くらいの遅延あり Final Cut Pro 7 → 実用レベル 未検証 Final Cut Pro X ハイビジョンキャプチャするとコマ落ちするんですけど… (win/mac) HDDの書き込みは追いついていますか? 指定コーデックによりますが秒間転送量が非常に多いです 以下カタログスペック HDモーションJPEG 1280*720p 59.94fps 5MB/s 300MB/m 17.58GB/h 1920*1080i 29.97fps 11MB/s 660MB/m 38.67GB/h 1920*1080p 59.94fps 13.19MB/s 791.21MB/m 46.36GB/h HD非圧縮 1280*720p 59.94fps 106.8MB/s 6409.7MB/m 375.6GB/h 1920*1080i 29.97fps 100.3MB/s 6020.5MB/m 352.8GB/h 1920*1080p 59.94fps 120MB/s 7199.9MB/m 421.9GB/h キャプチャーにRAID(ストライピング)は、絶対必要? 可逆圧縮なら不要 非圧縮なら必要 可逆圧縮(Huffyuv)を使用した場合 ファイルサイズから平均して約42MB/s以上の転送速度が必要になります 1080i/29.97fps、720p/59.94fps 共に同じぐらいの容量なので、同じぐらいの転送速度です HDDは外周から内周かけて速度が落ちていき、内周部で外周速度の約半分になりますので、それを考慮してください また、単体で100MB/s以上出る高速なHDDも発売されていますので、目的にあわせて導入してください WDから1プラ320GBモデルに500GB/640GBのお買い得モデル!(ascii.jp) Model BM DiskSpeedTest (Data Write) CrystalDiskMark (100MB Seq.Write) HD Tune (TransfarRate Max-Min) Seagate ST3320620AS(320GB,8MB) 76.3MB/s 77.75MB/s 75.1-37.0MB/s WesternDigital WD6400AAKS(640GB,16MB) 105.9MB/s 121.9MB/s 113.5-52.9MB/s Seagate RAID0 ST3320620AS(320GB,8MB)x2 137.8MB/s 138.9MB/s 151.7MB-75.7MB/s (Gigabyte GA-P35-DS3R rev.2.1(P35/ICH9R), WinXP32bit) 「No Video Input」って出るんだけど…(win/mac) 入力と出力の規格が違うと「No Video Input」と出る便利仕様 ちゃんと規格を合わせましょう ドライババージョン 1.7 以降だと出なくなります。残念。 コンポーネントを認識しないんだけど…(win) 初期設定ではHDMI認識になっています(自動認識ではない) コントロールパネルのIntensityからinputを変更しましょう S端子を使いたいんだけど……(win/mac) 以下のように繋げばおk ┏━緑(Y)━<━(Y) ━┓ ━ブレイクアウトケーブル━┫ ┣━S端子変換コネクタ━ ┗━青(Cb)━<━(C) ━┛ 本家マニュアル(英語) http //www.blackmagic-design.com/support/detail.asp?techID=179 S→RCA変換アダプタ http //www.soundhouse.co.jp/shop/ProductDetail.asp?Item=219%5E2VS003FRJ1%2E5C%5E%5E プログレッシブ(480p)には対応していますか?(win/mac) wiiで確認した所、画面がバグったため非対応と思われます 直す際は取説にある通りコンポジットケーブルに差し替えて wiiを再起動させてください 自動的にインターレースへ戻ります レコーダーからごにょ経由したHDMIでも480pは非対応 ふぬああでお勧めのコーデックは?(win) 現状の市販CPUの性能だと下の通り無圧縮又は可逆圧縮しか方法はないと 思われます 画質:Uncompressed=huffyuvs=fastcodec>>MJPEG 容量:(小) MJPEG>fastcodec>huffyuvs>Uncompressed (大) ふぬああで画面に横網が入るんですがどうにかなりませんか?(win) それはインターレース化してるんだから当たり前 エンコ時にデインターレースするか デインターレースフィルターでも入れておくべき DScaler DeInterlace Filter 重い CyberLink YUY2 DeInterlace Uleadと同じ(名称違い) Ulead Video Deinterlace アニメ向け この辺がお勧め 個人的にはffdshowのデインターレースもお勧め ふぬああでVIDEO FORMATを変更しても反映されません(win) ビデオキャプチャピン(カスタム)→StreamCapsから選択 わかりやすくしてみました D1(NTSC 8-bit 4 2 2) StreamCaps 上から2番目 D3(HD1080 29.97Fps 8-bit 4 2 2) StreamCaps 上から5番目 D4(HD720 59.94p 8-bit 4 2 2) StreamCaps 上から8番目 ふぬああで可逆圧縮キャプすると色が薄くなるんだけど… YPbPr→YCbCr変換を行っていない模様 Aviutlで変換する場合 下記サイトのPlugin(cgcnv_27.lzh)を使えば直る模様 http //www.geocities.jp/aji_0/ 変換ID1 177 変換ID2 14 Avisynthで変換する場合 下記サイトのPlugin(ColorYUY2)を使えば直る模様 http //members.at.infoseek.co.jp/kiraru2002/ ColorYUY2(levels="709- 601") 1280x720、1920x1080以外でキャプチャーしたいんだけど… ふぬああ経由でffdshow raw video filterを使えば自由にリサイズ可能 横幅と高さを指定し、ピクセルアスペクト比率(PAR)をあわせる 1440x1080i PAR=4 3 1280x1080i PAR=3 2 etc... アルゴリズムはLanczosがおすすめ 1080iの時は高さを変えずに、インターレース化の項目にチェックをすること ふぬああでオーディオプレビュー時に「ブツブツ」と音がする オーディオタイムスタンプ付プレビューを試してみる コンポーネント入力時、コピワン(CGMS-A)は機能してますか?(win/mac) そ、そんな事大きな声で言えるわけないじゃない! 2スレの前半になんて書いてないんだからね!! BDレコーダやPS3等をHDMIから直で取り込みできますか?(win/mac) HDCPについて勉強をしてきてください 店頭でIntensity無印/Proが見当たりません><(win) OK,マックのプロ用機材置き場に行ってみるんだ 無ければfocal辺りから通販で購入しろ 結構いろんなショップで通販できるぞ 正直PV3と比べてどうよ?(win) 違いがわからないならPV3使ってればいい PCのスペックが低いんですが…(win) 7月末に発売するカノープスのHDRECS買っとけ AVIキャプチャした結果の映像が早回しになるんですが…(win/mac?) キャプチャ時にフレームドロップしているものと思われます。 マシンパワーを増強しましょう。 AVIファイルではインデックスがファイルの末尾にしかないため、 先頭から再生している場合はドロップしたフレームの分だけ 早回しになっているように見えます。 AVIキャプチャした結果の映像が遅回しになるんですが…(win/mac?) 再生時にフレームドロップしているものと思われます。 どうしてもAVIファイルをそのまま(DivXなどにエンコードせずに)再生したい場合は マシンパワーを強烈に増強する必要がありますが、現実的ではありません。 Windows Home Server で動く? 動きます。ドライバ 2.1 / 3.2 / 3.9.1で動作確認しました。 スルー出力に遅延はある?(win/mac) ほぼなし。2~4フレームくらい? ゲームとかで気になるならHDMI分配器等で対策 64bitOSでも安定して動く? 動きます。 vistaや7(x64)だったら今現在ドライバー3.0verが安定している ⇒3.4verでも動作安定動作報告あり(20100221現在)。 ドライバーとOSとの相性が悪いと、 音ズレ 遅延 ドロップフレーム などといった現象が激しくなる ドライバ3.5にいたっては HDMI接続時、画面が緑がかるという現象が報告されている ⇒ 3.5.1で解消 X58マザーには非対応? 【HDMI】BMD Intensity 11枚目【キャプチャー】 で動作報告あり。 276 名前:249[sage] 投稿日:2009/08/06(木) 01 59 02 ID a7PITh3o 以前質問させていただいたのですが、無事動かすことができました! 動作報告+エラーの原因報告を。 OS Vista Ultimate SP1 64bit CPU i7 920(D0) M/B ASUS P6T (BIOSのバージョン 0603) VGA Palit GeForce 9800GT Green ドライバがインストール出来ないのはP6Tのせいだと思っていましたが、 実際はVistaにてTEMP等の環境変数を変更していたことが原因でした。 The installer has encountered an unexpected error installing this package. This may indicate a problem with this package. The error code is 2203. このエラーコード2203っていうのは環境変数変更でのエラーみたいで、 デフォルトに戻したところあっさりとドライバインストール完了。 くすのきTVHDを使用させてもらい、キャプチャ出来ることも確認しました。 VistaでのくすのきTV Aggregatインストール方法 Install.batを起動する替わりに、下記操作でインストールする 1)最新版をダウンロードして適当な場所に解凍(あとで動かしたらやりなおし注意) 2)\Windows\System32フォルダからcmd.exeを解凍したフォルダにコピー 3)コピーしたcmd.exeを右クリックして「管理者として実行」 4)出てきたコマンドプロンプトで以下の三つを入力実行 regsvr32 UYVYConv.dll regsvr32 Deint.dll regsvr32 Smooth.dll 5)KusunokiTVAggregat.exeが実行できるのを確認したらcmd.exeは消してよし ※コマンドプロンプトでは上の文字列をコピーして右クリック貼り付けでもOK vistaや7でアマレコTVを起動する方法 右クリックでプロパティを選択 ↓ 互換性のタブでXPを選択 ↓ 適用を選択肢し、閉じる ↓ 管理者権限で実行 という作業工程をふめば起動可能 なお、このコーデックは32bit仕様のため、64bitOSで使用するには Proxy Codec64というソフトをインストールするとよい キャプ、プレビュー、設定が上手くいかない時 ドライバ最新バージョンは環境によっては正しく動作しない報告が多々あります 古いバージョンのドライバをそれぞれ試してみましょう。 Vistaや7で動作安定しない場合・・・ 新PC組んでIntensity移植したらファームアップが出来なくて詰まってたんだけど http //d.hatena.ne.jp/coldcup/20100506/p1 丁度こんなページが出てきて解決した (WindowsVistaや7の人はコントロールパネルからPCIeの省電力モードを切ってみる)
https://w.atwiki.jp/schneider/pages/2.html
メニュー トップページ プラグイン紹介 メニュー メニュー2 I was also a huge adventure-game fan, ‘Lords of Midnight’, ‘Colossal’, and an awful Ian Livingstone game that drove me half-mad. This is due mostly to the lead inductance of the pins combined with high-speed changes in current on the ground pins. hdmi extender This has proved the efficiency of HP’s R sector that always works overtime to ensure that it should lead the industry before some kind of competition begins in the market.. Lots and lots work performance testing — patrick kingsley monthly gigabyte bandwith test mended by work equipment vendor — josep l. IV. In many cases you can find the same products for a fraction of the cost when you buy used. That in itself is a decision because it continues the regulatory limbo. Many companies offer this service and access to the customer, so you can not bother himself in the place. “We are happy to have Dr. You also want to make sure to find a supplier that has a wide selection of brand names for industry specific equipment.. The graph of a function on real numbers is identical to the graphic representation of the function. He was made a Major-General in 1777 and then a member of the Board of War. The final portion (designated, “Dead to the World”) for the most part consists of spoken texts by Jarman and several of his actors, laid over evocative, pastoral music by Turner; very effective and moving. Some other documents assign punishment for evil to be the imposing of an undesirable spiritual punishment of various horrors. It wasn’t all that bad and was superior to the VCS. Thus of the overlapping ends one becomes a north pole and one a south pole and the attraction of the poles causes the switch to close. Gesture Recognition Based on Scratch Inputs 7. Micro Controller Stage Working Identification of microcontroller (H8/3437). Also the source is available for free.. Attempts to report method interactions range between busy and hard to see flow chart in order to setting up cross-reference platforms inside the top quality manual. Tool current market back in Offshore you will discover periods of interest, initially, End user demands in a particular starting locale, instrumentation operate, in comparison with western world, specific space within between 10 you can 15 numerous years. lyrics of over by drake who blu ray dvd women daily puzzle court music free listen case how to say in spanish went programming languages be mr and mrs smith asked tattoo pics down nick junior games back new order world long grand theft auto xbox cheats . Related posts 100ms s pc based usb digital storage oscilloscope dso 2090100ms s pc based usb digital storage oscilloscope dso 2090 Compatible with the modular wall outlets the single outlet can be expanded to accommodate a second outlet by removing the...100ms s pc based usb digital storage oscilloscope dso 2090 for best buy shoppings100ms s pc based usb digital storage oscilloscope dso 2090 for best buy shoppings Though he was opposed to the Federalist system of government, Lee took a post as a...100ms s pc based usb digital storage oscilloscope dso 2090 a quality product100ms s pc based usb digital storage oscilloscope dso 2090 a quality product Computer Space was followed in 1972 by the Magnavox Odyssey, the first home console. XM8C . This...100kB memory for a digital oscilloscope100kb memory for a digital oscilloscope on made style not seem eastern midwestern will a cooley unedited a why dependent extraneous; sense it bucket seat covers Heard but light brown,...000 sq measures on digital oscilloscope mechanized developing house plant000 sq measures on digital oscilloscope mechanized developing house plant Print your findings by connecting your printer to the USB port on the device. The plans and the manual are...Digital Spectrum MemoryFRAME MF-8115 Premium 15-Inch Wireless Digital Frame – Photo, Video and MP3 Player[amzn_product_post]...Digital Spectrum MemoryFRAME ULTRA MF-801 8.4-Inch Digital Picture Frame[amzn_product_post]...Digital Spectrum MemoryFRAME MF-8104 Premium 10.4-Inch Wireless Digital Frame[amzn_product_post]...Digital Décor 7″ LCD Slim Digital Photo Frame (A60P0774) – Black[amzn_product_post]...Digital Spectrum MemoryVUE Gallery MV-1700 Plus 17-Inch Digital Picture Frame (Gold)[amzn_product_post]...Digital Spectrum MemoryVUE Gallery MV-1500 Plus 15-Inch Digital Picture Frame (Black)[amzn_product_post]...Digital Spectrum MemoryVUE Gallery MV-1700 Plus 17-Inch Digital Picture Frame (Black)[amzn_product_post]...Noah Company Envizen Digital EF70702 7-Inch High Definition LCD Digital Television/Portable Multimedia Player (Black)[amzn_product_post]...Digital Labs 7″ Portable Digital LCD TV – Black (DT191SA)[amzn_product_post]...Digital Prism 3.5 in Handheld Digital Lcd Tv[amzn_product_post]...Digital Prism 7″ Portable Digital LCD TV[amzn_product_post]...SizeGenetics Review – My Personal Experience-Based SizeGenetics EvaluationSizeGenetics is stated to become one of the best penis traction gadgets nowadays. As being a matter of truth, you can find thousands of people who are supplying out SizeGenetics...1 implements new oscilloscope oscilloscope electronic device used to produce visual displays corresp1 implements new oscilloscope oscilloscope electronic device used to produce visual displays corresponding to electrical signals heard her who is jesus christ, To that citi flex line work Of dog...Coby TFTV791 7 Inch ATSC/NTSC Portable Digital LCD TV Bundle With Belkin F8N100-BRDL 8.9-inch Neoprene Notebook Sleeve Pitch, Coby CVE92 Super Bass Digital Stereo Earphones Microfiber Cloth[amzn_product_post]...0 Comments An oscilloscope is an electronic device used for measuring voltage of an electronic devic0 comments an oscilloscope is an electronic device used for measuring voltage of an electronic device against time These technologies have been varied in terms of their electric and magnetic... リンク @wiki @wikiご利用ガイド ここを編集
https://w.atwiki.jp/coccet/pages/54.html
781 sensor 782 coat 783 summit 784 difficulty 785 seed 786 spin 787 twice 788 density 789 characteristic 790 birth 791 extinction 792 nitrogen 793 purpose 794 eastern 795 post 796 traffic 797 mission 798 broadcast 799 capacity 800 scream
https://w.atwiki.jp/nicoratch/pages/951.html
概要 MP3 CD再生可能なオールインワンCDJ。 スペック表 Features All-in-one MP3/CD Player and 2-Channel Pro Mixer Balance XLR Outputs Relay Playback Seamless Loop Large bright LCD display shows track name, elapsed, remaining and total time, Auto BPM, folder number, Pitch, etc. Auxiliary Input on front (Mini input - great for MP3 Players or Satellite Radio) Plays MP3, CD CD-R discs Instant Start +10 track advance button Touch Sensitive Scratching Quick MP3/CD recognition Anti Shock (20 sec. per side) Power Consumption 14W Multi-voltage AC 115-230V, 50/60Hz Dimensions (LxWxH) 450x285x110mm Weight 5 kg. Specifications subject to change without notice. MP3/CD PLAYERS MAIN FEATURES Plays MP3, CD CD-R discs Quick MP3/CD recognition Instant Start Anti Shock (20 sec. per side) +10 track advance button Loop Reloop Q-Start Pitch range +/- 4%, +/- 8%, +/- 16% Selectable elapsed, remain total remaiming time display Single or continuous play MIXER MAIN FEATURES 2 Channel Pro mixer built-in Inputs 2 CD (built-in), 2 Line, 1 Aux, 1 Mic Bass, Mid, Treble Gain adjustment for each channel Master Level, Mic Level, Cue Pan Cue Level adjustment Stream Flow LED indicators for each channel Flip Flop On/Off button - Relay playback between two CD Players Auxilary input on face - Mini Jack great for Portable MP3 players or satellite radio receivers REAR PANEL FEATURES XLR Balanced XLR Outputs 2 additional line inputs Mic input (XLR or 1/4” input) Multi-voltage Switch 115V/60Hz or 230V/50Hz Power On/Off button Encore1000 http //www.americandj.eu/en/encore-1000.html
https://w.atwiki.jp/intensity/pages/22.html
//------------------------------------------------------------------------------------ // $Id Utils.cpp,v 1.10 2006/04/11 01 13 06 ivanr Exp $ // // Desc DirectShow utility class implementation // // Copyright (c) Blackmagic Design 2005. All rights reserved. //------------------------------------------------------------------------------------ #include "stdafx.h" #include "Utils.h" //----------------------------------------------------------------------------- // CDSUtils - Directshow utility class //----------------------------------------------------------------------------- //----------------------------------------------------------------------------- // AddFilter // Attempts to locate a filter of a given class ID and nameand add it to the graph HRESULT CDSUtils AddFilter(IGraphBuilder* pGraph, const GUID clsid, LPCWSTR pName, IBaseFilter** ppFilter) { HRESULT hr = S_OK; if (pGraph pName ppFilter) { *ppFilter = NULL; IBaseFilter* pFilter = NULL; hr = CoCreateInstance(clsid, 0, CLSCTX_INPROC_SERVER, IID_IBaseFilter, reinterpret_cast void** ( pFilter)); if (SUCCEEDED(hr)) { hr = pGraph- AddFilter(pFilter, pName); if (SUCCEEDED(hr)) { *ppFilter = pFilter; } else { SAFE_RELEASE(pFilter); } } } else { hr = E_INVALIDARG; } return hr; } //----------------------------------------------------------------------------- // AddFilter2 // Attempts to locate a filter of a given class category and name HRESULT CDSUtils AddFilter2(IGraphBuilder* pGraph, const GUID clsid, LPCWSTR pName, IBaseFilter** ppFilter) { HRESULT hr = S_OK; if (pGraph pName ppFilter) { // first enumerate the system devices for the specifed class and filter name CComPtr ICreateDevEnum pSysDevEnum = NULL; hr = CoCreateInstance(CLSID_SystemDeviceEnum, NULL, CLSCTX_INPROC_SERVER, IID_ICreateDevEnum, reinterpret_cast void** ( pSysDevEnum)); if (SUCCEEDED(hr)) { CComPtr IEnumMoniker pEnumCat = NULL; hr = pSysDevEnum- CreateClassEnumerator(clsid, pEnumCat, 0); if (S_OK == hr) { IMoniker* pMoniker = NULL; bool Loop = true; while ((S_OK == pEnumCat- Next(1, pMoniker, NULL)) Loop) { IPropertyBag* pPropBag = NULL; hr = pMoniker- BindToStorage(0, 0, IID_IPropertyBag, reinterpret_cast void** ( pPropBag)); if (SUCCEEDED(hr)) { VARIANT varName; VariantInit( varName); hr = pPropBag- Read(L"FriendlyName", varName, 0); if (SUCCEEDED(hr)) { if (0 == wcscmp(varName.bstrVal, pName)) { hr = pMoniker- BindToObject(NULL, NULL, IID_IBaseFilter, reinterpret_cast void** (ppFilter)); Loop = false; } } VariantClear( varName); // contained within a loop, decrement the reference count SAFE_RELEASE(pPropBag); } SAFE_RELEASE(pMoniker); } } } // if a filter has been located add it to the graph if (*ppFilter) { hr = pGraph- AddFilter(reinterpret_cast IBaseFilter* (*ppFilter), pName); } else { hr = E_FAIL; } } else { hr = E_INVALIDARG; } return hr; } //------------------------------------------------------------------------------------------------- // GetUnconnectedPin // Attemptes to locate an unconnected pin on filter HRESULT CDSUtils GetUnconnectedPin(IBaseFilter* pFilter, PIN_DIRECTION PinDir, IPin** ppPin) { HRESULT hr = S_OK; if (pFilter ppPin) { CComPtr IEnumPins pEnum = NULL; IPin* pPin = NULL; hr = pFilter- EnumPins( pEnum); if (SUCCEEDED(hr)) { while (pEnum- Next(1, pPin, NULL) == S_OK) { PIN_DIRECTION ThisPinDir; pPin- QueryDirection( ThisPinDir); if (ThisPinDir == PinDir) { IPin* pPinTemp = NULL; hr = pPin- ConnectedTo( pPinTemp); if (SUCCEEDED(hr)) { SAFE_RELEASE(pPinTemp); } else { // unconnected, return this pin *ppPin = pPin; hr = S_OK; break; } } SAFE_RELEASE(pPin); } } if (NULL == *ppPin) { // failed to find an unconnected pin hr = E_FAIL; } } else { hr = E_INVALIDARG; } return hr; } //----------------------------------------------------------------------------- // GetPin // Find the pin of the specified name on the given filter // This method leaves an outstanding reference on the pin if successful HRESULT CDSUtils GetPin(IBaseFilter* pFilter, const wchar_t* pName, IPin** ppPin) { HRESULT hr = S_OK; if (pFilter pName ppPin) { CComPtr IEnumPins pIEnumPins = NULL; hr = pFilter- EnumPins( pIEnumPins); if (SUCCEEDED(hr)) { IPin* pIPin = NULL; while (S_OK == pIEnumPins- Next(1, pIPin, NULL)) { PIN_INFO info = {0}; hr = pIPin- QueryPinInfo( info); if (SUCCEEDED(hr)) { SAFE_RELEASE(info.pFilter); if (0 == wcsncmp(info.achName, pName, wcslen(pName))) { // matched the pin category *ppPin = pIPin; break; } } SAFE_RELEASE(pIPin); } } if (NULL == *ppPin) { // failed to find the named pin hr = E_FAIL; } } else { hr = E_INVALIDARG; } return hr; } //----------------------------------------------------------------------------- // GetPin // Find the pin of the specified format type on the given filter // This method leaves an outstanding reference on the pin if successful HRESULT CDSUtils GetPin(IBaseFilter* pFilter, const GUID* pFormat, PIN_DIRECTION PinDir, IPin** ppPin) { HRESULT hr = S_OK; if (pFilter pFormat ppPin) { CComPtr IEnumPins pIEnumPins = NULL; hr = pFilter- EnumPins( pIEnumPins); if (SUCCEEDED(hr)) { // find the pin with the specified format IPin* pIPin = NULL; while (S_OK == pIEnumPins- Next(1, pIPin, NULL)) { // match the pin direction PIN_DIRECTION pinDir; pIPin- QueryDirection( pinDir); if (pinDir == PinDir) { // match pin direction check the first media type returned from the upstream pin CComPtr IEnumMediaTypes pIEnumMT = NULL; hr = pIPin- EnumMediaTypes( pIEnumMT); if (SUCCEEDED(hr)) { AM_MEDIA_TYPE* pmt = NULL; hr = pIEnumMT- Next(1, pmt, NULL); if (S_OK == hr) { if (pmt- majortype == *pFormat) { // found the pin with the specified format *ppPin = pIPin; DeleteMediaType(pmt); break; } else { DeleteMediaType(pmt); } } } } SAFE_RELEASE(pIPin); } if (NULL == *ppPin) { // failed to find the named pin hr = E_FAIL; } } } else { hr = E_INVALIDARG; } return hr; } //----------------------------------------------------------------------------- // ConnectFiltersNamedPin // Connects two filters using the pin names, if no name is supplied the first // unconnected pin is used HRESULT CDSUtils ConnectFilters(IGraphBuilder* pGraph, IBaseFilter* pUpstream, wchar_t* pUpstreamPinName, IBaseFilter* pDownstream, wchar_t* pDownstreamPinName) { HRESULT hr = S_OK; if (pUpstream pDownstream) { // get the upstream output pin CComPtr IPin pIPinOutput = NULL; if (pUpstreamPinName) { hr = GetPin(pUpstream, pUpstreamPinName, pIPinOutput); } else { hr = GetUnconnectedPin(pUpstream, PINDIR_OUTPUT, pIPinOutput); } if (SUCCEEDED(hr)) { // get the downstream input pin CComPtr IPin pIPinInput = NULL; if (pDownstreamPinName) { hr = GetPin(pDownstream, pDownstreamPinName, pIPinInput); } else { hr = GetUnconnectedPin(pDownstream, PINDIR_INPUT, pIPinInput); } if (SUCCEEDED(hr)) { // connect the pins hr = pGraph- Connect(pIPinOutput, pIPinInput); } } } else { hr = E_INVALIDARG; } return hr; } //----------------------------------------------------------------------------- // ConnectFilters // 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 HRESULT CDSUtils ConnectFilters(IGraphBuilder* pGraph, IBaseFilter* pUpstream, IBaseFilter* pDownstream, const GUID* pFormat) { HRESULT hr = S_OK; if (pUpstream pDownstream pFormat) { // find the upstream output pin with the specified format CComPtr IPin pIPinOutput = NULL; hr = GetPin(pUpstream, pFormat, PINDIR_OUTPUT, pIPinOutput); if (SUCCEEDED(hr)) { // get the downstream input pin CComPtr IPin pIPinInput = NULL; hr = GetPin(pDownstream, pFormat, PINDIR_INPUT, pIPinInput); if (SUCCEEDED(hr)) { // connect the pins hr = pGraph- Connect(pIPinOutput, pIPinInput); } } } else { hr = E_INVALIDARG; } return hr; } //----------------------------------------------------------------------------- // RenderFilter // Renders the named output pin of the filter, or the first unconnected output if // no name is provided HRESULT CDSUtils RenderFilter(IGraphBuilder* pGraph, IBaseFilter* pUpstream, wchar_t* pUpstreamPinName) { HRESULT hr = S_OK; if (pUpstream) { CComPtr IPin pIPinOutput = NULL; if (pUpstreamPinName) { hr = GetPin(pUpstream, pUpstreamPinName, pIPinOutput); } else { hr = GetUnconnectedPin(pUpstream, PINDIR_OUTPUT, pIPinOutput); } if (SUCCEEDED(hr)) { hr = pGraph- Render(pIPinOutput); } } else { hr = E_INVALIDARG; } return hr; } //----------------------------------------------------------------------------- // DisconnectAllPins // Disconnect all the pins of the filters in a graph HRESULT CDSUtils DisconnectAllPins(IGraphBuilder* pGraph) { HRESULT hr = S_OK; if (pGraph) { CComPtr IEnumFilters pIEnumFilters = NULL; hr = pGraph- EnumFilters( pIEnumFilters); if (SUCCEEDED(hr)) { IBaseFilter* pFilter = NULL; while (S_OK == pIEnumFilters- Next(1, pFilter, NULL)) { CComPtr IEnumPins pIEnumPins = NULL; hr = pFilter- EnumPins( pIEnumPins); if (SUCCEEDED(hr)) { IPin* pIPin = NULL; while (S_OK == pIEnumPins- Next(1, pIPin, NULL)) { IPin* pIPinConnection = NULL; if (S_OK == pIPin- ConnectedTo( pIPinConnection)) { // pins are connected, to disconnect filters, both pins must be disconnected hr = pGraph- Disconnect(pIPin); hr = pGraph- Disconnect(pIPinConnection); SAFE_RELEASE(pIPinConnection); } SAFE_RELEASE(pIPin); } } SAFE_RELEASE(pFilter); } } } else { hr = E_INVALIDARG; } return hr; } //----------------------------------------------------------------------------- // FindFilterInterface // Attempt to locate the specified interface HRESULT CDSUtils FindFilterInterface(IBaseFilter* pFilter, const IID riid, void** ppvInterface) { HRESULT hr = S_OK; if (pFilter ppvInterface) { hr = pFilter- QueryInterface(riid, ppvInterface); } else { hr = E_INVALIDARG; } return hr; } //----------------------------------------------------------------------------- // FindPinInterface // Attempt to locate the interface on the named pin or on the first pin if no // name is provided. HRESULT CDSUtils FindPinInterface(IBaseFilter* pFilter, wchar_t* pName, const IID riid, void** ppvInterface) { HRESULT hr = S_OK; if (pFilter ppvInterface) { CComPtr IPin pIPin = NULL; if (pName) { hr = GetPin(pFilter, pName, pIPin); } else { CComPtr IEnumPins pIEnumPins = NULL; hr = pFilter- EnumPins( pIEnumPins); if (SUCCEEDED(hr)) { hr = pIEnumPins- Next(1, pIPin, NULL); } } if (SUCCEEDED(hr)) { hr = pIPin- QueryInterface(riid, ppvInterface); } } else { hr = E_INVALIDARG; } return hr; } //----------------------------------------------------------------------------- // FindPinInterface // Attempt to locate the interface on the pin with the specified format or on the first pin if no // format is provided. HRESULT CDSUtils FindPinInterface(IBaseFilter* pFilter, const GUID* pFormat, PIN_DIRECTION PinDir, const IID riid, void** ppvInterface) { HRESULT hr = S_OK; if (pFilter ppvInterface) { CComPtr IPin pIPin = NULL; if (pFormat) { hr = GetPin(pFilter, pFormat, PinDir, pIPin); } else { CComPtr IEnumPins pIEnumPins = NULL; hr = pFilter- EnumPins( pIEnumPins); if (SUCCEEDED(hr)) { hr = pIEnumPins- Next(1, pIPin, NULL); } } if (SUCCEEDED(hr)) { hr = pIPin- QueryInterface(riid, ppvInterface); } } else { hr = E_INVALIDARG; } return hr; } //----------------------------------------------------------------------------- // AddGraphToRot // Adds a DirectShow filter graph to the Running Object Table, // allowing GraphEdit to "spy" on a remote filter graph. HRESULT CDSUtils AddGraphToRot(IUnknown* pUnkGraph, DWORD* pdwRegister) { HRESULT hr = S_OK; if (pUnkGraph pdwRegister) { CComPtr IRunningObjectTable pROT = NULL; hr = GetRunningObjectTable(0, pROT); if (SUCCEEDED(hr)) { WCHAR wsz[128]; StringCchPrintfW(wsz, 128, L"FilterGraph %08x pid %08x\0", (DWORD_PTR)pUnkGraph, GetCurrentProcessId()); CComPtr IMoniker pMoniker = NULL; hr = CreateItemMoniker(L"!", wsz, pMoniker); if(SUCCEEDED(hr)) { // Use the ROTFLAGS_REGISTRATIONKEEPSALIVE to ensure a strong reference // to the object. Using this flag will cause the object to remain // registered until it is explicitly revoked with the Revoke() method. // // Not using this flag means that if GraphEdit remotely connects // to this graph and then GraphEdit exits, this object registration // will be deleted, causing future attempts by GraphEdit to fail until // this application is restarted or until the graph is registered again. hr = pROT- Register(ROTFLAGS_REGISTRATIONKEEPSALIVE, pUnkGraph, pMoniker, pdwRegister); } } } else { hr = E_INVALIDARG; } return hr; } //----------------------------------------------------------------------------- // RemoveGraphFromRot // Removes a filter graph from the Running Object Table void CDSUtils RemoveGraphFromRot(DWORD pdwRegister) { CComPtr IRunningObjectTable pROT = NULL; if (SUCCEEDED(GetRunningObjectTable(0, pROT))) { pROT- Revoke(pdwRegister); } } //------------------------------------------------------------------------------------ // CRegUtils - Registry utility class //------------------------------------------------------------------------------------ //------------------------------------------------------------------------------------ // Constructor // CRegUtils CRegUtils() m_hKey(NULL) { } //------------------------------------------------------------------------------------ // Destructor // CRegUtils ~CRegUtils() { Close(); } //------------------------------------------------------------------------------------ // Open // Opens the specified subkey LONG CRegUtils Open(LPCTSTR lpSubKey) { Close(); m_subKeyName = "Software\\Blackmagic Design\\Samples\\"; m_subKeyName += lpSubKey; return RegOpenKeyEx(HKEY_LOCAL_MACHINE, m_subKeyName.c_str(), 0, KEY_ALL_ACCESS, m_hKey); } //------------------------------------------------------------------------------------ // Create // Creates the specified subkey LONG CRegUtils Create(LPCTSTR lpSubKey) { Close(); m_subKeyName = "Software\\Blackmagic Design\\Samples\\"; m_subKeyName += lpSubKey; return RegCreateKeyEx(HKEY_LOCAL_MACHINE, m_subKeyName.c_str(), 0, NULL, REG_OPTION_NON_VOLATILE, KEY_ALL_ACCESS, NULL, m_hKey, NULL); } //------------------------------------------------------------------------------------ // Close // Closes the subkey void CRegUtils Close() { RegCloseKey(m_hKey); m_hKey = NULL; m_subKeyName.empty(); } //------------------------------------------------------------------------------------ // SetString // Set the key for the named value of type string LONG CRegUtils SetString(LPCTSTR valueName, const BYTE* lpData, DWORD cbData) { return RegSetValueEx(m_hKey, valueName, 0, REG_SZ, lpData, cbData); } //------------------------------------------------------------------------------------ // GetString // Query the key for the named value of type string LONG CRegUtils GetString(LPCTSTR valueName, LPBYTE lpData, DWORD cbData) { LONG ret = ERROR_SUCCESS; DWORD size = cbData, type = 0; ret = RegQueryValueEx(m_hKey, valueName, NULL, type, lpData, size); if ((size != cbData) || (REG_SZ != type)) { ret = ERROR_INVALID_PARAMETER; } return ret; } //------------------------------------------------------------------------------------ // SetBinary // Set the key for the named value of type binary LONG CRegUtils SetBinary(LPCTSTR valueName, const BYTE* lpData, DWORD cbData) { return RegSetValueEx(m_hKey, valueName, 0, REG_BINARY, lpData, cbData); } //------------------------------------------------------------------------------------ // GetBinary // Query the key for the named value of type binary LONG CRegUtils GetBinary(LPCTSTR valueName, LPBYTE lpData, DWORD cbData) { LONG ret = ERROR_SUCCESS; DWORD size = cbData, type = 0; ret = RegQueryValueEx(m_hKey, valueName, NULL, type, lpData, size); if ((size != cbData) || (REG_BINARY != type)) { ret = ERROR_INVALID_PARAMETER; } return ret; } //------------------------------------------------------------------------------------ // SetDword // Set the key for the named value of type DWORD LONG CRegUtils SetDword(LPCTSTR valueName, const BYTE* lpData, DWORD cbData) { return RegSetValueEx(m_hKey, valueName, 0, REG_DWORD, lpData, cbData); } //------------------------------------------------------------------------------------ // GetDword // Query the key for the named value of type DWORD LONG CRegUtils GetDword(LPCTSTR valueName, LPBYTE lpData, DWORD cbData) { LONG ret = ERROR_SUCCESS; DWORD size = cbData, type = 0; ret = RegQueryValueEx(m_hKey, valueName, NULL, type, lpData, size); if ((size != cbData) || (REG_DWORD != type)) { ret = ERROR_INVALID_PARAMETER; } return ret; } //------------------------------------------------------------------------------------ // CUtils - utility class //------------------------------------------------------------------------------------ //----------------------------------------------------------------------------- // GetBMIHeader // Returns the BITMAPINFOHEADER structure from media type format extension BITMAPINFOHEADER* CUtils GetBMIHeader(const AM_MEDIA_TYPE* pamt) { BITMAPINFOHEADER* pbmih = NULL; if (pamt) { if (FORMAT_VideoInfo == pamt- formattype) { VIDEOINFOHEADER* pvih = reinterpret_cast VIDEOINFOHEADER* (pamt- pbFormat); ASSERT(sizeof(VIDEOINFOHEADER) = pamt- cbFormat); pbmih = pvih- bmiHeader; } else if (FORMAT_VideoInfo2 == pamt- formattype) { VIDEOINFOHEADER2* pvih = reinterpret_cast VIDEOINFOHEADER2* (pamt- pbFormat); ASSERT(sizeof(VIDEOINFOHEADER2) = pamt- cbFormat); pbmih = pvih- bmiHeader; } } return pbmih; } //----------------------------------------------------------------------------- // GetBMIHeader // Returns the BITMAPINFOHEADER structure from media type format extension BITMAPINFOHEADER* CUtils GetBMIHeader(const CMediaType mt) { BITMAPINFOHEADER* pbmih = NULL; if (FORMAT_VideoInfo == mt.formattype) { VIDEOINFOHEADER* pvih = reinterpret_cast VIDEOINFOHEADER* (mt.pbFormat); ASSERT(sizeof(VIDEOINFOHEADER) = mt.cbFormat); pbmih = pvih- bmiHeader; } else if (FORMAT_VideoInfo2 == mt.formattype) { VIDEOINFOHEADER2* pvih = reinterpret_cast VIDEOINFOHEADER2* (mt.pbFormat); ASSERT(sizeof(VIDEOINFOHEADER2) = mt.cbFormat); pbmih = pvih- bmiHeader; } return pbmih; } //----------------------------------------------------------------------------- // GetAvgTimePerFrame // Returns the average time per frame from media type format extension REFERENCE_TIME CUtils GetAvgTimePerFrame(const AM_MEDIA_TYPE* pamt) { REFERENCE_TIME rtAvgTimePerFrame = 0; if (pamt) { if (FORMAT_VideoInfo == pamt- formattype) { VIDEOINFOHEADER* pvih = reinterpret_cast VIDEOINFOHEADER* (pamt- pbFormat); ASSERT(sizeof(VIDEOINFOHEADER) = pamt- cbFormat); rtAvgTimePerFrame = pvih- AvgTimePerFrame; } else if (FORMAT_VideoInfo2 == pamt- formattype) { VIDEOINFOHEADER2* pvih = reinterpret_cast VIDEOINFOHEADER2* (pamt- pbFormat); ASSERT(sizeof(VIDEOINFOHEADER2) = pamt- cbFormat); rtAvgTimePerFrame = pvih- AvgTimePerFrame; } } return rtAvgTimePerFrame; } //------------------------------------------------------------------------------------ // GetImageSize // Calculates the image size unsigned long CUtils GetImageSize(BITMAPINFOHEADER* pbmih) { unsigned long dwImageSize = 0; if (pbmih) { switch (pbmih- biCompression) { default case BI_RGB dwImageSize = (pbmih- biWidth * abs(pbmih- biHeight) * pbmih- biBitCount) 3; break; case YVYU case 2YUY dwImageSize = (pbmih- biWidth * abs(pbmih- biHeight) * 16) 3; break; } } return dwImageSize; }