2014-01-07 09:54:34 +00:00
|
|
|
/*
|
|
|
|
|
* Copyright (c) 2013 The WebRTC project authors. All Rights Reserved.
|
|
|
|
|
*
|
|
|
|
|
* Use of this source code is governed by a BSD-style license
|
|
|
|
|
* that can be found in the LICENSE file in the root of the source
|
|
|
|
|
* tree. An additional intellectual property rights grant can be found
|
|
|
|
|
* in the file PATENTS. All contributing project authors may
|
|
|
|
|
* be found in the AUTHORS file in the root of the source tree.
|
|
|
|
|
*/
|
|
|
|
|
|
2017-09-15 06:47:31 +02:00
|
|
|
#ifndef VIDEO_SEND_STATISTICS_PROXY_H_
|
|
|
|
|
#define VIDEO_SEND_STATISTICS_PROXY_H_
|
2014-01-07 09:54:34 +00:00
|
|
|
|
2015-12-09 07:07:59 -08:00
|
|
|
#include <map>
|
2016-03-01 11:52:33 -08:00
|
|
|
#include <memory>
|
2014-01-07 09:54:34 +00:00
|
|
|
#include <string>
|
2016-09-29 11:48:50 +02:00
|
|
|
#include <vector>
|
2014-01-07 09:54:34 +00:00
|
|
|
|
2017-09-15 13:58:09 +02:00
|
|
|
#include "common_types.h" // NOLINT(build/include)
|
2017-09-15 06:47:31 +02:00
|
|
|
#include "modules/video_coding/include/video_codec_interface.h"
|
|
|
|
|
#include "modules/video_coding/include/video_coding_defines.h"
|
|
|
|
|
#include "rtc_base/criticalsection.h"
|
|
|
|
|
#include "rtc_base/numerics/exp_filter.h"
|
|
|
|
|
#include "rtc_base/ratetracker.h"
|
|
|
|
|
#include "rtc_base/thread_annotations.h"
|
|
|
|
|
#include "system_wrappers/include/clock.h"
|
|
|
|
|
#include "video/overuse_frame_detector.h"
|
|
|
|
|
#include "video/report_block_stats.h"
|
|
|
|
|
#include "video/stats_counter.h"
|
|
|
|
|
#include "video/video_stream_encoder.h"
|
|
|
|
|
#include "call/video_send_stream.h"
|
2014-01-07 09:54:34 +00:00
|
|
|
|
|
|
|
|
namespace webrtc {
|
|
|
|
|
|
2015-02-26 12:19:31 +00:00
|
|
|
class SendStatisticsProxy : public CpuOveruseMetricsObserver,
|
|
|
|
|
public RtcpStatisticsCallback,
|
2015-02-19 12:47:00 +00:00
|
|
|
public RtcpPacketTypeCounterObserver,
|
2014-01-07 09:54:34 +00:00
|
|
|
public StreamDataCountersCallback,
|
|
|
|
|
public BitrateStatisticsObserver,
|
|
|
|
|
public FrameCountObserver,
|
2014-07-11 13:44:02 +00:00
|
|
|
public SendSideDelayObserver {
|
2014-01-07 09:54:34 +00:00
|
|
|
public:
|
2014-12-01 15:23:21 +00:00
|
|
|
static const int kStatsTimeoutMs;
|
2016-11-01 11:45:46 -07:00
|
|
|
// Number of required samples to be collected before a metric is added
|
|
|
|
|
// to a rtc histogram.
|
|
|
|
|
static const int kMinRequiredMetricsSamples = 200;
|
2014-12-01 15:23:21 +00:00
|
|
|
|
2015-12-03 08:10:08 -08:00
|
|
|
SendStatisticsProxy(Clock* clock,
|
|
|
|
|
const VideoSendStream::Config& config,
|
|
|
|
|
VideoEncoderConfig::ContentType content_type);
|
2014-01-07 09:54:34 +00:00
|
|
|
virtual ~SendStatisticsProxy();
|
|
|
|
|
|
Reland of Add framerate to VideoSinkWants and ability to signal on overuse (patchset #1 id:1 of https://codereview.webrtc.org/2783183003/ )
Reason for revert:
Seem to be a flaky test rather than an issue with this cl. Creating reland, will add code to reduce flakiness to that test.
Original issue's description:
> Revert of Add framerate to VideoSinkWants and ability to signal on overuse (patchset #8 id:410001 of https://codereview.webrtc.org/2781433002/ )
>
> Reason for revert:
> This has resulted in failure of CallPerfTest.ReceivesCpuOveruseAndUnderuse test on the Win7 build bot https://build.chromium.org/p/client.webrtc.perf/builders/Win7/builds/1780
>
> Original issue's description:
> > Reland of Add framerate to VideoSinkWants and ability to signal on overuse (patchset #1 id:1 of https://codereview.webrtc.org/2764133002/ )
> >
> > Reason for revert:
> > Found issue with test case, will add fix to reland cl.
> >
> > Original issue's description:
> > > Revert of Add framerate to VideoSinkWants and ability to signal on overuse (patchset #14 id:250001 of https://codereview.webrtc.org/2716643002/ )
> > >
> > > Reason for revert:
> > > Breaks perf tests:
> > > https://build.chromium.org/p/client.webrtc.perf/builders/Win7/builds/1679
> > > https://build.chromium.org/p/client.webrtc.perf/builders/Android32%20Tests%20%28L%20Nexus5%29/builds/2325
> > >
> > > Original issue's description:
> > > > Add framerate to VideoSinkWants and ability to signal on overuse
> > > >
> > > > In ViEEncoder, try to reduce framerate instead of resolution if the
> > > > current degradation preference is maintain-resolution rather than
> > > > balanced.
> > > >
> > > > BUG=webrtc:4172
> > > >
> > > > Review-Url: https://codereview.webrtc.org/2716643002
> > > > Cr-Commit-Position: refs/heads/master@{#17327}
> > > > Committed: https://chromium.googlesource.com/external/webrtc/+/72acf2526177bb4dbb5103cd6e165eb4361a5ae6
> > >
> > > TBR=nisse@webrtc.org,magjed@webrtc.org,kthelgason@webrtc.org,ilnik@webrtc.org,stefan@webrtc.org,sprang@webrtc.org
> > > # Skipping CQ checks because original CL landed less than 1 days ago.
> > > NOPRESUBMIT=true
> > > NOTREECHECKS=true
> > > NOTRY=true
> > > BUG=webrtc:4172
> > >
> > > Review-Url: https://codereview.webrtc.org/2764133002
> > > Cr-Commit-Position: refs/heads/master@{#17331}
> > > Committed: https://chromium.googlesource.com/external/webrtc/+/8b45b11144c968b4173215c76f78c710c9a2ed0b
> >
> > TBR=nisse@webrtc.org,magjed@webrtc.org,kthelgason@webrtc.org,ilnik@webrtc.org,stefan@webrtc.org,skvlad@webrtc.org
> > # Not skipping CQ checks because original CL landed more than 1 days ago.
> > BUG=webrtc:4172
> >
> > Review-Url: https://codereview.webrtc.org/2781433002
> > Cr-Commit-Position: refs/heads/master@{#17474}
> > Committed: https://chromium.googlesource.com/external/webrtc/+/3ea3c77e93121b1ab9d5e46641e6764f2cca0d51
>
> TBR=ilnik@webrtc.org,stefan@webrtc.org,asapersson@webrtc.org,sprang@webrtc.org
> # Skipping CQ checks because original CL landed less than 1 days ago.
> NOPRESUBMIT=true
> NOTREECHECKS=true
> NOTRY=true
> BUG=webrtc:4172
>
> Review-Url: https://codereview.webrtc.org/2783183003
> Cr-Commit-Position: refs/heads/master@{#17477}
> Committed: https://chromium.googlesource.com/external/webrtc/+/f9ed235c9b7248694edcb46feb1f29ce7456ab59
R=ilnik@webrtc.org,stefan@webrtc.org
BUG=webrtc:4172
Review-Url: https://codereview.webrtc.org/2789823002
Cr-Commit-Position: refs/heads/master@{#17498}
2017-04-02 23:53:04 -07:00
|
|
|
virtual VideoSendStream::Stats GetStats();
|
2014-12-01 15:23:21 +00:00
|
|
|
|
|
|
|
|
virtual void OnSendEncodedImage(const EncodedImage& encoded_image,
|
2016-04-20 05:05:54 -07:00
|
|
|
const CodecSpecificInfo* codec_info);
|
2015-03-18 09:51:05 +00:00
|
|
|
// Used to update incoming frame rate.
|
2015-07-22 06:52:00 -07:00
|
|
|
void OnIncomingFrame(int width, int height);
|
2014-01-07 09:54:34 +00:00
|
|
|
|
2017-10-23 10:45:37 +02:00
|
|
|
// Dropped frame stats.
|
|
|
|
|
void OnFrameDroppedBySource();
|
|
|
|
|
void OnFrameDroppedInEncoderQueue();
|
|
|
|
|
void OnFrameDroppedByEncoder();
|
|
|
|
|
void OnFrameDroppedByMediaOptimizations();
|
|
|
|
|
|
2017-05-15 23:40:18 -07:00
|
|
|
// Adaptation stats.
|
2017-08-03 08:27:51 -07:00
|
|
|
void SetAdaptationStats(
|
|
|
|
|
const VideoStreamEncoder::AdaptCounts& cpu_counts,
|
|
|
|
|
const VideoStreamEncoder::AdaptCounts& quality_counts);
|
|
|
|
|
void OnCpuAdaptationChanged(
|
|
|
|
|
const VideoStreamEncoder::AdaptCounts& cpu_counts,
|
|
|
|
|
const VideoStreamEncoder::AdaptCounts& quality_counts);
|
2017-05-15 23:40:18 -07:00
|
|
|
void OnQualityAdaptationChanged(
|
2017-08-03 08:27:51 -07:00
|
|
|
const VideoStreamEncoder::AdaptCounts& cpu_counts,
|
|
|
|
|
const VideoStreamEncoder::AdaptCounts& quality_counts);
|
2017-11-16 14:04:52 +01:00
|
|
|
void OnMinPixelLimitReached();
|
2016-11-01 11:45:46 -07:00
|
|
|
|
2015-09-22 16:28:51 +02:00
|
|
|
void OnSuspendChange(bool is_suspended);
|
2015-05-15 11:33:39 +02:00
|
|
|
void OnInactiveSsrc(uint32_t ssrc);
|
|
|
|
|
|
2015-12-03 08:10:08 -08:00
|
|
|
// Used to indicate change in content type, which may require a change in
|
2016-09-29 11:48:50 +02:00
|
|
|
// how stats are collected and set the configured preferred media bitrate.
|
|
|
|
|
void OnEncoderReconfigured(const VideoEncoderConfig& encoder_config,
|
|
|
|
|
uint32_t preferred_bitrate_bps);
|
2015-12-03 08:10:08 -08:00
|
|
|
|
2016-07-05 08:34:04 -07:00
|
|
|
// Used to update the encoder target rate.
|
|
|
|
|
void OnSetEncoderTargetRate(uint32_t bitrate_bps);
|
2016-02-05 11:13:28 +01:00
|
|
|
|
|
|
|
|
// Implements CpuOveruseMetricsObserver.
|
|
|
|
|
void OnEncodedFrameTimeMeasured(int encode_time_ms,
|
|
|
|
|
const CpuOveruseMetrics& metrics) override;
|
|
|
|
|
|
2016-06-02 15:45:42 +02:00
|
|
|
int GetSendFrameRate() const;
|
|
|
|
|
|
2014-01-07 09:54:34 +00:00
|
|
|
protected:
|
|
|
|
|
// From RtcpStatisticsCallback.
|
2015-03-04 12:58:35 +00:00
|
|
|
void StatisticsUpdated(const RtcpStatistics& statistics,
|
|
|
|
|
uint32_t ssrc) override;
|
|
|
|
|
void CNameChanged(const char* cname, uint32_t ssrc) override;
|
2015-07-22 06:52:00 -07:00
|
|
|
// From RtcpPacketTypeCounterObserver.
|
2015-03-04 12:58:35 +00:00
|
|
|
void RtcpPacketTypesCounterUpdated(
|
2015-02-19 12:47:00 +00:00
|
|
|
uint32_t ssrc,
|
2015-03-04 12:58:35 +00:00
|
|
|
const RtcpPacketTypeCounter& packet_counter) override;
|
2014-01-07 09:54:34 +00:00
|
|
|
// From StreamDataCountersCallback.
|
2015-03-04 12:58:35 +00:00
|
|
|
void DataCountersUpdated(const StreamDataCounters& counters,
|
|
|
|
|
uint32_t ssrc) override;
|
2014-01-07 09:54:34 +00:00
|
|
|
|
|
|
|
|
// From BitrateStatisticsObserver.
|
2016-07-13 09:11:28 -07:00
|
|
|
void Notify(uint32_t total_bitrate_bps,
|
|
|
|
|
uint32_t retransmit_bitrate_bps,
|
2015-03-04 12:58:35 +00:00
|
|
|
uint32_t ssrc) override;
|
2014-01-07 09:54:34 +00:00
|
|
|
|
|
|
|
|
// From FrameCountObserver.
|
2015-03-04 12:58:35 +00:00
|
|
|
void FrameCountUpdated(const FrameCounts& frame_counts,
|
|
|
|
|
uint32_t ssrc) override;
|
2014-01-07 09:54:34 +00:00
|
|
|
|
2015-03-04 12:58:35 +00:00
|
|
|
void SendSideDelayUpdated(int avg_delay_ms,
|
|
|
|
|
int max_delay_ms,
|
|
|
|
|
uint32_t ssrc) override;
|
2014-07-11 13:44:02 +00:00
|
|
|
|
2014-01-07 09:54:34 +00:00
|
|
|
private:
|
2015-10-19 23:32:41 -07:00
|
|
|
class SampleCounter {
|
|
|
|
|
public:
|
2015-07-22 06:52:00 -07:00
|
|
|
SampleCounter() : sum(0), num_samples(0) {}
|
2015-10-19 23:32:41 -07:00
|
|
|
~SampleCounter() {}
|
2015-07-22 06:52:00 -07:00
|
|
|
void Add(int sample);
|
2016-12-19 06:50:53 -08:00
|
|
|
int Avg(int64_t min_required_samples) const;
|
2015-07-22 06:52:00 -07:00
|
|
|
|
|
|
|
|
private:
|
2016-12-19 06:50:53 -08:00
|
|
|
int64_t sum;
|
|
|
|
|
int64_t num_samples;
|
2015-07-22 06:52:00 -07:00
|
|
|
};
|
2015-10-19 23:32:41 -07:00
|
|
|
class BoolSampleCounter {
|
|
|
|
|
public:
|
2015-10-05 02:36:17 -07:00
|
|
|
BoolSampleCounter() : sum(0), num_samples(0) {}
|
2015-10-19 23:32:41 -07:00
|
|
|
~BoolSampleCounter() {}
|
2015-10-05 02:36:17 -07:00
|
|
|
void Add(bool sample);
|
2016-12-19 06:50:53 -08:00
|
|
|
void Add(bool sample, int64_t count);
|
|
|
|
|
int Percent(int64_t min_required_samples) const;
|
|
|
|
|
int Permille(int64_t min_required_samples) const;
|
2015-10-05 02:36:17 -07:00
|
|
|
|
|
|
|
|
private:
|
2016-12-19 06:50:53 -08:00
|
|
|
int Fraction(int64_t min_required_samples, float multiplier) const;
|
|
|
|
|
int64_t sum;
|
|
|
|
|
int64_t num_samples;
|
2015-10-05 02:36:17 -07:00
|
|
|
};
|
2014-12-01 15:23:21 +00:00
|
|
|
struct StatsUpdateTimes {
|
2015-12-03 08:10:08 -08:00
|
|
|
StatsUpdateTimes() : resolution_update_ms(0), bitrate_update_ms(0) {}
|
2014-12-01 15:23:21 +00:00
|
|
|
int64_t resolution_update_ms;
|
2015-05-15 11:33:39 +02:00
|
|
|
int64_t bitrate_update_ms;
|
2014-12-01 15:23:21 +00:00
|
|
|
};
|
2016-12-19 06:50:53 -08:00
|
|
|
struct TargetRateUpdates {
|
|
|
|
|
TargetRateUpdates()
|
|
|
|
|
: pause_resume_events(0), last_paused_or_resumed(false), last_ms(-1) {}
|
|
|
|
|
int pause_resume_events;
|
|
|
|
|
bool last_paused_or_resumed;
|
|
|
|
|
int64_t last_ms;
|
|
|
|
|
};
|
2017-09-15 06:41:15 -07:00
|
|
|
struct FallbackEncoderInfo {
|
|
|
|
|
bool is_possible = true;
|
|
|
|
|
bool is_active = false;
|
|
|
|
|
int on_off_events = 0;
|
|
|
|
|
int64_t elapsed_ms = 0;
|
|
|
|
|
rtc::Optional<int64_t> last_update_ms;
|
|
|
|
|
const int max_frame_diff_ms = 2000;
|
|
|
|
|
};
|
2017-11-16 14:04:52 +01:00
|
|
|
struct FallbackEncoderInfoDisabled {
|
|
|
|
|
bool is_possible = true;
|
|
|
|
|
bool min_pixel_limit_reached = false;
|
|
|
|
|
};
|
2017-04-04 23:40:50 -07:00
|
|
|
struct StatsTimer {
|
|
|
|
|
void Start(int64_t now_ms);
|
|
|
|
|
void Stop(int64_t now_ms);
|
|
|
|
|
void Restart(int64_t now_ms);
|
|
|
|
|
int64_t start_ms = -1;
|
|
|
|
|
int64_t total_ms = 0;
|
|
|
|
|
};
|
2016-03-31 00:00:19 -07:00
|
|
|
struct QpCounters {
|
2017-04-04 23:40:50 -07:00
|
|
|
SampleCounter vp8; // QP range: 0-127.
|
|
|
|
|
SampleCounter vp9; // QP range: 0-255.
|
|
|
|
|
SampleCounter h264; // QP range: 0-51.
|
2016-03-31 00:00:19 -07:00
|
|
|
};
|
2017-10-16 12:19:23 +02:00
|
|
|
|
|
|
|
|
// Map holding encoded frames (mapped by timestamp).
|
|
|
|
|
// If simulcast layers are encoded on different threads, there is no guarantee
|
|
|
|
|
// that one frame of all layers are encoded before the next start.
|
|
|
|
|
struct TimestampOlderThan {
|
|
|
|
|
bool operator()(uint32_t ts1, uint32_t ts2) const {
|
|
|
|
|
return IsNewerTimestamp(ts2, ts1);
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
struct Frame {
|
|
|
|
|
Frame(int64_t send_ms, uint32_t width, uint32_t height)
|
|
|
|
|
: send_ms(send_ms), max_width(width), max_height(height) {}
|
|
|
|
|
const int64_t
|
|
|
|
|
send_ms; // Time when first frame with this timestamp is sent.
|
|
|
|
|
uint32_t max_width; // Max width with this timestamp.
|
|
|
|
|
uint32_t max_height; // Max height with this timestamp.
|
|
|
|
|
};
|
|
|
|
|
typedef std::map<uint32_t, Frame, TimestampOlderThan> EncodedFrameMap;
|
|
|
|
|
|
2017-09-09 04:17:22 -07:00
|
|
|
void PurgeOldStats() RTC_EXCLUSIVE_LOCKS_REQUIRED(crit_);
|
2015-02-25 10:42:16 +00:00
|
|
|
VideoSendStream::StreamStats* GetStatsEntry(uint32_t ssrc)
|
2017-09-09 04:17:22 -07:00
|
|
|
RTC_EXCLUSIVE_LOCKS_REQUIRED(crit_);
|
2014-01-07 09:54:34 +00:00
|
|
|
|
2017-08-03 08:27:51 -07:00
|
|
|
void SetAdaptTimer(const VideoStreamEncoder::AdaptCounts& counts,
|
2017-09-09 04:17:22 -07:00
|
|
|
StatsTimer* timer) RTC_EXCLUSIVE_LOCKS_REQUIRED(crit_);
|
2017-08-03 08:27:51 -07:00
|
|
|
void UpdateAdaptationStats(
|
|
|
|
|
const VideoStreamEncoder::AdaptCounts& cpu_counts,
|
|
|
|
|
const VideoStreamEncoder::AdaptCounts& quality_counts)
|
2017-09-09 04:17:22 -07:00
|
|
|
RTC_EXCLUSIVE_LOCKS_REQUIRED(crit_);
|
2017-05-15 23:40:18 -07:00
|
|
|
|
2017-11-13 10:16:47 +01:00
|
|
|
void UpdateEncoderFallbackStats(const CodecSpecificInfo* codec_info,
|
|
|
|
|
int pixels)
|
2017-09-15 06:41:15 -07:00
|
|
|
RTC_EXCLUSIVE_LOCKS_REQUIRED(crit_);
|
2017-11-16 14:04:52 +01:00
|
|
|
void UpdateFallbackDisabledStats(const CodecSpecificInfo* codec_info,
|
|
|
|
|
int pixels)
|
|
|
|
|
RTC_EXCLUSIVE_LOCKS_REQUIRED(crit_);
|
2017-09-15 06:41:15 -07:00
|
|
|
|
2014-12-01 15:23:21 +00:00
|
|
|
Clock* const clock_;
|
2016-09-01 01:17:40 -07:00
|
|
|
const std::string payload_name_;
|
|
|
|
|
const VideoSendStream::Config::Rtp rtp_config_;
|
2017-11-13 10:16:47 +01:00
|
|
|
const rtc::Optional<int> fallback_max_pixels_;
|
2017-11-16 14:04:52 +01:00
|
|
|
const rtc::Optional<int> fallback_max_pixels_disabled_;
|
2016-01-25 03:52:44 -08:00
|
|
|
rtc::CriticalSection crit_;
|
2017-09-09 04:17:22 -07:00
|
|
|
VideoEncoderConfig::ContentType content_type_ RTC_GUARDED_BY(crit_);
|
2016-07-27 00:39:09 -07:00
|
|
|
const int64_t start_ms_;
|
2017-09-09 04:17:22 -07:00
|
|
|
VideoSendStream::Stats stats_ RTC_GUARDED_BY(crit_);
|
|
|
|
|
std::map<uint32_t, StatsUpdateTimes> update_times_ RTC_GUARDED_BY(crit_);
|
|
|
|
|
rtc::ExpFilter encode_time_ RTC_GUARDED_BY(crit_);
|
|
|
|
|
int quality_downscales_ RTC_GUARDED_BY(crit_);
|
|
|
|
|
int cpu_downscales_ RTC_GUARDED_BY(crit_);
|
2017-10-16 12:19:23 +02:00
|
|
|
rtc::RateTracker media_byte_rate_tracker_ RTC_GUARDED_BY(crit_);
|
|
|
|
|
rtc::RateTracker encoded_frame_rate_tracker_ RTC_GUARDED_BY(crit_);
|
2015-07-22 06:52:00 -07:00
|
|
|
|
2015-12-03 08:10:08 -08:00
|
|
|
// Contains stats used for UMA histograms. These stats will be reset if
|
|
|
|
|
// content type changes between real-time video and screenshare, since these
|
|
|
|
|
// will be reported separately.
|
|
|
|
|
struct UmaSamplesContainer {
|
2016-02-24 07:55:00 -08:00
|
|
|
UmaSamplesContainer(const char* prefix,
|
|
|
|
|
const VideoSendStream::Stats& start_stats,
|
|
|
|
|
Clock* clock);
|
2015-12-03 08:10:08 -08:00
|
|
|
~UmaSamplesContainer();
|
|
|
|
|
|
2016-09-01 01:17:40 -07:00
|
|
|
void UpdateHistograms(const VideoSendStream::Config::Rtp& rtp_config,
|
2016-02-24 07:55:00 -08:00
|
|
|
const VideoSendStream::Stats& current_stats);
|
2015-12-03 08:10:08 -08:00
|
|
|
|
2017-02-06 05:18:35 -08:00
|
|
|
void InitializeBitrateCounters(const VideoSendStream::Stats& stats);
|
|
|
|
|
|
2017-10-16 12:19:23 +02:00
|
|
|
bool InsertEncodedFrame(const EncodedImage& encoded_frame);
|
|
|
|
|
void RemoveOld(int64_t now_ms);
|
|
|
|
|
|
2015-12-03 08:10:08 -08:00
|
|
|
const std::string uma_prefix_;
|
2016-02-24 07:55:00 -08:00
|
|
|
Clock* const clock_;
|
2015-12-03 08:10:08 -08:00
|
|
|
SampleCounter input_width_counter_;
|
|
|
|
|
SampleCounter input_height_counter_;
|
|
|
|
|
SampleCounter sent_width_counter_;
|
|
|
|
|
SampleCounter sent_height_counter_;
|
|
|
|
|
SampleCounter encode_time_counter_;
|
|
|
|
|
BoolSampleCounter key_frame_counter_;
|
|
|
|
|
BoolSampleCounter quality_limited_frame_counter_;
|
|
|
|
|
SampleCounter quality_downscales_counter_;
|
2016-11-01 11:45:46 -07:00
|
|
|
BoolSampleCounter cpu_limited_frame_counter_;
|
2015-12-03 08:10:08 -08:00
|
|
|
BoolSampleCounter bw_limited_frame_counter_;
|
|
|
|
|
SampleCounter bw_resolutions_disabled_counter_;
|
|
|
|
|
SampleCounter delay_counter_;
|
|
|
|
|
SampleCounter max_delay_counter_;
|
|
|
|
|
rtc::RateTracker input_frame_rate_tracker_;
|
2016-11-29 01:40:35 -08:00
|
|
|
RateCounter input_fps_counter_;
|
|
|
|
|
RateCounter sent_fps_counter_;
|
2017-02-06 05:18:35 -08:00
|
|
|
RateAccCounter total_byte_counter_;
|
|
|
|
|
RateAccCounter media_byte_counter_;
|
|
|
|
|
RateAccCounter rtx_byte_counter_;
|
|
|
|
|
RateAccCounter padding_byte_counter_;
|
|
|
|
|
RateAccCounter retransmit_byte_counter_;
|
|
|
|
|
RateAccCounter fec_byte_counter_;
|
2016-02-19 09:03:26 -08:00
|
|
|
int64_t first_rtcp_stats_time_ms_;
|
2016-03-01 09:40:42 +01:00
|
|
|
int64_t first_rtp_stats_time_ms_;
|
2017-05-15 23:40:18 -07:00
|
|
|
StatsTimer cpu_adapt_timer_;
|
|
|
|
|
StatsTimer quality_adapt_timer_;
|
2016-12-19 06:50:53 -08:00
|
|
|
BoolSampleCounter paused_time_counter_;
|
|
|
|
|
TargetRateUpdates target_rate_updates_;
|
2017-09-15 06:41:15 -07:00
|
|
|
BoolSampleCounter fallback_active_counter_;
|
|
|
|
|
FallbackEncoderInfo fallback_info_;
|
2017-11-16 14:04:52 +01:00
|
|
|
FallbackEncoderInfoDisabled fallback_info_disabled_;
|
2016-02-19 09:03:26 -08:00
|
|
|
ReportBlockStats report_block_stats_;
|
2016-02-24 07:55:00 -08:00
|
|
|
const VideoSendStream::Stats start_stats_;
|
2017-10-16 12:19:23 +02:00
|
|
|
EncodedFrameMap encoded_frames_;
|
Reland of Add framerate to VideoSinkWants and ability to signal on overuse (patchset #1 id:1 of https://codereview.webrtc.org/2783183003/ )
Reason for revert:
Seem to be a flaky test rather than an issue with this cl. Creating reland, will add code to reduce flakiness to that test.
Original issue's description:
> Revert of Add framerate to VideoSinkWants and ability to signal on overuse (patchset #8 id:410001 of https://codereview.webrtc.org/2781433002/ )
>
> Reason for revert:
> This has resulted in failure of CallPerfTest.ReceivesCpuOveruseAndUnderuse test on the Win7 build bot https://build.chromium.org/p/client.webrtc.perf/builders/Win7/builds/1780
>
> Original issue's description:
> > Reland of Add framerate to VideoSinkWants and ability to signal on overuse (patchset #1 id:1 of https://codereview.webrtc.org/2764133002/ )
> >
> > Reason for revert:
> > Found issue with test case, will add fix to reland cl.
> >
> > Original issue's description:
> > > Revert of Add framerate to VideoSinkWants and ability to signal on overuse (patchset #14 id:250001 of https://codereview.webrtc.org/2716643002/ )
> > >
> > > Reason for revert:
> > > Breaks perf tests:
> > > https://build.chromium.org/p/client.webrtc.perf/builders/Win7/builds/1679
> > > https://build.chromium.org/p/client.webrtc.perf/builders/Android32%20Tests%20%28L%20Nexus5%29/builds/2325
> > >
> > > Original issue's description:
> > > > Add framerate to VideoSinkWants and ability to signal on overuse
> > > >
> > > > In ViEEncoder, try to reduce framerate instead of resolution if the
> > > > current degradation preference is maintain-resolution rather than
> > > > balanced.
> > > >
> > > > BUG=webrtc:4172
> > > >
> > > > Review-Url: https://codereview.webrtc.org/2716643002
> > > > Cr-Commit-Position: refs/heads/master@{#17327}
> > > > Committed: https://chromium.googlesource.com/external/webrtc/+/72acf2526177bb4dbb5103cd6e165eb4361a5ae6
> > >
> > > TBR=nisse@webrtc.org,magjed@webrtc.org,kthelgason@webrtc.org,ilnik@webrtc.org,stefan@webrtc.org,sprang@webrtc.org
> > > # Skipping CQ checks because original CL landed less than 1 days ago.
> > > NOPRESUBMIT=true
> > > NOTREECHECKS=true
> > > NOTRY=true
> > > BUG=webrtc:4172
> > >
> > > Review-Url: https://codereview.webrtc.org/2764133002
> > > Cr-Commit-Position: refs/heads/master@{#17331}
> > > Committed: https://chromium.googlesource.com/external/webrtc/+/8b45b11144c968b4173215c76f78c710c9a2ed0b
> >
> > TBR=nisse@webrtc.org,magjed@webrtc.org,kthelgason@webrtc.org,ilnik@webrtc.org,stefan@webrtc.org,skvlad@webrtc.org
> > # Not skipping CQ checks because original CL landed more than 1 days ago.
> > BUG=webrtc:4172
> >
> > Review-Url: https://codereview.webrtc.org/2781433002
> > Cr-Commit-Position: refs/heads/master@{#17474}
> > Committed: https://chromium.googlesource.com/external/webrtc/+/3ea3c77e93121b1ab9d5e46641e6764f2cca0d51
>
> TBR=ilnik@webrtc.org,stefan@webrtc.org,asapersson@webrtc.org,sprang@webrtc.org
> # Skipping CQ checks because original CL landed less than 1 days ago.
> NOPRESUBMIT=true
> NOTREECHECKS=true
> NOTRY=true
> BUG=webrtc:4172
>
> Review-Url: https://codereview.webrtc.org/2783183003
> Cr-Commit-Position: refs/heads/master@{#17477}
> Committed: https://chromium.googlesource.com/external/webrtc/+/f9ed235c9b7248694edcb46feb1f29ce7456ab59
R=ilnik@webrtc.org,stefan@webrtc.org
BUG=webrtc:4172
Review-Url: https://codereview.webrtc.org/2789823002
Cr-Commit-Position: refs/heads/master@{#17498}
2017-04-02 23:53:04 -07:00
|
|
|
|
2016-03-31 00:00:19 -07:00
|
|
|
std::map<int, QpCounters>
|
|
|
|
|
qp_counters_; // QP counters mapped by spatial idx.
|
2015-12-03 08:10:08 -08:00
|
|
|
};
|
|
|
|
|
|
2017-09-09 04:17:22 -07:00
|
|
|
std::unique_ptr<UmaSamplesContainer> uma_container_ RTC_GUARDED_BY(crit_);
|
2014-01-07 09:54:34 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
} // namespace webrtc
|
2017-09-15 06:47:31 +02:00
|
|
|
#endif // VIDEO_SEND_STATISTICS_PROXY_H_
|