FFmpeg
Loading...
Searching...
No Matches
setpts.c File Reference

video presentation timestamp (PTS) modification filter More...

#include "config_components.h"
#include <inttypes.h>
#include "libavutil/eval.h"
#include "libavutil/internal.h"
#include "libavutil/mathematics.h"
#include "libavutil/opt.h"
#include "libavutil/time.h"
#include "audio.h"
#include "avfilter.h"
#include "filters.h"
#include "video.h"

Go to the source code of this file.

Data Structures

struct  SetPTSContext
 

Macros

#define V(name_)
 
#define BUF_SIZE   64
 
#define d2istr(v)
 
#define OFFSET(x)
 
#define V   AV_OPT_FLAG_VIDEO_PARAM
 
#define A   AV_OPT_FLAG_AUDIO_PARAM
 
#define R   AV_OPT_FLAG_RUNTIME_PARAM
 
#define F   AV_OPT_FLAG_FILTERING_PARAM
 

Enumerations

enum  var_name {
  VAR_FRAME_RATE , VAR_INTERLACED , VAR_N , VAR_NB_CONSUMED_SAMPLES ,
  VAR_NB_SAMPLES , 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_RTCTIME ,
  VAR_RTCSTART , VAR_S , VAR_SR , VAR_FR ,
  VAR_T_CHANGE , VAR_VARS_NB
}
 

Functions

static av_cold int init (AVFilterContext *ctx)
 
static int config_input (AVFilterLink *inlink)
 
static int config_output_video (AVFilterLink *outlink)
 
static char * double2int64str (char *buf, double v)
 
static double eval_pts (SetPTSContext *setpts, AVFilterLink *inlink, AVFrame *frame, int64_t pts)
 
static int filter_frame (AVFilterLink *inlink, AVFrame *frame)
 
static int activate (AVFilterContext *ctx)
 
static av_cold void uninit (AVFilterContext *ctx)
 
static int process_command (AVFilterContext *ctx, const char *cmd, const char *arg, char *res, int res_len, int flags)
 

Variables

static const char *const var_names []
 

Detailed Description

video presentation timestamp (PTS) modification filter

Definition in file setpts.c.

Macro Definition Documentation

◆ V [1/2]

#define V ( name_)
Value:
setpts->var_values[VAR_##name_]

Definition at line 100 of file setpts.c.

Referenced by activate(), config_input(), eval_pts(), filter_frame(), init(), and process_command().

◆ BUF_SIZE

#define BUF_SIZE   64

Definition at line 159 of file setpts.c.

Referenced by check_add_bytes_l2(), check_add_hfyu_left_pred_bgr32(), check_add_paeth_prediction(), check_append_extra_bits(), check_butterflies(), check_cavs_qpeldsp(), check_crc(), check_deblock_chroma(), check_deblock_luma(), check_decorrelate(), check_decorrelate_stereo(), check_float_to_fixed24(), check_ict_float(), check_lpc(), check_lpc33(), check_mspel_pixels(), check_pred16x16(), check_pred4x4(), check_pred8x8(), check_pred8x8l(), check_predictor(), check_rct_int(), check_reorder_pixels(), check_sao_band(), check_sao_band(), check_sao_edge(), check_sao_edge(), check_scalarproduct_and_madd_int16(), check_scalarproduct_and_madd_int32(), check_scalarproduct_fixed(), check_sub_median_pred(), check_vector_fmul(), check_vector_fmul_add(), check_vector_fmul_window(), check_vector_fmul_window_scaled(), check_wasted32(), check_wasted33(), checkasm_check_blend(), checkasm_check_bswapdsp(), checkasm_check_crc(), checkasm_check_fixed_dsp(), checkasm_check_flacdsp(), checkasm_check_fmtconvert(), checkasm_check_h264pred(), checkasm_check_h264qpel(), checkasm_check_hevc_epel(), checkasm_check_hevc_epel_bi(), checkasm_check_hevc_epel_bi_w(), checkasm_check_hevc_epel_uni(), checkasm_check_hevc_epel_uni_w(), checkasm_check_hevc_qpel(), checkasm_check_hevc_qpel_bi(), checkasm_check_hevc_qpel_bi_w(), checkasm_check_hevc_qpel_uni(), checkasm_check_hevc_qpel_uni_w(), checkasm_check_hpeldsp(), checkasm_check_pixblockdsp(), checkasm_check_qpeldsp(), checkasm_check_sad(), checkasm_check_synth_filter(), checkasm_check_vf_gblur(), double2int64str(), fsync_init(), test_abs_pow34(), test_add_squares(), test_dcmul_add(), test_decorrelate_ls(), test_decorrelate_sf(), test_decorrelate_sm(), test_decorrelate_sr(), test_fcmul_add(), test_hybrid_analysis(), test_lfe_fir_fixed(), test_lfe_fir_float(), test_lfe_x96_fixed(), test_mul_pair_single(), test_quant_bands(), test_ssd_int8_vs_int16(), test_stereo_interpolate(), vp3_check_idct(), and vp3_check_put_no_rnd_pixels_l2().

◆ d2istr

#define d2istr ( v)
Value:
double2int64str((char[BUF_SIZE]){0}, v)
#define BUF_SIZE
Definition setpts.c:159
static char * double2int64str(char *buf, double v)
Definition setpts.c:161

Definition at line 192 of file setpts.c.

Referenced by activate(), and filter_frame().

◆ OFFSET

#define OFFSET ( x)
Value:
offsetof(SetPTSContext, x)

Definition at line 307 of file setpts.c.

◆ V [2/2]

#define V   AV_OPT_FLAG_VIDEO_PARAM

Definition at line 100 of file setpts.c.

◆ A

#define A   AV_OPT_FLAG_AUDIO_PARAM

Definition at line 309 of file setpts.c.

◆ R

#define R   AV_OPT_FLAG_RUNTIME_PARAM

Definition at line 310 of file setpts.c.

◆ F

Definition at line 311 of file setpts.c.

Enumeration Type Documentation

◆ var_name

enum var_name
Enumerator
VAR_FRAME_RATE 
VAR_INTERLACED 
VAR_N 
VAR_NB_CONSUMED_SAMPLES 
VAR_NB_SAMPLES 
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_RTCTIME 
VAR_RTCSTART 
VAR_S 
VAR_SR 
VAR_FR 
VAR_T_CHANGE 
VAR_VARS_NB 

Definition at line 66 of file setpts.c.

Function Documentation

◆ init()

static av_cold int init ( AVFilterContext * ctx)
static

Definition at line 103 of file setpts.c.

◆ config_input()

static int config_input ( AVFilterLink * inlink)
static

Definition at line 126 of file setpts.c.

◆ config_output_video()

static int config_output_video ( AVFilterLink * outlink)
static

Definition at line 148 of file setpts.c.

◆ double2int64str()

static char * double2int64str ( char * buf,
double v )
inlinestatic

Definition at line 161 of file setpts.c.

◆ eval_pts()

static double eval_pts ( SetPTSContext * setpts,
AVFilterLink * inlink,
AVFrame * frame,
int64_t pts )
static

Definition at line 168 of file setpts.c.

Referenced by activate(), and filter_frame().

◆ filter_frame()

static int filter_frame ( AVFilterLink * inlink,
AVFrame * frame )
static

Definition at line 194 of file setpts.c.

Referenced by activate().

◆ activate()

static int activate ( AVFilterContext * ctx)
static

Definition at line 237 of file setpts.c.

◆ uninit()

static av_cold void uninit ( AVFilterContext * ctx)
static

Definition at line 269 of file setpts.c.

◆ process_command()

static int process_command ( AVFilterContext * ctx,
const char * cmd,
const char * arg,
char * res,
int res_len,
int flags )
static

Definition at line 276 of file setpts.c.

Variable Documentation

◆ var_names

const char* const var_names[]
static
Initial value:
= {
"FRAME_RATE",
"INTERLACED",
"N",
"NB_CONSUMED_SAMPLES",
"NB_SAMPLES",
"PREV_INPTS",
"PREV_INT",
"PREV_OUTPTS",
"PREV_OUTT",
"PTS",
"SAMPLE_RATE",
"STARTPTS",
"STARTT",
"T",
"TB",
"RTCTIME",
"RTCSTART",
"S",
"SR",
"FR",
"T_CHANGE",
}
#define NULL
Definition coverity.c:32

Definition at line 41 of file setpts.c.