Commit Graph

131 Commits

Author SHA1 Message Date
Martin Pulec
727841f3bc set_output_buffering: small improvements
- show usage with "help"
- print error if setvbuf fails (but do not return an error - there may
  be some platform problem but the setting is done always, so it would
  unconditionally prevent UltraGrid from running)
- if usage error (or help) occurs, exit UltraGrid
2022-07-01 15:22:54 +02:00
Martin Pulec
67c4bad83b param help: added usage warning
--params should not be considered a part of standard options provided to
users but rather a developer/expert mode.
2022-07-01 14:49:56 +02:00
Martin Pulec
1dc899209d set output buffering early
setvbuf() should be called on a stream prior to any operation with the
stream. Previously it was to late -- it was even after configuration
summary was printed to stdout.
2022-07-01 14:49:32 +02:00
Martin Pulec
8e1369f21f setvbuf: set size=BUFSIZ
The value 0 is mentioned in man setvbuf(3) and indeed glibc
implements setlinebuf as:

    _IO_setvbuf (stream, NULL, 1, 0);

However, except the mention in manual page, this extension doesn't seem
to be anywhere mentioned (not clear if valid with _IOFBF) and it is not
widespread except glibc, since [1] forbids that. Also using _IOLBF+0
behaves in the same way as _IOLBF+BUFSIZ (buffers BUFSIZ bytes).

[1] https://www.ibm.com/docs/en/i/7.1?topic=functions-setvbuf-control-buffering
2022-07-01 09:29:18 +02:00
Martin Pulec
d4775e375e output buffering: set explicitly
Set output buffering to "line" for stdout and "no" for stderr. This is
the case usually but not always (eg. MSYS, GUI console) so make this
explicit to be deterministic.
2022-06-30 16:41:40 +02:00
Martin Pulec
0e900170b5 glfw_init_count: improved documentation 2022-06-29 09:34:04 +02:00
Martin Pulec
1a31999f1a utils/misc: split to misc and macros.h
Some macros are quite common so it is perhaps more wise to use a
separate header.

Also moved ref_count_init_once and ref_count_terminate last to misc.h.
2022-06-06 11:06:06 +02:00
Martin Pulec
89be4a70ef GL,NDI: experimental support for HDR 2022-06-06 11:06:01 +02:00
Martin Pulec
03c024309f GLFW: allow multiple instantiation
For now, use reference counting without any synchronization -
glfwInit/Terminate should be called only from main thread, anyway.
2022-06-01 11:22:01 +02:00
Martin Pulec
5d68388c16 host.cpp: use VIDEO_CODEC_FIRST inst. of magic 1 2022-05-26 10:53:12 +02:00
Martin Pulec
9743625c80 codec, pixfmt listing: added legend 2022-05-26 09:07:28 +02:00
Martin Pulec
57d240dc76 always compile mtrace hooks [Linux]
Unless MALLOC_TRACE environment variable is set, no hook is installed
and the calls have no effect. On the other hand, if we compile it
unconditionally, it can be used without need to recompile UltraGrid.
mtrace(), however, doesn't seem to be much helpful (compared to eg.
valgrind).
2022-05-13 15:32:59 +02:00
Martin Pulec
73c4b13895 Win MSYS2: disable output buffering by default
This looks to be more reasonable - user may not know that s/he actually
wants to set it. The thing is that this may be needed only for stdout -
user than doesn't detect that some output is missing.
2022-05-10 14:49:57 +02:00
Martin Pulec
fdfac34546 x11_error_handler: print stacktrace 2022-05-10 11:16:18 +02:00
Martin Pulec
0275d4e669 register_param: warn if max params reached 2022-05-02 16:12:25 +02:00
Martin Pulec
49eb5219a0 register_param: skip repeating registr. of param
Skip repeating registration of the same parameter.

This allows registration of the param from within more modules (eg.
common file included in multiple plugins). Warning is issued if already
registered param has a different description.
2022-05-02 16:12:25 +02:00
Martin Pulec
0de3402090 Do not load modules for run_tests
Modules are linked statically even for the modular build to test
executable.

See 1386ffe5
2022-03-18 08:52:32 +01:00
Martin Pulec
ae17f406e7 audio/video_offset: document vars 2022-03-04 16:27:49 +01:00
Martin Pulec
a6f80ec2dc common_preinit: Win - set output as UTF-8 2022-01-14 15:53:41 +01:00
Martin Pulec
31721d9200 parse_auduio_capture_format: be more user-friendly
- allow also comma as a delimiter (WLOG - comma cannot be part of
  current set of options)
- print token, that is not understood
- hint that "bps" must be in bits-per-second (% 8 = 0)
2022-01-06 13:56:48 +01:00
Martin Pulec
237f2becfe moved parse_audio_capture_format() to host.cpp 2022-01-06 13:56:48 +01:00
Martin Pulec
7add441e60 Updated version color to bright_blue 2021-11-09 10:43:08 +01:00
Martin Pulec
1b3b27eb7c Updated copyright dates for modified files 2021-11-08 15:43:14 +01:00
Martin Pulec
2e13a04dff Key control: print version
May be used for quick check if not running an obsolete UG during
runtime.
2021-11-01 09:20:44 +01:00
Martin Pulec
940399988a Lavd: option to dump decompressed frame 2021-10-22 09:21:52 +02:00
Martin Pulec
3b6a1dd160 main: decouple verbosity parsing to host.cpp 2021-07-09 10:20:13 +02:00
Martin Piatka
eab94c12c0 Remove some unused includes
Removes some unused includes reported by include-what-you-use
2021-06-08 15:22:25 +02:00
Martin Pulec
f8fd2f872e Logger: option to enable/disable timestamps 2021-05-26 16:15:39 +02:00
Martin Pulec
bb1405fad3 Added hint to disable output buffering in MSYS terminal 2021-05-21 13:43:56 +02:00
Martin Pulec
986606f1e7 Renamed error() to handle_error()
to avoid clashes with GNU function error()
2021-05-13 09:08:26 +02:00
Martin Pulec
644fa9b48a Added -T/--ttl parameter 2021-03-29 16:13:17 +02:00
Martin Pulec
66c82aa55d Allow -1 as a value for TTL
Causes TTL not to be set and default values will be used for both
mutlicast and unicast TTL.
2021-03-29 11:39:48 +02:00
Martin Pulec
013a031f05 Added TTL parameter
It currently sets muticast TTL.
2021-03-29 11:04:28 +02:00
Martin Piatka
cdf77ffe87 capabilities: Allow reporting an extra json object 2021-03-15 14:59:54 +01:00
Martin Piatka
2255a71d67 capabilities: Make video and audio devices consistent
The .id field previously contained the module name for audio devices,
while it only contained options for video devices. To make things more
consistent there are now two fields: "module" which contains the module
name and "device" which contains only the parameters.
2021-03-12 13:48:03 +01:00
Martin Piatka
47692ed051 capabilities: std::quoted for codecs 2021-03-09 14:39:44 +01:00
Martin Piatka
9938384929 GUI: Check if capabilities are complete and have correct version 2021-03-09 14:39:44 +01:00
Martin Piatka
356bd85d7e capabilities: report codec priority 2021-03-09 14:39:42 +01:00
Martin Piatka
14fcf70fb6 capabilities: report video compression codecs, encoders, options 2021-03-09 14:39:41 +01:00
Martin Piatka
eb7140de81 capabilities: Use std::quoted to escape quotes in strings 2021-03-08 14:25:33 +01:00
Martin Pulec
371146b393 Generate backtrace when crashed in Linux+mac 2021-02-23 15:09:03 +01:00
Martin Pulec
f1d0b1898d Hd-rum-translator: accept --param 2021-02-11 15:45:07 +01:00
Martin Pulec
bd552be430 Allow verbosity increase with -V
+ small updates
2020-11-05 09:30:15 +01:00
Martin Pulec
024494f4b8 Option to disable message repeats suppressing 2020-11-05 09:21:33 +01:00
Martin Pulec
a36d5a008e Rang: force control
In order to control sequences work with ostringstream logger.
2020-11-05 09:07:04 +01:00
Martin Pulec
89747981da audio_capture_channels is now 0 for default
Capturers may decide by themselves or capture DEFAULT_AUDIO_CAPTURE_CHANNELS
(as until now). This fixes default behavior of WASAPI with Realtek sound cards
that is unable to capture single channel.
2020-09-11 13:50:54 +02:00
Martin Pulec
81bed14603 Added low-latency-audio=ultra 2020-09-08 16:56:54 +02:00
Martin Pulec
cd1cfac5e6 Consider also tags/vXXX to be a release
Currently GIT_BRANCH refers to rather tag than release name, it would be needed
rather "git rev-parse --abbrev-ref HEAD" instead of "git name-rev --name-only
HEAD". But with shellow clones (as in GitHub) it would also require the
repository to be unshallowed.
2020-08-05 14:48:31 +02:00
Martin Pulec
b9ea962040 1.6+ branding 2020-07-29 10:40:11 +02:00
Martin Pulec
48895b0783 ADD_TO_PARAM: salt is no longer needed
UNIQUE_NAME is used instead of the salt
2020-06-09 14:02:37 +02:00