Window position

Is there a method of setting the windows position (windowed mode) in a
platform agnostic way without using SDL_putenv and SDL_VIDEO_WINDOW_POS?
Thanks

It looks like it only exists in SDL 1.3:

SDL_SetWindowPosition(SDL_WindowID, intx, inty)On Fri, Jan 23, 2009 at 8:44 AM, liam mail <liam.list at googlemail.com> wrote:

Is there a method of setting the windows position (windowed mode) in a
platform agnostic way without using SDL_putenv and SDL_VIDEO_WINDOW_POS?
Thanks


http://codebad.com/

2009/1/23 Donny Viszneki <donny.viszneki at gmail.com>> On Fri, Jan 23, 2009 at 8:44 AM, liam mail <@liam_mail> wrote:

Is there a method of setting the windows position (windowed mode) in a
platform agnostic way without using SDL_putenv and SDL_VIDEO_WINDOW_POS?
Thanks

It looks like it only exists in SDL 1.3:

SDL_SetWindowPosition(SDL_WindowID, intx, inty)


http://codebad.com/


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

Thanks,
What is the current state of 1.3 and is there an expected release date?

SDL 1.3 seems pretty stable to me. There are some API changes you
might have to make, however. More info here:

http://www.libsdl.org/svn.phpOn Fri, Jan 23, 2009 at 11:59 AM, liam mail <liam.list at googlemail.com> wrote:

2009/1/23 Donny Viszneki <@Donny_Viszneki>

On Fri, Jan 23, 2009 at 8:44 AM, liam mail <liam.list at googlemail.com> wrote:

Is there a method of setting the windows position (windowed mode) in a
platform agnostic way without using SDL_putenv and SDL_VIDEO_WINDOW_POS?
Thanks

It looks like it only exists in SDL 1.3:

SDL_SetWindowPosition(SDL_WindowID, intx, inty)


http://codebad.com/


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

Thanks,
What is the current state of 1.3 and is there an expected release date?


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


http://codebad.com/

hi;
i’ve got a video player that renders yuv using SDL_Overlay. my video is
typically PAL so 720x576. the video images are rendered using
SDL_DisplayYUVOverlay, where the rectangle is derived from aspect ratio
that is in the incoming video stream (lets say its 4:3). Then the
resulting rect used in SDL_DisplayYUVOverlay turns out to be {0, 18,
720, 540}. This is fine… BTW: the code is modeled after FFmpeg’s
sample ffplay.c.

problem arises with graphics that i wish to display on top of the
video… such graphic is collected in an SDL_Surface. Typically these
graphics are in the {0, 0, 720, 576} “coordinate space”.

currently i have a homegrown fn which blits the graphic SDL_Surface, YUV
video image.

PROBLEM is that since the rect for SDL_DisplayYUVOverlay is that which
is result of video aspect ratio, portions of the graphic don’t get shown.

Calling SDL_DisplayYUVOverlay 2x causes terrible flicker (as can be deduced)
Doing an UpdateRect of the SDL_Surface shows nothing ('cause i imagine
that the subsequent DisplayYUVOverlay scrubs the graphics)

I’ve also tried converting the video image to RGB, blitting graphic and
video RGB… its ok but in full screen the update is terrible (extremely
slow!)

Questions:

  • Any idea how i can effectively blit a SDL_Surface onto an SDL_Overlay
    so that the video appears with proper aspect ratio and graphic appears
    in its rectangle ?
  • how can i hack (even platform dependent method/access to SDL_Overlay
    private data) to effectively get a SDL_Surface to SDL_Surface blit ? i
    tried this by adding a SDL_GetDisplayYUV_SW - my env only loads the sw
    overlays - to return the SDL_Surface in overlay’s private data, and then
    do a blit but this crashes - Yes i realize i ought not to be accessing
    these structures - but i’ve gotta but this release out and need a quick
    fix. or a fix.
  • why isn’t there a “take this graphic and lay it on top of the YUV
    image in the overlay” method ? Or is there?

Any help quick/otherwise is GREATLY appreciated. Till now my
customers (internal though they are) are very, very disappointed in this…

Kindest regards,
S-

oops! I’m using sdl-1.2.11.

Sheshadri Mantha wrote:> hi;

i’ve got a video player that renders yuv using SDL_Overlay. my video
is typically PAL so 720x576. the video images are rendered using
SDL_DisplayYUVOverlay, where the rectangle is derived from aspect
ratio that is in the incoming video stream (lets say its 4:3). Then
the resulting rect used in SDL_DisplayYUVOverlay turns out to be {0,
18, 720, 540}. This is fine… BTW: the code is modeled after
FFmpeg’s sample ffplay.c.

problem arises with graphics that i wish to display on top of the
video… such graphic is collected in an SDL_Surface. Typically
these graphics are in the {0, 0, 720, 576} “coordinate space”.

currently i have a homegrown fn which blits the graphic SDL_Surface,
YUV video image.

PROBLEM is that since the rect for SDL_DisplayYUVOverlay is that which
is result of video aspect ratio, portions of the graphic don’t get shown.

Calling SDL_DisplayYUVOverlay 2x causes terrible flicker (as can be
deduced)
Doing an UpdateRect of the SDL_Surface shows nothing ('cause i imagine
that the subsequent DisplayYUVOverlay scrubs the graphics)

I’ve also tried converting the video image to RGB, blitting graphic
and video RGB… its ok but in full screen the update is terrible
(extremely slow!)

Questions:

  • Any idea how i can effectively blit a SDL_Surface onto an
    SDL_Overlay so that the video appears with proper aspect ratio and
    graphic appears in its rectangle ?
  • how can i hack (even platform dependent method/access to
    SDL_Overlay private data) to effectively get a SDL_Surface to
    SDL_Surface blit ? i tried this by adding a SDL_GetDisplayYUV_SW - my
    env only loads the sw overlays - to return the SDL_Surface in
    overlay’s private data, and then do a blit but this crashes - Yes i
    realize i ought not to be accessing these structures - but i’ve gotta
    but this release out and need a quick fix. or a fix.
  • why isn’t there a “take this graphic and lay it on top of the YUV
    image in the overlay” method ? Or is there?

Any help quick/otherwise is GREATLY appreciated. Till now my
customers (internal though they are) are very, very disappointed in
this…

Kindest regards,
S-