MCPcopy Create free account
hub / github.com/Barracuda09/SATPI / getDescribeMediaLevelString

Method getDescribeMediaLevelString

src/Stream.cpp:128–148  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

126}
127
128std::string Stream::getDescribeMediaLevelString() const {
129 static const char *RTSP_DESCRIBE_MEDIA_LEVEL =
130 "m=video %1 RTP/AVP 33\r\n" \
131 "c=IN IP4 %2\r\n" \
132 "a=control:stream=%3\r\n" \
133 "a=fmtp:33 %4\r\n" \
134 "a=%5\r\n";
135 const std::string desc_attr = _device->attributeDescribeString();
136 if (desc_attr.size() > 5) {
137 if (_streamingType == StreamingType::RTSP_MULTICAST) {
138 return StringConverter::stringFormat(RTSP_DESCRIBE_MEDIA_LEVEL,
139 _client[0].getRtpSocketAttr().getSocketPort(),
140 _client[0].getIPAddressOfStream() + "/0",
141 _streamID, desc_attr, (_streamActive) ? "sendonly" : "inactive");
142 } else {
143 return StringConverter::stringFormat(RTSP_DESCRIBE_MEDIA_LEVEL,
144 0, "0.0.0.0", _streamID, desc_attr, (_streamActive) ? "sendonly" : "inactive");
145 }
146 }
147 return "";
148}
149
150// =======================================================================
151// -- base::XMLSupport --------------------------------------------------

Callers 1

methodDescribeMethod · 0.45

Calls 3

getSocketPortMethod · 0.80
getIPAddressOfStreamMethod · 0.80

Tested by

no test coverage detected