FFmpeg
Data Structures | Macros | Functions | Variables
vf_hwupload.c File Reference
#include "libavutil/buffer.h"
#include "libavutil/hwcontext.h"
#include "libavutil/hwcontext_internal.h"
#include "libavutil/log.h"
#include "libavutil/pixdesc.h"
#include "libavutil/opt.h"
#include "avfilter.h"
#include "filters.h"
#include "formats.h"
#include "video.h"

Go to the source code of this file.

Data Structures

struct  HWUploadContext
 

Macros

#define OFFSET(x)   offsetof(HWUploadContext, x)
 
#define FLAGS   (AV_OPT_FLAG_FILTERING_PARAM|AV_OPT_FLAG_VIDEO_PARAM)
 

Functions

static int hwupload_init (AVFilterContext *avctx)
 
static int hwupload_query_formats (const AVFilterContext *avctx, AVFilterFormatsConfig **cfg_in, AVFilterFormatsConfig **cfg_out)
 
static int hwupload_config_output (AVFilterLink *outlink)
 
static int hwupload_filter_frame (AVFilterLink *link, AVFrame *input)
 
static av_cold void hwupload_uninit (AVFilterContext *avctx)
 
 AVFILTER_DEFINE_CLASS (hwupload)
 

Variables

static const AVOption hwupload_options []
 
static const AVFilterPad hwupload_inputs []
 
static const AVFilterPad hwupload_outputs []
 
const FFFilter ff_vf_hwupload
 

Macro Definition Documentation

◆ OFFSET

#define OFFSET (   x)    offsetof(HWUploadContext, x)

Definition at line 229 of file vf_hwupload.c.

◆ FLAGS

Definition at line 230 of file vf_hwupload.c.

Function Documentation

◆ hwupload_init()

static int hwupload_init ( AVFilterContext avctx)
static

Definition at line 42 of file vf_hwupload.c.

◆ hwupload_query_formats()

static int hwupload_query_formats ( const AVFilterContext avctx,
AVFilterFormatsConfig **  cfg_in,
AVFilterFormatsConfig **  cfg_out 
)
static

Definition at line 69 of file vf_hwupload.c.

◆ hwupload_config_output()

static int hwupload_config_output ( AVFilterLink outlink)
static

Definition at line 114 of file vf_hwupload.c.

◆ hwupload_filter_frame()

static int hwupload_filter_frame ( AVFilterLink link,
AVFrame input 
)
static

Definition at line 180 of file vf_hwupload.c.

◆ hwupload_uninit()

static av_cold void hwupload_uninit ( AVFilterContext avctx)
static

Definition at line 221 of file vf_hwupload.c.

◆ AVFILTER_DEFINE_CLASS()

AVFILTER_DEFINE_CLASS ( hwupload  )

Variable Documentation

◆ hwupload_options

const AVOption hwupload_options[]
static
Initial value:
= {
{
"derive_device", "Derive a new device of this type",
OFFSET(device_type), AV_OPT_TYPE_STRING,
{ .str = NULL }, 0, 0, FLAGS
},
{
}
}

Definition at line 231 of file vf_hwupload.c.

◆ hwupload_inputs

const AVFilterPad hwupload_inputs[]
static
Initial value:
= {
{
.name = "default",
.filter_frame = hwupload_filter_frame,
},
}

Definition at line 244 of file vf_hwupload.c.

◆ hwupload_outputs

const AVFilterPad hwupload_outputs[]
static
Initial value:
= {
{
.name = "default",
.config_props = hwupload_config_output,
},
}

Definition at line 252 of file vf_hwupload.c.

◆ ff_vf_hwupload

const FFFilter ff_vf_hwupload
Initial value:
= {
.p.name = "hwupload",
.p.description = NULL_IF_CONFIG_SMALL("Upload a normal frame to a hardware frame"),
.p.priv_class = &hwupload_class,
.init = hwupload_init,
.uninit = hwupload_uninit,
.priv_size = sizeof(HWUploadContext),
.flags_internal = FF_FILTER_FLAG_HWFRAME_AWARE,
}

Definition at line 260 of file vf_hwupload.c.

HWUploadContext
Definition: vf_hwupload.c:31
hwupload_config_output
static int hwupload_config_output(AVFilterLink *outlink)
Definition: vf_hwupload.c:114
FILTER_INPUTS
#define FILTER_INPUTS(array)
Definition: filters.h:262
hwupload_query_formats
static int hwupload_query_formats(const AVFilterContext *avctx, AVFilterFormatsConfig **cfg_in, AVFilterFormatsConfig **cfg_out)
Definition: vf_hwupload.c:69
hwupload_uninit
static av_cold void hwupload_uninit(AVFilterContext *avctx)
Definition: vf_hwupload.c:221
hwupload_filter_frame
static int hwupload_filter_frame(AVFilterLink *link, AVFrame *input)
Definition: vf_hwupload.c:180
OFFSET
#define OFFSET(x)
Definition: vf_hwupload.c:229
FILTER_OUTPUTS
#define FILTER_OUTPUTS(array)
Definition: filters.h:263
NULL
#define NULL
Definition: coverity.c:32
FF_FILTER_FLAG_HWFRAME_AWARE
#define FF_FILTER_FLAG_HWFRAME_AWARE
The filter is aware of hardware frames, and any hardware frame context should not be automatically pr...
Definition: filters.h:206
NULL_IF_CONFIG_SMALL
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification.
Definition: internal.h:94
AVFILTER_FLAG_HWDEVICE
#define AVFILTER_FLAG_HWDEVICE
The filter can create hardware frames using AVFilterContext.hw_device_ctx.
Definition: avfilter.h:171
hwupload_outputs
static const AVFilterPad hwupload_outputs[]
Definition: vf_hwupload.c:252
hwupload_inputs
static const AVFilterPad hwupload_inputs[]
Definition: vf_hwupload.c:244
FILTER_QUERY_FUNC2
#define FILTER_QUERY_FUNC2(func)
Definition: filters.h:239
AVMEDIA_TYPE_VIDEO
@ AVMEDIA_TYPE_VIDEO
Definition: avutil.h:201
hwupload_init
static int hwupload_init(AVFilterContext *avctx)
Definition: vf_hwupload.c:42
FLAGS
#define FLAGS
Definition: vf_hwupload.c:230
AV_OPT_TYPE_STRING
@ AV_OPT_TYPE_STRING
Underlying C type is a uint8_t* that is either NULL or points to a C string allocated with the av_mal...
Definition: opt.h:276