sipxmedialib  Version 3.3
MprRtpDispatcherIpAffinity.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 _MprRtpDispatcherIpAffinity_h_
14 #define _MprRtpDispatcherIpAffinity_h_
15 
16 // SYSTEM INCLUDES
17 // APPLICATION INCLUDES
18 #include <mp/MprRtpDispatcher.h>
19 
20 // DEFINES
21 // MACROS
22 // EXTERNAL FUNCTIONS
23 // EXTERNAL VARIABLES
24 // CONSTANTS
25 // STRUCTS
26 // TYPEDEFS
27 // FORWARD DECLARATIONS
28 class MpRtpStream;
29 class MprDejitter;
30 
35 {
36 /* //////////////////////////// PUBLIC //////////////////////////////////// */
37 public:
38 
39 /* ============================ CREATORS ================================== */
41 
42 
44  MprRtpDispatcherIpAffinity(const UtlString& rName, int connectionId);
51  virtual
54 
56 
57 /* ============================ MANIPULATORS ============================== */
59 
60 
62  OsStatus pushPacket(MpRtpBufPtr &pRtp);
63 
66 
68  UtlBoolean connectOutput(int outputIdx, MpResource* pushRtpToResource);
69 
71  UtlBoolean disconnectOutput(int outputIdx);
72 
74  void setPreferredIp(unsigned long address, int port);
75 
77 
78 /* ============================ ACCESSORS ================================= */
80 
81 
83 
84 /* ============================ INQUIRY =================================== */
86 
87 
89 
90 /* //////////////////////////// PROTECTED ///////////////////////////////// */
91 protected:
92 
96 
97  UtlBoolean mPrefSsrcValid;
98  unsigned long mRtpDestIp;
100 
109  UtlBoolean mRtpOtherSsrcValid;
110 
111  static const int SSRC_SWITCH_MISMATCH_COUNT;
112 
114  int setPrefSsrc(unsigned int newSsrc);
116  RtpSRC getPrefSsrc(void);
117 
118 /* //////////////////////////// PRIVATE /////////////////////////////////// */
119 private:
120 
122  MprRtpDispatcherIpAffinity(const MprRtpDispatcherIpAffinity& rMprRtpDispatcherIpAffinity);
123 
126 
127 };
128 
129 /* ============================ INLINE METHODS ============================ */
130 
131 #endif // _MprRtpDispatcherIpAffinity_h_
int mNumDropped
RTP pkts dropped due to SSRC mismatch.
Definition: MprRtpDispatcherIpAffinity.h:102
int mRtpOtherSsrc
Last SSRC from diff IP as pref&#39;d.
Definition: MprRtpDispatcherIpAffinity.h:108
unsigned long mRtpDestIp
Where this connection is sending TO.
Definition: MprRtpDispatcherIpAffinity.h:98
void setPreferredIp(unsigned long address, int port)
Inform this object of its sibling ToNet&#39;s destination.
Definition: MprRtpDispatcherIpAffinity.cpp:243
Information, specific for an RTP stream.
Definition: MprRtpDispatcher.h:151
int mTotalWarnings
Total RTP pkts from non-pref&#39;d.
Definition: MprRtpDispatcherIpAffinity.h:103
Class for RTP stream dispatcher abstraction.
Definition: MprRtpDispatcher.h:42
UtlBoolean mRtpOtherSsrcValid
Definition: MprRtpDispatcherIpAffinity.h:109
int mNumPushed
Total RTP pkts received.
Definition: MprRtpDispatcherIpAffinity.h:101
Smart pointer to MpRtpBuf.
Definition: MpRtpBuf.h:348
OsStatus pushPacket(MpRtpBufPtr &pRtp)
Dispatch RTP packet.
Definition: MprRtpDispatcherIpAffinity.cpp:61
MprRtpDispatcherIpAffinity & operator=(const MprRtpDispatcherIpAffinity &rhs)
Assignment operator (not implemented for this class)
void checkRtpStreamsActivity()
Definition: MprRtpDispatcherIpAffinity.cpp:182
static const int SSRC_SWITCH_MISMATCH_COUNT
Definition: MprRtpDispatcherIpAffinity.h:111
int mRtpDestPort
Port " ".
Definition: MprRtpDispatcherIpAffinity.h:99
MpRtpStream mRtpStream
Definition: MprRtpDispatcherIpAffinity.h:93
UtlBoolean connectOutput(int outputIdx, MpResource *pushRtpToResource)
Connect output to the given resource.
Definition: MprRtpDispatcherIpAffinity.cpp:198
MprDejitter * mpDejitter
Dejitter for our single decoder.
Definition: MprRtpDispatcherIpAffinity.h:95
uint32_t RtpSRC
RTP SSRC or CSRC identifier.
Definition: MpTypes.h:61
RtpSRC getPrefSsrc(void)
Get SSRC we want to receive.
Definition: MprRtpDispatcherIpAffinity.cpp:256
UtlBoolean mPrefSsrcValid
Is mPrefSsrc valid?
Definition: MprRtpDispatcherIpAffinity.h:97
int setPrefSsrc(unsigned int newSsrc)
Set SSRC we want to receive.
Definition: MprRtpDispatcherIpAffinity.cpp:261
int mRtpDestMatchIpOnlySsrc
Last SSRC from same IP as pref&#39;d.
Definition: MprRtpDispatcherIpAffinity.h:106
UtlBoolean disconnectOutput(int outputIdx)
Disconnect output from the previously given resource.
Definition: MprRtpDispatcherIpAffinity.cpp:221
Abstract base class for all media processing objects.
Definition: MpResource.h:56
The "Dejitter" utility class.
Definition: MprDejitter.h:39
virtual ~MprRtpDispatcherIpAffinity()
Destructor.
Definition: MprRtpDispatcherIpAffinity.cpp:53
UtlBoolean mRtpDestMatchIpOnlySsrcValid
Definition: MprRtpDispatcherIpAffinity.h:107
MprRtpDispatcherIpAffinity(const UtlString &rName, int connectionId)
Constructor.
Definition: MprRtpDispatcherIpAffinity.cpp:32
Class for RTP stream dispatcher abstraction.
Definition: MprRtpDispatcherIpAffinity.h:34
int mNumNonPrefPackets
Consecutive pkts from non-pref&#39;d.
Definition: MprRtpDispatcherIpAffinity.h:105
int mNumWarnings
Current consecutive " ".
Definition: MprRtpDispatcherIpAffinity.h:104