RsServerMediaSubsession.cpp
Go to the documentation of this file.
1 // License: Apache 2.0. See LICENSE file in root directory.
2 // Copyright(c) 2020 Intel Corporation. All Rights Reserved.
3 
5 #include "RsCommon.h"
6 #include "RsServerMediaSession.h"
7 #include "RsSimpleRTPSink.h"
8 
9 #define CAPACITY 100
10 
11 RsServerMediaSubsession* RsServerMediaSubsession::createNew(UsageEnvironment& t_env, rs2::video_stream_profile& t_videoStreamProfile, std::shared_ptr<RsDevice> rsDevice)
12 {
13  return new RsServerMediaSubsession(t_env, t_videoStreamProfile, rsDevice);
14 }
15 
16 RsServerMediaSubsession ::RsServerMediaSubsession(UsageEnvironment& env, rs2::video_stream_profile& t_videoStreamProfile, std::shared_ptr<RsDevice> device)
17  : OnDemandServerMediaSubsession(env, false)
18  , m_videoStreamProfile(t_videoStreamProfile)
19 {
22 }
23 
25 
27 {
28  return m_frameQueue;
29 }
30 
32 {
33  return m_videoStreamProfile;
34 }
35 
36 FramedSource* RsServerMediaSubsession::createNewStreamSource(unsigned /*t_clientSessionId*/, unsigned& t_estBitrate)
37 {
38  t_estBitrate = 20000;
40 }
41 
42 RTPSink* RsServerMediaSubsession ::createNewRTPSink(Groupsock* t_rtpGroupsock, unsigned char t_rtpPayloadTypeIfDynamic, FramedSource* /*t_inputSource*/)
43 {
45 }
#define CAPACITY
std::shared_ptr< RsDevice > m_rsDevice
const std::string RS_MEDIA_TYPE("RS_VIDEO")
const unsigned int RTP_TIMESTAMP_FREQ
Definition: RsCommon.h:54
virtual FramedSource * createNewStreamSource(unsigned t_clientSessionId, unsigned &t_estBitrate)
RsServerMediaSubsession(UsageEnvironment &t_env, rs2::video_stream_profile &t_video_stream_profile, std::shared_ptr< RsDevice > device)
rs2::video_stream_profile getStreamProfile()
virtual RTPSink * createNewRTPSink(Groupsock *t_rtpGroupsock, unsigned char t_rtpPayloadTypeIfDynamic, FramedSource *t_inputSource)
rs2::video_stream_profile m_videoStreamProfile
rs2::frame_queue & getFrameQueue()
static RsServerMediaSubsession * createNew(UsageEnvironment &t_env, rs2::video_stream_profile &t_videoStreamProfile, std::shared_ptr< RsDevice > rsDevice)
const std::string RS_PAYLOAD_FORMAT("RS_FORMAT")
static RsDeviceSource * createNew(UsageEnvironment &t_env, rs2::video_stream_profile &t_videoStreamProfile, rs2::frame_queue &t_queue)
Definition: RsSource.cpp:14
static RsSimpleRTPSink * createNew(UsageEnvironment &env, Groupsock *RTPgs, unsigned char rtpPayloadFormat, unsigned rtpTimestampFrequency, char const *sdpMediaTypeString, char const *rtpPayloadFormatName, rs2::video_stream_profile &video_stream, std::shared_ptr< RsDevice > device, unsigned numChannels=1, Boolean allowMultipleFramesPerPacket=True, Boolean doNormalMBitRule=True)
rs2_stream stream_type() const
Definition: rs_frame.hpp:39
auto device
Definition: pyrs_net.cpp:17


librealsense2
Author(s): Sergey Dorodnicov , Doron Hirshberg , Mark Horn , Reagan Lopez , Itay Carpis
autogenerated on Mon May 3 2021 02:47:41