Remove deprecated functions.
This CL removes some functions that are marked as deprecated. Chromium has been updated in https://crrev.com/7dee3f68b7699ad72c7fc4d75332f72703313849 to call the new functions. Review URL: https://codereview.webrtc.org/1237613003 Cr-Commit-Position: refs/heads/master@{#9598}
This commit is contained in:
@ -71,11 +71,6 @@ class IceCandidateInterface {
|
||||
|
||||
// Creates a IceCandidateInterface based on SDP string.
|
||||
// Returns NULL if the sdp string can't be parsed.
|
||||
// TODO(ronghuawu): Deprecated.
|
||||
IceCandidateInterface* CreateIceCandidate(const std::string& sdp_mid,
|
||||
int sdp_mline_index,
|
||||
const std::string& sdp);
|
||||
|
||||
// |error| can be NULL if doesn't care about the failure reason.
|
||||
IceCandidateInterface* CreateIceCandidate(const std::string& sdp_mid,
|
||||
int sdp_mline_index,
|
||||
@ -128,10 +123,6 @@ class SessionDescriptionInterface {
|
||||
|
||||
// Creates a SessionDescriptionInterface based on SDP string and the type.
|
||||
// Returns NULL if the sdp string can't be parsed or the type is unsupported.
|
||||
// TODO(ronghuawu): Deprecated.
|
||||
SessionDescriptionInterface* CreateSessionDescription(const std::string& type,
|
||||
const std::string& sdp);
|
||||
|
||||
// |error| can be NULL if doesn't care about the failure reason.
|
||||
SessionDescriptionInterface* CreateSessionDescription(const std::string& type,
|
||||
const std::string& sdp,
|
||||
|
||||
@ -34,12 +34,6 @@
|
||||
|
||||
namespace webrtc {
|
||||
|
||||
IceCandidateInterface* CreateIceCandidate(const std::string& sdp_mid,
|
||||
int sdp_mline_index,
|
||||
const std::string& sdp) {
|
||||
return CreateIceCandidate(sdp_mid, sdp_mline_index, sdp, NULL);
|
||||
}
|
||||
|
||||
IceCandidateInterface* CreateIceCandidate(const std::string& sdp_mid,
|
||||
int sdp_mline_index,
|
||||
const std::string& sdp,
|
||||
|
||||
@ -75,11 +75,6 @@ const int JsepSessionDescription::kMaxVideoCodecHeight = 1080;
|
||||
#endif
|
||||
const int JsepSessionDescription::kDefaultVideoCodecPreference = 1;
|
||||
|
||||
SessionDescriptionInterface* CreateSessionDescription(const std::string& type,
|
||||
const std::string& sdp) {
|
||||
return CreateSessionDescription(type, sdp, NULL);
|
||||
}
|
||||
|
||||
SessionDescriptionInterface* CreateSessionDescription(const std::string& type,
|
||||
const std::string& sdp,
|
||||
SdpParseError* error) {
|
||||
|
||||
@ -80,7 +80,8 @@
|
||||
|
||||
- (const webrtc::IceCandidateInterface*)candidate {
|
||||
return webrtc::CreateIceCandidate(
|
||||
[self.sdpMid UTF8String], self.sdpMLineIndex, [self.sdp UTF8String]);
|
||||
[self.sdpMid UTF8String], self.sdpMLineIndex, [self.sdp UTF8String],
|
||||
nullptr);
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
@ -1101,7 +1101,7 @@ TEST_F(PeerConnectionInterfaceTest, ReceiveFireFoxOffer) {
|
||||
AddAudioVideoStream(kStreamLabel1, "audio_label", "video_label");
|
||||
SessionDescriptionInterface* desc =
|
||||
webrtc::CreateSessionDescription(SessionDescriptionInterface::kOffer,
|
||||
webrtc::kFireFoxSdpOffer);
|
||||
webrtc::kFireFoxSdpOffer, nullptr);
|
||||
EXPECT_TRUE(DoSetSessionDescription(desc, false));
|
||||
CreateAnswerAsLocalDescription();
|
||||
ASSERT_TRUE(pc_->local_description() != NULL);
|
||||
@ -1134,12 +1134,13 @@ TEST_F(PeerConnectionInterfaceTest, ReceiveUpdatedAudioOfferWithBadCodecs) {
|
||||
|
||||
SessionDescriptionInterface* answer =
|
||||
webrtc::CreateSessionDescription(SessionDescriptionInterface::kAnswer,
|
||||
webrtc::kAudioSdp);
|
||||
webrtc::kAudioSdp, nullptr);
|
||||
EXPECT_TRUE(DoSetSessionDescription(answer, false));
|
||||
|
||||
SessionDescriptionInterface* updated_offer =
|
||||
webrtc::CreateSessionDescription(SessionDescriptionInterface::kOffer,
|
||||
webrtc::kAudioSdpWithUnsupportedCodecs);
|
||||
webrtc::kAudioSdpWithUnsupportedCodecs,
|
||||
nullptr);
|
||||
EXPECT_TRUE(DoSetSessionDescription(updated_offer, false));
|
||||
CreateAnswerAsLocalDescription();
|
||||
}
|
||||
|
||||
@ -1085,7 +1085,8 @@ class WebRtcSessionTest : public testing::Test {
|
||||
std::string sdp;
|
||||
offer->ToString(&sdp);
|
||||
SessionDescriptionInterface* desc =
|
||||
webrtc::CreateSessionDescription(JsepSessionDescription::kAnswer, sdp);
|
||||
webrtc::CreateSessionDescription(
|
||||
JsepSessionDescription::kAnswer, sdp, nullptr);
|
||||
ASSERT_TRUE(desc != NULL);
|
||||
SetRemoteDescriptionWithoutError(desc);
|
||||
|
||||
|
||||
@ -302,10 +302,12 @@ void Conductor::OnMessageFromPeer(int peer_id, const std::string& message) {
|
||||
LOG(WARNING) << "Can't parse received session description message.";
|
||||
return;
|
||||
}
|
||||
webrtc::SdpParseError error;
|
||||
webrtc::SessionDescriptionInterface* session_description(
|
||||
webrtc::CreateSessionDescription(type, sdp));
|
||||
webrtc::CreateSessionDescription(type, sdp, &error));
|
||||
if (!session_description) {
|
||||
LOG(WARNING) << "Can't parse received session description message.";
|
||||
LOG(WARNING) << "Can't parse received session description message. "
|
||||
<< "SdpParseError was: " << error.description;
|
||||
return;
|
||||
}
|
||||
LOG(INFO) << " Received session description :" << message;
|
||||
@ -328,10 +330,12 @@ void Conductor::OnMessageFromPeer(int peer_id, const std::string& message) {
|
||||
LOG(WARNING) << "Can't parse received message.";
|
||||
return;
|
||||
}
|
||||
webrtc::SdpParseError error;
|
||||
rtc::scoped_ptr<webrtc::IceCandidateInterface> candidate(
|
||||
webrtc::CreateIceCandidate(sdp_mid, sdp_mlineindex, sdp));
|
||||
webrtc::CreateIceCandidate(sdp_mid, sdp_mlineindex, sdp, &error));
|
||||
if (!candidate.get()) {
|
||||
LOG(WARNING) << "Can't parse received candidate message.";
|
||||
LOG(WARNING) << "Can't parse received candidate message. "
|
||||
<< "SdpParseError was: " << error.description;
|
||||
return;
|
||||
}
|
||||
if (!peer_connection_->AddIceCandidate(candidate.get())) {
|
||||
@ -536,7 +540,7 @@ void Conductor::OnSuccess(webrtc::SessionDescriptionInterface* desc) {
|
||||
if (loopback_) {
|
||||
// Replace message type from "offer" to "answer"
|
||||
webrtc::SessionDescriptionInterface* session_description(
|
||||
webrtc::CreateSessionDescription("answer", sdp));
|
||||
webrtc::CreateSessionDescription("answer", sdp, nullptr));
|
||||
peer_connection_->SetRemoteDescription(
|
||||
DummySetSessionDescriptionObserver::Create(), session_description);
|
||||
return;
|
||||
|
||||
@ -303,25 +303,6 @@ inline const StreamParams* GetStream(const StreamParamsVec& streams,
|
||||
[&selector](const StreamParams& sp) { return selector.Matches(sp); });
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// Deprecated methods that will be removed one of these days.
|
||||
// Please use the methods with the same name above.
|
||||
bool GetStream(const StreamParamsVec& streams,
|
||||
const StreamSelector& selector,
|
||||
StreamParams* stream_out);
|
||||
inline bool GetStreamBySsrc(const StreamParamsVec& streams, uint32 ssrc,
|
||||
StreamParams* stream_out) {
|
||||
return GetStream(streams, StreamSelector(ssrc), stream_out);
|
||||
}
|
||||
inline bool GetStreamByIds(const StreamParamsVec& streams,
|
||||
const std::string& groupid,
|
||||
const std::string& id,
|
||||
StreamParams* stream_out) {
|
||||
return GetStream(streams, StreamSelector(groupid, id), stream_out);
|
||||
}
|
||||
// End deprecated methods.
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
template <class Condition>
|
||||
bool RemoveStream(StreamParamsVec* streams, Condition condition) {
|
||||
auto iter(std::remove_if(streams->begin(), streams->end(), condition));
|
||||
|
||||
Reference in New Issue
Block a user