Commit Graph

100 Commits (e6daa22ab7ee8f667ba677e444ba488ed886a1ac)

Author SHA1 Message Date
Ford Smith 003e8474d3 linux-capture: Fix bug with xshm input showing multiple 0x0 windows 2019-10-02 13:51:28 -04:00
Gol-D-Ace 03b5be75e4 Update translations from Crowdin 2019-09-17 23:21:00 +02:00
Kurt Kartaltepe e39e13e7b8 linux-capture: Texture unbound after GS_GL_DUMMYTEX changes 2019-08-17 22:47:32 -07:00
Kurt Kartaltepe 1402a80583 linux-capture: Revert GS_RGBX usage 2019-08-11 18:30:23 -07:00
Kurt Kartaltepe 4ac77ee970 linux-capture: Fix xcompcap robustness
Move xlock after initial window listing
	- XErrorLock uses static fields so when you use them recursively
	  they collide and do weird things. This keeps the two xlocks from
      colliding.

Build obs textures based on returned pixmap texture types to ensure
compatibility during copies. (prevents glCopyImageSubData failed due to
texture incompatibilities)

Fix alpha check by using pixmap depth instead of checking channel sizes
(wrong on nvidia and maybe amd hardware)

Fix X error checking, now you will get 1 BadAlloc when pixmap allocation
fails instead "glCopyImageSubData failed" every frame. (occurs on Gnome
under special circumstances)
2019-07-08 20:27:26 -07: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
Gol-D-Ace 973bc481ce Update translations from Crowdin 2019-06-11 01:42:42 +02: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
Gol-D-Ace e78ac5ebef Update translations from Crowdin 2019-04-04 16:19:51 +02:00
Gol-D-Ace c3711bdd5e Update translations from Crowdin 2019-02-20 22:26:07 +01:00
Jim e7fcd71715
Merge pull request #1513 from SingularityAzure/linux-capture-xcompcap-singularity
linux-capture: XCompCap now chooses glXFBConfigs based on window depth
2019-01-04 06:36:02 -08:00
Philip Haynes bb42c8dfb6 linux-capture: XCompCap now chooses glXFBConfigs based on window depth
Rather than inheriting the exact visuals from the window,
find whether the color buffer has alpha, find a config with
the necessary attributes for capture, and match its depth to
the depth of the window instead of the color buffer. Also,
cleanup glxpixmap texture binding before destroying the texture.

Update: Style conformancy changes
2018-10-12 00:33:32 -05:00
Jim 2a08f1d144
Merge pull request #1495 from SingularityAzure/linux-capture-xcompcap-singularity
linux-capture: Fix repeated color-swapping and improve robustness further
2018-09-24 14:55:09 -07:00
Philip Haynes c286f0c202 linux-capture: Fix repeated swapping of swapRedBlue and improve robustness further
Previously toggled swapRedBlue every update regardless of settings being set, which resulted in
moving or resizing of windows causing undesired color-swapping behavior. Also now use more direct
method of comparing visualIDs without type-casting and base the glxpixmap attributes on texture
format being used rather than the bit-depth of the window.
2018-09-23 17:54:18 -05:00
Jim 47285c2ba6
Merge pull request #1485 from SingularityAzure/linux-capture-xcompcap-singularity
linux-capture: Improve XComposite capture robustness
2018-09-22 14:20:43 -07:00
Jim af320a0838
Merge pull request #1480 from kkartaltepe/module-descriptions
Plugins: Add descriptions to modules
2018-09-16 15:34:28 -07:00
Philip Haynes 5fe6feb59a linux-capture: Improve XComposite capture robustness
Adds support for windows with alpha channels as well as swapping red
and blue when using GS_BGRX. glXFBConfig now attempts to inherit
its format from the captured window when possible.

Change log message
2018-09-13 10:53:20 -05:00
Kurt Kartaltepe d86c8121ed Plugins: Add descriptions to modules 2018-09-11 18:28:58 -07:00
Gol-D-Ace a79aaa28ab Update translations from Crowdin 2018-08-18 04:16:35 +02:00
Jim 47043b2566
Merge pull request #1220 from admshao/opengl-color-info
Opengl color info
2018-03-15 16:36:31 -07:00
Gol-D-Ace 88282c168c Update translations from Crowdin 2018-03-15 09:00:28 +01:00
Shaolin b452338f62 linux-capture: Request at least 8 bits for alpha
10bpc support is under active development all over the linux stack
so while we wait for it to mature, request an alpha size of 8.
2018-03-12 22:36:50 -03:00
Gol-D-Ace ae22886f67 Update translations from Crowdin 2018-01-22 04:55:52 +01:00
Ryan Foster 79c0f0105c linux-capture: Log window capture's target
Closes jp9000/obs-studio#983
2017-11-26 18:01:28 -08:00
Jim dde03af95e Merge pull request #987 from seirl/master
Add fix to watch for VisibilityNotify events.
2017-09-12 05:30:36 -07:00
Gol-D-Ace 8d8c2e5a22 Update translations from Crowdin 2017-08-10 16:07:40 +02:00
Aidan Epstein f4a8137412 linux-capture: Watch for VisibilityNotify events
Some window managers like i3 don't issue Expose events when switching
between workspaces, but send VisibilityNotify events. This causes the
stream to freeze even when the workspace is switched back.

Related issue: #863
2017-08-07 12:33:29 +02:00
Gol-D-Ace 3d2cacd782 Update translations from Crowdin 2017-05-20 10:18:41 +02:00
Gol-D-Ace dbf95bdc15 Update translations from Crowdin 2017-03-05 23:40:11 +01:00
Gol-D-Ace 6223ed6520 Update translations from Crowdin 2017-01-07 00:23:16 +01:00
Gol-D-Ace 69f0bc244a Update translations from Crowdin 2016-12-23 20:46:47 +01:00
Gol-D-Ace 2d47dc4e2c Update translations from Crowdin 2016-11-20 12:22:26 +01:00
Gol-D-Ace 90e805ad9b Update translations from CrowdIn 2016-11-16 00:32:47 +01:00
Gol-D-Ace aadc7263c0 Update translations from Crowdin 2016-09-28 01:17:24 +02:00
Gol-D-Ace cb036b2713 Update translations from Crowdin 2016-08-08 16:21:48 +02:00
Christoph Hohmann 83aab23242 linux-capture: Add OBS_SOURCE_DO_NOT_DUPLICATE to window capture sources
It seems that it is not possible to create multiple OpenGL textures
for the same window. When sources are duplicated in studio mode this
causes window capture sources to become black. The
OBS_SOURCE_DO_NOT_DUPLICATE flag prevents that this happens.
2016-07-18 18:05:40 +02:00
Gol-D-Ace 81adb13f59 Update translations from Crowdin 2016-07-06 01:18:27 +02:00
jp9000 ee4febcd06 linux-capture: Don't find window via class if class empty 2016-07-03 22:27:38 -07:00
jp9000 e389ae8a75 linux-capture: Additionally search windows via WM_CLASS
If window capture fails to find a window with a matching title, search
for a window with the same window class additionally as a backup.

Replaces the third part of the internal window string with the class
name instead of the program path due to the fact that the program path
rarely seemed to work.
2016-07-02 23:49:19 -07:00
jp9000 57d580f8a9 linux-capture: Convert window strings to UTF-8 strings
The UI expects everything to be in UTF-8, so convert all window strings
to UTF-8 whenever getting a window name.
2016-06-05 19:25:37 -07:00
jp9000 5d16e44899 linux-capture: Fix window capture crashes
The xcomposite window capture crashes were due to a few factors:
-------------------------------
1.) The source's X error handler was possibly being overwritten by
another part of the program despite us locking the display, presumably
something in Qt which isn't locking the display when pushing/popping its
own error handler (though this is not yet certain).  The source's calls
to X functions happen in the graphics thread, which is separate from the
UI thread, and it was noticed that somehow the error handler would be
overwritten almost seemingly at random, indicating that something else
in the program outside of OBS code was not locking the display while
pushing/popping the error handler.

To replicate this, make it so that the source cannot find the target
window and so it continually searches for it each video_tick call, then
resize the main OBS window continually (which causes Qt to push/pop its
own error handlers).  A crash will almost always occur due to BadWindow
despite our error handling.

2.) Calling X functions with a window ID that no longer exists,
particularly XGetWindowAttributes, in conjunction the unknown error
handler set in case #1 would cause the program to outright crash because
that error handler is programmed to crash on BadWindow for whatever
reason.  The source would call X functions without even checking if
'win' was 0.

3.) The source stored window IDs (in JSON, even if they've long since
become invalid/pointless, such as system restarts).  This is a bad
practice and will result in more cases of BadWindow.

Fixing the problem (reducing the possibility of getting BadWindow):
-------------------------------
Step 1.) Deprecate and ignore window IDs in stored settings.  Instead of
using window IDs to find the window, we now must always search the
windows and find the target window via the window name exclusively.
This helps ensure that we actually consistently have a working window
ID.

Step 2.) Do not call any X functions if the window ID is 0.

Step 3.) Reset the window ID to 0 any time the window has updated, and
make the source find the window again to ensure it still exists before
attempting to use any X functions on the window ID again.
2016-06-05 00:12:43 -07:00
Gol-D-Ace fe56a12867 Update translations from Crowdin 2016-05-14 00:27:59 +02:00
Gol-D-Ace 5ed7081213 Update translations from Crowdin 2016-04-23 10:29:21 +02:00
Aesen Vismea 9cf56f8b4c linux-capture: Add "Use alpha-less texture format" option
This is to work around a Mesa issue that prevents copying
between RGB and RGBA textures. Other drivers seem to allow
this, even though it's technically not allowed by the GL
spec.

Closes jp9000/obs-studio#514
2016-04-08 03:17:33 -07:00
jp9000 69da1151e0 Update translations from Crowdin 2016-03-19 12:08:48 -07:00
Charles Ray Shisler III 2e642fcc61 linux-capture: Remove red background from texture
When a source window was not available, a red background was shown
instead. This was undesirable, and expected behavior would be for the
background to be transparent, enabling what exists behind the source
to be shown.
2016-02-21 19:15:21 -08:00
Charles Ray Shisler III 2bdc1e9d7c linux-capture: Fix texture lingering after window closes
After source window closes, texture is still visible in preview until
the source window opens again.
2016-02-21 18:59:30 -08:00
Gol-D-Ace 2b7036dc93 Add latest translations from Crowdin 2016-02-21 22:16:12 +01:00
jp9000 cd97ce2a17 libobs: Add source output flag OBS_SOURCE_DO_NOT_DUPLICATE
Certain types of sources (display captures, game captures, audio
device captures, video device captures) should not be duplicated.  This
capability flag hints that the source prefers references over full
duplication.
2016-01-26 11:49:50 -08:00
jp9000 756fec3503 linux-capture: Clear x events when exiting handler
This is probably not necessary but might fix an issue where errors pass
through to other parts of the program, possibly causing the crash on
exit related to the xcomposite capture.
2016-01-26 11:49:21 -08:00