Commit Graph

1028 Commits

Author SHA1 Message Date
Martin Pulec
4caf732be1 rtp.h: do not include config_*.h 2025-03-26 11:06:46 +01:00
Martin Pulec
31ea569352 aplay/coreaudio: remove unneeded config*.h 2025-03-25 12:36:36 +01:00
Martin Pulec
cfca08b895 audio/playback/*: IWYU 2025-03-25 11:24:10 +01:00
Martin Pulec
ca93e7db8f wav_{reader,writer}: IWYU 2025-03-25 10:56:11 +01:00
Martin Pulec
c2116835da compat/platform_{pipe,semaphore}: IWYU 2025-03-25 10:56:10 +01:00
Martin Pulec
bef67b7879 acap/testcard, vdisp/dump: IWYU 2025-03-24 17:29:01 +01:00
Martin Pulec
283439b9fe aplay/portaudio get_supported_format: sort srates
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).
2025-03-17 15:51:20 +01:00
Martin Pulec
33915a7eae aplay/portaudio: add dev default sample rate
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).
2025-03-17 15:51:20 +01:00
Martin Pulec
4b2c6266e5 acap/portaudio: set device default rate
instead of hard coding 48 kHz, which may also fail as for VB-Matrix set
to 44100 Hz using ASIO

refers to GH-430
2025-03-17 15:51:20 +01:00
Martin Pulec
fd0771c9c6 prettier audio printout
- just 2 decimal points for secs
- print aggergate sample count with thousands delimiter
2025-03-17 15:51:17 +01:00
Martin Pulec
1abc9d97aa portaudio_common: help shotcut words
'output channels' and 'input channels' is needlessly verbose, use abbrevs
+ IN 1st, out second
2025-03-07 15:50:34 +01:00
Martin Pulec
b2e70a619e poraudio: print supported APIs in fullhelp
useful mainly to check ASIO presence in Win
2025-03-07 11:11:01 +01:00
Martin Pulec
dc80f7cb48 portaudio_common: include-what-you-use 2025-03-07 10:36:30 +01:00
Martin Pulec
0dad02e66a acap/wasapi: fix alignment of loopback acap device 2025-02-28 14:53:11 +01:00
Martin Pulec
00fb576307 wasapi: fix setting dev by UUID
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).
2025-02-28 14:53:11 +01:00
Martin Pulec
be2b3dcb59 aplay/sdl_mixer: rev changes committed by mistake
Reverted unintentionally committed changes in in the previous commit.
2025-02-26 09:03:30 +01:00
Martin Pulec
b26ca14cb1 lavc get supported prop fix
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)
2025-02-25 23:37:54 +01:00
Martin Pulec
b44af19782 audio sender: use colors for sample cnt summary 2025-02-11 12:59:03 +01:00
Martin Pulec
5812cf1608 remove unneeded HAVE_SDL2 macro
include <SDL_header> instead of <SDL2/SDL_heaaer>
2025-01-24 14:37:36 +01:00
Martin Pulec
16d41e8a5d aplay/mixer: restricting senders - check err
also workarounds for CIDs 47049{6,7}
2024-12-04 16:17:03 +01:00
Martin Pulec
0ac8c32716 aplay/mixer: allow selection of single participant
Allow selection of a single participant to be sent back with a control
socket (docuented in wiki).
2024-11-28 12:05:12 +01:00
Martin Pulec
9fd68d6447 aplay/mixer: factor out sockaddr_compare 2024-11-28 12:05:11 +01:00
Martin Pulec
82aed4b4ac aplay/mixer: sockadr cmp: check also IPv6 scope ID 2024-11-28 12:05:11 +01:00
Martin Pulec
950f3dc6a4 get_sockaddr_str: obtain IPv6 scope ID
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).
2024-11-28 12:05:10 +01:00
Martin Pulec
0b27ea6e18 aplay/mixer: do not store particp sockaddr_storage
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)
2024-11-28 12:05:10 +01:00
Martin Pulec
23197c9e78 aplay/mixer: pass audio_playback_opts to ctor
+ moved opt parsing to a separate function
2024-11-28 12:05:10 +01:00
Martin Pulec
9ff045c00b aplay API: paas init parameters in a structure
+ add also parent module pointer
2024-11-28 12:05:10 +01:00
Martin Pulec
d9eaca6cac acap/aplay headers: add missing include guard 2024-11-28 12:05:09 +01:00
Martin Pulec
1b61386af6 audio decoder: support zero-len data
to be used by passive acap and the audio mixer for passive audio
participants
2024-11-28 12:05:09 +01:00
Martin Pulec
88e511f898 audio codec: if received no data, pass it further
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.
2024-11-28 12:05:06 +01:00
Martin Pulec
abd758241a debug: move some stuff to utils/debug
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
2024-11-28 11:46:09 +01:00
Martin Pulec
699c04841f added passve audio vidcap 2024-11-28 08:29:28 +01:00
Martin Pulec
8d91757f7d fix CID 470420 2024-11-26 08:29:30 +01:00
Martin Pulec
a0ef81d76b audio/codec: improved including 2024-11-25 15:09:09 +01:00
Martin Pulec
9cd1af1a03 aplay/alsa: remove 2 messages
- 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)
2024-11-25 15:09:08 +01:00
Martin Pulec
73718becae aplay/jack: avoid using alloca/strdup
+ small related improvements
2024-11-22 10:15:54 +01:00
Martin Pulec
d4e216e21c aplay/mixer: participant add/rm print fixes
- 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)
2024-11-13 17:00:10 +01:00
Martin Pulec
a68f76ca9c aplay/mixer fix
fixed HEAD^^
2024-11-13 16:20:39 +01:00
Martin Pulec
225fbc8ea1 aplay/mixer: print participant add/rm 2024-11-13 14:52:28 +01:00
Martin Pulec
110e656b46 aplay/mixer: fixed including 2024-11-13 14:46:59 +01:00
Martin Pulec
f39e24e232 acodec/lavc: fixed including 2024-11-13 14:08:32 +01:00
Martin Pulec
8b94de582c lavc: replace deprecated items
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.
2024-11-12 14:59:19 +01:00
Martin Pulec
5306ea4134 pbuf stats: print media type instead of SSRC
refers to GH-417
2024-10-16 16:19:09 +02:00
Martin Pulec
ab25c2d1fc audio volume format: delimiting '/' unformatted
it very slightly helps readibility
2024-09-13 15:35:44 +02:00
Martin Pulec
86e218f40a audio/utils: improved including 2024-09-13 15:35:44 +02:00
Martin Pulec
6aed0ee771 audio: unify volume statistics formatting 2024-09-13 15:35:42 +02:00
Martin Pulec
215b823861 Reed-Solomon: add defaults for audio
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.
2024-09-11 13:11:09 +02:00
Martin Pulec
be7dcb67c7 aplay/alsa: print req val if buff fails to set 2024-09-10 08:59:24 +02:00
Martin Pulec
52ed2fdd22 tv.h: replace time conv macros (+ in alsa)
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
2024-09-10 08:58:27 +02:00
Martin Pulec
f3462fc599 aplay/alsa: control debug print delay by log_level
use run-time log_level rather then macro DEBUG
2024-09-06 11:19:25 +02:00