Sunshine latest
Self-hosted game stream host for Moonlight.
display.mm File Reference

Definitions for display capture on macOS. More...

Include dependency graph for display.mm:

Classes

struct  platf::av_display_t
 

Macros

#define AVMediaType   AVMediaType_FFmpeg
 

Functions

std::shared_ptr< display_tplatf::display (mem_type_e hwdevice_type, const std::string &display_name, const video::config_t &config)
 Get the display_t instance for the given hwdevice_type. If display_name is empty, use the first monitor that's compatible you can find If you require to use this parameter in a separate thread, make a copy of it.
 
std::vector< std::string > platf::display_names (mem_type_e hwdevice_type)
 
bool platf::needs_encoder_reenumeration ()
 Check if GPUs/drivers have changed since the last call to this function.
 

Detailed Description

Definitions for display capture on macOS.

Function Documentation

◆ display()

std::shared_ptr< display_t > platf::display ( platf::mem_type_e hwdevice_type,
const std::string & display_name,
const video::config_t & config )

Get the display_t instance for the given hwdevice_type. If display_name is empty, use the first monitor that's compatible you can find If you require to use this parameter in a separate thread, make a copy of it.

Parameters
display_nameThe name of the monitor that SHOULD be displayed
configStream configuration
Returns
The display_t instance based on hwdevice_type.

Pick a display adapter and capture method.

Parameters
hwdevice_typeenables possible use of hardware encoder

◆ needs_encoder_reenumeration()

bool platf::needs_encoder_reenumeration ( )

Check if GPUs/drivers have changed since the last call to this function.

Returns if GPUs/drivers have changed since the last call to this function.

Returns
true if a change has occurred or if it is unknown whether a change occurred.