Index: webrtc/pc/peerconnection.cc |
diff --git a/webrtc/pc/peerconnection.cc b/webrtc/pc/peerconnection.cc |
index cbd0d4b25a861b788e7f65d478ebf749ba90c1b6..bb4fa299cea7220c82d42d4efe11b6b223528887 100644 |
--- a/webrtc/pc/peerconnection.cc |
+++ b/webrtc/pc/peerconnection.cc |
@@ -455,27 +455,6 @@ bool SafeSetError(webrtc::RTCErrorType type, webrtc::RTCError* error) { |
namespace webrtc { |
-static const char* const kRTCErrorTypeNames[] = { |
- "NONE", |
- "UNSUPPORTED_PARAMETER", |
- "INVALID_PARAMETER", |
- "INVALID_RANGE", |
- "SYNTAX_ERROR", |
- "INVALID_STATE", |
- "INVALID_MODIFICATION", |
- "NETWORK_ERROR", |
- "INTERNAL_ERROR", |
-}; |
-static_assert(static_cast<int>(RTCErrorType::INTERNAL_ERROR) == |
- (arraysize(kRTCErrorTypeNames) - 1), |
- "kRTCErrorTypeNames must have as many strings as RTCErrorType " |
- "has values."); |
- |
-std::ostream& operator<<(std::ostream& stream, RTCErrorType error) { |
- int index = static_cast<int>(error); |
- return stream << kRTCErrorTypeNames[index]; |
-} |
- |
bool PeerConnectionInterface::RTCConfiguration::operator==( |
const PeerConnectionInterface::RTCConfiguration& o) const { |
// This static_assert prevents us from accidentally breaking operator==. |
@@ -1628,9 +1607,10 @@ void PeerConnection::CreateAudioReceiver(MediaStreamInterface* stream, |
uint32_t ssrc) { |
rtc::scoped_refptr<RtpReceiverProxyWithInternal<RtpReceiverInternal>> |
receiver = RtpReceiverProxyWithInternal<RtpReceiverInternal>::Create( |
- signaling_thread(), new AudioRtpReceiver(stream, track_id, ssrc, |
- session_->voice_channel())); |
- |
+ signaling_thread(), |
+ new AudioRtpReceiver(track_id, ssrc, session_->voice_channel())); |
+ stream->AddTrack( |
+ static_cast<AudioTrackInterface*>(receiver->internal()->track().get())); |
receivers_.push_back(receiver); |
std::vector<rtc::scoped_refptr<MediaStreamInterface>> streams; |
streams.push_back(rtc::scoped_refptr<MediaStreamInterface>(stream)); |
@@ -1643,8 +1623,10 @@ void PeerConnection::CreateVideoReceiver(MediaStreamInterface* stream, |
rtc::scoped_refptr<RtpReceiverProxyWithInternal<RtpReceiverInternal>> |
receiver = RtpReceiverProxyWithInternal<RtpReceiverInternal>::Create( |
signaling_thread(), |
- new VideoRtpReceiver(stream, track_id, factory_->worker_thread(), |
- ssrc, session_->video_channel())); |
+ new VideoRtpReceiver(track_id, factory_->worker_thread(), ssrc, |
+ session_->video_channel())); |
+ stream->AddTrack( |
+ static_cast<VideoTrackInterface*>(receiver->internal()->track().get())); |
receivers_.push_back(receiver); |
std::vector<rtc::scoped_refptr<MediaStreamInterface>> streams; |
streams.push_back(rtc::scoped_refptr<MediaStreamInterface>(stream)); |