DirectX plugins

Xavier Marchesini xav at via.ecp.fr
Fri May 18 09:15:43 CEST 2001


On Fri, May 18, 2001, Gildas Bazin wrote:

> This what I was planning to do: fall back using a plain DirectDraw surface
> to copy the RGB converted pictures. And at one time it was kinda working
> with my plugin but I was writting directly into the DirectDraw primary
> surface and I don't think it's something that should be done.

I totally agree with you on that point. What should be done is using at
least two buffers, one is being shown at the screen while the other is
being filled with the next image.

> The simplest way to handle that I suppose would be to create a double
> buffered secondary surface in video memory if possible, and to copy the RGB
> pictures into these surfaces (buffers). DirectDraw would then take care of
> the blitting between these surfaces and the primary surface. I guess in a
> normal situation this blitting would be hardware accelerated and thus won't
> cost too much.

In that case we just would have to flip between the surfaces ; I don't
think there would be any blitting.

> I don't think SDL is needed anymore, because it is basically doing the same
> as the directx plugin but with more overhead.

Yep, but SDL *does* emulate overlay (err ... I'm not sure, am I saying
something wrong ?)

> The performance seems to be correct enough, even though I haven't test it
> with a real DVD (I've been  using the THX vob trailer ;-)

Let's be patient, in a couple of weeks, the DVD input should be ported
under Windows (hmmm Babal, do you hear me ?)

> But it could still improve because we make a copy of the YUV picture which
> isn't required. The plugins receives a YUV buffer containing the picture
> and copy it to another buffer. This step isn't required but instead the
> mpeg decoder should store the YUV picture directly into the Overlay buffer.

That's what is planned in the Video Output 4.

> [...]

> I've got nothing against a Bcc port, but do you plan to keep the mingw32
> support. Personnaly I feel better when using GNU tools and I must say I
> very much like to be able to cross-compile the Win32 VLC on my linux
> computer.

As I don't know mingw32 at all, I can't really answer to that question.
Some "wise" people will certainly tell us if cross-compiling is such a
good idea or not.In my opinion, I'd rather not cross-compile the VLC.
But feel free to carry on using mingw32 :-)

> Oh too bad :_(
> But even if the video output interface is changed, it shouldn't be too hard
> to adapt the plugin to the new scheme because all the basic features should
> stay the same: YUV overlay or surface blitting... ( just trying to convice
> you ;-)

Actually, your code will surely be used in the new version of the
DirectX plugin :-)

[ The problem is that I done a DirectX output compliant with the Video
Output 3, and I didn't commited it because Sam planned to change the
Video Output. Our plugins were very similar, but I must admit that yours
seems better :)]

The adaptation of your code shouldn't be so hard, and I will implement
it in the new DirectX plugin (err, only the DirectDraw, I just can't
understand how DirectSound functions :-))

-- 
xav





More information about the vlc-devel mailing list