249 Commits

Author SHA1 Message Date
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
jp9000
dffa822112 win-dshow: Fix dshowcapture not linking audio of certain devices 2021-01-04 07:02:53 -08:00
Gol-D-Ace
7368a2c7cc Update translations from Crowdin 2020-12-14 00:29:44 +01:00
Gol-D-Ace
7ab98ca00f Update translations from Crowdin 2020-11-25 20:11:39 +01:00
jp9000
18a73c9a45 win-dshow: Add support for YUY2 in virtualcam 2020-11-14 04:25:39 -08:00
jp9000
4b3639972b win-dshow: Fix virtualcam crash and reference bug
Fixes a null pointer dereference in the output filter, and fixes a bug
where the output filter would incorrectly hold a reference to the filter
graph.
2020-10-30 01:55:55 -07:00
jp9000
7a2d64d00a win-dshow: Fix decoupled audio with EVGA/magewell
EVGA/magewell devices seem to use the default system drivers rather than
custom drivers, which causes their audio to become decoupled and treated
as completely separate devices rather than as an audio pin on the video
device. Basically, this would cause those devices to not have audio by
default, and force the user to have to manually select the audio, which
is bad user experience.

We already had a workaround for this with elgato devices, so expand that
code to become a whitelist of devices, and include EVGA/magewell
devices.
2020-10-04 10:07:12 -07:00
Gol-D-Ace
c66ebde080 Update translations from Crowdin 2020-09-27 23:07:27 +02:00
Matt Gajownik
ccd1ef2bd0 win-dshow: Set current working directory in VirtualCam scripts 2020-09-15 19:58:02 +10:00
jp9000
e86b8241f3 win-dshow: Fix bug determining closest audio config
This fixes the remaining bugs that were still present when trying to fix
audio-related crashes with AJA devices.
2020-09-07 18:05:54 -07:00
jp9000
072a886453 win-dshow: Add "activate" proc to proc handler 2020-09-07 16:12:50 -07:00
jp9000
57c21e3cb9 win-dshow: Fix 24bit audio not being detected correctly 2020-09-07 15:26:01 -07:00
jp9000
1538b6909f win-dshow: Fix AJA devices crashing 2020-09-07 14:14:40 -07:00
Jim
86147d9719
Merge pull request #3415 from jpark37/default-color-space
Unify color space settings as 709
2020-09-07 13:29:44 -07:00
jpark37
b6afaceeae Update VIDEO_CS_DEFAULT to mean 709 instead of 601
Consistent with modified default UI setting.
2020-09-06 20:51:28 -07:00
Joel Bethke
a94ede6d00 win-dshow: Add VirtualCam installer scripts
This adds two batch scripts to install and uninstall the virtual cam
devices for installations where the installer could not be used.  Most
commonly, this is for portable installations or those who prefer the
.zip file.
2020-09-06 18:04:44 -07:00
jp9000
da8192544b win-dshow: Use cmake-based GUID for virtualcam 2020-09-06 17:04:06 -07:00
Richard Stanway
288a84dc95 win-dshow: Add file description for virtual camera DLL 2020-08-29 03:04:44 +02:00
Richard Stanway
21fb1e770e win-dshow: Use constant reference for virtualcam CLSID 2020-08-29 02:46:03 +02:00
Richard Stanway
4c08c7bfa4 win-dshow: Reduce size of virtualcam placeholder image 2020-08-29 02:42:03 +02:00