SDL_WindowID in directx & window positioning

hi all;
i’ve got a video player integrated into my app. My app creates a window
which gets passed to SDL via SDL_WINDOWID. this window is not maximized,
its not fullscreen.

i additionally set SDL_VIDEO_WINDOW_POS and SDL_CENTERED as “100,100” and
"yes", respectively.

when i run the app with windib, the video appears correctly in the window
and all is fine (even though the env vars of SDL_VIDEO_WINDOW_POS and
SDL_CENTERED are ignored). except the player chews up close to 50% cpu on
a dual core 2GHz, w/2GB RAM.

When i run the app with directx driver, the video appears in the top left
hand corner of my screen and not in the window that I pass in. The
performance is close between 8 and 12%.

(BTW: I’m using FFmpeg to decode mpeg streams with mp2 audio… so the cpu
is more related to that than SDL… simply presenting as to why i want to
use Directx and not windib.

AND i’m rebuilding SDL.lib and SDL.dll on my machine).

Questions:

  1. Can anyone suggest why the video would appear in my app window
    properly with WinDib and not with Directx ? and how i can rectify this
    ??
  2. also, something strange… the window in my app has the
    Maximize/minimize disabled, its a little bigger than PAL 720x540. And
    when the xxxx_SetVideoMode gets to point of repositioning the window,
    it always bypasses it 'cause IsZoomed always returns true. And there
    is a suspicious #define IsZoomed(HWND) 1 in SDL_sysevents.c but only
    for WIN32_WCE (which i’m presuming is for WinCE).
  3. so… anyone have success with direct rendering using SDL_WINDOWID
    under DirectX, where the video does not show in the top left hand
    corner of the screen (when not in fullscreen mode)?
  4. there is a directx.h in the SDL code and i’ve got DirectX 9.0c SDK
    installed on my machine… any reason why directx.h in windx5 ought to
    be at 5.0??
  5. also, any thoughts on why IsZoomed might be returning true when the
    window is actually not zoomed ??
    any help appreciated.

Kindest regards,
s-

kindest regards,
S—

Sheshadri Mantha | Principal Software Engineer