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 1597 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1608 RTC_NOTREACHED() << "Not implemented"; | 1608 RTC_NOTREACHED() << "Not implemented"; |
1609 break; | 1609 break; |
1610 } | 1610 } |
1611 } | 1611 } |
1612 | 1612 |
1613 void PeerConnection::CreateAudioReceiver(MediaStreamInterface* stream, | 1613 void PeerConnection::CreateAudioReceiver(MediaStreamInterface* stream, |
1614 const std::string& track_id, | 1614 const std::string& track_id, |
1615 uint32_t ssrc) { | 1615 uint32_t ssrc) { |
1616 rtc::scoped_refptr<RtpReceiverProxyWithInternal<RtpReceiverInternal>> | 1616 rtc::scoped_refptr<RtpReceiverProxyWithInternal<RtpReceiverInternal>> |
1617 receiver = RtpReceiverProxyWithInternal<RtpReceiverInternal>::Create( | 1617 receiver = RtpReceiverProxyWithInternal<RtpReceiverInternal>::Create( |
1618 signaling_thread(), new AudioRtpReceiver(stream, track_id, ssrc, | 1618 signaling_thread(), |
1619 session_->voice_channel())); | 1619 new AudioRtpReceiver(track_id, ssrc, session_->voice_channel())); |
1620 | 1620 stream->AddTrack( |
| 1621 static_cast<AudioTrackInterface*>(receiver->internal()->track().get())); |
1621 receivers_.push_back(receiver); | 1622 receivers_.push_back(receiver); |
1622 std::vector<rtc::scoped_refptr<MediaStreamInterface>> streams; | 1623 std::vector<rtc::scoped_refptr<MediaStreamInterface>> streams; |
1623 streams.push_back(rtc::scoped_refptr<MediaStreamInterface>(stream)); | 1624 streams.push_back(rtc::scoped_refptr<MediaStreamInterface>(stream)); |
1624 observer_->OnAddTrack(receiver, streams); | 1625 observer_->OnAddTrack(receiver, streams); |
1625 } | 1626 } |
1626 | 1627 |
1627 void PeerConnection::CreateVideoReceiver(MediaStreamInterface* stream, | 1628 void PeerConnection::CreateVideoReceiver(MediaStreamInterface* stream, |
1628 const std::string& track_id, | 1629 const std::string& track_id, |
1629 uint32_t ssrc) { | 1630 uint32_t ssrc) { |
1630 rtc::scoped_refptr<RtpReceiverProxyWithInternal<RtpReceiverInternal>> | 1631 rtc::scoped_refptr<RtpReceiverProxyWithInternal<RtpReceiverInternal>> |
1631 receiver = RtpReceiverProxyWithInternal<RtpReceiverInternal>::Create( | 1632 receiver = RtpReceiverProxyWithInternal<RtpReceiverInternal>::Create( |
1632 signaling_thread(), | 1633 signaling_thread(), |
1633 new VideoRtpReceiver(stream, track_id, factory_->worker_thread(), | 1634 new VideoRtpReceiver(track_id, factory_->worker_thread(), ssrc, |
1634 ssrc, session_->video_channel())); | 1635 session_->video_channel())); |
| 1636 stream->AddTrack( |
| 1637 static_cast<VideoTrackInterface*>(receiver->internal()->track().get())); |
1635 receivers_.push_back(receiver); | 1638 receivers_.push_back(receiver); |
1636 std::vector<rtc::scoped_refptr<MediaStreamInterface>> streams; | 1639 std::vector<rtc::scoped_refptr<MediaStreamInterface>> streams; |
1637 streams.push_back(rtc::scoped_refptr<MediaStreamInterface>(stream)); | 1640 streams.push_back(rtc::scoped_refptr<MediaStreamInterface>(stream)); |
1638 observer_->OnAddTrack(receiver, streams); | 1641 observer_->OnAddTrack(receiver, streams); |
1639 } | 1642 } |
1640 | 1643 |
1641 // TODO(deadbeef): Keep RtpReceivers around even if track goes away in remote | 1644 // TODO(deadbeef): Keep RtpReceivers around even if track goes away in remote |
1642 // description. | 1645 // description. |
1643 void PeerConnection::DestroyReceiver(const std::string& track_id) { | 1646 void PeerConnection::DestroyReceiver(const std::string& track_id) { |
1644 auto it = FindReceiverForTrack(track_id); | 1647 auto it = FindReceiverForTrack(track_id); |
(...skipping 913 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2558 } | 2561 } |
2559 return event_log_->StartLogging(file, max_size_bytes); | 2562 return event_log_->StartLogging(file, max_size_bytes); |
2560 } | 2563 } |
2561 | 2564 |
2562 void PeerConnection::StopRtcEventLog_w() { | 2565 void PeerConnection::StopRtcEventLog_w() { |
2563 if (event_log_) { | 2566 if (event_log_) { |
2564 event_log_->StopLogging(); | 2567 event_log_->StopLogging(); |
2565 } | 2568 } |
2566 } | 2569 } |
2567 } // namespace webrtc | 2570 } // namespace webrtc |
OLD | NEW |