FFmpeg
hwcontext_d3d11va.h
Go to the documentation of this file.
1 /*
2  * This file is part of FFmpeg.
3  *
4  * FFmpeg is free software; you can redistribute it and/or
5  * modify it under the terms of the GNU Lesser General Public
6  * License as published by the Free Software Foundation; either
7  * version 2.1 of the License, or (at your option) any later version.
8  *
9  * FFmpeg is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12  * Lesser General Public License for more details.
13  *
14  * You should have received a copy of the GNU Lesser General Public
15  * License along with FFmpeg; if not, write to the Free Software
16  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
17  */
18 
19 #ifndef AVUTIL_HWCONTEXT_D3D11VA_H
20 #define AVUTIL_HWCONTEXT_D3D11VA_H
21 
39 #include <d3d11.h>
40 #include <stdint.h>
41 
45 typedef struct AVD3D11VADeviceContext {
56  ID3D11Device *device;
57 
64  ID3D11DeviceContext *device_context;
65 
72  ID3D11VideoDevice *video_device;
73 
80  ID3D11VideoContext *video_context;
81 
94  void (*lock)(void *lock_ctx);
95  void (*unlock)(void *lock_ctx);
96  void *lock_ctx;
98 
109 typedef struct AVD3D11FrameDescriptor {
117  ID3D11Texture2D *texture;
118 
125  intptr_t index;
127 
131 typedef struct AVD3D11VAFramesContext {
152  ID3D11Texture2D *texture;
153 
160  UINT BindFlags;
161 
166  UINT MiscFlags;
168 
169 #endif /* AVUTIL_HWCONTEXT_D3D11VA_H */
struct AVD3D11VAFramesContext AVD3D11VAFramesContext
This struct is allocated as AVHWFramesContext.hwctx.
ID3D11Texture2D * texture
The texture in which the frame is located.
Definition: hwcontext_d3d11va.h:117
UINT MiscFlags
D3D11_TEXTURE2D_DESC.MiscFlags used for texture creation.
Definition: hwcontext_d3d11va.h:166
UINT BindFlags
D3D11_TEXTURE2D_DESC.BindFlags used for texture creation.
Definition: hwcontext_d3d11va.h:160
ID3D11Device * device
Device used for texture creation and access.
Definition: hwcontext_d3d11va.h:56
struct AVD3D11VADeviceContext AVD3D11VADeviceContext
This struct is allocated as AVHWDeviceContext.hwctx.
D3D11 frame descriptor for pool allocation.
Definition: hwcontext_d3d11va.h:109
ID3D11VideoContext * video_context
If unset, this will be set from the device_context field on init.
Definition: hwcontext_d3d11va.h:80
ID3D11VideoDevice * video_device
If unset, this will be set from the device field on init.
Definition: hwcontext_d3d11va.h:72
intptr_t index
The index into the array texture element representing the frame, or 0 if the texture is not an array ...
Definition: hwcontext_d3d11va.h:125
struct AVD3D11FrameDescriptor AVD3D11FrameDescriptor
D3D11 frame descriptor for pool allocation.
ID3D11Texture2D * texture
The canonical texture used for pool allocation.
Definition: hwcontext_d3d11va.h:152
This struct is allocated as AVHWFramesContext.hwctx.
Definition: hwcontext_d3d11va.h:131
void(* lock)(void *lock_ctx)
Callbacks for locking.
Definition: hwcontext_d3d11va.h:94
This struct is allocated as AVHWDeviceContext.hwctx.
Definition: hwcontext_d3d11va.h:45
ID3D11DeviceContext * device_context
If unset, this will be set from the device field on init.
Definition: hwcontext_d3d11va.h:64