sipxmedialib  Version 3.3
MprDelayConstructor.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 _MprDelayConstructor_h_
14 #define _MprDelayConstructor_h_
15 
16 // SYSTEM INCLUDES
17 // APPLICATION INCLUDES
19 #include <mp/MprDelay.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 ~MprDelayConstructor() {}
50 
51 /* ============================ MANIPULATORS ============================== */
52 
54  virtual OsStatus newResource(const UtlString& resourceName,
55  int maxResourcesToCreate,
56  int& numResourcesCreated,
57  MpResource* resourceArray[])
58  {
59  MprDelay *pVadResource = new MprDelay(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  MprDelayConstructor(const MprDelayConstructor& rMprDelayConstructor);
82 
85 
86 };
87 
88 /* ============================ INLINE METHODS ============================ */
89 
90 #endif // _MprDelayConstructor_h_
MprDelayConstructor & operator=(const MprDelayConstructor &rhs)
Disabled assignment operator.
MprDelayConstructor()
Constructor.
Definition: MprDelayConstructor.h:41
Delay Resource.
Definition: MprDelay.h:163
virtual UtlBoolean enable()
Enable this resource.
Definition: MpResource.cpp:145
virtual OsStatus newResource(const UtlString &resourceName, int maxResourcesToCreate, int &numResourcesCreated, MpResource *resourceArray[])
Create a new resource.
Definition: MprDelayConstructor.h:54
MprDelayConstructor is used to construct VAD resource.
Definition: MprDelayConstructor.h:33
virtual ~MprDelayConstructor()
Destructor.
Definition: MprDelayConstructor.h:49
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
#define DEFAULT_DELAY_RESOURCE_TYPE
Definition: MpResourceFactory.h:39