Commit Graph

8387 Commits

Author SHA1 Message Date
Martin Pulec
2c8dd6743e transmit: moved stat reporting after send loop
it simplifies the code and facilites eventual refactor
2023-09-20 09:24:47 +02:00
Martin Pulec
70d1c5186d CI: macOS compilation fix (Vulkan missing hdr) 2023-09-19 16:33:30 +02:00
Martin Pulec
5451a2fbce Revert "CI mac: keep vulkan 1.3.262 temporarily"
Currently installed version is now 1.3.264, anyways.

This reverts commit ff483081b5.
2023-09-19 16:33:30 +02:00
Martin Pulec
b5250a5a8e removed rang.hpp 2023-09-19 16:33:30 +02:00
Martin Pulec
a4fc9bd139 AJA: removed rang.hpp usage 2023-09-19 16:33:28 +02:00
Martin Pulec
4734c9e983 removed few next rang.hpp uses 2023-09-19 13:47:11 +02:00
Martin Pulec
afd0f217de signal_handler: ignore next SIGPIPE signals
We will end anyways and do not produce additional SIGPIPE on eventual output.
2023-09-19 13:34:11 +02:00
Martin Pulec
b28feb62fe vidcap testcard: options parse improvement
* renamed 's=' option to 'strip=' (it is currently defunct, anyways)
* parse 'strip=' after 'size=', effectivelly allowing '-t testcard:s=VGA'
('s=' shortcutting size, not strip)
2023-09-19 11:53:49 +02:00
Martin Pulec
c4fbc0900f vidcap testcard: busy-wait in _grab
Fixes potential problems (not always reproducible) when running:

    uv -sembedded -tswitcher:fallback -ttestcard -ttestcard:m=VGA -c lavc

Because the fallback mode calculates expected frame time - there is a race
condition when testcard's grab doesn't yet returns a frame but subsequent
check in switcher determines that the frame time already passed.
2023-09-19 11:14:28 +02:00
Martin Pulec
a2ec0374c1 lavc audio: unref av_frame in cleanup
fixes GH-338
2023-09-19 11:14:28 +02:00
Martin Pulec
ebca9c7daf lavc audio: early return + reformat 2023-09-19 11:14:28 +02:00
Martin Pulec
d04b1def74 debug.h: added shortcut macro
to save needed characters typed, instead of

`log_msg(LOG_LEVEL_ERROR, MOD_NAME "This is an error!");`

type just

`MSG(ERROR, "This is an error!")`
2023-09-19 11:14:26 +02:00
Martin Piatka
2c3d49846d configure.ac: Fix pipe display not in reflector
Fixes #339
2023-09-19 09:47:48 +02:00
Martin Pulec
e006cb411f switcher: print when fallback device used 2023-09-18 15:37:01 +02:00
Martin Pulec
996d8762c4 vidcap testcard: option to restrict number of cap vframes 2023-09-18 15:37:01 +02:00
Martin Pulec
bcad73d983 vidcap testcard audio: support for arbitrary BPS 2023-09-18 15:37:01 +02:00
Martin Pulec
241840480d audio utils: get rid of rare functions 2023-09-18 15:36:57 +02:00
Martin Pulec
586c3fc585 audio: simplified samples storing/loading 2023-09-18 14:27:42 +02:00
Martin Pulec
c1a30ddaa5 vidcap testcard audio: print warn on unsupp conf
Issue a warning if unsupported audio parameters were requested.
2023-09-18 12:39:42 +02:00
Martin Pulec
7ff196e6ae vidcap testcard audio: support for >1 channels 2023-09-18 12:39:42 +02:00
Martin Pulec
bdcb25875c switcher: pretty-print 2023-09-18 12:39:42 +02:00
Martin Pulec
f534c30730 vidcap file: print audio format 2023-09-18 12:39:41 +02:00
Martin Pulec
d492a9a4e3 some include optimization 2023-09-18 07:54:10 +02:00
Martin Pulec
77bc6d5fd1 lavc: allow cmdline shortcuts
* optionally allow 'lavc' instead of 'libavcodec'
* allow shortcuts of frequent options, eg. `-c lavc:c=H.264`
2023-09-18 07:49:15 +02:00
Martin Pulec
a2d3eb8c2b fixed swittcher when :excl_init is used
\+ fixed device names not being stored except first device with excl_init

see also commit a24e194d fixing the issue without that option

refers to GH-336
2023-09-15 15:58:27 +02:00
Martin Pulec
ee1d6146a6 GitHub CI: build with Qt 6
Following to previous commit, we can build with Qt 6 (even thought that
a workaround is neeeded).

qt package (version 6) is installed anyways as a dependency of opencv
2023-09-15 15:36:43 +02:00
Martin Pulec
46522e312f Makefile [Mac] manual QtDBus copy workaround
Currently macdeployqt distributed with Qt 6 in Homebrew fails to deploy
transitive dependency (QTDBus in this case). So as a workaround we
hard-copy that for now.

It may not be problem of Qt 6 itself but just the Homebrew distribution,
see also [1].

[1]:
a6a9f108df
2023-09-15 15:36:43 +02:00
Martin Pulec
84ba09f4f7 lavc: wrap codec lines 2023-09-15 15:36:43 +02:00
Martin Pulec
2f995895c8 rename indent_paragraph to wrap_paragraph
More suitable name - the function doesn't indent but just wraps long
lines.
2023-09-15 15:36:41 +02:00
Martin Piatka
cdbb15baa8 holepunch: Don't bind any particular address 2023-09-15 12:51:41 +02:00
Martin Pulec
ff483081b5 CI mac: keep vulkan 1.3.262 temporarily
Install vulkan headers prior to updating homebrew tree.

the version 1.3.264 seem to be temporarily broken (see [1]), producing
error:

    /usr/local/include/vulkan/vulkan.hpp:15:10: fatal error: 'vulkan/vulkan_hpp_macros.hpp' file not found
    #include <vulkan/vulkan_hpp_macros.hpp>

[1]:
https://github.com/MartinPulec/UltraGrid/actions/runs/6184953701/job/16789584064
2023-09-14 16:11:40 +02:00
Martin Pulec
792d5d8b2e CI macOS prepare.sh: removed unneeded env paths 2023-09-14 16:11:40 +02:00
Martin Pulec
d6daa8e9af CI mac: (self-)update Homebrew
the version 4.1.7 in GH runner is unsolicitedly producing
relocatable install names as it would with (in recent HB version)
HOMEBREW_RELOCATABLE_INSTALL_NAMES=1

see failed run:
<https://github.com/CESNET/UltraGrid/actions/runs/6147222102/job/16745596096>

The relocatable install names like:

    $ otool -L /usr/local/opt/qt/lib/QtGui.framework/QtGui | grep png
            @loader_path/../../../../../../../opt/libpng/lib/libpng16.16.dylib

Makes significant problems to macdylibbundler (it doesn't copy the library
to the bundle at all neither chantes the name).

\+ reinstall freetype (see failed build
<https://github.com/MartinPulec/UltraGrid/actions/runs/6185513000/job/16791263362>)
2023-09-14 16:11:39 +02:00
Martin Pulec
9a6b85aab1 mac GUI bundle: link Frameworks to libs
Macdeployqt copies ordinal libraries to Frameworks/ while we use libs/
with macdeployqt, so use symlink to avoid having 2 copies when lib is
used by both uv and uv-qt.
2023-09-14 16:11:39 +02:00
Martin Pulec
a41a5095c3 Makefile mac: gui bundle updates
do not run dylibbundler on uv-qt and macdeployqt on uv/hd-rum-transcode

This should no longer be needed and it simplifies things a bit.
2023-09-14 16:11:39 +02:00
Martin Pulec
4b1526e634 Makefile mac: cp Frameworks/ to bundle
Do not use hard-coded list of frameworks in Makefile, rather use list
generated by configure.ac in BIN_DEPS.

Needed frameworks are copied to Frameworks/ as part of BIN_DEPS target
(needed for TARGET), so that we can copy this directly to the bundle.
2023-09-14 16:11:39 +02:00
Martin Pulec
44fb3ceb9b gh/scripts/macOS/prepare.sh: standalone install
allow standalone installation of deps (outside GitHub CI) for debugging
2023-09-14 16:11:39 +02:00
Martin Pulec
94735192eb install-common-deps.sh: do not require GITHUB_WORKSPACE
allows running the script alone to replicate the build env
2023-09-14 16:11:39 +02:00
Martin Pulec
63ac91db3f configure.ac: simplified Qt
The whole stuff is no no longer needed - only qmake is needed to build
the GUI now (UG itself does no longer depend on Qt - shared IPC frame
now uses UNIX sockets).
2023-09-14 16:11:39 +02:00
Martin Pulec
c136250aa4 Makefile.in: reformated mac bundle target
keep 80 columns width
2023-09-14 16:11:36 +02:00
Martin Piatka
939d1feaa4 holepunch: Send disconnect message 2023-09-14 13:56:49 +02:00
Martin Piatka
2d0a58bd9d Nat-helper: Differentiate between error and disconnect 2023-09-14 13:56:48 +02:00
Martin Pulec
e3026d3573 display file: better resource handling
- use just one AVPacket
- free audio encoder context

\+ NOLINT(clang-analyzer-core.NullDereference) - this cannot happen -
either audio is enabled and then tmp_frm cannot be NULL here or this
branch wouldn't be entered (display_file_put_audio_frame() is never called)
2023-09-11 14:53:02 +02:00
Martin Pulec
7495a0f857 display file: added max_av_diff option
allows user to fiddle max allowed A/V desync interval before frame drop/dup

\+ moved parsing to a separate function
\+ destroy pthread-related things only if thread started (initialized)
2023-09-11 14:43:12 +02:00
Martin Pulec
c44d4bd78d file: old channel_layout API format
added compatibility with older FFmpeg libraries

see also
<7544fcb525 (r126660408)>
2023-09-11 10:54:45 +02:00
Martin Pulec
d621284222 interleaved2noninterleaved_float: handle BPS 1
handle 1 byte case, which is unsigned and thus mus be handled separately

\+ divide the other cases with -INT32_MIN instead of INT32_MAX, to avoid
value < -1.0 if the sample value is INT32_MIN (but as the computation is
done in floats, both values will likely to be rounded to the same number)
2023-09-08 16:15:05 +02:00
Martin Pulec
bd5de92a71 display file: prefer s16[p] over fltp
We advertise support for 16-bit audio only (DISPLAY_PROPERTY_AUDIO_FORMAT),
so it is better to use it directly without short->float conversion if possible.
2023-09-08 15:25:35 +02:00
Martin Pulec
5d71448f08 display file: few improvements
- if init fails, call exit_uv() rather than trying to reconfigure
- print error instead of assert if encoder is not found (eg. Theora for OGG)
2023-09-08 15:25:35 +02:00
Martin Pulec
ab0585e1de vidcap file: accept name= prefixing file name
Currently, the first parameter is taken positionally, which is not
consistent with file display (and key/val parameters are preferred over
positional ones) so accept also "name=" for file name.
2023-09-08 15:25:35 +02:00
Martin Pulec
405751d401 display file: rename name option
Although "file=" is common option name (eg. for testcard), advise rather
"name", because "-d file:file=<name>" looks a bit weird (but accept both).
2023-09-08 15:25:34 +02:00