Commit Graph

239 Commits

Author SHA1 Message Date
Martin Pulec
91374fffee DeckLink disp.: handle more opts generically
+ do not set the opts if keep option was selected
2023-05-05 08:50:14 +02:00
Martin Pulec
824efaf6ad DeckLink disp.: use bmd_options 2023-05-04 14:39:21 +02:00
Martin Pulec
399e2af275 DeckLink disp.: be less chatty
eliminate or decrease verbosity of some messages
2023-04-21 17:02:31 +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
5109c4e414 display/decklink: Add 3D and profile options to capabs 2023-04-17 11:49:05 +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
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
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
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
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
9eeff27085 DeckLink cap,disp: print display mode flags
print all known display mode flags, not only 3D support
2023-04-11 11:52:17 +02:00
Martin Pulec
0ca9366930 DeckLink disp.: print field mode 2023-04-11 11:52:16 +02:00
Martin Pulec
a3daa89ef6 displays: changed api for mainloop
- removed `needs_mainloop` attribute and deduce if mainloop is needed
  from the presence of _run callback (the information is now redundant
  only displays needing/running mainloop should announce _run callback)

- run the custom mainloop (currently only Syphon!) only when display
  doesn't run its mainloop. This allows running Syphon and GL/SDL
  display because it connects to the display mainloop.
2023-03-29 13:39:48 +02:00
Martin Pulec
3f630e5aca displays: fill video_display_info::run only if needed
Fill the `run` member only if really requesting to run display mainloop,
not to just letting UG run a worker thread.
2023-03-29 13:39:48 +02:00
Martin Pulec
d2c00ff3f8 split utils/text to string.c and text.c 2023-03-14 13:21:12 +01:00
Martin Pulec
c1d6bb84b0 DeckLink: continue if CoInit fails on diff. mode 2023-02-24 12:02:32 +01:00
Martin Pulec
c5395fe662 DeckLink drift fixer: set SoxR as default 2022-11-14 08:57:48 +01:00
Martin Pulec
d72f3fe8ff DeckLink: BMD_CONFIG_SET_ACTION->BMD_CONFIG_SET
+ prepend '\t' to decklink display device (prettier)
2022-11-11 12:13:11 +01:00
Martin Pulec
a0adcad4cb blackmagic_common: remove BMD_CONFIG_SET
BMD_CONFIG_SET is superseded by BMD_CONFIG_SET_ACTION (without hardcoded
"goto error;")
2022-11-08 16:49:37 +01:00
Martin Pulec
4834b1f76e DeckLink disp.: hide modes if not fullhelp
The listing can be very long (especially for 8K Pro), hiding the actual
option syntax.
2022-10-26 13:45:44 +02:00
Martin Pulec
4362836515 DeckLink disp. updates: mostly pretty-print 2022-10-26 11:45:55 +02:00
Martin Pulec
366c826ec6 DeckLink disp.: replaced rang 2022-10-26 11:27:57 +02:00
Martin Pulec
45b815952b DeckLink disp.: small updates
- try to minimize git diff with fc5f482 for DeckLink disp
- hide the resampler parameters to fullhelp
2022-10-26 09:20:50 +02:00
Martin Pulec
bbdc0efb0c moved DeckLink drift related code to sep. file. 2022-10-26 09:20:50 +02:00
Martin Pulec
befb613532 DeckLink disp.: AudioDriftFixer - del default dct.
Removed default destructor - the values were hardcoded anyways, so use
brace-or-equals initializers directly.
2022-10-26 09:20:50 +02:00
Martin Pulec
787731fd96 DeckLink disp.: simplified parsing
rather hard-fail than silently continue (user may not see the message)
2022-10-26 09:20:50 +02:00
Martin Pulec
a6235673d5 DeckLink disp.: don't measure dur. of (audio) putf
Frame scheduling is clearly non-blocking but even the sync calls are
non-blocking - for video, next video frame is replaced, for audio, the
samples are written to ring buffer (with possible overflow). So the
numbers are almost everytime near zero.
2022-10-26 09:20:50 +02:00
Martin Pulec
45c33130ba moved DecklinkAudioSummary calls to AudioDriftFixer 2022-10-26 09:20:49 +02:00
Martin Pulec
8039506d72 DeckLink disp.: simplify _init
this reverts the corresponding changes in db20fa3
2022-10-26 09:20:49 +02:00
Martin Pulec
44c77fa88e fixed log levels
reverted some increased verbosity from merge
2022-10-26 09:20:49 +02:00
Martin Pulec
f224e62872 DeckLink disp.: disable resampler by default 2022-10-25 15:50:11 +02:00
Martin Pulec
1122cfe410 removed unused code after merge 2022-10-25 15:50:08 +02:00
Martin Pulec
14bff97622 Merge branch 'aw-sohonet-wip-deck-drift' 2022-10-25 15:47:31 +02:00
Martin Pulec
05aea72a3c moved some functions from misc to text
moved text-related functions from utils/misc to utils/text
2022-10-13 09:16:16 +02:00
Martin Pulec
42b3fc1558 common handling of modules printing usage
Return a macro ((void *) 1) from modules returning pointer to signalize
that help was printed (for correct UG return value). This replaces the
old behavior when module class specific value (eg. &display_init_noerr)
was returned.
2022-10-12 12:05:19 +02:00
Martin Pulec
f7cc336cac decklink disp.: implemented timeout 2022-10-05 16:24:24 +02:00
Martin Pulec
00801fa3d4 video display: updated putf api - use timeout
Replace blocking/nonblock/discard flags with numerical timeout for
fine-grainer control of latency.

The original flags are kept as convenience macros so the API changes is
only small as long as non-block (default) or blocking is used.
2022-10-05 16:24:24 +02:00
Martin Pulec
02e52afa7b video display FPS ind.: provide name by module
Use name (MOD_NAME) provided by module rather than name given from
command-line. Those 2 may not match - in command-line it is
case-insensitive so ("gl" or even "gL" would be printed inestead of
expected "GL"). Also there may be input/output module of the same name
(eg. decklink) for which we may want to distinguish.
2022-09-27 15:52:28 +02:00
Martin Pulec
bd53ae9ac9 DeckLink disp.: timecode improvements
- use 16 bytes to be safe (compiler incorrectly warns)
- allocate temporary variable on heap
- improved asserts for assumed numeric ranges (counting with leap
  seconds)
2022-09-26 13:35:43 +02:00
Martin Pulec
19e8d968bf DeckLink cap./disp.: check profile for 3D
Verify if active profile is compatible with 3D mode - if not, suggest profile
change.
2022-09-22 08:19:07 +02:00
aw-sohonet
11efbce61e Updated dynamic resampler to use SOXR
* Added soxr 0.1.3 as an external dependency (for the resampling code)
* Removed resampler quality parameter
* The decklink drift fixing class has been changed to be disabled by default. The help for the decklink has also been updated to include details about the dynamic resampling process.
* Stopped the dynamic resampler spamming the verbose log too much
2022-09-12 10:02:29 +01:00
andrew.walker
2a7931a154 Fixed a boolean being the wrong way around 2022-09-12 10:02:29 +01:00
andrew.walker
872e2eccd9 Updated the jitter values to be far more forgiving 2022-09-12 10:02:29 +01:00
andrew.walker
f94c55437b Updated to fix some off by 1 errors which was causing major drifts in of itself. 2022-09-12 10:02:29 +01:00
andrew.walker
c2c405d899 Updated the decklink to always resample towards the target 2022-09-12 10:02:29 +01:00
andrew.walker
47190f9a0b Have the decklink report stats more often 2022-09-12 10:02:29 +01:00