libavfilter/vf_select.c File Reference

filter for selecting which frame passes in the filterchain More...

#include "libavutil/eval.h"
#include "libavutil/fifo.h"
#include "avfilter.h"

Go to the source code of this file.

Data Structures

struct  SelectContext

Defines

#define FIFO_SIZE   8
#define INTERLACE_TYPE_P   0
#define INTERLACE_TYPE_T   1
#define INTERLACE_TYPE_B   2
#define D2TS(d)   (isnan(d) ? AV_NOPTS_VALUE : (int64_t)(d))
#define TS2D(ts)   ((ts) == AV_NOPTS_VALUE ? NAN : (double)(ts))

Enumerations

enum  var_name {
  VAR_E, VAR_PHI, VAR_PI, VAR_IN_W,
  VAR_IW, VAR_IN_H, VAR_IH, VAR_OUT_W,
  VAR_OW, VAR_OUT_H, VAR_OH, VAR_X,
  VAR_Y, VAR_N, VAR_POS, VAR_T,
  VAR_VARS_NB, VAR_E, VAR_PHI, VAR_PI,
  VAR_W, VAR_H, VAR_VAL, VAR_MAXVAL,
  VAR_MINVAL, VAR_NEGVAL, VAR_CLIPVAL, VAR_VARS_NB,
  VAR_E, VAR_PHI, VAR_PI, VAR_MAIN_W,
  VAR_MW, VAR_MAIN_H, VAR_MH, VAR_OVERLAY_W,
  VAR_OW, VAR_OVERLAY_H, VAR_OH, VAR_VARS_NB,
  VAR_PI, VAR_PHI, VAR_E, VAR_IN_W,
  VAR_IW, VAR_IN_H, VAR_IH, VAR_OUT_W,
  VAR_OW, VAR_OUT_H, VAR_OH, VAR_X,
  VAR_Y, VAR_A, VAR_HSUB, VAR_VSUB,
  VARS_NB, VAR_PI, VAR_PHI, VAR_E,
  VAR_IN_W, VAR_IW, VAR_IN_H, VAR_IH,
  VAR_OUT_W, VAR_OW, VAR_OUT_H, VAR_OH,
  VAR_A, VAR_HSUB, VAR_VSUB, VARS_NB,
  VAR_E, VAR_PHI, VAR_PI, VAR_TB,
  VAR_PTS, VAR_START_PTS, VAR_PREV_PTS, VAR_PREV_SELECTED_PTS,
  VAR_T, VAR_START_T, VAR_PREV_T, VAR_PREV_SELECTED_T,
  VAR_PICT_TYPE, VAR_PICT_TYPE_I, VAR_PICT_TYPE_P, VAR_PICT_TYPE_B,
  VAR_PICT_TYPE_S, VAR_PICT_TYPE_SI, VAR_PICT_TYPE_SP, VAR_PICT_TYPE_BI,
  VAR_INTERLACE_TYPE, VAR_INTERLACE_TYPE_P, VAR_INTERLACE_TYPE_T, VAR_INTERLACE_TYPE_B,
  VAR_N, VAR_SELECTED_N, VAR_PREV_SELECTED_N, VAR_KEY,
  VAR_POS, VAR_VARS_NB, VAR_E, VAR_INTERLACED,
  VAR_N, VAR_PHI, VAR_PI, VAR_POS,
  VAR_PREV_INPTS, VAR_PREV_OUTPTS, VAR_PTS, VAR_STARTPTS,
  VAR_TB, VAR_VARS_NB, VAR_E, VAR_PHI,
  VAR_PI, VAR_AVTB, VAR_INTB, VAR_VARS_NB,
  VAR_E, VAR_PHI, VAR_PI, VAR_AVTB,
  VAR_VARS_NB
}

Functions

static av_cold int init (AVFilterContext *ctx, const char *args, void *opaque)
static int config_input (AVFilterLink *inlink)
static int select_frame (AVFilterContext *ctx, AVFilterBufferRef *picref)
static void start_frame (AVFilterLink *inlink, AVFilterBufferRef *picref)
static void draw_slice (AVFilterLink *inlink, int y, int h, int slice_dir)
static void end_frame (AVFilterLink *inlink)
static int request_frame (AVFilterLink *outlink)
static int poll_frame (AVFilterLink *outlink)
static av_cold void uninit (AVFilterContext *ctx)

Variables

static const char * var_names []
AVFilter avfilter_vf_select


Detailed Description

filter for selecting which frame passes in the filterchain

Definition in file vf_select.c.


Define Documentation

#define D2TS (  )     (isnan(d) ? AV_NOPTS_VALUE : (int64_t)(d))

Definition at line 177 of file vf_select.c.

Referenced by start_frame().

#define FIFO_SIZE   8

Definition at line 112 of file vf_select.c.

Referenced by init().

#define INTERLACE_TYPE_B   2

Definition at line 143 of file vf_select.c.

Referenced by config_input(), and select_frame().

#define INTERLACE_TYPE_P   0

Definition at line 141 of file vf_select.c.

Referenced by config_input(), and select_frame().

#define INTERLACE_TYPE_T   1

Definition at line 142 of file vf_select.c.

Referenced by config_input(), and select_frame().

#define TS2D ( ts   )     ((ts) == AV_NOPTS_VALUE ? NAN : (double)(ts))

Definition at line 178 of file vf_select.c.

Referenced by select_frame(), and start_frame().


Enumeration Type Documentation

enum var_name

Enumerator:
VAR_E 
VAR_PHI 
VAR_PI 
VAR_IN_W 
VAR_IW 
VAR_IN_H 
VAR_IH 
VAR_OUT_W 
VAR_OW 
VAR_OUT_H 
VAR_OH 
VAR_X 
VAR_Y 
VAR_N 
VAR_POS 
VAR_T 
VAR_VARS_NB 
VAR_E 
VAR_PHI 
VAR_PI 
VAR_W 
VAR_H 
VAR_VAL 
VAR_MAXVAL 
VAR_MINVAL 
VAR_NEGVAL 
VAR_CLIPVAL 
VAR_VARS_NB 
VAR_E 
VAR_PHI 
VAR_PI 
VAR_MAIN_W 
VAR_MW 
VAR_MAIN_H 
VAR_MH 
VAR_OVERLAY_W 
VAR_OW 
VAR_OVERLAY_H 
VAR_OH 
VAR_VARS_NB 
VAR_PI 
VAR_PHI 
VAR_E 
VAR_IN_W 
VAR_IW 
VAR_IN_H 
VAR_IH 
VAR_OUT_W 
VAR_OW 
VAR_OUT_H 
VAR_OH 
VAR_X 
VAR_Y 
VAR_A 
VAR_HSUB 
VAR_VSUB 
VARS_NB 
VAR_PI 
VAR_PHI 
VAR_E 
VAR_IN_W 
VAR_IW 
VAR_IN_H 
VAR_IH 
VAR_OUT_W 
VAR_OW 
VAR_OUT_H 
VAR_OH 
VAR_A 
VAR_HSUB 
VAR_VSUB 
VARS_NB 
VAR_E 
VAR_PHI 
VAR_PI 
VAR_TB 
VAR_PTS 
VAR_START_PTS 
VAR_PREV_PTS 
VAR_PREV_SELECTED_PTS 
VAR_T 
VAR_START_T 
VAR_PREV_T 
VAR_PREV_SELECTED_T 
VAR_PICT_TYPE 
VAR_PICT_TYPE_I 
VAR_PICT_TYPE_P 
VAR_PICT_TYPE_B 
VAR_PICT_TYPE_S 
VAR_PICT_TYPE_SI 
VAR_PICT_TYPE_SP 
VAR_PICT_TYPE_BI 
VAR_INTERLACE_TYPE 
VAR_INTERLACE_TYPE_P 
VAR_INTERLACE_TYPE_T 
VAR_INTERLACE_TYPE_B 
VAR_N 
VAR_SELECTED_N 
VAR_PREV_SELECTED_N 
VAR_KEY 
VAR_POS 
VAR_VARS_NB 
VAR_E 
VAR_INTERLACED 
VAR_N 
VAR_PHI 
VAR_PI 
VAR_POS 
VAR_PREV_INPTS 
VAR_PREV_OUTPTS 
VAR_PTS 
VAR_STARTPTS 
VAR_TB 
VAR_VARS_NB 
VAR_E 
VAR_PHI 
VAR_PI 
VAR_AVTB 
VAR_INTB 
VAR_VARS_NB 
VAR_E 
VAR_PHI 
VAR_PI 
VAR_AVTB 
VAR_VARS_NB 

Definition at line 71 of file vf_select.c.


Function Documentation

static int config_input ( AVFilterLink inlink  )  [static]

Definition at line 145 of file vf_select.c.

static void draw_slice ( AVFilterLink inlink,
int  y,
int  h,
int  slice_dir 
) [static]

Definition at line 245 of file vf_select.c.

static void end_frame ( AVFilterLink inlink  )  [static]

Definition at line 253 of file vf_select.c.

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

Definition at line 122 of file vf_select.c.

static int poll_frame ( AVFilterLink outlink  )  [static]

Definition at line 292 of file vf_select.c.

static int request_frame ( AVFilterLink outlink  )  [static]

Definition at line 266 of file vf_select.c.

static int select_frame ( AVFilterContext ctx,
AVFilterBufferRef picref 
) [static]

Definition at line 180 of file vf_select.c.

Referenced by start_frame().

static void start_frame ( AVFilterLink inlink,
AVFilterBufferRef picref 
) [static]

Definition at line 225 of file vf_select.c.

static av_cold void uninit ( AVFilterContext ctx  )  [static]

Definition at line 314 of file vf_select.c.


Variable Documentation

Initial value:

 {
    .name      = "select",
    .description = NULL_IF_CONFIG_SMALL("Select frames to pass in output."),
    .init      = init,
    .uninit    = uninit,

    .priv_size = sizeof(SelectContext),

    .inputs    = (AVFilterPad[]) {{ .name             = "default",
                                    .type             = AVMEDIA_TYPE_VIDEO,
                                    .get_video_buffer = avfilter_null_get_video_buffer,
                                    .config_props     = config_input,
                                    .start_frame      = start_frame,
                                    .draw_slice       = draw_slice,
                                    .end_frame        = end_frame },
                                  { .name = NULL }},
    .outputs   = (AVFilterPad[]) {{ .name             = "default",
                                    .type             = AVMEDIA_TYPE_VIDEO,
                                    .poll_frame       = poll_frame,
                                    .request_frame    = request_frame, },
                                  { .name = NULL}},
}

Definition at line 330 of file vf_select.c.

const char* var_names[] [static]

Definition at line 30 of file vf_select.c.


Generated on Fri Oct 26 02:39:48 2012 for FFmpeg by  doxygen 1.5.8