OLD | NEW |
---|---|
1 /* | 1 /* |
2 * Copyright 2015 The WebRTC project authors. All Rights Reserved. | 2 * Copyright 2015 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 328 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
339 } | 339 } |
340 | 340 |
341 RtpParameters VideoRtpSender::GetParameters() const { | 341 RtpParameters VideoRtpSender::GetParameters() const { |
342 return provider_->GetVideoRtpParameters(ssrc_); | 342 return provider_->GetVideoRtpParameters(ssrc_); |
343 } | 343 } |
344 | 344 |
345 bool VideoRtpSender::SetParameters(const RtpParameters& parameters) { | 345 bool VideoRtpSender::SetParameters(const RtpParameters& parameters) { |
346 return provider_->SetVideoRtpParameters(ssrc_, parameters); | 346 return provider_->SetVideoRtpParameters(ssrc_, parameters); |
347 } | 347 } |
348 | 348 |
349 StatsReport::Id VideoRtpSender::stats_id() { | |
350 return StatsReport::NewIdWithDirection(StatsReport::kStatsReportTypeSsrc, | |
351 rtc::ToString<uint32_t>(ssrc_), | |
352 StatsReport::kSend); | |
353 } | |
354 | |
355 void VideoRtpSender::ReportStats(StatsReport* report) { | |
356 if (track_) { | |
tommi
2016/03/30 11:46:44
early returns are preferred. i.e.:
if (!track_)
nisse-webrtc
2016/03/30 12:09:31
Done.
| |
357 VideoTrackSourceInterface::Stats stats; | |
perkj_webrtc
2016/03/29 11:03:39
Why not skip VideoTrackSourceInterface::Stats all
nisse-webrtc
2016/03/29 11:37:31
I don't quite like adding dependencies to StatsRep
| |
358 if (track_->GetSource()->GetStats(&stats)) { | |
359 report->AddInt(StatsReport::kStatsValueNameFrameWidthInput, | |
360 stats.input_width); | |
361 report->AddInt(StatsReport::kStatsValueNameFrameHeightInput, | |
362 stats.input_height); | |
363 } | |
364 } | |
365 } | |
366 | |
349 } // namespace webrtc | 367 } // namespace webrtc |
OLD | NEW |