![]() |
UltraGrid
UltraGrid Low-Latency High-Resolution Transmission System
|
#include "host.h"#include <execinfo.h>#include <fcntl.h>#include <algorithm>#include <array>#include <cassert>#include <cerrno>#include <cmath>#include <csignal>#include <cstdint>#include <cstdio>#include <cstdlib>#include <cstring>#include <getopt.h>#include <iterator>#include <map>#include <mutex>#include <string_view>#include <sys/types.h>#include <tuple>#include <unistd.h>#include <vector>#include "audio/audio_capture.h"#include "audio/audio_filter.h"#include "audio/audio_playback.h"#include "audio/codec.h"#include "audio/types.h"#include "audio/utils.h"#include "capture_filter.h"#include "compat/platform_pipe.h"#include "compat/strings.h"#include "config_unix.h"#include "cuda_wrapper.h"#include "debug.h"#include "keyboard_control.h"#include "lib_common.h"#include "module.h"#include "types.h"#include "utils/color_out.h"#include "utils/fs.h"#include "utils/misc.h"#include "utils/random.h"#include "utils/string.h"#include "utils/string_view_utils.hpp"#include "utils/text.h"#include "utils/thread.h"#include "utils/windows.h"#include "video_capture.h"#include "video_codec.h"#include "video_compress.h"#include "video_display.h"#include <iomanip>#include <iostream>#include <list>#include <fstream>#include <string>#include <thread>#include <utility>Go to the source code of this file.
Classes | |
| struct | init_data |
| struct | state_root |
Macros | |
| #define | MOD_NAME "[host] " |
Typedefs | |
| using | module_info_map = std::map<std::string, const void *> |
Functions | |
| ADD_TO_PARAM ("allow-unknown-params", "* allow-unknown-params\n" " Do not exit on unknown parameter.\n") | |
| ADD_TO_PARAM ("audio-buffer-len", "* audio-buffer-len=<ms>\n" " Sets length of software audio playback buffer (in ms, ALSA/Coreaudio/Portaudio/WASAPI)\n") | |
| ADD_TO_PARAM ("audio-cap-frames", "* audio-cap-frames=<f>\n" " Sets number of audio frames captured at once (CoreAudio)\n") | |
| ADD_TO_PARAM ("audio-disable-adaptive-buffer", "* audio-disable-adaptive-buffer\n" " Disables audio adaptive playback buffer (CoreAudio/JACK)\n") | |
| ADD_TO_PARAM ("color", "* color=CT\n" " [experimental] Color space to use, C - colorimetry: 0 - undefined, 1 - BT.709, 2 - BT.2020/2100, 3 - P3; T - transfer fn: 0 - undefined, 1 - 709, 2 - HLG; 3 - PQ (signalized to GLFW on mac, NDI receiver)\n") | |
| ADD_TO_PARAM ("errors-fatal", "* errors-fatal\n" " Treats some errors as fatal and exit even though " PACKAGE_NAME " could continue otherwise.\n" " This allows less severe errors to be catched (which should not occur under normal circumstances).\n" " An environment variable ULTRAGRID_ERRORS_FATAL with the same effect can also be used.\n") | |
| ADD_TO_PARAM ("low-latency-audio", "* low-latency-audio[=ultra]\n" " Try to reduce audio latency at the expense of worse reliability\n" " Add ultra for even more aggressive setting.\n") | |
| ADD_TO_PARAM ("stderr-buf", "* stderr-buf={no|line|full}\n" " Buffering for stderr\n") | |
| ADD_TO_PARAM ("stdout-buf", "* stdout-buf={no|line|full}\n" " Buffering for stdout\n") | |
| ADD_TO_PARAM ("window-title", "* window-title=<title>\n" " Use alternative window title (SDL/GL only)\n") | |
| void | common_cleanup (struct init_data *init) |
| struct init_data * | common_preinit (int argc, char *argv[]) |
| void | crash_signal_handler (int sig) |
| static void | echeck_unexpected_exit (void) |
| void | exit_uv (int status) |
| int | get_audio_delay (void) |
| const char * | get_commandline_param (const char *key) |
| int | get_exit_status (struct module *root_mod) |
| const char * | get_version_details () |
| void | handle_error (int status) |
| void | hang_signal_handler (int sig) |
| void | init_root_module (struct module *root_mod) |
| static void | load_libgcc () |
| bool | parse_bitrate (char *optarg, long long int *bitrate) |
| static bool | parse_opts_set_logging (int argc, char *argv[]) |
| bool | parse_params (const char *optarg, bool preinit) |
| static void | print_backtrace () |
| void | print_capabilities (const char *cfg) |
| void | print_configuration () |
| static void | print_device (std::string purpose, std::string const &mod, const device_info &device) |
| static void | print_modules (std::map< enum library_class, module_info_map > &class_mod_map) |
| static void | print_param_doc (void) |
| void | print_pixel_formats (void) |
| void | print_version () |
| void | print_video_codecs (void) |
| static void | probe_all (std::map< enum library_class, module_info_map > &class_mod_map) |
| static void | probe_compress (std::string const &name, const void *mod) noexcept |
| template<typename T > | |
| static void | probe_device (std::string_view cap_str, std::string const &name, const void *mod) |
| bool | register_mainloop (mainloop_t m, void *u) |
| void | register_param (const char *param, const char *doc) |
| void | register_should_exit_callback (struct module *mod, void(*callback)(void *), void *udata) |
| bool | running_in_debugger () |
| int | set_audio_capture_format (const char *optarg) |
| void | set_audio_delay (int audio_delay) |
| void | set_commandline_param (const char *key, const char *val) |
| static bool | set_output_buffering () |
| int | set_pixfmt_conv_policy (const char *optarg) |
| bool | tok_in_argv (char **argv, const char *tok) |
| void | unregister_should_exit_callback (struct module *mod, void(*callback)(void *), void *udata) |
| static bool | validate_param (const char *param) |
Variables | ||
| unsigned int | audio_capture_bps = 0 | |
| unsigned int | audio_capture_channels = 0 | |
| unsigned int | audio_capture_sample_rate = 0 | |
| volatile int | audio_offset | |
| added audio delay in ms (non-negative), can be used to tune AV sync | ||
| std::unordered_map< std::string, std::string > | commandline_params | |
| unsigned int | cuda_devices [MAX_CUDA_DEVICES] = { 0 } | |
| unsigned int | cuda_devices_count = 1 | |
| bool | cuda_devices_explicit = false | |
| –cuda-device/-D specified expilcitly | ||
| char * | export_dir = NULL | |
| int | glfw_init_count | |
| 0->1 - call glfwInit, 1->0 call glfwTerminate; glfw{Init,Terminate} should be called from main thr, thus no need to synchronize | ||
| mainloop_t | mainloop | |
| mainloop to be run if display mainloop isn't run | ||
| void * | mainloop_udata | |
| struct { | ||
| int abi_ver | ||
| std::string_view cap_str | ||
| enum library_class cls | ||
| std::string_view desc | ||
| void(* probe_print )(std::string name, const void *) | ||
| } | mod_classes [] | |
| struct { | ||
| const char * doc | ||
| const char * param | ||
| } | params [100] | |
| uint32_t | RTT = 0 | |
| static state_root *volatile | state_root_static | |
| used by exit_uv() called from signal handler | ||
| static bool | unexpected_exit_called = true | |
| int | uv_argc | |
| char ** | uv_argv | |
| volatile int | video_offset | |
| added video delay in ms (non-negative), can be used to tune AV sync | ||
This file contains common external definitions.
Definition in file host.cpp.
| using module_info_map = std::map<std::string, const void *> |
| ADD_TO_PARAM | ( | "allow-unknown-params" | , |
| "* allow-unknown-params\n" " Do not exit on unknown parameter.\n" | ) |
| ADD_TO_PARAM | ( | "audio-buffer-len" | ) |
| ADD_TO_PARAM | ( | "audio-cap-frames" | ) |
| ADD_TO_PARAM | ( | "audio-disable-adaptive-buffer" | , |
| "* audio-disable-adaptive-buffer\n" " Disables audio adaptive playback buffer (CoreAudio/JACK)\n" | ) |
| ADD_TO_PARAM | ( | "color" | , |
| "* | color = CT\n" " [experimental] Color space to use, | ||
| C - colorimetry:0 - | undefined, | ||
| 1 - BT. | 709, | ||
| 2 - BT.2020/ | 2100, | ||
| 3 - P3;T - transfer fn:0 - | undefined, | ||
| 1 - | 709, | ||
| 2 - HLG;3 - PQ(signalized to GLFW on mac, NDI receiver)\n" | ) |
| ADD_TO_PARAM | ( | "errors-fatal" | , |
| "* errors-fatal\n" " Treats some errors as fatal and exit even though " PACKAGE_NAME " could continue otherwise.\n" " This allows less severe errors to be catched (which should not occur under normal circumstances).\n" " An environment variable ULTRAGRID_ERRORS_FATAL with the same effect can also be used.\n" | ) |
| ADD_TO_PARAM | ( | "low-latency-audio" | , |
| "* low-latency-audio\n" " Try to reduce audio latency at the expense of worse reliability\n" " Add ultra for even more aggressive setting.\n" | [=ultra] ) |
| ADD_TO_PARAM | ( | "stderr-buf" | ) |
| ADD_TO_PARAM | ( | "stdout-buf" | ) |
| ADD_TO_PARAM | ( | "window-title" | ) |
| void common_cleanup | ( | struct init_data * | init | ) |
Definition at line 203 of file host.cpp.
References com_uninitialize(), cuda_wrapper_device_reset(), init(), and unexpected_exit_called.
Referenced by main(), and main().

| struct init_data * common_preinit | ( | int | argc, |
| char * | argv[] ) |
Definition at line 435 of file host.cpp.
References BUILD_WINDOWS_11_OR_LATER, color_output_init(), com_initialize(), echeck_unexpected_exit(), init(), load_libgcc(), LOG, LOG_LEVEL_WARNING, log_msg(), MSG, open_all(), parse_opts_set_logging(), set_output_buffering(), tok_in_argv(), ug_rand_init(), uv_argc, and uv_argv.
Referenced by main(), and main().

| void crash_signal_handler | ( | int | sig | ) |
Definition at line 1253 of file host.cpp.
References append_sig_desc(), print_backtrace(), restore_old_tio(), strappend(), and write_all().
Referenced by main(), and main().

|
static |
Definition at line 428 of file host.cpp.
References unexpected_exit_called.
Referenced by common_preinit().
| void exit_uv | ( | int | status | ) |
Exit function that sets return value and brodcasts registered modules should_exit.
Should be called after init_root_module() is called.
Definition at line 625 of file host.cpp.
References state_root::broadcast_should_exit(), state_root::exit_status, LOG_LEVEL_WARNING, log_msg(), and state_root_static.
Referenced by audio_cap_alsa_read(), audio_decoder_reconfigure(), audio_play_alsa_write_frame(), audio_receiver_thread(), audio_sender_process_message(), audio_sender_thread(), audio_start(), configure_with(), display_dummy_putf(), display_gl_process_key(), display_panogl_run(), display_reconfigure_audio(), display_sage_run(), display_sdl2_process_key(), display_sdl2_run(), display_sdl_run(), display_xrgl_run(), export_video(), fec_thread(), get_usable_decoders(), glfw_close_callback(), handle_error(), handle_events(), handle_keyboard_event(), initialize(), keep_alive_thread(), main(), ultragrid_rtp_video_rxtx::new_video_decoder(), process_msg(), rtp_video_rxtx::process_sender_message(), ultragrid_rtp_video_rxtx::receiver_loop(), reconfigure(), reconfigure_slave_rendering(), restartAcquisition(), h264_sdp_video_rxtx::send_frame(), signal_handler(), signal_handler(), slave_worker(), tx_send_jpeg(), validate_hwacc_param(), vidcap_file_process_messages(), vidcap_import_grab(), vidcap_screen_x11_grab(), and worker().

| int get_audio_delay | ( | void | ) |
Definition at line 909 of file host.cpp.
References audio_offset, and video_offset.
Referenced by keyboard_control::impl::info(), and keyboard_control::impl::run().
| const char * get_commandline_param | ( | const char * | key | ) |
Definition at line 894 of file host.cpp.
References commandline_params, and key.
Referenced by am_participant::am_participant(), audio_frame2_resampler::audio_frame2_resampler(), ultragrid_rtp_video_rxtx::ultragrid_rtp_video_rxtx(), audio_cap_ca_init(), audio_decoder_init(), audio_decoder_reconfigure(), audio_play_alsa_init(), audio_play_alsa_reconfigure(), audio_play_ca_init(), audio_play_ca_reconfigure(), audio_play_jack_reconfigure(), audio_play_portaudio_reconfigure(), audio_play_wasapi_reconfigure(), audio_receiver_thread(), check_packet_size(), configure_with(), control_init(), control_thread(), decklink_help(), display_decklink_putf(), display_decklink_reconfigure(), display_gl_init_opengl(), display_gl_set_window_hints(), display_sdl2_reconfigure_real(), display_sdl_reconfigure_real(), echo_cancellation_init(), get_format_callback(), get_sine_signal(), get_usable_decoders(), gl_substitute_compile_link(), handle_error(), vidcap_state_aja::Init(), ldgm::init(), init_common(), init_decoder(), init_encoder(), is_output_color(), j2k_decompress_init(), libavcodec_decompress_get_property(), libavcodec_decompress_reconfigure(), libavcodec_init(), ndi_disp_format_video_metadata(), parse_params(), postprocess_frame(), reconfigure_echo(), vidcap_decklink_state::set_codec(), set_codec_context_params(), set_device_buffer(), set_mac_color_space(), set_output_buffering(), set_postprocess_convert(), show_help(), keyboard_control::impl::start(), udp_init_if(), ug_set_av_logging(), validate_hwacc_param(), vdp_interop_supported(), and video_decoder_register_display().
| int get_exit_status | ( | struct module * | root_mod | ) |
Definition at line 633 of file host.cpp.
References module::cls, MODULE_CLASS_ROOT, and module::priv_data.
Referenced by main().
| const char * get_version_details | ( | void | ) |
Definition at line 856 of file host.cpp.
Referenced by keyboard_control::impl::info(), and print_version().
| void handle_error | ( | int | status | ) |
Soft version of exit_uv() checks errors-fatal command-line parameters and if set, exit UltraGrid. Otherwise error is ignored.
Caller code normally continues after this function so the error must not have been fatal and UltraGrid must remain in a consistent state.
Definition at line 1184 of file host.cpp.
References exit_uv(), and get_commandline_param().
Referenced by decode_video_frame(), display_gl_init_opengl(), init_decoder(), and set_sock_opts_and_bind().

| void hang_signal_handler | ( | int | sig | ) |
Definition at line 1276 of file host.cpp.
References UNUSED, and write_all().
Referenced by main(), and main().

| void init_root_module | ( | struct module * | root_mod | ) |
Initializes root module
This the root module is also responsible for regiestering and broadcasting should_exit events (see register_should_exit_callback) called by exit_uv().
Definition at line 610 of file host.cpp.
References module::cls, module::deleter, state_root::deleter(), MODULE_CLASS_ROOT, module_init_default(), module::new_message, module::priv_data, and state_root_static.
Referenced by hd_rum_translator_state::hd_rum_translator_state(), and state_uv::state_uv().

|
static |
dummy load of libgcc for backtrace() to be signal safe within crash_signal_handler() (see backtrace(3))
Definition at line 300 of file host.cpp.
Referenced by common_preinit().
| bool parse_bitrate | ( | char * | optarg, |
| long long int * | bitrate ) |
Definition at line 1012 of file host.cpp.
References LOG_LEVEL_ERROR, LOG_LEVEL_WARNING, log_msg(), RATE_AUTO, RATE_DYNAMIC, RATE_FLAG_FIXED_RATE, RATE_UNLIMITED, SBOLD, TBOLD, TERM_BOLD, TERM_RESET, and unit_evaluate().
Referenced by parse_fmt(), and parse_options_internal().

|
static |
Sets things that must be set before anything else (logging and params)
(params because "std{out,err}-buf" param used by set_output_buffering())
Definition at line 357 of file host.cpp.
References get_log_output(), log_level, LOG_LEVEL_INFO, LOG_LEVEL_VERBOSE, LOG_TIMESTAMP_AUTO, parse_log_cfg(), parse_params(), Log_output::set_skip_repeats(), and Log_output::set_timestamp_mode().
Referenced by common_preinit().

| bool parse_params | ( | const char * | optarg, |
| bool | preinit ) |
Parses command-line parameters given as "--param <key>=<val>[...".
| optarg | command-line arguments given to "--param", must not be NULL |
| preinit | true - only parse/set known parameters (notably output buffer setting), ignore help false - set also remaining parameters including full check and "help" output |
Definition at line 976 of file host.cpp.
References commandline_params, get_commandline_param(), LOG, LOG_LEVEL_ERROR, LOG_LEVEL_INFO, print_param_doc(), strdupa, uv_argv, and validate_param().
Referenced by parse_global_opts(), parse_options_internal(), and parse_opts_set_logging().

|
static |
Definition at line 1205 of file host.cpp.
References get_temp_dir(), MAX_PATH_SIZE, STR_LEN, and write_all().
Referenced by crash_signal_handler().

| void print_capabilities | ( | const char * | cfg | ) |
Definition at line 801 of file host.cpp.
References cls, codecs, get_audio_codec_list(), get_libraries_for_class(), LIBRARY_CLASS_AUDIO_COMPRESS, LIBRARY_CLASS_UNDEFINED, LOG_LEVEL_FATAL, log_msg(), mod_classes, name, print_modules(), probe_all(), probe_print, and tokenize().
Referenced by main(), and parse_global_opts().

| void print_configuration | ( | void | ) |
Definition at line 882 of file host.cpp.
Referenced by parse_options_internal().
|
static |
Definition at line 640 of file host.cpp.
References device_info::dev, device_option::display_desc, device_option::display_name, device_info::extra, device_info::mode::id, device_option::is_boolean, device_option::key, device_info::modes, device_info::mode::name, device_info::name, device_option::opt_str, device_info::options, and device_info::repeatable.
Referenced by probe_device().
|
static |
Definition at line 791 of file host.cpp.
References mod_classes.
Referenced by print_capabilities().
|
static |
Definition at line 1092 of file host.cpp.
References doc.
Referenced by parse_params().
| void print_pixel_formats | ( | void | ) |
Definition at line 1103 of file host.cpp.
References codec_is_a_rgb(), get_bits_per_component(), get_codec_name(), get_codec_name_long(), is_codec_opaque(), SBOLD, VIDEO_CODEC_COUNT, and VIDEO_CODEC_FIRST.
Referenced by parse_options_internal().

| void print_version | ( | void | ) |
Definition at line 868 of file host.cpp.
References get_version_details(), S256_FG, SBOLD, and T_PEACH_FUZZ.
Referenced by main(), and main().

| void print_video_codecs | ( | void | ) |
Definition at line 1115 of file host.cpp.
References get_codec_name(), get_codec_name_long(), is_codec_interframe(), is_codec_opaque(), SBOLD, VIDEO_CODEC_COUNT, and VIDEO_CODEC_FIRST.
Referenced by parse_options_internal().

|
static |
Definition at line 780 of file host.cpp.
References mod_classes.
Referenced by print_capabilities().
|
staticnoexcept |
Definition at line 695 of file host.cpp.
References name.
|
static |
Definition at line 683 of file host.cpp.
References cap_str, count, deleter, name, and print_device().

| bool register_mainloop | ( | mainloop_t | m, |
| void * | u ) |
Registers mainloop that will be run if display-owned mainloop isn't run. Currently this is only used by Syphon, that either connects to display event loop and if there isn't any, it runs its own.
Definition at line 1132 of file host.cpp.
References mainloop, and mainloop_udata.
Referenced by vidcap_syphon_init().
| void register_param | ( | const char * | param, |
| const char * | doc ) |
Registers param to param database ("--param"). If param given multiple times, only first value is stored.
Definition at line 930 of file host.cpp.
References doc, LOG_LEVEL_WARNING, log_msg(), and param.

| void register_should_exit_callback | ( | struct module * | mod, |
| void(* | callback )(void *), | ||
| void * | udata ) |
Definition at line 1144 of file host.cpp.
Referenced by state_uv::state_uv(), audio_cap_jack_init(), audio_init(), main(), video_rxtx::start(), vidcap_dshow_init(), vidcap_file_init(), and vidcap_syphon_init().
| bool running_in_debugger | ( | ) |
Definition at line 1190 of file host.cpp.
Referenced by set_output_buffering(), and keyboard_control::impl::start().
| int set_audio_capture_format | ( | const char * | optarg | ) |
| -1 | invalid usage |
| 0 | success |
| 1 | help was printed |
Definition at line 313 of file host.cpp.
References audio_capture_bps, audio_capture_channels, audio_capture_sample_rate, desc, IF_NOT_NULL_ELSE, and parse_audio_format().
Referenced by adjust_params(), and parse_options_internal().

| void set_audio_delay | ( | int | audio_delay | ) |
Definition at line 914 of file host.cpp.
References abs(), audio_offset, LOG_LEVEL_NOTICE, log_msg(), max, and video_offset.
Referenced by parse_options_internal(), process_msg(), and keyboard_control::impl::run().

| void set_commandline_param | ( | const char * | key, |
| const char * | val ) |
Definition at line 904 of file host.cpp.
References commandline_params, key, and val.
Referenced by display_caca_init(), and init_common().
|
static |
Definition at line 237 of file host.cpp.
References get_commandline_param(), LOG_LEVEL_ERROR, LOG_LEVEL_WARNING, log_msg(), mode, running_in_debugger(), and ug_strerror().
Referenced by common_preinit().

| int set_pixfmt_conv_policy | ( | const char * | optarg | ) |
Definition at line 327 of file host.cpp.
References color_printf(), desc, LOG_LEVEL_ERROR, log_msg(), pixfmt_conv_pref, TBOLD, and wrap_paragraph().
Referenced by parse_options_internal().

| bool tok_in_argv | ( | char ** | argv, |
| const char * | tok ) |
Definition at line 417 of file host.cpp.
Referenced by common_preinit(), and main().
| void unregister_should_exit_callback | ( | struct module * | mod, |
| void(* | callback )(void *), | ||
| void * | udata ) |
Unregisters should_exit callback registered with register_should_exit_callback
The callback must have been registered (and not unregistered), otherwise abort is (currently) called.
Definition at line 1158 of file host.cpp.
Referenced by audio_cap_jack_done(), audio_done(), video_rxtx::join(), main(), vidcap_dshow_done(), vidcap_file_done(), and vidcap_syphon_done().
|
static |
Definition at line 949 of file host.cpp.
References param.
Referenced by parse_params().
| unsigned int audio_capture_bps = 0 |
Definition at line 164 of file host.cpp.
Referenced by audio_cap_alsa_init(), audio_cap_ca_init(), audio_cap_portaudio_init(), audio_cap_sdl_mixer_init(), audio_cap_wasapi_init(), audio_testcard_read_wav(), configure_audio(), decklink_cap_configure_audio(), generate_signal(), and set_audio_capture_format().
| unsigned int audio_capture_channels = 0 |
user-specified chan. count, if zero, module should choose best/native or DEFAULT_AUDIO_CAPTURE_CHANNELS
Definition at line 163 of file host.cpp.
Referenced by adjust_params(), audio_append_pcm(), audio_cap_alsa_init(), audio_cap_ca_init(), audio_cap_jack_init(), audio_cap_portaudio_init(), audio_cap_sdl_mixer_init(), audio_cap_wasapi_init(), configure_audio(), configure_audio(), decklink_cap_configure_audio(), generate_signal(), get_ach_count(), parse_options_internal(), set_audio_capture_format(), setup_audio(), vidcap_aja_init_proxy(), vidcap_dvs_init(), and wait_for_channel().
| unsigned int audio_capture_sample_rate = 0 |
Definition at line 165 of file host.cpp.
Referenced by audio_cap_alsa_init(), audio_cap_ca_init(), audio_cap_jack_init(), audio_cap_portaudio_init(), audio_cap_wasapi_init(), configure_audio(), decklink_cap_configure_audio(), generate_signal(), and set_audio_capture_format().
| volatile int audio_offset |
added audio delay in ms (non-negative), can be used to tune AV sync
Definition at line 178 of file host.cpp.
Referenced by audio_init(), get_audio_delay(), and set_audio_delay().
| std::string_view cap_str |
Definition at line 748 of file host.cpp.
Referenced by probe_device(), and try_open_v4l2_device().
| enum library_class cls |
Definition at line 749 of file host.cpp.
Referenced by get_libraries_for_class(), list_modules(), load_library(), module_class_name(), print_capabilities(), and register_library().
| std::unordered_map<std::string, std::string> commandline_params |
Definition at line 184 of file host.cpp.
Referenced by state_sdi_capture::state_sdi_capture(), adjust_params(), change_bps(), decompress_thread(), display_gl_get_property(), display_gl_init_opengl(), AudioDriftFixer::enable(), find_best_decompress(), get_commandline_param(), parse_options_internal(), parse_params(), and set_commandline_param().
| unsigned int cuda_devices[MAX_CUDA_DEVICES] = { 0 } |
Definition at line 167 of file host.cpp.
Referenced by configure_with(), do_gpu_copy(), gpujpeg_decompress(), gpujpeg_decompress_init(), gpujpeg_to_dxt_decompress_init(), j2k_compress_push(), j2k_decompress_reconfigure(), parse_cuda_device(), reconfigure_thread(), and set_codec_context_params().
| unsigned int cuda_devices_count = 1 |
Definition at line 168 of file host.cpp.
Referenced by configure_with(), flush(), gpujpeg_to_dxt_decompress(), gpujpeg_to_dxt_decompress_done(), gpujpeg_to_dxt_decompress_init(), gpujpeg_to_dxt_decompress_reconfigure(), j2k_decompress_reconfigure(), parse_cuda_device(), set_pool(), and set_postprocess_convert().
| bool cuda_devices_explicit = false |
–cuda-device/-D specified expilcitly
Definition at line 169 of file host.cpp.
Referenced by cuda_conv_enabled(), cuda_conv_enabled(), and parse_cuda_device().
| std::string_view desc |
Definition at line 747 of file host.cpp.
Referenced by set_audio_capture_format(), and set_pixfmt_conv_policy().
| const char* doc |
Definition at line 923 of file host.cpp.
Referenced by print_param_doc(), AvailableSettings::queryDevice(), AvailableSettings::queryVideoCompress(), and register_param().
| int glfw_init_count |
0->1 - call glfwInit, 1->0 call glfwTerminate; glfw{Init,Terminate} should be called from main thr, thus no need to synchronize
Definition at line 182 of file host.cpp.
Referenced by state_gl::~state_gl(), display_gl_init_opengl(), and gl_print_monitors().
| mainloop_t mainloop |
mainloop to be run if display mainloop isn't run
Definition at line 186 of file host.cpp.
Referenced by display_run_mainloop(), and register_mainloop().
| void* mainloop_udata |
Definition at line 187 of file host.cpp.
Referenced by display_run_mainloop(), and register_mainloop().
| const struct { ... } mod_classes[] |
Referenced by print_capabilities(), print_modules(), and probe_all().
| const char* param |
Definition at line 922 of file host.cpp.
Referenced by register_param(), and validate_param().
| struct { ... } params[100] |
Referenced by recompress_output_port::recompress_output_port(), audio_cap_alsa_init(), audio_play_alsa_query_format(), audio_play_alsa_reconfigure(), c_start_server(), hd_rum_decompress_init(), main(), parse(), parse_audio_codec_params(), ScreenCastPortal_impl::run(), ScreenCastPortal_impl::session_created(), vidcap_aggregate_init(), vidcap_gpustitch_init(), vidcap_switcher_init(), vidcap_ug_input_init(), and video_pattern_generator_create().
| void(* probe_print) (std::string name, const void *) | ( | std::string | name, |
| const void * | ) |
Definition at line 751 of file host.cpp.
Referenced by print_capabilities().
| uint32_t RTT = 0 |
Definition at line 171 of file host.cpp.
Referenced by process_rr().
|
static |
used by exit_uv() called from signal handler
Definition at line 602 of file host.cpp.
Referenced by exit_uv(), and init_root_module().
|
static |
Definition at line 202 of file host.cpp.
Referenced by common_cleanup(), and echeck_unexpected_exit().
| int uv_argc |
Definition at line 173 of file host.cpp.
Referenced by ihdtv_video_rxtx::ihdtv_video_rxtx(), common_preinit(), and run_child_process().
| char** uv_argv |
Definition at line 174 of file host.cpp.
Referenced by ihdtv_video_rxtx::ihdtv_video_rxtx(), audio_play_mixer_help(), common_preinit(), decklink_help(), get_argv_program_name(), main(), open_all(), parse_control_port(), parse_options_internal(), parse_params(), parse_port(), register_screen_cap_rec_library(), run_child_process(), show_help(), show_help(), and vidcap_screen_win_init().
| volatile int video_offset |
added video delay in ms (non-negative), can be used to tune AV sync
Definition at line 179 of file host.cpp.
Referenced by rtp_video_rxtx::rtp_video_rxtx(), get_audio_delay(), and set_audio_delay().