|
avcpp 3.2.1
Wrapper for the FFmpeg that simplify usage from C++ projects.
|
Entry point of a filter graph. More...
#include <buffersrc.h>
Public Member Functions | |
| BufferSrcFilterContext (const FilterContext &ctx, OptionalErrorCode ec=throws()) | |
| Wrap a source context created by a graph. | |
| void | assign (const FilterContext &ctx, OptionalErrorCode ec=throws()) |
| Point the wrapper at another source context. | |
| BufferSrcFilterContext & | operator= (const FilterContext &ctx) |
| Assign from a filter context. | |
| void | writeVideoFrame (const VideoFrame &frame, OptionalErrorCode ec=throws()) |
| Write a video frame into the graph. | |
| void | addVideoFrame (VideoFrame &frame, int flags, OptionalErrorCode ec=throws()) |
| Push a video frame with explicit AV_BUFFERSRC_FLAG_* flags. | |
| void | addVideoFrame (VideoFrame &frame, OptionalErrorCode ec=throws()) |
| Push a video frame into the graph. | |
| void | writeAudioSamples (const AudioSamples &samples, OptionalErrorCode ec=throws()) |
| Write audio samples into the graph. | |
| void | addAudioSamples (AudioSamples &samples, int flags, OptionalErrorCode ec=throws()) |
| Push audio samples with explicit flags. | |
| void | addAudioSamples (AudioSamples &samples, OptionalErrorCode ec=throws()) |
| Push audio samples into the graph. | |
| size_t | failedRequestsCount () |
| How many pushes the graph refused. | |
Static Public Member Functions | |
| static FilterMediaType | checkFilter (const Filter &filter) |
| Media type a filter would produce as a source. | |
Wraps the "buffer" or "abuffersrc" filter: frames or samples written here enter the graph. The source is typed by the filter it wraps, and the typed write functions refuse data of the other kind.
| av::BufferSrcFilterContext::BufferSrcFilterContext | ( | const FilterContext & | ctx, |
| OptionalErrorCode | ec = throws() ) |
| ctx | the filter context to wrap |
| ec | holder for the error code; a non-source filter is reported |
| void av::BufferSrcFilterContext::addAudioSamples | ( | AudioSamples & | samples, |
| int | flags, | ||
| OptionalErrorCode | ec = throws() ) |
| samples | the samples to push |
| flags | AV_BUFFERSRC_FLAG_* bits |
| ec | holder for the error code |
| void av::BufferSrcFilterContext::addAudioSamples | ( | AudioSamples & | samples, |
| OptionalErrorCode | ec = throws() ) |
| samples | the samples to push |
| ec | holder for the error code |
| void av::BufferSrcFilterContext::addVideoFrame | ( | VideoFrame & | frame, |
| int | flags, | ||
| OptionalErrorCode | ec = throws() ) |
| frame | the frame to push |
| flags | for example AV_BUFFERSRC_FLAG_KEEP_REF to keep the frame usable after the call |
| ec | holder for the error code |
| void av::BufferSrcFilterContext::addVideoFrame | ( | VideoFrame & | frame, |
| OptionalErrorCode | ec = throws() ) |
| frame | the frame to push |
| ec | holder for the error code |
| void av::BufferSrcFilterContext::assign | ( | const FilterContext & | ctx, |
| OptionalErrorCode | ec = throws() ) |
| ctx | the filter context to wrap |
| ec | holder for the error code |
|
static |
| filter | the filter descriptor to inspect |
| size_t av::BufferSrcFilterContext::failedRequestsCount | ( | ) |
A refused push is EAGAIN: the graph wants its output drained first, which is not an error but usually means the pull loop is missing.
| BufferSrcFilterContext & av::BufferSrcFilterContext::operator= | ( | const FilterContext & | ctx | ) |
| ctx | the filter context to wrap |
| void av::BufferSrcFilterContext::writeAudioSamples | ( | const AudioSamples & | samples, |
| OptionalErrorCode | ec = throws() ) |
| samples | the samples to push |
| ec | holder for the error code |
| void av::BufferSrcFilterContext::writeVideoFrame | ( | const VideoFrame & | frame, |
| OptionalErrorCode | ec = throws() ) |
The frame is referenced, not copied, and must stay valid until the graph consumed it, which happens during the call.
| frame | the frame to push |
| ec | holder for the error code |