Miam-Player  0.8.0
A nice music player
hwcontext.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_H
20 #define AVUTIL_HWCONTEXT_H
21 
22 #include "buffer.h"
23 #include "frame.h"
24 #include "log.h"
25 #include "pixfmt.h"
26 
33 };
34 
36 
54 typedef struct AVHWDeviceContext {
58  const AVClass *av_class;
59 
64  AVHWDeviceInternal *internal;
65 
73 
85  void *hwctx;
86 
97  void (*free)(struct AVHWDeviceContext *ctx);
98 
102  void *user_opaque;
104 
106 
117 typedef struct AVHWFramesContext {
122 
128 
135 
143 
155  void *hwctx;
156 
163  void (*free)(struct AVHWFramesContext *ctx);
164 
168  void *user_opaque;
169 
184 
193 
203 
216 
222  int width, height;
224 
234 
244 
271  const char *device, AVDictionary *opts, int flags);
272 
283 
293 
303 int av_hwframe_get_buffer(AVBufferRef *hwframe_ctx, AVFrame *frame, int flags);
304 
326 int av_hwframe_transfer_data(AVFrame *dst, const AVFrame *src, int flags);
327 
333 
338 };
339 
357  enum AVPixelFormat **formats, int flags);
358 
359 
366 typedef struct AVHWFramesConstraints {
372 
379 
386 
394 
405 void *av_hwdevice_hwconfig_alloc(AVBufferRef *device_ctx);
406 
420  const void *hwconfig);
421 
428 
429 #endif /* AVUTIL_HWCONTEXT_H */
int min_height
Definition: hwcontext.h:385
Definition: hwcontext.h:31
Definition: hwcontext.h:30
struct AVHWFramesConstraints AVHWFramesConstraints
AVBufferRef * device_ref
Definition: hwcontext.h:134
void av_hwframe_constraints_free(AVHWFramesConstraints **constraints)
AVHWDeviceContext * device_ctx
Definition: hwcontext.h:142
enum AVPixelFormat * valid_hw_formats
Definition: hwcontext.h:371
struct AVHWFramesInternal AVHWFramesInternal
Definition: hwcontext.h:105
Definition: buffer.h:81
Definition: frame.h:184
AVBufferRef * av_hwframe_ctx_alloc(AVBufferRef *device_ctx)
int av_hwframe_transfer_data(AVFrame *dst, const AVFrame *src, int flags)
AVHWFramesConstraints * av_hwdevice_get_hwframe_constraints(AVBufferRef *ref, const void *hwconfig)
Definition: hwcontext.h:28
int av_hwframe_transfer_get_formats(AVBufferRef *hwframe_ctx, enum AVHWFrameTransferDirection dir, enum AVPixelFormat **formats, int flags)
Definition: hwcontext.h:32
void * user_opaque
Definition: hwcontext.h:102
struct AVBufferPool AVBufferPool
Definition: buffer.h:238
AVBufferRef * av_hwdevice_ctx_alloc(enum AVHWDeviceType type)
Definition: hwcontext.h:117
struct AVDictionary AVDictionary
Definition: dict.h:90
enum AVPixelFormat * valid_sw_formats
Definition: hwcontext.h:378
int av_hwframe_get_buffer(AVBufferRef *hwframe_ctx, AVFrame *frame, int flags)
AVBufferPool * pool
Definition: hwcontext.h:183
struct AVHWDeviceInternal AVHWDeviceInternal
Definition: hwcontext.h:35
Definition: hwcontext.h:332
int height
Definition: hwcontext.h:222
Definition: log.h:67
int av_hwframe_ctx_init(AVBufferRef *ref)
enum AVPixelFormat format
Definition: hwcontext.h:202
int min_width
Definition: hwcontext.h:384
int max_height
Definition: hwcontext.h:392
Definition: hwcontext.h:337
int av_hwdevice_ctx_init(AVBufferRef *ref)
Definition: hwcontext.h:29
enum AVHWDeviceType type
Definition: hwcontext.h:72
Definition: hwcontext.h:366
struct AVHWFramesContext AVHWFramesContext
struct AVHWDeviceContext AVHWDeviceContext
int initial_pool_size
Definition: hwcontext.h:192
void * user_opaque
Definition: hwcontext.h:168
void(* free)(struct AVHWDeviceContext *ctx)
Definition: hwcontext.h:97
const AVClass * av_class
Definition: hwcontext.h:58
Definition: hwcontext.h:54
int width
Definition: hwcontext.h:222
enum AVPixelFormat sw_format
Definition: hwcontext.h:215
AVHWFrameTransferDirection
Definition: hwcontext.h:328
AVHWDeviceType
Definition: hwcontext.h:27
int av_hwdevice_ctx_create(AVBufferRef **device_ctx, enum AVHWDeviceType type, const char *device, AVDictionary *opts, int flags)
const AVClass * av_class
Definition: hwcontext.h:121
void * hwctx
Definition: hwcontext.h:155
int max_width
Definition: hwcontext.h:391
void * hwctx
Definition: hwcontext.h:85
void * av_hwdevice_hwconfig_alloc(AVBufferRef *device_ctx)
AVPixelFormat
Definition: pixfmt.h:60