sipxmedialib  Version 3.3
MprVadConstructor.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 _MprVadConstructor_h_
14 #define _MprVadConstructor_h_
15 
16 // SYSTEM INCLUDES
17 // APPLICATION INCLUDES
19 #include <mp/MprVad.h>
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  1, 1) //minOutputs, maxOutputs
45  {
46  }
47 
49  virtual ~MprVadConstructor() {}
50 
51 /* ============================ MANIPULATORS ============================== */
52 
54  virtual OsStatus newResource(const UtlString& resourceName,
55  int maxResourcesToCreate,
56  int& numResourcesCreated,
57  MpResource* resourceArray[])
58  {
59  MprVad *pVadResource = new MprVad(resourceName);
60 
61  // Return created resource
62  assert(maxResourcesToCreate >= 1);
63  numResourcesCreated = 1;
64  resourceArray[0] = pVadResource;
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  MprVadConstructor(const MprVadConstructor& rMprVadConstructor);
82 
85 
86 };
87 
88 /* ============================ INLINE METHODS ============================ */
89 
90 #endif // _MprVadConstructor_h_
virtual ~MprVadConstructor()
Destructor.
Definition: MprVadConstructor.h:49
#define DEFAULT_VAD_RESOURCE_TYPE
Definition: MpResourceFactory.h:37
MprVadConstructor is used to construct VAD resource.
Definition: MprVadConstructor.h:33
virtual OsStatus newResource(const UtlString &resourceName, int maxResourcesToCreate, int &numResourcesCreated, MpResource *resourceArray[])
Create a new resource.
Definition: MprVadConstructor.h:54
MprVadConstructor & operator=(const MprVadConstructor &rhs)
Disabled assignment operator.
virtual UtlBoolean enable()
Enable this resource.
Definition: MpResource.cpp:145
MprVadConstructor()
Constructor.
Definition: MprVadConstructor.h:41
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
Voice Activity Detection resource.
Definition: MprVad.h:36