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
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
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
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
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
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
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)
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.
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).
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"
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.
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).
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.
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.
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.