FFmpeg  4.0
Data Structures | Macros | Functions | Variables
avf_abitscope.c File Reference
#include "libavutil/avassert.h"
#include "libavutil/avstring.h"
#include "libavutil/intreadwrite.h"
#include "libavutil/opt.h"
#include "libavutil/parseutils.h"
#include "avfilter.h"
#include "formats.h"
#include "audio.h"
#include "video.h"
#include "internal.h"

Go to the source code of this file.

Data Structures

struct  AudioBitScopeContext
 

Macros

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

Functions

 AVFILTER_DEFINE_CLASS (abitscope)
 
static int query_formats (AVFilterContext *ctx)
 
static int config_input (AVFilterLink *inlink)
 
static int config_output (AVFilterLink *outlink)
 
static void count_bits (AudioBitScopeContext *s, uint32_t sample, int max)
 
static int filter_frame (AVFilterLink *inlink, AVFrame *insamples)
 

Variables

static const AVOption abitscope_options []
 
static const AVFilterPad inputs []
 
static const AVFilterPad outputs []
 
AVFilter ff_avf_abitscope
 

Macro Definition Documentation

◆ OFFSET

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

Definition at line 45 of file avf_abitscope.c.

◆ FLAGS

Definition at line 46 of file avf_abitscope.c.

Function Documentation

◆ AVFILTER_DEFINE_CLASS()

AVFILTER_DEFINE_CLASS ( abitscope  )

◆ query_formats()

static int query_formats ( AVFilterContext ctx)
static

Definition at line 59 of file avf_abitscope.c.

◆ config_input()

static int config_input ( AVFilterLink inlink)
static

Definition at line 90 of file avf_abitscope.c.

◆ config_output()

static int config_output ( AVFilterLink outlink)
static

Definition at line 129 of file avf_abitscope.c.

◆ count_bits()

static void count_bits ( AudioBitScopeContext s,
uint32_t  sample,
int  max 
)
static

Definition at line 141 of file avf_abitscope.c.

Referenced by filter_frame().

◆ filter_frame()

static int filter_frame ( AVFilterLink inlink,
AVFrame insamples 
)
static

Definition at line 151 of file avf_abitscope.c.

Variable Documentation

◆ abitscope_options

const AVOption abitscope_options[]
static
Initial value:
= {
{ "rate", "set video rate", OFFSET(frame_rate), AV_OPT_TYPE_VIDEO_RATE, {.str="25"}, 0, INT_MAX, FLAGS },
{ "r", "set video rate", OFFSET(frame_rate), AV_OPT_TYPE_VIDEO_RATE, {.str="25"}, 0, INT_MAX, FLAGS },
{ "size", "set video size", OFFSET(w), AV_OPT_TYPE_IMAGE_SIZE, {.str="1024x256"}, 0, 0, FLAGS },
{ "s", "set video size", OFFSET(w), AV_OPT_TYPE_IMAGE_SIZE, {.str="1024x256"}, 0, 0, FLAGS },
{ "colors", "set channels colors", OFFSET(colors), AV_OPT_TYPE_STRING, {.str = "red|green|blue|yellow|orange|lime|pink|magenta|brown" }, 0, 0, FLAGS },
{ NULL }
}
#define NULL
Definition: coverity.c:32
#define OFFSET(x)
Definition: avf_abitscope.c:45
#define FLAGS
Definition: avf_abitscope.c:46
uint8_t w
Definition: llviddspenc.c:38
offset must point to AVRational
Definition: opt.h:236
offset must point to two consecutive integers
Definition: opt.h:233

Definition at line 48 of file avf_abitscope.c.

◆ inputs

const AVFilterPad inputs[]
static
Initial value:
= {
{
.name = "default",
.config_props = config_input,
.filter_frame = filter_frame,
},
{ NULL }
}
static int config_input(AVFilterLink *inlink)
Definition: avf_abitscope.c:90
#define NULL
Definition: coverity.c:32
static int filter_frame(AVFilterLink *inlink, AVFrame *insamples)

Definition at line 225 of file avf_abitscope.c.

◆ outputs

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

Definition at line 235 of file avf_abitscope.c.

◆ ff_avf_abitscope

AVFilter ff_avf_abitscope
Initial value:
= {
.name = "abitscope",
.description = NULL_IF_CONFIG_SMALL("Convert input audio to audio bit scope video output."),
.query_formats = query_formats,
.priv_size = sizeof(AudioBitScopeContext),
.priv_class = &abitscope_class,
}
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification. ...
Definition: internal.h:186
static int query_formats(AVFilterContext *ctx)
Definition: avf_abitscope.c:59
static const AVFilterPad inputs[]
static const AVFilterPad outputs[]

Definition at line 244 of file avf_abitscope.c.