sipxmedialib  Version 3.3
MprNullAecConstructor.h
Go to the documentation of this file.
1 //
2 // Copyright (C) 2006-2007 SIPfoundry Inc.
3 // Licensed by SIPfoundry under the LGPL license.
4 //
5 // Copyright (C) 2006-2007 SIPez LLC.
6 // Licensed to SIPfoundry under a Contributor Agreement.
7 //
8 // $$
10 
11 // Author: Dan Petrie <dpetrie AT SIPez DOT com>
12 
13 #ifndef _MprNullAecConstructor_h_
14 #define _MprNullAecConstructor_h_
15 
16 // SYSTEM INCLUDES
17 // APPLICATION INCLUDES
19 #include <mp/MprNullAec.h>
20 #include <mp/MprAudioFrameBuffer.h>
21 
22 // DEFINES
23 // MACROS
24 // EXTERNAL FUNCTIONS
25 // EXTERNAL VARIABLES
26 // CONSTANTS
27 // STRUCTS
28 // TYPEDEFS
29 // FORWARD DECLARATIONS
30 
36 {
37 /* //////////////////////////// PUBLIC //////////////////////////////////// */
38 public:
39 
40 /* ============================ CREATORS ================================== */
41 
46  0, 1, //minInputs, maxInputs,
47  0, 1) //minOutputs, maxOutputs
48  {
49  };
50 
54 
55 /* ============================ MANIPULATORS ============================== */
56 
58  virtual OsStatus newResource(const UtlString& resourceName,
59  int maxResourcesToCreate,
60  int& numResourcesCreated,
61  MpResource* resourceArray[])
62  {
63  assert(maxResourcesToCreate >= 2);
64  numResourcesCreated = 2;
65 
66  UtlString bufferResourceName(resourceName);
67  bufferResourceName.append(AEC_OUTPUT_BUFFER_RESOURCE_NAME_SUFFIX);
68 
69  MprAudioFrameBuffer* outBufferResource =
70  new MprAudioFrameBuffer(bufferResourceName, 3);
71  resourceArray[1] = outBufferResource;
72  resourceArray[1]->enable();
73 
74  resourceArray[0] = new MprNullAec(resourceName, *outBufferResource);
75  resourceArray[0]->disable();
76 
77  return(OS_SUCCESS);
78  }
79 
80 /* ============================ ACCESSORS ================================= */
81 
82 /* ============================ INQUIRY =================================== */
83 
84 /* //////////////////////////// PROTECTED ///////////////////////////////// */
85 protected:
86 
87 /* //////////////////////////// PRIVATE /////////////////////////////////// */
88 private:
89 
92  MprNullAecConstructor(const MprNullAecConstructor& rMprNullAecConstructor);
93 
94 
98 
99 };
100 
101 /* ============================ INLINE METHODS ============================ */
102 
103 #endif // _MprNullAecConstructor_h_
virtual OsStatus newResource(const UtlString &resourceName, int maxResourcesToCreate, int &numResourcesCreated, MpResource *resourceArray[])
Create a new resource.
Definition: MprNullAecConstructor.h:58
MprNullAecConstructor & operator=(const MprNullAecConstructor &rhs)
#define AEC_OUTPUT_BUFFER_RESOURCE_NAME_SUFFIX
Definition: MpResourceTopology.h:48
virtual ~MprNullAecConstructor()
Definition: MprNullAecConstructor.h:53
virtual UtlBoolean disable()
Disable this resource.
Definition: MpResource.cpp:121
virtual UtlBoolean enable()
Enable this resource.
Definition: MpResource.cpp:145
#define DEFAULT_NULL_AEC_RESOURCE_TYPE
Definition: MpResourceFactory.h:36
MprNullAecConstructor()
Definition: MprNullAecConstructor.h:44
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
MprNullAecConstructor is used to construct a Null AEC resource.
Definition: MprNullAecConstructor.h:35
The MprAudioFrameBuffer resource buffers frames of audio that pass through to be retrieved later...
Definition: MprAudioFrameBuffer.h:39
The MprNullAec resource a no-op AEC implementation intended to be a base calls for real AEC implement...
Definition: MprNullAec.h:50