avcpp 3.2.1
Wrapper for the FFmpeg that simplify usage from C++ projects.
Loading...
Searching...
No Matches
filtercontext.h
Go to the documentation of this file.
1#pragma once
2
9
10#include <memory>
11
12#include "avcpp/ffmpeg.h"
13#include "avcpp/averror.h"
14#include "filter.h"
15//#include "filteropaque.h"
16//#include "filtercontext_helper.h"
17
18#if AVCPP_HAS_AVFILTER
19
20namespace av {
21
29class FilterContext : public FFWrapperPtr<AVFilterContext>
30{
31 friend class FilterGraph;
32
33public:
34 using FFWrapperPtr<AVFilterContext>::FFWrapperPtr;
35
41 FilterContext(AVFilterContext *ctx);
42 FilterContext() = default;
43
49 Filter filter() const;
55 std::string name() const;
56
62 size_t inputsCount() const;
68 size_t outputsCount() const;
69
77 void init(const std::string &args, OptionalErrorCode ec = throws());
84 void free();
85
94 void link(unsigned srcPad, FilterContext& dstFilter, unsigned dstPad, OptionalErrorCode ec = throws());
95
101 operator bool() const;
102
103protected:
104
105};
106
107} // namespace av
108
109#endif // if AVCPP_HAS_AVFILTER
Error codes, error categories and the OptionalErrorCode convention.
size_t outputsCount() const
Number of output pads.
FilterContext(AVFilterContext *ctx)
Wrap an FFmpeg filter context.
Filter filter() const
Descriptor of the filter this context instantiates.
std::string name() const
Name of this instance inside the graph.
void init(const std::string &args, OptionalErrorCode ec=throws())
Initialise the filter with its arguments.
void free()
Release the filter instance.
void link(unsigned srcPad, FilterContext &dstFilter, unsigned dstPad, OptionalErrorCode ec=throws())
Connect one of this context's outputs to an input of another.
size_t inputsCount() const
Number of input pads.
A filter descriptor: the static description of one filter.
Definition filter.h:48
Carries the caller's choice between exceptions and error codes.
Definition averror.h:96
FFmpeg types re-exported for the public API and small value wrappers.
A single filter instance and its pads.
Root namespace of the library.
Definition audioresampler.h:19