lavfi: add video buffer sink, and use it in avtools

Also add the public interface libavfilter/buffersink.h.

Based on a commit by Stefano Sabatini.
This commit is contained in:
Anton Khirnov
2012-04-27 06:56:56 +02:00
parent ab165047a6
commit ac71230902
10 changed files with 267 additions and 122 deletions

View File

@@ -367,21 +367,6 @@ int64_t guess_correct_pts(PtsCorrectionContext *ctx, int64_t pts, int64_t dts);
FILE *get_preset_file(char *filename, size_t filename_size,
const char *preset_name, int is_path, const char *codec_name);
typedef struct {
const enum PixelFormat *pix_fmts;
} SinkContext;
extern AVFilter sink;
/**
* Extract a frame from sink.
*
* @return a negative error in case of failure, 1 if one frame has
* been extracted successfully.
*/
int get_filtered_video_frame(AVFilterContext *sink, AVFrame *frame,
AVFilterBufferRef **picref, AVRational *pts_tb);
/**
* Do all the necessary cleanup and abort.
* This function is implemented in the avtools, not cmdutils.