How to access the content of BITBLT ?

Blitz3D Forums/Blitz3D Userlibs/How to access the content of BITBLT ?

As I explained earlier, I needed this Bitblit access to grab the frames of a movie quickly that was played using the MciSendString commands of the Win Api.

I have made it work, although the long way over a compatible bitmap made the whole thing very slow, in the end it was almost as slow as using GetPixel to grab the frames (more than a second for one frame in PAV DV Format, that's 720*576 pixies)

The problem was, Mci didn't play the movie in the blitz window (altough I told it to do so, using the window parent feature of mci aviplay), instead it played it on some kind of overlay. This resulted not only in continous Z-Fighting and flashing of the Blitzwindow and the Overlay, it was also impossible to grab the movie frames in the blitzwindow, using copyrect or readpixelfast. That's why I introduced Bitblit, hoping this would at least let me access the pixels. But Bitblit still blitted only to some kind of canvas (that's why I asked this question, how to access the content of blitblit) and this was driving me crazy. As I said, in the enf^d it worked, but very slowly.

Well, the good news is, it works now without to use Blitblit at all. Only problem: it works only in fulscreen mode. If I use mci to draw the movie onto the blitz window in fullscreen mode, I CAN grab it on the frontbuffer, using copyrect. And it's blitzning fast. All I have to do after a Step Command, that will show the next frame of the movie, is wait a few millisecs to let windows draw the frame before I can grab it (to prevent dropouts). But, depending on the machine speed, this is only a dozen or so millisecs. I Still have to optimize the dropout detection, but basicly it works very well.

Of course, I wanted to use a windowed Mode since it's gonna be a tool, but hey - probably I am gonna grab the desktop as an image und use the bottom bar ON the fullscreen window to create the fake impression of a windowed app, and as soon as the user clicks the bottom bar, I'll minimize the fullscreen app. Not sure of this right now.