![]() |
UltraGrid
UltraGrid Low-Latency High-Resolution Transmission System
|

Classes | |
| struct | m_mod |
Public Member Functions | |
| impl (struct module *parent) | |
| ~impl () | |
| void | msg_received () |
| void | start () |
| void | stop () |
Static Public Member Functions | |
| static void | msg_received_func (struct module *) |
Private Member Functions | |
| void | exec_external_commands (const char *commands) |
| bool | exec_local_command (const char *command) |
| void | execute_command (const char *command) |
| int64_t | get_next_key () |
| void | info () |
| void | load_config_map () |
| void | read_command (bool multiple) |
| void | run () |
| void | signal () |
| void | usage () |
Private Attributes | |
| std::set< int64_t > | guarded_keys { '*', '/', '9', '0', 'c', 'C', 'm', 'M', '>', '<', 'e', 's', 'S', 'v', 'V', 'r' } |
| std::map< int64_t, std::pair< std::string, std::string > > | key_mapping |
| std::condition_variable | m_cv |
| std::thread | m_keyboard_thread |
| std::mutex | m_lock |
| bool | m_locked_against_changes {true} |
| struct module * | m_parent |
| std::queue< int64_t > | m_pressed_keys |
| struct module * | m_root {nullptr} |
| bool | m_should_exit {false} |
| std::time_t | m_start_time |
| bool | m_started {false} |
Definition at line 134 of file keyboard_control.cpp.
|
explicit |
Definition at line 203 of file keyboard_control.cpp.
References get_root_module(), m_parent, m_root, m_start_time, MODULE_CLASS_KEYCONTROL, module_init_default(), module_register(), msg_received_func(), and parent.

| keyboard_control::impl::~impl | ( | ) |
Definition at line 223 of file keyboard_control.cpp.
References keyboard_control::stop().

|
private |
Definition at line 914 of file keyboard_control.cpp.
References free_response(), LOG, LOG_LEVEL_ERROR, new_message(), response_get_status(), RESPONSE_OK, SEND_MESSAGE_FLAG_NO_STORE, SEND_MESSAGE_FLAG_QUIET, send_message_sync(), and msg_universal::text.

|
private |
Definition at line 862 of file keyboard_control.cpp.
References CONFIG_FILE, get_keycode_representation(), key, LOG, LOG_LEVEL_ERROR, MOD_NAME, and name.

|
private |
Definition at line 933 of file keyboard_control.cpp.
|
private |
| 0 | if m_should_exit is set |
| -1 | on EOF |
| -2 | on error |
Definition at line 492 of file keyboard_control.cpp.
References CHECK_EOF, debug_msg, get_ansi_code(), get_utf8_code(), GETCH, and MOD_NAME.

|
private |
Definition at line 717 of file keyboard_control.cpp.
References color_printf(), desc, free_response(), get_audio_delay(), get_version_details(), log_level, LOG_LEVEL_INFO, new_message(), print_start_elapsed_time(), RECEIVER_MSG_GET_AUDIO_STATUS, response_get_status(), response_get_text(), RESPONSE_OK, SEND_MESSAGE_FLAG_NO_STORE, SEND_MESSAGE_FLAG_QUIET, send_message_sync(), SENDER_MSG_GET_STATUS, SENDER_MSG_QUERY_VIDEO_MODE, TBOLD, msg_universal::text, msg_receiver::type, msg_sender::type, and val.

|
private |
Definition at line 841 of file keyboard_control.cpp.
References CONFIG_FILE, LOG, and LOG_LEVEL_ERROR.
| void keyboard_control::impl::msg_received | ( | ) |
Definition at line 1013 of file keyboard_control.cpp.
References check_message(), free_message(), msg, new_response(), and RESPONSE_OK.
Referenced by msg_received_func().

|
static |
Definition at line 1007 of file keyboard_control.cpp.
References msg_received(), and module::priv_data.
Referenced by impl().

|
private |
Definition at line 939 of file keyboard_control.cpp.
References log_level, LOG_LEVEL_QUIET, restore_old_tio(), set_tio(), and msg_universal::text.

|
private |
Definition at line 558 of file keyboard_control.cpp.
References free_response(), get_audio_delay(), get_keycode_representation(), get_log_output(), Log_output::get_skip_repeats(), K_CTRL, LOG, log_level, LOG_LEVEL_INFO, LOG_LEVEL_MAX, LOG_LEVEL_QUIET, LOG_LEVEL_WARNING, log_msg(), MOD_NAME, new_message(), RECEIVER_MSG_DECREASE_VOLUME, RECEIVER_MSG_INCREASE_VOLUME, RECEIVER_MSG_MUTE_TOGGLE, send_message(), SENDER_MSG_MUTE_TOGGLE, set_audio_delay(), Log_output::set_skip_repeats(), set_thread_name(), TGREEN, and usage().
Referenced by start().

|
private |
Definition at line 276 of file keyboard_control.cpp.
References MOD_NAME.
| void keyboard_control::impl::start | ( | ) |
Definition at line 229 of file keyboard_control.cpp.
References get_commandline_param(), LOG, LOG_LEVEL_ERROR, LOG_LEVEL_WARNING, log_msg(), MOD_NAME, restore_old_tio(), run(), running_in_debugger(), and set_tio().
Referenced by keyboard_control::start().

| void keyboard_control::impl::stop | ( | ) |
Definition at line 288 of file keyboard_control.cpp.
References module_done().

|
private |
Definition at line 810 of file keyboard_control.cpp.
References G, get_keycode_representation(), K_CTRL, and TBOLD.

|
private |
Definition at line 174 of file keyboard_control.cpp.
|
private |
Definition at line 175 of file keyboard_control.cpp.
|
private |
Definition at line 166 of file keyboard_control.cpp.
|
private |
Definition at line 160 of file keyboard_control.cpp.
|
private |
Definition at line 176 of file keyboard_control.cpp.
|
private |
Definition at line 171 of file keyboard_control.cpp.
|
private |
Definition at line 162 of file keyboard_control.cpp.
Referenced by impl().
|
private |
Definition at line 169 of file keyboard_control.cpp.
|
private |
|
private |
Definition at line 168 of file keyboard_control.cpp.
|
private |
Definition at line 172 of file keyboard_control.cpp.
Referenced by impl().
|
private |
Definition at line 170 of file keyboard_control.cpp.