zoneminder/src/zm_rtsp_server_unicast_serv...

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

53 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"
2021-02-28 01:26:19 +08:00
#include "zm_rtsp_server_fifo_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
) {
2021-02-28 01:26:19 +08:00
return this->getAuxLine(
dynamic_cast<ZoneMinderFifoSource*>(m_replicator->inputSource()),
rtpSink->rtpPayloadType());
}
#endif // HAVE_RTSP_SERVER