OLD | NEW |
(Empty) | |
| 1 // Copyright (c) 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 "content/renderer/media/webrtc/rtc_rtp_contributing_source.h" |
| 6 |
| 7 #include "base/logging.h" |
| 8 #include "third_party/webrtc/base/scoped_ref_ptr.h" |
| 9 |
| 10 namespace content { |
| 11 |
| 12 RTCRtpContributingSource::RTCRtpContributingSource( |
| 13 const webrtc::RtpSource& source) |
| 14 : source_(source) {} |
| 15 |
| 16 RTCRtpContributingSource::~RTCRtpContributingSource() {} |
| 17 |
| 18 blink::WebRTCRtpContributingSourceType RTCRtpContributingSource::sourceType() |
| 19 const { |
| 20 switch (source_.source_type()) { |
| 21 case webrtc::RtpSourceType::RTP_SSRC_SOURCE: |
| 22 return blink::WebRTCRtpContributingSourceType::SSRC; |
| 23 case webrtc::RtpSourceType::RTP_CSRC_SOURCE: |
| 24 return blink::WebRTCRtpContributingSourceType::CSRC; |
| 25 default: |
| 26 NOTREACHED(); |
| 27 return blink::WebRTCRtpContributingSourceType::SSRC; |
| 28 } |
| 29 } |
| 30 |
| 31 double RTCRtpContributingSource::timestamp() const { |
| 32 return source_.timestamp(); |
| 33 } |
| 34 |
| 35 uint32_t RTCRtpContributingSource::source() const { |
| 36 return source_.source_id(); |
| 37 } |
| 38 |
| 39 } // namespace content |
OLD | NEW |