1/* ---------------------------------------------------------------------------
2** This software is in the public domain, furnished "as is", without technical
3** support, and with no warranty, express or implied, as to its usefulness for
4** any purpose.
5**
6** ServerMediaSubsession.cpp
7**
8** -------------------------------------------------------------------------*/
9
10
11#include "UnicastServerMediaSubsession.h"
12#include "DeviceSource.h"
13
14// -----------------------------------------
15// ServerMediaSubsession for Unicast
16// -----------------------------------------
17UnicastServerMediaSubsession* UnicastServerMediaSubsession::createNew(UsageEnvironment& env, StreamReplicator* replicator, const std::string& format)
18{
19 return new UnicastServerMediaSubsession(env,replicator,format);
20}
21
22FramedSource* UnicastServerMediaSubsession::createNewStreamSource(unsigned clientSessionId, unsigned& estBitrate)
23{
24 FramedSource* source = m_replicator->createStreamReplica();
25 return createSource(envir(), source, m_format);
26}
27
28RTPSink* UnicastServerMediaSubsession::createNewRTPSink(Groupsock* rtpGroupsock, unsigned char rtpPayloadTypeIfDynamic, FramedSource* inputSource)
29{
30 return createSink(envir(), rtpGroupsock, rtpPayloadTypeIfDynamic, m_format, dynamic_cast<V4L2DeviceSource*>(m_replicator->inputSource()));
31}
32
33char const* UnicastServerMediaSubsession::getAuxSDPLine(RTPSink* rtpSink,FramedSource* inputSource)
34{
35 return this->getAuxLine(dynamic_cast<V4L2DeviceSource*>(m_replicator->inputSource()), rtpSink);
36}
37
38