Prevent integer overflow on big (perhaps wrong) values, eg. 2E9 channels:
`uv -s testcard -a ch=2000000000`
+ check memory data allocations with assert where there is no overflow
but out-of-memory (eg. `ch=1024:s=16777216:bps=16` requires 32 GiB RAM)
Not needed to store separately "current" buffer packets since it is
already stored in cumulative, it is just needed to store the current
buffer number.
It needs to be enabled explicitly, anyways - at least Opus won't work
with former UG versions. For 40 ms frame, it produces 2 packets. When
merged into one packet, the decoder is unable to decompress.
Since pipewire will convert the audio format to anything we ask it to,
this shouldn't have any effect. Maybe will help when implementing the
exclusive device mode in the future.
Stream target should be set using PW_KEY_TARGET_OBJECT to target node
serial or node name.
However, old pipewire versions (e.g. 0.3.48) seem to ignore this
property. So instead we use the PW_KEY_NODE_TARGET (which gets
deprecated in 0.3.64) with the target node name. This older property
however doesn't support serial numbers.
Speex doesn't seem to offer any advantage over other codecs and is deprecated in
favor of Opus by Xiph.Org.
Added this feature in a generic fashion in order to allow eventual deprecation
of some other codecs that may not be useful but would complicate further
development.
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
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).
Send same RTP timestamps for audio/video frames captured at the same
time.
RTP specification allows this (although doesn't require - according to
the spec, the RTP timestamps should colaesce with RTCP NTP
correspondence). We slightly modify that in a way that we use for both
audio and video 90 kHz clock resolution, so if the start point is the
same (random), the RTP timestamps will be exactly the same for related
data.
Implemented for vidcap DeckLink and testcard.
Relicensed and corrected copying audio/codec.h as an original author
(previous copyright and autors were just copied&pasted template from an
another file).