2021-01-07 00:26:08 +08: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
|
|
|
|
**
|
|
|
|
** -------------------------------------------------------------------------*/
|
|
|
|
|
2021-02-04 11:59:03 +08:00
|
|
|
#ifndef ZM_RTSP_SERVER_UNICAST_SERVER_MEDIA_SUBSESSION_H
|
|
|
|
#define ZM_RTSP_SERVER_UNICAST_SERVER_MEDIA_SUBSESSION_H
|
2021-01-07 00:26:08 +08:00
|
|
|
|
2021-02-04 11:47:28 +08:00
|
|
|
#include "zm_config.h"
|
2021-01-07 00:26:08 +08:00
|
|
|
#include "zm_rtsp_server_server_media_subsession.h"
|
|
|
|
|
|
|
|
// -----------------------------------------
|
|
|
|
// ServerMediaSubsession for Unicast
|
|
|
|
// -----------------------------------------
|
2021-02-04 11:59:03 +08:00
|
|
|
#if HAVE_RTSP_SERVER
|
2021-01-07 00:26:08 +08:00
|
|
|
class UnicastServerMediaSubsession :
|
|
|
|
public OnDemandServerMediaSubsession,
|
|
|
|
public BaseServerMediaSubsession
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
static UnicastServerMediaSubsession* createNew(
|
|
|
|
UsageEnvironment& env,
|
|
|
|
StreamReplicator* replicator,
|
|
|
|
const std::string& format);
|
|
|
|
|
|
|
|
protected:
|
|
|
|
UnicastServerMediaSubsession(
|
|
|
|
UsageEnvironment& env,
|
|
|
|
StreamReplicator* replicator,
|
|
|
|
const std::string& format)
|
|
|
|
:
|
2021-01-23 09:24:12 +08:00
|
|
|
OnDemandServerMediaSubsession(env, true
|
|
|
|
/* Boolean reuseFirstSource, portNumBits initialPortNum=6970, Boolean multiplexRTCPWithRTP=False */
|
|
|
|
),
|
2021-01-07 00:26:08 +08:00
|
|
|
BaseServerMediaSubsession(replicator),
|
|
|
|
m_format(format) {};
|
|
|
|
|
|
|
|
virtual FramedSource* createNewStreamSource(unsigned clientSessionId, unsigned& estBitrate);
|
|
|
|
virtual RTPSink* createNewRTPSink(Groupsock* rtpGroupsock, unsigned char rtpPayloadTypeIfDynamic, FramedSource* inputSource);
|
2021-01-23 09:24:12 +08:00
|
|
|
virtual char const* getAuxSDPLine(RTPSink* rtpSink, FramedSource* inputSource);
|
2021-01-07 00:26:08 +08:00
|
|
|
|
|
|
|
protected:
|
|
|
|
const std::string m_format;
|
|
|
|
};
|
2021-02-04 11:59:03 +08:00
|
|
|
#endif // HAVE_RTSP_SERVER
|
|
|
|
|
|
|
|
#endif // ZM_RTSP_SERVER_UNICAST_SERVER_MEDIA_SUBSESSION_H
|