Pavan
2006-11-16 08:03:14 UTC
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.
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.