Finish new api for pixels and change project tree
This commit is contained in:
1 parent
3ed163a44f
commit
a8958a1e43
97 files changed
+456
-677
No files matched your search
@@ -0,0 +1,116 @@
|
||||
/* This file is a part of plaYUVer project
|
||||
* Copyright (C) 2014 by Luis Lucas (luisfrlucas@gmail.com)
|
||||
* Joao Carreira (jfmcarreira@gmail.com)
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along
|
||||
* with this program; if not, write to the Free Software Foundation, Inc.,
|
||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*/
|
||||
|
||||
/**
|
||||
* \file PlaYUVerModuleIf.h
|
||||
* \brief PlaYUVer modules interface
|
||||
*/
|
||||
|
||||
#ifndef __PLAYUVERMODULESIF_H__
|
||||
#define __PLAYUVERMODULESIF_H__
|
||||
|
||||
#include "PlaYUVerDefs.h"
|
||||
#include <iostream>
|
||||
#include <cstdio>
|
||||
#include "PlaYUVerFrame.h"
|
||||
#include "PlaYUVerStream.h"
|
||||
|
||||
namespace plaYUVer
|
||||
{
|
||||
|
||||
#define REGISTER_MODULE(X) \
|
||||
{ \
|
||||
X *pMod = new X(); \
|
||||
appendModule( pMod ); \
|
||||
}
|
||||
|
||||
enum // Module type
|
||||
{
|
||||
FRAME_PROCESSING_MODULE,
|
||||
FRAME_MEASUREMENT_MODULE,
|
||||
};
|
||||
|
||||
#define APPLY_WHILE_PLAYING true
|
||||
#define MAX_NUMBER_FRAMES 3
|
||||
|
||||
enum // Number of frames
|
||||
{
|
||||
MODULE_REQUIRES_ONE_FRAME = 1,
|
||||
MODULE_REQUIRES_TWO_FRAMES = 2,
|
||||
MODULE_REQUIRES_THREE_FRAMES = 3,
|
||||
};
|
||||
|
||||
enum // Requirements
|
||||
{
|
||||
MODULE_REQUIRES_NOTHING = 0,
|
||||
MODULE_REQUIRES_NEW_WINDOW = 2,
|
||||
MODULE_REQUIRES_SIDEBAR = 4,
|
||||
MODULES_REQUIREMENTS_TOTAL,
|
||||
};
|
||||
|
||||
typedef struct
|
||||
{
|
||||
Int m_iModuleType;
|
||||
const Char* m_pchModuleCategory;
|
||||
const Char* m_pchModuleName;
|
||||
const Char* m_pchModuleTooltip;
|
||||
UInt m_uiNumberOfFrames;
|
||||
UInt m_uiModuleRequirements;
|
||||
Bool m_bApplyWhilePlaying;
|
||||
} PlaYUVerModuleDefinition;
|
||||
|
||||
class PlaYUVerModuleIf
|
||||
{
|
||||
public:
|
||||
|
||||
Int m_iModuleType;
|
||||
const Char* m_pchModuleCategory;
|
||||
const Char* m_pchModuleName;
|
||||
const Char* m_pchModuleTooltip;
|
||||
UInt m_uiNumberOfFrames;
|
||||
UInt m_uiModuleRequirements;
|
||||
Bool m_bApplyWhilePlaying;
|
||||
|
||||
PlaYUVerModuleDefinition m_cModuleDef;
|
||||
|
||||
PlaYUVerModuleIf() {}
|
||||
virtual ~PlaYUVerModuleIf() {}
|
||||
|
||||
virtual Void create() {}
|
||||
virtual Void create( PlaYUVerFrame* ) {}
|
||||
|
||||
virtual PlaYUVerFrame* process( PlaYUVerFrame* ) { return NULL; }
|
||||
virtual PlaYUVerFrame* process( PlaYUVerFrame*, PlaYUVerFrame* ) { return NULL; }
|
||||
virtual PlaYUVerFrame* process( PlaYUVerFrame*, PlaYUVerFrame*, PlaYUVerFrame* ) { return NULL; }
|
||||
|
||||
virtual Double measure( PlaYUVerFrame* ) { return 0; }
|
||||
virtual Double measure( PlaYUVerFrame*, PlaYUVerFrame* ) { return 0; }
|
||||
virtual Double measure( PlaYUVerFrame*, PlaYUVerFrame*, PlaYUVerFrame* ) { return 0; }
|
||||
|
||||
virtual Void destroy() { }
|
||||
|
||||
Void setModuleDefinition( PlaYUVerModuleDefinition def ) { m_cModuleDef = def; }
|
||||
PlaYUVerModuleDefinition getModuleDefinition() { return m_cModuleDef; }
|
||||
|
||||
};
|
||||
|
||||
} // NAMESPACE
|
||||
|
||||
#endif // __PLAYUVERMODULESIF_H__
|
||||
|
||||
Reference in new issue
Block a user