Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 /* | 1 /* |
| 2 * Copyright 2012 The WebRTC project authors. All Rights Reserved. | 2 * Copyright 2012 The WebRTC project authors. All Rights Reserved. |
| 3 * | 3 * |
| 4 * Use of this source code is governed by a BSD-style license | 4 * Use of this source code is governed by a BSD-style license |
| 5 * that can be found in the LICENSE file in the root of the source | 5 * that can be found in the LICENSE file in the root of the source |
| 6 * tree. An additional intellectual property rights grant can be found | 6 * tree. An additional intellectual property rights grant can be found |
| 7 * in the file PATENTS. All contributing project authors may | 7 * in the file PATENTS. All contributing project authors may |
| 8 * be found in the AUTHORS file in the root of the source tree. | 8 * be found in the AUTHORS file in the root of the source tree. |
| 9 */ | 9 */ |
| 10 | 10 |
| (...skipping 1926 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1937 // VideoRtpReceiver::track(). | 1937 // VideoRtpReceiver::track(). |
| 1938 DestroyReceiver(track_id); | 1938 DestroyReceiver(track_id); |
| 1939 rtc::scoped_refptr<VideoTrackInterface> video_track = | 1939 rtc::scoped_refptr<VideoTrackInterface> video_track = |
| 1940 stream->FindVideoTrack(track_id); | 1940 stream->FindVideoTrack(track_id); |
| 1941 if (video_track) { | 1941 if (video_track) { |
| 1942 // There's no guarantee the track is still available, e.g. the track may | 1942 // There's no guarantee the track is still available, e.g. the track may |
| 1943 // have been removed from the stream by an application. | 1943 // have been removed from the stream by an application. |
| 1944 stream->RemoveTrack(video_track); | 1944 stream->RemoveTrack(video_track); |
| 1945 } | 1945 } |
| 1946 } else { | 1946 } else { |
| 1947 ASSERT(false && "Invalid media type"); | 1947 RTC_DCHECK(false && "Invalid media type"); |
|
kwiberg-webrtc
2017/01/12 02:10:41
RTC_NOTREACHED with a message?
| |
| 1948 } | 1948 } |
| 1949 } | 1949 } |
| 1950 | 1950 |
| 1951 void PeerConnection::UpdateEndedRemoteMediaStreams() { | 1951 void PeerConnection::UpdateEndedRemoteMediaStreams() { |
| 1952 std::vector<rtc::scoped_refptr<MediaStreamInterface>> streams_to_remove; | 1952 std::vector<rtc::scoped_refptr<MediaStreamInterface>> streams_to_remove; |
| 1953 for (size_t i = 0; i < remote_streams_->count(); ++i) { | 1953 for (size_t i = 0; i < remote_streams_->count(); ++i) { |
| 1954 MediaStreamInterface* stream = remote_streams_->at(i); | 1954 MediaStreamInterface* stream = remote_streams_->at(i); |
| 1955 if (stream->GetAudioTracks().empty() && stream->GetVideoTracks().empty()) { | 1955 if (stream->GetAudioTracks().empty() && stream->GetVideoTracks().empty()) { |
| 1956 streams_to_remove.push_back(stream); | 1956 streams_to_remove.push_back(stream); |
| 1957 } | 1957 } |
| (...skipping 479 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2437 | 2437 |
| 2438 bool PeerConnection::StartRtcEventLog_w(rtc::PlatformFile file, | 2438 bool PeerConnection::StartRtcEventLog_w(rtc::PlatformFile file, |
| 2439 int64_t max_size_bytes) { | 2439 int64_t max_size_bytes) { |
| 2440 return event_log_->StartLogging(file, max_size_bytes); | 2440 return event_log_->StartLogging(file, max_size_bytes); |
| 2441 } | 2441 } |
| 2442 | 2442 |
| 2443 void PeerConnection::StopRtcEventLog_w() { | 2443 void PeerConnection::StopRtcEventLog_w() { |
| 2444 event_log_->StopLogging(); | 2444 event_log_->StopLogging(); |
| 2445 } | 2445 } |
| 2446 } // namespace webrtc | 2446 } // namespace webrtc |
| OLD | NEW |