FDH2 / UxPlay

AirPlay Unix mirroring server
GNU General Public License v3.0
1.35k stars 72 forks source link

Is there any way to control the window size? #28

Closed tommiv closed 2 years ago

tommiv commented 2 years ago

Sorry, this is more like a question than an issue/bugreport, but I can't find a way to maintain the created window. I want it basically to be either maximized or fullscreened (doesn't matter which option it will be). I tried to do two things: – to find a gstreamer videosink that can accept window w/h or fullscreen as arguments: no luck here, the only sink which has such arguments is gl sink but the window width/height is readonly – to find a piece of code in renderer where the window is created and pass params there: no luck here too because I just can't find a code with explicit window instantiation. Just to clarify: I don't want to-rescale the video further, I just want a window to be maximized when the mirroring starts, now I have to click on "maximize" button provided by the window manager.

fduncanh commented 2 years ago

no fullscreen at present. (suggestions welcome) Right now the window is produced automatically by the videosink. It would be good to improve this. (using GstVideoOverlay, I believe)

You have the uxplay option -s wxh to tell the client what size window (in pixels) you want. this can make the window start big. w, h = width, height (pixels). The height is the key one.

tommiv commented 2 years ago

Thanks for a fast response. I'm afraid I'm not familiar with gstreamer so I can't suggest anything. Regarding the -s option, I'm aware of it, but for me it does nothing because I can only request -s 1920x1080 which is already a default value. But, as you properly stated in the readme, this is just a hint, not an imperative, so when I stream my phone screen, the window fits to content, so it's 1080px height and maybe 500px width in the leftmost side of the screen. Anyway it's not a BIG deal for me, I was just sure that's a low-hanging fruit but after spending a few hours in research I realized it's not that simple.

fduncanh commented 2 years ago

just experiment with -swxh with bigger values and see what happens