12 #ifndef _MprRtpDispatcher_h_ 13 #define _MprRtpDispatcher_h_ 21 #include <utl/UtlString.h> 22 #include <utl/UtlInt.h> 23 #include <os/OsMsgQ.h> 24 #include <os/OsDateTime.h> 25 #include <os/OsLock.h> 35 class OsMsgDispatcher;
141 #if defined(_MSC_VER) && (_MSC_VER <= 1200) 176 inline void activate(
int fromIp,
int fromPort);
205 const UtlString &resourceName,
211 #if defined(_MSC_VER) && (_MSC_VER <= 1200) 334 #endif // _MprRtpDispatcher_h_ virtual OsStatus pushPacket(MpRtpBufPtr &pRtp)=0
Dispatch RTP packet.
UtlBoolean mNotificationsEnabled
Are notifications enabled?
Definition: MprRtpDispatcher.h:220
RtpStreamAffinity
Definition: MprRtpDispatcher.h:47
int mAddress
IP address of the stream source.
Definition: MprRtpDispatcher.h:165
Information, specific for an RTP stream.
Definition: MprRtpDispatcher.h:151
MprRtpDispatcher & operator=(const MprRtpDispatcher &rhs)
Assignment operator (not implemented for this class)
RtpSRC getSSRC() const
Get stream SSRC.
Definition: MprRtpDispatcher.h:315
void setSSRC(RtpSRC ssrc)
Set stream SSRC.
Definition: MprRtpDispatcher.h:320
MpRtpStream()
Definition: MprRtpDispatcher.h:153
void activate(int fromIp, int fromPort)
Mark stream as active.
Definition: MprRtpDispatcher.h:282
Class for RTP stream dispatcher abstraction.
Definition: MprRtpDispatcher.h:42
virtual UtlBoolean disconnectOutput(int outputIdx)=0
Disconnect output from the previously given resource.
Smart pointer to MpRtpBuf.
Definition: MpRtpBuf.h:348
void setNotificationDispatcher(OsMsgDispatcher *pMsgQ)
Set notification dispatcher.
Definition: MprRtpDispatcher.h:240
UtlBoolean mStreamActive
Is this stream active or not?
Definition: MprRtpDispatcher.h:164
void deactivate()
Mark stream as inactive.
Definition: MprRtpDispatcher.h:302
UtlString mResourceName
Definition: MprRtpDispatcher.h:216
OsTime mRtpInactiveTime
inactive if does not receive RTP packets.
Definition: MprRtpDispatcher.h:222
OsStatus postStreamNotif(OsMsgDispatcher *pMsgQ, const UtlString &resourceName, MpConnectionID connId, MprnRtpStreamActivityMsg::StreamState state) const
Send notification on stream activation/deactivation.
Definition: MprRtpDispatcher.cpp:86
void setNotificationsEnabled(UtlBoolean enabled)
Enable/disable notifications.
Definition: MprRtpDispatcher.h:246
void pushPacket(MpRtpBufPtr &pRtp)
Push packet to the stream for processing.
Definition: MprRtpDispatcher.h:274
MprRtpDispatcher(const UtlString &rName, int connectionId)
Constructor.
Definition: MprRtpDispatcher.cpp:39
virtual UtlBoolean connectOutput(int outputIdx, MpResource *pushRtpToResource)=0
Connect output to the given resource.
interface rtpts_t rtpts_t ssrc_t ssrc
Definition: ISetSenderStatistics.h:68
virtual void checkRtpStreamsActivity()=0
Check activity of the RTP streams and send notifications if needed.
void setConnectionId(MpConnectionID connectionId)
Set ID of the connection to which this resource belongs.
Definition: MprRtpDispatcher.h:251
MpConnectionID mConnectionId
ConnID to send in event notifications.
Definition: MprRtpDispatcher.h:218
static OsTime smDefaultRtpInactiveTime
Default value for mRtpInactiveTime.
Definition: MprRtpDispatcher.h:225
MpResource * mpOutputResource
Definition: MprRtpDispatcher.h:167
virtual UtlBoolean enable()
Enable this resource.
Definition: MpResource.cpp:145
virtual ~MprRtpDispatcher()
Destructor.
Definition: MprRtpDispatcher.cpp:50
void setRtpInactivityTimeout(const OsTime &inactiveTime)
Set stream activity timeout.
Definition: MprRtpDispatcher.h:257
static void setDefaultRtpInactivityTimeout(const OsTime &inactiveTime)
Set default stream activity timeout.
Definition: MprRtpDispatcher.h:263
int MpConnectionID
Flowgraph connection ID.
Definition: MpTypes.h:56
uint32_t RtpSRC
RTP SSRC or CSRC identifier.
Definition: MpTypes.h:61
virtual OsStatus pushBuffer(int inputPort, MpBufPtr &inputBuffer)
Receive buffer asynchronously from resource at given input port.
Definition: MpResource.cpp:229
virtual void reset()
This method is invoked for resources that care about stream discontinuities.
Definition: MpResource.cpp:161
UtlBoolean timeoutDeactivate(const OsTime &timeout)
Mark stream as inactive, if timeout occurred.
Definition: MprRtpDispatcher.cpp:62
UtlBoolean areNotificationsEnabled() const
Definition: MprRtpDispatcher.h:268
OsTime mLastPacketTime
Time of last packet receive.
Definition: MprRtpDispatcher.h:163
int mPort
Port of the stream source.
Definition: MprRtpDispatcher.h:166
Definition: MprRtpDispatcher.h:49
Abstract base class for all media processing objects.
Definition: MpResource.h:56
#define TRUE
Definition: PlgDefsV1.h:41
#define FALSE
Definition: PlgDefsV1.h:37
Definition: MprRtpDispatcher.h:50
StreamState
Definition: MprnRtpStreamActivityMsg.h:42
UtlBoolean isActive() const
Is this stream marked as active?
Definition: MprRtpDispatcher.h:310
int mStreamId
Definition: MprRtpDispatcher.h:161
UtlBoolean isEnabled() const
Returns TRUE is this resource is currently enabled, FALSE otherwise.
Definition: MpResource.cpp:440
OsMutex mMutex
Mutex to synchronize access to this resource.
Definition: MprRtpDispatcher.h:215
OsMsgDispatcher * mpEventMsgQ
MsgQ for event notifications.
Definition: MprRtpDispatcher.h:219