Commit Graph

7427 Commits

Author SHA1 Message Date
Martin Pulec
8dfec2f9ac README.md: replaced PNG with SVG logo
This is actually the original logo, the former one has used a different
font (Muli).
2023-02-28 16:44:47 +01:00
Martin Pulec
2851104c37 cineform dec.: support for RG48 2023-02-28 16:44:47 +01:00
Martin Pulec
0654e99744 decompress probe: use pixdesc to represent intern fmt
Use pixfmt_desc instead of codec_t for internal compression
representation. This better alignes eg. YUV 10-bit 4:4:4 which has been
deduced as Y416 and eg. for DeckLink, R12L was chosen because it was
thought to be 16 bit, not 10.

This fixes:

    uv -t testcard:codec=R10k -c libavcodec:encoder=libx265:yuv -d dummy:codec=decklink

being detected internally as Y416 and configured as R12L. Now it is
internally Y444_10 and output DeckLink would be configured to R10k.

Removed also params "lavd-use-10bit", "lavd-use-codec", which were
deprecated already some time and if can be replaced by
"decoder-use-codec" if needed.
2023-02-28 16:44:42 +01:00
Martin Pulec
2f1fc85a8f lavc: set async_depth=1 for mjpeg_qsv
This option improves latency (similarly as done for QSV H.264 and HEVC).
2023-02-28 16:17:36 +01:00
Martin Pulec
de91c41a14 optstring: added missing letter 'F' (capture filter) 2023-02-28 16:17:36 +01:00
Martin Pulec
d04fff8c9e main: catch stoi exceptions
Using short getopt options, a user may make a mistake in parameter name
resulting in passing a non-numeric string to stoi, which leads to crash
on not-nice uncaught exception crash.

+ remove try/catch from parse_port (no longer needed due the above)
2023-02-28 16:17:36 +01:00
Martin Pulec
2519e3593b lavc: print options set in verbose mode 2023-02-28 16:17:36 +01:00
Martin Pulec
df05601e0a lavc: set default Huffman tables only for "mjpeg"
mjpeg_qsv doesn't have such an option
2023-02-28 16:17:36 +01:00
Martin Pulec
c4dfbaf0d7 lavc: set QSV CQP defaults 2023-02-28 16:17:35 +01:00
Martin Pulec
ab832f501e dummy: added gl codecs emulation 2023-02-28 16:17:35 +01:00
Martin Pulec
99fd545511 lavc: set AVCodecContext::global_quality for CQP QSV
set global quality when using CQP with QuickSync

see GH-298
2023-02-28 13:12:14 +01:00
Martin Pulec
42e269f9ff lavc: if setting cqp, set particular codec flag
AV_CODEC_FLAG_QSCALE is used to signalize that fixed qscale should be
used and some codecs like QSV ones require it to signalize that CQP is
used.

refer to GH-298
2023-02-28 13:12:14 +01:00
Martin Pulec
3072321a52 mjpeg: set cqp by default
mjpeg encoders (FFmpeg embedded and QuickSync) don't respond to bitrate
setting, so set cqp by default. This gives user a guidance (via the log
msg, that cqp param may be set).
2023-02-28 13:12:14 +01:00
Martin Pulec
b3c1ab2648 lavc: removed q= parameter in favor cqp=
Setting the constant quality is quite per-codec specific so do not
provide 2 distinct options with similar semantic that are mutually
incompatible.

Instead, try to interpret the cqp parameter and set codecs' properties
individually.
2023-02-28 13:12:14 +01:00
Martin Pulec
58b59f92aa lavc: crf/cqp/bitrate/bpp are mutually exclusive 2023-02-28 13:12:12 +01:00
Martin Piatka
fd72ddb3bb Update NEWS 2023-02-28 13:09:27 +01:00
Martin Piatka
50bace80fe GUI: Remove no end marker error box 2023-02-28 13:00:42 +01:00
Martin Piatka
da1e3b0e21 GUI: Add safe mode for querying capabilities
Previously if UltraGrid crashed when probing a module, all remaining
modules would be left unqueried and missing.
This commit introduces a "safe mode", which tries to query each module
independently if querying everything at once fails.
2023-02-28 13:00:42 +01:00
Martin Piatka
63e0e85159 GUI: available_settings: Add queryBeginPass(), which doesn't clear 2023-02-28 12:51:08 +01:00
Martin Piatka
8fb2ca4c93 GUI: launch manager: allow relaunching currentContext from callback 2023-02-28 12:51:07 +01:00
Martin Piatka
5b6e948ecf GUI: available settings return modules as const ref 2023-02-28 12:51:07 +01:00
Martin Piatka
bcf4a447c5 GUI: use x-macro for capability types 2023-02-28 12:48:41 +01:00
Martin Piatka
9df03d3b0d string_view_utils: Whitespace trimming helpers 2023-02-28 12:48:41 +01:00
Martin Pulec
4fc998ef59 get_win_error: notice about localized output 2023-02-28 10:05:21 +01:00
Martin Pulec
3dd5981ca2 replaced gai_strerror calls with own wrapper
added ug_gai_strerror

Default to gai_strerror, but use WSAGetLastError() in Windows. This
solves a problem with localized error messages but with a wrong
non-ASCII characters. Instead of gai_strerror, WSAGetLastError is
preferred according the Microsoft MSDN docs (thread safety). Also using
get_win_error() to ensure non-localized output (preferred).
2023-02-28 10:04:45 +01:00
Martin Pulec
e7f011f2ef prefix some calls of gai_strerror msgs
Since it is called on multiple places, be clear where the problem
happens.
2023-02-28 10:03:53 +01:00
Martin Pulec
58d4363dee dummy disp: fixed wrong operator precedence 2023-02-28 08:55:43 +01:00
Martin Pulec
d025484ae3 get_win_error: drop trailing <CR><LF>
Some occurences of this call (net_udp.cpp, dlfunc.c) don't expect the
string to be terminated so it is perhaps better to drop it at the
source.
2023-02-27 12:36:56 +01:00
Martin Pulec
ae23c5fed4 RTP UDP: small refactor 2023-02-27 12:36:55 +01:00
Martin Pulec
c99ad01237 NET UDP: fixed fallback err print
fixed 31d88376

the fallback condition was actually newer met
2023-02-27 12:21:23 +01:00
Martin Pulec
84ba9bbce5 utils/windows.cpp -> .c 2023-02-27 11:22:27 +01:00
Martin Pulec
0f12915298 main.cpp: unnecessary TTL check
the RTP library does the check as well
2023-02-27 10:40:17 +01:00
Martin Pulec
c06de1c49a win: replace FormatMessage with the UG function
+ handle a situaltion when FormatMssage fails on unknown error (dshow
  has been handling that)
2023-02-27 10:37:03 +01:00
Martin Pulec
1076097bfd com_[un]initialize: one definition
Merged win and non-win dummy compat versions of the com_[un]initialize
fuctions. Otherwise it is a bit confusing.
2023-02-27 10:09:28 +01:00
Martin Pulec
fdf3361ff4 win: fixed locale-aware string conversion 2023-02-27 09:57:30 +01:00
Martin Pulec
06417f79ef get_win_error: do not generate localized error msgs
This is perhaps not preferred - our users should be most likely able to
understand English. Moreover, localized message content may not be clear
if given eg. in a bug report.
2023-02-27 09:56:16 +01:00
Martin Pulec
a4d88298f7 win: common err to string func 2023-02-27 09:49:20 +01:00
Martin Pulec
509b938b8e simplified wstring_to_string: use string constructor
The previous version with wcstombs returned EILSEQ on some localized
strings while not converting the whole string (regardless the diacritics
is still not working correctly).

https://stackoverflow.com/questions/4804298/how-to-convert-wstring-into-string/12097772#12097772
2023-02-27 08:47:48 +01:00
Martin Pulec
251915f5b1 vidcap_screen_win_probe: small improvements
set deleter to silence a warning on unused param
2023-02-27 08:47:45 +01:00
Martin Pulec
c924b873d0 wasapi audio: removed rang.hpp dependency 2023-02-24 16:06:51 +01:00
Martin Pulec
4fe552f225 use common com_[un]initialize 2023-02-24 16:06:42 +01:00
Martin Pulec
8df499ffac merged utils/hresult to utils/windows
These 2 files are relatively small and coherent.

+ fixed hresult_to_str not returning anything on RPC_E_CHANGED_MODE
2023-02-24 15:00:00 +01:00
Martin Pulec
39af5e01df moved CoInitialize stuff outside bmd_common
this code may be useful in general
2023-02-24 14:48:07 +01:00
Martin Pulec
9aef0d6011 common_init: init COM on main thread in Windows
Ensure that COM is intialized as COINIT_MULTITHREADED on main thread
because eg. Portaudio uses COINIT_APARTMENTTHREADED.
2023-02-24 13:47:36 +01:00
Martin Pulec
96778ce782 decklink_initialize: print textual represenation of error 2023-02-24 13:23:25 +01:00
Martin Pulec
50655d4dbc blackmagic_api_version_check: use decklink_[un]initialize 2023-02-24 12:02:32 +01:00
Martin Pulec
c1d6bb84b0 DeckLink: continue if CoInit fails on diff. mode 2023-02-24 12:02:32 +01:00
Martin Pulec
faafa640a2 hresult: added RPC_E_CHANGED_MODE
CoInintialize[Ex] initialized with different mode (can occur eg. for
DeckLink because it uses COINIT_MULTITHREADED but Portaudio uses
COINIT_APARTMENTTHREADED).
2023-02-24 12:02:32 +01:00
Martin Pulec
73176ea568 bmd_hresult_to_string: common COM errors handling
Factor out common errors to hresult.h header. If not running on Windows,
use that subset. Vice versa use hresult_to_str directly because it can
catch more Windows-specific errors.
2023-02-24 12:02:31 +01:00
Martin Pulec
4cef5b81df hresult: adeed RPC_E_CHANGED_MODE 2023-02-24 12:02:29 +01:00