Commit Graph

7646 Commits

Author SHA1 Message Date
Martin Piatka
0149ea3fdf CI: Apply vaapi compatibility patch on 20.04 too 2023-04-04 11:42:55 +02:00
Martin Piatka
eb7406f06e CI/Linux: Migrate to Ubuntu 20.04 2023-04-04 10:46:16 +02:00
Martin Pulec
4adb5f6ac0 configure.ac: simplify
use a macro to ensure feature availability

+ use for the macro M4 instead of shell
2023-03-31 16:17:21 +02:00
Martin Pulec
811938ed8c main: call regiesterd should_exit callback if exit
If registering a should_exit callback but should_exit has already been
broadcasted, it wasn't ever run, leading likely to a freeze.

Steps to reproduce the fixed problem:

    uv -t swmix:512:512:2 -t invalid

Fixed by immediately calling the registered callback if should_exit has
been already issued.
2023-03-31 14:16:47 +02:00
Martin Pulec
edd254f558 swmix: use C 2023-03-31 14:16:47 +02:00
Martin Pulec
c6c18208c9 swmix: properly free resorces if init fails
vidcap_swmix_done() can now be run even if not entire initialization is
done so call it to free partially initialized state if init fails.
2023-03-31 14:16:47 +02:00
Martin Pulec
3db29d0c6c Makefile: do not echo CUDA compilation twice
The compiler is run twice - first for real compilation, second for
dependency tracking. Do not print compilation message the second one
since it may be confusing.
2023-03-30 17:03:23 +02:00
Martin Pulec
af1df2e376 configure: ensure cuda is present if req 2023-03-30 17:03:23 +02:00
Martin Pulec
34cf791ba0 configure: if CUDA used, link with it (Linux)
Linux still uses modular build but previous commit adds dependency on
CUDA directly to UG core. Since nowadays, the libraries are normally
bundled with UG, there should't be a problem adding the direct
dependency.

Fixes failed build

    https://github.com/MartinPulec/UltraGrid/actions/runs/4564204742/jobs/8053681894
2023-03-30 17:02:57 +02:00
Martin Pulec
2317819400 CUDA: do not use gpujpeg for dev list
Query directly, without help from GPUJPEG (although the code is actually
borrowed from there).

This enables device listing also if GPUJPEG is not compiled in and it
simplifies main.
2023-03-30 14:01:10 +02:00
Martin Pulec
757b03fd67 cuda_wrapper/cuda_runtime.h wrapper: added documentation 2023-03-30 14:01:10 +02:00
Martin Pulec
17db78a191 configure.ac: removed some unused HAVE_ defs
When using modules, it should not depend on the preprocessor directive
but its sources should be included conditionally if enabled.

This change reduces number of features in config.h and also helps
refactoring because the absence of HAVE_ macro indicates that there is
no additional dependency on the module.
2023-03-30 14:01:10 +02:00
Martin Pulec
07f8d44d46 Syphon: minor help improve
- print help for "app" and "name" opts
- numerate servers (but the numbers cannot be used as indices for init)
2023-03-30 14:00:57 +02:00
Martin Pulec
963e1c3561 GL: create tiny wrapper for SPOUT/Syphon
to be more user friendly by allowing user to specify simply:

        -d spout:name="My server"

+ removed dummy audio functions from GL display (unneeded)
2023-03-30 13:49:09 +02:00
Martin Pulec
c009f9da76 Syphon: use Objective-C without C++ 2023-03-30 10:49:32 +02:00
Martin Pulec
a4680299dc DShow: fixed inverted condition
fixed commit 4fe552f2 from 24th Feb 2023
2023-03-30 10:39:54 +02:00
Martin Pulec
28431e2784 ARM CI: fixed cron schedule line
fixes commit 88d7d1eb
2023-03-29 14:54:18 +02:00
Martin Pulec
ed2aa1a6d2 pbuf: improved max_loss computation
max_loss is now not capped to 64 but consecutive loss periods from
adjacent 64 packet groups are summed together
2023-03-29 14:54:16 +02:00
Martin Pulec
31a8b30c57 pbuf: compute_longest_gap refactor
equivalent rewrite in preparation to modification
2023-03-29 14:53:57 +02:00
Martin Pulec
720fafc3d6 pbuf: use enum instead of macros
clang-tidy modernize-macro-to-enum
2023-03-29 13:39:50 +02:00
Martin Pulec
f41897410a Syphon: prevent not likely race condition
+ added documentation
2023-03-29 13:39:49 +02:00
Martin Pulec
d7f1f24c7a Syphon: properly stop mainloop
Do not call [NSApplication terminate], because main event loop is never
left but call stop. A custom event needs to be posted to execute the
event step. References:

- https://stackoverflow.com/questions/48041279/stopping-the-nsapplication-main-event-loop
- 6e6805000a
2023-03-29 13:39:49 +02:00
Martin Pulec
f4e915da9b macOS: removed remains of GLUT
This effectively reverts commit 887da08822.
2023-03-29 13:39:49 +02:00
Martin Pulec
87c82baa14 updated REPORTING-BUGS.md 2023-03-29 13:39:49 +02:00
Martin Pulec
3bccc55a6f Syphon: miscellaneous fixes 2023-03-29 13:39:49 +02:00
Martin Pulec
51835138b8 Syphon: fixes
Fixed releasing of timers (recycle onle) + remove the last one,
otherwise it will be left dangling and triggerred (and crash) when gl
display is also launched.

+ moved server discovery before creating new GL textures etc.
2023-03-29 13:39:48 +02:00
Martin Pulec
dfa724fea2 Syphon: terminate the mainloop directly
terminate the mainloop directly if run by us
2023-03-29 13:39:48 +02:00
Martin Pulec
a3daa89ef6 displays: changed api for mainloop
- removed `needs_mainloop` attribute and deduce if mainloop is needed
  from the presence of _run callback (the information is now redundant
  only displays needing/running mainloop should announce _run callback)

- run the custom mainloop (currently only Syphon!) only when display
  doesn't run its mainloop. This allows running Syphon and GL/SDL
  display because it connects to the display mainloop.
2023-03-29 13:39:48 +02:00
Martin Pulec
dd0c38b01d Revert "Allow overriding display requirement for mainloop"
It is unclear what should this parameter help with and it doesn't seem
that it is somewhere referenced (wiki, GitHub issues).

This reverts commit 2e4fac60b8.
2023-03-29 13:39:48 +02:00
Martin Pulec
3f630e5aca displays: fill video_display_info::run only if needed
Fill the `run` member only if really requesting to run display mainloop,
not to just letting UG run a worker thread.
2023-03-29 13:39:48 +02:00
Martin Pulec
265c6b3f6e Win build: CUDA 8.0 compat
Although quite old, it is very simple to add support for it and it will
allow compilation for eg. CUDA CC 2.x.
2023-03-29 13:39:32 +02:00
Martin Pulec
2fd384b08b fixed 2 Win warnings
- utils/net: unused variable
- wasapi playback: unused function prototype
2023-03-29 12:09:39 +02:00
Martin Pulec
7d5196c610 Syphon: use native GL context
get rid of direct GLUT dependency

+ mac_gl_common.m: fixed copyright + relicense (as the only author)
+ destroy_gl_context - noop for empty (zeroed, not initialized) context
+ GL: attach the context (will be useful later when running at the same
  time Syphon and GL display)
2023-03-29 12:09:38 +02:00
Martin Pulec
741eab4244 GL disp.: acquire GL context
When running aside something else (eg. Syphon), make sure that the
context is ours.
2023-03-29 12:09:38 +02:00
Martin Pulec
9ffeba2d38 lavc: allocate at least 4 KiB buf for compressed
When compressing very small video (16x16) with libx265, first frame is
2690 B, which is more than W*H*4 (1024) leading to a crash on assert.

steps to reproduce the fixed problem:

    uv -t testcard:size=16x16 -c libavcodec:encoder=libx265
2023-03-29 12:08:40 +02:00
Martin Pulec
e8f4763397 recreate the rendering pipeline if size changes
If shader conversion is used, the rendering pipeline needs to be
recreated because the converted frames are initialized with the actual
size. We can perhaps recreate it always if the properties change,
although strictly taken it is not necessarily needed if there is no
conversion and only size changes.

refer to GH-303
2023-03-28 12:20:46 +02:00
Martin Pulec
d901cd719d fixed Coverity CID 315210 2023-03-24 14:06:50 +01:00
Martin Pulec
50ad3976e7 flip: moved to C 2023-03-24 14:06:50 +01:00
Martin Pulec
88d7d1eb8a CI ARM Linux: run every week on Thursday
Caches are deleted if not used for 7 days so if run every week, the
cached environment remains preserved.
2023-03-24 14:06:50 +01:00
Martin Pulec
449251ac3e get rid of global should exit variable 2023-03-24 14:06:50 +01:00
Martin Pulec
f642680f5d Syphon vidcap: do not use global should_exit 2023-03-24 14:06:50 +01:00
Martin Pulec
d1b2806f03 aja cap.: removed dep on global should_exit 2023-03-24 14:06:50 +01:00
Martin Pulec
aa132a496e video_rxtx: do not use global should_exit
use video_rxtx::m_should_exit variable instead
2023-03-24 14:06:49 +01:00
Martin Pulec
24b2cc5b91 audio mixer: do not use global should_exit 2023-03-24 14:06:49 +01:00
Martin Pulec
2074a1257e audio: do not read global should_exit 2023-03-24 14:06:47 +01:00
Martin Piatka
cbcaf16cdf testcard: Expose some options via capabilities 2023-03-24 11:02:30 +01:00
Martin Piatka
17725f9e26 capabilities: Move dev_add_opt helper declaration to types.h 2023-03-24 10:57:22 +01:00
Martin Piatka
3fde759168 GUI: populate options for all devices 2023-03-24 10:51:11 +01:00
Martin Piatka
bad2cb7a4b GUI: Remove hardcoded Display settings tab 2023-03-24 10:29:14 +01:00
Martin Piatka
eca875daf5 GUI: Generalize Display settings to device settings
Now settings will display options reported in capabilities for all
devices, not just displays. If there are no options reported for a class
of devices (e.g. audio capture) then the settings tab will not appear.
2023-03-24 10:29:14 +01:00