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

AVCodec-specific pixel formats supported by a platform. More...

#include <src/video.h>

Inheritance diagram for video::encoder_platform_formats_avcodec:
[legend]
Collaboration diagram for video::encoder_platform_formats_avcodec:
[legend]

Public Types

using init_buffer_function_t = std::function<util::Either<avcodec_buffer_t, int>(platf::avcodec_encode_device_t *)>
 Callback that prepares an FFmpeg hardware input buffer for the encode device.
 

Public Member Functions

 encoder_platform_formats_avcodec (const AVHWDeviceType &avcodec_base_dev_type, const AVHWDeviceType &avcodec_derived_dev_type, const AVPixelFormat &avcodec_dev_pix_fmt, const AVPixelFormat &avcodec_pix_fmt_8bit, const AVPixelFormat &avcodec_pix_fmt_10bit, const AVPixelFormat &avcodec_pix_fmt_yuv444_8bit, const AVPixelFormat &avcodec_pix_fmt_yuv444_10bit, const init_buffer_function_t &init_avcodec_hardware_input_buffer_function)
 Construct AVCodec platform format mappings.
 
- Public Member Functions inherited from video::encoder_platform_formats_t

Public Attributes

AVHWDeviceType avcodec_base_dev_type
 FFmpeg device type used to create the primary hardware context.
 
AVHWDeviceType avcodec_derived_dev_type
 FFmpeg device type derived from the primary hardware context.
 
AVPixelFormat avcodec_dev_pix_fmt
 FFmpeg hardware-device pixel format for frames handed to the encoder.
 
AVPixelFormat avcodec_pix_fmt_10bit
 FFmpeg 10-bit 4:2:0 software pixel format for this encoder.
 
AVPixelFormat avcodec_pix_fmt_8bit
 FFmpeg 8-bit 4:2:0 software pixel format for this encoder.
 
AVPixelFormat avcodec_pix_fmt_yuv444_10bit
 FFmpeg 10-bit 4:4:4 software pixel format for this encoder.
 
AVPixelFormat avcodec_pix_fmt_yuv444_8bit
 FFmpeg 8-bit 4:4:4 software pixel format for this encoder.
 
init_buffer_function_t init_avcodec_hardware_input_buffer
 Backend hook that allocates or imports hardware frames for FFmpeg.
 
- Public Attributes inherited from video::encoder_platform_formats_t
platf::mem_type_e dev_type
 Platform memory type required by this encoder.
 
platf::pix_fmt_e pix_fmt_10bit
 10-bit 4:2:0 input format accepted by this encoder.
 
platf::pix_fmt_e pix_fmt_8bit
 8-bit 4:2:0 input format accepted by this encoder.
 
platf::pix_fmt_e pix_fmt_yuv444_10bit
 10-bit 4:4:4 input format accepted by this encoder.
 
platf::pix_fmt_e pix_fmt_yuv444_8bit
 8-bit 4:4:4 input format accepted by this encoder.
 

Detailed Description

AVCodec-specific pixel formats supported by a platform.

Constructor & Destructor Documentation

◆ encoder_platform_formats_avcodec()

video::encoder_platform_formats_avcodec::encoder_platform_formats_avcodec ( const AVHWDeviceType & avcodec_base_dev_type,
const AVHWDeviceType & avcodec_derived_dev_type,
const AVPixelFormat & avcodec_dev_pix_fmt,
const AVPixelFormat & avcodec_pix_fmt_8bit,
const AVPixelFormat & avcodec_pix_fmt_10bit,
const AVPixelFormat & avcodec_pix_fmt_yuv444_8bit,
const AVPixelFormat & avcodec_pix_fmt_yuv444_10bit,
const init_buffer_function_t & init_avcodec_hardware_input_buffer_function )
inline

Construct AVCodec platform format mappings.

Parameters
avcodec_base_dev_typeBase AVCodec hardware device type.
avcodec_derived_dev_typeDerived AVCodec hardware device type.
avcodec_dev_pix_fmtAVCodec device pixel format.
avcodec_pix_fmt_8bitAVCodec 8-bit pixel format.
avcodec_pix_fmt_10bitAVCodec 10-bit pixel format.
avcodec_pix_fmt_yuv444_8bitAVCodec 8-bit YUV444 pixel format.
avcodec_pix_fmt_yuv444_10bitAVCodec 10-bit YUV444 pixel format.
init_avcodec_hardware_input_buffer_functionHardware input buffer initialization callback.

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