OLD | NEW |
---|---|
(Empty) | |
1 // Copyright 2017 The Chromium Authors. All rights reserved. | |
2 // Use of this source code is governed by a BSD-style license that can be | |
3 // found in the LICENSE file. | |
4 | |
5 #include "modules/peerconnection/RTCRtpReceiver.h" | |
6 | |
7 namespace blink { | |
8 | |
9 RTCRtpReceiver::RTCRtpReceiver(std::unique_ptr<WebRTCRtpReceiver> receiver, | |
10 MediaStreamTrack* track) | |
11 : m_receiver(std::move(receiver)), m_track(track) { | |
12 DCHECK(m_receiver); | |
13 DCHECK(m_track); | |
14 DCHECK_EQ(static_cast<String>(m_receiver->track().id()), m_track->id()); | |
15 } | |
16 | |
17 MediaStreamTrack* RTCRtpReceiver::track() const { | |
18 DCHECK_EQ(static_cast<String>(m_receiver->track().id()), m_track->id()); | |
foolip
2017/03/29 10:07:58
Is it possible for this to stop being true after t
hbos_chromium
2017/03/29 13:50:13
Considering it takes ownership of the receiver and
| |
19 return m_track; | |
20 } | |
21 | |
22 DEFINE_TRACE(RTCRtpReceiver) { | |
23 visitor->trace(m_track); | |
24 } | |
25 | |
26 } // namespace blink | |
OLD | NEW |