I would like to capture the video frames into a CBitmap object for processing. The process requires a CBitmap.
"AUGE_OHR" wrote:
[Quoted Text] > hi, > > >I would like to capture video frames using the WM Player SDK (Player > >Object). > > Is it possible? > do you want to make a snapshot (BMP) from running WMP ? > > if yes try to press PrintScreen while WMP is running and have > a look into your ClipBoard. If you got only a black Square > at that place where you have WMP, than you have to set > the property of your VideoCard to "Overlay off" and/or > "Hardward Accelerator" to none. > > while PrintScreen will give you the hole Desktop you > have to write something that use WMP Size only. > > WMP SDK itself have no Methode so you have to do : > > 1.) set focus on WMP Object > 2.) create a new Bitmap Object > 3.) GraBitBlt WMP content into Bitmap Object > 4.) save Bitmap > > attached Xbase++ Code might give you some Idee > *** snip *** > .... > aSize := ::oWMP:currentsize() > // 1st set focus to player > setAppFocus( ::oWMP ) > // make snapshot > WMP2Bitmap( ::oWMP, { 0, 0, aSize[1],aSize[2] } ) > .... > > FUNCTION WMP2Bitmap( oSourceArea, aRect) > LOCAL oTargetPS := XbpPresSpace():new():create() > LOCAL oBitmap := XbpBitmap():new():create() > LOCAL nSizeX := aRect[ 3 ] - aRect[ 1 ] > LOCAL nSizeY := aRect[ 4 ] - aRect[ 2 ] > LOCAL oPS := NIL > .... > oPS := oSourceArea:lockPS() > oBitmap:presSpace( oTargetPS ) > oBitmap:make( nSizeX, nSizeY ) > GraBitBlt( oTargetPS, oPS, { 0, 0, nSizeX, nSizeY }, aRect ) > .... > oBitmap:SaveFile(cSavePic,XBPBMP_FORMAT_BMP) > .... > *** eof *** > greetings by OHR > Jimmy > > >
|