Commit graph

312 commits

Author SHA1 Message Date
gxalpha 79822a58c3 libobs,plugins: Remove new obs_output_*2 functions
Effectively reverting parts of d314d47, this commit removes the new
functions that got added to remove the flags parameter. Instead, it just
marks the parameter as unused and documents this. Having what is
effectively an API break just to remove a parameter is a bit overkill.
The other parts of d314d47 which cleaned up the usage of the flags
parameter are untouched here.
2023-06-10 16:13:05 -07:00
Exeldro d9bb556c97 win-dshow: Set audio only active when there is audio 2023-05-20 17:21:40 -07:00
tt2468 d314d4725d libobs, plugins: Deprecate obs_output_t functions with flag parameters
This deprecates the following functions, replacing them with new
versions:
- `obs_output_can_begin_data_capture()` - now `*capture2()`
- `obs_output_initialize_encoders()` - now `*encoders2()`
- `obs_output_begin_data_capture()` - now `*capture2()`

The flags parameter was initially designed to support audio-only or
video-only operation of an output which had the `OBS_OUTPUT_AV` flag,
however, full support for that was never implemented, and there are
likely fundamental issues with an implementation, mainly that most
outputs are programmed assuming that there will always be at least one
audio and one video track. This requires new flags specifying support
for optional audio/video, among other things.

An implementation to allow audio/video to be optional is best done
using the flag technique above, with audio/video enablement specified
by whether media (raw, `video_t/audio_t`) or encoder (`obs_encoder_t`)
objects are specified.

Since every implementation I could find always specifies `flags` as 0,
I was able to safely conclude that immediately removing the parameter's
functionality is safe to do.
2023-05-20 16:41:55 -07:00
Norihiro Kamae 1291461219 win-dshow: Remove obsolete translation
A commit f50aa5e01b added a translation ConfigureAudio but never used.
2023-05-20 16:35:05 -07:00
Lain 106c7aa61f Update copyrights/names 2023-05-20 01:31:18 -07:00
Translation Updater a0fbdc3c34 Update translations from Crowdin 2023-05-01 23:11:13 +00:00
Friedhelm Birth b3b5e7eae8 win-dshow: Change buffering for Elgato devices
The default is now buffering disabled except for very old devices
accessed through virtual capture filter "Elgato Game Capture HD".
2023-04-01 16:03:33 -07:00
Translation Updater 7c5560bf1b Update translations from Crowdin 2023-03-27 13:39:03 +00:00
PatTheMav 349372b3b3 cmake: Add changes for CMake build framework 3.0
New code path only taken if OBS_CMAKE_VERSION is set to 3.0.0 or
greater, old functionality remains unchanged.
2023-03-26 18:20:38 -04:00
derrod 3c92413674 win-dshow: Remove obsolete name in REGFILTERPINS 2023-03-01 20:39:53 +01:00
pkv 2e79d4c902 obs-ffmpeg: Fix for FFmpeg 6 deprecating a flag
Also modifies libobs & deps/media-playback.
AV_CODEC_CAP_TRUNCATED was removed in avcodec 60 [1].
We ifdef the code depending on it to allow compilation.

[1] avcodec: remove FF_API_FLAG_TRUNCATED
3ceffe7839

Signed-off-by: pkv <pkv@obsproject.com>
2023-03-01 13:23:51 -05:00
Exeldro 3840f92777 win-dshow: Fix virtualcam output a default video format 2023-02-11 16:21:49 -08:00
Richard Stanway 9b1f7d6d21 virtualcam-module: Update filter size immediately when used in OBS
Fixes a crash due to the previous output size being used when scaling
the frame.
2023-01-27 13:03:22 -08:00
Translation Updater 783bd52197 Update translations from Crowdin 2023-01-08 04:10:37 +00:00
jpark37 47f4c18a95 win-dshow: Ignore FFmpeg colorspace if overridden
Verified MJPEG devices are no longer locked to Rec. 601.
2022-12-01 14:14:25 -08:00
Matt Gajownik 27e3f9718f libdshowcapture: Support more capture cards with uncoupled audio
Also disable clang-format for the submodule.
2022-11-20 11:39:46 +11:00
Matt Gajownik 80d393bb75 win-dshow: Recognise higher FPS values from devices 2022-11-19 07:37:15 -08:00
Jim 6693f39288 Revert "virtualcam-module: Don't send frames on initial pause"
This reverts commit bcb73cb599.

Annoyingly, this breaks WebEx, likely due to their own bug. This only
breaks Discord under very specific circumstances due to their own bug,
so if I'm going to choose between Discord breaking under very specific
circumstances that rarely occur versus choosing WebEx not working at
all, I'm going to just let Discord be broken under specific/rare
circumstances.

I hate DirectShow.
2022-11-18 05:47:14 -08:00
Translation Updater f065f20ce1 Update translations from Crowdin 2022-10-25 22:32:14 +00:00
jp9000 feda64e9c6 virtualcam-module: Fix crash on resolution change
Certain programs can start the virtualcam filter, then they may choose
to call `Stop()` on the filter, call `SetFormat()` to change the
resolution, then call `Run()` again to start the filter again. The
Windows virtual camera filter did not account for this, thus if the
resolution was different, it had potential to cause a crash.

To fix this, store the last filter resolution, then check the resolution
every frame, and if it changes, reset the scaling information.

(Author note: This code is unclean. What we need to do with the virtual
camera filter is make it only create the thread on `Run()`, then join
the thread on `Stop()`. It's currently a bit complicated to make it do
that at the moment, so this code is a kind of an annoying stopgap for
now.)
2022-10-15 01:42:07 -07:00
jp9000 bc9ed5062d virtualcam-module: Clarify resolution variables
The `cx`/`cy`/`interval` variables specifically specify the
OBS/placeholder resolution/interval. The resolution may not be the same
as the filter's resolution (when scaling is used).

Instead, prefix these variables with `obs_` to improve clarity.
2022-10-15 01:29:05 -07:00
jp9000 bcb73cb599 virtualcam-module: Don't send frames on initial pause
Sending frames on initial pause seems to cause an odd crash on
subsequent frame calls.

(Note by author: I do not know why the crash happened because code
beyond OBS is a proprietary black box. I suspect it's just a bug in
WebRTC or something, but I can't know for sure. This is incredibly
frustrating. But at least this particular crash seems to be fixed.
...for now.)
2022-10-14 00:14:54 -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 09da3ac439 win-dshow: Fix avermedia HDR tonemapping 2022-08-31 12:05:07 -07:00
Translation Updater cc2d0791ca Update translations from Crowdin 2022-08-30 09:00:44 +00: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
Translation Updater 4aaa07f93d Update translations from Crowdin 2022-08-17 04:22:50 +00:00
Kristian Ollikainen 9216a62edc win-dshow: Move invalid GUID warning 2022-08-13 16:41:46 -07:00
Kristian Ollikainen 4eb5e65122 win-dshow: Fix building without Virtual Camera 2022-08-13 16:41:46 -07:00
Translation Updater 81734be37c Update translations from Crowdin 2022-07-31 23:40:53 +00:00
jpark37 2455753948 win-dshow: Compute HDR colorspace
Figure out colorspace from TRC and primaries if necessary.
2022-07-30 17:25:37 -07:00
jp9000 db789cfa44 virtualcam-module: Return S_FALSE if locks non-zero
The code mistakenly was returning S_OK if non-zero, which would have
been the opposite of what was intended.
2022-07-26 07:40:11 -07:00
jp9000 0f08432f53 virtualcam-module: Don't send frames if stopped
Fixes a bug where frames would continue to send even while stopped
2022-07-25 18:03:53 -07:00
jp9000 382e37440e virtualcam-module: Use OBS atomic funcs
These are a bit more portable if we ever, say, port to windows ARM
2022-07-25 18:03:53 -07:00
jp9000 5efb3ea42d virtualcam-module: Only allow DLL unload when filter freed
Fixes a bug where the DLL could unload while the filter is currently
being destroyed, which would cause a crash in the host process
2022-07-25 18:03:53 -07:00
tytan652 17ba8359e4 deps,libobs,plugins: Fix discarded-qualifiers warnings with FFmpeg 5 2022-07-22 08:50:36 -04:00
Norihiro Kamae 7e3656ab33 plugins: Cleanup unused-parameters
- Remove unnecessary UNUSED_PARAMETER
- Add OBS_UNUSED attribute to unused parameters
- Also removes unused variables
2022-07-19 11:01:00 -04:00
Exeldro e52018f210 win-dshow: Save and restore video device config props 2022-06-15 12:30:09 -07:00
jpark37 fa8f1c33e9 win-dshow: Removed used UNUSED_PARAMETER 2022-05-27 14:56:47 -07:00
Jim 952988d9ec
Merge pull request #6231 from mvji/prores_pix_fmt
Add support for GPU conversion of YUV422P10LE, YUV444P12LE, YUVA444P12LE
2022-05-04 02:01:27 -07:00
jpark37 7e8b1d90e9 win-dshow: Support HEVC decode 2022-04-28 08:59:53 -07:00
jpark37 cb42be3665 win-dshow: Respect TRC of encoded video
Fixes colors for devices that send HDR streams.
2022-04-23 07:03:35 -07:00
mvji 2b6230ef34 win-dshow: Add YVYU format 2022-04-19 19:39:44 +02:00
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