[SDL] How to set SDL_Surface position (x,y) in the screen

Gabriele Greco gabriele.greco at darts.it
Thu May 8 08:38:49 PDT 2008


>
> What I want to achieve is to display a different video file in each
> physical display.
>
> If I have, say, 7 displays in a xinerama configuration, I can create a
> SDL_Surface that covers the 7 displays.


Your only chance with 1.2.x SDL is to launch 7 processes, and do a video
decode in every process, every app could be easily directed to the correct
display by prefixing the command invocation with the correct DISPLAY
enviroment variable.

Then, if I have 7 video files, I could decode all of them simultaneously,
> and draw the frames of video 1 in display 1, the frames of video 2 in
> display 2, etc., just having 7 SDL_DisplayYUVOverlay functions with the
> correct SDL_Rect parameter for each one, so the video is displayed exactly
> in the display I want for each video.


If videos are not too big (let's say  640x480), you can easily do it with a
decent dual core CPU.

We have an app that decodes up 12 MPEG1 video streams (352x288/25fps) on a
single big overlay (accelerated through xv). The output is displayed on big
hd TVs.

We used for the prototype a 3.0ghz HT P4, that was barely sufficient, then
dual core cpus started to be widely available and our current production
machine is a mac mini (with ubuntu linux), that does the job with less of
50% of average cpu load.

-- 
Bye,
 Gabry
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.libsdl.org/pipermail/sdl-libsdl.org/attachments/20080508/0f288c73/attachment.htm>


More information about the SDL mailing list