Click to See Complete Forum and Search --> : RenderFile() hangs with Windows CE


spendipoc
July 23rd, 2007, 01:01 PM
Hi all,
I've built a little program to play a video file, with an embedded platform running WinCE 6, using DirectShow interfaces.
Basically the core statements are the following:

/***********************************************************/
CoInitialize(NULL);
hr = CoCreateInstance(CLSID_FilterGraph, NULL, CLSCTX_INPROC, IID_IGraphBuilder, (void **) &pGraph);
if ( FAILED(hr) ) { // add some error handling here
return -1;
}
hr = pGraph->QueryInterface(IID_MediaControl, (void **) &pMediaControl);
hr = pMediaControl->QueryInterface(IID_IMediaEventEx, (void **) &pEvent);
hr = pGraph->RenderFile(TEXT("\\HARD DISK\\MyFile.wmv"), NULL);
if (SUCCEEDED(hr)) {
hr = pMediaControl->Run();
}
/************************************************************/
This program is compiled and built correctly (it seems to be).
At runtime, however, RenderFile() never returns success, whichever format "MyFile.wmv" is, or it never returns at all!
This functions indeed has ever one of the following behaviour:
1) returns some error code, due to the file format (no decompressor, etc: this would even be correct though).
2) it hangs everything, i.e. the program never returns from RenderFile(); moreover the entire o.s. crashes (even mouse pointer goes locked), and I must restart the PC.
I'd like simply to know the reasons of this last point!!
My "test" video file is (depending on its format) about 50KB wide so I don't think that there is any hardware capability issue. By the way, the platform is a x86 single board computer Vortex SOC 133 Mhz, with 64MB of RAM (40MB free before running the program).

Every clue is appreciated
Thanks in Advance
Spendipoc