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

3206 Commits

Author SHA1 Message Date
Georges Basile Stavracas Neto
52a3a8817d linux-capture: Add preferred value out of the loop
Choice pods are built with the first element being the
preferred choice, followed by a list of possible choices.

We add the preferred choice inside the loop, which makes
the code slightly harder to follow.

Factor this out of the loop, into a separate step.
2021-12-30 18:41:04 -03:00
Georges Basile Stavracas Neto
37ba341d3a linux-capture: Rename a variable
'modifierless' is a bit non-descriptive given the lack of a
verb in the variable name. Rename it to 'use_modifiers', and
swap the logic.
2021-12-30 18:41:04 -03:00
Matt Gajownik
7c50621e15 obs-browser: Update version to 2.17.4 2021-12-29 16:55:23 +11:00
Richard Stanway
af6844f5c2 obs-outputs: Only log SO_SNDBUF on RTMP socket
From Windows 7 onwards, dynamic send buffering is enabled. By setting
SO_SNDBUF explicitly, we actually disabled the dynamic send buffering
feature which results in reduced throughput. Thankfully this did not
affect the majority of users since the default send buffer is usually
already 64k.

This commit replaces the setting of SO_SNDBUF with log output showing
the current value of SO_SNDBUF at stream start and end. This will aid in
debugging throughput issues caused by a buffer that isn't big enough,
perhaps as a result of the user disabling dynamic send buffering
system-wide.
2021-12-27 14:29:43 -08:00
jp9000
006fdd2be5 Revert "obs-filters: Remove duplicate color correction code"
This reverts commit 6940495e79.
2021-12-25 17:10:44 -08:00
jp9000
c16f27d269 Revert "obs-filters: Remove duplicate code from color key filter"
This reverts commit a4045ed31a.
2021-12-25 17:10:43 -08:00
jp9000
f4317888de Revert "obs-filters: Remove duplicate code from chroma key filter"
This reverts commit 311330628d.
2021-12-25 17:10:41 -08:00
Matt Gajownik
babc07fa5c obs-browser: Include atomic for browser source destroy
Fixes build issues on older CEF versions (especially on Linux)
2021-12-25 08:52:20 +11:00
jp9000
8629d6a028 obs-vst: Fix race condition and prevent double invoke
1dde4c37a obs-vst: Fix VSTPlugin::effect race condition
e33e8ee62 obs-vst: Modify VSTPlugin::closeEditor()
2021-12-23 10:58:44 -08:00
Norihiro Kamae
685f8297e4 obs-ffmpeg: Set frame_size for audio codec parameter
This commit fixes an issue that the last audio packet is sometimes not
written into mp4 format. Since libavformat internally calculates the
packet duration from the frame_size specified in the codec parameter, it
is necessary to set frame_size.
2021-12-23 10:48:37 -08:00
Matt Gajownik
e695bf674e obs-browser: Correct set function names to match README 2021-12-23 18:16:14 +11:00
columbarius
0532a5c1f0 linux-capture: Fix Ubuntu 21.10 builds
Ubuntu 21.10 provides PipeWire 0.3.32 which is missing the
`SPA_POD_PROP_FLAG_DONT_FIXATE` required for proper DMA-BUF negotiation.
Since this isn't implemented in the DE's of this Ubuntu version just
defining this flag won't have any impact.

Revert after support for Ubuntu 21.10 ended.
2021-12-22 14:27:53 -03:00
columbarius
13693bd199 linux-capture: Add fallback for PipeWire < 0.3.40
Proper DMA-BUF format and modifier negotiation is possible with PipeWire
0.3.40. This commit adds checks for older versions and allows to build
against them.

These are classified as follows:
* PipeWire server older than 0.3.24: Restrict to SHM only
* PipeWire server between 0.3.24 (incl.) and 0.3.40: Announce modifiers
  along with the old method. On failed import drop all modifiers.
* PipeWire server 0.3.40 and newer: Announce modifiers along with the
  old method. On failed import drop only a single modifier.
2021-12-22 14:27:53 -03:00
columbarius
abbec90e7e linux-pipewire: Handle DMA-BUF import failure
Importing a DMA-BUF can fail even if the renderer announces support for
the used format modifier pair. This can be caused by a number of reasons
specific to the underlying hardware and api [1]. In that case we want to
remove that modifier from our list of supported ones and renegotiate.

This feature was added in PipeWire 0.3.40. On previous versions the best
we can do is drop all modifiers an fallback to DMA-BUF with another
format or directly to the SHM buffer transport. This mechanism is
demonstrated in [2].

[1] https://xdc2020.x.org/event/9/contributions/615/attachments/704/1301/XDC_2020__Allocation_Constraints.pdf
[2] https://gitlab.freedesktop.org/pipewire/pipewire/-/blob/master/src/examples/video-play-fixate.c
2021-12-22 14:27:53 -03:00
columbarius
c31aba9600 linux-capture: Announce supported modifiers via PipeWire
Sharing DMA-BUFs via PipeWire requires the client to announce all
formats together with their supported modifiers. [1]

[1] https://docs.pipewire.org/page_dma_buf.html
2021-12-22 14:27:53 -03:00
columbarius
b57f7f0aed linux-capture: Bump minimal PipeWire version to 0.3.33
We require PipeWire 0.3.33 or later to make use of the introduces flags
`SPA_POD_PROP_FLAG_MANDATORY`  and `SPA_POD_PROP_FLAG_DONT_FIXATE`,
which are required for the negotiation process introduced in the
following commits.
2021-12-22 14:27:53 -03:00
Georges Basile Stavracas Neto
e41e845272 linux-pipewire: Use DRM fourcc defines directly
It was naive to add these defines here to avoid a direct include when
the entire platform already depends on the DRM subsystem. Just include
it and let it provide the image formats.
2021-12-22 14:27:53 -03:00
jp9000
a593fe6755 obs-outputs: Add support for "RTMP Go Away" feature 2021-12-21 09:44:21 -08:00
jp9000
b4fb1db460 obs-outputs/librtmp: Add custom connect data callback
Allows the ability to add custom connect data to the connect signal
encoding
2021-12-21 09:44:21 -08:00
jp9000
6a72cd64e7 obs-outputs: Add support for reading RTMP packets
Instead of ignoring RTMP packets, allow the ability to read incoming
RTMP packets
2021-12-21 09:44:21 -08:00
jp9000
1604a8d362 obs-browser: Do not wait for browser on source destroy
On source destroy, the browser source should not wait for other threads
if it's avoidable, as this could cause hard locks. Instead, mark the
source for destruction, destroy any obs/graphics data, and let the CEF
queue delete the what's left of the pointer at its leisure.

Fixes a hard lock on macs due to the browser source destructor having to
wait for the UI thread (due to USE_QT_LOOP), which may already have been
waiting for the source.
2021-12-21 01:33:18 -08:00
jp9000
51050b3075 Revert "mac-capture: Improve window capture performance"
This reverts commit 257715d31f.

Was merged prematurely by mistake (clicked the merge button on the wrong
tab).
2021-12-20 14:02:58 -08:00
Dossy Shiobara
257715d31f mac-capture: Improve window capture performance 2021-12-20 09:05:36 -08:00
Matt Gajownik
96ee97e997 obs-vst: Avoid using empty editorWidget for deleteLater() 2021-12-19 10:55:59 +11:00
hellowanda
a01a01f752 win-virtualcam: Make sure virtualcam output thread safe 2021-12-18 07:14:47 -08:00
liu.haibin
1883b774e8 obs-outputs: Reset dbr bitrate before end_data_capture_thread start 2021-12-17 04:31:16 -08:00
Jim
91a9688d9f
Merge pull request #5501 from RytoEX/fix-ffmpeg-deprecations
Fix FFmpeg deprecations up to FFmpeg 4.4 and current FFmpeg git
2021-12-17 01:16:35 -08:00
Translation Updater
062de2c998 Update translations from Crowdin 2021-12-17 08:01:29 +00:00
wangshaohui
81d70b5d1b win-capture: Should not init module if HWND is invisible 2021-12-16 23:39:55 -08:00
jp9000
1f20e0ca93 obs-browser: Fix deadlock 2021-12-14 10:34:53 -08:00
Translation Updater
261345f9ef Update translations from Crowdin 2021-12-12 02:38:59 +00:00
Matt Gajownik
d1478271a4 obs-browser: Fix build issues on Qt 5.9 (Ubuntu 18.04) 2021-12-12 11:56:34 +11:00
Matt Gajownik
1483aa9f7d obs-browser: Update version to 2.17.1
New features:
 - Expose Scene controls to sources
 - Pass on JS function arguments to BrowserClient
 - Add Browser Source Refresh Hotkey
 - Render JavaScript dialogs using Qt
 - Improve performance of CEF 4638 browser sources
 - Set window title for web popups using X11
 - Add TypeScript definitions information

Bug fixes/cleanup:
 - Don't call WasHidden on browser panels
 - Use mutex when accessing BrowserSource::cefBrowser
 - Correct JSDoc definitions
 - Remove old CEF ifdefs
2021-12-12 11:40:29 +11:00
Matt Gajownik
748279bd86 obs-vst: Update submodule with a variety of bugfixes
- Cleanup EditorWidget.h
 - Modify log in obs-vst, fix compile error
 - Update effect name even effect is unavailable
 - Fix crash caused by unsupported interface
 - Use deleteLater on editorWidget to prevent crash
 - Check result after creating vst plugin
 - Fix button states on properties refresh
 - Replace QMacCocoaViewContainer with QWidget::createWindowContainer
 - Modify incorrect code about mallocing memory
2021-12-12 11:37:46 +11:00
Matt Gajownik
9c01b1ecc8 libdshowcapture: Add FindPin, RGB24, & use CMake instead of pragma
This updates the libdshowcapture submodule to the latest commit.
This also changes win-dshow CMakeList to ensure compatibility.

Full commit list:
 - Add support of RGB24 format
 - CMake: Add Win32 libs instead of pragma directives.
 - Implement FindPin
 - Simplify error handling
 - Fix log level of DebugHR
 - Use default constructor instead of empty function
 - Use std::move instead of copy where appropriate
 - Mark some strings as const
2021-12-12 11:35:48 +11:00
Tatsuyuki Ishi
316f858c68 linux-capture: Fix capturing on software rasterization setups
The GLX_EXT_texture_from_pixmap spec says:

The contents of the texture after the drawable has been bound are defined
as the result of all rendering that has completed before the call to
glXBindTexImageEXT.  In other words, the results of any operation which
has caused damage on the drawable prior to the glXBindTexImageEXT call
will be represented in the texture.

Rendering to the drawable while it is bound to a texture will leave the
contents of the texture in an undefined state.  However, no
synchronization between rendering and texturing is done by GLX.  It is
the application's responsibility to implement any synchronization
required.

In practice, on most systems with a GPU this kept a directly binding to
the framebuffer, which made it work with the previous code. However,
on software rasterization setups using llvmpipe, a blit was done inside
the call to glXBindTexImageEXT. This was the cause of a notoriously
ignored bug where the captured image would "freeze" until the source
was reconfigured.
2021-12-12 11:13:24 +11:00
Carlo Castoldi
4623a6b4bc obs-ffmpeg: Set DRI devices and their name persistently
retrieving the DRI devices from /dev/dri/by-path/ instead of
/dev/dri/renderDXXX. This enable us to use lspci to get the device
name as well.
2021-12-12 11:12:36 +11:00
tt2468
c9b327d0f0 vlc-video: Emit media ended signal regardless of loop setting
Makes the signal's behavior on-par with `obs_source_media_started`.
`obs_source_media_started` is emitted every time a file in the playlist
is played, and so therefore should `obs_source_media_ended`. In this
scenario, the loop setting is actually irrelevant to the behavior that
this signal should have.
2021-12-11 15:25:40 -08:00
Kurt Kartaltepe
26f4d85398 linux-capture: Deinit pipewire only if we init'ed
If you don't have a xdg-desktop-portal backend then pipewire wont init,
however on exit we unconditionally deinit which can crash in pipewire
which does not handle this gracefully.
2021-12-12 10:05:02 +11:00
Ek Palmer
2e1c5fc801 rtmp-services: Add Fantasy.Club 2021-12-11 13:56:40 -08:00
Colin Edwards
b4bb574397 aja: .rc file for the aja plugin 2021-12-07 22:07:06 -06:00
Colin Edwards
0aa9603a88 aja: Fix crash in output settings when no card present 2021-12-07 19:08:29 -06:00
Colin Edwards
54e5252906
aja: Disable plugin if no devices are found 2021-12-07 18:52:12 -06:00
Richard Stanway
fad299f99f
aja: Static analysis bug fixes
* aja: Use inline const for header initializations

Avoids duplicating across compilation units. Detected by PVS Studio.

* aja: Avoid unnecessary type conversions

Detected by PVS Studio.

* aja: Remove duplicate assignments

Detected by PVS Studio.

* aja: Fix return value of aja_output_create

Detected by PVS Studio.

* aja: Remove unused variable

Detected by PVS Studio.

* aja: Fix compiler warning

* aja: Remove unreachable if branch in aja routing

* aja; Cleanup return in card manager

Co-authored-by: Colin Edwards <colin@recursivepenguin.com>
2021-12-05 22:17:39 -06:00
gxalpha
87fc27c254 text-freetype2: Fix unused parameter warning 2021-12-04 15:23:07 -08:00
gxalpha
ec7c49a569 obs-filters: Fix unused parameter warnings with speex disabled 2021-12-04 15:23:07 -08:00
Norihiro Kamae
f8bcc190e2 obs-ffmpeg: Fix memory leaks if replay buffer failed
When releasing a darray mux_packets at error, contents of mux_packets
are not released. It causes memory leaks if error occurs during saving
the replay buffer to a file.
2021-11-30 21:53:34 -08:00
columbarius
c1b87e70ef linux-capture: Fallback on older PipeWire versions to SHM
PipeWire server versions older than 0.3.24 can be incompatible with
clients build against a newer library version with respect to DMA-BUF
sharing. So we want to fallback to SHM transfer. This commit adds
checks for older versions.

These are classified as follows:
* PipeWire components older than 0.3.24: Restrict to SHM only
* PipeWire components with version 0.3.24 and newer: Announce DMA-BUF
  support via `SPA_PARAM_BUFFERS_dataType`
2021-11-28 19:43:24 -03:00
columbarius
9f7de79004 linux-capture: Query used PipeWire versions
This enables us in the following commit to announce different
capabilities wrt. those versions.
2021-11-28 19:43:24 -03:00
Matt Gajownik
f2592624db obs-browser: Update to 2.17.0, add CEF 4638 support
This also fixes a flickering texture issue in browser sources.
2021-11-28 09:11:04 +11:00