*/
int (*filter_frame)(AVFilterLink *link, AVFrame *frame);
- /**
- * Frame poll callback. This returns the number of immediately available
- * samples. It should return a positive value if the next request_frame()
- * is guaranteed to return one frame (with no delay).
- *
- * Defaults to just calling the source poll_frame() method.
- *
- * Output pads only.
- */
- int (*poll_frame)(AVFilterLink *link);
-
/**
* Frame request callback. A call to this should result in some progress
* towards producing output over the given link. This should return zero
*/
int (*config_props)(AVFilterLink *link);
- /**
- * The filter expects a fifo to be inserted on its input link,
- * typically because it has a delay.
- *
- * input pads only.
- */
- int needs_fifo;
-
/**
* The filter expects writable frames from its input link,
* duplicating data buffers if needed.
av_warn_unused_result
int ff_parse_sample_rate(int *ret, const char *arg, void *log_ctx);
-/**
- * Parse a time base.
- *
- * @param ret unsigned AVRational pointer to where the value should be written
- * @param arg string to parse
- * @param log_ctx log context
- * @return >= 0 in case of success, a negative AVERROR code on error
- */
-av_warn_unused_result
-int ff_parse_time_base(AVRational *ret, const char *arg, void *log_ctx);
-
-/**
- * Parse a sample format name or a corresponding integer representation.
- *
- * @param ret integer pointer to where the value should be written
- * @param arg string to parse
- * @param log_ctx log context
- * @return >= 0 in case of success, a negative AVERROR code on error
- */
-av_warn_unused_result
-int ff_parse_sample_format(int *ret, const char *arg, void *log_ctx);
-
/**
* Parse a channel layout or a corresponding integer representation.
*
void ff_command_queue_pop(AVFilterContext *filter);
+#define D2TS(d) (isnan(d) ? AV_NOPTS_VALUE : (int64_t)(d))
+#define TS2D(ts) ((ts) == AV_NOPTS_VALUE ? NAN : (double)(ts))
+#define TS2T(ts, tb) ((ts) == AV_NOPTS_VALUE ? NAN : (double)(ts) * av_q2d(tb))
+
/* misc trace functions */
#define FF_TPRINTF_START(ctx, func) ff_tlog(NULL, "%-16s: ", #func)
&f->output_pads, &f->outputs, p);
}
-/**
- * Poll a frame from the filter chain.
- *
- * @param link the input link
- * @return the number of immediately available frames, a negative
- * number in case of error
- */
-int ff_poll_frame(AVFilterLink *link);
-
/**
* Request an input frame from the filter at the other end of the link.
*
*/
int ff_filter_get_nb_threads(AVFilterContext *ctx);
+/**
+ * Generic processing of user supplied commands that are set
+ * in the same way as the filter options.
+ * NOTE: 'enable' option is handled separately, and not by
+ * this function.
+ */
+int ff_filter_process_command(AVFilterContext *ctx, const char *cmd,
+ const char *arg, char *res, int res_len, int flags);
+
/**
* Perform any additional setup required for hardware frames.
*