Sunshine latest
Self-hosted game stream host for Moonlight.
video::avcodec_software_encode_device_t Class Reference
Inheritance diagram for video::avcodec_software_encode_device_t:
[legend]
Collaboration diagram for video::avcodec_software_encode_device_t:
[legend]

Public Member Functions

void apply_colorspace () override
 
int convert (platf::img_t &img) override
 
int init (int in_width, int in_height, AVFrame *frame, AVPixelFormat format, bool hardware)
 
void prefill ()
 
int set_frame (AVFrame *frame, AVBufferRef *hw_frames_ctx) override
 Set the frame to be encoded.
 
- Public Member Functions inherited from platf::avcodec_encode_device_t
virtual void init_codec_options (AVCodecContext *ctx, AVDictionary **options)
 Provides a hook for allow platform-specific code to adjust codec options.
 
virtual void init_hwframes (AVHWFramesContext *frames)
 Initialize the hwframes context.
 
virtual int prepare_to_derive_context (int hw_device_type)
 Prepare to derive a context.
 

Public Attributes

avcodec_frame_t hw_frame
 
int offsetH
 
int offsetW
 
avcodec_frame_t sw_frame
 
sws_t sws
 
avcodec_frame_t sws_input_frame
 
avcodec_frame_t sws_output_frame
 
- Public Attributes inherited from platf::avcodec_encode_device_t
void * data {}
 
AVFrame * frame {}
 
- Public Attributes inherited from platf::encode_device_t
video::sunshine_colorspace_t colorspace
 

Member Function Documentation

◆ apply_colorspace()

void video::avcodec_software_encode_device_t::apply_colorspace ( )
inlineoverridevirtual

Reimplemented from platf::avcodec_encode_device_t.

◆ convert()

int video::avcodec_software_encode_device_t::convert ( platf::img_t & img)
inlineoverridevirtual

Reimplemented from platf::avcodec_encode_device_t.

◆ prefill()

void video::avcodec_software_encode_device_t::prefill ( )
inline

When preserving aspect ratio, ensure that padding is black

◆ set_frame()

int video::avcodec_software_encode_device_t::set_frame ( AVFrame * frame,
AVBufferRef * hw_frames_ctx )
inlineoverridevirtual

Set the frame to be encoded.

Note
Implementations must take ownership of 'frame'.

Reimplemented from platf::avcodec_encode_device_t.


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