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 #if FF_API_PACKING 00050 const int *packing_fmts; 00051 #endif 00052 } AVABufferSinkParams; 00053 00059 AVABufferSinkParams *av_abuffersink_params_alloc(void); 00060 00066 #define AV_BUFFERSINK_FLAG_PEEK 1 00067 00073 #define AV_BUFFERSINK_FLAG_NO_REQUEST 2 00074 00085 int av_buffersink_get_buffer_ref(AVFilterContext *buffer_sink, 00086 AVFilterBufferRef **bufref, int flags); 00087 00088 00092 int av_buffersink_poll_frame(AVFilterContext *ctx); 00093 00094 #if FF_API_OLD_VSINK_API 00095 00098 attribute_deprecated 00099 int av_vsink_buffer_get_video_buffer_ref(AVFilterContext *buffer_sink, 00100 AVFilterBufferRef **picref, int flags); 00101 #endif 00102 00115 int av_buffersink_read(AVFilterContext *sink, AVFilterBufferRef **buf); 00116 00133 int av_buffersink_read_samples(AVFilterContext *ctx, AVFilterBufferRef **buf, 00134 int nb_samples); 00135 00136 #endif /* AVFILTER_BUFFERSINK_H */