diff --git a/pc/session_description.h b/pc/session_description.h index b7da8e05b4..901abc5984 100644 --- a/pc/session_description.h +++ b/pc/session_description.h @@ -87,9 +87,6 @@ class MediaContentDescription { virtual bool has_codecs() const = 0; - RTC_DEPRECATED virtual MediaContentDescription* Copy() const { - return CloneInternal(); - } // Copy operator that returns an unique_ptr. // Not a virtual function. // If a type-specific variant of Clone() is desired, override it, or @@ -349,9 +346,6 @@ class AudioContentDescription : public MediaContentDescriptionImpl { public: AudioContentDescription() {} - RTC_DEPRECATED virtual AudioContentDescription* Copy() const { - return CloneInternal(); - } virtual MediaType type() const { return MEDIA_TYPE_AUDIO; } virtual AudioContentDescription* as_audio() { return this; } virtual const AudioContentDescription* as_audio() const { return this; } @@ -364,9 +358,6 @@ class AudioContentDescription : public MediaContentDescriptionImpl { class VideoContentDescription : public MediaContentDescriptionImpl { public: - RTC_DEPRECATED virtual VideoContentDescription* Copy() const { - return CloneInternal(); - } virtual MediaType type() const { return MEDIA_TYPE_VIDEO; } virtual VideoContentDescription* as_video() { return this; } virtual const VideoContentDescription* as_video() const { return this; } diff --git a/pc/webrtc_sdp_unittest.cc b/pc/webrtc_sdp_unittest.cc index f79fbb8786..b849f01864 100644 --- a/pc/webrtc_sdp_unittest.cc +++ b/pc/webrtc_sdp_unittest.cc @@ -1195,8 +1195,8 @@ class WebRtcSdpTest : public ::testing::Test { // Turns the existing reference description into a plan B description, // with 2 audio tracks and 3 video tracks. void MakePlanBDescription() { - audio_desc_ = audio_desc_->Copy(); - video_desc_ = video_desc_->Copy(); + audio_desc_ = new AudioContentDescription(*audio_desc_); + video_desc_ = new VideoContentDescription(*video_desc_); StreamParams audio_track_2; audio_track_2.id = kAudioTrackId2; @@ -1713,8 +1713,8 @@ class WebRtcSdpTest : public ::testing::Test { } void AddExtmap(bool encrypted) { - audio_desc_ = audio_desc_->Copy(); - video_desc_ = video_desc_->Copy(); + audio_desc_ = new AudioContentDescription(*audio_desc_); + video_desc_ = new VideoContentDescription(*video_desc_); audio_desc_->AddRtpHeaderExtension( RtpExtension(kExtmapUri, kExtmapId, encrypted)); video_desc_->AddRtpHeaderExtension( @@ -1794,8 +1794,8 @@ class WebRtcSdpTest : public ::testing::Test { } bool TestSerializeRejected(bool audio_rejected, bool video_rejected) { - audio_desc_ = audio_desc_->Copy(); - video_desc_ = video_desc_->Copy(); + audio_desc_ = new AudioContentDescription(*audio_desc_); + video_desc_ = new VideoContentDescription(*video_desc_); desc_.RemoveContentByName(kAudioContentName); desc_.RemoveContentByName(kVideoContentName); @@ -1876,8 +1876,8 @@ class WebRtcSdpTest : public ::testing::Test { JsepSessionDescription new_jdesc(SdpType::kOffer); EXPECT_TRUE(SdpDeserialize(new_sdp, &new_jdesc)); - audio_desc_ = audio_desc_->Copy(); - video_desc_ = video_desc_->Copy(); + audio_desc_ = new AudioContentDescription(*audio_desc_); + video_desc_ = new VideoContentDescription(*video_desc_); desc_.RemoveContentByName(kAudioContentName); desc_.RemoveContentByName(kVideoContentName); desc_.AddContent(kAudioContentName, MediaProtocolType::kRtp, audio_rejected,