Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Windows Media Player overlay surface

22 views
Skip to first unread message

Priya

unread,
Nov 25, 2009, 7:46:26 AM11/25/09
to
Hi All,
I am using hook to capture Windows Media Player overlay surface.
I tried to hook DirectDrawCreate() in ddraw.dll. But DirectDrawCreate() is
not called by wmp.
Can somebody let me know which methods to hook in ddraw.dll to capture the
video frame.

Thanks,
Supriya.

__________ Information from ESET NOD32 Antivirus, version of virus signature database 4634 (20091124) __________

The message was checked by ESET NOD32 Antivirus.

http://www.eset.com


Alessandro Angeli

unread,
Nov 25, 2009, 11:38:39 AM11/25/09
to
From: "Priya"

> I am using hook to capture Windows Media Player overlay
> surface. I tried to hook DirectDrawCreate() in ddraw.dll.
> But
> DirectDrawCreate() is not called by wmp.
> Can somebody let me know which methods to hook in
> ddraw.dll to capture the video frame.

Since v9 of WMP, it will use Direct3D9 if available. Are you
sure yours is using a DirectDraw overlay surface? It's easy
to discover: if you can grab the picture using the
PrintScreen key, it is *not* an overlay,

--
// Alessandro Angeli
// MVP :: DirectShow / MediaFoundation
// mvpnews at riseoftheants dot com
// http://www.riseoftheants.com/mmx/faq.htm


Priya

unread,
Nov 25, 2009, 11:43:08 PM11/25/09
to
Thanks for your response.
I am sure that my WMP is using overlay.I tested with PrintScreen. It is
giving blank picture.
If I uncheck "Use Overlays" option, I am able to capture image.

Thanks.

"Alessandro Angeli" <nob...@nowhere.in.the.net> wrote in message
news:eQrsdPfb...@TK2MSFTNGP05.phx.gbl...

> __________ Information from ESET NOD32 Antivirus, version of virus

> signature database 4636 (20091125) __________


>
> The message was checked by ESET NOD32 Antivirus.
>
> http://www.eset.com
>
>
>

__________ Information from ESET NOD32 Antivirus, version of virus signature database 4636 (20091125) __________

Tim Roberts

unread,
Nov 26, 2009, 11:54:31 PM11/26/09
to
"Priya" <sup...@yahoo.com> wrote:
>
> I am using hook to capture Windows Media Player overlay surface.
>I tried to hook DirectDrawCreate() in ddraw.dll. But DirectDrawCreate() is
>not called by wmp.
>Can somebody let me know which methods to hook in ddraw.dll to capture the
>video frame.

None. Remember, there is no "CopyImage" API that gets called. The app
calls DirectDraw or Direct3D originally, and gets a pointer to an overlay
surface or a texture. After that, the app just draws frames directly into
the overlay or texture memory as if it were another chunk of memory. You
can't intercept that.

Look, you need to face a simple fact here. Hollywood does not want you to
be able to copy individual frames from videos, because it makes it way too
easy to pirate copyrighted material. Hollywood's lawyers have strong-armed
Microsoft's engineers into making that very difficult. They are WAY
smarter than you are.
--
Tim Roberts, ti...@probo.com
Providenza & Boekelheide, Inc.

Priya

unread,
Nov 27, 2009, 4:28:51 AM11/27/09
to
Hi Sir, actually my aim is to capture desktop screenshot whatever is present
on the desktop.
If media player is running some video, desktop sceenshot ( video rectangle )
is coming blank.
I found several screen capture softwares doing that.


"Tim Roberts" <ti...@probo.com> wrote in message
news:gkmug5hu59ubeli4e...@4ax.com...

> __________ Information from ESET NOD32 Antivirus, version of virus

> signature database 4640 (20091126) __________


>
> The message was checked by ESET NOD32 Antivirus.
>
> http://www.eset.com
>
>
>

__________ Information from ESET NOD32 Antivirus, version of virus signature database 4640 (20091126) __________

Alessandro Angeli

unread,
Nov 27, 2009, 1:09:46 PM11/27/09
to

From: "Priya"

> Thanks for your response.
> I am sure that my WMP is using overlay.I tested with
> PrintScreen. It is giving blank picture.
> If I uncheck "Use Overlays" option, I am able to capture
> image.

Are you running on XP or Vista?

Are you playing a DRM-protected WMV video?

Can other screen capture apps grab the overlay?

Remember that, to hook the overlay surface, you *must* do it
from inside WMP's process, not yours, which means that you
need to inject your code in that process and that usually
requires that your app runs before WMP starts.

aaa

unread,
Nov 30, 2009, 5:27:01 AM11/30/09
to
I am working on XP and some applications able to capture the overlay while
capturing screen.


"Alessandro Angeli" <nob...@nowhere.in.the.net> wrote in message

news:%23KEV$z4bKH...@TK2MSFTNGP06.phx.gbl...

> __________ Information from ESET NOD32 Antivirus, version of virus

> signature database 4641 (20091127) __________


>
> The message was checked by ESET NOD32 Antivirus.
>
> http://www.eset.com
>
>
>

__________ Information from ESET NOD32 Antivirus, version of virus signature database 4647 (20091129) __________

Alessandro Angeli

unread,
Nov 30, 2009, 2:34:24 PM11/30/09
to
From: "aaa"

> I am working on XP and some applications able to capture
> the overlay while capturing screen.

Then you should be able to do it if you follow the
guidelines in my previous message.

Priya

unread,
Nov 30, 2009, 11:20:59 PM11/30/09
to
Thank you Angeli. I will try that.

"Alessandro Angeli" <nob...@nowhere.in.the.net> wrote in message

news:unSMpQf...@TK2MSFTNGP05.phx.gbl...

> __________ Information from ESET NOD32 Antivirus, version of virus

> signature database 4650 (20091130) __________


>
> The message was checked by ESET NOD32 Antivirus.
>
> http://www.eset.com
>
>
>

__________ Information from ESET NOD32 Antivirus, version of virus signature database 4650 (20091130) __________

0 new messages