Если у вас Visual Studio, то видимо Windows. Под нее гораздо проще делать вывод
любой мультимедии на DirectShow. Получается буквально в десяток строк.
Код
#include <windows.h>
#include <stdio.h>
#include <atlbase.h>
#include <DShow.h>
#include <INITGUID.H>
DEFINE_GUID(CLSID_FilterGraph,
0xe436ebb3, 0x524f, 0x11ce, 0x9f, 0x53, 0x00, 0x20, 0xaf, 0x0b, 0xa7, 0x70);
void chk_(HRESULT hr, const char* str)
{
if (hr<0)
{
printf("Error %08X in %s\n",hr,str);
exit(1);
}
}
#define HR(v) chk_(v,#v)
#define mERROR(msg) chk_(-1,msg)
void run(char* nm)
{
USES_CONVERSION;
CComPtr<IGraphBuilder> graph_builder;
HR(CoCreateInstance(CLSID_FilterGraph, NULL, CLSCTX_INPROC_SERVER,
__uuidof(IGraphBuilder), (void **)&graph_builder));
HR(graph_builder->RenderFile(A2W(nm),NULL));
CComQIPtr<IMediaControl> graph_ctrl(graph_builder);
if (!graph_ctrl) mERROR("Can't get IMediaControl interface from Graph");
HR(graph_ctrl->Run());
getchar();
}
int main(int argc, char** argv)
{
if (argc<1) mERROR("Expected file name");
CoInitialize(0);
run(argv[1]);
CoUninitialize();
return 0;
}