| | |
| | | //
|
| | |
|
| | | #include "LiveServerMediaSubsession.h"
|
| | | #include "H264FramedSource.h"
|
| | |
|
| | | namespace MESAI
|
| | | {
|
| | | LiveServerMediaSubsession * LiveServerMediaSubsession::createNew(UsageEnvironment& env, StreamReplicator* replicator)
|
| | | { |
| | | return new LiveServerMediaSubsession(env,replicator);
|
| | | }
|
| | | |
| | | FramedSource* LiveServerMediaSubsession::createNewStreamSource(unsigned clientSessionId, unsigned& estBitrate)
|
| | |
|
| | | LiveServerMediaSubsession * LiveServerMediaSubsession::createNew(UsageEnvironment& env, StreamReplicator* replicator)
|
| | | {
|
| | | return new LiveServerMediaSubsession(env,replicator);
|
| | | }
|
| | |
|
| | | FramedSource* LiveServerMediaSubsession::createNewStreamSource(unsigned clientSessionId, unsigned& estBitrate)
|
| | | {
|
| | | FramedSource* source = m_replicator->createStreamReplica();
|
| | | estBitrate = 5000;//#todo
|
| | | return H264VideoStreamDiscreteFramer::createNew(envir(), source);
|
| | | }
|
| | |
|
| | | RTPSink* LiveServerMediaSubsession::createNewRTPSink(Groupsock* rtpGroupsock, unsigned char rtpPayloadTypeIfDynamic, FramedSource* inputSource)
|
| | | {
|
| | | return H264VideoRTPSink::createNew(envir(), rtpGroupsock,rtpPayloadTypeIfDynamic);
|
| | | }
|
| | |
|
| | | char const* LiveServerMediaSubsession::sdpLines()
|
| | | {
|
| | | if (m_SDPLines.empty())
|
| | | {
|
| | | FramedSource* source = m_replicator->createStreamReplica();
|
| | | return H264VideoStreamDiscreteFramer::createNew(envir(), source);
|
| | | m_SDPLines.assign(OnDemandServerMediaSubsession::sdpLines());
|
| | |
|
| | | H264FramedSource* framedSource = nullptr;
|
| | | {
|
| | | FramedSource* _framedSource = m_replicator->inputSource();
|
| | | framedSource = dynamic_cast<H264FramedSource*>(_framedSource);
|
| | | };
|
| | |
|
| | | if (framedSource != nullptr)
|
| | | {
|
| | | m_SDPLines.append(framedSource->getAuxLine());
|
| | | }
|
| | | }
|
| | | |
| | | RTPSink* LiveServerMediaSubsession::createNewRTPSink(Groupsock* rtpGroupsock, unsigned char rtpPayloadTypeIfDynamic, FramedSource* inputSource)
|
| | | {
|
| | | return H264VideoRTPSink::createNew(envir(), rtpGroupsock,rtpPayloadTypeIfDynamic);
|
| | | }
|
| | |
|
| | | return m_SDPLines.c_str();
|
| | | }
|
| | |
|
| | | }
|