122 #define D2TS(d) (isnan(d) ? AV_NOPTS_VALUE : (int64_t)(d)) 123 #define TS2D(ts) ((ts) == AV_NOPTS_VALUE ? NAN : (double)(ts)) 128 int64_t in_pts = frame->
pts;
147 "n:%"PRId64
" interlaced:%d pts:%"PRId64
" t:%f -> pts:%"PRId64
" t:%f\n",
171 #define OFFSET(x) offsetof(SetPTSContext, x) 172 #define FLAGS AV_OPT_FLAG_VIDEO_PARAM | AV_OPT_FLAG_AUDIO_PARAM 178 #if CONFIG_SETPTS_FILTER 179 static const AVClass setpts_class = {
186 static const AVFilterPad avfilter_vf_setpts_inputs[] = {
197 static const AVFilterPad avfilter_vf_setpts_outputs[] = {
212 .priv_class = &setpts_class,
214 .
inputs = avfilter_vf_setpts_inputs,
215 .
outputs = avfilter_vf_setpts_outputs,
219 #if CONFIG_ASETPTS_FILTER 220 static const AVClass asetpts_class = {
253 .priv_class = &asetpts_class,
static const char *const var_names[]
This structure describes decoded (raw) audio or video data.
static const AVFilterPad outputs[]
Main libavfilter public API header.
static int config_input(AVFilterLink *inlink)
AVFrame * ff_null_get_video_buffer(AVFilterLink *link, int w, int h)
double var_values[VAR_VARS_NB]
int av_expr_parse(AVExpr **expr, const char *s, const char *const *const_names, const char *const *func1_names, double(*const *funcs1)(void *, double), const char *const *func2_names, double(*const *funcs2)(void *, double, double), int log_offset, void *log_ctx)
Parse an expression.
av_dlog(ac->avr, "%d samples - audio_convert: %s to %s (%s)\, len, av_get_sample_fmt_name(ac->in_fmt), av_get_sample_fmt_name(ac->out_fmt), use_generic ? ac->func_descr_generic :ac->func_descr)
const char * class_name
The name of the class; usually it is the same name as the context structure type to which the AVClass...
int ff_filter_frame(AVFilterLink *link, AVFrame *frame)
Send a frame of data to the next filter.
static av_always_inline av_const int isnan(float x)
int64_t pts
Presentation timestamp in time_base units (time when frame should be shown to user).
static double av_q2d(AVRational a)
Convert rational to double.
#define AV_LOG_VERBOSE
Detailed information.
int interlaced_frame
The content of the picture is interlaced.
A link between two filters.
#define AV_LOG_ERROR
Something went wrong and cannot losslessly be recovered.
int sample_rate
samples per second
#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
AVRational time_base
Define the time base used by the PTS of the frames/samples which will pass through this link...
void av_log(void *avcl, int level, const char *fmt,...)
common internal API header
static const AVOption options[]
AVFilterContext * src
source filter
AVFrame * ff_null_get_audio_buffer(AVFilterLink *link, int nb_samples)
get_audio_buffer() handler for filters which simply pass audio along
static av_cold void uninit(AVFilterContext *ctx)
int64_t av_gettime(void)
Get the current time in microseconds.
void av_expr_free(AVExpr *e)
Free a parsed expression previously created with av_expr_parse().
Describe the class of an AVClass context structure.
static const AVFilterPad inputs[]
const char * name
Filter name.
AVFilterLink ** outputs
array of pointers to output links
enum AVMediaType type
filter media type
static int filter_frame(AVFilterLink *inlink, AVFrame *frame)
struct AVFilterPad AVFilterPad
double av_expr_eval(AVExpr *e, const double *const_values, void *opaque)
Evaluate a previously parsed expression.
AVFilterContext * dst
dest filter
int nb_samples
number of audio samples (per channel) described by this frame
static av_cold int init(AVFilterContext *ctx)
simple arithmetic expression evaluator