49 #define OFFSET(x) offsetof(Bs2bContext, x) 50 #define A AV_OPT_FLAG_AUDIO_PARAM | AV_OPT_FLAG_FILTERING_PARAM 53 {
"profile",
"Apply a pre-defined crossfeed level",
55 {
"default",
"default profile", 0,
AV_OPT_TYPE_CONST, { .i64 = BS2B_DEFAULT_CLEVEL }, 0, 0,
A,
"profile" },
56 {
"cmoy",
"Chu Moy circuit", 0,
AV_OPT_TYPE_CONST, { .i64 = BS2B_CMOY_CLEVEL }, 0, 0,
A,
"profile" },
57 {
"jmeier",
"Jan Meier circuit", 0,
AV_OPT_TYPE_CONST, { .i64 = BS2B_JMEIER_CLEVEL }, 0, 0,
A,
"profile" },
58 {
"fcut",
"Set cut frequency (in Hz)",
60 {
"feed",
"Set feed level (in Hz)",
71 if (!(bs2b->
bs2bp = bs2b_open()))
77 bs2b_set_level_fcut(bs2b->
bs2bp, bs2b->
fcut);
80 bs2b_set_level_feed(bs2b->
bs2bp, bs2b->
feed);
90 bs2b_close(bs2b->
bs2bp);
154 if (frame != out_frame)
188 if ((srate < BS2B_MINSRATE) || (srate > BS2B_MAXSRATE))
191 bs2b_set_srate(bs2b->
bs2bp, srate);
219 .priv_class = &bs2b_class,
This structure describes decoded (raw) audio or video data.
Main libavfilter public API header.
static const AVFilterPad bs2b_inputs[]
void(* filter_func)(t_bs2bdp bs2bdp, uint8_t *sample, int n)
static int filter_frame(AVFilterLink *inlink, AVFrame *frame)
#define AV_CH_LAYOUT_STEREO
const char * name
Pad name.
AVFilterLink ** inputs
array of pointers to input links
int ff_filter_frame(AVFilterLink *link, AVFrame *frame)
Send a frame of data to the next filter.
static int query_formats(AVFilterContext *ctx)
A filter pad used for either input or output.
A link between two filters.
int sample_rate
samples per second
AVFrame * ff_get_audio_buffer(AVFilterLink *link, int nb_samples)
Request an audio samples buffer with a specific set of permissions.
void av_frame_free(AVFrame **frame)
Free the frame and any dynamically allocated objects in it, e.g.
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification. ...
void * priv
private data for use by the filter
int av_frame_copy(AVFrame *dst, const AVFrame *src)
Copy the frame data from src to dst.
audio channel layout utility functions
AVFilterContext * src
source filter
static const AVFilterPad inputs[]
static const AVFilterPad outputs[]
int format
agreed upon media format
static int config_output(AVFilterLink *outlink)
A list of supported channel layouts.
AVSampleFormat
Audio sample formats.
typedef void(RENAME(mix_any_func_type))
int av_frame_is_writable(AVFrame *frame)
Check if the frame data is writable.
AVFILTER_DEFINE_CLASS(bs2b)
#define AVERROR_BUG
Internal bug, also see AVERROR_BUG2.
Describe the class of an AVClass context structure.
const char * name
Filter name.
AVFilterLink ** outputs
array of pointers to output links
enum MovChannelLayoutTag * layouts
static const AVOption bs2b_options[]
common internal and external API header
static const AVFilterPad bs2b_outputs[]
AVFilterContext * dst
dest filter
static av_cold void uninit(AVFilterContext *ctx)
static enum AVSampleFormat sample_fmts[]
uint8_t ** extended_data
pointers to the data planes/channels.
static av_cold int init(AVFilterContext *ctx)
int nb_samples
number of audio samples (per channel) described by this frame
int av_frame_copy_props(AVFrame *dst, const AVFrame *src)
Copy only "metadata" fields from src to dst.