sipxmedialib  Version 3.3
MpSpeakerSelectBase.h
Go to the documentation of this file.
1 //
2 // Copyright (C) 2008 SIPez LLC.
3 // Licensed to SIPfoundry under a Contributor Agreement.
4 //
5 // Copyright (C) 2008 SIPfoundry Inc.
6 // Licensed by SIPfoundry under the LGPL license.
7 //
8 // $$
10 
11 // Author: Sergey Kostanbaev <Sergey DOT Kostanbaev AT sipez DOT com>
12 
13 #ifndef _MpSpeakerSelectBase_h_
14 #define _MpSpeakerSelectBase_h_
15 
16 // SYSTEM INCLUDES
17 // APPLICATION INCLUDES
18 #include <utl/UtlDefs.h>
19 #include <os/OsStatus.h>
20 #include <utl/UtlString.h>
21 #include "mp/MpTypes.h"
22 
23 // DEFINES
24 // MACROS
25 // EXTERNAL FUNCTIONS
26 // EXTERNAL VARIABLES
27 // CONSTANTS
28 // STRUCTS
29 // TYPEDEFS
30 // FORWARD DECLARATIONS
31 
42 {
43 /* //////////////////////////// PUBLIC //////////////////////////////////// */
44 public:
45 
46 /* ============================ CREATORS ================================== */
48 
49 
51  virtual OsStatus init(int maxParticipants, int maxActive) = 0;
65  static MpSpeakerSelectBase *createInstance(const UtlString &name = "");
78  virtual ~MpSpeakerSelectBase() {};
80 
82 
83 /* ============================ MANIPULATORS ============================== */
85 
86 
88  virtual void reset() = 0;
96  virtual OsStatus enableParticipant(int num, UtlBoolean newState) = 0;
113  virtual OsStatus processFrame(MpSpeechParams* speechParams[],
115  int frameSize) = 0;
123  virtual OsStatus setParam(const char* paramName, void* value) = 0;
132  static void setDefaultAlgorithm(const UtlString& name);
144 
145 /* ============================ ACCESSORS ================================= */
147 
148 
150 
151 /* ============================ INQUIRY =================================== */
153 
154 
156  virtual OsStatus isParticipantEnabled(int num, UtlBoolean &enabled) = 0;
168 
169 /* //////////////////////////// PROTECTED ///////////////////////////////// */
170 protected:
171 
172  static UtlString smDefaultAlgorithm;
173 
174 /* //////////////////////////// PRIVATE /////////////////////////////////// */
175 private:
176 
177 };
178 
179 #endif // _MpSpeakerSelectBase_h_
virtual OsStatus enableParticipant(int num, UtlBoolean newState)=0
Enable/disable processing of a selected participant.
Definition: MpTypes.h:74
Definition: MpSpeakerSelectBase.h:41
virtual OsStatus processFrame(MpSpeechParams *speechParams[], int frameSize)=0
Compute speaker ranks.
virtual OsStatus isParticipantEnabled(int num, UtlBoolean &enabled)=0
Is processing enabled for a given participant?
static MpSpeakerSelectBase * createInstance(const UtlString &name="")
Factory method for SS algorithms creation.
Definition: MpSpeakerSelectBase.cpp:32
static UtlString smDefaultAlgorithm
Name of algorithm to be used by default.
Definition: MpSpeakerSelectBase.h:172
virtual void reset()=0
Reset algorithm state to initial and prepare for processing of new data.
virtual OsStatus setParam(const char *paramName, void *value)=0
Set algorithm parameter.
static void setDefaultAlgorithm(const UtlString &name)
Set algorithm to be used by default.
Definition: MpSpeakerSelectBase.cpp:50
virtual ~MpSpeakerSelectBase()
Destructor.
Definition: MpSpeakerSelectBase.h:79
virtual OsStatus init(int maxParticipants, int maxActive)=0
Initialize SS to initial state.