|
@@ -383,15 +383,18 @@ string Description::Entry::generateSdp(string_view eol) const {
|
|
sdp << "a=mid:" << mMid << eol;
|
|
sdp << "a=mid:" << mMid << eol;
|
|
|
|
|
|
switch (mDirection) {
|
|
switch (mDirection) {
|
|
- case Direction::RecvOnly:
|
|
|
|
- sdp << "a=recvonly" << eol;
|
|
|
|
- break;
|
|
|
|
case Direction::SendOnly:
|
|
case Direction::SendOnly:
|
|
sdp << "a=sendonly" << eol;
|
|
sdp << "a=sendonly" << eol;
|
|
break;
|
|
break;
|
|
|
|
+ case Direction::RecvOnly:
|
|
|
|
+ sdp << "a=recvonly" << eol;
|
|
|
|
+ break;
|
|
case Direction::SendRecv:
|
|
case Direction::SendRecv:
|
|
sdp << "a=sendrecv" << eol;
|
|
sdp << "a=sendrecv" << eol;
|
|
break;
|
|
break;
|
|
|
|
+ case Direction::Inactive:
|
|
|
|
+ sdp << "a=inactive" << eol;
|
|
|
|
+ break;
|
|
default:
|
|
default:
|
|
// Ignore
|
|
// Ignore
|
|
break;
|
|
break;
|
|
@@ -410,12 +413,14 @@ void Description::Entry::parseSdpLine(string_view line) {
|
|
|
|
|
|
if (key == "mid")
|
|
if (key == "mid")
|
|
mMid = value;
|
|
mMid = value;
|
|
- else if (key == "sendrecv")
|
|
|
|
- mDirection = Direction::SendRecv;
|
|
|
|
- else if (attr == "recvonly")
|
|
|
|
- mDirection = Direction::RecvOnly;
|
|
|
|
else if (attr == "sendonly")
|
|
else if (attr == "sendonly")
|
|
mDirection = Direction::SendOnly;
|
|
mDirection = Direction::SendOnly;
|
|
|
|
+ else if (attr == "recvonly")
|
|
|
|
+ mDirection = Direction::RecvOnly;
|
|
|
|
+ else if (key == "sendrecv")
|
|
|
|
+ mDirection = Direction::SendRecv;
|
|
|
|
+ else if (key == "inactive")
|
|
|
|
+ mDirection = Direction::Inactive;
|
|
else
|
|
else
|
|
mAttributes.emplace_back(line.substr(2));
|
|
mAttributes.emplace_back(line.substr(2));
|
|
}
|
|
}
|
|
@@ -516,6 +521,8 @@ Description::Media::RTPMap &Description::Media::getFormat(const string &fmt) {
|
|
throw std::invalid_argument("format was not found");
|
|
throw std::invalid_argument("format was not found");
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+void Description::Media::setDirection(Direction dir) { mDirection = dir; }
|
|
|
|
+
|
|
void Description::Media::removeFormat(const string &fmt) {
|
|
void Description::Media::removeFormat(const string &fmt) {
|
|
auto it = mRtpMap.begin();
|
|
auto it = mRtpMap.begin();
|
|
std::vector<int> remed;
|
|
std::vector<int> remed;
|