Commit Graph

3746 Commits

Author SHA1 Message Date
Stefan Hoffmeister
fbb7b93226 linux-v4l2: Remove redundant non-NULL check on FILE 2022-09-17 16:14:05 -07:00
Stefan Hoffmeister
e8f27c2a79 linux-v4l2: Fix resource leak on device open error path 2022-09-17 16:14:05 -07:00
Kurt Kartaltepe
b1c65af2b1 linux-capture: Ensure name pixmap is checked
The void cookie will never return an error unless we use the explicitly
checked version of this function.
2022-09-12 12:50:53 -03:00
WarmUpTill
2a4f91bbee image-source: Update media states when source is de-/activated 2022-09-10 16:31:23 -07:00
jpark37
afeb78e022 graphics-hook: Print DXGI swap chain desc 2022-09-10 15:36:53 -07:00
jpark37
5fd22f3dfd graphics-hook: Remove unused code 2022-09-10 15:36:53 -07:00
jpark37
6a29cc5876 decklink: Set output range and color space 2022-09-10 15:36:27 -07:00
jpark37
a45cb71f6e win-capture: Remove unused wildcard code 2022-09-10 15:34:09 -07:00
pkv
d0366671e4 obs-ffmpeg: Fix memory leak with mpegts
Fixes #7305.
Some copied data was not freed and also not all paths freed AVPackets.

Signed-off-by: pkv <pkv@obsproject.com>
2022-09-10 15:31:07 -07:00
jpark37
894e37d0e1 libobs-winrt,win-capture: Allow forcing SDR
We don't know if there's a way to get window color space, so we've been
using the monitor color space of the window. This toggle forces OBS to
ignore the monitor color space, and assume the window is SDR.
2022-09-04 17:16:07 -07:00
jpark37
e583e86b35 image-source: Add JXR HDR support to slide show
Only supported on Windows.
2022-09-04 16:15:05 -07:00
jp9000
76c9b2b297 win-dshow: Update libdshowcapture 2022-09-02 18:00:26 -07:00
jp9000
bfa2053b08 Revert "win-dshow: Save and restore video device config props"
This reverts commit a36b5bee99.

After this commit was merged, apparently devices were not functioning
correctly for some people. Especially regarding their internal settings.
Just revert it for now.
2022-09-02 17:35:58 -07:00
jp9000
2f8d28f7fa decklink: Keep deckLinkConfiguration while in use
Apparently this annoying, stupid variable was leaking before the ComPtr
was added, which ironically was necessary to ensure devices worked.
After that ComPtr commit some devices stopped capturing properly.
Basically, it implies that this pointer needs to stick around while the
device is in use.

(Jim note: This was one of the most painful things I've ever had to
debug)
2022-09-02 17:09:12 -07:00
jp9000
9176348176 decklink: Remove unnecessary AddRef
Caused leaking memory
2022-09-02 17:09:12 -07:00
Richard Stanway
3332beece5 obs-ffmpeg: Fix seek offset being calculated incorrectly
If FFmpeg wrote data and then seeked back to immediately overwrite it,
the second seek would be skipped as our virtual offset was incorrectly
thinking it hadn't changed. This caused MP4 corruption when seeking
back in the file to write the moov atom.

Fixes https://github.com/obsproject/obs-studio/issues/7269
Fixes https://github.com/obsproject/obs-studio/issues/7144
2022-09-03 01:34:14 +02:00
jp9000
09da3ac439 win-dshow: Fix avermedia HDR tonemapping 2022-08-31 12:05:07 -07:00
gxalpha
bbd1e8b485 obs-ffmpeg: Always reset timestamp 2022-08-30 22:41:29 -04:00
jp9000
21da0b0462 obs-ffmpeg: NVENC "(new)" begone
It's about time to get rid of this being labeled as "(new)".

Also rename the FFmpeg variant. And make it more explicit when the
FFmpeg encoder is being used in the log file.
2022-08-30 17:05:36 -07:00
tt2468
b5bb5df58d plugins: Update obs-websocket to 5.0.2 (Crowdin translations) 2022-08-30 16:43:28 -07:00
Translation Updater
cc2d0791ca Update translations from Crowdin 2022-08-30 09:00:44 +00:00
Richard Stanway
894bc4078b obs-ffmpeg: Log codec when creating NVENC encoders
With HEVC and H264 settings being near-identical, it was impossible to
figure out which codec was being used by context alone. This applies to
both ffmpeg output and jim-nvenc.

Fixes #6976.
2022-08-29 21:43:04 -07:00
jpark37
8f6f761631 obs-ffmpeg: Rename NVENC type for clarity 2022-08-29 20:41:42 -07:00
jpark37
26fce825a7 obs-ffmpeg: Fix NVENC HEVC regression
Forgot to switch enableEncodeAsync to 0.
2022-08-29 20:41:42 -07:00
Norihiro Kamae
f393adb7e6 plugins: Rename Partial to Limited in localization files
The commit 9409ce1ea7 rephrased Limited instead of Partial. Other
plugins should follow the updated phrase.
2022-08-29 10:03:12 -07:00
jpark37
5c85f8ae17 obs-ffmpeg: Add AVContentLightMetadata to MPEG-TS 2022-08-29 10:02:49 -07:00
jpark37
29be9bff7a obs-ffmpeg: Don't use NVENC async mode
Fixes hang on stop presumably because header read failed from being too
early?

Our buffering scheme makes async mode moot anyway.
2022-08-29 10:01:57 -07:00
gxalpha
dbcafb62ff mac-capture: Remove explicit call to setBackgroundColor
This was necessary since the default background color was meant to be
clear, but wasn't set properly. The bug is fixed in macOS 13 Beta 6, so
we can remove this statement.
2022-08-29 14:38:52 +02:00
jpark37
614119db21 obs-ffmpeg: Fix NVENC async usage pattern
Fix async API usage problems reported by NVIDIA.
2022-08-28 17:50:48 -07:00
gxalpha
a4f486517f obs-filters: Clarify that HDR Tone Mapping filter is optional 2022-08-27 16:39:53 -07:00
Jim
2e5f900fe6 obs-ffmpeg: In AMF, use bframe count + 1 as DTS offset
Recommended by Mikhail. Seems to work fine. Should also fix the DTS
regression.
2022-08-27 09:39:46 -07:00
Jim
4c3e671819 obs-ffmpeg: Set max AMF consecutive bframes to 3 by default
The AMF documentation states that this value is recommended to be 3 if
the bframe picture pattern property is a non-zero value.
2022-08-27 09:32:38 -07:00
jpark37
e5a1ef91e3 obs-filters: Fix HDR tonemap filter for scRGB
JXR images work now.
2022-08-27 08:38:12 -07:00
jpark37
a9c68c4623 mac-capture: Replace false with 0
Param is uint32_t, not bool.
2022-08-27 08:37:44 -07:00
Be1erafon
a709bc4a73 rtmp-services: Update Streamvi 2022-08-26 19:04:32 +02:00
Chris
7c36cba065 obs-ffmpeg: Change AMF bitrate to kbps
Move multiplication to when its passed to the encoder, so that bitrate
is kept in kbps. Changed for both for H264 and HEVC. Other encoders
(x264 and NVENC) already display bitrate in kbps in the log,
so it makes sense to mimic this with AMF. It's difficult to tell the
exact bitrate with bps.
2022-08-24 05:34:21 -07:00
jpark37
38d8a844de mac-capture: Use cleaner render patterns
Render code seems unnecessarily custom. Use normal patterns.
2022-08-22 16:38:50 -07:00
jp9000
6dc8897e79 obs-ffmpeg: Fix AMF encoder lockup with older AMD cards
This goes back to a slightly older variant of the
SubmitInput/QueryOutput handling that doesn't use AMF's timeout
property. Older devices do not like it when you change the query timeout
on the fly and will lock up. So instead, wait one millisecond when the
AMF input is full, which appears to fix the issue according to testers.

Also adds a loop timeout in case it goes in an infinite loop (which it
shouldn't anymore, but still)

Big thanks to Flaeri for testing the old code, and Yukari for patiently
testing a whole bunch of builds.
2022-08-22 11:20:51 -07:00
Jim
a6c2bb1294 obs-ffmpeg: Use AMD example PTS/DTS offset
All this does is it uses the same exact code AMD uses with their own
example FFmpeg muxer code. Although instead of adding to the PTS, it
subtracts from the DTS.
2022-08-22 11:15:23 -07:00
Jim
9b087d15fc ffmpeg-mux: Do not output error if non-fatal error
Fixes a case where stderr can fill up and cause a freeze on Windows
2022-08-22 03:30:10 -07:00
Jim
d95ebc6294 Revert "ffmpeg-mux: Disable stdout/stderr on Windows"
This reverts commit 332dd00089.
2022-08-22 03:28:38 -07:00
Jim
332dd00089 ffmpeg-mux: Disable stdout/stderr on Windows
These server no purpose unless the ENABLE_FFMPEG_MUX_DEBUG flag is
enabled, and will ultimately just cause problems.
2022-08-22 02:50:17 -07:00
jpark37
270d299258 mac-capture: Clip gamut to sRGB
Mac likes P3, but OBS only supports sRGB for SDR.
2022-08-20 16:39:37 -07:00
shiina424
d056dce428 mac-capture: Add missing locale text 2022-08-20 01:34:03 -07:00
Service Checker
9bdb136cd4 rtmp-services: Remove defunct servers/services 2022-08-20 01:30:29 -07:00
fuyingqi
f5be6f5fdd obs-ffmpeg: Fix ffmpeg_output memory leak
The memory leak was introduced by a commit ba68eda59 to use
av_packet_alloc because av_init_packet got deprecated.

Also removes a boolean flag `new_packet` and use the pointer `packet`,
which is introduced by ba68eda59, to indicate there is a new packet.

Co-authored-by: Norihiro Kamae <norihiro@nagater.net>
2022-08-18 11:07:17 -07:00
jpark37
87a69f7623 win-dshow: Incorporate Elgato submodule
Add automatic tonemap toggle for HD60 S+ as well.
2022-08-18 10:44:59 -07:00
jpark37
57a24c540f obs-x264: Remove unused HDR code
We don't allow HDR for x264, so remove dead code.
2022-08-17 23:20:29 -07:00
Ed Maste
8b370c4218 linux-v4l2: Correct udev fd poll event test
Parentheses are needed due to operator precedence (although the previous
code happened to work because POLLIN has the value 1).

Fixes:		91f986ec99 ("linux-v4l2: Check udev fd events")
2022-08-17 12:32:47 -03:00
derrod
1fdaf121e6 obs-qsv11: Do not apply limits if CPU generation is unknown
Users with AMD CPUs and Intel dGPUs (Arc) would find that QSV is
restricted to 1200p and missing features due to to this check failing.

Once the encoder gets rewritten for AV1 support we will fix this
properly.
2022-08-17 05:42:08 -07:00