Multiple SDL screens/surface

Hi,

      Is it possible to get multiple SDL surface, for a single 

process…??
I tried to get it, using pthreads, but it failed… Then i did using
fork(), so I think, I can get as many screen as I want, but for a
process, only one screen I am getting…?? Is there any alternative way
for getting many screens in a single process.?

Please guide me !!–
Lohitha R

If you want multiple windows/screen surfaces, then you have to use SDL 1.3.
It has a different API to handle this. If you just want multiple surfaces,
then use SDL_CreateRGBSurface or SDL_LoadBMP, etc.

Jonny DOn Thu, May 13, 2010 at 3:39 AM, Lohitha R <lohitha.r at globaledgesoft.com>wrote:

Hi,

    Is it possible to get multiple SDL surface, for a single

process…??
I tried to get it, using pthreads, but it failed… Then i did using
fork(), so I think, I can get as many screen as I want, but for a process,
only one screen I am getting…?? Is there any alternative way for getting
many screens in a single process.?

Please guide me !!


Lohitha R


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

Ya, thank you,

Actually, I am working on an application, which plays single video file. I
am using SDL and GTK for developing that application.
I have done like this,

  1. First I have Created GTK window.
  2. I palces gtk socket, horizontal button box having two buttons PLAY and
    STOP on gtk window.
  3. Then I took socket id and i got env variable as SDL_WINDOWID=socketid
  4. then i did putenv()
  5. Then I created SDL surface using SDL_SetVideoMode

So now I got SDL surface on GTK. Hope you got the idea of the application
UI…
-> The GTK buttons ‘PLAY’ and ‘STOP’, are used to control the video
displayed on the SDL screen.
With this I can play single video file.

Now I need, the application should play multiple video files, at the same
time.
Eg, if i need to play four different files, then splitting the screen into
four parts and play. (assuming that all video files are 320x240 width and
height).
I need Display, PLAY and STOP buttons for each display. I can do the UI
part using gtk table, but i’m not getting how to get the multiple SDL
screen and place it on the GTK. I searched in internet, but i didn’t get
the solution…

Please Guide Me…–
Lohitha R

Jonathan Dearborn wrote:

If you want multiple windows/screen surfaces, then you have to use SDL
1.3. It has a different API to handle this. If you just want multiple
surfaces, then use SDL_CreateRGBSurface or SDL_LoadBMP, etc.
Jonny D

On Thu, May 13, 2010 at 3:39 AM, Lohitha R <@Lohitha_R> wrote:

Hi,

Is it possible to get multiple SDL surface, for a single process...??
I tried to get it, using pthreads, but it failed... Then i did using
fork(), so I think, I can get as many screen as I want, but for a
process, only one screen I am getting..?? Is there any alternative way
for getting many screens in a single process.?

Please guide me !!
--
Lohitha R

_______________________________________________
SDL mailing list
SDL@lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

------------------------------------------------------------------

SDL mailing list
SDL@lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

Hello,

as somebody else tried to explain. With SDL 1.2 you’re currently using
this is not possible. What you can do here is to make a one bigger on-
screen surface that will fit 4 off-screen surface that you can blit to
this one. However I guess all of those are just software surfaces and
it’s going to be slow.

With SDL 1.3 that you need to compile yourself from HG repository you
could be able to open 4 windows for 4 video playbacks. Or you can use
one bigger video surface in 1 window again and do the playback using
OpenGL textures.

PavelOn 13.5.2010, at 16:08, Lohitha R wrote:

Ya, thank you,

Actually, I am working on an application, which plays single video
file. I am using SDL and GTK for developing that application.
I have done like this,

  1. First I have Created GTK window.
  2. I palces gtk socket, horizontal button box having two buttons
    PLAY and STOP on gtk window.
  3. Then I took socket id and i got env variable as
    SDL_WINDOWID=socketid
  4. then i did putenv()
  5. Then I created SDL surface using SDL_SetVideoMode

So now I got SDL surface on GTK. Hope you got the idea of the
application UI…
-> The GTK buttons ‘PLAY’ and ‘STOP’, are used to control the video
displayed on the SDL screen.
With this I can play single video file.

Now I need, the application should play multiple video files, at the
same time.
Eg, if i need to play four different files, then splitting the
screen into four parts and play. (assuming that all video files are
320x240 width and height).
I need Display, PLAY and STOP buttons for each display. I can do
the UI part using gtk table, but i’m not getting how to get the
multiple SDL screen and place it on the GTK. I searched in internet,
but i didn’t get the solution…

Please Guide Me…

Lohitha R

Jonathan Dearborn wrote:

If you want multiple windows/screen surfaces, then you have to use
SDL 1.3. It has a different API to handle this. If you just want
multiple surfaces, then use SDL_CreateRGBSurface or SDL_LoadBMP, etc.

Jonny D

On Thu, May 13, 2010 at 3:39 AM, Lohitha R <lohitha.r at globaledgesoft.com wrote:
Hi,

    Is it possible to get multiple SDL surface, for a single  

process…??
I tried to get it, using pthreads, but it failed… Then i did
using fork(), so I think, I can get as many screen as I want, but
for a process, only one screen I am getting…?? Is there any
alternative way for getting many screens in a single process.?

Please guide me !!


Lohitha R


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org


Pavel Kanzelsberger


E-Mail: pavel at kanzelsberger.com
Jabber: kanzelsberger at jabber.org, ICQ: 20990633

hi,
Initially I did like that only, creating one big full SDL screen, then
splitting, using different value for SDL rect, placing the video info on
the screen. How to place gtk buttons on that screen, or is there any
option in sdl for buttons ???

Regards,
Lohitha R

Pavel Kanzelsberger wrote:

Hello,
as somebody else tried to explain. With SDL 1.2 you’re currently using
this is not possible. What you can do here is to make a one bigger
on-screen surface that will fit 4 off-screen surface that you can blit
to this one. However I guess all of those are just software surfaces and
it’s going to be slow.
With SDL 1.3 that you need to compile yourself from HG repository you
could be able to open 4 windows for 4 video playbacks. Or you can use
one bigger video surface in 1 window again and do the playback using
OpenGL textures.
PavelOn 13.5.2010, at 16:08, Lohitha R wrote:

Ya, thank you,

Actually, I am working on an application, which plays single video
file. I am using SDL and GTK for developing that application.
I have done like this,
1) First I have Created GTK window.
2) I palces gtk socket, horizontal button box having two buttons PLAY
and STOP on gtk window.
3) Then I took socket id and i got env variable as
SDL_WINDOWID=socketid
4) then i did putenv()
5) Then I created SDL surface using SDL_SetVideoMode

So now I got SDL surface on GTK. Hope you got the idea of the
application UI...
-> The GTK buttons 'PLAY' and 'STOP', are used to control the video
displayed on the SDL screen.
With this I can play single video file.

Now I need, the application should play multiple video files, at the
same time.
Eg, if i need to play four different files, then splitting the screen
into four parts and play. (assuming that all video files are 320x240
width and height).
I need Display, PLAY and STOP buttons for each display. I can do the
UI part using gtk table, but i'm not getting how to get the multiple
SDL screen and place it on the GTK. I searched in internet, but i
didn't get the solution..

Please Guide Me..


Lohitha R

Jonathan Dearborn wrote:

  If you want multiple windows/screen surfaces, then you have to use
  SDL 1.3. It has a different API to handle this. If you just want
  multiple surfaces, then use SDL_CreateRGBSurface or SDL_LoadBMP,
  etc.
  Jonny D

  On Thu, May 13, 2010 at 3:39 AM, Lohitha R <@Lohitha_R> wrote:

    Hi,

    Is it possible to get multiple SDL surface, for a single
    process...??
    I tried to get it, using pthreads, but it failed... Then i did
    using fork(), so I think, I can get as many screen as I want, but
    for a process, only one screen I am getting..?? Is there any
    alternative way for getting many screens in a single process.?

    Please guide me !!
    --
    Lohitha R

    _______________________________________________
    SDL mailing list
    SDL@lists.libsdl.org
    http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

------------------------------------------------------------------

SDL mailing list
SDL@lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

_______________________________________________
SDL mailing list
SDL@lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

Pavel Kanzelsberger
http://www.kanzelsberger.com
E-Mail: pavel@kanzelsberger.com
Jabber: kanzelsberger@jabber.org, ICQ: 20990633

------------------------------------------------------------------

SDL mailing list
SDL@lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

Hi, Lohitha,
There seems to be some confusion about your question, so I’m going to take a
crack at this.
What you are saying is that you are using one Gtk window, and one SDL
instance with multiple SDL_surface’s, each one displays a video.
It looks like http://sdl.beuc.net/sdl.wiki/FAQ_GUI has some answers as to
how to blit a SDL_surface onto a GtkDrawable widget. This is probably your
best bet, and it won’t require you to use SDL_SetVideoMode() because SDL
isn’t running the window, Gtk is.
You should be able to use a GtkDrawable as an array ( GtkDrawable
*videos[rows][cols]; ) and associate your buttons the same way.

I hope that helps,
-AlexOn Thu, May 13, 2010 at 10:18 AM, Lohitha R <lohitha.r at globaledgesoft.com>wrote:

hi,
Initially I did like that only, creating one big full SDL screen,
then splitting, using different value for SDL rect, placing the video info
on the screen. How to place gtk buttons on that screen, or is there any
option in sdl for buttons ???

Regards,
Lohitha R

Pavel Kanzelsberger wrote:

Hello,

as somebody else tried to explain. With SDL 1.2 you’re currently using
this is not possible. What you can do here is to make a one bigger on-screen
surface that will fit 4 off-screen surface that you can blit to this one.
However I guess all of those are just software surfaces and it’s going to be
slow.

With SDL 1.3 that you need to compile yourself from HG repository you
could be able to open 4 windows for 4 video playbacks. Or you can use one
bigger video surface in 1 window again and do the playback using OpenGL
textures.

Pavel

On 13.5.2010, at 16:08, Lohitha R wrote:

Ya, thank you,

Actually, I am working on an application, which plays single video file. I
am using SDL and GTK for developing that application.
I have done like this,

  1. First I have Created GTK window.
  2. I palces gtk socket, horizontal button box having two buttons PLAY and
    STOP on gtk window.
  3. Then I took socket id and i got env variable as SDL_WINDOWID=socketid
  4. then i did putenv()
  5. Then I created SDL surface using SDL_SetVideoMode

So now I got SDL surface on GTK. Hope you got the idea of the application
UI…
-> The GTK buttons ‘PLAY’ and ‘STOP’, are used to control the video
displayed on the SDL screen.
With this I can play single video file.

Now I need, the application should play multiple video files, at the same
time.
Eg, if i need to play four different files, then splitting the screen into
four parts and play. (assuming that all video files are 320x240 width and
height).
I need Display, PLAY and STOP buttons for each display. I can do the UI
part using gtk table, but i’m not getting how to get the multiple SDL screen
and place it on the GTK. I searched in internet, but i didn’t get the
solution…

Please Guide Me…


Lohitha R

Jonathan Dearborn wrote:

If you want multiple windows/screen surfaces, then you have to use SDL 1.3.
It has a different API to handle this. If you just want multiple surfaces,
then use SDL_CreateRGBSurface or SDL_LoadBMP, etc.

Jonny D

On Thu, May 13, 2010 at 3:39 AM, Lohitha R <lohitha.r at globaledgesoft.com>wrote:

Hi,

    Is it possible to get multiple SDL surface, for a single

process…??
I tried to get it, using pthreads, but it failed… Then i did using
fork(), so I think, I can get as many screen as I want, but for a process,
only one screen I am getting…?? Is there any alternative way for getting
many screens in a single process.?

Please guide me !!


Lohitha R


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org



SDL mailing listSDL at lists.libsdl.orghttp://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org


Pavel Kanzelsberger
http://www.kanzelsberger.com
E-Mail: pavel at kanzelsberger.com
Jabber: kanzelsberger at jabber.org, ICQ: 20990633



SDL mailing listSDL at lists.libsdl.orghttp://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

Oh, I just got the update that you may just use one big SDL screen divided
up - I did this search on libsdl’s website:
http://www.libsdl.org/libraries.php?order=name&category=-1&completed=0&os=-1&match_name=gui&perpage=-1
Maybe something from there helps?On Thu, May 13, 2010 at 10:50 AM, Alex Barry <@Alex_Barry> wrote:

Hi, Lohitha,
There seems to be some confusion about your question, so I’m going to take
a crack at this.
What you are saying is that you are using one Gtk window, and one SDL
instance with multiple SDL_surface’s, each one displays a video.
It looks like http://sdl.beuc.net/sdl.wiki/FAQ_GUI has some answers as to
how to blit a SDL_surface onto a GtkDrawable widget. This is probably your
best bet, and it won’t require you to use SDL_SetVideoMode() because SDL
isn’t running the window, Gtk is.
You should be able to use a GtkDrawable as an array ( GtkDrawable
*videos[rows][cols]; ) and associate your buttons the same way.

I hope that helps,
-Alex

On Thu, May 13, 2010 at 10:18 AM, Lohitha R <lohitha.r at globaledgesoft.com>wrote:

hi,
Initially I did like that only, creating one big full SDL
screen, then splitting, using different value for SDL rect, placing the
video info on the screen. How to place gtk buttons on that screen, or is
there any option in sdl for buttons ???

Regards,
Lohitha R

Pavel Kanzelsberger wrote:

Hello,

as somebody else tried to explain. With SDL 1.2 you’re currently using
this is not possible. What you can do here is to make a one bigger on-screen
surface that will fit 4 off-screen surface that you can blit to this one.
However I guess all of those are just software surfaces and it’s going to be
slow.

With SDL 1.3 that you need to compile yourself from HG repository you
could be able to open 4 windows for 4 video playbacks. Or you can use one
bigger video surface in 1 window again and do the playback using OpenGL
textures.

Pavel

On 13.5.2010, at 16:08, Lohitha R wrote:

Ya, thank you,

Actually, I am working on an application, which plays single video file. I
am using SDL and GTK for developing that application.
I have done like this,

  1. First I have Created GTK window.
  2. I palces gtk socket, horizontal button box having two buttons PLAY and
    STOP on gtk window.
  3. Then I took socket id and i got env variable as SDL_WINDOWID=socketid
  4. then i did putenv()
  5. Then I created SDL surface using SDL_SetVideoMode

So now I got SDL surface on GTK. Hope you got the idea of the application
UI…
-> The GTK buttons ‘PLAY’ and ‘STOP’, are used to control the video
displayed on the SDL screen.
With this I can play single video file.

Now I need, the application should play multiple video files, at the same
time.
Eg, if i need to play four different files, then splitting the screen
into four parts and play. (assuming that all video files are 320x240 width
and height).
I need Display, PLAY and STOP buttons for each display. I can do the UI
part using gtk table, but i’m not getting how to get the multiple SDL screen
and place it on the GTK. I searched in internet, but i didn’t get the
solution…

Please Guide Me…


Lohitha R

Jonathan Dearborn wrote:

If you want multiple windows/screen surfaces, then you have to use SDL
1.3. It has a different API to handle this. If you just want multiple
surfaces, then use SDL_CreateRGBSurface or SDL_LoadBMP, etc.

Jonny D

On Thu, May 13, 2010 at 3:39 AM, Lohitha R <lohitha.r at globaledgesoft.com>wrote:

Hi,

    Is it possible to get multiple SDL surface, for a single

process…??
I tried to get it, using pthreads, but it failed… Then i did using
fork(), so I think, I can get as many screen as I want, but for a process,
only one screen I am getting…?? Is there any alternative way for getting
many screens in a single process.?

Please guide me !!


Lohitha R


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org



SDL mailing listSDL at lists.libsdl.orghttp://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org


Pavel Kanzelsberger
http://www.kanzelsberger.com
E-Mail: pavel at kanzelsberger.com
Jabber: kanzelsberger at jabber.org, ICQ: 20990633



SDL mailing listSDL at lists.libsdl.orghttp://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

Hi, Alex,

Ya… Thank you,… I’l look at it… And one more thing, is it possible
to get video playing on gtk drawable widget at the real time speed ??

Lohitha R

Alex Barry wrote:

Oh, I just got the update that you may just use one big SDL screen
divided up - I did this search on libsdl’s website:
http://www.libsdl.org/libraries.php?order=name&category=-1&completed=0&os=-1&match_name=gui&perpage=-1
Maybe something from there helps?On Thu, May 13, 2010 at 10:50 AM, Alex Barry alex.barry@gmail.com wrote:

Hi, Lohitha,
There seems to be some confusion about your question, so I'm going to
take a crack at this.
What you are saying is that you are using one Gtk window, and one SDL
instance with multiple SDL_surface's, each one displays a video.
It looks like http://sdl.beuc.net/sdl.wiki/FAQ_GUI has some answers as
to how to blit a SDL_surface onto a GtkDrawable widget. This is
probably your best bet, and it won't require you to use
SDL_SetVideoMode() because SDL isn't running the window, Gtk is.
You should be able to use a GtkDrawable as an array ( GtkDrawable
*videos[rows][cols]; ) and associate your buttons the same way.

I hope that helps,
-Alex

On Thu, May 13, 2010 at 10:18 AM, Lohitha R <@Lohitha_R> wrote:

  hi,
  Initially I did like that only, creating one big full SDL screen,
  then splitting, using different value for SDL rect, placing the
  video info on the screen. How to place gtk buttons on that screen,
  or is there any option in sdl for buttons ???

Regards,
Lohitha R

  Pavel Kanzelsberger wrote:

    Hello,
    as somebody else tried to explain. With SDL 1.2 you're currently
    using this is not possible. What you can do here is to make a one
    bigger on-screen surface that will fit 4 off-screen surface that
    you can blit to this one. However I guess all of those are just
    software surfaces and it's going to be slow.
    With SDL 1.3 that you need to compile yourself from HG repository
    you could be able to open 4 windows for 4 video playbacks. Or you
    can use one bigger video surface in 1 window again and do the
    playback using OpenGL textures.
    Pavel
    On 13.5.2010, at 16:08, Lohitha R wrote:

      Ya, thank you,

      Actually, I am working on an application, which plays single
      video file. I am using SDL and GTK for developing that
      application.
      I have done like this,
      1) First I have Created GTK window.
      2) I palces gtk socket, horizontal button box having two buttons
      PLAY and STOP on gtk window.
      3) Then I took socket id and i got env variable as
      SDL_WINDOWID=socketid
      4) then i did putenv()
      5) Then I created SDL surface using SDL_SetVideoMode

      So now I got SDL surface on GTK. Hope you got the idea of the
      application UI...
      -> The GTK buttons 'PLAY' and 'STOP', are used to control the
      video displayed on the SDL screen.
      With this I can play single video file.

      Now I need, the application should play multiple video files, at
      the same time.
      Eg, if i need to play four different files, then splitting the
      screen into four parts and play. (assuming that all video files
      are 320x240 width and height).
      I need Display, PLAY and STOP buttons for each display. I can do
      the UI part using gtk table, but i'm not getting how to get the
      multiple SDL screen and place it on the GTK. I searched in
      internet, but i didn't get the solution..

      Please Guide Me..


Lohitha R

      Jonathan Dearborn wrote:

        If you want multiple windows/screen surfaces, then you have to
        use SDL 1.3. It has a different API to handle this. If you
        just want multiple surfaces, then use SDL_CreateRGBSurface or
        SDL_LoadBMP, etc.
        Jonny D

        On Thu, May 13, 2010 at 3:39 AM, Lohitha R <@Lohitha_R> wrote:

          Hi,

          Is it possible to get multiple SDL surface, for a single
          process...??
          I tried to get it, using pthreads, but it failed... Then i
          did using fork(), so I think, I can get as many screen as I
          want, but for a process, only one screen I am getting..?? Is
          there any alternative way for getting many screens in a
          single process.?

          Please guide me !!
          --
          Lohitha R

          _______________________________________________
          SDL mailing list
          SDL@lists.libsdl.org
          http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

------------------------------------------------------------------

SDL mailing list
SDL@lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

      _______________________________________________
      SDL mailing list
      SDL@lists.libsdl.org
      http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

    ---
    Pavel Kanzelsberger
    http://www.kanzelsberger.com
    E-Mail: pavel@kanzelsberger.com
    Jabber: kanzelsberger@jabber.org, ICQ: 20990633

------------------------------------------------------------------

SDL mailing list
SDL@lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

  _______________________________________________
  SDL mailing list
  SDL@lists.libsdl.org
  http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org



------------------------------------------------------------------

SDL mailing list
SDL@lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

It would be as fast as SDL can blit to a GtkDrawable widget. I don’t see
why it wouldn’t be real-time. I haven’t tried SDL -> GtkDrawable for video,
so I can’t give a definite answer, but I suppose it is more hardware
dependent than it is SDL dependent.
If it isn’t absolute real-time, you could probably fake the realtime by
dropping frames from the video playback (which is how most modern video
players work, anyway).

Take care,
-AlexOn Thu, May 13, 2010 at 11:01 AM, Lohitha R <lohitha.r at globaledgesoft.com>wrote:

Hi, Alex,

      Ya... Thank you,... I'l look at it.... And one more thing, is it

possible to get video playing on gtk drawable widget at the real time speed
??

Lohitha R

Alex Barry wrote:

Oh, I just got the update that you may just use one big SDL screen divided
up - I did this search on libsdl’s website:
http://www.libsdl.org/libraries.php?order=name&category=-1&completed=0&os=-1&match_name=gui&perpage=-1
Maybe something from there helps?

On Thu, May 13, 2010 at 10:50 AM, Alex Barry <@Alex_Barry> wrote:

Hi, Lohitha,
There seems to be some confusion about your question, so I’m going to take
a crack at this.
What you are saying is that you are using one Gtk window, and one SDL
instance with multiple SDL_surface’s, each one displays a video.
It looks like http://sdl.beuc.net/sdl.wiki/FAQ_GUI has some answers as to
how to blit a SDL_surface onto a GtkDrawable widget. This is probably your
best bet, and it won’t require you to use SDL_SetVideoMode() because SDL
isn’t running the window, Gtk is.
You should be able to use a GtkDrawable as an array ( GtkDrawable
*videos[rows][cols]; ) and associate your buttons the same way.

I hope that helps,
-Alex

On Thu, May 13, 2010 at 10:18 AM, Lohitha R <lohitha.r at globaledgesoft.com wrote:

hi,
Initially I did like that only, creating one big full SDL
screen, then splitting, using different value for SDL rect, placing the
video info on the screen. How to place gtk buttons on that screen, or is
there any option in sdl for buttons ???

Regards,
Lohitha R

Pavel Kanzelsberger wrote:

Hello,

as somebody else tried to explain. With SDL 1.2 you’re currently using
this is not possible. What you can do here is to make a one bigger on-screen
surface that will fit 4 off-screen surface that you can blit to this one.
However I guess all of those are just software surfaces and it’s going to be
slow.

With SDL 1.3 that you need to compile yourself from HG repository you
could be able to open 4 windows for 4 video playbacks. Or you can use one
bigger video surface in 1 window again and do the playback using OpenGL
textures.

Pavel

On 13.5.2010, at 16:08, Lohitha R wrote:

Ya, thank you,

Actually, I am working on an application, which plays single video file.
I am using SDL and GTK for developing that application.
I have done like this,

  1. First I have Created GTK window.
  2. I palces gtk socket, horizontal button box having two buttons PLAY and
    STOP on gtk window.
  3. Then I took socket id and i got env variable as SDL_WINDOWID=socketid
  4. then i did putenv()
  5. Then I created SDL surface using SDL_SetVideoMode

So now I got SDL surface on GTK. Hope you got the idea of the application
UI…
-> The GTK buttons ‘PLAY’ and ‘STOP’, are used to control the video
displayed on the SDL screen.
With this I can play single video file.

Now I need, the application should play multiple video files, at the same
time.
Eg, if i need to play four different files, then splitting the screen
into four parts and play. (assuming that all video files are 320x240 width
and height).
I need Display, PLAY and STOP buttons for each display. I can do the UI
part using gtk table, but i’m not getting how to get the multiple SDL screen
and place it on the GTK. I searched in internet, but i didn’t get the
solution…

Please Guide Me…


Lohitha R

Jonathan Dearborn wrote:

If you want multiple windows/screen surfaces, then you have to use SDL
1.3. It has a different API to handle this. If you just want multiple
surfaces, then use SDL_CreateRGBSurface or SDL_LoadBMP, etc.

Jonny D

On Thu, May 13, 2010 at 3:39 AM, Lohitha R <lohitha.r at globaledgesoft.com wrote:

Hi,

    Is it possible to get multiple SDL surface, for a single

process…??
I tried to get it, using pthreads, but it failed… Then i did using
fork(), so I think, I can get as many screen as I want, but for a process,
only one screen I am getting…?? Is there any alternative way for getting
many screens in a single process.?

Please guide me !!


Lohitha R


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org



SDL mailing listSDL at lists.libsdl.orghttp://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org


Pavel Kanzelsberger
http://www.kanzelsberger.com
E-Mail: pavel at kanzelsberger.com
Jabber: kanzelsberger at jabber.org, ICQ: 20990633



SDL mailing listSDL at lists.libsdl.orghttp://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org



SDL mailing listSDL at lists.libsdl.orghttp://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

Try SDL_CreateRGBSurfaceFrom():
http://www.libsdl.org/cgi/docwiki.cgi/SDL_CreateRGBSurfaceFrom

For Windows GDI for example, you could use CreateDIBSection() and
SDL_CreateRGBSurfaceFrom(), passing the same pointer to both, then
handle drawing to the window in WM_PAINT using GDI (Use
InvalidateRect() instead of SDL_UpdateRect()).
http://msdn.microsoft.com/en-us/library/dd183494(v=VS.85).aspx
http://msdn.microsoft.com/en-us/library/dd145002(v=VS.85).aspx

It’s probably a lot easier in GTK, but I haven’t tried it.On 13 May 2010 06:39, Lohitha R <lohitha.r at globaledgesoft.com> wrote:

Hi,

? ? ? ? Is it possible to get multiple SDL surface, for a single
process…??
I tried to get it, using pthreads, but it failed… Then i did using fork(),
so I think, I can get as many screen as I want, but for a process, only one
screen I am getting…?? Is there any alternative way for getting many
screens in a single process.?