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

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

Issue 2803693002: RTCRtpReceiver.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 "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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698