[vlc-devel] re : VLC DirectX programing

MaFai zh-ma at hkbn.com.hk
Mon May 19 13:56:12 CEST 2003


Hello, gbazin,

Thanks for your help.Your code doesn't work too,this is very curious.I try that code in example/ddraw1a.bpr project in CBuilder,it work smoothly.I only want to add the capture function in vlc for my personal vlc.But the code really beat me.
Do any other idea to capture the frame to bmp file except this way?

I try to capture the specified video screen,adding code in interface in CBuilder.It work,but not professional.So I try to get the video DC to generate bmp file.For the permission,I know the vlc would never provide the capture function in new version.So may you find the problem or give me any idea about this?


======= At 2003-05-19, 10:26:00 you wrote: =======

>A correct code snippet would be this one:
>
>HDC DC;
>int xScrn,yScrn;
>HRESULT dxresultcut;
>
>dxresultcut = IDirectDrawSurface2_GetDC(p_pic->p_sys->p_surface,&DC);
>
>if(dxresultcut != DD_OK)
>{
>    msg_Err(p_vout,"Can not get DC");
>}
>
>xScrn = GetDeviceCaps(DC, HORZRES);
>yScrn = GetDeviceCaps(DC, VERTRES);
>msg_Err(p_vout,"i i",xScrn,yScrn);
>
>IDirectDrawSurface2_ReleaseDC(p_pic->p_sys->p_surface,&DC);
>
>Hope this helps,
>
>--
>Gildas
>-- 
>This is the vlc-devel mailing-list, see http://www.videolan.org/vlc/
>To unsubscribe, please read http://developers.videolan.org/lists.html
>If you are in trouble, please contact <postmaster at videolan.org>
>
>.

= = = = = = = = = = = = = = = = = = = =
			

Best regards.				 
MaFai
zh-ma at hkbn.com.hk
2003-05-19




-- 
This is the vlc-devel mailing-list, see http://www.videolan.org/vlc/
To unsubscribe, please read http://developers.videolan.org/lists.html
If you are in trouble, please contact <postmaster at videolan.org>



More information about the vlc-devel mailing list