|
| ID3D11Texture2D * | get_input_texture () override |
| | Get input surface texture.
|
| |
| | nvenc_d3d11_native (ID3D11Device *d3d_device, ::nvenc::shared_dll dll) |
| |
| | nvenc_d3d11 (NV_ENC_DEVICE_TYPE device_type, ::nvenc::shared_dll dll) |
| | Initialize an NVENC session wrapper for D3D11 input textures.
|
| |
| bool | create_encoder (const ::nvenc::nvenc_config &config, const video::config_t &client_config, const video::sunshine_colorspace_t &colorspace, platf::pix_fmt_e buffer_format) override |
| | Create the encoder.
|
| |
| void | destroy_encoder () override |
| | Destroy the encoder. Derived classes classes call it in the destructor.
|
| |
| ::nvenc::nvenc_encoded_frame | encode_frame (uint64_t frame_index, bool force_idr) override |
| | Encode the next frame using platform-specific input surface.
|
| |
| bool | invalidate_ref_frames (uint64_t first_frame, uint64_t last_frame) override |
| | Perform reference frame invalidation (RFI) procedure.
|
| |
|
| nvenc_base (const nvenc_base &)=delete |
| |
| | nvenc_base (NV_ENC_DEVICE_TYPE device_type) |
| |
|
nvenc_base & | operator= (const nvenc_base &)=delete |
| |
| virtual bool | create_encoder (const nvenc_config &config, const video::config_t &client_config, const video::sunshine_colorspace_t &colorspace, platf::pix_fmt_e buffer_format)=0 |
| | Create the encoder.
|
| |
| virtual nvenc_encoded_frame | encode_frame (std::uint64_t frame_index, bool force_idr)=0 |
| | Encode the next frame using the platform-specific input surface.
|
| |
| virtual bool | invalidate_ref_frames (std::uint64_t first_frame, std::uint64_t last_frame)=0 |
| | Invalidate reference frames in the requested range.
|
| |
|
virtual | ~nvenc_encoder ()=default |
| | Destroy the SDK-neutral encoder interface.
|
| |
|
| ~nvenc_d3d11_interface () override=default |
| | Destroy the SDK-neutral Direct3D11 encoder interface.
|
| |
|
| bool | init_library () override |
| | Required. Used for loading NvEnc library and setting nvenc variable with NvEncodeAPICreateInstance(). Called during create_encoder() if nvenc variable is not initialized.
|
| |
| bool | wait_for_async_event (uint32_t timeout_ms) override |
| | Optional. Override if you want to create encoder in async mode. In this case must also set async_event_handle variable.
|
| |
| bool | nvenc_failed (NVENCSTATUS status) |
| | Check whether an NVENC API status represents failure.
|
| |
| virtual bool | synchronize_input_buffer () |
| | Optional. Override if you must perform additional operations on the registered input surface in the beginning of encode_frame(). Typically used for interop copy.
|
| |
| void * | async_event_handle = nullptr |
| |
| void * | device = nullptr |
| |
|
const NV_ENC_DEVICE_TYPE | device_type |
| | NVENC device backend used by this encoder instance.
|
| |
|
void * | encoder = nullptr |
| | Opaque NVENC encoder session handle returned by the driver.
|
| |
|
struct { | |
| |
|
NV_ENC_BUFFER_FORMAT buffer_format = NV_ENC_BUFFER_FORMAT_UNDEFINED | |
| |
|
uint32_t height = 0 | |
| |
|
uint32_t ref_frames_in_dpb = 0 | |
| |
|
bool rfi = false | |
| |
|
uint32_t width = 0 | |
| |
| } | encoder_params | |
| | Current encoder dimensions, pixel format, and reference-frame settings.
|
| |
|
std::string | last_nvenc_error_string |
| | Last NVENC error string.
|
| |
| std::shared_ptr< NV_ENCODE_API_FUNCTION_LIST > | nvenc |
| |
| NV_ENC_REGISTERED_PTR | registered_input_buffer = nullptr |
| |
Native Direct3D11 NVENC encoder.