X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=libavfilter%2Finternal.h;h=f3b434dbe9ebf0fa0d9878f008fa87c4654925bd;hb=a859e57424ca0a00d17bdc034c52005c18184961;hp=498bd3328d0939d692a03b460818c2345202e8b3;hpb=44085b9951b06df1cab4105dcda004213988d84f;p=ffmpeg diff --git a/libavfilter/internal.h b/libavfilter/internal.h index 498bd3328d0..f3b434dbe9e 100644 --- a/libavfilter/internal.h +++ b/libavfilter/internal.h @@ -92,17 +92,6 @@ struct AVFilterPad { */ 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 @@ -128,14 +117,6 @@ struct AVFilterPad { */ 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. @@ -190,28 +171,6 @@ int ff_parse_pixel_format(enum AVPixelFormat *ret, const char *arg, void *log_ct 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. * @@ -245,6 +204,10 @@ void ff_avfilter_link_set_out_status(AVFilterLink *link, int status, int64_t pts 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) @@ -289,15 +252,6 @@ static inline int ff_insert_outpad(AVFilterContext *f, unsigned index, &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. * @@ -411,6 +365,15 @@ static inline int ff_norm_qscale(int qscale, int type) */ 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. *