Libav
hwcontext_internal.h
Go to the documentation of this file.
1 /*
2  * This file is part of Libav.
3  *
4  * Libav 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  * Libav 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 Libav; 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_INTERNAL_H
20 #define AVUTIL_HWCONTEXT_INTERNAL_H
21 
22 #include <stddef.h>
23 
24 #include "buffer.h"
25 #include "hwcontext.h"
26 #include "frame.h"
27 #include "pixfmt.h"
28 
29 typedef struct HWContextType {
31  const char *name;
32 
37  const enum AVPixelFormat *pix_fmts;
38 
49 
55 
66 
67  int (*device_create)(AVHWDeviceContext *ctx, const char *device,
68  AVDictionary *opts, int flags);
69 
72 
74  const void *hwconfig,
75  AVHWFramesConstraints *constraints);
76 
79 
83  enum AVPixelFormat **formats);
85  const AVFrame *src);
87  const AVFrame *src);
89 
92  void *priv;
93 };
94 
97  void *priv;
98 
100 };
101 
107 
108 #endif /* AVUTIL_HWCONTEXT_INTERNAL_H */
This struct aggregates all the (hardware/vendor-specific) "high-level" state, i.e.
Definition: hwcontext.h:54
This structure describes decoded (raw) audio or video data.
Definition: frame.h:140
void(* frames_uninit)(AVHWFramesContext *ctx)
const HWContextType ff_hwcontext_type_vdpau
static enum AVSampleFormat formats[]
Definition: avresample.c:163
const HWContextType ff_hwcontext_type_dxva2
size_t device_priv_size
size of the private data, i.e.
const HWContextType * hw_type
int(* frames_get_buffer)(AVHWFramesContext *ctx, AVFrame *frame)
AVBufferPool * pool_internal
size_t frames_priv_size
size of the private data, i.e.
enum AVHWDeviceType type
size_t device_hwctx_size
size of the public hardware-specific context, i.e.
int(* transfer_data_from)(AVHWFramesContext *ctx, AVFrame *dst, const AVFrame *src)
const HWContextType ff_hwcontext_type_qsv
static int flags
Definition: log.c:50
size_t frames_hwctx_size
size of the public frame pool hardware-specific context, i.e.
int(* device_init)(AVHWDeviceContext *ctx)
The buffer pool.
void(* device_uninit)(AVHWDeviceContext *ctx)
#define src
Definition: vp8dsp.c:254
reference-counted frame API
AVDictionary * opts
Definition: movenc.c:50
enum AVPixelFormat * pix_fmts
An array of pixel formats supported by the AVHWFramesContext instances Terminated by AV_PIX_FMT_NONE...
const char * name
int(* transfer_get_formats)(AVHWFramesContext *ctx, enum AVHWFrameTransferDirection dir, enum AVPixelFormat **formats)
size_t device_hwconfig_size
Size of the hardware-specific device configuration.
AVFormatContext * ctx
Definition: movenc.c:48
int(* transfer_data_to)(AVHWFramesContext *ctx, AVFrame *dst, const AVFrame *src)
This struct describes the constraints on hardware frames attached to a given device with a hardware-s...
Definition: hwcontext.h:374
static void(WINAPI *cond_broadcast)(pthread_cond_t *cond)
This struct describes a set or pool of "hardware" frames (i.e.
Definition: hwcontext.h:117
refcounted data buffer API
int(* device_create)(AVHWDeviceContext *ctx, const char *device, AVDictionary *opts, int flags)
const HWContextType * hw_type
const HWContextType ff_hwcontext_type_cuda
AVHWFrameTransferDirection
Definition: hwcontext.h:336
pixel format definitions
AVHWDeviceType
Definition: hwcontext.h:27
int(* frames_get_constraints)(AVHWDeviceContext *ctx, const void *hwconfig, AVHWFramesConstraints *constraints)
AVPixelFormat
Pixel format.
Definition: pixfmt.h:57
int(* frames_init)(AVHWFramesContext *ctx)
const HWContextType ff_hwcontext_type_vaapi