|
Sunshine master
Self-hosted game stream host for Moonlight.
|
D3D11 encode device that exposes captured textures to FFmpeg AVCodec. More...
Public Member Functions | |
| void | apply_colorspace () override |
| Apply the configured colorspace metadata to the active frame. | |
| int | convert (platf::img_t &img_base) override |
| Convert a captured D3D texture for FFmpeg AVCodec encoding. | |
| int | init (std::shared_ptr< platf::display_t > display, adapter_t::pointer adapter_p, pix_fmt_e pix_fmt) |
| Initialize the D3D11 AVCodec encode device. | |
| void | init_hwframes (AVHWFramesContext *frames) override |
| Configure FFmpeg hardware frames for D3D11 encoder input textures. | |
| int | prepare_to_derive_context (int hw_device_type) override |
| Prepare the D3D device before FFmpeg derives a child hardware context. | |
| int | set_frame (AVFrame *frame, AVBufferRef *hw_frames_ctx) override |
| Attach frame resources used by the next conversion or encode operation. | |
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. | |
Public Member Functions inherited from platf::encode_device_t | |
Additional Inherited Members | |
Public Attributes inherited from platf::avcodec_encode_device_t | |
| void * | data {} |
| Backend-specific conversion state. | |
| AVFrame * | frame {} |
| FFmpeg frame currently owned by the encode device. | |
Public Attributes inherited from platf::encode_device_t | |
| video::sunshine_colorspace_t | colorspace |
| Colorspace metadata expected by the encoder. | |
D3D11 encode device that exposes captured textures to FFmpeg AVCodec.
|
inlineoverridevirtual |
Apply the configured colorspace metadata to the active frame.
Reimplemented from platf::avcodec_encode_device_t.
|
inlineoverridevirtual |
Convert a captured D3D texture for FFmpeg AVCodec encoding.
| img_base | D3D image supplied by the capture backend. |
Reimplemented from platf::avcodec_encode_device_t.
|
inline |
Initialize the D3D11 AVCodec encode device.
| display | Display object or identifier associated with the operation. |
| adapter_p | Adapter p. |
| pix_fmt | Sunshine pixel format to convert or allocate for. |
|
inlineoverridevirtual |
Configure FFmpeg hardware frames for D3D11 encoder input textures.
| frames | FFmpeg hardware frames context to initialize. |
Reimplemented from platf::avcodec_encode_device_t.
|
inlineoverridevirtual |
Prepare the D3D device before FFmpeg derives a child hardware context.
| hw_device_type | FFmpeg hardware device type requested for context derivation. |
Reimplemented from platf::avcodec_encode_device_t.
|
inlineoverridevirtual |
Attach frame resources used by the next conversion or encode operation.
| frame | Video or graphics frame being processed. |
| hw_frames_ctx | FFmpeg hardware frames context associated with the frame. |
Reimplemented from platf::avcodec_encode_device_t.