avcpp  2.0
Wrapper for the FFmpeg that simplify usage from C++ projects.
buffersrc.h
Go to the documentation of this file.
1 #ifndef AV_BUFFERSRC_H
2 #define AV_BUFFERSRC_H
3 
4 #include "ffmpeg.h"
5 #include "filtercontext.h"
6 #include "filter.h"
7 #include "rational.h"
8 #include "frame.h"
9 #include "averror.h"
10 
11 namespace av {
12 
14 {
15 public:
16  BufferSrcFilterContext() = default;
17  BufferSrcFilterContext(const FilterContext &ctx, OptionalErrorCode ec = throws());
18 
19  void assign(const FilterContext &ctx, OptionalErrorCode ec = throws());
21 
22  void writeVideoFrame(const VideoFrame &frame, OptionalErrorCode ec = throws());
23  void addVideoFrame(VideoFrame &frame, int flags, OptionalErrorCode ec = throws());
24  void addVideoFrame(VideoFrame &frame, OptionalErrorCode ec = throws());
25 
26  void writeAudioSamples(const AudioSamples &samples, OptionalErrorCode ec = throws());
27  void addAudioSamples(AudioSamples &samples, int flags, OptionalErrorCode ec = throws());
28  void addAudioSamples(AudioSamples &samples, OptionalErrorCode ec = throws());
29 
30  size_t failedRequestsCount();
31 
32  static FilterMediaType checkFilter(const Filter& filter);
33 
34 private:
35  void addFrame(AVFrame *frame, int flags, OptionalErrorCode ec);
36  void writeFrame(const AVFrame *frame, OptionalErrorCode ec);
37 
38 private:
39  FilterContext m_src;
41 };
42 
43 } // namespace av
44 
45 #endif // AV_BUFFERSRC_H
filter.h
rational.h
av::FilterMediaType
FilterMediaType
Definition: filter.h:15
averror.h
av::Filter
Definition: filter.h:23
ffmpeg.h
av::BufferSrcFilterContext::BufferSrcFilterContext
BufferSrcFilterContext()=default
av::BufferSrcFilterContext::addAudioSamples
void addAudioSamples(AudioSamples &samples, int flags, OptionalErrorCode ec=throws())
Definition: buffersrc.cpp:54
av::BufferSrcFilterContext::writeVideoFrame
void writeVideoFrame(const VideoFrame &frame, OptionalErrorCode ec=throws())
Definition: buffersrc.cpp:45
av::OptionalErrorCode
Definition: averror.h:63
av::FilterMediaType::Unknown
@ Unknown
filtercontext.h
av::BufferSrcFilterContext::writeAudioSamples
void writeAudioSamples(const AudioSamples &samples, OptionalErrorCode ec=throws())
Definition: buffersrc.cpp:68
frame.h
av::AudioSamples
Definition: frame.h:391
av::BufferSrcFilterContext::checkFilter
static FilterMediaType checkFilter(const Filter &filter)
Definition: buffersrc.cpp:85
av::VideoFrame
Definition: frame.h:354
av
Definition: audioresampler.cpp:8
av::BufferSrcFilterContext::addVideoFrame
void addVideoFrame(VideoFrame &frame, int flags, OptionalErrorCode ec=throws())
Definition: buffersrc.cpp:31
av::BufferSrcFilterContext::assign
void assign(const FilterContext &ctx, OptionalErrorCode ec=throws())
Definition: buffersrc.cpp:14
av::FilterContext
Definition: filtercontext.h:14
av::BufferSrcFilterContext::failedRequestsCount
size_t failedRequestsCount()
Definition: buffersrc.cpp:77
av::BufferSrcFilterContext::operator=
BufferSrcFilterContext & operator=(const FilterContext &ctx)
Definition: buffersrc.cpp:25
av::BufferSrcFilterContext
Definition: buffersrc.h:13