The Filter class is the base class for all filters in the SDK.
More...
#include <Filter.hpp>
|
| Filter () |
|
| Filter (std::shared_ptr< FilterImpl > impl) |
|
virtual | ~Filter ()=default |
|
virtual void | reset () |
| ReSet the filter, freeing the internal cache, stopping the processing thread, and clearing the pending buffer frame when asynchronous processing is used.
|
|
void | enable (bool enable) |
| enable the filter
|
|
bool | isEnabled () |
| Return Enable State.
|
|
virtual std::shared_ptr< Frame > | process (std::shared_ptr< Frame > frame) |
| Processes a frame synchronously.
|
|
virtual void | pushFrame (std::shared_ptr< Frame > frame) |
| Pushes the pending frame into the cache for asynchronous processing.
|
|
virtual void | setCallBack (FilterCallback callback) |
| Set the callback function for asynchronous processing.
|
|
virtual const char * | type () |
| Get the type of filter.
|
|
template<typename T > |
bool | is () |
| Check if the runtime type of the filter object is compatible with a given type.
|
|
template<typename T > |
std::shared_ptr< T > | as () |
| Convert the filter object to a target type.
|
|
|
std::shared_ptr< FilterImpl > | impl_ |
|
std::string | type_ |
|
The Filter class is the base class for all filters in the SDK.
Definition at line 27 of file Filter.hpp.
◆ Filter() [1/2]
◆ Filter() [2/2]
ob::Filter::Filter |
( |
std::shared_ptr< FilterImpl > |
impl | ) |
|
◆ ~Filter()
virtual ob::Filter::~Filter |
( |
| ) |
|
|
virtualdefault |
◆ reset()
virtual void ob::Filter::reset |
( |
| ) |
|
|
virtual |
ReSet the filter, freeing the internal cache, stopping the processing thread, and clearing the pending buffer frame when asynchronous processing is used.
◆ enable()
void ob::Filter::enable |
( |
bool |
enable | ) |
|
◆ isEnabled()
bool ob::Filter::isEnabled |
( |
| ) |
|
◆ process()
virtual std::shared_ptr< Frame > ob::Filter::process |
( |
std::shared_ptr< Frame > |
frame | ) |
|
|
virtual |
Processes a frame synchronously.
- Parameters
-
frame | The frame to be processed. |
- Returns
- std::shared_ptr< Frame > The processed frame.
◆ pushFrame()
virtual void ob::Filter::pushFrame |
( |
std::shared_ptr< Frame > |
frame | ) |
|
|
virtual |
Pushes the pending frame into the cache for asynchronous processing.
- Parameters
-
frame | The pending frame. The processing result is returned by the callback function. |
◆ setCallBack()
Set the callback function for asynchronous processing.
- Parameters
-
callback | The processing result callback. |
◆ type()
virtual const char * ob::Filter::type |
( |
| ) |
|
|
virtual |
Get the type of filter.
- Returns
- string The type of filte.
Referenced by is().
◆ is()
Check if the runtime type of the filter object is compatible with a given type.
- Template Parameters
-
- Returns
- bool The result.
Definition at line 592 of file Filter.hpp.
◆ as()
template<typename T >
std::shared_ptr< T > ob::Filter::as |
( |
| ) |
|
|
inline |
Convert the filter object to a target type.
- Template Parameters
-
- Returns
- std::shared_ptr<T> The result. If it cannot be converted, an exception will be thrown.
Definition at line 94 of file Filter.hpp.
◆ OBFilterList
◆ impl_
std::shared_ptr<FilterImpl> ob::Filter::impl_ |
|
protected |
◆ type_
std::string ob::Filter::type_ |
|
protected |
The documentation for this class was generated from the following file:
- E:/Projects/Jenkins/workspace/OrbbecSDK/libobsensor/include/libobsensor/hpp/Filter.hpp