FFmpeg
buffersrc.h
Go to the documentation of this file.
1 /*
2  * This file is part of FFmpeg.
3  *
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.
8  *
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.
13  *
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
17  */
18 
19 #ifndef AVFILTER_BUFFERSRC_H
20 #define AVFILTER_BUFFERSRC_H
21 
28 #include "avfilter.h"
29 
36 enum {
37 
42 
47 
54 
55 };
56 
65 
73 typedef struct AVBufferSrcParameters {
78  int format;
83 
87  int width, height;
88 
93 
101 
107 
112 
116  uint64_t channel_layout;
118 
124 
139 
153 av_warn_unused_result
154 int av_buffersrc_write_frame(AVFilterContext *ctx, const AVFrame *frame);
155 
174 av_warn_unused_result
176 
192 av_warn_unused_result
194  AVFrame *frame, int flags);
195 
203 int av_buffersrc_close(AVFilterContext *ctx, int64_t pts, unsigned flags);
204 
209 #endif /* AVFILTER_BUFFERSRC_H */
This structure describes decoded (raw) audio or video data.
Definition: frame.h:218
Main libavfilter public API header.
AVRational frame_rate
Video only, the frame rate of the input video.
Definition: buffersrc.h:100
AVRational sample_aspect_ratio
Video only, the sample (pixel) aspect ratio.
Definition: buffersrc.h:92
AVRational time_base
The timebase to be used for the timestamps on the input frames.
Definition: buffersrc.h:82
int sample_rate
Audio only, the audio sampling rate in samples per secon.
Definition: buffersrc.h:111
Do not check for format changes.
Definition: buffersrc.h:41
uint64_t channel_layout
Audio only, the audio channel layout.
Definition: buffersrc.h:116
int av_buffersrc_close(AVFilterContext *ctx, int64_t pts, unsigned flags)
Close the buffer source after EOF.
Definition: buffersrc.c:263
int format
video: the pixel format, value corresponds to enum AVPixelFormat audio: the sample format...
Definition: buffersrc.h:78
This structure contains the parameters describing the frames that will be passed to this filter...
Definition: buffersrc.h:73
struct AVBufferSrcParameters AVBufferSrcParameters
This structure contains the parameters describing the frames that will be passed to this filter...
Keep a reference to the frame.
Definition: buffersrc.h:53
AVBufferRef * hw_frames_ctx
Video with a hwaccel pixel format only.
Definition: buffersrc.h:106
Rational number (pair of numerator and denominator).
Definition: rational.h:58
unsigned av_buffersrc_get_nb_failed_requests(AVFilterContext *buffer_src)
Get the number of failed requests.
Definition: buffersrc.c:293
av_warn_unused_result int av_buffersrc_write_frame(AVFilterContext *ctx, const AVFrame *frame)
Add a frame to the buffer source.
Definition: buffersrc.c:138
A reference to a data buffer.
Definition: buffer.h:81
Immediately push the frame to the output.
Definition: buffersrc.h:46
int av_buffersrc_parameters_set(AVFilterContext *ctx, AVBufferSrcParameters *param)
Initialize the buffersrc or abuffersrc filter with the provided parameters.
Definition: buffersrc.c:93
av_warn_unused_result int av_buffersrc_add_frame_flags(AVFilterContext *buffer_src, AVFrame *frame, int flags)
Add a frame to the buffer source.
Definition: buffersrc.c:152
AVBufferSrcParameters * av_buffersrc_parameters_alloc(void)
Allocate a new AVBufferSrcParameters instance.
Definition: buffersrc.c:82
An instance of a filter.
Definition: avfilter.h:338
int width
Video only, the display dimensions of the input frames.
Definition: buffersrc.h:87
av_warn_unused_result int av_buffersrc_add_frame(AVFilterContext *ctx, AVFrame *frame)
Add a frame to the buffer source.
Definition: buffersrc.c:144