Discussion:
Error 8 Not enough storage from IMediaControl->Run
(too old to reply)
Michael Schwab
2005-01-05 20:35:37 UTC
Permalink
I'm trying to run the usual DirectShow example with eVC++ 4.0 on CE 4.2.
The CoInitialize, CoCreateInstance, and RenderFile are working, and a blank
window appears to be positioned correctly, but when I try

hr = pMediaControl->Run();
if (FAILED(hr))

it fails, and GetLastError returns error 8 - Not enough storage to process
this command.

I tried this with 3 different files (2 mpg, 1 avi, running from 1 to 6 Mb)
all of which play under MediaPlayer (on CE) just fine.

What kind of "storage" is this error referring to? When I go to
ControlPanel->System Memory tab, I have plenty of both storage and program
memory available (40 Mb each) - more than enough to hold the entire movie
file!

BTW, the same code works just fine under WinXP with DirectX 9.0b.

My PB build has all DirectShow stuff included, and I believe this example
was working last summer, when I last tried it.

Any suggestions on how to fix this?

Michael Schwab
Michael Schwab
2005-01-05 23:25:39 UTC
Permalink
Actually, the hr returned from Run() is 8007000e, but that's still
E_OUTOFMEMORY.
This happens even the first time I run the program after a reboot.
(Maybe GetLastError() doesn't work with these DirectShow calls?)

What memory am I out of?

The code is basically the initial DSRender.cpp example from the Pesce book.
Post by Michael Schwab
I'm trying to run the usual DirectShow example with eVC++ 4.0 on CE 4.2.
The CoInitialize, CoCreateInstance, and RenderFile are working, and a blank
window appears to be positioned correctly, but when I try
hr = pMediaControl->Run();
if (FAILED(hr))
it fails, and GetLastError returns error 8 - Not enough storage to process
this command.
I tried this with 3 different files (2 mpg, 1 avi, running from 1 to 6 Mb)
all of which play under MediaPlayer (on CE) just fine.
What kind of "storage" is this error referring to? When I go to
ControlPanel->System Memory tab, I have plenty of both storage and program
memory available (40 Mb each) - more than enough to hold the entire movie
file!
BTW, the same code works just fine under WinXP with DirectX 9.0b.
My PB build has all DirectShow stuff included, and I believe this example
was working last summer, when I last tried it.
Any suggestions on how to fix this?
Michael Schwab
Michael Schwab
2005-01-06 00:17:59 UTC
Permalink
Suspecting heap problems, I did repeated malloc/free's before each
execution of the code to see how big my heap was.
Before the first execution, I was able to malloc up to 4.4 Mb.
After the first 8007000e error from Run, on the second execution
I was only able to malloc 3.1 Mb. The third time it was 2.1 Mb,
and the fourth time was 1 Mb (and RenderFile failed this time).

So something is eating up the heap space, even though I do all
the cleanup every time:
pControl->Release();
pEvent->Release();
pGraph->Release();
pControl = NULL;
pEvent = NULL;
pGraph = NULL;
CoUninitialize();
Post by Michael Schwab
Actually, the hr returned from Run() is 8007000e, but that's still
E_OUTOFMEMORY.
This happens even the first time I run the program after a reboot.
(Maybe GetLastError() doesn't work with these DirectShow calls?)
What memory am I out of?
The code is basically the initial DSRender.cpp example from the Pesce book.
Post by Michael Schwab
I'm trying to run the usual DirectShow example with eVC++ 4.0 on CE 4.2.
The CoInitialize, CoCreateInstance, and RenderFile are working, and a
blank
Post by Michael Schwab
window appears to be positioned correctly, but when I try
hr = pMediaControl->Run();
if (FAILED(hr))
it fails, and GetLastError returns error 8 - Not enough storage to process
this command.
I tried this with 3 different files (2 mpg, 1 avi, running from 1 to 6 Mb)
all of which play under MediaPlayer (on CE) just fine.
What kind of "storage" is this error referring to? When I go to
ControlPanel->System Memory tab, I have plenty of both storage and program
memory available (40 Mb each) - more than enough to hold the entire movie
file!
BTW, the same code works just fine under WinXP with DirectX 9.0b.
My PB build has all DirectShow stuff included, and I believe this example
was working last summer, when I last tried it.
Any suggestions on how to fix this?
Michael Schwab
Loading...