diff --git a/modules/FilterComponent.cpp b/modules/FilterComponent.cpp index 4030fa8..8340384 100644 --- a/modules/FilterComponent.cpp +++ b/modules/FilterComponent.cpp @@ -28,18 +28,18 @@ namespace plaYUVer { -FilterComponent::FilterComponent() +FilterComponentModule::FilterComponentModule() { m_pcFilteredFrame = NULL; } -Void FilterComponent::createFilter( UInt uiWidth, UInt uiHeight ) +Void FilterComponentModule::createFilter( UInt uiWidth, UInt uiHeight ) { m_pcFilteredFrame = NULL; m_pcFilteredFrame = new PlaYUVerFrame( uiWidth, uiHeight, PlaYUVerFrame::GRAY ); } -PlaYUVerFrame* FilterComponent::filterComponent( PlaYUVerFrame* InputFrame, Int Component ) +PlaYUVerFrame* FilterComponentModule::filterComponent( PlaYUVerFrame* InputFrame, Int Component ) { Pel*** pppOutputPelYUV = m_pcFilteredFrame->getPelBufferYUV(); Pel*** pppInputPelYUV = InputFrame->getPelBufferYUV(); @@ -47,7 +47,7 @@ PlaYUVerFrame* FilterComponent::filterComponent( PlaYUVerFrame* InputFrame, Int return m_pcFilteredFrame; } -Void FilterComponent::destroy() +Void FilterComponentModule::destroy() { if( m_pcFilteredFrame ) delete m_pcFilteredFrame; diff --git a/modules/FilterComponent.h b/modules/FilterComponent.h index b8182c3..cc625ed 100644 --- a/modules/FilterComponent.h +++ b/modules/FilterComponent.h @@ -30,21 +30,24 @@ namespace plaYUVer { -class FilterComponent +class FilterComponentModule: public PlaYUVerModuleIf { private: PlaYUVerFrame* m_pcFilteredFrame; public: - FilterComponent(); - virtual ~FilterComponent() + FilterComponentModule(); + virtual ~FilterComponentModule() { } + Void create( PlaYUVerFrame* ) = 0; + PlaYUVerFrame* process( PlaYUVerFrame* ) = 0; + Void destroy(); + Void createFilter( UInt uiWidth, UInt uiHeight ); PlaYUVerFrame* filterComponent( PlaYUVerFrame* InputFrame, Int Component ); - Void destroy(); }; -class FilterComponentLuma: public FilterComponent, public PlaYUVerModuleIf +class FilterComponentLuma: public FilterComponentModule { REGISTER_CLASS_FACTORY( FilterComponentLuma ) public: @@ -56,7 +59,7 @@ public: PlaYUVerFrame* process( PlaYUVerFrame* InputFrame ); }; -class FilterComponentChromaU: public FilterComponent, public PlaYUVerModuleIf +class FilterComponentChromaU: public FilterComponentModule { REGISTER_CLASS_FACTORY( FilterComponentChromaU ) public: @@ -68,7 +71,7 @@ public: PlaYUVerFrame* process( PlaYUVerFrame* InputFrame ); }; -class FilterComponentChromaV: public FilterComponent, public PlaYUVerModuleIf +class FilterComponentChromaV: public FilterComponentModule { REGISTER_CLASS_FACTORY( FilterComponentChromaV ) public: diff --git a/modules/PlaYUVerModuleIf.h b/modules/PlaYUVerModuleIf.h index ddc2722..fdf732d 100644 --- a/modules/PlaYUVerModuleIf.h +++ b/modules/PlaYUVerModuleIf.h @@ -100,7 +100,7 @@ public: virtual Double measure( PlaYUVerFrame*, PlaYUVerFrame* ) { return 0; } virtual Double measure( PlaYUVerFrame*, PlaYUVerFrame*, PlaYUVerFrame* ) { return 0; } - virtual Void destroy() { } + virtual Void destroy() = 0; };