FFmpeg
hwcontext_drm.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_DRM_H
20 #define AVUTIL_HWCONTEXT_DRM_H
21 
22 #include <stddef.h>
23 #include <stdint.h>
24 
35 enum {
40 };
41 
48 typedef struct AVDRMObjectDescriptor {
52  int fd;
58  size_t size;
65  uint64_t format_modifier;
67 
74 typedef struct AVDRMPlaneDescriptor {
83  ptrdiff_t offset;
87  ptrdiff_t pitch;
89 
96 typedef struct AVDRMLayerDescriptor {
100  uint32_t format;
112 
133 typedef struct AVDRMFrameDescriptor {
151 
157 typedef struct AVDRMDeviceContext {
166  int fd;
168 
169 #endif /* AVUTIL_HWCONTEXT_DRM_H */
struct AVDRMObjectDescriptor AVDRMObjectDescriptor
DRM object descriptor.
The maximum number of layers/planes in a DRM frame.
Definition: hwcontext_drm.h:39
struct AVDRMFrameDescriptor AVDRMFrameDescriptor
DRM frame descriptor.
struct AVDRMPlaneDescriptor AVDRMPlaneDescriptor
DRM plane descriptor.
int nb_objects
Number of DRM objects making up this frame.
Definition: hwcontext_drm.h:137
DRM frame descriptor.
Definition: hwcontext_drm.h:133
size_t size
Total size of the object.
Definition: hwcontext_drm.h:58
DRM plane descriptor.
Definition: hwcontext_drm.h:74
int fd
DRM PRIME fd for the object.
Definition: hwcontext_drm.h:52
int nb_layers
Number of layers in the frame.
Definition: hwcontext_drm.h:145
DRM layer descriptor.
Definition: hwcontext_drm.h:96
int object_index
Index of the object containing this plane in the objects array of the enclosing frame descriptor...
Definition: hwcontext_drm.h:79
ptrdiff_t pitch
Pitch (linesize) of this plane.
Definition: hwcontext_drm.h:87
DRM object descriptor.
Definition: hwcontext_drm.h:48
int nb_planes
Number of planes in the layer.
Definition: hwcontext_drm.h:106
struct AVDRMLayerDescriptor AVDRMLayerDescriptor
DRM layer descriptor.
uint64_t format_modifier
Format modifier applied to the object (DRM_FORMAT_MOD_*).
Definition: hwcontext_drm.h:65
struct AVDRMDeviceContext AVDRMDeviceContext
DRM device.
int fd
File descriptor of DRM device.
Definition: hwcontext_drm.h:166
uint32_t format
Format of the layer (DRM_FORMAT_*).
Definition: hwcontext_drm.h:100
ptrdiff_t offset
Offset within that object of this plane.
Definition: hwcontext_drm.h:83
DRM device.
Definition: hwcontext_drm.h:157