discuss-gnustep
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

VideoPlayer.app - Some questions and a POD


From: Raffael Herzog
Subject: VideoPlayer.app - Some questions and a POD
Date: Tue, 15 Jul 2003 18:07:37 +0200

Hi again,

The proof of concept is somewhat running, and I already learned a lot about OpenStep programming :) However, I still need help with some problems.


First of all, a feature request:

The X11 backend needs to be thread-safe, if not, then bye bye VideoPlayer.app. I started to make the backend thread-safe, so now it works with VideoPlayer.app, but it locks up about any other application. :) Looks like I forgot some calls to XUnlockDisplay()...

If there are no objections, I continue with my work on the backend and submit a patch when it's ready (or even better, someone who knows the backend very well does it).

I understand that GNUstep itself doesn't need it, but as soon as there is more than thread using X11 (which could also happen with other projects, e.g. a fictive project GSLyX), the backend needs to lock the display properly.

Comments?


And now the questions:

1. Repainting

I'm having some strange repaint problems. I'm really *very* sure that the coordinates passed to libxine are correct, so I don't think there's something wrong there. It's certainly no locking problem, locking is done properly. Here's a screenshot of VideoPlayer.app before it had to repaint it's video window:

 http://dev.raffael.ch/VideoPlayerShot-ok.png

This is a screenshot of the video window after I resized it some times (you get similiar effects by just raising it):

 http://dev.raffael.ch/VideoPlayerShot-broken.png

I also tried to put everything into a NSBox to make sure that there's some opaque view behind it, but this did't help, neither.

Any ideas what this could be? I myself am not really sure whether it's xine or whether there's something strange going on in GNUstep - although, as I already said, Xine *always* receives the correct coordinates... IMHO... :)

I'm using the art backend, the window was set to NonRetained and OneShot when I made these screenshots. Exactly the

If I set the window it to Retained or Buffered (with or without OneShot, doesn't matter), it's getting better, however, there are still some problems:

- Sometimes, the buffer gets flushed too late and the xine stuff gets erased, but no black areas where there shouldn't be any. - I don't receive enough repaint events (notably, the expose events are missing). - When I now start a background thread that makes Xine repaint periodically, the effect is back.

I think, I'll get the best results with NonRetained and Non-OneShot, like this I receive exatly the repaints I need - however, the effect is still the same. Fiddling with useOptimizedDrawing: didn't change anything.

Any ideas? Any pointers what I can do to find out more about the problem would be helpful, too.


2. Screen coordinates

I checked that the screen coordinates that libxine receives from me are correct. However, I just assume that no coordinate system is scaled, which is a hack. So, what's the best way to convert view coordinates to screen coordinates? I need the following information:

- Position of the VideoView relative to the top left corner of the contents of the window in pixels.
- Size of the VideoView in pixels.
- Position of the top left corner of the windows contents relative to the top left corner of the screen in pixels.

I tried to use convertBaseToScreen, but this only gives me garbage. (Why? Isn't that one supposed to do exactly what I want?)


3. Window decorations

I need the sizes of the window decorations (for the position of the windows contents). My title bar has a height of 19 pixels, which is currently hardcoded. Can I get these informations somehow?


cu & TIA,
  Raffi

--
 The difference between theory and practice is that in theory, there is
                no difference, but in practice, there is.

Raffael Herzog - address@hidden - http://www.raffael.ch - ICQ #67961355





reply via email to

[Prev in Thread] Current Thread [Next in Thread]