zoneminder/src/zm_rtsp_server_unicast_serv...

52 lines
1.7 KiB
C++
Raw Normal View History

/* ---------------------------------------------------------------------------
** 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.cpp
**
** -------------------------------------------------------------------------*/
#include "zm_rtsp_server_unicast_server_media_subsession.h"
#include "zm_config.h"
#include "zm_rtsp_server_device_source.h"
#if HAVE_RTSP_SERVER
// -----------------------------------------
// ServerMediaSubsession for Unicast
// -----------------------------------------
UnicastServerMediaSubsession* UnicastServerMediaSubsession::createNew(
2021-01-23 09:24:12 +08:00
UsageEnvironment& env,
StreamReplicator* replicator,
//FramedSource *source,
const std::string& format
) {
return new UnicastServerMediaSubsession(env, replicator, format);
2021-01-23 09:24:12 +08:00
//return new UnicastServerMediaSubsession(env, replicator, source, format);
}
2021-01-23 09:24:12 +08:00
FramedSource* UnicastServerMediaSubsession::createNewStreamSource(
unsigned clientSessionId,
unsigned& estBitrate
) {
FramedSource* replica = m_replicator->createStreamReplica();
return createSource(envir(), replica, m_format);
}
RTPSink* UnicastServerMediaSubsession::createNewRTPSink(
2021-01-23 09:24:12 +08:00
Groupsock* rtpGroupsock,
unsigned char rtpPayloadTypeIfDynamic,
FramedSource* inputSource
) {
return createSink(envir(), rtpGroupsock, rtpPayloadTypeIfDynamic, m_format, inputSource);
}
2021-01-23 09:24:12 +08:00
char const* UnicastServerMediaSubsession::getAuxSDPLine(
RTPSink* rtpSink, FramedSource* inputSource
) {
return this->getAuxLine(dynamic_cast<ZoneMinderDeviceSource*>(m_replicator->inputSource()), rtpSink->rtpPayloadType());
}
2021-01-27 07:29:02 +08:00
#endif