|
Hermes 0.7.0
Linux game streaming host
|
Definitions for display device handling. More...
#include "display_device.h"#include <boost/algorithm/string.hpp>#include <display_device/audio_context_interface.h>#include <display_device/file_settings_persistence.h>#include <display_device/json.h>#include <display_device/retry_scheduler.h>#include <display_device/settings_manager_interface.h>#include <mutex>#include <regex>#include "audio.h"#include "platform/common.h"#include "rtsp.h"Go to the source code of this file.
Functions | |
| std::unique_ptr< platf::deinit_t > | display_device::init (const std::filesystem::path &persistence_filepath, const config::video_t &video_config) |
| Initialize the implementation and perform the initial state recovery (if needed). | |
| std::string | display_device::map_output_name (const std::string &output_name) |
| Map the output name to a specific display. | |
| std::string | display_device::map_display_name (const std::string &display_name) |
| void | display_device::configure_display (const config::video_t &video_config, const rtsp_stream::launch_session_t &session) |
| Configure the display device based on the user configuration and the session information. | |
| void | display_device::configure_display (const SingleDisplayConfiguration &config) |
| Configure the display device using the provided configuration. | |
| void | display_device::revert_configuration () |
| Revert the display configuration and restore the previous state. | |
| bool | display_device::reset_persistence () |
| Reset the persistence and currently held initial display state. | |
| EnumeratedDeviceList | display_device::enumerate_devices () |
| Enumerate the available devices. | |
| std::variant< failed_to_parse_tag_t, configuration_disabled_tag_t, SingleDisplayConfiguration > | display_device::parse_configuration (const config::video_t &video_config, const rtsp_stream::launch_session_t &session) |
| Parse the user configuration and the session information. | |
Definitions for display device handling.
Definition in file display_device.cpp.
| void display_device::configure_display | ( | const config::video_t & | video_config, |
| const rtsp_stream::launch_session_t & | session ) |
Configure the display device based on the user configuration and the session information.
| video_config | User's video related configuration. |
| session | Session information. |
Examples
Definition at line 765 of file display_device.cpp.
| void display_device::configure_display | ( | const SingleDisplayConfiguration & | config | ) |
Configure the display device using the provided configuration.
In some cases configuring display can fail due to transient issues and we will keep trying every 5 seconds, even if the stream has already started as there was no possibility to apply settings before the stream start.
Therefore, there is no return value as we still want to continue with the stream, so that the users can do something about it once they are connected. Otherwise, we might prevent users from logging in at all if we keep failing to apply configuration.
| config | Configuration for the display. |
Examples
Definition at line 781 of file display_device.cpp.
|
nodiscard |
Enumerate the available devices.
Examples
Definition at line 818 of file display_device.cpp.
|
nodiscard |
Initialize the implementation and perform the initial state recovery (if needed).
| persistence_filepath | File location for reading/saving persistent state. |
| video_config | User's video related configuration. |
Examples
Definition at line 686 of file display_device.cpp.
|
nodiscard |
Definition at line 748 of file display_device.cpp.
|
nodiscard |
Map the output name to a specific display.
| output_name | The user-configurable output name. |
Examples
Definition at line 736 of file display_device.cpp.
|
nodiscard |
Parse the user configuration and the session information.
| video_config | User's video related configuration. |
| session | Session information. |
Examples
Definition at line 830 of file display_device.cpp.
| bool display_device::reset_persistence | ( | ) |
Reset the persistence and currently held initial display state.
This is normally used to get out of the "broken" state where the algorithm wants to restore the initial display state, but it is no longer possible.
This could happen if the display is no longer available or the hardware was changed and the device ids no longer match.
The user then accepts that Sunshine is not able to restore the state and "agrees" to do it manually.
Examples
Definition at line 803 of file display_device.cpp.
| void display_device::revert_configuration | ( | ) |
Revert the display configuration and restore the previous state.
In case the state could not be restored, by default it will be retried again in 5 seconds (repeating indefinitely until success or until persistence is reset).
Examples
Definition at line 798 of file display_device.cpp.