![]() |
Sunshine v2025.628.4510
Self-hosted game stream host for Moonlight.
|
Definitions for the streaming protocols. More...
#include <fstream>#include <future>#include <queue>#include <boost/endian/arithmetic.hpp>#include <openssl/err.h>#include <moonlight-common-c/src/Limelight-internal.h>#include "rswrapper.h"#include "config.h"#include "display_device.h"#include "globals.h"#include "input.h"#include "logging.h"#include "network.h"#include "platform/common.h"#include "process.h"#include "stream.h"#include "sync.h"#include "system_tray.h"#include "thread_safe.h"#include "utility.h"Classes | |
| struct | stream::audio_fec_packet_t |
| struct | stream::audio_packet_t |
| struct | stream::broadcast_ctx_t |
| struct | stream::control_adaptive_triggers_t |
| struct | stream::control_encrypted_t |
| struct | stream::control_hdr_mode_t |
| struct | stream::control_header_v2 |
| struct | stream::control_rumble_t |
| struct | stream::control_rumble_triggers_t |
| class | stream::control_server_t |
| struct | stream::control_set_motion_event_t |
| struct | stream::control_set_rgb_led_t |
| struct | stream::control_terminate_t |
| struct | stream::fec::fec_t |
| struct | stream::session_t |
| struct | stream::video_packet_enc_prefix_t |
| struct | stream::video_packet_raw_t |
| struct | stream::video_short_frame_header_t |
Typedefs | |
| using | stream::audio_aes_t = std::array<char, round_to_pkcs7_padded(MAX_AUDIO_PACKET_SIZE)> |
| using | stream::av_session_id_t = std::variant<asio::ip::address, std::string> |
| typedef struct stream::control_encrypted_t * | stream::control_encrypted_p |
| using | stream::message_queue_queue_t = std::shared_ptr<safe::queue_t<std::tuple<socket_e, av_session_id_t, message_queue_t>>> |
| using | stream::message_queue_t = std::shared_ptr<safe::queue_t<std::pair<udp::endpoint, std::string>>> |
| using | stream::fec::rs_t |
Enumerations | |
| enum class | stream::socket_e : int { video , audio } |
Functions | |
| std::shared_ptr< session_t > | stream::session::alloc (config_t &config, rtsp_stream::launch_session_t &launch_session) |
| void | stream::audioBroadcastThread (udp::socket &sock) |
| void | stream::audioThread (session_t *session) |
| std::vector< uint8_t > | stream::concat_and_insert (uint64_t insert_size, uint64_t slice_size, const std::string_view &data1, const std::string_view &data2) |
| Combines two buffers and inserts new buffers at each slice boundary of the result. | |
| void | stream::controlBroadcastThread (control_server_t *server) |
| void | stream::end_broadcast (broadcast_ctx_t &ctx) |
| void | stream::session::join (session_t &session) |
| int | stream::recv_ping (session_t *session, decltype(broadcast)::ptr_t ref, socket_e type, std::string_view expected_payload, udp::endpoint &peer, std::chrono::milliseconds timeout) |
| void | stream::recvThread (broadcast_ctx_t &ctx) |
| std::vector< uint8_t > | stream::replace (const std::string_view &original, const std::string_view &old, const std::string_view &_new) |
| constexpr std::size_t | stream::round_to_pkcs7_padded (std::size_t size) |
| int | stream::send_feedback_msg (session_t *session, platf::gamepad_feedback_msg_t &msg) |
| Pass gamepad feedback data back to the client. | |
| int | stream::send_hdr_mode (session_t *session, video::hdr_info_t hdr_info) |
| int | stream::session::start (session_t &session, const std::string &addr_string) |
| int | stream::start_broadcast (broadcast_ctx_t &ctx) |
| state_e | stream::session::state (session_t &session) |
| void | stream::session::stop (session_t &session) |
| void | stream::videoBroadcastThread (udp::socket &sock) |
| void | stream::videoThread (session_t *session) |
Variables | |
| constexpr std::size_t | stream::MAX_AUDIO_PACKET_SIZE = 1400 |
| std::atomic_uint | stream::session::running_sessions |
Definitions for the streaming protocols.
| using stream::fec::rs_t |
|
strong |
| std::vector< uint8_t > stream::concat_and_insert | ( | uint64_t | insert_size, |
| uint64_t | slice_size, | ||
| const std::string_view & | data1, | ||
| const std::string_view & | data2 ) |
Combines two buffers and inserts new buffers at each slice boundary of the result.
| insert_size | The number of bytes to insert. |
| slice_size | The number of bytes between insertions. |
| data1 | The first data buffer. |
| data2 | The second data buffer. |
| int stream::send_feedback_msg | ( | session_t * | session, |
| platf::gamepad_feedback_msg_t & | msg ) |
Pass gamepad feedback data back to the client.
| session | The session object. |
| msg | The message to pass. |