00001 /* 00002 * This file is part of FFmpeg. 00003 * 00004 * FFmpeg is free software; you can redistribute it and/or 00005 * modify it under the terms of the GNU Lesser General Public 00006 * License as published by the Free Software Foundation; either 00007 * version 2.1 of the License, or (at your option) any later version. 00008 * 00009 * FFmpeg is distributed in the hope that it will be useful, 00010 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00011 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00012 * Lesser General Public License for more details. 00013 * 00014 * You should have received a copy of the GNU Lesser General Public 00015 * License along with FFmpeg; if not, write to the Free Software 00016 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 00017 */ 00018 00019 #ifndef AVFILTER_BUFFERSINK_H 00020 #define AVFILTER_BUFFERSINK_H 00021 00027 #include "avfilter.h" 00028 00032 typedef struct { 00033 const enum PixelFormat *pixel_fmts; 00034 } AVBufferSinkParams; 00035 00041 AVBufferSinkParams *av_buffersink_params_alloc(void); 00042 00046 typedef struct { 00047 const enum AVSampleFormat *sample_fmts; 00048 const int64_t *channel_layouts; 00049 } AVABufferSinkParams; 00050 00056 AVABufferSinkParams *av_abuffersink_params_alloc(void); 00057 00065 void av_buffersink_set_frame_size(AVFilterContext *ctx, unsigned frame_size); 00066 00072 #define AV_BUFFERSINK_FLAG_PEEK 1 00073 00079 #define AV_BUFFERSINK_FLAG_NO_REQUEST 2 00080 00091 int av_buffersink_get_buffer_ref(AVFilterContext *buffer_sink, 00092 AVFilterBufferRef **bufref, int flags); 00093 00094 00098 int av_buffersink_poll_frame(AVFilterContext *ctx); 00099 00103 AVRational av_buffersink_get_frame_rate(AVFilterContext *ctx); 00104 00122 int av_buffersink_read(AVFilterContext *ctx, AVFilterBufferRef **buf); 00123 00140 int av_buffersink_read_samples(AVFilterContext *ctx, AVFilterBufferRef **buf, 00141 int nb_samples); 00142 00147 #endif /* AVFILTER_BUFFERSINK_H */