webrtc_m130/video/send_statistics_proxy.h

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

381 lines
14 KiB
C
Raw Normal View History

/*
* 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.
*/
#ifndef VIDEO_SEND_STATISTICS_PROXY_H_
#define VIDEO_SEND_STATISTICS_PROXY_H_
#include <array>
#include <map>
#include <memory>
#include <string>
#include <vector>
#include "api/field_trials_view.h"
#include "api/video/video_codec_constants.h"
#include "api/video/video_stream_encoder_observer.h"
#include "api/video_codecs/video_encoder_config.h"
#include "call/video_send_stream.h"
#include "modules/include/module_common_types_public.h"
#include "modules/rtp_rtcp/include/report_block_data.h"
#include "modules/video_coding/include/video_codec_interface.h"
#include "modules/video_coding/include/video_coding_defines.h"
#include "rtc_base/numerics/exp_filter.h"
#include "rtc_base/rate_tracker.h"
#include "rtc_base/synchronization/mutex.h"
#include "rtc_base/thread_annotations.h"
#include "system_wrappers/include/clock.h"
#include "video/quality_limitation_reason_tracker.h"
#include "video/report_block_stats.h"
#include "video/stats_counter.h"
namespace webrtc {
class SendStatisticsProxy : public VideoStreamEncoderObserver,
public ReportBlockDataObserver,
public RtcpPacketTypeCounterObserver,
public StreamDataCountersCallback,
public BitrateStatisticsObserver,
public FrameCountObserver,
public SendSideDelayObserver {
public:
static const int kStatsTimeoutMs;
// Number of required samples to be collected before a metric is added
// to a rtc histogram.
static const int kMinRequiredMetricsSamples = 200;
SendStatisticsProxy(Clock* clock,
const VideoSendStream::Config& config,
VideoEncoderConfig::ContentType content_type,
const FieldTrialsView& field_trials);
~SendStatisticsProxy() override;
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();
void OnSendEncodedImage(const EncodedImage& encoded_image,
const CodecSpecificInfo* codec_info) override;
void OnEncoderImplementationChanged(
const std::string& implementation_name) override;
// Used to update incoming frame rate.
void OnIncomingFrame(int width, int height) override;
// Dropped frame stats.
void OnFrameDropped(DropReason) override;
// Adaptation stats.
void OnAdaptationChanged(
VideoAdaptationReason reason,
const VideoAdaptationCounters& cpu_counters,
const VideoAdaptationCounters& quality_counters) override;
void ClearAdaptationStats() override;
void UpdateAdaptationSettings(AdaptationSettings cpu_settings,
AdaptationSettings quality_settings) override;
void OnBitrateAllocationUpdated(
const VideoCodec& codec,
const VideoBitrateAllocation& allocation) override;
Reland "Wire up internal libvpx VP9 scaler to statistics proxy" This reverts commit a2cb93d8b9659292f7ec73db53421d481f84c22c. Reason for revert: Reland with no changes after downstream projects are updated. Original change's description: > Revert "Wire up internal libvpx VP9 scaler to statistics proxy" > > This reverts commit 50327a51007c3e25bc3bcd35b5d0945fe0f27d05. > > Reason for revert: Breaks downstream tests > > Original change's description: > > Wire up internal libvpx VP9 scaler to statistics proxy > > > > Bug: webrtc:11396 > > Change-Id: I5ac69208b00cc75d4e5dbb3ab86f234b3e1f29f8 > > Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/169922 > > Reviewed-by: Niels Moller <nisse@webrtc.org> > > Reviewed-by: Henrik Boström <hbos@webrtc.org> > > Commit-Queue: Ilya Nikolaevskiy <ilnik@webrtc.org> > > Cr-Commit-Position: refs/heads/master@{#30725} > > TBR=ilnik@webrtc.org,hbos@webrtc.org,nisse@webrtc.org > > Change-Id: I53dcb41bdf8f8dccfcd43b717509ec047f590648 > No-Presubmit: true > No-Tree-Checks: true > No-Try: true > Bug: webrtc:11396 > Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/170102 > Reviewed-by: Sebastian Jansson <srte@webrtc.org> > Commit-Queue: Sebastian Jansson <srte@webrtc.org> > Cr-Commit-Position: refs/heads/master@{#30734} TBR=ilnik@webrtc.org,hbos@webrtc.org,nisse@webrtc.org,srte@webrtc.org Change-Id: Ie47df4aec199701256c1dba8fa64176683becabc No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: webrtc:11396 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/170105 Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org> Reviewed-by: Niels Moller <nisse@webrtc.org> Commit-Queue: Ilya Nikolaevskiy <ilnik@webrtc.org> Cr-Commit-Position: refs/heads/master@{#30738}
2020-03-10 09:50:26 +00:00
void OnEncoderInternalScalerUpdate(bool is_scaled) override;
void OnMinPixelLimitReached() override;
void OnInitialQualityResolutionAdaptDown() override;
void OnSuspendChange(bool is_suspended) override;
void OnInactiveSsrc(uint32_t ssrc);
// Used to indicate change in content type, which may require a change in
// how stats are collected.
void OnEncoderReconfigured(const VideoEncoderConfig& encoder_config,
const std::vector<VideoStream>& streams) override;
// Used to update the encoder target rate.
void OnSetEncoderTargetRate(uint32_t bitrate_bps);
// Implements CpuOveruseMetricsObserver.
void OnEncodedFrameTimeMeasured(int encode_time_ms,
int encode_usage_percent) override;
int GetInputFrameRate() const override;
int GetSendFrameRate() const;
protected:
// From ReportBlockDataObserver.
void OnReportBlockDataUpdated(ReportBlockData report_block_data) override;
// From RtcpPacketTypeCounterObserver.
void RtcpPacketTypesCounterUpdated(
uint32_t ssrc,
const RtcpPacketTypeCounter& packet_counter) override;
// From StreamDataCountersCallback.
void DataCountersUpdated(const StreamDataCounters& counters,
uint32_t ssrc) override;
// From BitrateStatisticsObserver.
void Notify(uint32_t total_bitrate_bps,
uint32_t retransmit_bitrate_bps,
uint32_t ssrc) override;
// From FrameCountObserver.
void FrameCountUpdated(const FrameCounts& frame_counts,
uint32_t ssrc) override;
void SendSideDelayUpdated(int avg_delay_ms,
int max_delay_ms,
uint64_t total_delay_ms,
uint32_t ssrc) override;
private:
class SampleCounter {
public:
SampleCounter() : sum(0), num_samples(0) {}
~SampleCounter() {}
void Add(int sample);
int Avg(int64_t min_required_samples) const;
private:
int64_t sum;
int64_t num_samples;
};
class BoolSampleCounter {
public:
BoolSampleCounter() : sum(0), num_samples(0) {}
~BoolSampleCounter() {}
void Add(bool sample);
void Add(bool sample, int64_t count);
int Percent(int64_t min_required_samples) const;
int Permille(int64_t min_required_samples) const;
private:
int Fraction(int64_t min_required_samples, float multiplier) const;
int64_t sum;
int64_t num_samples;
};
struct StatsUpdateTimes {
StatsUpdateTimes() : resolution_update_ms(0), bitrate_update_ms(0) {}
int64_t resolution_update_ms;
int64_t bitrate_update_ms;
};
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;
};
struct FallbackEncoderInfo {
FallbackEncoderInfo();
bool is_possible = true;
bool is_active = false;
int on_off_events = 0;
int64_t elapsed_ms = 0;
absl::optional<int64_t> last_update_ms;
const int max_frame_diff_ms = 2000;
};
struct FallbackEncoderInfoDisabled {
bool is_possible = true;
bool min_pixel_limit_reached = false;
};
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;
};
struct QpCounters {
SampleCounter vp8; // QP range: 0-127.
SampleCounter vp9; // QP range: 0-255.
SampleCounter h264; // QP range: 0-51.
};
struct AdaptChanges {
int down = 0;
int up = 0;
};
// 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, int simulcast_idx)
: send_ms(send_ms),
max_width(width),
max_height(height),
max_simulcast_idx(simulcast_idx) {}
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.
int max_simulcast_idx; // Max simulcast index with this timestamp.
};
typedef std::map<uint32_t, Frame, TimestampOlderThan> EncodedFrameMap;
void PurgeOldStats() RTC_EXCLUSIVE_LOCKS_REQUIRED(mutex_);
VideoSendStream::StreamStats* GetStatsEntry(uint32_t ssrc)
RTC_EXCLUSIVE_LOCKS_REQUIRED(mutex_);
struct MaskedAdaptationCounts {
absl::optional<int> resolution_adaptations = absl::nullopt;
absl::optional<int> num_framerate_reductions = absl::nullopt;
};
struct Adaptations {
public:
MaskedAdaptationCounts MaskedCpuCounts() const;
MaskedAdaptationCounts MaskedQualityCounts() const;
void set_cpu_counts(const VideoAdaptationCounters& cpu_counts);
void set_quality_counts(const VideoAdaptationCounters& quality_counts);
VideoAdaptationCounters cpu_counts() const;
VideoAdaptationCounters quality_counts() const;
void UpdateMaskingSettings(AdaptationSettings cpu_settings,
AdaptationSettings quality_settings);
private:
VideoAdaptationCounters cpu_counts_;
AdaptationSettings cpu_settings_;
VideoAdaptationCounters quality_counts_;
AdaptationSettings quality_settings_;
MaskedAdaptationCounts Mask(const VideoAdaptationCounters& counters,
const AdaptationSettings& settings) const;
};
void SetAdaptTimer(const MaskedAdaptationCounts& counts, StatsTimer* timer)
RTC_EXCLUSIVE_LOCKS_REQUIRED(mutex_);
void UpdateAdaptationStats() RTC_EXCLUSIVE_LOCKS_REQUIRED(mutex_);
void TryUpdateInitialQualityResolutionAdaptUp(
absl::optional<int> old_quality_downscales,
absl::optional<int> updated_quality_downscales)
RTC_EXCLUSIVE_LOCKS_REQUIRED(mutex_);
void UpdateEncoderFallbackStats(const CodecSpecificInfo* codec_info,
int pixels,
int simulcast_index)
RTC_EXCLUSIVE_LOCKS_REQUIRED(mutex_);
void UpdateFallbackDisabledStats(const CodecSpecificInfo* codec_info,
int pixels,
int simulcast_index)
RTC_EXCLUSIVE_LOCKS_REQUIRED(mutex_);
Clock* const clock_;
const std::string payload_name_;
const RtpConfig rtp_config_;
const absl::optional<int> fallback_max_pixels_;
const absl::optional<int> fallback_max_pixels_disabled_;
mutable Mutex mutex_;
VideoEncoderConfig::ContentType content_type_ RTC_GUARDED_BY(mutex_);
const int64_t start_ms_;
VideoSendStream::Stats stats_ RTC_GUARDED_BY(mutex_);
std::map<uint32_t, StatsUpdateTimes> update_times_ RTC_GUARDED_BY(mutex_);
rtc::ExpFilter encode_time_ RTC_GUARDED_BY(mutex_);
QualityLimitationReasonTracker quality_limitation_reason_tracker_
RTC_GUARDED_BY(mutex_);
rtc::RateTracker media_byte_rate_tracker_ RTC_GUARDED_BY(mutex_);
rtc::RateTracker encoded_frame_rate_tracker_ RTC_GUARDED_BY(mutex_);
// Rate trackers mapped by ssrc.
Reland "Improve outbound-rtp statistics for simulcast" This reverts commit 9a925c9ce33a6ccdd11b545b11ba68e985c2a65d. Reason for revert: The original CL is updated in PS #2 to fix the googRtt issue which was that when the legacy sender stats were put in "aggregated_senders" we forgot to update rtt_ms the same way that we do it for "senders". Original change's description: > Revert "Improve outbound-rtp statistics for simulcast" > > This reverts commit da6cda839dac7d9d18eba8d365188fa94831e0b1. > > Reason for revert: Breaks googRtt in legacy getStats API > > Original change's description: > > Improve outbound-rtp statistics for simulcast > > > > Bug: webrtc:9547 > > Change-Id: Iec4eb976aa11ee743805425bedb77dcea7c2c9be > > Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/168120 > > Reviewed-by: Sebastian Jansson <srte@webrtc.org> > > Reviewed-by: Erik Språng <sprang@webrtc.org> > > Reviewed-by: Henrik Boström <hbos@webrtc.org> > > Reviewed-by: Harald Alvestrand <hta@webrtc.org> > > Commit-Queue: Eldar Rello <elrello@microsoft.com> > > Cr-Commit-Position: refs/heads/master@{#31097} > > TBR=hbos@webrtc.org,sprang@webrtc.org,stefan@webrtc.org,srte@webrtc.org,hta@webrtc.org,elrello@microsoft.com > > # Not skipping CQ checks because original CL landed > 1 day ago. > > Bug: webrtc:9547 > Change-Id: I06673328c2a5293a7eef03b3aaf2ded9d13df1b3 > Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/174443 > Reviewed-by: Henrik Boström <hbos@webrtc.org> > Commit-Queue: Henrik Boström <hbos@webrtc.org> > Cr-Commit-Position: refs/heads/master@{#31165} TBR=hbos@webrtc.org,sprang@webrtc.org,stefan@webrtc.org,srte@webrtc.org,hta@webrtc.org,elrello@microsoft.com # Not skipping CQ checks because this is a reland. Bug: webrtc:9547 Change-Id: I723744c496c3c65f95ab6a8940862c8b9f544338 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/174480 Reviewed-by: Harald Alvestrand <hta@webrtc.org> Reviewed-by: Henrik Boström <hbos@webrtc.org> Commit-Queue: Henrik Boström <hbos@webrtc.org> Cr-Commit-Position: refs/heads/master@{#31169}
2020-05-05 15:54:46 +02:00
std::map<uint32_t, std::unique_ptr<rtc::RateTracker>>
encoded_frame_rate_trackers_ RTC_GUARDED_BY(mutex_);
absl::optional<int64_t> last_outlier_timestamp_ RTC_GUARDED_BY(mutex_);
int last_num_spatial_layers_ RTC_GUARDED_BY(mutex_);
int last_num_simulcast_streams_ RTC_GUARDED_BY(mutex_);
std::array<bool, kMaxSpatialLayers> last_spatial_layer_use_
RTC_GUARDED_BY(mutex_);
// Indicates if the latest bitrate allocation had layers disabled by low
// available bandwidth.
bool bw_limited_layers_ RTC_GUARDED_BY(mutex_);
Reland "Wire up internal libvpx VP9 scaler to statistics proxy" This reverts commit a2cb93d8b9659292f7ec73db53421d481f84c22c. Reason for revert: Reland with no changes after downstream projects are updated. Original change's description: > Revert "Wire up internal libvpx VP9 scaler to statistics proxy" > > This reverts commit 50327a51007c3e25bc3bcd35b5d0945fe0f27d05. > > Reason for revert: Breaks downstream tests > > Original change's description: > > Wire up internal libvpx VP9 scaler to statistics proxy > > > > Bug: webrtc:11396 > > Change-Id: I5ac69208b00cc75d4e5dbb3ab86f234b3e1f29f8 > > Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/169922 > > Reviewed-by: Niels Moller <nisse@webrtc.org> > > Reviewed-by: Henrik Boström <hbos@webrtc.org> > > Commit-Queue: Ilya Nikolaevskiy <ilnik@webrtc.org> > > Cr-Commit-Position: refs/heads/master@{#30725} > > TBR=ilnik@webrtc.org,hbos@webrtc.org,nisse@webrtc.org > > Change-Id: I53dcb41bdf8f8dccfcd43b717509ec047f590648 > No-Presubmit: true > No-Tree-Checks: true > No-Try: true > Bug: webrtc:11396 > Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/170102 > Reviewed-by: Sebastian Jansson <srte@webrtc.org> > Commit-Queue: Sebastian Jansson <srte@webrtc.org> > Cr-Commit-Position: refs/heads/master@{#30734} TBR=ilnik@webrtc.org,hbos@webrtc.org,nisse@webrtc.org,srte@webrtc.org Change-Id: Ie47df4aec199701256c1dba8fa64176683becabc No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: webrtc:11396 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/170105 Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org> Reviewed-by: Niels Moller <nisse@webrtc.org> Commit-Queue: Ilya Nikolaevskiy <ilnik@webrtc.org> Cr-Commit-Position: refs/heads/master@{#30738}
2020-03-10 09:50:26 +00:00
// Indicastes if the encoder internally downscales input image.
bool internal_encoder_scaler_ RTC_GUARDED_BY(mutex_);
Adaptations adaptation_limitations_ RTC_GUARDED_BY(mutex_);
struct EncoderChangeEvent {
std::string previous_encoder_implementation;
std::string new_encoder_implementation;
};
// Stores the last change in encoder implementation in an optional, so that
// the event can be consumed.
absl::optional<EncoderChangeEvent> encoder_changed_;
// 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 {
UmaSamplesContainer(const char* prefix,
const VideoSendStream::Stats& start_stats,
Clock* clock);
~UmaSamplesContainer();
void UpdateHistograms(const RtpConfig& rtp_config,
const VideoSendStream::Stats& current_stats);
void InitializeBitrateCounters(const VideoSendStream::Stats& stats);
bool InsertEncodedFrame(const EncodedImage& encoded_frame,
int simulcast_idx);
void RemoveOld(int64_t now_ms);
const std::string uma_prefix_;
Clock* const clock_;
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_;
BoolSampleCounter cpu_limited_frame_counter_;
BoolSampleCounter bw_limited_frame_counter_;
SampleCounter bw_resolutions_disabled_counter_;
SampleCounter delay_counter_;
SampleCounter max_delay_counter_;
rtc::RateTracker input_frame_rate_tracker_;
RateCounter input_fps_counter_;
RateCounter sent_fps_counter_;
RateAccCounter total_byte_counter_;
RateAccCounter media_byte_counter_;
RateAccCounter rtx_byte_counter_;
RateAccCounter padding_byte_counter_;
RateAccCounter retransmit_byte_counter_;
RateAccCounter fec_byte_counter_;
int64_t first_rtcp_stats_time_ms_;
int64_t first_rtp_stats_time_ms_;
StatsTimer cpu_adapt_timer_;
StatsTimer quality_adapt_timer_;
BoolSampleCounter paused_time_counter_;
TargetRateUpdates target_rate_updates_;
BoolSampleCounter fallback_active_counter_;
FallbackEncoderInfo fallback_info_;
FallbackEncoderInfoDisabled fallback_info_disabled_;
ReportBlockStats report_block_stats_;
const VideoSendStream::Stats start_stats_;
size_t num_streams_; // Number of configured streams to encoder.
size_t num_pixels_highest_stream_;
EncodedFrameMap encoded_frames_;
AdaptChanges initial_quality_changes_;
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
std::map<int, QpCounters>
qp_counters_; // QP counters mapped by spatial idx.
};
std::unique_ptr<UmaSamplesContainer> uma_container_ RTC_GUARDED_BY(mutex_);
};
} // namespace webrtc
#endif // VIDEO_SEND_STATISTICS_PROXY_H_