Go to the documentation of this file.
114 if (!
s->prev_inpkt || !
s->prev_outpkt || !
s->cur_pkt)
145 if (
s->time_base.num > 0 &&
s->time_base.den > 0)
146 ctx->time_base_out =
s->time_base;
154 s->var_values[
VAR_SR] =
ctx->par_in->sample_rate;
162 int64_t new_ts, new_pts, new_dts, new_duration;
169 if (!
s->cur_pkt->data) {
180 s->var_values[
VAR_N] =
s->frame_number++;
181 s->var_values[
VAR_TS] =
s->cur_pkt->dts;
182 s->var_values[
VAR_POS] =
s->cur_pkt->pos;
183 s->var_values[
VAR_PTS] =
s->cur_pkt->pts;
184 s->var_values[
VAR_DTS] =
s->cur_pkt->dts;
200 s->var_values[
VAR_TS] =
s->cur_pkt->pts;
207 s->var_values[
VAR_TS] =
s->cur_pkt->dts;
248 s->duration_expr =
NULL;
251 #define OFFSET(x) offsetof(SetTSContext, x)
252 #define FLAGS (AV_OPT_FLAG_VIDEO_PARAM|AV_OPT_FLAG_AUDIO_PARAM|AV_OPT_FLAG_SUBTITLE_PARAM|AV_OPT_FLAG_BSF_PARAM)
void av_packet_unref(AVPacket *pkt)
Wipe the packet.
static const AVClass setts_class
Filter the word “frame” indicates either a video frame or a group of audio as stored in an AVFrame structure Format for each input and each output the list of supported formats For video that means pixel format For audio that means channel sample they are references to shared objects When the negotiation mechanism computes the intersection of the formats supported at each end of a all references to both lists are replaced with a reference to the intersection And when a single format is eventually chosen for a link amongst the remaining all references to the list are updated That means that if a filter requires that its input and output have the same format amongst a supported all it has to do is use a reference to the same list of formats query_formats can leave some formats unset and return AVERROR(EAGAIN) to cause the negotiation mechanism toagain later. That can be used by filters with complex requirements to use the format negotiated on one link to set the formats supported on another. Frame references ownership and permissions
#define AVERROR_EOF
End of file.
double var_values[VAR_VARS_NB]
int64_t duration
Duration of this packet in AVStream->time_base units, 0 if unknown.
filter_frame For filters that do not use the this method is called when a frame is pushed to the filter s input It can be called at any time except in a reentrant way If the input frame is enough to produce then the filter should push the output frames on the output link immediately As an exception to the previous rule if the input frame is enough to produce several output frames then the filter needs output only at least one per link The additional frames can be left buffered in the filter
void av_packet_free(AVPacket **pkt)
Free the packet, if the packet is reference counted, it will be unreferenced first.
The bitstream filter state.
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.
static const AVOption options[]
void av_expr_free(AVExpr *e)
Free a parsed expression previously created with av_expr_parse().
#define AV_LOG_ERROR
Something went wrong and cannot losslessly be recovered.
static double av_q2d(AVRational a)
Convert an AVRational to a double.
int(* init)(AVBSFContext *ctx)
double av_expr_eval(AVExpr *e, const double *const_values, void *opaque)
Evaluate a previously parsed expression.
static int setts_init(AVBSFContext *ctx)
#define LIBAVUTIL_VERSION_INT
Describe the class of an AVClass context structure.
static void ts_str(char buffer[60], int64_t ts, AVRational base)
Rational number (pair of numerator and denominator).
const char * av_default_item_name(void *ptr)
Return the context name.
int av_packet_ref(AVPacket *dst, const AVPacket *src)
Setup a new reference to the data described by a given packet.
void av_packet_move_ref(AVPacket *dst, AVPacket *src)
Move every field in src to dst and reset src.
AVBitStreamFilter p
The public AVBitStreamFilter.
#define AV_NOPTS_VALUE
Undefined timestamp value.
int64_t dts
Decompression timestamp in AVStream->time_base units; the time at which the packet is decompressed.
AVPacket * av_packet_alloc(void)
Allocate an AVPacket and set its fields to default values.
int64_t pts
Presentation timestamp in AVStream->time_base units; the time at which the decompressed packet will b...
static const char *const var_names[]
void * priv_data
Opaque filter-specific private data.
const FFBitStreamFilter ff_setts_bsf
const char * class_name
The name of the class; usually it is the same name as the context structure type to which the AVClass...
static void setts_close(AVBSFContext *bsf)
static int setts_filter(AVBSFContext *ctx, AVPacket *pkt)
This structure stores compressed data.
int ff_bsf_get_packet_ref(AVBSFContext *ctx, AVPacket *pkt)
Called by bitstream filters to get packet for filtering.
void * priv_data
Format private data.