sipxmedialib  Version 3.3
MpAudioResource.h
Go to the documentation of this file.
1 //
2 // Copyright (C) 2006 SIPez LLC.
3 // Licensed to SIPfoundry under a Contributor Agreement.
4 //
5 // Copyright (C) 2004-2006 SIPfoundry Inc.
6 // Licensed by SIPfoundry under the LGPL license.
7 //
8 // Copyright (C) 2004-2006 Pingtel Corp. All rights reserved.
9 // Licensed to SIPfoundry under a Contributor Agreement.
10 //
11 // $$
13 
14 
15 #ifndef _MpAudioResource_h_
16 #define _MpAudioResource_h_
17 
18 // SYSTEM INCLUDES
19 
20 // APPLICATION INCLUDES
21 #include "mp/MpResource.h"
22 #include "mp/MpAudioBuf.h"
23 
24 // DEFINES
25 // MACROS
26 // EXTERNAL FUNCTIONS
27 // EXTERNAL VARIABLES
28 // CONSTANTS
29 // STRUCTS
30 // TYPEDEFS
31 
33 
39 {
40 /* //////////////////////////// PUBLIC //////////////////////////////////// */
41 public:
42 
43 /* ============================ CREATORS ================================== */
45 
46 
48  MpAudioResource(const UtlString& rName,
49  int minInputs, int maxInputs,
50  int minOutputs, int maxOutputs);
51 
53  virtual ~MpAudioResource();
54 
56 
57 /* ============================ MANIPULATORS ============================== */
59 
60 
62  virtual UtlBoolean processFrame(void);
72 
73 /* ============================ ACCESSORS ================================= */
75 
76 
78 
79 /* ============================ INQUIRY =================================== */
81 
82 
84 
85 /* //////////////////////////// PROTECTED ///////////////////////////////// */
86 protected:
87 
90  virtual UtlBoolean doProcessFrame(MpBufPtr inBufs[],
91  MpBufPtr outBufs[],
92  int inBufsSize,
93  int outBufsSize,
94  UtlBoolean isEnabled,
95  int samplesPerFrame,
97  ) = 0;
110 /* //////////////////////////// PRIVATE /////////////////////////////////// */
111 private:
112 
114  MpAudioResource(const MpAudioResource& rMpResource);
115 
118 
119 };
120 
121 /* ============================ INLINE METHODS ============================ */
122 
123 #endif // _MpAudioResource_h_
int samplesPerFrame
int minInputs() const
Returns the minimum number of inputs required by this resource.
Definition: MpResource.cpp:363
virtual ~MpAudioResource()
Destructor.
Definition: MpAudioResource.cpp:51
MpAudioResource(const UtlString &rName, int minInputs, int maxInputs, int minOutputs, int maxOutputs)
Constructor.
Definition: MpAudioResource.cpp:43
int minOutputs() const
Returns the minimum number of outputs required by this resource.
Definition: MpResource.cpp:369
int samplesPerSecond
Abstract base class for all audio processing objects.
Definition: MpAudioResource.h:38
MpAudioResource & operator=(const MpAudioResource &rhs)
Assignment operator (not implemented for this class)
virtual UtlBoolean processFrame(void)
Wrapper around doProcessFrame().
Definition: MpAudioResource.cpp:63
Smart pointer to MpBuf.
Definition: MpBuf.h:160
int maxOutputs() const
Returns the maximum number of outputs supported by this resource.
Definition: MpResource.cpp:357
int maxInputs() const
Returns the maximum number of inputs supported by this resource.
Definition: MpResource.cpp:351
Abstract base class for all media processing objects.
Definition: MpResource.h:56
UtlBoolean isEnabled() const
Returns TRUE is this resource is currently enabled, FALSE otherwise.
Definition: MpResource.cpp:440
virtual UtlBoolean doProcessFrame(MpBufPtr inBufs[], MpBufPtr outBufs[], int inBufsSize, int outBufsSize, UtlBoolean isEnabled, int samplesPerFrame, int samplesPerSecond)=0
This method does the real work for the media processing resource and must be defined in each class de...