World of Might and Magic  0.2.0
Open reimplementation of Might and Magic 6 7 8 game engine
hwcontext.h
См. документацию.
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_H
20 #define AVUTIL_HWCONTEXT_H
21 
22 #include "buffer.h"
23 #include "frame.h"
24 #include "log.h"
25 #include "pixfmt.h"
26 
39 };
40 
42 
60 typedef struct AVHWDeviceContext {
64  const AVClass *av_class;
65 
70  AVHWDeviceInternal *internal;
71 
79 
91  void *hwctx;
92 
104 
108  void *user_opaque;
110 
112 
123 typedef struct AVHWFramesContext {
128 
134 
141 
149 
161  void *hwctx;
162 
170 
174  void *user_opaque;
175 
190 
199 
209 
222 
228  int width, height;
230 
239 
247 
257 
266 
276 
303  const char *device, AVDictionary *opts, int flags);
304 
327  enum AVHWDeviceType type,
328  AVBufferRef *src_ctx, int flags);
329 
330 
341 
351 
361 int av_hwframe_get_buffer(AVBufferRef *hwframe_ctx, AVFrame *frame, int flags);
362 
393 
399 
404 };
405 
423  enum AVPixelFormat **formats, int flags);
424 
425 
432 typedef struct AVHWFramesConstraints {
438 
445 
452 
460 
471 void *av_hwdevice_hwconfig_alloc(AVBufferRef *device_ctx);
472 
486  const void *hwconfig);
487 
494 
495 
499 enum {
520 };
521 
558 int av_hwframe_map(AVFrame *dst, const AVFrame *src, int flags);
559 
560 
578 int av_hwframe_ctx_create_derived(AVBufferRef **derived_frame_ctx,
579  enum AVPixelFormat format,
580  AVBufferRef *derived_device_ctx,
581  AVBufferRef *source_frame_ctx,
582  int flags);
583 
584 #endif /* AVUTIL_HWCONTEXT_H */
AVPixelFormat
AVPixelFormat
Definition: pixfmt.h:64
AVHWDeviceContext::av_class
const AVClass * av_class
Definition: hwcontext.h:64
AVHWFramesContext::width
int width
Definition: hwcontext.h:228
AVHWFramesConstraints::max_width
int max_width
Definition: hwcontext.h:457
AV_HWFRAME_TRANSFER_DIRECTION_FROM
@ AV_HWFRAME_TRANSFER_DIRECTION_FROM
Definition: hwcontext.h:398
AVHWDeviceContext::type
enum AVHWDeviceType type
Definition: hwcontext.h:78
AVHWFramesContext::format
enum AVPixelFormat format
Definition: hwcontext.h:208
av_hwframe_map
int av_hwframe_map(AVFrame *dst, const AVFrame *src, int flags)
AVHWFramesConstraints
struct AVHWFramesConstraints AVHWFramesConstraints
AV_HWDEVICE_TYPE_NONE
@ AV_HWDEVICE_TYPE_NONE
Definition: hwcontext.h:28
AV_HWDEVICE_TYPE_MEDIACODEC
@ AV_HWDEVICE_TYPE_MEDIACODEC
Definition: hwcontext.h:38
AVHWDeviceContext::hwctx
void * hwctx
Definition: hwcontext.h:91
AV_HWDEVICE_TYPE_VIDEOTOOLBOX
@ AV_HWDEVICE_TYPE_VIDEOTOOLBOX
Definition: hwcontext.h:34
AVHWFramesContext
struct AVHWFramesContext AVHWFramesContext
av_hwdevice_iterate_types
enum AVHWDeviceType av_hwdevice_iterate_types(enum AVHWDeviceType prev)
AV_HWDEVICE_TYPE_CUDA
@ AV_HWDEVICE_TYPE_CUDA
Definition: hwcontext.h:30
AVHWFramesConstraints::min_height
int min_height
Definition: hwcontext.h:451
AVHWFramesConstraints::valid_hw_formats
enum AVPixelFormat * valid_hw_formats
Definition: hwcontext.h:437
AVHWFramesContext::free
void(* free)(struct AVHWFramesContext *ctx)
Definition: hwcontext.h:169
av_hwdevice_hwconfig_alloc
void * av_hwdevice_hwconfig_alloc(AVBufferRef *device_ctx)
AVHWFramesInternal
struct AVHWFramesInternal AVHWFramesInternal
Definition: hwcontext.h:111
AV_HWDEVICE_TYPE_D3D11VA
@ AV_HWDEVICE_TYPE_D3D11VA
Definition: hwcontext.h:35
AVHWFramesContext::initial_pool_size
int initial_pool_size
Definition: hwcontext.h:198
av_hwdevice_ctx_alloc
AVBufferRef * av_hwdevice_ctx_alloc(enum AVHWDeviceType type)
AVHWDeviceContext
Definition: hwcontext.h:60
AV_HWFRAME_MAP_WRITE
@ AV_HWFRAME_MAP_WRITE
Definition: hwcontext.h:507
AVHWFramesContext::height
int height
Definition: hwcontext.h:228
av_hwframe_get_buffer
int av_hwframe_get_buffer(AVBufferRef *hwframe_ctx, AVFrame *frame, int flags)
ref
GLenum GLint ref
Definition: SDL_opengl_glext.h:660
av_hwdevice_get_hwframe_constraints
AVHWFramesConstraints * av_hwdevice_get_hwframe_constraints(AVBufferRef *ref, const void *hwconfig)
AVHWFramesContext::user_opaque
void * user_opaque
Definition: hwcontext.h:174
AVHWDeviceContext::user_opaque
void * user_opaque
Definition: hwcontext.h:108
format
SDL_AudioFormat format
Definition: SDL_audio.h:194
AVHWDeviceType
AVHWDeviceType
Definition: hwcontext.h:27
AVHWFramesConstraints::min_width
int min_width
Definition: hwcontext.h:450
AVHWFramesContext::device_ref
AVBufferRef * device_ref
Definition: hwcontext.h:140
AVHWFramesConstraints::valid_sw_formats
enum AVPixelFormat * valid_sw_formats
Definition: hwcontext.h:444
av_hwdevice_ctx_create
int av_hwdevice_ctx_create(AVBufferRef **device_ctx, enum AVHWDeviceType type, const char *device, AVDictionary *opts, int flags)
AVBufferPool
struct AVBufferPool AVBufferPool
Definition: buffer.h:238
src
GLenum src
Definition: SDL_opengl_glext.h:1740
AV_HWDEVICE_TYPE_DXVA2
@ AV_HWDEVICE_TYPE_DXVA2
Definition: hwcontext.h:32
AVHWFramesContext
Definition: hwcontext.h:123
av_hwframe_ctx_alloc
AVBufferRef * av_hwframe_ctx_alloc(AVBufferRef *device_ctx)
AVHWFramesConstraints
Definition: hwcontext.h:432
AVHWFramesContext::hwctx
void * hwctx
Definition: hwcontext.h:161
type
EGLenum type
Definition: SDL_egl.h:850
AV_HWDEVICE_TYPE_OPENCL
@ AV_HWDEVICE_TYPE_OPENCL
Definition: hwcontext.h:37
ctx
EGLContext ctx
Definition: SDL_egl.h:952
av_hwframe_ctx_create_derived
int av_hwframe_ctx_create_derived(AVBufferRef **derived_frame_ctx, enum AVPixelFormat format, AVBufferRef *derived_device_ctx, AVBufferRef *source_frame_ctx, int flags)
AV_HWFRAME_MAP_DIRECT
@ AV_HWFRAME_MAP_DIRECT
Definition: hwcontext.h:519
AVHWDeviceContext
struct AVHWDeviceContext AVHWDeviceContext
dst
GLenum GLenum dst
Definition: SDL_opengl_glext.h:1740
AVBufferRef
Definition: buffer.h:81
AVClass
Definition: log.h:67
frame.h
buffer.h
AV_HWFRAME_MAP_READ
@ AV_HWFRAME_MAP_READ
Definition: hwcontext.h:503
av_hwdevice_get_type_name
const char * av_hwdevice_get_type_name(enum AVHWDeviceType type)
av_hwdevice_ctx_create_derived
int av_hwdevice_ctx_create_derived(AVBufferRef **dst_ctx, enum AVHWDeviceType type, AVBufferRef *src_ctx, int flags)
AV_HWDEVICE_TYPE_VAAPI
@ AV_HWDEVICE_TYPE_VAAPI
Definition: hwcontext.h:31
void
typedef void(SDLCALL *SDL_AudioFilter)(struct SDL_AudioCVT *cvt
av_hwframe_ctx_init
int av_hwframe_ctx_init(AVBufferRef *ref)
AVHWFramesContext::av_class
const AVClass * av_class
Definition: hwcontext.h:127
AV_HWDEVICE_TYPE_VDPAU
@ AV_HWDEVICE_TYPE_VDPAU
Definition: hwcontext.h:29
name
EGLImageKHR EGLint * name
Definition: SDL_egl.h:1497
av_hwframe_transfer_data
int av_hwframe_transfer_data(AVFrame *dst, const AVFrame *src, int flags)
av_hwdevice_find_type_by_name
enum AVHWDeviceType av_hwdevice_find_type_by_name(const char *name)
av_hwframe_constraints_free
void av_hwframe_constraints_free(AVHWFramesConstraints **constraints)
AVHWFrameTransferDirection
AVHWFrameTransferDirection
Definition: hwcontext.h:394
pixfmt.h
AVHWDeviceInternal
struct AVHWDeviceInternal AVHWDeviceInternal
Definition: hwcontext.h:41
av_hwframe_transfer_get_formats
int av_hwframe_transfer_get_formats(AVBufferRef *hwframe_ctx, enum AVHWFrameTransferDirection dir, enum AVPixelFormat **formats, int flags)
AV_HWDEVICE_TYPE_QSV
@ AV_HWDEVICE_TYPE_QSV
Definition: hwcontext.h:33
AVHWFramesContext::device_ctx
AVHWDeviceContext * device_ctx
Definition: hwcontext.h:148
flags
EGLSyncKHR EGLint flags
Definition: SDL_egl.h:898
AVDictionary
struct AVDictionary AVDictionary
Definition: dict.h:86
AVHWFramesConstraints::max_height
int max_height
Definition: hwcontext.h:458
AVHWDeviceContext::free
void(* free)(struct AVHWDeviceContext *ctx)
Definition: hwcontext.h:103
AVHWFramesContext::pool
AVBufferPool * pool
Definition: hwcontext.h:189
AV_HWFRAME_MAP_OVERWRITE
@ AV_HWFRAME_MAP_OVERWRITE
Definition: hwcontext.h:513
AVHWFramesContext::sw_format
enum AVPixelFormat sw_format
Definition: hwcontext.h:221
AVFrame
Definition: frame.h:295
av_hwdevice_ctx_init
int av_hwdevice_ctx_init(AVBufferRef *ref)
AV_HWDEVICE_TYPE_DRM
@ AV_HWDEVICE_TYPE_DRM
Definition: hwcontext.h:36
AV_HWFRAME_TRANSFER_DIRECTION_TO
@ AV_HWFRAME_TRANSFER_DIRECTION_TO
Definition: hwcontext.h:403