sipxmedialib  Version 3.3
MprRtpDispatcherActiveSsrcs.h
Go to the documentation of this file.
1 //
2 // Copyright (C) 2007-2011 SIPez LLC. All rights reserved.
3 // Licensed to SIPfoundry under a Contributor Agreement.
4 //
5 // Copyright (C) 2007-2008 SIPfoundry Inc.
6 // Licensed by SIPfoundry under the LGPL license.
7 //
8 // $$
10 
11 // Author: Alexander Chemeris <Alexander DOT Chemeris AT SIPez DOT com>
12 
13 #ifndef _MprRtpDispatcherActiveSsrcs_h_
14 #define _MprRtpDispatcherActiveSsrcs_h_
15 
16 // SYSTEM INCLUDES
17 // APPLICATION INCLUDES
18 #include <mp/MprRtpDispatcher.h>
19 #include <utl/UtlHashBag.h>
20 #include <utl/UtlSList.h>
21 
22 // DEFINES
23 // MACROS
24 // EXTERNAL FUNCTIONS
25 // EXTERNAL VARIABLES
26 // CONSTANTS
27 // STRUCTS
28 // TYPEDEFS
29 // FORWARD DECLARATIONS
30 class MprDejitter;
31 
38 {
39 /* //////////////////////////// PUBLIC //////////////////////////////////// */
40 public:
41 
42 /* ============================ CREATORS ================================== */
44 
45 
47  MprRtpDispatcherActiveSsrcs(const UtlString& name, int connectionId,
48  int streamsNum);
57  virtual
60 
62 
63 /* ============================ MANIPULATORS ============================== */
65 
66 
68  OsStatus pushPacket(MpRtpBufPtr &pRtp);
69 
72 
74  UtlBoolean connectOutput(int outputIdx, MpResource* pushRtpToResource);
75 
77  UtlBoolean disconnectOutput(int outputIdx);
78 
80 
81 /* ============================ ACCESSORS ================================= */
83 
84 
86 
87 /* ============================ INQUIRY =================================== */
89 
90 
92 
93 /* //////////////////////////// PROTECTED ///////////////////////////////// */
94 protected:
95 
98  UtlHashBag mActiveStreams;
99  UtlSList mInactiveStreams;
100 
106 
108  MpRtpStream *lookupRtpStream(unsigned int ssrc, const in_addr &fromIp,
109  int fromPort);
110 
111 /* //////////////////////////// PRIVATE /////////////////////////////////// */
112 private:
113 
115  MprRtpDispatcherActiveSsrcs(const MprRtpDispatcherActiveSsrcs& rMprRtpDispatcherActiveSsrcs);
116 
119 
120 };
121 
122 /* ============================ INLINE METHODS ============================ */
123 
124 #endif // _MprRtpDispatcherActiveSsrcs_h_
UtlBoolean disconnectOutput(int outputIdx)
Disconnect output from the previously given resource.
Definition: MprRtpDispatcherActiveSsrcs.cpp:134
OsStatus pushPacket(MpRtpBufPtr &pRtp)
Dispatch RTP packet.
Definition: MprRtpDispatcherActiveSsrcs.cpp:57
MpRtpStream * lookupRtpStream(unsigned int ssrc, const in_addr &fromIp, int fromPort)
Find stream with given SSRC.
Definition: MprRtpDispatcherActiveSsrcs.cpp:166
Information, specific for an RTP stream.
Definition: MprRtpDispatcher.h:151
MpRtpStream * mpStreamsArray
Array of all RTP streams.
Definition: MprRtpDispatcherActiveSsrcs.h:97
Class for RTP stream dispatcher abstraction.
Definition: MprRtpDispatcher.h:42
Smart pointer to MpRtpBuf.
Definition: MpRtpBuf.h:348
MprRtpDispatcherActiveSsrcs(const UtlString &name, int connectionId, int streamsNum)
Constructor.
Definition: MprRtpDispatcherActiveSsrcs.cpp:34
UtlBoolean connectOutput(int outputIdx, MpResource *pushRtpToResource)
Connect output to the given resource.
Definition: MprRtpDispatcherActiveSsrcs.cpp:108
void checkRtpStreamsActivity()
Definition: MprRtpDispatcherActiveSsrcs.cpp:84
UtlHashBag mActiveStreams
Hash bag of active RTP streams.
Definition: MprRtpDispatcherActiveSsrcs.h:98
interface rtpts_t rtpts_t ssrc_t ssrc
Definition: ISetSenderStatistics.h:68
Class for RTP stream abstraction.
Definition: MprRtpDispatcherActiveSsrcs.h:37
int mNumDropped
RTP packets dropped due to SSRC mismatch.
Definition: MprRtpDispatcherActiveSsrcs.h:105
virtual ~MprRtpDispatcherActiveSsrcs()
Destructor.
Definition: MprRtpDispatcherActiveSsrcs.cpp:50
MprRtpDispatcherActiveSsrcs & operator=(const MprRtpDispatcherActiveSsrcs &rhs)
Assignment operator (not implemented for this class)
int mNumPushed
Total RTP packets received.
Definition: MprRtpDispatcherActiveSsrcs.h:104
UtlSList mInactiveStreams
Definition: MprRtpDispatcherActiveSsrcs.h:99
int mRtpStreamsNum
Number of RTP streams we can handle.
Definition: MprRtpDispatcherActiveSsrcs.h:96
Abstract base class for all media processing objects.
Definition: MpResource.h:56
The "Dejitter" utility class.
Definition: MprDejitter.h:39