friends!
I have the next problem: I want to modify the application linphone 3.3.2
This application uses the library SDL to create the window where the video is playing. I want to modify this to NOT create the screen but i want to choose a window created by me to play the video in it.
Is there any function to select a window already created, or is there some other way to do it?
My system is Ubuntu 10.04 32bits and i use xlib to create the window and i have the ID of windows created.
Thanks!
Related
I would like to put a UTF8 text using a specific font on my cv::Mat and I don't want to use OpenCV's GUI elements (windows). I compiled OpenCV 3.4.3 against Qt 5.11.1 and it works fine.
I understand that calling cv::addText function crashes duo to lack of GUI thread, in case no window is created by cv::namedWindow or cv::window. So I want to know if there is a way to somehow hide a previously created window, or even start GUI thread without actually having a window?
The SDL2 window must constantly be ontop of the directX window regardless if the user is clicking away at the directX or SDL2 window.
Why?
I will use this SDL window to toggle music that I want to listen to while still being able to enjoy my video game.
Thanks!
Not sure if it's possible without doing some WinAPI calls, but try messing around with SDL_RaiseWindow().
https://wiki.libsdl.org/SDL_RaiseWindow
How can we combine many windows client area in one.
I have 2 different windows and i want to combine it in to one.
The first window is made in open cv and the second one has all the interface options
(the second window is designed in sfml)
the third window(in which i want other windows to combine) is designed in win32 api
is there any way to do this?
The only way you can merge them is to have one top-level parent window and have separate child windows that host the OpenCV and SFML contents.
However, I suspect that OpenCV (and possibly SFML) expects a top-level window; you'll have to experiment to be sure.
A quick search of the OpenCV documentation shows that there's no standard OpenCV function that takes a (provided) HWND, so you'll have to dig into the OpenCV internals (most likely namedWindow) and create your own function that creates a child window from a given HWND parent.
SFML appears to have the same restriction; in this case, since SFML appears to be based on OpenGL, this may not be possible at all, as OpenGL doesn't like being in a child window.
An alternate approach is to set the window styles on the OpenCV and SFML windows to be borderless, and have the Win32 window move/size the other windows when the Win32 window moves. This requires a lot of attention to detail to minimize "tearing", but it can be done. (For example, Windows Media Player does this for its control window.)
I'm writing a desktop. I already know the basics of Qt and GTK+ through Python but I don't understand how to display the finished Desktop. How do you make it the root window of a Window Manager, or is there a method for displaying the desktop I'm not familiar with?
You don't make it the root window. X has one root window which you can't change. There are a number of ways to do what you want
X Root window
The old way was that the desktop was just the standard X root window. Icons were just individual borderless windows.
Desktop Window
Now most systems open a large window, and mark it as being a desktop window. Most window managers then know never to raise it above any other windows. The X root window is still behind it, but it is hidden. This means you can do anything you want on this window, draw to it, include icons or widgets or anything else your toolkit can do.
If you are using Gtk+ then the relevant information is found in the GdkWindowTypeHint enum, specifically the GDK_WINDOW_TYPE_HINT_DESKTOP. The documentation can be found here: GdkWindow
Compositor
However, there is a newer way that desktops like Gnome3 or Unity use, which is called the Compositor Overlay Window. When a compositor is running there is an overlay window which covers all the windows on the system. It is then up to the compositor to draw the actual contents of the windows on this overlay. However, the overlay can draw whatever it wishes on this overlay window. For example, in Gnome3 when you enter the window selector and the windows arrange themselves into a grid the windows aren't really moving and shrinking, the compositor has just decided to draw them that way. In reality, the windows are still in the same position they were before, but hidden under this overlay.
This is a very advanced way to do things, and certainly not for the novice developer. You probably want to be focusing on the second method.
for a simple demo program I am using the SDL library to play a mpeg movie file.
Unfortunately the demo app should be executed on one of our windows 7 servers and it should be looked at remotely.
The problem is, that when I connect via RDP to the server the SDL window stays black - although the movie becomes played (I hear the sound).
I guess this has something to do with the rendering device of OpenGL or DirectDraw when accessing via remote desktop. Does anyone know which settings I should use for setting up the SDL window so it works via RDP also?
When I play the movie with the windows media player the movie becomes displayed correctly - what kind of device uses the media player?
The problem is probably that SDL is rendering directly to video memory (or some sort of DirectDraw surface), but the RDP program is only able to retrieve what's in system memory.
If this is the case, there's a few things you can try. First is a different RDP program that has the ability to grab from DirectDraw or video memory. The other thing is when you call SDL_SetVideoMode() use the SDL_SWSURFACE flag. This will render to system memory where as SDL_HWSURFACE will render to video memory.