Sort sampling rates for poraudio playback that are tested if the device
doesn't support natively the received sample rate.
Use lowest higher or equal sampling rate if possible, if not, use the
highest usable sampling rate.
Also remove note in qsort_s.h (no longer valid - can be included where
approopriate, not only before first inclusion of stdlib.h).
This complements the previous commit - add the device default rate to
list of rates, that are tested if work (obviously this one should work
by definition so that now testing the remaining sample rates shouldn't
take place).
The mutibyte to wide character conversion was (perhaps since the
beginning) wrong - mbtowc converts just one character - it should have
beem mbstowcs but using rather mbsrttowcs (thread-safe).
There are some calls using just the codec_ctx
parameter, which fail (with the compat with
legacy FFmpeg).
eg. `uv -A Opus -s testcard` (using the old FFmpeg)
write the IPv6 link-local address with scope ID
This is achieved by using getnameinfo instead of inet_ntop.
Also rewritten in respect to the above change - simplified, no need to
get the port number separately (getnameinfo does that as well).
The participant sockaddr_storage doesn't need to be stored - actually the
participands are stored inside a map, whose key is the sockaddr_storage.
this modifies the commit 225fbc8ea (2024-11-13, and later fixes)
This is an exception to the normal behavior used by the passive audio
mixer participant, that sends empty packets to request receiving the data.
It doesn't affect the normal UG behavior, because the situation when
nonzero_channels=0 doesn't occur otherwise. Either we receive at least
some packet from a frame and if not, the decoding doesn't take place.
The rationale is to separate the config.h-dependent stuff to a separate
file to eliminate the need to transitively include config.h.
+ fix the files that need config.h directly to include it
- do not inform about new API - it has been there a long time and obviously
the "new" API works fine
- do not warn that cannot get the latency - the procfs file is no longer
available so it is issued all the time. It works with the default value
24 ms just fine.
- regading the above, do not obtain the value at all - since it now works
fine, we do not need to depend on an external value that may potentially
break the stuff (it would be required to re-test if needed)
- do not print it in constructor/dtor - the participant may be moved
- copy the stored address in copy constructor
- use get_sockaddr_str + change its prototype - do not use thread_local
vars but user provided buffer
- also take (const sockaddr *) in the get_sockaddr_str and
get_sockaddr_addr_* functions (participants iterated by const iterator
returning const participant reference)
Some AVCodec properties like pix_fmts or sample_fmts are marked as
deprecated and should be replaced by avcodec_get_supported_config()
in current FFmpeg.
Created compat functions to get rid of deprecate warnings running with
both old and new FFmpeg.
For unsompreesed audio, where it has only the advantage, set default
R-S values to k=160 n=240 (50 % redundancy).
For uncompressed audio, the number of packets per frmae start at 3
(for 16-bit 30p), for which the value is appropriate. Not for the
audio captured at 60 Hz, however. Here it, is 1600 B with 16-bit samples,
with the R-S FEC this yields 2 packets only.
Replace time conversion macros defined 2 commits ago between msec
and usec.
This is proposed (considered) solution to the todo in tv.h - inconsistent
unit conversion macros. Rather than value, it might be better to use
function-like macros.
The issues is that there will be actaully double the amount - A_TO_B and
B_TO_A. To keep it in a reasonable range, it would be best to remove
the _DBL versions and keep the user typing the arg to double inestead