Werbung: SecurityConsole.de verwaltet Ihre Computer mit Security Essentails aus der Cloud!
30 Tage kostenfrei testen und 20% Rabatt für Ihre Bestellung mit Promocode: WBF2685582
(Promocode gültig bis 31.12.2011)

Group:  English: Entertainment » microsoft.public.windowsmedia.sdk
Thread: Frame capture methods

HTVi
TV Discussion Newsgroups

Frame capture methods
Charles Tam 6/1/2007 12:58:02 AM
I would like to capture video frames using the WM Player SDK (Player Object).
Is it possible?
If not, what are my alternatives?
RE: Frame capture methods
Charles Tam 6/1/2007 1:54:00 AM
For example, I'm using C++ IWMPPlayer4, is there a way to capture the current
displayed frame.

"Charles Tam" wrote:

[Quoted Text]
> I would like to capture video frames using the WM Player SDK (Player Object).
> Is it possible?
> If not, what are my alternatives?
Re: Frame capture methods
"AUGE_OHR" <AUGE_OHR_NOSPAM_[ at ]CSI.COM> 6/1/2007 3:02:51 AM
hi,

[Quoted Text]
>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


Re: Frame capture methods
Charles Tam 6/1/2007 5:29:00 AM
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
>
>
>

Home | Search | Terms | Imprint Contact
Newsgroups Reader - provided by WiredBox.Net
Suche nach Orten, Städten, Postleitzahlen, Vorwahlen, Kfz-Kennzeichen