Commit Graph
12215 Commits
Author SHA1 Message Date
Richard StanwayandRyan Foster 150124038b libobs-d3d11: Convert monitor name to UTF-8 for logging 2023-02-15 15:36:13 -05:00
Jan BeichandRyan Foster 50338afe51 CI: Consistently capitalize PipeWire 2023-02-15 14:44:36 -05:00
Jan BeichandRyan Foster ca6dc26332 CI: Add PipeWire package to FreeBSD config for CirrusCI 2023-02-15 14:44:36 -05:00
Jan BeichandRyan Foster 60d20d4618 CI: Enable PipeWire on FreeBSD similar to Linux 2023-02-15 14:44:36 -05:00
Jan BeichandRyan Foster 0a257a71e8 plugins: Enable linux-pipewire on FreeBSD 2023-02-15 14:44:36 -05:00
Jan BeichandRyan Foster e98c9fbd65 linux-pipewire: Drop unused Linux-only header
<dma-buf.h> provides DMA_BUF_IOCTL_* which were never used by OBS.
2023-02-15 14:44:36 -05:00
gxalphaandRyan Foster 9afc3cabca UI: Refactor / Clean up addNudge 2023-02-15 14:11:46 -05:00
Richard StanwayandRyan Foster e9504326f9 UI: Remove unnecessary null checks 2023-02-15 13:40:13 -05:00
Richard StanwayandRyan Foster 2ac43052f9 UI: Fix memory leak of remux window 2023-02-15 13:40:13 -05:00
Richard StanwayandRyan Foster bff7928b50 UI: Avoid division by zero when calculating slider position
Detected by UBSan.
2023-02-15 13:40:13 -05:00
Richard StanwayandRyan Foster 1f278bb18b UI: Set remux entry state before adding to queue
When adding to the queue, this triggers rowCountChanged which then
calls canClearFinished, reading undefined memory for state if this is
not set. The correct state is set immediately after by checkInputPath.

Detected by UBSan.
2023-02-15 13:40:13 -05:00
Richard StanwayandRyan Foster 7178124da9 libobs: Fix typo in function name 2023-02-15 13:40:13 -05:00
Richard StanwayandRyan Foster 7c8acd48a9 UI: Improved implementation for sorting filters menu
Rather than finding the insertion point and iterating the vector for
each item, let's sort it afterwards.
2023-02-15 12:48:08 -05:00
tuduwebandPatrick Heyer e36163ce89 libobs/media-io: Correctly check codec tag compatibility for out stream 2023-02-15 18:21:09 +01:00
binandRyan Foster 60e014e0e3 UI: Correct browse behavior in non-empty input edit line 2023-02-15 11:22:03 -05:00
derrodandRyan Foster 970585d073 CI,docs: Create separate CF pages artifact
The CF pages artifact has no extensions in generated links to avoid the
automatic redirects CF does.
2023-02-15 10:55:53 -05:00
derrodandRyan Foster fad0c8d401 CI: Only publish docs on stable tags
Also fixes version update not running for workflow_dispatch events.
2023-02-15 10:55:53 -05:00
Paul HindtandRyan Foster 003241511c aja: Add audio channel selection to capture
Adapted audio repacker for 32-bit samples,

with an ifdef to use SIMD or C version.
2023-02-15 10:38:39 -05:00
PatTheMav 27ba216271 libobs-opengl: Fix projector crash with external macOS displays
When an external display is disconnected with a fullscreen projector
attached to it, Qt will trigger a resize of the window twice, which
makes the renderer queue 2 resize event blocks.

At the time when those blocks are run, Qt's window destructor will have
reset all pointers, and the block directly accesses pointers within
structures identified by pointers, which are invalid by that point.

This commit makes a block return early if the associated window has
been destroyed already and also explicitly checks for valid pointers
after.
2023-02-15 16:34:21 +01:00
练亮斌andRyan Foster b5b3563479 vlc-video: Support subtitle track up to 1000 2023-02-15 10:05:28 -05:00
Georges Basile Stavracas NetoandGeorges Basile Stavracas Neto be629b93ce linux-pipewire: Demote error to debug message
Receiving buffers flagged as corrupted, or empty, is a casualty of
how things are implemented in various compositors, and it's not
a critical situation to be afraid of. We can expect a few buffers
to be flagged as corrupted here and there, and that's fine.

Demote these warnings to debug messages, as they're still useful
for debugging.
2023-02-14 18:50:57 -03:00
Roman HutsandRyan Foster c5a06d3cf2 obs-ffmpeg: Update AMF SDK to v1.4.29 2023-02-13 14:38:18 -05:00
gxalphaandRyan Foster c24ec240af UI: Remove unused Qt crash reporter code
The crash reporter made with Qt was introduced in 824c7b0, but then was
quickly replaced by a native OS implementation in d42a7ce. This code has
been lying around ever since.
2023-02-13 10:34:18 -05:00
Georges Basile Stavracas NetoandGeorges Basile Stavracas Neto fad7420198 linux-pipewire: Trivially shuffle some code around
A trivial cosmetic change. This groups the constructor and
destructor together. Two sides of the same coin, yin and yang,
bound by their nature, and linked by their position in code.
2023-02-13 12:28:09 -03:00
Georges Basile Stavracas NetoandGeorges Basile Stavracas Neto f8a7b13cd3 linux-pipewire: Rename obs_pipewire_data to obs_pipewire
Next commits will introduce new obs_pipewire_* types, so this
renaming will make it slightly easier to read the code with
different types.
2023-02-13 12:28:09 -03:00
Georges Basile Stavracas NetoandGeorges Basile Stavracas Neto b7daa89f85 linux-pipewire: Split initialization of core and streams
This commit introduces an important distinction in the initialization
process that is essential to future camera and audio work: it splits
creating and connecting to the PipeWire socket, from connecting to
specific PipeWire nodes.

Right now, for the only consumer in existence - the ScreenCast portal
code - this distinction is irrelevant, but from an API perspective it
just makes sense to model it this way.
2023-02-13 12:28:09 -03:00
Georges Basile Stavracas NetoandGeorges Basile Stavracas Neto 5065e86bb9 linux-pipewire: Remove unnecessary struct field
We don't actually need to restore the node id anymore, since this
is handled by the screencast-portal.c code now.

Remove the pipewire_node field, and just create the stream directly
from the passed file descriptor now.
2023-02-13 12:28:09 -03:00
Georges Basile Stavracas NetoandGeorges Basile Stavracas Neto 890ca94b0b linux-pipewire: Inline play_pipewire_stream()
This separation of obs_pipewire_create() and play_pipewire_stream()
was an artifact of how the original code was written, and there is
no reason to keep this separation anymore. Inlining it will help
future commits too.
2023-02-13 12:28:09 -03:00
columbariusandGeorges Basile Stavracas Neto 86be35ae99 linux-pipewire: Move stream properties to constructors
And let each portal pass the stream properties relevant to them.
This makes the pipewire.c more independent of the actual portal
by providing a wrapper to create a stream. This will be relevant
later, when linux-pipewire introduces more portals like the Camera
one.
2023-02-13 12:28:09 -03:00
Georges Basile Stavracas NetoandGeorges Basile Stavracas Neto 874c30cb88 linux-pipewire: Cleanup D-Bus proxy on unload
When the linux-pipewire plugin is unloaded, make sure to cleanup
the D-Bus proxy for the ScreenCast portal too. This effectively
doesn't change anything, but it's always good to keep up with the
code hygiene.
2023-02-13 12:28:09 -03:00
Georges Basile Stavracas NetoandGeorges Basile Stavracas Neto b8cfe1aab1 linux-pipewire: Return actual type in obs_pipewire_create
Instead of returning an opaque void* pointer, return the leaf
C type obs_pipewire_data*.

This commit introduces no functional changes.
2023-02-13 12:28:09 -03:00
Service CheckerandRodney 5b370d4e3a rtmp-services: Remove defunct servers/services 2023-02-13 02:20:50 +01:00
Kurt KartaltepeandGeorges Basile Stavracas Neto 041fee0484 libobs-opengl: Accelerate dmabuf import
Previously we would actually initialize a texture memory that would then
also have to be deleted when we bound the EGLImage to the texture during
dmabuf import.

Instead simply do not create the dummy texture memory. One odd thing is
that we must still query the texture to ensure its initialized or
binding the EGLImage will not work. So we leave the TEXTURE_MAX_LEVEL
check.

This makes screencapture up to 100x faster on discrete intel cards and
likely has some performance benefit for amd/integrated cards. Without
this dmabufs are actually slower than shared memory for these intel
cards.
2023-02-12 19:07:05 -03:00
gxalphaandPatrick Heyer 67e6b8649a mac-videotoolbox: Load encoders from system asynchronously
Copying the encoder list takes a while which blocks the main thread.
Doing the copying asynchronously removes instead of blocking the main
thread improves startup performance by about 60ms.
2023-02-12 17:38:21 +01:00
cg2121andJim 7a838e877f UI: Fix scene item edit drag & drop bug
If an user exits the source tree edit mode, without changing the name,
the scene item would become undraggable until the scene is refreshed.
We were setting the focus to just the label, not the whole widget.
2023-02-12 02:46:12 -08:00
ExeldroandJim 3840f92777 win-dshow: Fix virtualcam output a default video format 2023-02-11 16:21:49 -08:00
tytan652andJim cb6b5cc249 libobs: Add desktop environment to Linux log 2023-02-11 16:19:12 -08:00
tytan652andJim eacc246584 libobs: Add Flatpak info logging 2023-02-11 16:19:12 -08:00
gxalphaandJim 3e4bbe85c8 UI: Remove workaround for current scene being deselectable on Qt 6.4.3+
Qt 6.2 introduced an issue where SingleSelection item views would
deselect the current item if the user clicked on empty area in the
widget.
This was very confusing in the scene tree as it was now possible to
unselect the current scene. A workaround for this in OBS was added in
08e4ee6 and expanded on in dc30cf0, but being quite hacky it never was
the perfect solution.
I since dug into Qt and fixed the issue upstream in qt/qtbase@f11e5435c7
for Qt 6.4.3 and newer, so we can remove the workaround when using those
versions (with the long term goal of removing the code altogether).
2023-02-11 16:01:27 -08:00
derrodandJim 5bdf492f8a UI: Avoid excessive config reads when drawing preview 2023-02-11 15:58:40 -08:00
Ilya MelamedandJim 213ce75328 UI: Add check for null widgetForAction result
In some cases, `QToolbar::widgetForAction` may return `nullptr`. This
causes a crash on affected system.

To mitigate this, we check for `widgetForAction` result and skip
operating on a NULL widget.
2023-02-11 15:56:19 -08:00
binandJim d831e9403f obs-vst: Read plugins in symlink 2023-02-11 15:50:29 -08:00
Norihiro KamaeandJim ee6ddeeaed libobs: Avoid position underflow when mixing audio sources
When a variable `pos` became larger than `AUDIO_OUTPUT_FRAMES`, `count`
will get overflowed number. To avoid the overflow, continue the loop
when `AUDIO_OUTPUT_FRAMES - pos` is not positive.
2023-02-11 15:22:17 -08:00
binandJim 228a170361 obs-filters: Fix preset properties refresh 2023-02-11 15:14:00 -08:00
pkvandJim ad3df88fe3 obs-ffmpeg: Fix encoding of 2.1 with FFmpeg aac encoder
The aac spec has a list of default channel layouts that are implemented
by all aac encoders / decoders.
Unfortunately 2.1 is not in that list. When I wrote the surround sound
support into OBS, as a workaround I decided to encode 2.1 as
AV_CH_LAYOUT_SURROUND = FL+FR+FC.
The LFE channel is encoded as a regular audio channel which uses more
bits but this allows compatibility with all aac decoders.
Recently we updated to the new channel layout API of FFmpeg, but the
mapping of 2.1 to AV_CH_LAYOUT_SURROUND was forgotten in the FFmpeg
native aac encoder. This is remedied here.

Signed-off-by: pkv <pkv@obsproject.com>
2023-02-11 15:06:47 -08:00
jpark37andJim 6734167bf1 win-capture: Log display ids 2023-02-11 15:05:28 -08:00
jpark37andJim 35ee1b2ed1 libobs-d3d11: Log display ids 2023-02-11 15:05:28 -08:00
derrodandRodney a0b5c1b3f5 UI: Fix properties widget being cut off until resize 2023-02-10 12:04:47 +01:00
tt2468 b2375a0660 obs-ffmpeg: Initialize SRT stats object before requesting stats
The `srt_bstats()` function is not guaranteed to zero the stats object
before filling in stats. If a socket was connected, then disconnected,
without any data being sent over it, the stats object would remain
uninitialized, and weird results could occur.
2023-02-08 11:13:41 -08:00
tytan652andGeorges Basile Stavracas Neto f81f580d26 flatpak: Override PipeWire to 0.3.65
Fixe crashes with 0.3.48/49 daemons.
2023-02-07 12:02:45 -03:00