Improve Modules Interface
Now the modules are created using a factory instead of static allocated. The same module can be applied to different sequences. Pain in the ass memory free
This commit is contained in:
1 parent
bec150f705
commit
73bf370e6e
18 files changed
+432
-210
No files matched your search
@@ -32,10 +32,16 @@
|
||||
namespace plaYUVer
|
||||
{
|
||||
|
||||
#define REGISTER_CLASS_FACTORY(X) \
|
||||
public: \
|
||||
static PlaYUVerModuleIf* Create() { return new X(); } \
|
||||
void Delete() { delete this; }
|
||||
|
||||
|
||||
#define REGISTER_MODULE(X) \
|
||||
{ \
|
||||
X *pMod = new X(); \
|
||||
appendModule( pMod ); \
|
||||
X *pMod = new X(); \
|
||||
appendModule( pMod ); \
|
||||
}
|
||||
|
||||
enum // Module type
|
||||
@@ -90,6 +96,8 @@ public:
|
||||
PlaYUVerModuleIf() {}
|
||||
virtual ~PlaYUVerModuleIf() {}
|
||||
|
||||
virtual void Delete() = 0;
|
||||
|
||||
virtual Void create() {}
|
||||
virtual Void create( PlaYUVerFrame* ) {}
|
||||
|
||||
|
||||
Reference in new issue
Block a user