sipxmedialib  Version 3.3
MprVoiceActivityNotifierConstructor.h
Go to the documentation of this file.
1 //
2 // Copyright (C) 2008 SIPfoundry Inc.
3 // Licensed by SIPfoundry under the LGPL license.
4 //
5 // Copyright (C) 2008 SIPez LLC.
6 // Licensed to SIPfoundry under a Contributor Agreement.
7 //
8 // $$
10 
11 // Author: Alexander Chemeris <Alexander DOT Chemeris AT SIPez DOT com>
12 
13 #ifndef _MprVoiceActivityNotifierConstructor_h_
14 #define _MprVoiceActivityNotifierConstructor_h_
15 
16 // SYSTEM INCLUDES
17 // APPLICATION INCLUDES
20 
21 // DEFINES
22 // MACROS
23 // EXTERNAL FUNCTIONS
24 // EXTERNAL VARIABLES
25 // CONSTANTS
26 // STRUCTS
27 // TYPEDEFS
28 // FORWARD DECLARATIONS
29 
34 {
35 /* //////////////////////////// PUBLIC //////////////////////////////////// */
36 public:
37 
38 /* ============================ CREATORS ================================== */
39 
43  1, 1, //minInputs, maxInputs,
44  0, 1) //minOutputs, maxOutputs
45  {
46  }
47 
50 
51 /* ============================ MANIPULATORS ============================== */
52 
54  virtual OsStatus newResource(const UtlString& resourceName,
55  int maxResourcesToCreate,
56  int& numResourcesCreated,
57  MpResource* resourceArray[])
58  {
59  MprVoiceActivityNotifier *pDecode = new MprVoiceActivityNotifier(resourceName);
60 
61  // Return created resource
62  assert(maxResourcesToCreate >= 1);
63  numResourcesCreated = 1;
64  resourceArray[0] = pDecode;
65  resourceArray[0]->enable();
66 
67  return OS_SUCCESS;
68  }
69 
70 /* ============================ ACCESSORS ================================= */
71 
72 /* ============================ INQUIRY =================================== */
73 
74 /* //////////////////////////// PROTECTED ///////////////////////////////// */
75 protected:
76 
77 /* //////////////////////////// PRIVATE /////////////////////////////////// */
78 private:
79 
81  MprVoiceActivityNotifierConstructor(const MprVoiceActivityNotifierConstructor& rMprVoiceActivityNotifierConstructor);
82 
85 
86 };
87 
88 /* ============================ INLINE METHODS ============================ */
89 
90 #endif // _MprVoiceActivityNotifierConstructor_h_
virtual ~MprVoiceActivityNotifierConstructor()
Destructor.
Definition: MprVoiceActivityNotifierConstructor.h:49
MprVoiceActivityNotifierConstructor()
Constructor.
Definition: MprVoiceActivityNotifierConstructor.h:41
Voice Activity notifier resource.
Definition: MprVoiceActivityNotifier.h:35
virtual OsStatus newResource(const UtlString &resourceName, int maxResourcesToCreate, int &numResourcesCreated, MpResource *resourceArray[])
Create a new resource.
Definition: MprVoiceActivityNotifierConstructor.h:54
MprVoiceActivityNotifierConstructor is used to construct a Decode resource.
Definition: MprVoiceActivityNotifierConstructor.h:33
virtual UtlBoolean enable()
Enable this resource.
Definition: MpResource.cpp:145
#define DEFAULT_VOICE_ACTIVITY_NOTIFIER_RESOURCE_TYPE
Definition: MpResourceFactory.h:38
Abstract base class for all media processing objects.
Definition: MpResource.h:56
MpAudioResourceConstructor is used to construct a specific audio resource type.
Definition: MpAudioResourceConstructor.h:36
MprVoiceActivityNotifierConstructor & operator=(const MprVoiceActivityNotifierConstructor &rhs)
Disabled assignment operator.