]> git.sesse.net Git - ffmpeg/blobdiff - libavfilter/internal.h
avcodec/mpegaudiodec_template: disable CRC checking for layers 1 and 2
[ffmpeg] / libavfilter / internal.h
index 498bd3328d0939d692a03b460818c2345202e8b3..6cb601f36f38129273b0e935e1dc9753a41f4aeb 100644 (file)
@@ -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
@@ -245,6 +234,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 +282,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 +395,13 @@ 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.
+ */
+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.
  *