Step 1 to remove MediaContentDirection
This change adds |transceiver_direction()| and |set_transceiver_direction()| to MediaContentDescription so that external users can switch off of MediaContentDirection. This deprecates the use of |direction()| and |set_direction()| for external users. Once everyone has moved off of those methods, the signiture will change to return/set RtpTransceiverDirection. Then external users can move back to these methods with the new signature. Bug: webrtc:8558 Change-Id: I7e3ba289d3a0ac738b364b0388621cc3e7bcf5d3 Reviewed-on: https://webrtc-review.googlesource.com/24743 Commit-Queue: Steve Anton <steveanton@webrtc.org> Reviewed-by: Peter Thatcher <pthatcher@webrtc.org> Cr-Commit-Position: refs/heads/master@{#20900}
This commit is contained in:
@ -163,11 +163,24 @@ class MediaContentDescription : public ContentDescription {
|
||||
std::string protocol() const { return protocol_; }
|
||||
void set_protocol(const std::string& protocol) { protocol_ = protocol; }
|
||||
|
||||
MediaContentDirection direction() const { return direction_; }
|
||||
void set_direction(MediaContentDirection direction) {
|
||||
// TODO(steveanton): Remove once |direction()| uses RtpTransceiverDirection.
|
||||
webrtc::RtpTransceiverDirection transceiver_direction() const {
|
||||
return direction_;
|
||||
}
|
||||
void set_transceiver_direction(webrtc::RtpTransceiverDirection direction) {
|
||||
direction_ = direction;
|
||||
}
|
||||
|
||||
// MediaContentDirection is deprecated; use RtpTransceiverDirection instead.
|
||||
// TODO(steveanton): Change this method to return RtpTransceiverDirection once
|
||||
// external users have switched to |transceiver_direction()|.
|
||||
MediaContentDirection direction() const {
|
||||
return MediaContentDirectionFromRtpTransceiverDirection(direction_);
|
||||
}
|
||||
void set_direction(MediaContentDirection direction) {
|
||||
direction_ = RtpTransceiverDirectionFromMediaContentDirection(direction);
|
||||
}
|
||||
|
||||
bool rtcp_mux() const { return rtcp_mux_; }
|
||||
void set_rtcp_mux(bool mux) { rtcp_mux_ = mux; }
|
||||
|
||||
@ -295,7 +308,8 @@ class MediaContentDescription : public ContentDescription {
|
||||
StreamParamsVec streams_;
|
||||
bool conference_mode_ = false;
|
||||
bool partial_ = false;
|
||||
MediaContentDirection direction_ = MD_SENDRECV;
|
||||
webrtc::RtpTransceiverDirection direction_ =
|
||||
webrtc::RtpTransceiverDirection::kSendRecv;
|
||||
rtc::SocketAddress connection_address_;
|
||||
};
|
||||
|
||||
|
Reference in New Issue
Block a user