Loading...
Searching...
No Matches
AVD3D12VADeviceContext Struct Reference

This struct is allocated as AVHWDeviceContext.hwctx. More...

`#include <libavutil/hwcontext_d3d12va.h>`

## Data Fields

ID3D12Device * | device
| Device used for objects creation and access.
ID3D12VideoDevice * | video_device
| If unset, this will be set from the device field on init.
void(* | lock )(void *lock_ctx)
| Callbacks for locking.
void(* | unlock )(void *lock_ctx)
void * | lock_ctx
D3D12_RESOURCE_FLAGS | resource_flags
| Resource flags to be applied to D3D12 resources allocated for frames using this device context.
D3D12_HEAP_FLAGS | heap_flags
| Heap flags to be applied to D3D12 resources allocated for frames using this device context.

## Detailed Description

This struct is allocated as AVHWDeviceContext.hwctx.

Definition at line 43 of file hwcontext_d3d12va.h.

## Field Documentation

## device

ID3D12Device* AVD3D12VADeviceContext::device

Device used for objects creation and access.

This can also be used to set the libavcodec decoding device.

Can be set by the user. This is the only mandatory field - the other device context fields are set from this and are available for convenience.

Deallocating the AVHWDeviceContext will always release this interface, and it does not matter whether it was user-allocated.

Definition at line 54 of file hwcontext_d3d12va.h.

## video_device

ID3D12VideoDevice* AVD3D12VADeviceContext::video_device

If unset, this will be set from the device field on init.

Deallocating the AVHWDeviceContext will always release this interface, and it does not matter whether it was user-allocated.

Definition at line 62 of file hwcontext_d3d12va.h.

## lock

void(* AVD3D12VADeviceContext::lock) (void *lock_ctx)

Callbacks for locking.

They protect access to the internal staging texture (for av_hwframe_transfer_data() calls). They do NOT protect access to hwcontext or decoder state in general.

If unset on init, the hwcontext implementation will set them to use an internal mutex.

The underlying lock must be recursive. lock_ctx is for free use by the locking implementation.

Definition at line 75 of file hwcontext_d3d12va.h.

## unlock

void(* AVD3D12VADeviceContext::unlock) (void *lock_ctx)

Definition at line 76 of file hwcontext_d3d12va.h.

## lock_ctx

void* AVD3D12VADeviceContext::lock_ctx

Definition at line 77 of file hwcontext_d3d12va.h.

## resource_flags

D3D12_RESOURCE_FLAGS AVD3D12VADeviceContext::resource_flags

Resource flags to be applied to D3D12 resources allocated for frames using this device context.

If unset, this will be D3D12_RESOURCE_FLAG_NONE.

It applies globally to all AVD3D12VAFramesContext allocated from this device context.

Definition at line 87 of file hwcontext_d3d12va.h.

## heap_flags

D3D12_HEAP_FLAGS AVD3D12VADeviceContext::heap_flags

Heap flags to be applied to D3D12 resources allocated for frames using this device context.

If unset, this will be D3D12_HEAP_FLAG_NONE.

It applies globally to all AVD3D12VAFramesContext allocated from this device context.

Definition at line 97 of file hwcontext_d3d12va.h.

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

- libavutil/hwcontext_d3d12va.h