Issue with screencasting when using display scaling
System: Dell XPS 13, running Fedora 29 w/ GNOME 3.30.2
I've been working on implementing a screencast plugin for https://obsproject.com/ and an issue I've encountered seems to be related to screencasting in combination w/ using display scaling.
In particular, if I have my display scaling set to 100% (which isn't actually usable on my HiDPI screen), then using the standard snippet: https://gitlab.gnome.org/snippets/39 works as expected, and displaying into an ximagesink works just fine, and displays fine in my OBS plugin (https://gitlab.com/petejohanson/obs-pipewire-screen-sharing) I'm working on.
However, with scaling set to 200%, a few things happen:
- The video info from the individual frames reports a width/height that is 2x than the actual sent video content in the stream. I have accounted for this in my plugin by instead favoring the dimensions reported in the initial
Response
signal with thestream properties
that includes thesize
property as expected. - Even if I use the stream size, not the reported width/height from the frames, the streamed video seems to be "squished" vertically. See attached.
I'm certainly open to the idea that my PoC code for OBS isn't doing something right, but the fact that the snippet also has issues when using scaling on my display makes me think something higher level is amiss.
Thanks!