Commit Graph

760 Commits

Author SHA1 Message Date
Martin Pulec
855c0e850f audio_decoders: ensure fec decode length
CID 464486
2024-07-08 10:21:00 +02:00
Martin Pulec
b4bf412a7a print RR more briefly
The line was needlessly chatty and thus harder to read. Currently,
it is a bit more techical but (IMO) somehow easier to read. Since
  it is printed in VERBOSE mode or higher, there should be no problem.
2024-06-26 14:33:36 +02:00
Martin Piatka
141832b1f0 audio_decoders: Print error when remapping nonexistent audio ch. 2024-06-25 13:48:45 +02:00
Lukas Rucka
20b61d6591 Respond to distinct clang-tidy warings and errors on rtp.c 2024-05-30 16:05:09 +02:00
Martin Pulec
56a6dc78b0 replace remaining WIN32 platform macros
see the commit HEAD@{2}
2024-05-13 12:56:53 +02:00
Martin Pulec
13905c4d76 use dedicated server mode blackhole addr
- use custom IPv6 black hole address 100::556C:7472:4772:6453 instead
of 100::1, which a user may use explicitly to signalize server mode
- check just the one address, not the black hole prefix in general
(again, the user may select the discard address intentinally without
knowing our semantics)
- removed the black hole handling functions (no longer needed)
- compute the actual in6_addr from the string with inet_pton instead of
hard coding the value
2024-04-26 10:35:16 +02:00
Martin Pulec
bb3d1e128f RTP: send RTCP to clinet in server mode
Send RTCP correctly in the server mode to a client if we have the RTCP
connection (== receiving RTCP from the client).

It is done in the same way as it is currently implemented when UG is in
receiver-only mode without explicit remote address.
2024-04-25 17:41:37 +02:00
Martin Pulec
4191160a16 RTP: err sending RTCP - missing NL 2024-04-24 16:18:50 +02:00
Martin Pulec
8d1dc8739b R-S: removed VLAs from C++ code 2024-03-26 14:24:34 +01:00
Martin Pulec
cbefa757a7 do not use VLA for packet buffers
Clang 18 complains on that in C++ code and it is unneeded since we are
limitted by the maximal (RTP) packet MTU.
2024-03-25 14:24:10 +01:00
Martin Pulec
0b216f9381 LDGM GPU: watch CUDA shared memory overflow
see also previous commit
2024-03-06 13:19:19 +01:00
Martin Pulec
c2eca2ffae LDGM: increase default K,M
With K=256, with UHD UYVY frame, the packet size is 64804
(3840*216*2/256+4), which overflows available shared memory size (usually
48 KiB).
2024-03-06 13:19:18 +01:00
Martin Pulec
fcc7190bc6 transmit: support for RFC 2550 MP3 packetization
the packet header is very simple (just fragment offset)
2024-02-05 09:40:49 +01:00
Martin Piatka
8c1b1d3a37 control_socket: Make reported audio ch count configurable
And raise the default to 16. Refers to GH-366
2024-01-22 14:56:19 +01:00
Martin Pulec
40a7d04ec1 unit_evaluate[_dbl]: added endptr param 2023-11-29 15:27:32 +01:00
Martin Pulec
3edf5ccede video_decoders: assert getf() != nullptr 2023-11-28 10:29:48 +01:00
Martin Pulec
1b76001575 transmit: optimize includes
+ RTP: do not require config.h and WORDS_{BIG,LITTLE}ENDIAN (use
__BYTE_ORDER__ instead)
2023-11-27 16:41:24 +01:00
Martin Pulec
3fa71b552f zfec: revert headers incl removal
removed 2023-11-16 by commit c8080a4f

config.h include is actually requested (HAVE_ZFEC). If config.h is
included and HAVE_ZFEC is defined, also other headers, which have been
deleted, are required as well.
2023-11-27 11:08:53 +01:00
Martin Pulec
b3be70de09 LDGM: moved the %-syntax past the explicit
Moved the syntax using percents past the explicit matrix specification
to indicate that it is less preferred since it is not entirely generic
(parameters only for certain frame sizes).

+ highlight by red the syntax
2023-11-16 14:01:28 +01:00
Martin Pulec
f92d29d20f Reed-Solomon: addd notice about per-frame protect 2023-11-16 14:01:28 +01:00
Martin Pulec
c8080a4fb3 Reed-Solomon: pretty-print help
- use bold to highlight
- unindent options
2023-11-16 14:01:27 +01:00
Martin Pulec
19ddd71458 LDGM usage: emphasize per frame protection
+ moved the note outside of the option list for better readibility
2023-11-16 14:01:27 +01:00
Martin Pulec
92fde7408b LDGM: pretty-print (use colors + unindent options) 2023-11-16 14:01:27 +01:00
Martin Pulec
47780a0167 rtp/net_udp: fix recv buf size not set [Win]
Since 2023-09-20 (commit 97b956f5), UDP net buffers were not set, because
the property was set on tx_fd, which is, howver, a different socket than
rx_fd in Windows by default (not on other platforms).

closes GH-358
2023-11-14 13:45:07 +01:00
Martin Pulec
be72d17dc2 udp_set_buf: print set value anyways
It is better to display the value unconditionally (in verbose), because
even the positive feedback, that set correctly, may be useful.
2023-11-14 11:42:53 +01:00
Martin Pulec
c14ad5f95e pixfmt_conv.h: small doxy update
\+ added some direct pixfmt_conv.h includes (in attempt to remove its
inclusion from video_codec.h, which finally didn't take place but still
it is better to include this directly)
2023-11-13 10:27:09 +01:00
Martin Piatka
bf8af5fc9e rtp: Fix crash due to invalid force_ip_version
The parameter changed from bool to int containing version number in
c692a01
2023-11-10 11:37:46 +01:00
Martin Pulec
8b412140d7 renamed get_win_error->get_win32_error
it formats win32 errors, but not HRESULT in general
2023-10-27 12:18:17 +02:00
Martin Pulec
4722eaa357 audio dec: set timestamp from first packet 2023-10-16 16:29:24 +02:00
Martin Pulec
73b5a85d2d Revert "format_audio_header: do not use audio_frame2"
This reverts commit a81b19d231.
2023-10-16 16:19:57 +02:00
Martin Pulec
2191dfd228 Revert "audio decompress: pass packet list (iterator)"
This reverts commit 29421cd1fe.
2023-10-16 16:19:56 +02:00
Martin Pulec
175844d63a Revert "lavd audio: use packet API"
This reverts commit 7f810b8ddd.
2023-10-16 16:19:56 +02:00
Martin Pulec
0b33b0a781 Revert "packet counter: remoed unneeded packet store"
This reverts commit f106180bbf.
2023-10-16 16:19:56 +02:00
Martin Pulec
466ac95829 recv buf: issue a warning if unable to set
Issue a warning if unable to set the buffers andreceiving uncompressed
stream, but not not on initial setting, only if increase requested.

The logic is not entirely straightforward - as we are increasing only,
do not assume that the buffer is set to the initial size but rather read
the actual value, which will be less if wasn't possible to set. So the
second attemp issues the warning.
2023-10-11 16:57:53 +02:00
Martin Piatka
11a13dec1b audio_decoders: Report volumes for varying channel count
Limit to 8 since the GUI can't show more anyway
2023-10-11 12:39:08 +02:00
Martin Pulec
ea55e0f10d print audio scale adj in verbose mode
This can be particularly useful when scaling is misbehaving and user
has at least verbose logging to notice.
2023-10-10 11:14:52 +02:00
Martin Pulec
61544172c5 get_video_desc_from_string: fixed mode parse
fixed parsing of mode `uv -t testcard:m=2160p25` where it was incorrectly
returned FPS 60 (fixed FPS offset 2 bytes pointing to 21_60_p)
2023-10-10 09:25:12 +02:00
Martin Pulec
122a69904d hd-rum-transcode: allow different log_levels
As in UG, --verbose now has optional log level (`--verbose=7` for
debug), only numeric values are accepted for now by the reflector..
2023-09-20 15:11:07 +02:00
Martin Pulec
97b956f5ce udp_set_{recv,send}_buf: print newly set bufsz
improved debug print:
- print in any case (if it succeeded and also failed)
- if set to value more of same, print in debug, if the set value is less
than requested print in verbose mode

\+ factor out common handling to common function
2023-09-20 14:31:05 +02:00
Martin Pulec
2078d11075 udp_exit: return on NULL
this fixes crash on `hd-rum-transcode 8M 5004 nonexistent`
2023-09-20 11:53:12 +02:00
Martin Pulec
f0e7333d88 transmit: use constant for hdr lens
+ move the computation to a function
2023-09-20 09:53:30 +02:00
Martin Pulec
4734c9e983 removed few next rang.hpp uses 2023-09-19 13:47:11 +02:00
Martin Pulec
4a745780e2 lavc video: header_inserter - support HEVC
\+ ignore leading AUD NALU if present (add own 4B start code instead) -
it could have produced problems when AUD+SPS+PPS is prepended to regular
frame that is not an IDR frame
2023-08-25 11:54:33 +02:00
Martin Pulec
c185014766 lavc video: added header_inserter option
The option solves a problem with streams that do not correctly prepend
video headers, namely (and currently only implemented) SPS/PPS in
H.264 stream. Support for HEVC can be added later.
2023-08-25 11:54:29 +02:00
Martin Pulec
d035fcefdf platform_mkdir->mkdir: use POSIX syntax
Use rather defined function as mkdir(3p) is, even though there is needed
a compat for MSW.

+ removed some strtok_r undef, which should no longer be needed (see
also commit 6c6253c9)
2023-08-14 16:06:16 +02:00
Martin Pulec
08f083a107 NAL_(?!HEVC) -> NAL_H264
Since H.264 and HEVC uses different constants even for the same (named)
NAL type (eg. AUD has 9 in H.264 but 35 in HEVC), replace NAL_ prefix,
that were implilcitly meant or H.264 with NAL_H264.
2023-08-14 16:06:16 +02:00
Martin Pulec
5a9bfd1e53 video lavd: skip leading AUD NALU for HEVC
see the commit d2fedd72 for details
2023-08-14 16:06:16 +02:00
Martin Pulec
d2fedd724c video lavd: skip leading AUD NALU for H.264
H264_mf encoder (Windows) produces single byte AUD unit prior to SPS
NALU. Because only first NALU was evaluated to assess whether to pass
the frame further, it took 10 frames (+ additional 10 for probe) before
decoding started before it surrendered the checks.
2023-08-11 11:44:53 +02:00
Martin Pulec
72ab033473 rtpdec_h264: added function to get NALU name 2023-08-11 11:43:27 +02:00
Martin Pulec
34c48a15ca configure: remove check for if_nametoindex
if_nametoindex is present in both POSIX and Windows (since Vista)

+ print the error message as error_msg - debug_msg there was rather a mistake
2023-08-10 08:01:42 +02:00