0
0
mirror of https://github.com/obsproject/obs-studio.git synced 2024-09-20 13:08:50 +02:00
Commit Graph

10 Commits

Author SHA1 Message Date
Kurt Kartaltepe
1604400e48 linux-capture: Rewrite xcomposite
Generally moves all the plugin code into xcomposite-input.cpp and
removes all C++ dependencies.

Migrate as much as possible to xcb from Xlib to enable us to handle
errors and attribute them to the correct callers. This caused many other
knock on issues such as wrongly attributed errors and cleanup code
working incorrectly.

That allows us to use the xcursor-xcb implementation and delete the pure
Xlib implementation. We also add the missing functionality from the Xlib
implementation to the xcb implementation.

Capture glXCreatePixmap errors which occur most commonly on
nvidia+gnome due to nvidia's driver being unable to allocate more than 1
pixmap per window and gnome being the only compositor to read window
data via glx pixmaps.

Fix cleanup after failed glXCreatePixmap that might have leaked pixmaps
and prevented later captures on nvidia drivers for the same reason.
2022-05-14 17:01:08 -03:00
Keith Packard
96924553f0 linux-capture: Use RandR monitors for screen information
RandR has two sets of screen geometry information:

 1. CRTC. These are the physical scanout engines in the hardware

 2. Monitors. These are the logical partitions of the screen.

By default, each CRTC gets mapped to a Monitor. However, some monitors
actually require two CRTCs to drive them due to limitations in the
scanout hardware. Users can also create 'virtual' monitors to support
VNC or other systems.

This patch makes the RandR code prefer the Monitor mechanism to the
older CRTC mechanism. If the server doesn't support a new enough RandR
version, the existing CRTC code is used instead.

The name of the monitor is also provided in place of the arbitrary
number to help users select the desired source.

Signed-off-by: Keith Packard <keithp@keithp.com>
2020-03-13 18:29:35 -07:00
Ford Smith
003e8474d3 linux-capture: Fix bug with xshm input showing multiple 0x0 windows 2019-10-02 13:51:28 -04:00
jp9000
f53df7da64 clang-format: Apply formatting
Code submissions have continually suffered from formatting
inconsistencies that constantly have to be addressed.  Using
clang-format simplifies this by making code formatting more consistent,
and allows automation of the code formatting so that maintainers can
focus more on the code itself instead of code formatting.
2019-06-23 23:49:10 -07:00
Gary Kramlich
758868093b linux-capture: Add randr support
Add randr suport to the xshm plugin and prefer it over xinerama.

Add libxcb-xrandr0-dev as CI dependency
2019-04-05 16:05:59 -05:00
fryshorts
114ccd33ee linux-capture: Port geometry functions to xcb
Replace XLib code with xcb in the geometry helper functions.
2014-12-22 00:13:42 +01:00
fryshorts
4d2e730bfa linux-capture: Remove XLib based shm helpers
Remove the old XLib based shm helper functions from xhelpers.
2014-12-22 00:13:41 +01:00
fryshorts
069ee92ff4 linux-capture: Add helper to get xcb screen
Add a helper function to get a xcb screen from a screen id.
2014-12-21 23:13:27 +01:00
fryshorts
e7cdb837aa linux-capture: Add xcb helper functions for shm
Add new helper functions managing the shm segment with xcb to xhelpers.
2014-12-21 23:13:27 +01:00
jp9000
a9cd60a78f Rename linux-xshm module to linux-capture 2014-08-29 17:19:30 -07:00