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

Side by Side Diff: webrtc/media/engine/webrtcvideoengine2.h

Issue 2254893009: Add histogram for percentage of incoming frames that are limited in resolution due to cpu (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Created 4 years, 4 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
1 /* 1 /*
2 * Copyright (c) 2014 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2014 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 346 matching lines...) Expand 10 before | Expand all | Expand 10 after
357 void RecreateWebRtcStream() EXCLUSIVE_LOCKS_REQUIRED(lock_); 357 void RecreateWebRtcStream() EXCLUSIVE_LOCKS_REQUIRED(lock_);
358 webrtc::VideoEncoderConfig CreateVideoEncoderConfig( 358 webrtc::VideoEncoderConfig CreateVideoEncoderConfig(
359 const VideoCodec& codec) const EXCLUSIVE_LOCKS_REQUIRED(lock_); 359 const VideoCodec& codec) const EXCLUSIVE_LOCKS_REQUIRED(lock_);
360 void ReconfigureEncoder() EXCLUSIVE_LOCKS_REQUIRED(lock_); 360 void ReconfigureEncoder() EXCLUSIVE_LOCKS_REQUIRED(lock_);
361 bool ValidateRtpParameters(const webrtc::RtpParameters& parameters); 361 bool ValidateRtpParameters(const webrtc::RtpParameters& parameters);
362 362
363 // Calls Start or Stop according to whether or not |sending_| is true, 363 // Calls Start or Stop according to whether or not |sending_| is true,
364 // and whether or not the encoding in |rtp_parameters_| is active. 364 // and whether or not the encoding in |rtp_parameters_| is active.
365 void UpdateSendState() EXCLUSIVE_LOCKS_REQUIRED(lock_); 365 void UpdateSendState() EXCLUSIVE_LOCKS_REQUIRED(lock_);
366 366
367 void UpdateHistograms() const;
368
367 rtc::ThreadChecker thread_checker_; 369 rtc::ThreadChecker thread_checker_;
368 rtc::AsyncInvoker invoker_; 370 rtc::AsyncInvoker invoker_;
369 rtc::Thread* worker_thread_; 371 rtc::Thread* worker_thread_;
370 const std::vector<uint32_t> ssrcs_; 372 const std::vector<uint32_t> ssrcs_;
371 const std::vector<SsrcGroup> ssrc_groups_; 373 const std::vector<SsrcGroup> ssrc_groups_;
372 webrtc::Call* const call_; 374 webrtc::Call* const call_;
373 rtc::VideoSinkWants sink_wants_; 375 rtc::VideoSinkWants sink_wants_;
374 // Counter used for deciding if the video resolution is currently 376 // Counter used for deciding if the video resolution is currently
375 // restricted by CPU usage. It is reset if |source_| is changed. 377 // restricted by CPU usage. It is reset if |source_| is changed.
376 int cpu_restricted_counter_; 378 int cpu_restricted_counter_;
377 // Total number of times resolution as been requested to be changed due to 379 // Total number of times resolution as been requested to be changed due to
378 // CPU adaptation. 380 // CPU adaptation.
379 int number_of_cpu_adapt_changes_; 381 int number_of_cpu_adapt_changes_;
382 // Total number of frames sent to |stream_|.
383 int frames_;
384 // Total number of cpu restricted frames sent to |stream_|.
385 int cpu_restricted_frames_;
380 rtc::VideoSourceInterface<cricket::VideoFrame>* source_; 386 rtc::VideoSourceInterface<cricket::VideoFrame>* source_;
381 WebRtcVideoEncoderFactory* const external_encoder_factory_ 387 WebRtcVideoEncoderFactory* const external_encoder_factory_
382 GUARDED_BY(lock_); 388 GUARDED_BY(lock_);
383 389
384 rtc::CriticalSection lock_; 390 rtc::CriticalSection lock_;
385 webrtc::VideoSendStream* stream_ GUARDED_BY(lock_); 391 webrtc::VideoSendStream* stream_ GUARDED_BY(lock_);
386 // Contains settings that are the same for all streams in the MediaChannel, 392 // Contains settings that are the same for all streams in the MediaChannel,
387 // such as codecs, header extensions, and the global bitrate limit for the 393 // such as codecs, header extensions, and the global bitrate limit for the
388 // entire channel. 394 // entire channel.
389 VideoSendStreamParameters parameters_ GUARDED_BY(lock_); 395 VideoSendStreamParameters parameters_ GUARDED_BY(lock_);
(...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after
552 VideoSendParameters send_params_; 558 VideoSendParameters send_params_;
553 VideoOptions default_send_options_; 559 VideoOptions default_send_options_;
554 VideoRecvParameters recv_params_; 560 VideoRecvParameters recv_params_;
555 bool red_disabled_by_remote_side_; 561 bool red_disabled_by_remote_side_;
556 int64_t last_stats_log_ms_; 562 int64_t last_stats_log_ms_;
557 }; 563 };
558 564
559 } // namespace cricket 565 } // namespace cricket
560 566
561 #endif // WEBRTC_MEDIA_ENGINE_WEBRTCVIDEOENGINE2_H_ 567 #endif // WEBRTC_MEDIA_ENGINE_WEBRTCVIDEOENGINE2_H_
OLDNEW
« no previous file with comments | « no previous file | webrtc/media/engine/webrtcvideoengine2.cc » ('j') | webrtc/media/engine/webrtcvideoengine2.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698