[Theora-dev] Re: [Vorbis-dev] getting started
illiminable
ogg
Mon Jun 28 09:11:39 PDT 2004
<002001c45c5e$20eb28a0$0100000a at tiger>
Message-ID: <007b01c45d2a$9a7b54c0$0100000a at tiger>
Incidentally... i just realised this same code plays video too... theora (if
you have my filters installed www.illiminable.com/ogg/), mpg, avi whatever
you have a filter for... so i am also posting it to theora-dev.
Zen.
>
> Actually today i needed a simple player to do some testing... so here's
the
> entire code for a *zero* feature, *zero* error checking command line audio
> player for ogg... requires my filters installed... and you need to link to
> strmiids.lib. Actually it will play any audio format... mp3s wmas,
anything
> directshow has a filter for. This should get you started, and hopefully be
a
> good starting point for anyone wanting to integrate ogg simply into
windows.
> Obviously there's more to make it functional... but it's a starting point.
> It will be in the subversion repository as an example on my next checkin.
>
> // CLOgg.cpp : Command line minimalist audio player.
> //
>
> #include "stdafx.h"
> #include <dshow.h>
> #include <windows.h>
> #include <iostream>
> using namespace std;
> int _tmain(int argc, _TCHAR* argv[])
> {
> IGraphBuilder* locGraphBuilder = NULL;
> IMediaControl* locMediaControl = NULL;
> HRESULT locHR;
> CoInitialize(NULL);
> locHR = CoCreateInstance(CLSID_FilterGraph, NULL, CLSCTX_INPROC_SERVER,
> IID_IGraphBuilder, (void **)&locGraphBuilder);
> locHR = locGraphBuilder->RenderFile(L"g:\\h.ogg", NULL);
>
> locHR = locGraphBuilder->QueryInterface(IID_IMediaControl,
> (void**)&locMediaControl);
>
> locHR = locMediaControl->Run();
>
> //Wait till you enter a number and press enter to exit.
> int x;
> cin>>x;
> locMediaControl->Release();
> locGraphBuilder->Release();
> CoUninitialize();
>
> return 0;
> }
>
> Enjoy,
>
> Zen.
>
>
>
> _______________________________________________
> Vorbis-dev mailing list
> Vorbis-dev at xiph.org
> http://lists.xiph.org/mailman/listinfo/vorbis-dev
>
>
>
More information about the Theora-dev
mailing list