I once found some code in C and asm that would play an mp3 file but I couldn't get it to work. I think some files where missing. It was from Xing player (see attachment). But I wouldn't recomend it to anyone. And that is only the codec for mp3, no vision only sound. But I also read somewhere that the codec for divix is available on the net.
I also don't know about Mediaplayers, But I think very few MP are made from the ground up. Most of them uses Windows Mediaplayer or Directx. I think even Win MP and the playa (from the Divx website) uses directx. I once screwed up my DirectX a bit and all the players a I tried had the same problem (they kept showing the frames, very anoying). That is why I think they all use directx. So I wouldn't recomend building from scratch (but who am I )
There is a source example on how to play avi, mpeg and mp3 (and other media types) in the DirectX SDK (under DirectShow)
if you're interested, here is a bit of my mp3playing code (if you want the full code, just ask and I'll post it.)
It basicly is your friend(sunlight)'s code but adapted to my needs
Code:
IPin *pPin;
::CoInitialize(NULL);
CoCreateInstance(CLSID_FilterGraph, NULL,CLSCTX_INPROC, IID_IGraphBuilder,(void **)&g_pGraphBuilder);
g_pGraphBuilder->QueryInterface(IID_IMediaControl,(void **)&g_pMediaControl);
g_pGraphBuilder->AddSourceFilter(wFilename, wFilename, &pSource);
pSource->FindPin(L"Output", &pPin);
g_pGraphBuilder->Render(pPin);
//IBasicAudio *iba=NULL;
LONGLONG llPos = 0;
g_pGraphBuilder->QueryInterface(IID_IMediaSeeking, (void **)&g_pMediaSeeking);
g_pGraphBuilder->QueryInterface(IID_IMediaEventEx, (void **)&g_pMediaEventEx);
g_pGraphBuilder->QueryInterface(IID_IMediaControl, (void **)&g_pMediaControl);
//g_pGraphBuilder->QueryInterface(IID_IBasicAudio, (void **)&iba);
g_pMediaSeeking->SetPositions(&llPos, AM_SEEKING_AbsolutePositioning, &llPos, AM_SEEKING_NoPositioning);
g_pMediaEventEx->SetNotifyWindow((OAHWND)m_hWnd, WM_GRAPHNOTIFY, 0);
g_pMediaControl->Run();
//iba->put_Balance(10000);
Cmp3::play=true;
Cmp3::SetSoundVolume(Cmp3::soundvolume);
Cmp3::ReadMP3Tag();
SAFE_RELEASE(pPin)
in the attachment, there can be some additional files that my VC created but couldn't compile
hmmm, problem! file is to big. I'll upload it to my site and then I'll post a link