Commit Graph

5353 Commits

Author SHA1 Message Date
Martin Pulec
e338ca2f55 video_pattern_generator: split config to pattern+opts first 2023-04-21 14:20:35 +02:00
Martin Pulec
aa339b7c4b Reed-Solomon video: support multiple tiles 2023-04-21 11:56:25 +02:00
Martin Pulec
26c91d9da0 hd-rum-transcode: fixed parsing of -4/-6 2023-04-21 10:04:47 +02:00
Martin Pulec
409a8049cb hd-rum-translator: do not crash on incorrect use
do not crash on `hd-rum-transcode 8M 5004 -P 8000` (hostname missing
after port specification)
2023-04-20 17:30:08 +02:00
Martin Pulec
6855aaadee get_sockaddr_str: fixed snprintf max len
fixes CID 406448
2023-04-20 13:19:58 +02:00
Martin Pulec
69ef5c14a9 DeckLink: improved unknown option warnings
- use LOG_LEVEL_ERROR also for capture
- since passing unknown options result in exit, do not print that it is
  a warning
2023-04-20 13:19:57 +02:00
Martin Pulec
e47568128c DeckLink: created bmd_option type
Created bmd_option type that is basically a variant (tagged union) to
encapsulate possible configuration values and also special values for
default and keep. Having this previously in int is cumbersome because
the special values as were defined (0, -1) collide with the default
semantics of bool.
2023-04-20 13:19:57 +02:00
Martin Pulec
cf825ecea2 DeckLink cap/disp: added full-duplex parameter
It actually sets `profile=1dfd`. This is a complement to already
existing `half-duplex` option (that has on the other hand more more
complex semantic - it chooses the profile tailored for the device, since
the right one differs for eg. 8K Pro /4dhd/ and Duo/Quad 2 /2dhd/).
2023-04-20 13:19:51 +02:00
Martin Piatka
bc30735929 capture/decklink: Use UYVY on autodected modes too 2023-04-17 11:49:06 +02:00
Martin Piatka
64291c775e capture/decklink: Move autodetect modes to the beginning 2023-04-17 11:49:06 +02:00
Martin Piatka
a5a463c418 disp/unix_sock: Allow frames with multiple tiles
But show only the first tile. Useful for preview of 3D video.
2023-04-17 11:49:05 +02:00
Martin Piatka
5109c4e414 display/decklink: Add 3D and profile options to capabs 2023-04-17 11:49:05 +02:00
Martin Piatka
b9a1401c5f capture/decklink: Add 3D and profile options to capabs 2023-04-17 11:49:05 +02:00
Martin Pulec
4bd4ed21d0 bmd_common: BMC_CONFIG_SET - set bools unconditionally 2023-04-17 10:33:15 +02:00
Martin Pulec
3c69346636 DeckLink cap.: set bmdDeckLinkConfigSDIInput3DPayloadOverride for 3D 2023-04-17 10:06:56 +02:00
Martin Pulec
95a3f43187 GPUJPEG: fixed parsing of q=/restart= parameters 2023-04-17 09:39:00 +02:00
Martin Pulec
110fe95831 GPUJPEG: print which parameter is unrecognized 2023-04-17 09:37:36 +02:00
Martin Pulec
e1f2f6154c DeckLink cap.: updated call examples
- removed the deprecated syntax (positional args, modes given as
  indices)
2023-04-14 16:19:10 +02:00
Martin Pulec
53a2a97522 BMD_CONFIG_SET: print non-FCC vals in hex
Although most of remaining (non-FourCC) constants is small (counting
from zero), there are some, like bmdDynamicRangeHDRStaticHLG, which is
defined as 1<<30. Reading small hex values is ok but big decimal not.
2023-04-14 16:01:32 +02:00
Martin Pulec
0ac406b7eb BMD_CONFIG_SET: print values more humand-friendly
Part of the BMD constants are FourCCs, which are however impossible to read
if presented in decimal (hexadecimal would help a bit but not much).

As a solution detect if the value is a FourCC and if so, print ASCII
representation of it.
2023-04-14 15:59:17 +02:00
Martin Pulec
d2aaef7942 DeckLink cap: pretty print mode
align:
- mode indices
- FPS
- flags (color-space first, because it is always present; 3D after)
2023-04-14 15:30:22 +02:00
Martin Pulec
f5de0458e3 fixed commit 091fbaa8
Also the commit message was incorrect - if single device is specified,
request either separate 3D tiles or the merged buffer (this is the new
DISPLAY_PROPERTY_VIDEO_SEPARATE_3D mode).
2023-04-14 15:09:03 +02:00
Martin Pulec
a1e7c417ec DeckLink profiles: be more verbose about profiles
When profiles switching is required, it may be the important part so it
may be useful to print info which profile is active or being activated
even if there is no fail.
2023-04-14 15:07:06 +02:00
Martin Pulec
d17a865908 DeckLink cap.: unindent profiles in help 2023-04-14 14:54:15 +02:00
Martin Pulec
598ae7c4bf DeckLink: no warn if setting 3D profile not avail
BMD Extreme 4K doesn't support profiles so do not warn (only in verbose)
if setting failed, provided that the profile was not selected
explicitly and query was E_NOINTERFACE.
2023-04-14 12:50:41 +02:00
Martin Pulec
5e73e25c95 DeckLink disp.: print presence of stereo in info msg 2023-04-14 12:50:41 +02:00
Martin Pulec
091fbaa8ee DeckLink disp.: request always separate tiles
report always framebufer as separate tiles
2023-04-14 12:50:41 +02:00
Martin Pulec
d29cd4e4d5 video display: added new FB mode
merge pred prechozi komit a uprav

Added a mode SEPARATE_3D that is somehow inbetween MERGED and
SEPARATE_TILES - if receiving only 2 streams, 2 separated 3D streams are
expected, otherwise merged framebuffer is used.
2023-04-14 12:50:40 +02:00
Martin Pulec
281a095811 DeckLink cap.: do not shortcut "stereoscopic 3D"
Shortcutting stereoscpic 3D to "stereo" may be misleading because the
word is more often used together rather with audio.
2023-04-14 12:50:40 +02:00
Martin Pulec
5db446f39e DeckLink cap.: automatically switch to 3D if needed 2023-04-14 12:50:40 +02:00
Martin Pulec
6359f00e94 DeckLink cap.: replace ugly in-line macro defs 2023-04-14 12:50:40 +02:00
Martin Pulec
a8045839dc DeckLink: set device to 1-dev-full-dup for 3D
Set 1-subdevice-full-duplex for 3D mode as it seems to be the only
supported (1 device half-duplex would work as well but it doesn't seem
to support 2 streams while full-duplex supports at least 2 streams in
the opposite direction, at least for 8K Pro).
2023-04-13 14:04:32 +02:00
Martin Pulec
297593889e DeckLink: improved profile help
print also descriptions and affected devices
2023-04-13 14:04:31 +02:00
Martin Pulec
3b40f43a06 gpustitch: use the selected_gpu
silences the warning of unused variable selected_gpu
2023-04-13 14:04:31 +02:00
Martin Pulec
580ac72ec2 replaced all remaining sprintf witn snprintf
using bound checking variants

Remained last one instance in utils/text.c, that does the checking by
itself and vsnprintf compat using vsprintf, that is not used, anyways.
2023-04-13 14:04:29 +02:00
Martin Pulec
3f31c99bdd DeckLink disp.: turn late frame notice to warn
report late frame as a warning instead of verbose mode

see GH-306
2023-04-13 10:27:18 +02:00
Martin Pulec
b30f951915 hd_rum_translator should exit callback fix
Refering to a volatile object with non-volatile glvalue (here lvalue) is
undefined behavior.

+ renamed the function
2023-04-13 09:00:52 +02:00
Martin Pulec
bedba7a137 hd-rum-translator: use common should_exit handling
Use shared handling of should_exit events how uv does it. Without that,
video_rxtx registering the should_exit callback for video_rxtx freezes
because noone is taking over.

Command to reproduce fixed behavior

    $ hd-rum-transcode 8M 5004
    [messaging] Warning: infinite wait for module without msg notifier. Please report!

Simplified relevant stacktrace:
- send_message_sync <-- freezes
- register_should_exit_callback
- video_rxtx::start
- video_rxtx::create
- hd_rum_decompress_init

see GH-307
2023-04-12 17:00:57 +02:00
Martin Pulec
1ed549df4a separated some common root mod handling to host.cpp
The management of should_exit events should be also be shared with the
transcoding reflector that uses some parts that may depend upon this
functionality.

This is not purely a refactorization but slightly changes behavior,
namely the shared state cleanup is done in a destructor, not by
`uv.stop()` as it used to be.

see GH-307
2023-04-12 16:35:55 +02:00
Martin Pulec
eb63ea9d37 log_vprintf: append TERM_RESET only if needed
It hasn't hurt but it is an extra work and there is no need to issue
clearing esc if no formatting was changed.
2023-04-12 12:52:41 +02:00
Martin Pulec
653cec55ab log_vprintf: return void instead of int
The returned value was actually incorrect (counting also formatting
escape sequences and terminating nul byte).

Since the return value should not be important for the caller, it is
perhaps better not to complicate and don't return anything.
2023-04-12 12:52:08 +02:00
Martin Pulec
c3b19d25da removed needless check/store of vsnprintf ret 2023-04-12 12:52:08 +02:00
Martin Pulec
602095e38a fixed some further snprintf warns
fixes warnings with Xcode 14.3 as in previous commit

+ allocate +1 in Log_output buffer - snprintf(MULL, 0...) returns number
  of bytes without terminating '\0'. std::string storage isn't guaranteed
  to be NULL-terminated (std::string("").at(0) throws an exception). The
  buffer is somewhere preallocated 256 which prevents problem but it's
  better not to rely upon it.
+ comment out some unused function in LDGM that also triggered the
  warning but looked a bit suspicious so it was not clear how to fix
2023-04-12 12:52:07 +02:00
Martin Pulec
e1dc81b55a DeckLink disp.: use snprintf instead of sprintf
fixes warnings with Xcode 14.3 (using clang 14.0.3)
2023-04-12 09:59:47 +02:00
Martin Pulec
3735506d65 DeckLink cap.: do not pick NTSC for autodetection
Since the commit 0d679a34 it triggers warning that NTSC has
lower-field-first order, but most likely it isn't the format on wire.
2023-04-11 16:56:13 +02:00
Martin Pulec
aac502ad2d DeckLink cap.: bit depth is not always notified
If color-space change is notified, the bit depth is not always the part
of the flags, so use a different value, to which 8-bit is implicitly
added in that case to suppress confusing: "Detected 12-bit signal, use
":codec=UYVY" to enforce 8-bit capture (old behavior)." message in such
a case.
2023-04-11 16:56:13 +02:00
Martin Pulec
443fe59d24 DeckLink cap.: respond to notif events selectively
If display mode was changed, reconfigure display; if color-space,
reconfigure only color space.

This prevents unneeded reconfiguration when eg. color space is detected
first and then display mode + CS.
2023-04-11 16:56:11 +02:00
Martin Pulec
be1b9a1001 fixed macOS version check macros
This fixes the commit d6523202 that replaced incorrectly the Darwin
vesion numbers by the same but 10.<darwin>, which is not correct because
they don't match, eg. OS X Lion 10.7 has Darvin OS version 9. Also <=
was replaced by ifndef, which effectively needs version +1, so
original OS_VERSION_MAJOR<=11 (Lion 10.7) needed to be rewritten "ifndef
__MAC_10_8".

Note that since the affected macOS versions are very old, this was only
a minor issue (UG wouldn't be perhaps even possible to compile there).
2023-04-11 13:10:58 +02:00
Martin Pulec
17de20a40a Syphon: cleared a warning 2023-04-11 13:02:31 +02:00
Martin Pulec
169bfee7f5 Spout: fixed missing GL include
fixes failed run:

   https://github.com/MartinPulec/UltraGrid/actions/runs/4665946519/jobs/8259953664
2023-04-11 12:06:59 +02:00