2 * This file is part of FFmpeg.
4 * FFmpeg is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2.1 of the License, or (at your option) any later version.
9 * FFmpeg is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with FFmpeg; if not, write to the Free Software
16 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
19 #ifndef AVFILTER_AVCODEC_H
20 #define AVFILTER_AVCODEC_H
24 * libavcodec/libavfilter gluing utilities
26 * This should be included in an application ONLY if the installed
27 * libavfilter has been compiled with libavcodec support, otherwise
28 * symbols defined below will not be available.
31 #include "libavcodec/avcodec.h" // AVFrame
33 #include "vsrc_buffer.h"
36 * Copy the frame properties of src to dst, without copying the actual
39 int avfilter_copy_frame_props(AVFilterBufferRef *dst, const AVFrame *src);
42 * Create and return a picref reference from the data and properties
45 * @param perms permissions to assign to the new buffer reference
47 AVFilterBufferRef *avfilter_get_video_buffer_ref_from_frame(const AVFrame *frame, int perms);
50 * Fill an AVFrame with the information stored in samplesref.
52 * @param frame an already allocated AVFrame
53 * @param samplesref an audio buffer reference
54 * @return 0 in case of success, a negative AVERROR code in case of
57 int avfilter_fill_frame_from_audio_buffer_ref(AVFrame *frame,
58 const AVFilterBufferRef *samplesref);
61 * Fill an AVFrame with the information stored in picref.
63 * @param frame an already allocated AVFrame
64 * @param picref a video buffer reference
65 * @return 0 in case of success, a negative AVERROR code in case of
68 int avfilter_fill_frame_from_video_buffer_ref(AVFrame *frame,
69 const AVFilterBufferRef *picref);
72 * Fill an AVFrame with information stored in ref.
74 * @param frame an already allocated AVFrame
75 * @param ref a video or audio buffer reference
76 * @return 0 in case of success, a negative AVERROR code in case of
79 int avfilter_fill_frame_from_buffer_ref(AVFrame *frame,
80 const AVFilterBufferRef *ref);
83 * Add frame data to buffer_src.
85 * @param buffer_src pointer to a buffer source context
86 * @param flags a combination of AV_VSRC_BUF_FLAG_* flags
87 * @return >= 0 in case of success, a negative AVERROR code in case of
90 int av_vsrc_buffer_add_frame(AVFilterContext *buffer_src,
91 const AVFrame *frame, int flags);
93 #endif /* AVFILTER_AVCODEC_H */