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 "libavutil/internal.h"
#include "avfilter.h"
#include "formats.h"
#include "internal.h"
#include "video.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_B1, VAR_B2, VAR_S1, VAR_S2,
  VAR_T1, VAR_T2, VAR_NB, VAR_N,
  VAR_T, VAR_S, VAR_VARS_NB, VAR_FRAME_RATE,
  VAR_INTERLACED, VAR_N, VAR_NB_CONSUMED_SAMPLES, VAR_NB_SAMPLES,
  VAR_POS, VAR_PREV_INPTS, VAR_PREV_INT, VAR_PREV_OUTPTS,
  VAR_PREV_OUTT, VAR_PTS, VAR_SAMPLE_RATE, VAR_STARTPTS,
  VAR_STARTT, VAR_T, VAR_TB, VAR_VARS_NB,
  VAR_AVTB, VAR_INTB, VAR_SR, VAR_VARS_NB,
  VAR_W, VAR_H, VAR_CW, VAR_CH,
  VAR_HSUB, VAR_VSUB, VARS_NB, VAR_IN_W,
  VAR_IW, VAR_IN_H, VAR_IH, VAR_OUT_W,
  VAR_OW, VAR_OUT_H, VAR_OH, VAR_A,
  VAR_SAR, VAR_DAR, VAR_HSUB, VAR_VSUB,
  VAR_X, VAR_Y, VAR_N, VAR_POS,
  VAR_T, VAR_VARS_NB, VAR_DAR, VAR_HSUB,
  VAR_VSUB, VAR_LINE_H, VAR_LH, VAR_MAIN_H,
  VAR_h, VAR_H, VAR_MAIN_W, VAR_w,
  VAR_W, VAR_MAX_GLYPH_A, VAR_ASCENT, VAR_MAX_GLYPH_D,
  VAR_DESCENT, VAR_MAX_GLYPH_H, VAR_MAX_GLYPH_W, VAR_N,
  VAR_SAR, VAR_T, VAR_TEXT_H, VAR_TH,
  VAR_TEXT_W, VAR_TW, VAR_X, VAR_Y,
  VAR_VARS_NB, VAR_N, VAR_PTS, VAR_R,
  VAR_T, VAR_TB, VAR_NB, VAR_W,
  VAR_H, VAR_VAL, VAR_MAXVAL, VAR_MINVAL,
  VAR_NEGVAL, VAR_CLIPVAL, VAR_VARS_NB, VAR_MAIN_W,
  VAR_MW, VAR_MAIN_H, VAR_MH, VAR_OVERLAY_W,
  VAR_OW, VAR_OVERLAY_H, VAR_OH, VAR_VARS_NB,
  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_SAR,
  VAR_DAR, VAR_HSUB, VAR_VSUB, VARS_NB,
  VAR_IN_W, VAR_IW, VAR_IN_H, VAR_IH,
  VAR_OUT_W, VAR_OW, VAR_OUT_H, VAR_OH,
  VAR_A, VAR_SAR, VAR_DAR, VAR_HSUB,
  VAR_VSUB, VARS_NB, 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_SCENE, VAR_VARS_NB, VAR_X, VAR_Y,
  VAR_W, VAR_H, VAR_TIME, VAR_SPEED,
  VAR_TEMPO, VAR_ORDER, VAR_PATTERN, VAR_ROW,
  VAR_VARS_NB
}

Functions

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

Variables

static const char *const 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 232 of file vf_select.c.

#define FIFO_SIZE   8

Definition at line 116 of file vf_select.c.

Referenced by init().

#define INTERLACE_TYPE_B   2

Definition at line 160 of file vf_select.c.

Referenced by config_input(), and select_frame().

#define INTERLACE_TYPE_P   0

Definition at line 158 of file vf_select.c.

Referenced by config_input(), and select_frame().

#define INTERLACE_TYPE_T   1

Definition at line 159 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 233 of file vf_select.c.


Enumeration Type Documentation

enum var_name

Enumerator:
VAR_B1 
VAR_B2 
VAR_S1 
VAR_S2 
VAR_T1 
VAR_T2 
VAR_NB 
VAR_N 
VAR_T 
VAR_S 
VAR_VARS_NB 
VAR_FRAME_RATE 
VAR_INTERLACED 
VAR_N 
VAR_NB_CONSUMED_SAMPLES 
VAR_NB_SAMPLES 
VAR_POS 
VAR_PREV_INPTS 
VAR_PREV_INT 
VAR_PREV_OUTPTS 
VAR_PREV_OUTT 
VAR_PTS 
VAR_SAMPLE_RATE 
VAR_STARTPTS 
VAR_STARTT 
VAR_T 
VAR_TB 
VAR_VARS_NB 
VAR_AVTB 
VAR_INTB 
VAR_SR 
VAR_VARS_NB 
VAR_W 
V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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_SCENE 
VAR_VARS_NB 
VAR_X 
VAR_Y 
VAR_W 
VAR_H 
VAR_TIME 
VAR_SPEED 
VAR_TEMPO 
VAR_ORDER 
VAR_PATTERN 
VAR_ROW 
VAR_VARS_NB 

Definition at line 77 of file vf_select.c.


Function Documentation

static int config_input ( AVFilterLink inlink  )  [static]

Definition at line 162 of file vf_select.c.

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

Definition at line 310 of file vf_select.c.

static int end_frame ( AVFilterLink inlink  )  [static]

Definition at line 319 of file vf_select.c.

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

Definition at line 133 of file vf_select.c.

static int poll_frame ( AVFilterLink outlink  )  [static]

Definition at line 359 of file vf_select.c.

static int query_formats ( AVFilterContext ctx  )  [static]

Definition at line 404 of file vf_select.c.

static int request_frame ( AVFilterLink outlink  )  [static]

Definition at line 331 of file vf_select.c.

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

Definition at line 235 of file vf_select.c.

Referenced by start_frame().

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

Definition at line 284 of file vf_select.c.

static av_cold void uninit ( AVFilterContext ctx  )  [static]

Definition at line 381 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,
    .query_formats = query_formats,

    .priv_size = sizeof(SelectContext),

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

Definition at line 420 of file vf_select.c.

const char* const var_names[] [static]

Definition at line 38 of file vf_select.c.


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