MythTV  master
filtermanager.h
Go to the documentation of this file.
1 #ifndef FILTERMANAGER
2 #define FILTERMANAGER
3 
4 #include "filter.h"
5 #include "mythframe.h"
6 
7 // C++ headers
8 #include <map>
9 #include <vector>
10 using namespace std;
11 
12 // Qt headers
13 #include <QString>
14 
15 typedef map<QString,void*> library_map_t;
16 typedef map<QString,FilterInfo*> filter_map_t;
17 
18 #include "videoouttypes.h"
19 
21 {
22  public:
23  FilterChain() = default;
24  virtual ~FilterChain();
25 
26  void ProcessFrame(VideoFrame *Frame, FrameScanType scan = kScan_Ignore);
27 
28  void Append(VideoFilter *f) { m_filters.push_back(f); }
29 
30  private:
31  vector<VideoFilter*> m_filters;
32 };
33 
35 {
36  public:
37  FilterManager();
38  ~FilterManager();
39 
40  VideoFilter *LoadFilter(const FilterInfo *Filt, VideoFrameType inpixfmt,
41  VideoFrameType outpixfmt, int &width,
42  int &height, const char *opts,
43  int max_threads);
44 
45  FilterChain *LoadFilters(const QString& filters, VideoFrameType &inpixfmt,
46  VideoFrameType &outpixfmt, int &width,
47  int &height, int &bufsize,
48  int max_threads = 1);
49 
50  const FilterInfo *GetFilterInfo(const QString &name) const;
51 
52  private:
53  bool LoadFilterLib(const QString &path);
54 
57 };
58 
59 #endif // #ifndef FILTERMANAGER
60 
void Append(VideoFilter *f)
Definition: filtermanager.h:28
def scan(profile, smoonURL, gate)
Definition: scan.py:46
vector< VideoFilter * > m_filters
Definition: filtermanager.h:31
FrameScanType
Definition: videoouttypes.h:80
enum FrameType_ VideoFrameType
library_map_t m_dlhandles
Definition: filtermanager.h:55
filter_map_t m_filters
Definition: filtermanager.h:56
map< QString, void * > library_map_t
Definition: filtermanager.h:15
const char * name
Definition: ParseText.cpp:328
map< QString, FilterInfo * > filter_map_t
Definition: filtermanager.h:16