Created
April 20, 2015 14:41
-
-
Save toya33/51b9e00f2ba98495c1a6 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// DirectShowTest_1.cpp : コンソール アプリケーションのエントリ ポイントを定義します。 | |
// | |
#include "stdafx.h" | |
#include <dshow.h> | |
#define FILENAME L"D:\\sample\\CIMG0145.AVI" | |
int _tmain(int argc, _TCHAR* argv[]) | |
{ | |
IGraphBuilder *pGraphBuilder; | |
IMediaControl *pMediaControl; | |
CoInitialize(NULL); | |
CoCreateInstance(CLSID_FilterGraph, | |
NULL, | |
CLSCTX_INPROC, | |
IID_IGraphBuilder, | |
(LPVOID *)&pGraphBuilder); | |
pGraphBuilder->QueryInterface(IID_IMediaControl, | |
(LPVOID *)&pMediaControl); | |
pMediaControl->RenderFile(FILENAME); | |
pMediaControl->Run(); | |
MessageBox(NULL, | |
"Block Execution" , | |
"Block", | |
MB_OK); | |
pMediaControl->Release(); | |
pGraphBuilder->Release(); | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment