Commit Graph

9657 Commits

Author SHA1 Message Date
Martin Pulec
fa93411f15 vdec/cmpto_j2k: convert to R12L in parallel
refers to GH-406
2024-08-26 16:04:47 +02:00
Martin Pulec
9577372760 vcomp/cmpto_j2k: if enc fails, free data
We need to release the resources if encode fails - otherwise eg. the
pool will get exhausted because it has a limited capacity.

+ print enc image failure whether was in push or pop
2024-08-26 15:16:47 +02:00
Martin Pulec
9304717149 vdec/cmpto_j2k: include-what-you-use 2024-08-26 11:06:12 +02:00
Martin Pulec
0bb082d020 configure.ac: no CUDA-accel FF convs with CUDA<9
Disable CUDA-accelerated FFmpeg conversions with CUDA 8 and earlier. At
least in Linux, it requires gcc-5, which is now hardly compatible. (The
actual compatibility was not tested thoroughly because CUDA 8 is
unsupported.)

see also the commit 4581c7f4
2024-08-22 11:42:23 +02:00
Martin Pulec
1502c100d9 Revert "configure.ac: remove cuda version check"
This reverts commit cdc8886bb3.
2024-08-22 11:42:23 +02:00
Martin Pulec
662f209f65 CI README DELTACAST: update used links 2024-08-22 11:42:20 +02:00
Martin Piatka
efd502a92e decklink: Fix device id in capabilities 2024-08-19 16:13:22 +02:00
Martin Piatka
8bd1caf70b GUI: Add an extra opts for user specified arguments 2024-08-19 14:57:34 +02:00
Martin Piatka
4682cf6506 main: Allow multiple --capture-filter options 2024-08-19 14:38:12 +02:00
Martin Piatka
cdc6d59307 disp/decklink: Add GUI option for HDR 2024-08-19 13:49:04 +02:00
Martin Pulec
922fe47fc9 check for unexpected exit
Ensure that some code/library doesn't call delilberately exit(). If so,
write an error msg to warn about it.

refer to GH-402
2024-08-16 16:32:54 +02:00
Martin Pulec
7995b18255 print_stacktrace_win: print stack ptr addr
possibly useful sometimes (?)
2024-08-16 16:15:13 +02:00
Martin Pulec
0092d0cc3a windows: print stacktrace in crash handler
added print_stacktrace_win

similarly to other platforms
2024-08-16 16:05:05 +02:00
Martin Pulec
6fdee3e08f vcap/dshow: improved new-lines in help
- avoid extra NL for even number of modes
- print NL before Mode flags for shorthelp (otherwise it will be just
after last device in the short mode)
2024-08-16 15:46:05 +02:00
Martin Pulec
8f2239374f vcap/dshow: allow shorthelp
prints devices without modes
2024-08-16 15:46:00 +02:00
Martin Pulec
f53204dd3c audio/utils: use static_assert for endianness
Use static_assert to ensure little endian instead of the preprocessor
checks - if the those macros are not defined by the compiler, the check
will be eliminated. If other complier is used, write this more
generically.
2024-08-14 15:37:22 +02:00
Martin Pulec
50812bba34 replacing PACKAGE_BUGREPORT with bug_msg
Where the PACKAGE_BUGREPORT is the only used item from config.h,
use bug_msg(), which can be then removed.

Improved bug_msg() to allow printf-like fomat + arguments.
2024-08-14 15:26:12 +02:00
Martin Pulec
e154dfa294 rxrx/sdp: print URL only once + when no autorun
- print the direct RTP stream URLs only once (== do not repeat with
every printed address)
- print only if autorun was not specifiec
- take the IP version from the state
2024-08-14 11:28:11 +02:00
Martin Pulec
2535d66f25 rxtx/sdp: direct play url again print
Since the rtpmap line is now generated also for static packet types,
the condition must have been updated to check the packet type rather
than the presence of rtpmap line.
2024-08-14 11:28:11 +02:00
Martin Pulec
781ac7689b rxrx/sdp: set actual audio specs
Instead of deducing from audio parameters, defer the creation until we
receive some audio data.

This complements identical change for RTSP in the commit 41b038862
(2024-08-13).
2024-08-14 11:28:11 +02:00
Martin Pulec
77deb0f1c0 h264_sdp, utils/sdp: improved including 2024-08-14 11:28:11 +02:00
Martin Pulec
c41e7f8a47 vcomp/lavc: check MJPEG params validity
MJPEG does produce wrong JPEGs[^1] if either slices or threads == 1 and
the other not (until now also the implicit case, because the values
are auto-adjusted).

So if either is 1, auto-set the other value to 1 as well. If both are
set and either is 1 and the other not, issue at least a warning.

[^1]: for the s=1 && t>1, FFmpeg own decoder is capable to decode,
but the bitstream is definitely wrong - instead of RST markers there
are EOI markers.
2024-08-14 11:28:11 +02:00
Martin Pulec
ea66f734e6 fixed CIDs 467079 and 467173
fixed some Coverity issues - actually no important, just complains about
uninitialized class members, that are, however, to be initialized later
2024-08-14 11:28:11 +02:00
Martin Pulec
b1d5309a81 vcf/logo: CID 467080 fix
Fixed the Coverity complaint by keeping the behavior of "doing nothing" with
the frame while passing it unchanged. It may also return nothing, as it was
doing for the short time - this seems to be inferior in cases when the input
changes from supported to unsupported, this would cut-off the picture eniterely,
not just the logo.
2024-08-14 11:28:11 +02:00
Martin Pulec
4a2b934759 av_to_uv_log: write more clearly 2024-08-14 11:28:09 +02:00
Martin Pulec
6a86eb89b0 lavc_common: simplify logging setting
1. do not call av_log_set_level if using custom callback - seemingly not
used for custom callbacks
2. simplify lavc-log-level (rename from lavcd-...) and keep it only for FFmpeg
values only (+ use FFmpeg default logger)

As indicated by the point 1, it didn't perhaps even work unless the
'D' suffix (now removed) was added to the param because the value set
was not used by the custom callback but default (UG global) log_msg was
used instead.
2024-08-14 11:15:52 +02:00
Martin Pulec
c6a1714b0d host.cpp: improved including 2024-08-14 11:15:42 +02:00
Martin Pulec
220e8b4744 replace BUG_MSG with bug_msg() fn
used just in DirectShowGrabber
2024-08-14 10:42:01 +02:00
Martin Pulec
b64804cea0 CI Linux: utilize continuous GPUJPEG build from GH
advantages:

- it saves some build time (approx. 25 sec)
- it is compatible with Windows CI where the binary build is used as well
- reduces complexity by delegating the build to GPUJPEG CI
2024-08-14 10:42:01 +02:00
Martin Pulec
58e0ac7c2c add opt -DCUDA_DEVICE_RESET for explicit cuda reset
Needed for `cuda-memcheck --leak-check full` to really detect leaks.
2024-08-14 10:41:33 +02:00
Martin Pulec
5f90324328 tx: pass parent in common_opts 2024-08-13 12:59:51 +02:00
Martin Pulec
46c18c9be9 workaround to a buggy GPUJPEG 2024-08-09 11:26:16 +02:00
Martin Pulec
4143900605 export: crash if nullptr passed
The export module is now intended to be initialized always, although
not exporting at that moment, so assert the state presence for
export_audio/export_video.
2024-08-09 09:31:38 +02:00
Martin Pulec
d371815308 CI Linux: build GJ for CC 3.5
As it is now common also for different CUDA stuff and GPUJPEG binary CI
builds themselves (but used only for Win), build also for CC 3.5 (Kepler
cards), which will be still supported for very short amount of time
(but as there will be builds, those can be used in future also on such
a cards, even if the support will be dropped from UG further).
2024-08-09 09:23:01 +02:00
Martin Pulec
b0704afb8e utils/sdp: do not repeat a condition 2024-08-09 09:23:01 +02:00
Martin Pulec
544b641391 vrxtx/sdp: do not print warning
suppress:
```
 [vrxtx] video RXTX not h264_rtp, not setting audio...
```
2024-08-09 09:23:00 +02:00
Martin Pulec
39042d99ee audio_tx_send_standard: fixed static PT for MP3
In case that the input has 1 channel and 8 kHz, the packet type was not
set to 14, because the first if branch was entered instead of else-if
(not setting anything).
2024-08-09 09:23:00 +02:00
Martin Pulec
6508780adc audio_tx_send_standard: fixed PCMA/U dyn type
Fixed the condition that applied only if fixed PT was used for the
audio. But dynamic packet type is used when more channels are used,
in which case the condition didn't hold, which caused the stream not
being handled appropriately (interleaving the channels).
2024-08-09 09:23:00 +02:00
Martin Pulec
7330d9c181 audio_tx_send_standard: fixed bps for PCMA/U
The actual BPS is 1 (8-bits) regardless what .get_bps() returns (that
has a different semantics, see the comment).
2024-08-09 09:23:00 +02:00
Martin Pulec
642ffc8562 vrxtx/rtsp: update printed name
replace "H264 standard" with "RTP standard (using RTSP)" - the "standard"
protocol (on the sender) is no longer restricted to H264 - JPEG is also
possible as well as couple of audio codecs.
2024-08-09 09:23:00 +02:00
Martin Pulec
41b0388624 rtsp server: fixed audio props
Do not deduce audio properties from command-line parameters but from
the actual format that is being to sent.

Until now, the properties like ch_count and sample rate was deduced from
command-line parameters (ch_count from `-a channels=` and sample rate from
`-A xxx:sample_rate`). However, this is a bit fragile - the source may not
respect the `-a` parameters and also the `-A sample_rate` doesn't need
to be set, like in the following case:
```
uv -x rtsp -A A-law -a sample_r=8000 -s testcard
```

Here the capture sample_rate is set to 8000 but not parsed from parameters
(it must have been in `-A`). So SDP parameeters for RTSP was set
incorrectly (48000).
2024-08-09 09:22:59 +02:00
Martin Pulec
78f2a30f12 main: set audio data always
The audio state is always present (even if no audio rx/tx is used),
so set this always.

This will allow setting the data also for tx (the vrxtx) - the check if
either audio tx or rx is unnecessary (as indicated above).
2024-08-09 09:22:59 +02:00
Martin Pulec
0d143d3789 main: pass video_rxtx pointer to audio
will be used to register actual audio format for RTSP
2024-08-09 09:22:59 +02:00
Martin Pulec
b8d0c5e97d video_rxtx: make should_exit private 2024-08-09 09:22:59 +02:00
Martin Pulec
e75d1f2591 renamed rtsp_types_t audio and video
renamed to rtsp_type_audio and rtsp_type_video

Although not causing probles by now, the name itself (which is as a
part of unscoped struct global) is very common so it could have caused
conflicts in future.
2024-08-09 09:22:58 +02:00
Martin Pulec
c637644b72 vrxtx/ihdtv: use argc/argv from global option 2024-08-09 09:22:58 +02:00
Martin Pulec
44e4946b22 main: removed unused rxtx param a_tx_port 2024-08-09 09:22:58 +02:00
Martin Pulec
603a0c39a3 audio_register_display_clks: use struct for params 2024-08-09 09:22:58 +02:00
Martin Pulec
2cd30cbe6f COMMON_OPTS_INIT: do not use designed initializers
Inside C++, the designed initializers are supported from version c++20
but not supported eg. with GCC 9.4, that is on Ubuntu 20.04.
2024-08-09 09:22:58 +02:00
Martin Pulec
475be643e7 tv.h: include config.h
HAVE_TIMESPEC_H conditionaly defined with config.h is used later
2024-08-09 09:22:57 +02:00