2017-09-16 08:17:22 +00:00
|
|
|
/* ---------------------------------------------------------------------------
|
|
|
|
** This software is in the public domain, furnished "as is", without technical
|
|
|
|
** support, and with no warranty, express or implied, as to its usefulness for
|
|
|
|
** any purpose.
|
|
|
|
**
|
|
|
|
** ServerMediaSubsession.h
|
|
|
|
**
|
|
|
|
** -------------------------------------------------------------------------*/
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
2021-11-07 10:21:53 +00:00
|
|
|
#include "BaseServerMediaSubsession.h"
|
2017-09-16 08:17:22 +00:00
|
|
|
|
|
|
|
// -----------------------------------------
|
|
|
|
// ServerMediaSubsession for Multicast
|
|
|
|
// -----------------------------------------
|
2022-05-10 10:30:16 +00:00
|
|
|
class MulticastServerMediaSubsession : public BaseServerMediaSubsession, public PassiveServerMediaSubsession
|
2017-09-16 08:17:22 +00:00
|
|
|
{
|
|
|
|
public:
|
|
|
|
static MulticastServerMediaSubsession* createNew(UsageEnvironment& env
|
|
|
|
, struct in_addr destinationAddress
|
|
|
|
, Port rtpPortNum, Port rtcpPortNum
|
|
|
|
, int ttl
|
2021-04-04 15:10:07 +00:00
|
|
|
, StreamReplicator* replicator);
|
2017-09-16 08:17:22 +00:00
|
|
|
|
|
|
|
protected:
|
2021-04-04 15:10:07 +00:00
|
|
|
MulticastServerMediaSubsession(UsageEnvironment& env
|
|
|
|
, struct in_addr destinationAddress
|
|
|
|
, Port rtpPortNum, Port rtcpPortNum
|
|
|
|
, int ttl
|
|
|
|
, StreamReplicator* replicator)
|
2022-05-10 10:30:16 +00:00
|
|
|
: BaseServerMediaSubsession(replicator)
|
|
|
|
, PassiveServerMediaSubsession(*this->createRtpSink(env, destinationAddress, rtpPortNum, rtcpPortNum, ttl, replicator)
|
2021-04-04 15:10:07 +00:00
|
|
|
, m_rtcpInstance)
|
2022-05-10 10:30:16 +00:00
|
|
|
{}
|
2017-09-16 08:17:22 +00:00
|
|
|
|
|
|
|
virtual char const* sdpLines() ;
|
|
|
|
virtual char const* getAuxSDPLine(RTPSink* rtpSink,FramedSource* inputSource);
|
2021-04-04 15:10:07 +00:00
|
|
|
RTPSink* createRtpSink(UsageEnvironment& env
|
|
|
|
, struct in_addr destinationAddress
|
|
|
|
, Port rtpPortNum, Port rtcpPortNum
|
|
|
|
, int ttl
|
|
|
|
, StreamReplicator* replicator);
|
2017-09-16 08:17:22 +00:00
|
|
|
|
|
|
|
protected:
|
2021-04-04 15:10:07 +00:00
|
|
|
RTPSink* m_rtpSink;
|
|
|
|
RTCPInstance* m_rtcpInstance;
|
|
|
|
std::string m_SDPLines;
|
2017-09-16 08:17:22 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|