Re: IVideoWindow on WM5
- From: "Brian Burgess" <bburgess66@xxxxxxxxxxx>
- Date: Thu, 9 Feb 2006 22:06:26 +0800
Sure Gary thx .. I have a function called PlayFile in a couple apps: 1 on
WinXP and the same ported to WM5. This function is taken from the 'Video
Window' sample in MSDN for Direct Show as follows:
**********************************
void PlayFile ()
{
HRESULT hr;
// Create the filter graph manager and render the file.
CoCreateInstance(CLSID_FilterGraph, NULL, CLSCTX_INPROC, IID_IGraphBuilder,
(LPVOID*)&m_pGraph);
hr = m_pGraph->RenderFile(m_pStreamName, NULL);
if(hr != S_OK)
MessageBox(NULL,"Video filters could not connect","DSVideo",MB_OK)
// Specify the owner window.
IVideoWindow *pVidWin = NULL;
m_pGraph->QueryInterface(IID_IVideoWindow, (LPVOID*)&pVidWin);
pVidWin->put_Owner((OAHWND)m_hWnd); //m_hWnd is in the ATL control in this
case
pVidWin->put_WindowStyle(WS_CHILD | WS_CLIPCHILDREN | WS_CLIPSIBLINGS);
SIZEL Size;
AtlHiMetricToPixel(&m_sizeExtent, &Size);
pVidWin->SetWindowPosition(2,2,Size.cx-2,Size.cy-2);
// Set the owner window to receive event notices.
m_pGraph->QueryInterface(IID_IMediaEventEx, (LPVOID*)&m_pEvent);
m_pEvent->SetNotifyWindow((OAHWND)m_hWnd, WM_GRAPHNOTIFY, 0);
// Run the graph.
m_pGraph->QueryInterface(IID_IMediaControl, (LPVOID*)&m_pMediaControl);
m_pMediaControl->Run();
}
**********************************
This function works flawlessly in WinXP, but fails everytime in WM5 with the
following error code in 'hr' after running 'hr = m_pGraph->RenderFile':
0x80040218
The video files being tested in WM5 are identical to the ones in WinXP.
Also the same files do play in Windows Media Player on the WM5.
This HRESULT error code being returned is: VFW_E_CANNOT_RENDER No
combination of filters could be found to render the stream.
so what I would like to know is: Do I merely need to make the filter graph
manually? And, if so, how?.. like what filter names to use, what CLSIDs ,
Pins , etc .. etc .. or at least how to find out .. I am more than happy
to do homework .. just need to know where to look.
Many thx for the insights..
-BB
"Gary Daniels [MS]" <garydan@xxxxxxxxxxxxxxxxxxxx> wrote in message
news:OK1r9SOLGHA.1312@xxxxxxxxxxxxxxxxxxxxxxx
IVideoWindow is implemented in the video renderer filter and is supported.
WM5 is the first release supporting DirectShow, which may be the reason
for the documentation inconsistencies. Some background on what you're
doing may help with determining why the video doesn't display.
Gary Daniels
Windows CE Multimedia and Graphics
This posting is provided "AS IS" with no warranties, and confers no
rights.
You assume all risk for your use.
"Brian Burgess" <bburgess66@xxxxxxxxxxx> wrote in message
news:OPqbwSHLGHA.2780@xxxxxxxxxxxxxxxxxxxxxxx
Hi all,
Does anyone here know if the IVideoWindow is supported in WM5? The docs
included with the SDK seem to be in conflict with the docs on the MSDN
site. Combining this with the fact that I cant get the video to display
.. I'm wondering if it is just an empty implementation.
Many thx
-B
.
- Follow-Ups:
- Re: IVideoWindow on WM5
- From: Gary Daniels [MS]
- Re: IVideoWindow on WM5
- References:
- IVideoWindow on WM5
- From: Brian Burgess
- Re: IVideoWindow on WM5
- From: Gary Daniels [MS]
- IVideoWindow on WM5
- Prev by Date: Connecting Pocket PC & SQL Server 2000 through OleDB
- Next by Date: How to intercept button pressed or released?
- Previous by thread: Re: IVideoWindow on WM5
- Next by thread: Re: IVideoWindow on WM5
- Index(es):
Loading