0

Is there any way to get window handle of the window which is currently playing video. This is the only information my program will be having.


updated to include info incorrectly provided as an answer

I think I should explain what exactly I want to achieve here.

I actually wanted to share/stream my DVD data to the remote machine. Currently what I am doing is, I am capturing the screen/video into to still frames and sending it to remote system but now I don't want to see the playing video on my host machine. I could think of few probable solutions,

1.) If we can capture the data of a hide/minimized window.

Did some investigation and seems it is not possible. Please add your thoughts.

2.) Convert the DVD data format into ffmpeg format and stream it.

Don't have any idea if we will be allowed to convert the data format. If most of the DVD formats allow to covert then I can go for this option but not sure how complicated it could be.

3.) Will create some virtual surface play the DVD data to that surface and capture the screen of that surface.

Again not sure if DVD will play on that virtual/fake surface created by kernel mode driver.

jschmier
  • 15,458
  • 6
  • 54
  • 72
sarbojit
  • 151
  • 3
  • 6

1 Answers1

0

There are probably three main playback engines used on windows; DirectShow (WMP, MPC) , ffmpeg (VLC, MPlayer) and QuickTime.

If you look closer at DirectShow will will see that it supports hardware overlays, windowed and windowless rendering and Direct3d surface support.

Even if you focus on a single app you are going to have problems since you don't know what kind of renderer is in use. You might be able to find a child window that always has the same position and dimensions as the video, but then you are relying on things that could change between versions etc.

Anders
  • 97,548
  • 12
  • 110
  • 164
  • And AVI and MediaFoundation - there are at least 4 different media layback engines just from Microsoft, not to mention the flash video playback engine and the video rendering engines used by webkit and gecko based browsers. – Larry Osterman May 04 '11 at 13:24
  • @Larry: Yes but I did not see the point of going into details about MCI/VFW/ActiveMovie/DirectShow/MediaFoundation. Flash and browsers is a good point though. – Anders May 04 '11 at 16:25
  • Calling out 3 implies that this is a containable problem and it's not. – Larry Osterman May 05 '11 at 03:14