libavfilter/af_asetnsamples.c File Reference

Filter that changes number of samples on single output operation. More...

#include "libavutil/audio_fifo.h"
#include "libavutil/audioconvert.h"
#include "libavutil/avassert.h"
#include "libavutil/opt.h"
#include "avfilter.h"
#include "audio.h"
#include "internal.h"
#include "formats.h"

Go to the source code of this file.

Data Structures

struct  ASNSContext

Defines

#define OFFSET(x)   offsetof(ASNSContext, x)
#define FLAGS   AV_OPT_FLAG_AUDIO_PARAM|AV_OPT_FLAG_FILTERING_PARAM

Functions

 AVFILTER_DEFINE_CLASS (asetnsamples)
static av_cold int init (AVFilterContext *ctx, const char *args)
static av_cold void uninit (AVFilterContext *ctx)
static int config_props_output (AVFilterLink *outlink)
static int push_samples (AVFilterLink *outlink)
static int filter_samples (AVFilterLink *inlink, AVFilterBufferRef *insamples)
static int request_frame (AVFilterLink *outlink)

Variables

static const AVOption asetnsamples_options []
AVFilter avfilter_af_asetnsamples


Detailed Description

Filter that changes number of samples on single output operation.

Definition in file af_asetnsamples.c.


Define Documentation

#define FLAGS   AV_OPT_FLAG_AUDIO_PARAM|AV_OPT_FLAG_FILTERING_PARAM

Definition at line 46 of file af_asetnsamples.c.

#define OFFSET (  )     offsetof(ASNSContext, x)

Definition at line 45 of file af_asetnsamples.c.


Function Documentation

AVFILTER_DEFINE_CLASS ( asetnsamples   ) 

static int config_props_output ( AVFilterLink outlink  )  [static]

Definition at line 81 of file af_asetnsamples.c.

static int filter_samples ( AVFilterLink inlink,
AVFilterBufferRef insamples 
) [static]

Definition at line 133 of file af_asetnsamples.c.

static av_cold int init ( AVFilterContext ctx,
const char *  args 
) [static]

Definition at line 58 of file af_asetnsamples.c.

static int push_samples ( AVFilterLink outlink  )  [static]

Definition at line 93 of file af_asetnsamples.c.

Referenced by filter_samples(), and request_frame().

static int request_frame ( AVFilterLink outlink  )  [static]

Definition at line 160 of file af_asetnsamples.c.

static av_cold void uninit ( AVFilterContext ctx  )  [static]

Definition at line 75 of file af_asetnsamples.c.


Variable Documentation

const AVOption asetnsamples_options[] [static]

Initial value:

 {
{ "pad", "pad last frame with zeros", OFFSET(pad), AV_OPT_TYPE_INT, {.i64=1}, 0, 1, FLAGS },
{ "p",   "pad last frame with zeros", OFFSET(pad), AV_OPT_TYPE_INT, {.i64=1}, 0, 1, FLAGS },
{ "nb_out_samples", "set the number of per-frame output samples", OFFSET(nb_out_samples), AV_OPT_TYPE_INT, {.i64=1024}, 1, INT_MAX, FLAGS },
{ "n",              "set the number of per-frame output samples", OFFSET(nb_out_samples), AV_OPT_TYPE_INT, {.i64=1024}, 1, INT_MAX, FLAGS },
{ NULL }
}

Definition at line 48 of file af_asetnsamples.c.

Initial value:

 {
    .name           = "asetnsamples",
    .description    = NULL_IF_CONFIG_SMALL("Set the number of samples for each output audio frames."),
    .priv_size      = sizeof(ASNSContext),
    .init           = init,
    .uninit         = uninit,

    .inputs  = (const AVFilterPad[]) {
        {
            .name           = "default",
            .type           = AVMEDIA_TYPE_AUDIO,
            .filter_samples = filter_samples,
            .min_perms      = AV_PERM_READ|AV_PERM_WRITE
        },
        { .name = NULL }
    },

    .outputs = (const AVFilterPad[]) {
        {
            .name           = "default",
            .type           = AVMEDIA_TYPE_AUDIO,
            .request_frame  = request_frame,
            .config_props   = config_props_output,
        },
        { .name = NULL }
    },
    .priv_class = &asetnsamples_class,
}

Definition at line 178 of file af_asetnsamples.c.


Generated on Fri Oct 26 02:50:09 2012 for FFmpeg by  doxygen 1.5.8