Commit Graph

184 Commits

Author SHA1 Message Date
Martin Pulec
c9e5f620cd audio/capture: get rid of audio_init_state_ok
replaced with convenient INIT_NOERR

+ removed all remaining references (audio.h, host.cpp)
2023-03-14 10:52:17 +01:00
Martin Pulec
20a331fad1 logging: do not override log_level default val
If user didn't set anything on command line, do not override the default
value of `log_level` specified by the initializer.

This is a bit contraintuitive if a developer sets the value ad hoc to a
different val, it won't take effect.
2023-03-07 16:31:05 +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
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
98805677eb --conv-policy help - improvements 2023-02-23 09:06:49 +01:00
Martin Pulec
fd58880e99 call srand48 in common_preinit
lrand48() is now called in rtp_init_if() prior to init_rng() to get
random port offset. But when not seeded, first call of lrand48() return
always 0 (with glibc 2.37).
2023-02-23 09:06:45 +01:00
Martin Pulec
927842cf43 added pixfmt conversion policy opt
+ changed the default policy to keep bit-depth over color-space

pixfmt_conv_pref is defined in video_codec.c, otherwise tools/convert
won't compile.
2023-02-14 09:49:48 +01:00
Martin Pulec
cac1d11190 updated copyrights of files changed in 2023 2023-02-09 09:19:50 +01:00
Martin Piatka
83d7a28a32 capabilities: Fix printing incorrect module name 2023-02-07 10:44:23 +01:00
Martin Piatka
53ff8e4bbf capabilities: Use explicit type in lambda 2023-02-02 15:54:20 +01:00
Martin Piatka
28797c2246 capabilities: null initialize device list pointer 2023-02-02 15:52:58 +01:00
Martin Piatka
c131e1ebd8 capabilities: Don't print modules when selective querying 2023-02-02 12:27:49 +01:00
Martin Piatka
dfb2bc7519 capabilities: Selective probing 2023-02-02 12:27:49 +01:00
Martin Piatka
278276e109 capabilities: Report audio filters 2023-02-02 12:27:48 +01:00
Martin Piatka
f9bd80bec1 capabilities: factor module probing into a function 2023-01-30 12:41:13 +01:00
Martin Piatka
1bcfbd38f2 audio_playback: Use the unified probe API 2023-01-30 12:41:13 +01:00
Martin Piatka
4e5d329803 audio_capture: Use the unified probe API 2023-01-30 12:41:13 +01:00
Martin Piatka
0920845462 video_capture: New probe API 2023-01-30 12:41:12 +01:00
Martin Piatka
cd6e2dbbf3 capabilities: Added "noprobe" option 2023-01-30 12:41:12 +01:00
Martin Piatka
d51d956817 Fix compile on older gcc
GCC on Ubuntu 18.04 doesn't seem to support the string_view overload of
std::quoted
2023-01-23 16:44:27 +01:00
Martin Piatka
1f45c70c77 capabilities: Move capture printing to host.cpp 2023-01-23 15:28:32 +01:00
Martin Piatka
f2d03285b3 host/capabilities: Factor device print into a function 2023-01-23 14:20:09 +01:00
Martin Pulec
be39092cda rename double-framerate.cpp -> temporal-deint.c
The original name was now slightly misleading since there is also bob
and linear deinterlators.

Also for user it is "double_framerate", not corresponding with the
original file name (underscore instead of minus sign).

+ moved to C
2023-01-18 11:37:59 +01:00
Martin Piatka
ebee5aa583 capabilities: Remove unneeded cout flag and precision restoring
Flags and precision were set when reporting compression presets, but
that got removed.
2023-01-16 10:45:33 +01:00
Martin Piatka
6b08932038 capabilities: Remove old unused preset reporting 2023-01-13 13:12:22 +01:00
Martin Pulec
3c57f67919 UG 1.8 branding
version text color + splashscreen
2022-12-09 14:08:12 +01:00
Martin Pulec
b5cc0e9a1b removed some rang.hpp references 2022-11-21 14:17:01 +01:00
Martin Pulec
2cf167d57f added ULTRAGRID_ERRORS_FATAL environment variable
has same effect as `--param errors-fatal`

+ more verbose documentation of this in the `--param help`
2022-11-15 16:21:40 +01:00
Martin Pulec
9469d6352c document ULTRAGRID_VERBOSE + added some doxygen 2022-11-15 16:13:50 +01:00
Martin Pulec
5dda4c3778 host: documented --capabilities vidcap 2022-10-18 08:24:17 +02:00
Martin Pulec
762216f579 split setting audio capture format from parsing
Since it was seting global variables, the advantage is also that
set_audio_capture_format is now simplier.
2022-10-18 08:23:19 +02:00
Martin Pulec
b07ce59da7 don't return failure on '--audio-capture-format help' 2022-10-18 08:23:19 +02:00
Martin Pulec
735c4fb1d2 logging: override env with param
Set verbose according to ULTRAGRID_VERBOSE parameter only if no
verbosity was given from command-line (otherwise '-V' would mean
'debug').
2022-09-23 11:10:32 +02:00
Martin Pulec
b1f0e004f4 fixed new Coverity bugs
Fixed some of (easy) newly detected Coverity bugs. Those are mostly
innocent ones (performance) and not new (detected because of new release
of Coverity).
2022-08-22 09:57:16 +02:00
Martin Pulec
a9bc710a73 respect ULTRAGRID_VEBOSE environment variable
Previously it was errorneously checked while setting log level from the
command-line opt. If no was given, the particular function was not run.
2022-08-17 17:24:35 +02:00
Martin Pulec
0b8cc39f9c removed perf tool
It was almost never used since added.
2022-08-17 17:24:34 +02:00
Martin Pulec
128150288b logger: removed preinit
no longer needed to initialize rang here
2022-08-10 10:00:07 +02:00
Martin Piatka
213ce5e20f output buffering: Disable buffering in GDB
Since the style reset escape codes are generally after the newline, the
otput of GDB would stay colored without this change
2022-08-09 11:48:58 +02:00
Martin Piatka
e0245aeda5 host,keyboard_control: Move gdb detection to a function 2022-08-09 11:48:58 +02:00
Martin Piatka
d1fbb7cb34 output buffering: Set _IONBF for stdout on WIN32 in all cases
Setting line buffering does not appear to work correctly on Powershell nor
cmd.exe and instead behaves like full buffering (lines do not appear
util flush).
2022-08-03 14:09:17 +02:00
Martin Piatka
65d7cf69b8 logging: Split timestamp and repeat functionality into its own class
This will eventually allow better integration with other formatting
functions like color_out, color_printf
2022-08-03 10:41:14 +02:00
Martin Piatka
d18fb0300e logging: Call preinit before parsing log config
Since help text containing ANSI escape codes can be shown during parsing
(i.e. on error or help text), preinit should be called sooner
2022-07-29 13:03:28 +02:00
Martin Piatka
e1b51bda18 logging: separate config parsing from setting log level 2022-07-29 13:03:27 +02:00
Martin Piatka
07f245c5ec logging: Use enum for timestamp mode 2022-07-29 13:03:27 +02:00
Martin Pulec
d8e9f5bd5c Set _IONBF for stdout in MSYS term
This partially reverts d4775e37 which changed the output buffering from
_IONBF to _IOLBF.
2022-07-27 09:05:55 +02:00
Martin Pulec
9e10a385b6 color_out: new API
Use inline ANSI escape sequences instead of modifiers.

This allows more convenient formatting without the need to use multiple
calls (possibly interleaving).

ANSI escape sequences are nowadays supported also in Windows terminals
(PS, cmd).
2022-07-27 09:05:55 +02:00
Martin Pulec
309973738f parse_params: do not modify optarg
Since parse_params is now run twice, subsequent call must not be influenced by
the first run (in particular the parameter optarg).
2022-07-19 09:19:32 +02:00
Martin Pulec
9cf14ef683 parse_params: fixed validation
Validated parameter was not "<key>" but "<key>=<val>".
2022-07-19 09:11:07 +02:00
Martin Pulec
e561e45933 Fixed "--param" handling
The parsing was done early before dynamic modules that export own
parameters were loaded.

Now, the parsing is done in 2 steps -- first scan only for already known
parameters (output buffer settings is needed for preinit), ignore
"help".

The second step is to do the full parse (in main), when there are all
modules loaded (latter in common_preinit()).

Fixes #237.

The regression was introduced by 1dc89920.
2022-07-18 10:32:43 +02:00