Compositors did not agree on how to communicate invalid buffers until
recently, so e0a4d8628d resulted in
regressions on KDE. This restores our old behavior which is too
conservative but mostly works on old and new compositors (which contain
similar workarounds to pass in invalid but non-zero sizes for dma-bufs).
Once all old compositors are out of use we can remove this workaround
and then compositors can remove their random size workaround.
Sequence start and end packets never have a valid DTS, but with a
non-zero offset the timestamp in the packet would end up also being
non-zero, which leads to librtmp attempting to calculate a timestamp
delta and underflowing.
As a fix, simply remove the ability to even set a DTS offset for
start/end packets and always keep it at zero.
With the recent change to enforce C17 standard for compilers, default
visibility was also enforced to be hidden. This also automatically hid
the `PlugInMain` symbol required for DAL plugins. Adding the
`__exported` decorator makes the symbol explicitly visible.
This logs that dynamic bitrate is disabled when a codec which does not
support bitrate reconfiguration is used, such as aom, svt-av1 ...
Signed-off-by: pkv <pkv@obsproject.com>
Macros make the code you see different from the code the compiler sees.
Modern C renders traditional uses of macros for constants and utility
functions unnecessary. Macros should only be used when there is no
other solution available.
The header packets are only used within the rtmp-output and do not need
or use the ref counter as the data is manually free'd directly.
The presence of this ref counter causes a crash on *nix platforms due to
our memory alignment hack attempting to free memory but reading the
wrong offset due to the ref counter being there rather than the
alignment offset.
The format is only checked for 10-bit capable formats, which in this
case applies to HEVC only. When HEVC is disabled, then `format` is
not checked and becomes an unused variable otherwise.
Fixes an issue where update/destroy of a media source during reconnect
would block the parent thread until the next reconnect attempt. This
would result in significant quantities of dropped frames, delayed OBS
shutdown, or frozen UI during this period.
Xcode 14.3 and the macOS 13.3 platform SDK introduced a few breaking
changes:
* Updated AppleClang emits warnings about unqualified std cast calls
when using C++ - as `move` is too broad a word, developers are to use
`std::move` to make this explicit. Alas this is exactly what `json11`
uses and because that library is archived, there is no possibility
of an upstream update.
* Apple guarded calls to old screen capture APIs as "available but
deprecated", but seems to have chosen the wrong lower version
boundary: The calls are flagged as being available for macOS 13 and
macOS 14 only.
To fix this, the existing macOS platform SDK header is replaced by a
local copy that uses macOS 11 as the lower boundary (the oldest macOS
version supported by obs-studio anyway)
In avcodec.h, the docs for AVCodecContext->framerate say:
encoding: May be used to signal the framerate of CFR content to an
encoder.
OBS is designed to always output Constant Frame Rate (CFR) content.
Instead of letting this be implied, let's explicitly set the framerate
per the docs.
When using FFmpeg-based NVENC, with b-frames, and a non-1 framerate
numerator (eg. `1001/60000` aka 59.94fps), the DTS values outputted
by FFmpeg result in invalid DTS values.
Detect when using an unpatched FFmpeg build and correct the values
accordingly.
The current method would enum though all devices looking for a matching
uid instead of directly asking for kAudioHardwarePropertyDeviceForUID.
Asking directly instead would also enable finding hidden devices that
can only be found directly via uid and not via enumerating (were we ever
to need to find such a device).
Pipewire desktop portal capture assumes premultiplied alpha, so make
sure to use the right blend equation to make translucent pixels work
correctly.
This is still broken for emissive pixels (alpha < color) since OBS seems
to unpremultiply at some point during blending, but it works properly
for translucent pixels (emissive pixel support requires an end-to-end
premultiplied pipeline).
We were calling avio_close on a field that might have held an
AVIOContext. This commit checks which type was allocated so we
can call the appropriate cleanup function.
Telling a user to "Check your driver is up to date" is too open to
interpretation, many users will use Windows Update or Device Manager to
check for updates which doesn't help. Instead, let's explicitly tell
them what is most likely to fix the problem.
- Do not set sample rate (not required here, but can be 24/32 now)
- Only set bit_rate for lossless codecs
- Only set frame_size for codecs using a fixed one
Applications that use this Vulkan extension would have image usage
mismatches because we add VK_IMAGE_USAGE_TRANSFER_SRC_BIT to
VkSwapchainCreateInfoKHR::imageUsage, so make the same modification to
VkFramebufferAttachmentImageInfo::usage.
30d2b6f - Add ability to zoom browser docks with Ctrl - and +
cbad08a - Use officially documented data type to persist CEF preferences
4236b56 - Persist CEF Preferences
501f624 - Add proc handler for javascript event
5a55d18 - Replace SIGNAL and SLOT macro with new style
72afb16 - Increased maximum width and height
e9eb123 - Fix leak with SchemeHandlerFactory
ea9f59d - Fix issue with unknown speaker layouts
00f1396 - Remove redundant macOS hardware acceleration check
c2aaaef - Move custom FPS property next to its FPS
With 5fe417bce1 it became possible to use
Opus in local recordings, this could potentially have the user try to
record Opus in MP4.
FLAC in MP4 was marked as stable in FFmpeg 6.0
Opus in MP4 was marked as stable in FFmpeg 4.3
For Ubuntu 20.04 we still need the latter, for 22.04 (and potentially
other Linux distributions) the former.
While FLAC is not yet implemented, we may want to do that in the near
future so for simplicity just keep it at 6.0.
If the server URL is not an RTMP(S) URL, the protocol field becomes
required.
The output field becomes required on non-RTMP(S) services to keep
backward compatibility.
Also skip service if the protocol is not available.
Some send() errors are not treated as fatal but the connection gets shut
down regardless. When this happens, librtmp may send an FCunpublish
message which various services interpret as an "end of stream" message
and disable features like "disconnect protection". Instead, let's
explicitly close the socket so that the remote end is aware that this is
an unclean disconnect.
"New Socket Loop" and "Low Latency Mode" RTMP options are only available
on Windows.
Those options should be ignored and forced-disabled on non-Windows
builds.