Commit graph

220 commits

Author SHA1 Message Date
Translation Updater 8999d9fef9 Update translations from Crowdin 2024-06-07 09:47:58 +00:00
PatTheMav 4ecfdb722f plugins: Add Linux-specific plugins for CMake build framework 3.0 2024-04-13 23:48:38 -04:00
tytan652 7d4501131a linux-v4l2: Fix deprecation with FFmpeg 7
FFmpeg 7 header states that avcodec_close should not be used since
avcodev_free_context already close the context.
2024-04-06 16:59:52 -07:00
tytan652 78cd07bd58 UI,plugin: Refactor virtual camera enablement 2024-03-30 16:43:30 -07:00
Translation Updater 10b02e11d0 Update translations from Crowdin 2024-03-12 18:11:06 +00:00
Vainock 7ae66c72fd Update translations from Crowdin 2024-02-28 14:20:05 -05:00
Translation Updater ac484a066f Update translations from Crowdin 2024-01-29 20:47:38 +00:00
Translation Updater f674d17168 Update translations from Crowdin 2023-12-05 22:04:31 +00:00
Sludge 1cd8b6aaba input-v4l2: always use linear alpha blending 2023-10-14 20:22:22 -03:00
Translation Updater 0d450a34a0 Update translations from Crowdin 2023-10-10 13:34:41 +00:00
Kurt Kartaltepe 728cd56583 linux-v4l2: Expand packed values to 4 bytes
These days you might capture card a 175Hz monitor with a framerate
defined as 10000000/57143 that doesnt fit in a short. And reporting a
negative FPS in that case isnt very helpful.
2023-10-08 02:00:28 +02:00
Translation Updater ecf914dd67 Update translations from Crowdin 2023-08-13 14:09:15 +00:00
Staacks 79d77ddf90 linux-v4l2: Add support for grayscale MJPEG 2023-07-15 16:09:32 -07:00
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
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
Translation Updater a0fbdc3c34 Update translations from Crowdin 2023-05-01 23:11:13 +00: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
cg2121 1ac609f1ff UI, libobs: Fix not handled in switch warnings
These warnings were being spit out by GCC on Linux.
2023-03-26 10:47:01 +11:00
9p4 23ce4fe2f1 linux-v4l2: Fix fallback framerate for camera 2023-03-19 09:39:36 +11:00
tytan652 2839837ed6 plugins: Fix -Wsign-compare on Linux 2023-01-19 13:08:46 -05:00
Translation Updater 783bd52197 Update translations from Crowdin 2023-01-08 04:10:37 +00:00
PatTheMav ecdbab6c7a
linux-v4l2: Replace invocations of sprintf with snprintf
Fixes deprecation warnings in Xcode 14/clang on macOS and reduces
chance of buffer overflows.
2022-11-11 19:51:27 +01:00
Translation Updater f065f20ce1 Update translations from Crowdin 2022-10-25 22:32:14 +00:00
Stefan Hoffmeister fca624ea4f linux-v4l2: Send STREAMON/STREAMOFF on vcam start/stop
This implements a suggestion made in
https://github.com/floe/backscrub/issues/133#issuecomment-1085598710 to
address what appears to be a problem in the v4l2loopback driver.
And better aligns OBS' usage to the v4l2 kernel interface.

fixes #4808
Co-authored-by: Norihiro Kamae <norihiro@nagater.net>
2022-10-20 18:35:35 -07:00
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
Translation Updater cc2d0791ca Update translations from Crowdin 2022-08-30 09:00:44 +00: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
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
Translation Updater 4aaa07f93d Update translations from Crowdin 2022-08-17 04:22:50 +00:00
Ed Maste 91f986ec99 linux-v4l2: Check udev fd events
udev_event_thread calls poll with two fds: the udev fd, and an eventfd
used for shutdown.  On FreeBSD we were hanging on shutdown in
udev_monitor_receive_device after receiving the eventfd event.

Now, if the udev fd reports no events skip the
udev_monitor_receive_device call.

At shutdown the loop will exit via os_event_try().
2022-08-16 20:46:06 -07:00
Kurt Kartaltepe f788e9f6b7 linux-v4l2: Add eventfd to signal udev on shutdown
Currently we use signals based on os_event's but the udev code blocks in
a 1s select (now poll) that cannot be signalled without an FD. This adds
an extra eventfd which will be signalled along with the os_event to
trigger the poll.

Also switches from select to poll to avoid issues with large fd values.
2022-08-15 16:58:09 -03:00
Translation Updater 81734be37c Update translations from Crowdin 2022-07-31 23:40:53 +00:00
Kurt Kartaltepe 57c9844f15 v4l2,scripting: Add more thread names
This sets some thread names for the scripting backend's defer thread and
the v4l2 udev thread.
2022-07-24 09:21:58 +10:00
tytan652 17ba8359e4 deps,libobs,plugins: Fix discarded-qualifiers warnings with FFmpeg 5 2022-07-22 08:50:36 -04:00
Grzegorz Godlewski c5015d0e6c linux-v4l2: Add support for H.264 2022-06-17 18:49:12 +10:00
Grzegorz Godlewski b98ce32670 linux-v4l2: Fix camera reconnecting issue
Unable to add device after OBS start. Function device_added is never
called. HAVE_UDEV is not set correctly by cmake.
2022-05-16 13:29:52 -04:00
tytan652 096ec55c83 linux-v4l2: Fix format-truncation warning 2022-05-04 01:37:10 -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
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
PatTheMav 49e9d49943
plugins: Update CMakeLists.txt for included plugins 2022-03-16 23:11:08 +01:00
obiwac 93c2e681ca linux-v4l2: scandir with alphasort on non-Linux
Sort video device entries with `alphasort` on non-Linux platforms,
as opposed to `versionsort` on Linux.
(`versionsort` is a GNU extension, unavailable on e.g. FreeBSD.)

UI: Fix call to `to_string` on FreeBSD
2022-02-26 15:36:08 -08:00
Kurt Kartaltepe c639255142 linux-v4l2: Fix warnings in mjpeg
Previously the switch did not catch all cases issuing a quite large
warning. Also there was a const-ness warning for codecs on ffmpeg 5.0
that this addresses.
2022-02-25 12:22:22 -03:00
Kurt Kartaltepe 23feac1323 linux-v4l2: Use decoded MJPEG pixel format
Previously we assumed mjpeg was always decoded to 422 but it seems some
cameras provide frames that decode to different pixel formats such as
420.

This change delays setting the obs frame pixel format until after we
have decoded the v4l2 frame.

fixes #5821
2022-02-19 23:53:41 -03:00
Translation Updater ac8dbf67be Update translations from Crowdin 2022-02-06 02:24:08 +00:00
Ryan Foster a7d3df3763 linux-v4l2: Fix timeout logging
The timeout_usec variable is uint64_t, but the log format was set to %ld
(signed long int), so it would sometimes log a nonsensical value. Let's
use $PRIu64 instead, which should be equivalent to %llu (unsigned long
long int).

Fixes #5797.
2022-01-14 20:43:25 -08:00
Translation Updater 261345f9ef Update translations from Crowdin 2021-12-12 02:38:59 +00:00
Florian Zwoch 88aec3b43c linux-v4l2: Change search strategy for v4l2loopback devices
Instead of trying to open devices /dev/video<0-63> check /dev for
all /dev/videoX devices that are existent in the tree. This allows
finding devices with higher names than 63. E.g. /dev/video100 can
now be found and opened which previously failed.

_GNU_SOURCE #define is introduced for versionsort() which is a GNU
extension.

Fixes #4347.
2021-11-10 19:32:30 -03:00
Morten Bøgeskov 1c2aea4f89 linux-v4l2: Support for Motion-JPEG codec 2021-11-02 06:04:54 -07:00