Commit Graph

4055 Commits

Author SHA1 Message Date
gxalpha
9c6a3a1d49 obs-vst: Fix memory leaks on macOS when VST's fail to load
Detected by clang-analyzer.
2023-03-09 15:18:38 -05:00
Mathijs Kadijk
970c284a65 mac-virtualcam: Prevent PTS rounding
All presentation time stamps are rounded to whole seconds during the
conversion from nanoseconds to seconds, because of the immediate cast
to `int64_t`. This results in the same presentation time stamp being
send to consumers for a whole second.

In previews/live streams this isn't super visible as last frame is
often assumed to be the newest and the stream is updated. It's more
problematic when recording since APIs like Apple's AVFoundation don't
allow duplicate presentation time stamps or it can look like frames are
produced in huge bursts once per second.

In this PR `CMTimeMakeWithSeconds` is used instead of `CMTimeMake` to
make sure the conversion is done correctly and simplify the calculation
we have to do a little.
2023-03-09 15:45:48 +01:00
Mathijs Kadijk
ecaa5466cb mac-virtualcam: Fix incorrect PTS on Apple Silicon
The `fillFrame` method of the mac-virtualcam plugin is creating samples
directly using the value from `mach_absolute_time()` as `hostTime`.
This assumes this value is in nanoseconds, while it is in fact in mach
tick units. On Intel Macs mach tick units will be exactly 1 nanosecond
resulting in valid values, but on Apple Silicon macs this is no longer
the case.

This results in sample buffers with the placeholder image that have
much lower presentation time stamps than the samples containing content
produced by OBS. In previews/live streams this shows due to the last
content sample being shown frozen until the whole buffer is filled with
samples containing the placeholder image. Applications recording the
video stream are even more confused and crash or record videos with
wildly incorrect lengths.

In this PR `clock_gettime_nsec_np` is used to convert from mach tick units
to nanoseconds. This will make sure the `hostTime` value is correct on
both Apple Silicon and Intel macs. Making sure we produce stable
presentation time stamps from the virtual camera plugin at all times.
2023-03-09 15:45:48 +01:00
Ryan Foster
002bd0b5a4 win-capture: Suppress LNK4098
Suppress LNK4098 to allow building against pre-built Jansson for now.
2023-03-08 17:14:11 -05:00
derrod
2c48e61207 UI,obs-vst: Set Qt RCC format to 1
v2 introduces last-modified timestamps that ruin reproducibility.
2023-03-07 18:13:24 -05:00
tytan652
278973576e obs-outputs: Fix RTMP undefined symbols if built without Mbed TLS 2023-03-07 17:01:49 -05:00
derrod
2e57e09036 win-capture: Display compatibility information 2023-03-07 16:03:18 -05:00
tytan652
f4e90a5bd7 obs-ffmpeg,cmake: Add a finder for AMF headers 2023-03-07 14:55:03 -05:00
tytan652
6db418fb3f obs-ffmpeg: Replace external/AMF folder by obs-deps headers 2023-03-07 14:55:03 -05:00
PatTheMav
0fe28e9ceb mac-syphon: Fix warnings in ObjC code for CMake rework
Removes unused functions and explicitly casts higher-precision
CoreFramework data types into lower precision obs-module types.
2023-03-07 19:23:35 +01:00
Kurt Kartaltepe
0fb89dc9a1 obs-ffmpeg: Fix crash during ratecontrol check
When iterating over an array of structs we incorrectly check for a null
pointer, but the actual sentinel value is the empty struct.
2023-03-04 16:07:12 -08:00
gxalpha
ffd6ae699c obs-transitions: Add long description for full decode option 2023-03-04 15:33:17 -08:00
Chris (Flaeri)
e7cd29bbe5 obs-ffmpeg: Implement QVBR for AMF encoders
Makes QVBR rate control usable. Fix wrong rate control check on line
1457. Switch from bitrate to CQ/QP value (no bitrate needed).
2023-03-03 21:48:59 +00:00
Mico Häsänen
d33abf68e5 rtmp-services: Add Enchant.events to service list 2023-03-02 18:00:52 -05:00
Ryan Foster
681014bec2 rtmp-services: Fix whitespace issues in services.json
* Remove trailing whitespace
 * Use spaces instead of tabs for indents
2023-03-02 13:24:39 -05:00
Georges Basile Stavracas Neto
f62f370edd linux-pipewire: Remove unnecessary variable
No functional changes. The code is just ever so slightly easier to
read now.
2023-03-01 20:47:49 -03:00
Georges Basile Stavracas Neto
436787c1f4 linux-pipewire: Check for effective crop region
Some compositors send buffer crop information even when the crop
matches the buffer size. It doesn't really matter in practice,
but it's good hygiene to check for the effective crop instead of
simply checking if crop exists.
2023-03-01 20:47:49 -03:00
Georges Basile Stavracas Neto
d68b061d57 linux-pipewire: Adjust cosmetics
Move code into auxiliary functions, to improve the legibility of the
draw function. It also gets rid of these pesky switch fallthroughs.
No functional changes.
2023-03-01 20:47:49 -03:00
Georges Basile Stavracas Neto
925888b763 linux-pipewire: Fix wrong error message
In the non-DMA path, we are logging an error message saying that
the DMA format is wrong. That's not the DMA format, it's the raw
buffer format.

Fix the message.
2023-03-01 20:47:49 -03:00
Georges Basile Stavracas Neto
f520b251fb linux-pipewire: Demote yet another error to debug
This was an oversight from commit be629b93c.
2023-03-01 20:47:49 -03:00
Albert
414937a963 rtmp-services: Update Streamvi (#7921)
Co-authored-by: Joel Bethke <joel.bethke@gmail.com>
2023-03-01 17:36:58 -06:00
Stripchat
8fd6949778 rtmp-services: Update Stripchat streaming service (#8269) 2023-03-01 16:16:01 -06:00
Tophicles
87b7f7785f rtmp-services: Add LiveStreamerCafe (#8203)
Incremented version number as requested.

Co-authored-by: Kristopher Marentette <tophicles@syslog.brucenet>
2023-03-01 16:15:45 -06:00
Regan Black
6e0f5dccb2 rtmp-services: Update Switchboard Live Servers (#8180)
Co-authored-by: Regan Baah <one0ten@outlook.com>
2023-03-01 16:15:25 -06:00
Kevin Deng
480a8700da rtmp-services: Update Mildom more_info_link (#8334)
Co-authored-by: kevin.dww <kevin.dww@nonolive.com>
2023-03-01 16:13:38 -06:00
derrod
166dc4909d enc-amf: Update submodule 2023-03-01 20:39:53 +01:00
derrod
3c92413674 win-dshow: Remove obsolete name in REGFILTERPINS 2023-03-01 20:39:53 +01:00
derrod
2ac8ce8f65 obs-ffmpeg: Fix __VA_ARGS__ for comma ellision 2023-03-01 20:39:53 +01:00
derrod
19b6d79597 win-capture: Fix possible macro redefinition 2023-03-01 20:39:53 +01:00
pkv
2e79d4c902 obs-ffmpeg: Fix for FFmpeg 6 deprecating a flag
Also modifies libobs & deps/media-playback.
AV_CODEC_CAP_TRUNCATED was removed in avcodec 60 [1].
We ifdef the code depending on it to allow compilation.

[1] avcodec: remove FF_API_FLAG_TRUNCATED
3ceffe7839

Signed-off-by: pkv <pkv@obsproject.com>
2023-03-01 13:23:51 -05:00
gxalpha
fea4a19c8b obs-ffmpeg: Add full_decode to media source log
This is an option that while very powerful also provides a footgun for
users if they don't have enough memory. It will be helpful for support
volunteers to be able to see if the option has been enabled.
2023-02-25 19:26:51 -08:00
Jim
4bf14d09b4 obs-transitions: Add option to preload stinger video to RAM
Stingers -- and especially track matte stingers -- are currently subject
to real time decoding, which can be detrimental in a production
environment where a stinger video may not be able to decode in a timely
fashion.

To remedy this, this change adds an option to fully decode stingers
immediately and cache the decoded video/audio in RAM for playback to
greatly improve stinger performance.
2023-02-25 18:13:11 -08:00
columbarius
8abc3528cf linux-pipewire: Read buffer transformation from PipeWire
PipeWire allows since 0.3.62 [1] to attach metadata to a buffer
describing a transformation of the buffercontent. Clients should then
undo that transformation to import it correctly.

We can enable this feature using macro guards and runtime server version
checks on supported systems.

[1] https://gitlab.freedesktop.org/pipewire/pipewire/-/merge_requests/1423
2023-02-25 11:49:51 -03:00
Georges Basile Stavracas Neto
a1a98f9cfd plugins: Drop win-ivcam
Apparently this was a prototype from Intel that never really
properly launched. Remove the plugin.
2023-02-24 14:04:29 +01:00
Georges Basile Stavracas Neto
4ab9cd1005 plugins: Drop win-mf
The win-mf plugin is deprecated, and disabled by default. Let's drop
it entirely.
2023-02-24 13:22:52 +01:00
PatTheMav
8061652051 mac-videotoolbox: Refactor implementation
Existing code made use of macros which broke parsing in Xcode and
complicated debugging as crucial code was executed within macros and
not actual source code.

Use of mutable CoreFramework data structures (which were never mutated)
is replaced by use of faster non-mutable variants.

When an allocator needs to be used, `kCFAllocatorDefault` is specified
explicitly.

VideoToolbox session properties are also set in bulk instead of
multiple consecutive calls.

Also simplifies detection of Apple Silicon hosts to make code more
readable.
2023-02-21 21:29:12 +01:00
jpark37
09c2a321ce mac-videotoolbox: Add ProRes 4444 (XQ) support
Also leverage P216/P416 pixel formats to retain precision.
2023-02-21 18:48:44 +01:00
jpark37
463bf0dff5 libobs,UI: Add P216/P416 pixel formats
Will be useful for ProRes.
2023-02-21 18:48:44 +01:00
gxalpha
433c85bcd7 mac-capture: Fix various SCK memory leaks
Detected by clang analyzer.
2023-02-21 17:40:56 +01:00
PatTheMav
8c8a44b26a mac-virtualcam: Fix compiler warnings
CMake build framework 3.0 introduces more strict typing checks, which
require additional code fixes to silence.

* Fixes warnings about implicit casts
* Fixes warnings about weak references used multiple times inside
  blocks
2023-02-18 15:22:33 -08:00
PatTheMav
f98c2d2514 mac-capture: Fix compiler warnings
CMake build framework 3.0 introduces more strict typing checks, which
require additional code fixes to silence.

* Fixes warnings about multi-character assignments
* Fixes warnings about implicit casts
* Fixes warnings about shadowing variables
2023-02-18 15:22:33 -08:00
PatTheMav
c5bb6218b6 mac-avcapture: Fix compiler warnings
CMake build framework 3.0 introduces more strict typing checks, which
require additional code fixes to silence.

* Fixes warnings about multi-character assignments
* Fixes warnings about implicit casts
2023-02-18 15:22:33 -08:00
PatTheMav
1bb06a8bdc rtmp-services: Fix missing newline at the end of files 2023-02-18 15:22:33 -08:00
PatTheMav
f67c1bcceb obs-x264: Fix non-exhaustive switch statements 2023-02-18 15:22:33 -08:00
PatTheMav
f4bbe080bf obs-vst: Fix missing newlines at the end of files 2023-02-18 15:22:33 -08:00
PatTheMav
bb2a99cec8 obs-transitions: Fix non-exhaustive switch statements 2023-02-18 15:22:33 -08:00
PatTheMav
3175e699ea obs-filters: Fix non-exhaustive switch statements 2023-02-18 15:22:33 -08:00
PatTheMav
19c131c981 obs-ffmpeg: Remove unused variables 2023-02-18 15:22:33 -08:00
PatTheMav
6e0d802874 obs-ffmpeg: Fix non-exhaustive switch statements 2023-02-18 15:22:33 -08:00
PatTheMav
c4d60f47c7 decklink: Add missing newlines at the end of files 2023-02-18 15:22:33 -08:00