Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(301)

Side by Side Diff: content/renderer/media/webrtc/rtc_rtp_contributing_source.cc

Issue 2808113002: Reland of TCRtpReceiver.getContributingSources() added. (Closed)
Patch Set: Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(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 "base/time/time.h"
9 #include "third_party/webrtc/base/scoped_ref_ptr.h"
10
11 namespace content {
12
13 RTCRtpContributingSource::RTCRtpContributingSource(
14 const webrtc::RtpSource& source)
15 : source_(source) {}
16
17 RTCRtpContributingSource::~RTCRtpContributingSource() {}
18
19 blink::WebRTCRtpContributingSourceType RTCRtpContributingSource::SourceType()
20 const {
21 switch (source_.source_type()) {
22 case webrtc::RtpSourceType::SSRC:
23 return blink::WebRTCRtpContributingSourceType::SSRC;
24 case webrtc::RtpSourceType::CSRC:
25 return blink::WebRTCRtpContributingSourceType::CSRC;
26 default:
27 NOTREACHED();
28 return blink::WebRTCRtpContributingSourceType::SSRC;
29 }
30 }
31
32 double RTCRtpContributingSource::TimestampMs() const {
33 return source_.timestamp_ms();
34 }
35
36 uint32_t RTCRtpContributingSource::Source() const {
37 return source_.source_id();
38 }
39
40 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/media/webrtc/rtc_rtp_contributing_source.h ('k') | content/renderer/media/webrtc/rtc_rtp_receiver.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698