Sunshine master
Self-hosted game stream host for Moonlight.
video::encoder_t Struct Reference

Encoder name and feature flags advertised by Sunshine. More...

#include <src/video.h>

Collaboration diagram for video::encoder_t:
[legend]

Classes

struct  codec_t
 Codec capabilities for AV1, HEVC, or H.264. More...
 
struct  option_t
 Runtime encoder option exposed to configuration parsing. More...
 

Public Types

enum  flag_e {
  PASSED , REF_FRAMES_RESTRICT , DYNAMIC_RANGE , YUV444 ,
  DYNAMIC_RANGE_YUV444 , VUI_PARAMETERS , MAX_FLAGS
}
 Capability flags that describe which stream modes an encoder supports. More...
 

Public Member Functions

const codec_tcodec_from_config (const config_t &config) const
 Select the codec descriptor requested by a stream configuration.
 

Static Public Member Functions

static std::string_view from_flag (flag_e flag)
 Convert an encoder capability flag to its diagnostic string.
 

Public Attributes

codec_t av1
 AV1 codec capability and option set.
 
uint32_t flags
 Encoder flags advertised to clients through GameStream capability responses.
 
codec_t h264
 H.264 codec capability and option set.
 
codec_t hevc
 HEVC codec capability and option set.
 
std::string_view name
 Encoder name used in logs, configuration, and capability probes.
 
const std::unique_ptr< const encoder_platform_formats_tplatform_formats
 Platform-specific memory and pixel formats accepted by the encoder.
 

Detailed Description

Encoder name and feature flags advertised by Sunshine.

Member Enumeration Documentation

◆ flag_e

Capability flags that describe which stream modes an encoder supports.

Enumerator
PASSED 

Indicates the encoder is supported.

REF_FRAMES_RESTRICT 

Set maximum reference frames.

DYNAMIC_RANGE 

HDR support.

YUV444 

YUV 4:4:4 support.

DYNAMIC_RANGE_YUV444 

YUV 4:4:4 HDR support.

VUI_PARAMETERS 

AMD encoder with VAAPI doesn't add VUI parameters to SPS.

MAX_FLAGS 

Maximum number of flags.

Member Function Documentation

◆ codec_from_config()

const codec_t & video::encoder_t::codec_from_config ( const config_t & config) const
inline

Select the codec descriptor requested by a stream configuration.

Parameters
configConfiguration values to apply.
Returns
Codec descriptor for H.264, HEVC, or AV1.

◆ from_flag()

static std::string_view video::encoder_t::from_flag ( flag_e flag)
inlinestatic

Convert an encoder capability flag to its diagnostic string.

Parameters
flagFeature flag to name.
Returns
Stable string used in logs and probe output.

The documentation for this struct was generated from the following file: