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.
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
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
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.
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.
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.
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.
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.