forked from h4tr3d/avcpp
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathfiltergraph.h
75 lines (51 loc) · 2.06 KB
/
filtergraph.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
#ifndef AV_FILTERGRAPH_H
#define AV_FILTERGRAPH_H
#include <map>
#include <memory>
#include "ffmpeg.h"
#include "filtercontext.h"
#include "buffersink.h"
#include "buffersrc.h"
#include "averror.h"
namespace av {
class FilterGraph : FFWrapperPtr<AVFilterGraph>
{
friend class FilterInOut;
public:
FilterGraph();
FilterGraph(decltype(nullptr));
~FilterGraph();
FilterGraph(const FilterGraph&) = delete;
void operator=(const FilterGraph&) = delete;
// Context getters/setters
bool isValid();
//void setScaleSwsOptions(const std::string& opts);
int filtersCount() const;
void setAutoConvert(unsigned flags);
// Public API
FilterContext filter(const std::string& name, OptionalErrorCode ec = throws());
FilterContext filter(unsigned idx, OptionalErrorCode ec = throws());
FilterContext allocFilter(const Filter &filter, const std::string &name, OptionalErrorCode ec = throws());
FilterContext createFilter(const Filter &filter,
const std::string& filterName,
const std::string& filterArgs,
OptionalErrorCode ec = throws());
void parse(const std::string &graphDescription,
FilterContext &srcFilterCtx,
FilterContext &sinkFilterCtx,
OptionalErrorCode ec = throws());
void parse(const std::string &graphDescription, OptionalErrorCode ec = throws());
void config(OptionalErrorCode ec = throws());
std::string dump(bool doPrint = true, const std::string& options = std::string());
BufferSrcFilterContext bufferSrcFilter(OptionalErrorCode ec = throws());
BufferSinkFilterContext bufferSinkFilter(OptionalErrorCode ec = throws());
private:
private:
BufferSrcFilterContext m_bufferSrc;
bool m_bufferSrcSearchDone = false;
BufferSinkFilterContext m_bufferSink;
bool m_bufferSinkSearchDone = false;
bool m_configured = false;
};
} // namespace av
#endif // AV_FILTERGRAPH_H