Making a SDL-Window Child of another window (crossplatform)
Posted: Thu Jan 06, 2011 5:18 pm
I was able making a Windows window parent of a SDL-window.
As Im working on a crossplatform FFmpeg include/framework for PB – How can I archive this on Linux and on OSx ?
Im aware that on the first view the easiest approach would be using PBs internal drawing routines, but as I also want playing back FFmpeg's streaming-audio-output via ring-buffering, Im forced to use SDL.
My Windows Code approach:
BTW. this forum engine doesn't permit searching for words less than 4 letters, so "sdl" wont be supported, or did I miss something?
As Im working on a crossplatform FFmpeg include/framework for PB – How can I archive this on Linux and on OSx ?
Im aware that on the first view the easiest approach would be using PBs internal drawing routines, but as I also want playing back FFmpeg's streaming-audio-output via ring-buffering, Im forced to use SDL.
My Windows Code approach:
Code: Select all
hwnd = OpenWindow(0, 0, 0, width, height, "FFmpeg", #PB_Window_SystemMenu | #PB_Window_ScreenCentered | #PB_Window_MinimizeGadget | #PB_Window_TitleBar)
screen.SDL_Surface = SDL_SetVideoMode(width, height, 32, #SDL_HWSURFACE|#SDL_DOUBLEBUF|#SDL_NOFRAME)
Define pInfo.SDL_SysWMinfo
SDL_VERSION(pInfo\version)
SDL_GetWMInfo(@pInfo)
hwndSDL = pInfo\window
SetParent_(hwndSDL, hwnd)