you for your answer, it’s been very helpful.
I have another question though.
What I want to achieve is to display a different video file in each
If I have, say, 7 displays in a xinerama configuration, I can create a
SDL_Surface that covers the 7 displays.
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.
I could do that in different threads, for exmple.
What worries me is the performance decrease that this could cause in the
program, since each video has to be played at 25 frames/seg. I would
have seven threads, and all of them should have to draw a frame in less
than 1/25 s.
Do you think that this is possible to do? Is there any problem that I
Than you very much.> ----- Original Message -----
From: http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org (terleira iraz?bal, enrique) (@Enrique_Terleira)
To: sdl at lists.libsdl.org http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org
Sent: Wednesday, May 7, 2008 2:21:11 AM
Subject: [SDL] How to set SDL_Surface position (x,y) in the screen
/In SDL a surface is set up by SDL_SetVideoMode(int width,
/int height, int bpp, Uint32 flags)
/But how do you specify
/the position where you want that surface to be in your screen?
/For example, in X, if
/you have a xinerama configuration with two displays (one besides the other in
/xinerama configuration) and you want your SDL surface to cover exactly the
/second display, ?how
/can you do that?
plus the X, Y coords of the top-left corner. Not sure what the syntax for string concatenation is for C.
For example, if you wanted something to cover an entire secondary
screen that’s positioned to the right of your main screen, and the main
screen is 1240 pixels wide, the string you’d need to pass is
/I have several displays,
/not only two, and my idea is to play a different video with SDL in each
/by means of the xinerama capabilities, positioning one SDL surface in each display.
/means having several surfaces and set the surface position independently
/for each one. Is this
/Currently no. This will be possible under SDL 1.3 when it gets released, though.