Commit Graph

5468 Commits

Author SHA1 Message Date
Martin Pulec
65c7924e4d testcard: allow mode specification with shortcut
added support for specifying video with something like:
`-t testcard:mode=vga`.
2023-05-23 09:29:39 +02:00
Martin Pulec
3f5e4df87b testcard help: small updates
- sort options alphabetically + change some
- print default used format
2023-05-22 16:37:50 +02:00
Martin Pulec
6ad63dc300 testcard: fixed a crash 2023-05-22 16:37:50 +02:00
Martin Pulec
0e0ffb3454 GLFW: swap buffers after changing size
In Wayland, when resizing windows programmatically glfwSetWindowSize(),
if swap buffers was not triggered, event returning back to the original
resolution is triggered when swap buffer is triggered just after
drawing. It looks like that no drawing should occur before window size
change and swap buffers, seems there has been reports for SDL, eg. [1].

Also do not call gl_resize() after glfw_resize_window() (needless, it
will be triggered via callback after swapping the buffers).

To reproduce the wrong behavior - use Wayland with GLFW native Wayland
build, then: `uv -t testcard -d gl` (size may be any other than the
splashscreen size 512x512).

[1] https://github.com/libsdl-org/SDL/pull/4821
2023-05-19 12:49:35 +02:00
Martin Pulec
54c2bcce8b GL display: round window width
Window width is not taken directly from video desc but rather computed
according to height (to reflect optional aspect ratio). So the window
size needs to be rather rounded to respect odd sizes like 187x77, which
rounded down 186x77, eg.:

    uv -t testcard:size=187x77 -d gl
2023-05-19 12:49:35 +02:00
Martin Pulec
1b6ed9252b vidcap testcard: moved to C 2023-05-19 12:49:27 +02:00
Martin Pulec
a24878cadc vidcap testcard: print error on unsupported Y4M
Instead of crashing on assert, print user-friendly message that the Y4M
is not supported. Also print the properties of the file and what is
supported, which allows easy debug and user can eg. request the feature.
2023-05-19 09:56:35 +02:00
Martin Pulec
0555e49acf vidcap testcard: support for RGBA PAM
+ print user-friendly message if PAM has unsupported channel count,
  instead of crashing on assert
2023-05-19 09:56:35 +02:00
Martin Pulec
98d0372b95 testcard: use time_ns_t instead of std::chrono 2023-05-19 09:56:34 +02:00
Martin Pulec
a55e42a421 vidcap testcard: do not use vectors 2023-05-19 09:56:27 +02:00
Martin Pulec
fa3a69473c video_pattern_generator can have C API 2023-05-19 08:53:17 +02:00
Martin Pulec
9585480c56 vidcap testcard: remove no nonger used midi_buf
Testcard doesn't longer play a MIDI, this has been moved to audio
capture sdl_mixer.
2023-05-19 08:37:59 +02:00
Martin Pulec
1c8c2fdba2 RTP: small fixes
retval + includes
2023-05-18 16:46:50 +02:00
Martin Pulec
1ceced7ded UG RTP audio: use longer timeouts when idle
Similarly to previous commit (and the original, 8977fd42), use longer
timeouts when not receiving any audio to preserve CPU cycles.
2023-05-18 16:46:49 +02:00
Martin Pulec
efb927735f UG RTP video: use longer timeouts when idle - fix
this fixes the original commit 8977fd42 (2016-09-02) that presumably
never worked, because there were inverted conditions.

The idea of the original commit (fixed with this) was to conserve CPU
cycles when not receiving any data.
2023-05-18 16:46:45 +02:00
Martin Pulec
8b5673ec5c lavc video: set defaults for rav1e
This speeds up rav1e encoding from fractions of FPS to few FPS in
FullHD, but clearly the speed is lagging behind its AOM and SVT
counterparts.
2023-05-18 14:34:18 +02:00
Martin Pulec
c6789d656a sdl_mixer: prefer system sound font
check if Mix_GetSoundFonts() is a usable font and if so, use

This has precedence over bundled songs. But most importantly, it will
allow running also from just compiled source, where there is no sound
font relative to `uv` executable but there could be a sound font in
system paths.
2023-05-18 14:34:18 +02:00
Martin Pulec
55482e784b sdl_mixer: try more sound font alternatives 2023-05-18 14:34:15 +02:00
Martin Piatka
13fa90b1ff reflector: Fix crash on exit 2023-05-18 10:21:23 +02:00
Martin Pulec
386b9bfd4c suppresseded some of AJA warnings 2023-05-18 08:43:51 +02:00
Martin Pulec
78796781db bundled SoundFount is sf3 2023-05-18 08:43:39 +02:00
Martin Pulec
5b750c2ff3 lavc video: prefer libaom-av1 for ARM macs
While on x86_64 is libsvtav1 still slightly ahead, on the M1 mac, the
AOM AV1 performs significantly better (2x faster).

The above holds for native builds, it actually looks like the x86_64
build running SVT AV1 on M1 mac doesn't run correctly at all - it
produces just blank picture (green as is zeroed YCbCr buffer).
2023-05-17 14:56:11 +02:00
Martin Pulec
2961fe2f44 lavc video: print used thread count and mode 2023-05-17 11:48:08 +02:00
Martin Pulec
dc89a560a9 lavc video AOM AV1: updated defaults (performance)
updated defaults so that it may be achievable to compress 1080p on M1 mac
2023-05-17 11:42:57 +02:00
Martin Pulec
7d52917a85 lavc video: print also successfully set options
+ set also custom options with check_av_opt_set (to show setting info)
2023-05-17 11:42:05 +02:00
Martin Pulec
6b291e1183 lavc video: set default realtime usage for AOM 2023-05-17 11:42:05 +02:00
Martin Pulec
50c7f33227 lavc video: missing spaces in help 2023-05-17 11:42:05 +02:00
Martin Pulec
841b254946 testcard pattern gray: fixed noopt usage
calling `-t testcard:pattern=gray` (without explicit step) result in
error

+ wrong usage (should be `gray[=step]`, not `gray[:step]`
2023-05-17 11:42:05 +02:00
Martin Pulec
439eab1256 bmd_option: renamed option_write -> device_write
"option" is redundant here, because it is already in type name and using
"device" instead indicates more clearly that it gets written to the
device.
2023-05-17 11:42:05 +02:00
Martin Pulec
72df5c0c79 bmd_option::option_write: mod specific log prefix
When writing option log message, use module specific prefix, eg.
"[DeckLink display] " instead of just "[DeckLink] ".
2023-05-17 11:42:02 +02:00
Martin Piatka
43e16d00dc reflector: Fix small leak 2023-05-16 10:04:01 +02:00
Martin Pulec
28526b9568 Update ldgm.cpp
hot-fixed LDGM broken by 43ba6b4e (few days ago)
2023-05-12 15:14:04 +02:00
Martin Pulec
34853fc198 fixed CID 407684 2023-05-10 09:53:02 +02:00
Martin Pulec
aefae0b5b8 bmd_option::parse: allow explicitly typing options
Allowing values like '1234' (FCC) or "strn" (string) that would be
otherwise parsed as int and FourCC in second case.
2023-05-10 09:24:19 +02:00
Martin Pulec
0f37cabf1f DeckLink: allow setting string properties
eg.: bmdDeckLinkConfigDeviceInformationLabel ('dila')
2023-05-10 08:52:03 +02:00
Martin Pulec
834ff43d5e bmd_option: allow setting of floating point props
this may be useful for things like bmdDeckLinkConfigAnalogAudioOutputScaleChannel1 ('aos1')
2023-05-10 08:52:03 +02:00
Martin Pulec
97e35083f2 bmd_option::parse: allow negative integers
bmdDeckLinkConfigBypass ('byps') allows setting -1
2023-05-10 08:52:02 +02:00
Martin Pulec
29ac7315e0 DeckLink disp.: also allow arbitrary config setting 2023-05-10 08:52:02 +02:00
Martin Pulec
455c8542cb DeckLink cap.: allow arbitrary option
Allow passing of arbitrary option to DeckLink configuration, eg.:

    uv -t decklink:cptm=pdir

via FourCC option name and value (may be also a flag or an int). The
option is passed directly to BMD API.
2023-05-10 08:52:02 +02:00
Martin Pulec
99374917f2 blackmagic_common: print failed option value 2023-05-10 08:52:02 +02:00
Martin Pulec
cb0f7feafc parse_port: fixed Coverity complaint
CID 407267

handle correctly vicious inputs like "-P :" or "-P 1:"
2023-05-10 08:52:02 +02:00
Martin Pulec
183d175d73 fixed some of new Coverity issues 2023-05-10 08:52:02 +02:00
Martin Pulec
7157b102a4 debug.cpp: fixed error in debug_file_dump
Not critical at all - the comma-separated option could not have been
used so far (it was intended to separate modules, but this funcion is
used in only one so far).
2023-05-10 08:52:01 +02:00
Martin Pulec
65eadce92d restored ostream flags should be set with flags()
Previously, setf() was used but flags() is better because it restores
exactly the previous state.
2023-05-10 08:52:01 +02:00
Martin Piatka
1da0a82621 reflector: Compression default for conference if not specified 2023-05-09 13:59:24 +02:00
Martin Piatka
5339ed1802 reflector: Add server mode 2023-05-09 13:59:23 +02:00
Martin Piatka
5c603af435 rtp/net_udp: Add udp_sendto_wsa_async() 2023-05-09 13:25:44 +02:00
Martin Piatka
81ab4e0eb7 rtp/net_udp: Expose address resolving as stand alone func 2023-05-09 13:25:43 +02:00
Martin Piatka
c7e962c4e1 reflector: Factor conference participant management into a class 2023-05-09 12:48:41 +02:00
Martin Pulec
59a1cb1b24 lavc_common.h: removed further compat
AV_ prefix was added already in 2015 (FF commit def97856)
2023-05-05 11:34:13 +02:00