AVPKit
IMediaFilter.h
1 /*******************************************************************************
2  * Copyright (c) 2024, 2026, Olivier Ayache. All rights reserved.
3  *
4  * This file is part of AVPKit.
5  *
6  * AVPKit is free software: you can redistribute it and/or modify
7  * it under the terms of the GNU Lesser General Public License as published by
8  * the Free Software Foundation, either version 3 of the License, or
9  * (at your option) any later version.
10  *
11  * AVPKit is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  * GNU Lesser General Public License for more details.
15  *
16  * You should have received a copy of the GNU Lesser General Public License
17  * along with AVPKit. If not, see <http://www.gnu.org/licenses/>.
18  *******************************************************************************/
19 
20 #ifndef IMEDIAFILTER_H
21 #define IMEDIAFILTER_H
22 
23 #include <com/avpkit/core/IRational.h>
24 #include <com/avpkit/ferry/RefCounted.h>
25 
26 namespace com {
27  namespace avpkit {
28  namespace core {
29 
30  class IBufferSink;
31 
32  class VS_API_AVPKIT IMediaFilter : public com::avpkit::ferry::RefCounted {
33  public:
34 
43  virtual int setIntProperty(const char* name, int value) = 0;
44 
53  virtual int setDoubleProperty(const char* name, double value) = 0;
54 
63  virtual int setProperty(const char* name, const char* value) = 0;
64 
73  virtual int setRationalProperty(const char* name, IRational* value) = 0;
74 
80  virtual int initFilter() = 0;
81 
88  virtual int addFilter(IMediaFilter* filter) = 0;
89 
96  virtual int addSink(IBufferSink* filterSink) = 0;
97 
98  protected:
99  virtual ~IMediaFilter() = default;
100 
101  };
102 
103  }
104  }
105 }
106 
107 #endif /* IMEDIAFILTER_H */
108 
virtual int setProperty(const char *name, const char *value)=0
Sets a string parameter for this filter.
virtual int setIntProperty(const char *name, int value)=0
Sets an integer parameter for this filter.
virtual int setRationalProperty(const char *name, IRational *value)=0
Sets a rational parameter for this filter.
virtual int addSink(IBufferSink *filterSink)=0
Add a filter as an output of this filter.
virtual int setDoubleProperty(const char *name, double value)=0
Sets a double parameter for this filter.
virtual int addFilter(IMediaFilter *filter)=0
Add a filter as an output of this filter.
virtual int initFilter()=0
Initialize filter.
This class wraps represents a Rational number for the AVPKit.
Definition: IRational.h:43
Parent of all Ferry objects – it mains reference counts in native code.
Definition: RefCounted.h:85
WARNING: Do not use logging in this class, and do not set any static file variables to values other t...