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

Side by Side Diff: webrtc/video_send_stream.h

Issue 2368223002: Add VideoSendStream::Stats::prefered_media_bitrate_bps (Closed)
Patch Set: Addressed nits Created 4 years, 2 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
« no previous file with comments | « webrtc/video/vie_encoder.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2013 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2013 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
11 #ifndef WEBRTC_VIDEO_SEND_STREAM_H_ 11 #ifndef WEBRTC_VIDEO_SEND_STREAM_H_
12 #define WEBRTC_VIDEO_SEND_STREAM_H_ 12 #define WEBRTC_VIDEO_SEND_STREAM_H_
13 13
14 #include <map> 14 #include <map>
15 #include <string> 15 #include <string>
16 #include <utility> 16 #include <utility>
17 #include <vector> 17 #include <vector>
18 #include <utility>
18 19
19 #include "webrtc/base/platform_file.h" 20 #include "webrtc/base/platform_file.h"
20 #include "webrtc/common_types.h" 21 #include "webrtc/common_types.h"
21 #include "webrtc/common_video/include/frame_callback.h" 22 #include "webrtc/common_video/include/frame_callback.h"
22 #include "webrtc/config.h" 23 #include "webrtc/config.h"
23 #include "webrtc/media/base/videosinkinterface.h" 24 #include "webrtc/media/base/videosinkinterface.h"
24 #include "webrtc/media/base/videosourceinterface.h" 25 #include "webrtc/media/base/videosourceinterface.h"
25 #include "webrtc/transport.h" 26 #include "webrtc/transport.h"
26 27
27 namespace webrtc { 28 namespace webrtc {
(...skipping 20 matching lines...) Expand all
48 RtcpStatistics rtcp_stats; 49 RtcpStatistics rtcp_stats;
49 }; 50 };
50 51
51 struct Stats { 52 struct Stats {
52 std::string ToString(int64_t time_ms) const; 53 std::string ToString(int64_t time_ms) const;
53 std::string encoder_implementation_name = "unknown"; 54 std::string encoder_implementation_name = "unknown";
54 int input_frame_rate = 0; 55 int input_frame_rate = 0;
55 int encode_frame_rate = 0; 56 int encode_frame_rate = 0;
56 int avg_encode_time_ms = 0; 57 int avg_encode_time_ms = 0;
57 int encode_usage_percent = 0; 58 int encode_usage_percent = 0;
59 // Bitrate the encoder is currently configured to use due to bandwidth
60 // limitations.
58 int target_media_bitrate_bps = 0; 61 int target_media_bitrate_bps = 0;
62 // Bitrate the encoder is actually producing.
59 int media_bitrate_bps = 0; 63 int media_bitrate_bps = 0;
64 // Media bitrate this VideoSendStream is configured to prefer if there are
65 // no bandwidth limitations.
66 int preferred_media_bitrate_bps = 0;
60 bool suspended = false; 67 bool suspended = false;
61 bool bw_limited_resolution = false; 68 bool bw_limited_resolution = false;
62 std::map<uint32_t, StreamStats> substreams; 69 std::map<uint32_t, StreamStats> substreams;
63 }; 70 };
64 71
65 struct Config { 72 struct Config {
66 public: 73 public:
67 Config() = delete; 74 Config() = delete;
68 Config(Config&&) = default; 75 Config(Config&&) = default;
69 explicit Config(Transport* send_transport) 76 explicit Config(Transport* send_transport)
(...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after
210 EnableEncodedFrameRecording(std::vector<rtc::PlatformFile>(), 0); 217 EnableEncodedFrameRecording(std::vector<rtc::PlatformFile>(), 0);
211 } 218 }
212 219
213 protected: 220 protected:
214 virtual ~VideoSendStream() {} 221 virtual ~VideoSendStream() {}
215 }; 222 };
216 223
217 } // namespace webrtc 224 } // namespace webrtc
218 225
219 #endif // WEBRTC_VIDEO_SEND_STREAM_H_ 226 #endif // WEBRTC_VIDEO_SEND_STREAM_H_
OLDNEW
« no previous file with comments | « webrtc/video/vie_encoder.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698