FFmpeg
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions | Variables
vf_hwupload_cuda.c File Reference
#include "libavutil/buffer.h"
#include "libavutil/hwcontext.h"
#include "libavutil/hwcontext_cuda.h"
#include "libavutil/log.h"
#include "libavutil/opt.h"
#include "avfilter.h"
#include "formats.h"
#include "internal.h"
#include "video.h"

Go to the source code of this file.

Data Structures

struct  CudaUploadContext
 

Macros

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

Functions

static void cudaupload_ctx_free (AVHWDeviceContext *ctx)
 
static av_cold int cudaupload_init (AVFilterContext *ctx)
 
static av_cold void cudaupload_uninit (AVFilterContext *ctx)
 
static int cudaupload_query_formats (AVFilterContext *ctx)
 
static int cudaupload_config_output (AVFilterLink *outlink)
 
static int cudaupload_filter_frame (AVFilterLink *link, AVFrame *in)
 
 AVFILTER_DEFINE_CLASS (cudaupload)
 

Variables

static const AVOption cudaupload_options []
 
static const AVFilterPad cudaupload_inputs []
 
static const AVFilterPad cudaupload_outputs []
 
AVFilter ff_vf_hwupload_cuda
 

Macro Definition Documentation

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

Definition at line 191 of file vf_hwupload_cuda.c.

Definition at line 192 of file vf_hwupload_cuda.c.

Function Documentation

static void cudaupload_ctx_free ( AVHWDeviceContext ctx)
static

Definition at line 38 of file vf_hwupload_cuda.c.

Referenced by cudaupload_init().

static av_cold int cudaupload_init ( AVFilterContext ctx)
static

Definition at line 44 of file vf_hwupload_cuda.c.

static av_cold void cudaupload_uninit ( AVFilterContext ctx)
static

Definition at line 94 of file vf_hwupload_cuda.c.

static int cudaupload_query_formats ( AVFilterContext ctx)
static

Definition at line 102 of file vf_hwupload_cuda.c.

static int cudaupload_config_output ( AVFilterLink outlink)
static

Definition at line 120 of file vf_hwupload_cuda.c.

static int cudaupload_filter_frame ( AVFilterLink link,
AVFrame in 
)
static

Definition at line 151 of file vf_hwupload_cuda.c.

AVFILTER_DEFINE_CLASS ( cudaupload  )

Variable Documentation

const AVOption cudaupload_options[]
static
Initial value:
= {
{ "device", "Number of the device to use", OFFSET(device_idx), AV_OPT_TYPE_INT, { .i64 = 0 }, .flags = FLAGS },
{ NULL },
}
#define NULL
Definition: coverity.c:32
#define FLAGS
#define OFFSET(x)

Definition at line 193 of file vf_hwupload_cuda.c.

const AVFilterPad cudaupload_inputs[]
static
Initial value:
= {
{
.name = "default",
.filter_frame = cudaupload_filter_frame,
},
{ NULL }
}
#define NULL
Definition: coverity.c:32
static int cudaupload_filter_frame(AVFilterLink *link, AVFrame *in)

Definition at line 200 of file vf_hwupload_cuda.c.

const AVFilterPad cudaupload_outputs[]
static
Initial value:
= {
{
.name = "default",
.config_props = cudaupload_config_output,
},
{ NULL }
}
#define NULL
Definition: coverity.c:32
static int cudaupload_config_output(AVFilterLink *outlink)

Definition at line 209 of file vf_hwupload_cuda.c.

AVFilter ff_vf_hwupload_cuda
Initial value:
= {
.name = "hwupload_cuda",
.description = NULL_IF_CONFIG_SMALL("Upload a system memory frame to a CUDA device."),
.init = cudaupload_init,
.uninit = cudaupload_uninit,
.query_formats = cudaupload_query_formats,
.priv_size = sizeof(CudaUploadContext),
.priv_class = &cudaupload_class,
}
static int cudaupload_query_formats(AVFilterContext *ctx)
static const AVFilterPad cudaupload_outputs[]
static av_cold int cudaupload_init(AVFilterContext *ctx)
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification. ...
Definition: internal.h:176
static const AVFilterPad cudaupload_inputs[]
static const AVFilterPad outputs[]
Definition: af_afftfilt.c:386
static av_cold void cudaupload_uninit(AVFilterContext *ctx)
static const AVFilterPad inputs[]
Definition: af_afftfilt.c:376

Definition at line 218 of file vf_hwupload_cuda.c.