DirectX plugins
Gildas Bazin
gbazin at netcourrier.com
Fri May 18 11:16:15 CEST 2001
Sorry to break the thread, but I'm writing this from a Web account.
----- Original Message -----
From: "Xavier Marchesini" <xav at via.ecp.fr>
> > 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.
>
If you are using a fullscreen mode, you can do that of course, and there will be less overhead. But I was talking about a windowed mode.
In windowed mode, your primary surface is your entire desktop, and you don't really want to draw directly to it (too dangerous and you can't use double buffering this way). So what you do is create a secondary surface which basically is your video picture buffer. This secondary surface will then have to be copied onto the primary surface (what I called blitting but I don't know if it's really the right expression). Well at least this is what I understand of it.
> > 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 ?)
>
Yes I think you're right, but it shouldn't be too much troubles now to add support for the case where overlay is not supported in hardware. And after that you don't have any dependencies on the SDL dlls.
> > 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 ?)
>
What ?? This is a great news.
I was thinking about working on this once the directx plugins will be finished. I don't really have any idea yet on how to do this... but it seemed to me that the only way to do the key negotiation with the drive is to use adaptec WINASPI (which of course is not present on all Windows, eg. 2000 and NT I think don't have them)
I would be glad to know how you are or plan to do this.
> > 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 :-)
At least when cross-compiling you can use autoconf and configure without any problems ;-)
And the compilation under Windows takes ages.
I suppose these problems could be solved... but I still prefer to use Linux when developping :-)
>
> > 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 :-))
If you need any help (some more developping time) I will be glad to give you a hand.
Gildas
----- La messagerie itinérante sans abonnement NetCourrier -----
Web : www.netcourrier.com - Minitel : 3615 NETCOURRIER
Téléphone : 08 36 69 00 21
More information about the vlc-devel
mailing list