Commit Graph

8133 Commits

Author SHA1 Message Date
Martin Pulec
75fef4bb89 acap testcard: refactored
moved parsing and signal generation to separate function

+ minor improvments:
1. checked return values from user-suplied numeric args
2. print correctly name of noise to status message
2023-07-27 10:47:05 +02:00
Martin Pulec
a4179f8a1d audio testcard: added noise pattern
it is useful to test audio compressions
2023-07-27 10:07:11 +02:00
Martin Pulec
5f1ae260f7 DeckLink sync: use std::queue only temporarily
Schedule frames ASAP not to have two actual queues (one inside UG modlue,
second DeckLink's).
2023-07-26 17:26:26 +02:00
Martin Pulec
bb53aae336 silence audio filter: fixed build
strdupa compat not included but not needed, VLA can be used
2023-07-26 17:26:07 +02:00
Martin Pulec
2f1bfa9340 do not use source TS as RTP TS by default
Do not use source TS as (a base for) RTP TS by default anymore. Since this
was essential for synchronized DeckLink playback, require `--incompatible`
to enable this.

The reason to disable for now is because it breaks compressed
audio. Eg. for Opus, one receives 2 packets for 40 ms input. Currently
only the first gets source TS, second is undefined, thus getting the
default, loosely related TS, that may however create TS discontinuity
(especially with the time, when PC and DeckLink time diverges).

There is no good solution for the above yet, sending both packet with
the same TS and m-bit on second isn't sufficient now, because it gets
joined in receiver buffer and eg. Opus is not self delimiting so it will
need changes on receiver side to pass RTP packets to Opus decoder as
Opus packets.

refer to GH-326
2023-07-26 16:59:50 +02:00
Martin Pulec
b634053b99 added silence audio filter 2023-07-26 12:33:09 +02:00
Martin Pulec
b329b18940 vidcap testcard: allow setting key shortcuts 2023-07-26 11:46:13 +02:00
Martin Pulec
b5cd530824 AppRun: do not disable dbus-user
Dbus is required for dbus audio and currently it even fails in Arch
without, see:

https://github.com/CESNET/UltraGrid/actions/runs/5642223630/job/15281663172
2023-07-26 09:50:44 +02:00
Martin Pulec
0658f483d0 supressed capture_filter wrapper Coverity issues
All are false positive provided that the wrapped capture filter correctly
sets its `dispose` callback.
2023-07-26 09:50:44 +02:00
Martin Pulec
06abab76fa decklink_drift_fix.hpp: no repeated resample req.
Do not send repeated resample requests - it has been send with every
frame, which is perhaps unneeded load.

Also as a side-effect, it is possible to run UltraGrid in verbose mode
without being flooded by the resampling-related log messages. (Sending
resample message was degraded to debug because the audio decoder writes
it as well).

+ some missing headers
2023-07-26 09:50:44 +02:00
Martin Pulec
acf33d30c1 DeckLink disp.: print audio buffer utilization in debug 2023-07-26 09:50:44 +02:00
Martin Pulec
182eea9e82 updated REPORTING-BUGS.md
i.a. added sample video files that can be used for report
2023-07-26 09:50:41 +02:00
Martin Piatka
956e5917d9 ipc_frame_unix: Use unique_ptr instead of raw 2023-07-25 16:47:23 +02:00
Martin Pulec
43972b36ea fixed CIDs 4167{1,2,3,4,5,7,8} 2023-07-25 09:32:15 +02:00
Martin Pulec
10c280959b Revert "CI Linux FFmpeg: remove NVENC IDR patch"
This reverts commit e457ab87f7 but the
patch is updated to match current FFmpeg.

The FFmpeg commit that seemed to do the same (7eeef72c6) is not working
correctly because it assigns idrPeriod cc->gopLength, which was set to
NVENC_INFINITE_GOPLENGTH above in case of intra-refresh.

refer to GH-330
2023-07-24 16:23:44 +02:00
Martin Pulec
41da22a399 fixed video_desc_to_string returning same desc
The function returned description was not updated by subsequent call,
because the returned thread_local variable is initialized statically.
2023-07-24 15:59:50 +02:00
Martin Pulec
c2c7a2ddb8 lavc video: NVENC: update ver comparison
Current libavcodec version is still 60.22.100 so intra-refresh has been
disabled since e457ab8 because the version is still not strictly greater
(is equal). Using non-strict equality breaks the compilation with version
60.22.100 prior to FFmpeg commit e457ab8 (perhaps not a big deal).

refer to GH-330
2023-07-24 15:17:09 +02:00
Martin Pulec
bb596e0fc1 CI Linux: fixed failing tests
Fixes some weird error with Pipewire over ALSA on Arch:

https://github.com/CESNET/UltraGrid/actions/runs/5642223630/job/15281663172
2023-07-24 14:48:13 +02:00
Martin Pulec
47be77ed94 create-appimage.sh: do not require fc-match
If not running in GitHub CI, do not fail on fc-match absence, only print
the error.
2023-07-24 14:48:12 +02:00
Martin Pulec
6f6ef9d691 CI Linux/install_others.sh: not use lsb_release
lsb_release command is not always present, even in Ubuntu, wheresas
/etc/lsb-release file is but it isn't necessarily in all distros,
eg. Arch doesn't have it by default.

+ install libdbus-1-dev dependency - not needed for the CI because there
  it is at this point already installed but the script can be used also
  to setup the environment outside GitHub CI
2023-07-24 14:48:12 +02:00
Martin Pulec
e10cf0948c configure: help for screen cap Linux
suggest accepted values for screen capture module
2023-07-24 14:48:10 +02:00
Martin Piatka
38a7126a63 video_decoders: Fix FEC
Fixes #331
2023-07-24 12:26:31 +02:00
Martin Pulec
03f0a5f939 testcard2 Ubuntu DejaVu path fix
DejaVuSansMono.ttf is in /usr/share/fonts/truetype/dejavu in Ubuntu
at least since version 14.04.
2023-07-24 09:47:57 +02:00
Martin Pulec
0ce939e5e9 testcard2: use parse_fps to allow interlacing
this allows syntax like "59.74i"
2023-07-24 09:27:08 +02:00
Martin Pulec
1579f5fa19 testcard2: fmt parse in a separate func 2023-07-24 09:27:08 +02:00
Martin Pulec
7e00fdb14f testcard2: (hot) fix thread wild exit if TTF fails 2023-07-24 09:27:02 +02:00
Martin Pulec
b77a4ac669 DeckLink cap.: fail if audio init fails
Continuing and only issuing a warning (while not capturing audio at all)
is perhaps not desired and should end with an error.
2023-07-21 16:48:12 +02:00
Martin Pulec
e6fcbec6b4 DeckLink: prepare support for 32 and 64 audio ch.
BMD API starting with 12.0 support 64 channels so enable it when using
eligible SDK.

UG ships currently 11.6 so it won't be enabled by default but user can
ship own version.

+ replaced unneeded checks in display_decklink_reconfigure_audio
  with assert (not needed, this should not happen because the format is
  negotiated with `get_property(AUDIO_FORMAT)`` first)
2023-07-21 16:48:08 +02:00
Martin Pulec
f4086999fe DeckLink sync.: allow "sync" shortcut 2023-07-21 12:31:35 +02:00
Martin Pulec
a1eea8e221 DeckLink sync: aud. discontinuity check removed
As for now, it breaks things when using OPUS, eg on DeckLink 4K Extrme:
```
uv -t testcard:mode=Hi59 -s embedded -A OPUS -d decklink:sync -r embedded
```

Poorly synchronized input, especially when there is a timing jitter,
like sdl_mixer will stop to be played properly, but this isn't actually
purpose of this mode so it isn't perhaps a good idea to complicate the
things by adding some error-prone stuff.
2023-07-21 12:31:35 +02:00
Martin Pulec
542d5c2d55 DeckLink disp synchronized: do not play audio during reconf
Not a big deal but it produces following error on reconfiguration:
```
sender $ uv -t testcard -s embedded -c libavcodec receiver # restart 2x
receiver $ uv -d decklink:synchronized -r embedded 2>&1 | grep error:wq
ScheduleAudioSamples: General access denied error (0x80000009)
``
2023-07-21 12:31:34 +02:00
Martin Pulec
a41bb5ffa9 DeckLink disp: fixed scheduled reconfigure
Callback is removed in reconfigure if already initialized but was set
only in _init.
2023-07-20 15:34:50 +02:00
Martin Pulec
c1891a2b82 video decoder: reconfigure only once after probe
When probing for the internal format, multiple reconfigure messages may
be emitted (because multiple frames might have been processed, as needed
for inter-frame compressions). Thus we need to check and store our
internal format instead of forcing reconfigure (that has been needed,
since the video_desc of the stream hasn't changed).
2023-07-20 15:10:35 +02:00
Martin Pulec
13c8cc76f6 video decoder: removed reconfiguration in future
This is most likely defunct, anyways, and removing it improves
maintainablilty a little.
2023-07-20 15:02:05 +02:00
Martin Pulec
8973fb4daf video_decoder: fixed display reconf on probe
Display should not be reconfigured when not needed, otherwise it will be
reconfigured twice even when received single compressed stream (because
reconf is run twice here - once as probe and second real).

Therefore the display description is stored in decoder->display_desc and
compared with the actual desc. But it doesn't work with compresed stream,
because display_desc.color_spec is set to the network desc and rewritten
to the correct uncompressed color-spec just after the if. So eg.:

- stored desc is "1920x1080 @50.00i, codec UYVY"; **but** compared to:
- actual "1920x1080 @50.00i, codec MJPEG"
2023-07-20 11:54:30 +02:00
Martin Pulec
c6fea2249e MacOS updater: release is updated to next release
Until now, the update was done unconditionally to continuous regardless
if the updated version was release or continuous.
2023-07-20 10:39:03 +02:00
Martin Pulec
bc5e580b43 override_prop: added also (wrapped) postprocessor
from capture filter of the same name
2023-07-20 09:36:50 +02:00
Martin Pulec
306b26aede DeckLink disp.: report ext stats every 5 sec, not 6
Doesn't matter much, moreover it is only in verbose mode, just to be
consistent.
2023-07-20 09:27:17 +02:00
Martin Pulec
d8ccc3b729 video rxtx: removed remains of multi-link sending
This is not used and removing it simplifies the code.
2023-07-19 16:31:00 +02:00
Martin Pulec
a2d8913569 DeckLink disp.: when resync the stream, reset all audio vals
Keep own copy of original and working (with wraparounds) audio TS in
order not to fight with the video over the shared variable - reconfigure
only if there is a change.
2023-07-19 12:15:15 +02:00
Martin Pulec
18775820e7 DeckLink disp.: frames should be released 2023-07-19 11:26:13 +02:00
Martin Pulec
6780691b4e modernize playback APIs
modernized video display, audio playback and vo postprocess APIs

THe APIs were already recently updated so modernize it by using bool
where the return value is semantically boolean value. Using TRUE/FALSE is
inherently ambiguous because it is not obvious from the prototype if
success is 0 or TRUE (1).
2023-07-18 16:43:37 +02:00
Martin Pulec
baa0c661c1 DeckLink disp.: fixed stream discontinuity detection 2023-07-18 16:43:30 +02:00
Martin Pulec
2748e3687d IDeckLinkVideoOutputCallback haven't virt dtor
IDeckLinkVideoOutputCallback doesn't have a virtual desctructor in
Windows, thus its subclass destructor cannot be marked override.
2023-07-18 14:20:00 +02:00
Martin Pulec
d2b39acab0 video display: returns bool from putf API
Use bool return value from putf - returning int here may be error-prone
because the semantics is unclear (is success 0 or TRUE).
2023-07-18 13:46:54 +02:00
Martin Pulec
a97352afc8 Merge branch 'decklink-sync-output' into master 2023-07-18 13:46:41 +02:00
Martin Pulec
e38117214f DeckLink disp.: added synchronized opt (replace)
Replace [no-]low-latency option with synchronized opt - the behavior
of the no-low-latency mode has changed, anyways, so as a benefit it is
more obvious.
2023-07-18 13:30:13 +02:00
Martin Pulec
037e0bc670 DeckLink disp.: do not dyn alloc PlaybackDelegate
make it aggregate directly inside state_decklink

+ moved all scheduled things to the PlaybackDelegate state
2023-07-18 11:20:44 +02:00
Martin Pulec
1e3af5ed78 DeckLink disp. sched aud: no sync on large diff
When the timestamp difference is too large, do not sync at all and
schedule continuously. This has been already there but the difference
wasn't allowed to be more than 2000.
2023-07-18 11:12:11 +02:00
Martin Pulec
3ac4f7cee2 DeckLink disp.: reconfigure audio w. video (schd)
In scheduled mode, we need to restart stream after configuring audio. The
previous implemenation was rather error-prone because if the audio was
configured after video, it didn't work. Now it simplifies the workflow.

This also fixes a potential crash when DisableVideoOutput in reconfigure
was called after deleting the delegate structure.
2023-07-18 11:09:08 +02:00