sipxmedialib  Version 3.3
MprAudioFrameBuffer.h
Go to the documentation of this file.
1 //
2 // Copyright (C) 2007 SIPez LLC.
3 // Licensed to SIPfoundry under a Contributor Agreement.
4 //
5 // Copyright (C) 2007 SIPfoundry Inc.
6 // Licensed by SIPfoundry under the LGPL license.
7 //
8 // $$
10 
11 // Author: Dan Petrie <dpetrie AT SIPez DOT com>
12 
13 #ifndef _MprAudioFrameBuffer_h_
14 #define _MprAudioFrameBuffer_h_
15 
16 // SYSTEM INCLUDES
17 
18 // APPLICATION INCLUDES
19 #include "mp/MpAudioResource.h"
20 
21 // DEFINES
22 // MACROS
23 // EXTERNAL FUNCTIONS
24 // EXTERNAL VARIABLES
25 // CONSTANTS
26 // STRUCTS
27 // TYPEDEFS
28 // FORWARD DECLARATIONS
29 
40 {
41 /* //////////////////////////// PUBLIC //////////////////////////////////// */
42 public:
43 
44 /* ============================ CREATORS ================================== */
46 
47  MprAudioFrameBuffer(const UtlString& rName,
49  int numFramesHistory);
50 
52  virtual
54 
56 
57 /* ============================ MANIPULATORS ============================== */
59 
60 
61 
62 /* ============================ ACCESSORS ================================= */
64 
65 
66  OsStatus getFrame(int pastFramesIndex, MpBufPtr& frameBuffer);
67 
69 
70 /* ============================ INQUIRY =================================== */
72 
73 
75 
76 /* //////////////////////////// PROTECTED ///////////////////////////////// */
77 protected:
78 
79 /* //////////////////////////// PRIVATE /////////////////////////////////// */
80 private:
81 
82  virtual UtlBoolean doProcessFrame(MpBufPtr inBufs[],
83  MpBufPtr outBufs[],
84  int inBufsSize,
85  int outBufsSize,
86  UtlBoolean isEnabled,
87  int samplesPerFrame,
88  int samplesPerSecond);
89 
91  MprAudioFrameBuffer(const MprAudioFrameBuffer& rMprAudioFrameBuffer);
92 
95 
99 
100 };
101 
102 /* ============================ INLINE METHODS ============================ */
103 
104 #endif // _MprAudioFrameBuffer_h_
int samplesPerFrame
int mFrameCount
Definition: MprAudioFrameBuffer.h:96
int samplesPerSecond
MprAudioFrameBuffer(const UtlString &rName, int numFramesHistory)
Constructor.
Definition: MprAudioFrameBuffer.cpp:30
MpBufPtr * mpBufferedFrameArray
Definition: MprAudioFrameBuffer.h:98
virtual ~MprAudioFrameBuffer()
Destructor.
Definition: MprAudioFrameBuffer.cpp:41
virtual UtlBoolean doProcessFrame(MpBufPtr inBufs[], MpBufPtr outBufs[], int inBufsSize, int outBufsSize, UtlBoolean isEnabled, int samplesPerFrame, int samplesPerSecond)
This method does the real work for the media processing resource and must be defined in each class de...
Definition: MprAudioFrameBuffer.cpp:60
Abstract base class for all audio processing objects.
Definition: MpAudioResource.h:38
MprAudioFrameBuffer & operator=(const MprAudioFrameBuffer &rhs)
Assignment operator (not implemented for this class)
Smart pointer to MpBuf.
Definition: MpBuf.h:160
The MprAudioFrameBuffer resource buffers frames of audio that pass through to be retrieved later...
Definition: MprAudioFrameBuffer.h:39
UtlBoolean isEnabled() const
Returns TRUE is this resource is currently enabled, FALSE otherwise.
Definition: MpResource.cpp:440
OsStatus getFrame(int pastFramesIndex, MpBufPtr &frameBuffer)
Definition: MprAudioFrameBuffer.cpp:97
int mNumBufferFrames
Definition: MprAudioFrameBuffer.h:97