0
0
mirror of https://github.com/obsproject/obs-studio.git synced 2024-09-20 04:42:18 +02:00
Commit Graph

2123 Commits

Author SHA1 Message Date
Georges Basile Stavracas Neto
510c747459 libobs/nix: Move X11-specific code to obs-nix-x11.c
Currently, obs-nix.c is highly tied to the X11 display
server. It includes X11 headers directly, and make use
of X11 functions. Most of the code inside obs-nix.c that
is X11-specific is related to hotkeys handling.

Introduce a new vtable for hotkeys callbacks, that will
used by X11 and Wayland to expose their specific routines.
In this commit, only the X11 hotkeys vtable is implemented.

Move all the X11-specific code to obs-nix-x11.c, and add
a new function to retrieve the X11 hotkeys vtable.
2021-02-01 19:03:43 -03:00
Jim
2eca4d80b6
Merge pull request #2233 from VodBox/missing-files-dialog
libobs + UI: Add Missing Files API & Dialog
2021-01-31 08:02:16 -08:00
Jim
1c99cad33d
Merge pull request #4140 from jpark37/wgc-monitor
Add display capture via Windows Graphics Capture
2021-01-31 07:10:57 -08:00
jpark37
54047ef9ca libobs: Avoid strncpy warning 2021-01-30 00:24:16 -08:00
jpark37
98d1f340da libobs: Fix unused parameter 2021-01-29 21:50:06 -08:00
jpark37
bd14c926eb libobs: Fix truncation warning on 32-bit Windows 2021-01-29 21:47:34 -08:00
Kurt Kartaltepe
5efb10a5e2 libobs: Fix leaking obs-internal.h
Removes prior attempt to expose libcaption headers which really shouldnt
have public. This instead moves the obs-internal include out of the
public obs-scene.h and into it's implementation.
2021-01-28 23:59:02 -08:00
Exeldro
44ace7618f libobs: Duplicate source name for private sources
Allows for identification of sources in studio mode
2021-01-27 00:24:33 -08:00
jpark37
2b652cc763 libobs: gs_duplicator_get_monitor_index
Helper function to find DXGI output index of HMONITOR.
2021-01-26 17:11:04 -08:00
Clayton Groeneveld
99d10c2607 libobs: Add function to get module lib
This adds a function find module library.

Co-authored-by: Stéphane Lepin <stephane.lepin@gmail.com>
2021-01-26 03:31:31 -08:00
Kurt Kartaltepe
d8a253c42f libobs, linux-v4l2: Set thread names
Sets thread names for the hotkey and v4l2 capture threads.
2021-01-25 04:13:24 -08:00
jpark37
ccf16ddb65 libobs: Fix dstr leak 2021-01-22 22:16:17 -08:00
jpark37
71bd5860ce libobs: Final downsample with SRGB formats 2021-01-21 07:42:57 -08:00
jpark37
9e66a4d1ad libobs: Deinterlace as linear SRGB when needed 2021-01-21 07:42:57 -08:00
jpark37
72efe8b942 libobs: Update render_item to enable linear SRGB
Does nothing without linear-aware modifications to sources.
2021-01-21 07:42:56 -08:00
jpark37
66259560e0 libobs: Add dormant SRGB format support
GS_RGBA, GS_BGRX, and GS_BGRA now use TYPELESS DXGI formats, so we can
alias them between UNORM and UNORM_SRGB as necessary. GS_RGBA_UNORM,
GS_BGRX_UNORM, and GS_BGRA_UNORM have been added to support straight
UNORM types, which Windows requires for sharing textures from D3D9 and
OpenGL. The D3D path aliases via views, and GL aliases via
GL_EXT_texture_sRGB_decode/GL_FRAMEBUFFER_SRGB.

A significant amount of code has changed in the D3D/GL backends, but the
concepts are simple. On the D3D side, we need separate SRVs and RTVs to
support nonlinear/linear reads and writes. On the GL side, we need to
set the proper GL parameters to emulate the same.

Add gs_enable_framebuffer_srgb/gs_framebuffer_srgb_enabled to set/get
the framebuffer as SRGB or not.

Add gs_linear_srgb_active/gs_set_linear_srgb to instruct sources that
they should render as SRGB. Legacy sources can ignore this setting
without regression.

Update obs_source_draw to use linear SRGB as needed.

Update render_filter_tex to use linear SRGB as needed.

Add gs_effect_set_texture_srgb next to gs_effect_set_texture to set
texture with SRGB view instead.

Add SRGB helpers for vec4 struct.

Create GDI-compatible textures without SRGB support. Doesn't seem to
work with SRGB formats.
2021-01-21 07:42:13 -08:00
Richard Stanway
900b5341eb libobs: Add os_is_obs_plugin function
This function determines if something is an OBS plugin before attempting
to load it. On Windows, many plugins ship their dependent DLLs alongside
the plugin DLL, so OBS would load things like libcef.dll on startup only
to immediately free it. For other platforms, this is less of a concern
so this function is a no-op for now.

This improves startup time and reduces risk from dependent DLLs
potentially running code with unwanted side effects in DllMain.
2021-01-18 19:05:41 -08:00
VodBox
fb95e1d1e9 libobs: Add missing file API to sources 2021-01-17 10:31:58 +13:00
Theodore Dubois
7852efcba6 libobs: Cleanup uses of objc_msgSend in Objective-C code
Also remove use of deprecated [NSProcessInfo operatingSystem]. It always
returns the NSMACHOperatingSystem.

Also stop parsing [NSProcessInfo operatingSystemVersionString]. The
documentation explicitly says "not for parsing".
2021-01-12 10:10:37 -08:00
Marcus Rückert
12b6e28f03 libobs: Fix missing Linux libraries with certain flags
Make sure libobs links all libraries needed to satisfy symbols in the
library.

Fixes obsproject/obs-studio#3924
2021-01-11 14:10:53 -08:00
jpark37
b80919f65f libobs: Support color picker with alpha 2021-01-11 11:52:50 -08:00
ckelsel
9e07c42d74 libobs: Fix gs_duplicator_get_texture function check 2021-01-11 11:16:02 -08:00
jp9000
2597ed0ecc libobs: Update version to 26.1.2 2021-01-08 15:43:39 -08:00
Colin Edwards
0fa5dfcd30
Merge pull request #3933 from PatTheMav/macos-cef-texture-sharing
libobs: Add texture sharing support for macOS/OpenGL
2021-01-07 23:03:08 -06:00
jp9000
a9484fe737 libobs: Update version to 26.1.1 2021-01-03 08:18:43 -08:00
Richard Stanway
d0cbc83da2 libobs: Avoid unnecessary mallocs in audio processing 2021-01-02 14:53:19 +01:00
Michael R. Crusoe
1e96573328 libobs: Update to SIMDe 0.7.1
c3d7abfaba

Simplify usage of the SIMDe header

This obviates the need for sse2neon as well and fixes compilation of all
plugins that referenced sse-intrin.h on all architectures, not just
arm*.
2021-01-02 04:07:55 -08:00
Clayton Groeneveld
fdd34c35fc libobs: Set lock state when duplicating scene item
Fixes bug where the lock state wouldn't be copied when duplicating
a scene.
2020-12-31 13:26:39 -08:00
pkubaj
d46e8b03c9 libobs: Add definitions in ARCH_SIMD_DEFINES
This is necessary on ppc64 to build plugins that use cmake, so that
-DNO_WARN_X86_INTRINSICS is defined.
2020-12-31 06:31:25 -08:00
Richard Stanway
e5c6839904 libobs, obs-ffmpeg: Use correct value for EINVAL error check
FFmpeg functions such as av_interleaved_write_frame return negative
on error, so all errno values are negated.
2020-12-21 18:37:49 +01:00
PatTheMav
61ea6e0247
libobs: Add texture sharing support for macOS/OpenGL 2020-12-18 17:44:03 +01:00
Hector Martin
a5d08e347e linux-pulseaudio: fix race conditions
PulseAudio code needs to be called with the PA lock held. This chiefly
fixes multiple races during stream shutdown:

* If the functions are called without the lock held, deferred event
  handling races end up with PA infinite looping on the mainloop, or
  asserting, or other badness, as the reentrant calls cause data
  structure corruption on the PA side.
* If we don't reset our callbacks, PA might call us even after we
  request stream disconnection (since the stream actually getting fully
  shut down is asynchronous), and then we dereference NULL pointers from
  our userdata etc. PA will keep its data structures alive until necessary
  via reference counting, but not ours.

The lock around pa_stream_begin_write doesn't result from any issues I
experienced, but it looks correct; PA doesn't say anywhere that that
function is thread-safe.
2020-12-12 12:05:12 -08:00
Hector Martin
df4eb8219c libobs: fix the pending stop trick
Regression introduced by dc4e20500: while the stop detection is pending,
it should still return false so the rest of the discard code can run.
Otherwise, the source audio will remain in the buffer, lagging the
source and triggering audio buffering increases until max audio
buffering is reached.
2020-12-10 03:15:13 -08:00
jp9000
3c6b356208 libobs: Update version to 26.1.0 2020-12-09 02:34:15 -08:00
Richard Stanway
e00feef7ab libobs: Ignore non-fatal ffmpeg return values during remux
Similar to 315fbd6 and 6071098, ignore non-fatal errors during the
remux process. It's possible OBS itself writes a file that generates
these errors when remuxed.
2020-12-02 21:05:43 +01:00
jpark37
2d547cf669 libobs: Allow wrapping D3D11 object with gs_texture_t
This can be useful for reading from textures provided by middleware.
2020-11-24 14:39:56 -08:00
PatTheMav
fb27900e94 CI: Remove explicit LANGUAGE flags for cmake 3.19+ 2020-11-21 12:00:52 -08:00
Vadim Zhukov
0d222b6b56 Add OpenBSD support 2020-11-14 11:55:22 -08:00
jp9000
ebbe8d1bf9 libobs: Change service max res. to res. list
(This commit also modifies rtmp-services and UI)

Changes the maximum resolution size to a resolution list, and splits the
maximum FPS to its own function.

(Note: ABI has not been modified because the last changes still haven't
been released yet, so it's safe to modify this as long as the changes
haven't been officially released)
2020-11-13 18:22:53 -08:00
jp9000
fb7747c56e libobs: Implement obs_service func to get max bitrates
(This commit also modifies rtmp-services)

Implements obs_service_get_max_bitrate, which allows retrieving the
maximum audio/video bitrates directly rather than being forced to use
the apply method. Makes it a bit easier to get the bitrate values.
2020-11-11 09:42:26 -08:00
jpark37
86ecaadffb libobs: Fix bad type and size mismatch 2020-11-04 04:45:07 -08:00
Colin Edwards
5b8f89d86e decklink: Clean up warnings introduced by caption code 2020-11-03 17:00:14 -08:00
Colin Edwards
7b0d7c6357 Remove BUILD_CAPTIONS build flag 2020-11-02 22:46:55 -06:00
Colin Edwards
923f06bfa6 decklink: Add ability to ingest/embed cea 708 captions
(This commit also modifies libobs, UI)
2020-11-01 22:28:49 -08:00
Florian Zwoch
0c39fd08c7 libobs: Add desktop session type to Linux log
Add the content of the XDG_SESSION_TYPE environment variable to
the output log if it is set. This is usually set on modern Linux
distributions and typically carry either "x11" or "wayland" when
run from a desktop environment.

This is independent from the QT_QPA_PLATFORM environment variable
which would allow OBS Studio to run inside a wayland session. The
session type it runs on does have an implication on the behavior of
some plugins like screen and window capture. So having this
information exposed here is extremely helpful for diagnosing
issues.
2020-10-30 02:19:21 -07:00
jp9000
e4c6b59852 libobs: Add ability to get max cx/cy/fps from service
This obs_service_t object callback was implemented specifically for
services which may have a maximum recommended width, height, and
framerate that needs to be enforced.
2020-10-30 00:28:44 -07:00
Matt Gajownik
a86d4c073d libobs: Return default obj and array rather than current
Fixes #3357
2020-10-23 22:32:20 -07:00
Clayton Groeneveld
2b50263d5c UI, libobs: Add ability to copy/paste single filter 2020-10-15 10:14:22 -07:00
jp9000
18486853a5 obs-ffmpeg: Add ability to debug ffmpeg-mux subprocess
Adds a cmake variable (DEBUG_FFMPEG_MUX) which enables FFmpeg debug
output in the ffmpeg-mux subprocess, and if on Windows, shows the
console window of the ffmpeg-mux subprocess so the current output can be
seen.
2020-10-14 18:42:22 -07:00
jp9000
755e4f8897 libobs: Update version to 26.0.2 2020-10-06 07:57:55 -07:00