268 Commits

Author SHA1 Message Date
jpark37
3eb85c548f win-dshow: Add reactivation callback 2022-04-17 03:18:38 -07:00
jpark37
73f61922e6 win-dshow: Reference new device-vendor.cpp file 2022-04-17 03:18:38 -07:00
jpark37
e526f4c1fb win-dshow/libshowcapture: Toggle tonemapper according to format 2022-04-17 02:54:32 -07:00
PatTheMav
6e65754862 virtualcam-module: Copy Windows virtual camera files to rundir
Fix an issue where the Windows virtual camera build files were not being
copied to the rundir.
2022-04-14 16:15:42 -04:00
jpark37
14b1d34a06 win-dshow: Use Rec. 2100 (PQ) by default for P010 2022-04-12 12:02:43 -07:00
jpark37
a63d353463 win-dshow: Add Rec. 2020 HLG support
Also rename "Partial" range to "Limited" range for consistency.
2022-04-10 12:55:02 -07:00
jpark37
59dbc3eb81 libobs: Rename Rec. 2020 to Rec. 2100
Rec. 2020 is really an SDR spec, but I think HDR10 made it okay to slap
PQ on it, call it an HDR spec. Rec. 2100 came along after and formally
allowed the use of PQ/HLG, so we should use 2100 instead.
2022-04-10 00:13:52 -07:00
jpark37
848e128435 libobs,plugins: Replace video matrix function
video_format_get_parameters_for_format provides a more accurate matrix
than video_format_get_parameters.
2022-04-07 19:28:51 -07:00
jpark37
a00d53eccf win-dshow: Add HDR support 2022-04-03 00:03:34 -07:00
PatTheMav
aae3a6a466 cmake: Fix diverging prefix padding for OBS status outputs
Status output related to OBS configuration is prefixed with the string
"OBS" and added padding for enabled and disabled features. This padding
was not aligned between platforms.

By moving the padding and prefix decoration into its own function,
both elements are controlled in a single place. CMake scripts were
changed to use this new function `obs_status` instead of using CMake's
`message` function directly.
2022-03-26 09:44:23 -04:00
Norihiro Kamae
ba68eda590 obs-ffmpeg: Use av_packet_alloc instead of av_init_packet
sizeof(AVPacket) being a part of the public ABI is deprecated. once
av_init_packet() is removed, new packets will only be able to be
allocated with av_packet_alloc().
In ffmpeg-mux, ffmpeg-vaapi, and obs-ffmpeg-nvenc, AVPacket is allocated
at the initialization to avoid frequent allocation of AVPacket.

Includes changes to win-dshow.
2022-03-24 17:19:40 -07:00
PatTheMav
49e9d49943
plugins: Update CMakeLists.txt for included plugins 2022-03-16 23:11:08 +01:00
jpark37
c7c52a59f9 win-dshow: Fix hwdevice_ctx leak 2022-03-05 15:02:23 -08:00
jp9000
490c6214f0 virtualcam-module: Revert changes since 27.1.3 (for now)
This reverts commit 4b0767741ab7f3c10d95c96c17a9ac0c0f726ca3,
3f3f9ed7e60a8dbe8c904b234a8b715841df880f,
0e7c17bd6e2f17a6002556ef8229f0b7e2124e91, and
865eecb7396841ccf4b4154b79253f5c8f1a1b76.
2022-03-02 17:35:36 -08:00
jp9000
4b0767741a virtualcam-module: Prevent placeholder memory leak 2022-03-02 05:06:12 -08:00
jp9000
2026270b65 virtualcam-module: Only initialize placeholder once 2022-03-02 05:06:12 -08:00
jp9000
3f3f9ed7e6 virtualcam-module: Fix incorrect correct res/fps
Apparently the testing that was done was not sufficient enough or did
not check all test cases, so resolution/fps does not get set properly on
the virtualcam.
2022-03-02 04:19:02 -08:00
jp9000
0e7c17bd6e virtualcam-module: Remove unnecessarily inlines 2022-02-27 22:26:10 -08:00
jp9000
865eecb739 virtualcam-module: Stop thread on Stop call
This causes the thread to only start when the IMediaFilter::Run/Pause
calls have been made, and stop whenever either the IMediaFilter::Stop
call has been made, or on destruction, whichever comes first.

This potentially will work around a suspected race condition that
appears to be in the WebRTC library where the filter's library will be
released while the filter is in the process of being destroyed, which
can take longer than usual if the join takes too long. Basically, fixes
a reported crash (that doesn't appear to technically be our fault) when
the filter is used with browsers when the virtualcam is deactivating in
web browsers.
2022-02-27 22:23:41 -08:00
jpark37
847eebc648 win-dshow: Fix wrong AVCodecContext free call 2022-02-27 04:38:30 -08:00
jpark37
2e1d9e8e64 win-dshow: Add hardware decode status to log 2022-02-27 02:40:09 -08:00
jpark37
42fad9b2b4 win-dshow: Add hardware decode toggle
Off by default because it can be buggy, or overburden the GPU.
2022-02-26 15:31:48 -08:00
jp9000
0dbae4ebef win-dshow: Ensure thread is joinable before joining
This may have been the issue behind the reported firefox crashes, but
strangely, the thread should always be joinable here because it's
explicitly always created in the constructor and joined in the
destructor.
2022-02-23 04:13:38 -08:00
Translation Updater
ac8dbf67be Update translations from Crowdin 2022-02-06 02:24:08 +00:00
Chris
306e23292d win-dshow: Log buffered state 2022-01-29 15:14:58 -08:00
jpark37
9f41531541 win-dshow: Use OBS_SOURCE_FRAME_LINEAR_ALPHA
This flag leads to a cheaper technique, "Draw" instead of
"DrawNonlinearAlpha", and all the paths are opaque anyway.
2022-01-29 15:10:53 -08:00
Matt Gajownik
3900ae0974 libdshowcapture: Add P010 support 2022-01-11 10:40:01 +11:00
hellowanda
a01a01f752 win-virtualcam: Make sure virtualcam output thread safe 2021-12-18 07:14:47 -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
Translation Updater
261345f9ef Update translations from Crowdin 2021-12-12 02:38:59 +00: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
Ryan Foster
6d1433f228 win-dshow: Use AVFrame.pts instead of AVFrame pkt_pts
AVFrame.pkt_pts was deprecated in FFmpeg commit 32c8359093d1 dated June
21, 2016 for lavc 57.24.0 (FFmpeg 3.2). AVFrame.pkt_pts was replaced by
AVFrame.pts, and it was removed in FFmpeg commit 6e30b35b85b8 [2] on
April 27, 2021. Ubuntu 18.04 has the oldest FFmpeg version we support,
FFmpeg 3.4. We should be able to safely migrate from AVFrame.pkt_pts to
AVFrame.pts.

[1]: 32c8359093
[2]: 6e30b35b85
2021-11-21 11:30:02 -05:00
Vainock
11a690b038 Update translations from Crowdin 2021-09-24 09:42:08 -07:00
Thomas Schnitzler
22f5e68121 win-dshow: Don't buffer Elgato Facecam device by default
Buffering should be disabled for Elgato Facecam in "Auto-detect" mode to
prevent latency changes over time
2021-09-20 18:42:36 -07:00
Richard Stanway
4bf81e9bf6 win-dshow: Avoid redundant string conversions
We were going from wstring -> wchar_t * -> wstring. Issue detected by
PVS Studio.
2021-08-18 23:45:11 +02:00
Richard Stanway
486380e2c3 win-dshow: Use constant references for resolution check
Avoids unnecessary creation of a new VideoDevice. Issue detected by
PVS Studio.
2021-08-18 23:45:08 +02:00
Translation
ef2b1eb1c6 Update translations from Crowdin 2021-06-11 07:18:15 -07:00
Gol-D-Ace
90df8d44df Update translations from Crowdin 2021-05-30 20:33:35 +02:00
Matt Gajownik
2a7fd297e4 win-dshow: Add support for ASUS coupled audio 2021-05-01 13:53:37 +10:00
Richard Stanway
47fcbdb0c9 win-dshow: Fix virtual camera CPU usage, add more comments
My previous commits would rescale the placeholder for output on every
frame which was not CPU efficient. Now we store a copy of the scaled
placeholder and update it any time the resolution / FPS / format
changes.

A new function GetOutputBufferSize was added to allow calculating the
output size when needed. The existing code assumed a 12-bit format if
the placeholder didn't load, which could cause grey / green output.

An optimization was made to only load and scale the placeholder once
the virtual output starts, as many applications load and unload the
filter multiple times during enumeration of devices.

Various comments were also added to help clarify how the filter works.
2021-04-15 03:11:33 +02:00
jp9000
a79b6d6f79 win-dshow: Fix libdshowcapture formatting 2021-04-06 12:00:12 -07:00
jp9000
b479d60917 win-dshow/libdshowcapture: Update to 0.8.7 2021-04-04 01:37:29 -07:00
Richard Stanway
c5f06a2837 win-dshow: Fix crashing when using a custom vcam placeholder
The scaler assumed the placeholder was the same size as the camera which
caused crashes if the user replaced the placeholder with a smaller
resolution image (or if the camera was potentially running at > 1080p).
This adds a separate scaler for the placeholder and uses the resolution
of the virtual camera instead of defaulting to 1080p.
2021-03-31 02:36:16 -07:00
Richard Stanway
6424901120 win-dshow: Check return value of ReadFile 2021-03-23 03:15:07 +01:00
Richard Stanway
45643adb03 win-dshow: Check return values for memory allocation functions
Since some of these run inside the virtual cam module, we should be a
good guest and not crash the host process if we run out of memory.
2021-03-23 03:07:22 +01:00
Richard Stanway
670156db8b win-dshow: Fix incorrect variable used in condition 2021-03-23 02:49:44 +01:00
Richard Stanway
5c8587eab3 win-dshow: Don't call DisableThreadLibraryCalls in virtualcam
Per MSDN: Do not call this function from a DLL that is linked to the static C
run-time library (CRT). The static CRT requires DLL_THREAD_ATTACH and
DLL_THREAD_DETATCH notifications to function properly.
2021-03-23 02:49:44 +01:00
wangshaohui
f316762a2a win-dshow: Fix memory leak caused by using incorrect API 2021-03-22 13:59:22 -07:00
Andrés Barreiro
c83273cc72 win-dshow: Add autorotation toggle 2021-02-07 21:12:48 -08:00