avf_showwaves.c File Reference

audio to video multimedia filter More...

#include "libavutil/channel_layout.h"
#include "libavutil/opt.h"
#include "libavutil/parseutils.h"
#include "avfilter.h"
#include "formats.h"
#include "audio.h"
#include "video.h"
#include "internal.h"
Include dependency graph for avf_showwaves.c:

Go to the source code of this file.

Data Structures

struct  ShowWavesContext
 

Macros

#define OFFSET(x)   offsetof(ShowWavesContext, x)
 
#define FLAGS   AV_OPT_FLAG_FILTERING_PARAM|AV_OPT_FLAG_VIDEO_PARAM
 
#define MAX_INT16   ((1<<15) -1)
 

Enumerations

enum  ShowWavesMode { MODE_POINT, MODE_LINE, MODE_NB }
 

Functions

 AVFILTER_DEFINE_CLASS (showwaves)
 
static av_cold void uninit (AVFilterContext *ctx)
 
static int query_formats (AVFilterContext *ctx)
 
static int config_output (AVFilterLink *outlink)
 
static int push_frame (AVFilterLink *outlink)
 
static int request_frame (AVFilterLink *outlink)
 
static int filter_frame (AVFilterLink *inlink, AVFrame *insamples)
 

Variables

static const AVOption showwaves_options []
 
static const AVFilterPad showwaves_inputs []
 
static const AVFilterPad showwaves_outputs []
 
AVFilter avfilter_avf_showwaves
 

Detailed Description

audio to video multimedia filter

Definition in file avf_showwaves.c.

Macro Definition Documentation

Definition at line 54 of file avf_showwaves.c.

#define MAX_INT16   ((1<<15) -1)

Definition at line 161 of file avf_showwaves.c.

Referenced by filter_frame().

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

Definition at line 53 of file avf_showwaves.c.

Enumeration Type Documentation

Enumerator
MODE_POINT 
MODE_LINE 
MODE_NB 

Definition at line 35 of file avf_showwaves.c.

Function Documentation

AVFILTER_DEFINE_CLASS ( showwaves  )
static int config_output ( AVFilterLink outlink)
static

Definition at line 111 of file avf_showwaves.c.

static int filter_frame ( AVFilterLink inlink,
AVFrame insamples 
)
static

Definition at line 163 of file avf_showwaves.c.

static int push_frame ( AVFilterLink outlink)
inlinestatic

Definition at line 133 of file avf_showwaves.c.

Referenced by filter_frame(), and request_frame().

static int query_formats ( AVFilterContext ctx)
static

Definition at line 77 of file avf_showwaves.c.

static int request_frame ( AVFilterLink outlink)
static

Definition at line 145 of file avf_showwaves.c.

static av_cold void uninit ( AVFilterContext ctx)
static

Definition at line 70 of file avf_showwaves.c.

Variable Documentation

AVFilter avfilter_avf_showwaves
Initial value:
= {
.name = "showwaves",
.description = NULL_IF_CONFIG_SMALL("Convert input audio to a video output."),
.uninit = uninit,
.query_formats = query_formats,
.priv_size = sizeof(ShowWavesContext),
.priv_class = &showwaves_class,
}
static const AVFilterPad outputs[]
Definition: af_ashowinfo.c:117
static av_cold void uninit(AVFilterContext *ctx)
Definition: avf_showwaves.c:70
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification. ...
static const AVFilterPad showwaves_outputs[]
static int query_formats(AVFilterContext *ctx)
Definition: avf_showwaves.c:77
static const AVFilterPad showwaves_inputs[]
these buffered frames must be flushed immediately if a new input produces new the filter must not call request_frame to get more It must just process the frame or queue it The task of requesting more frames is left to the filter s request_frame method or the application If a filter has several inputs

Definition at line 246 of file avf_showwaves.c.

const AVFilterPad showwaves_inputs[]
static
Initial value:
= {
{
.name = "default",
.filter_frame = filter_frame,
},
{ NULL }
}
static int filter_frame(AVFilterLink *inlink, AVFrame *insamples)
NULL
Definition: eval.c:55

Definition at line 227 of file avf_showwaves.c.

const AVOption showwaves_options[]
static
Initial value:
= {
{ "size", "set video size", OFFSET(w), AV_OPT_TYPE_IMAGE_SIZE, {.str = "600x240"}, 0, 0, FLAGS },
{ "s", "set video size", OFFSET(w), AV_OPT_TYPE_IMAGE_SIZE, {.str = "600x240"}, 0, 0, FLAGS },
{ "mode", "select display mode", OFFSET(mode), AV_OPT_TYPE_INT, {.i64=MODE_POINT}, 0, MODE_NB-1, FLAGS, "mode"},
{ "point", "draw a point for each sample", 0, AV_OPT_TYPE_CONST, {.i64=MODE_POINT}, .flags=FLAGS, .unit="mode"},
{ "line", "draw a line for each sample", 0, AV_OPT_TYPE_CONST, {.i64=MODE_LINE}, .flags=FLAGS, .unit="mode"},
{ "n", "set how many samples to show in the same point", OFFSET(n), AV_OPT_TYPE_INT, {.i64 = 0}, 0, INT_MAX, FLAGS },
{ "rate", "set video rate", OFFSET(rate), AV_OPT_TYPE_VIDEO_RATE, {.str = "25"}, 0, 0, FLAGS },
{ "r", "set video rate", OFFSET(rate), AV_OPT_TYPE_VIDEO_RATE, {.str = "25"}, 0, 0, FLAGS },
{ NULL },
}
#define OFFSET(x)
Definition: avf_showwaves.c:53
output residual component w
mode
Definition: f_perms.c:27
NULL
Definition: eval.c:55
offset must point to AVRational
Definition: opt.h:233
offset must point to two consecutive integers
Definition: opt.h:230
#define FLAGS
Definition: avf_showwaves.c:54

Definition at line 56 of file avf_showwaves.c.

const AVFilterPad showwaves_outputs[]
static
Initial value:
= {
{
.name = "default",
.config_props = config_output,
.request_frame = request_frame,
},
{ NULL }
}
NULL
Definition: eval.c:55
static int config_output(AVFilterLink *outlink)
static int request_frame(AVFilterLink *outlink)

Definition at line 236 of file avf_showwaves.c.