Discussion:
problem in resizing video to 176*144 on windows mobile 5 using dshow
(too old to reply)
Pavan
2006-11-16 08:03:14 UTC
Permalink
i m developing application to play avi file on smartphone(WM 5.0) using
dshow interfaces.
i successfully rendered avi files of any size.but as aplication has
constraint of displaying avi file to size 176*144 i m finding
difficult in doing so if the file size greater or lesser than 176*144.

if play video file of size 128*96 then it doesnt get stretch
properly.same if size is greater than 176*144.

i m using setwindowposition() to adjust the size of file,but somehow
its not working.
i m displaying video on dialog,and set dialog as owner of videowindow.

i searched a lot on groups but not satisfied yet.

hndDLG=handle of dialog.

hres =
CoCreateInstance(CLSID_FilterGraph, NULL,CLSCTX_INPROC_SERVER,
IID_IGraphBuilder, (void **)&pGraph);

hres = pGraph->QueryInterface(IID_IVideoWindow, (void **)&pVidWin);
hres = pGraph->QueryInterface(IID_IMediaControl, (void
**)&pMediaControl);
hres = pGraph->QueryInterface(IID_IBasicVideo, (void **)&pBV);
hres = pGraph->QueryInterface(IID_IBasicAudio, (void **)&pBA);
hres = pGraph->QueryInterface(IID_IMediaEventEx, (void **)&pEvent);
hres = pGraph->QueryInterface(IID_IMediaSeeking, (void **)&pMS);

hres = pGraph->RenderFile(szFileName, NULL);

hres = pVidWin->put_Owner((OAHWND)hndDLG);
hres = pVidWin->put_WindowStyle(WS_CHILD|WS_CLIPSIBLINGS |
WS_CLIPCHILDREN);

and in WM_SIZE i had set position of videowindow.

WM_SIZE:
pVidWin->SetWindowPosition(10, 10,
176,144);

thanks in advance.
The March Hare [MVP]
2006-11-16 15:27:16 UTC
Permalink
Post by Pavan
i m developing application to play avi file on smartphone(WM 5.0) using
dshow interfaces.
...

How did you miss all the posts in this newsgroups that say "This newsgroup
is no longer active"?

I recommend you read one of them.
--
Microsoft MVPs: http://www.microsoft.com/mvp and
MVPs.org site http://www.mvps.org
My dshow site: http://tmhare.mvps.org
Loading...