Re: Error 8 Not enough storage from IMediaControl->Run
From: Michael Schwab (michael.schwab_at_cobecv.com)
Date: 01/06/05
- Next message: S.Kumar: "IrDA"
- Previous message: Louis Clausen [MS]: "Re: ChangeDisplaySettingsEx and GAPI"
- In reply to: Michael Schwab: "Re: Error 8 Not enough storage from IMediaControl->Run"
- Messages sorted by: [ date ] [ thread ]
Date: Wed, 5 Jan 2005 17:17:59 -0700
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();
"Michael Schwab" <michael.schwab@cobecv.com> wrote in message
news:eZnSf338EHA.2876@TK2MSFTNGP12.phx.gbl...
> 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.
>
> "Michael Schwab" <michael.schwab@cobecv.com> wrote in message
> news:ePSaeY28EHA.2572@tk2msftngp13.phx.gbl...
> > 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
> >
> >
>
>
- Next message: S.Kumar: "IrDA"
- Previous message: Louis Clausen [MS]: "Re: ChangeDisplaySettingsEx and GAPI"
- In reply to: Michael Schwab: "Re: Error 8 Not enough storage from IMediaControl->Run"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|