sipxmedialib  Version 3.3
MpBufferMsg.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 _MpBufferMsg_h_
16 #define _MpBufferMsg_h_
17 
18 // SYSTEM INCLUDES
19 
20 // APPLICATION INCLUDES
21 #include "os/OsMsg.h"
22 #include "mp/MpBuf.h"
23 
24 // DEFINES
25 // MACROS
26 // EXTERNAL FUNCTIONS
27 // EXTERNAL VARIABLES
28 // CONSTANTS
29 // STRUCTS
30 // TYPEDEFS
31 // FORWARD DECLARATIONS
32 
36 class MpBufferMsg : public OsMsg
37 {
38 /* //////////////////////////// PUBLIC //////////////////////////////////// */
39 public:
40 
42  typedef enum
43  {
51 
52 /* ============================ CREATORS ================================== */
54 
55 
57  MpBufferMsg(int msg, const MpBufPtr &pBuffer=MpBufPtr());
58 
60  MpBufferMsg(const MpBufferMsg& rMpBufferMsg);
61 
63  virtual OsMsg* createCopy() const;
64 
66  virtual void releaseMsg();
67 
69  virtual
70  ~MpBufferMsg();
71 
73 
74 /* ============================ MANIPULATORS ============================== */
76 
77 
79  MpBufferMsg& operator=(const MpBufferMsg& rhs);
80 
82  void setBuffer(const MpBufPtr &p);
89  void ownBuffer(MpBufPtr &p);
103 
104 /* ============================ ACCESSORS ================================= */
106 
107 
109  int getMsg() const;
110 
112  MpBufPtr &getBuffer();
113 
115 
116 /* ============================ INQUIRY =================================== */
118 
119 
121 
122 /* //////////////////////////// PROTECTED ///////////////////////////////// */
123 protected:
124 
125 /* //////////////////////////// PRIVATE /////////////////////////////////// */
126 private:
127 
129 
130 };
131 
132 /* ============================ INLINE METHODS ============================ */
133 
134 #endif // _MpBufferMsg_h_
virtual OsMsg * createCopy() const
Create a copy of this msg object (which may be of a derived type)
Definition: MpBufferMsg.cpp:44
MpBufferMsg(int msg, const MpBufPtr &pBuffer=MpBufPtr())
Constructor.
Definition: MpBufferMsg.cpp:30
Captured video frame.
Definition: MpBufferMsg.h:49
void setBuffer(const MpBufPtr &p)
Copy buffer to this message.
Definition: MpBufferMsg.cpp:79
void ownBuffer(MpBufPtr &p)
Own provided buffer.
Definition: MpBufferMsg.cpp:86
virtual void releaseMsg()
Done with message, delete it or mark it unused.
Definition: MpBufferMsg.cpp:50
MpBufferMsgType
Phone set message types.
Definition: MpBufferMsg.h:42
Definition: MpBufferMsg.h:48
MpBufPtr & getBuffer()
Return buffer object pointer from the buffer message.
Definition: MpBufferMsg.cpp:104
Definition: MpBufferMsg.h:45
MpBufferMsg & operator=(const MpBufferMsg &rhs)
Assignment operator.
Definition: MpBufferMsg.cpp:66
virtual ~MpBufferMsg()
Destructor.
Definition: MpBufferMsg.cpp:57
Smart pointer to MpBuf.
Definition: MpBuf.h:160
int getMsg() const
Return the type of the buffer message.
Definition: MpBufferMsg.cpp:98
Message object used to communicate with the media processing task.
Definition: MpBufferMsg.h:36
Definition: MpBufferMsg.h:46
Captured audio frame.
Definition: MpBufferMsg.h:44
Definition: MpBufferMsg.h:47
MpBufPtr mpBuffer
Carried buffer.
Definition: MpBufferMsg.h:128