RtpTransceiver: add kStopped enumeration value.
This change introduces a new kStopped enumeration value to RtpTransceiverDirection, preparing for later CLs which implement RTP header extension control, https://chromestatus.com/feature/5680189201711104. The new enumeration value is unused in the code. Intent to prototype: https://groups.google.com/a/chromium.org/g/blink-dev/c/65YdUi02yZk Bug: chromium:980879 Change-Id: Id8cab9891236884542689fbf1b300e64a2cb636d Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/170050 Commit-Queue: Markus Handell <handellm@webrtc.org> Reviewed-by: Karl Wiberg <kwiberg@webrtc.org> Cr-Commit-Position: refs/heads/master@{#30756}
This commit is contained in:
parent
78964c1e0a
commit
45c104b4fd
@ -31,7 +31,8 @@ enum class RtpTransceiverDirection {
|
||||
kSendRecv,
|
||||
kSendOnly,
|
||||
kRecvOnly,
|
||||
kInactive
|
||||
kInactive,
|
||||
kStopped,
|
||||
};
|
||||
|
||||
// Structure for initializing an RtpTransceiver in a call to
|
||||
|
||||
@ -1749,10 +1749,11 @@ const AudioCodecs& MediaSessionDescriptionFactory::GetAudioCodecsForOffer(
|
||||
return audio_send_codecs_;
|
||||
case RtpTransceiverDirection::kRecvOnly:
|
||||
return audio_recv_codecs_;
|
||||
}
|
||||
case RtpTransceiverDirection::kStopped:
|
||||
RTC_NOTREACHED();
|
||||
return audio_sendrecv_codecs_;
|
||||
}
|
||||
}
|
||||
|
||||
const AudioCodecs& MediaSessionDescriptionFactory::GetAudioCodecsForAnswer(
|
||||
const RtpTransceiverDirection& offer,
|
||||
@ -1768,10 +1769,11 @@ const AudioCodecs& MediaSessionDescriptionFactory::GetAudioCodecsForAnswer(
|
||||
return audio_send_codecs_;
|
||||
case RtpTransceiverDirection::kRecvOnly:
|
||||
return audio_recv_codecs_;
|
||||
}
|
||||
case RtpTransceiverDirection::kStopped:
|
||||
RTC_NOTREACHED();
|
||||
return audio_sendrecv_codecs_;
|
||||
}
|
||||
}
|
||||
|
||||
void MergeCodecsFromDescription(
|
||||
const std::vector<const ContentInfo*>& current_active_contents,
|
||||
|
||||
@ -4785,6 +4785,8 @@ void TestAudioCodecsAnswer(RtpTransceiverDirection offer_direction,
|
||||
kResultSendrecv_SendrecvCodecs);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
RTC_NOTREACHED();
|
||||
}
|
||||
|
||||
auto format_codecs = [](const std::vector<AudioCodec>& codecs) {
|
||||
|
||||
@ -47,10 +47,11 @@ RtpTransceiverDirection RtpTransceiverDirectionReversed(
|
||||
return RtpTransceiverDirection::kRecvOnly;
|
||||
case RtpTransceiverDirection::kRecvOnly:
|
||||
return RtpTransceiverDirection::kSendOnly;
|
||||
}
|
||||
default:
|
||||
RTC_NOTREACHED();
|
||||
return direction;
|
||||
}
|
||||
}
|
||||
|
||||
RtpTransceiverDirection RtpTransceiverDirectionWithSendSet(
|
||||
RtpTransceiverDirection direction,
|
||||
@ -76,6 +77,8 @@ const char* RtpTransceiverDirectionToString(RtpTransceiverDirection direction) {
|
||||
return "kRecvOnly";
|
||||
case RtpTransceiverDirection::kInactive:
|
||||
return "kInactive";
|
||||
case RtpTransceiverDirection::kStopped:
|
||||
return "kStopped";
|
||||
}
|
||||
RTC_NOTREACHED();
|
||||
return "";
|
||||
|
||||
@ -1596,7 +1596,12 @@ void BuildRtpContentAttributes(const MediaContentDescription* media_desc,
|
||||
InitAttrLine(kAttributeRecvOnly, &os);
|
||||
break;
|
||||
case RtpTransceiverDirection::kSendRecv:
|
||||
InitAttrLine(kAttributeSendRecv, &os);
|
||||
break;
|
||||
case RtpTransceiverDirection::kStopped:
|
||||
default:
|
||||
// kStopped shouldn't be used in signalling.
|
||||
RTC_NOTREACHED();
|
||||
InitAttrLine(kAttributeSendRecv, &os);
|
||||
break;
|
||||
}
|
||||
|
||||
@ -979,7 +979,11 @@ static void ReplaceDirection(RtpTransceiverDirection direction,
|
||||
new_direction = "a=recvonly";
|
||||
break;
|
||||
case RtpTransceiverDirection::kSendRecv:
|
||||
new_direction = "a=sendrecv";
|
||||
break;
|
||||
case RtpTransceiverDirection::kStopped:
|
||||
default:
|
||||
RTC_NOTREACHED();
|
||||
new_direction = "a=sendrecv";
|
||||
break;
|
||||
}
|
||||
|
||||
@ -22,6 +22,7 @@ typedef NS_ENUM(NSInteger, RTCRtpTransceiverDirection) {
|
||||
RTCRtpTransceiverDirectionSendOnly,
|
||||
RTCRtpTransceiverDirectionRecvOnly,
|
||||
RTCRtpTransceiverDirectionInactive,
|
||||
RTCRtpTransceiverDirectionStopped
|
||||
};
|
||||
|
||||
/** Structure for initializing an RTCRtpTransceiver in a call to
|
||||
|
||||
@ -149,6 +149,8 @@
|
||||
return webrtc::RtpTransceiverDirection::kRecvOnly;
|
||||
case RTCRtpTransceiverDirectionInactive:
|
||||
return webrtc::RtpTransceiverDirection::kInactive;
|
||||
case RTCRtpTransceiverDirectionStopped:
|
||||
return webrtc::RtpTransceiverDirection::kStopped;
|
||||
}
|
||||
}
|
||||
|
||||
@ -163,6 +165,8 @@
|
||||
return RTCRtpTransceiverDirectionRecvOnly;
|
||||
case webrtc::RtpTransceiverDirection::kInactive:
|
||||
return RTCRtpTransceiverDirectionInactive;
|
||||
case webrtc::RtpTransceiverDirection::kStopped:
|
||||
return RTCRtpTransceiverDirectionStopped;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user