| 126 | } |
| 127 | |
| 128 | std::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 -------------------------------------------------- |
no test coverage detected