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

Side by Side Diff: webrtc/modules/video_coding/video_coding_impl.h

Issue 2434073003: Extract bitrate allocation of spatial/temporal layers out of codec impl. (Closed)
Patch Set: Rebase Created 4 years, 1 month 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) 2012 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2012 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 16 matching lines...) Expand all
27 #include "webrtc/modules/video_coding/generic_encoder.h" 27 #include "webrtc/modules/video_coding/generic_encoder.h"
28 #include "webrtc/modules/video_coding/jitter_buffer.h" 28 #include "webrtc/modules/video_coding/jitter_buffer.h"
29 #include "webrtc/modules/video_coding/media_optimization.h" 29 #include "webrtc/modules/video_coding/media_optimization.h"
30 #include "webrtc/modules/video_coding/receiver.h" 30 #include "webrtc/modules/video_coding/receiver.h"
31 #include "webrtc/modules/video_coding/timing.h" 31 #include "webrtc/modules/video_coding/timing.h"
32 #include "webrtc/modules/video_coding/utility/qp_parser.h" 32 #include "webrtc/modules/video_coding/utility/qp_parser.h"
33 #include "webrtc/system_wrappers/include/clock.h" 33 #include "webrtc/system_wrappers/include/clock.h"
34 34
35 namespace webrtc { 35 namespace webrtc {
36 36
37 class VideoBitrateAllocator;
38
37 namespace vcm { 39 namespace vcm {
38 40
39 class VCMProcessTimer { 41 class VCMProcessTimer {
40 public: 42 public:
41 VCMProcessTimer(int64_t periodMs, Clock* clock) 43 VCMProcessTimer(int64_t periodMs, Clock* clock)
42 : _clock(clock), 44 : _clock(clock),
43 _periodMs(periodMs), 45 _periodMs(periodMs),
44 _latestMs(_clock->TimeInMilliseconds()) {} 46 _latestMs(_clock->TimeInMilliseconds()) {}
45 int64_t Period() const; 47 int64_t Period() const;
46 int64_t TimeUntilProcess() const; 48 int64_t TimeUntilProcess() const;
(...skipping 21 matching lines...) Expand all
68 uint32_t numberOfCores, 70 uint32_t numberOfCores,
69 uint32_t maxPayloadSize); 71 uint32_t maxPayloadSize);
70 72
71 void RegisterExternalEncoder(VideoEncoder* externalEncoder, 73 void RegisterExternalEncoder(VideoEncoder* externalEncoder,
72 uint8_t payloadType, 74 uint8_t payloadType,
73 bool internalSource); 75 bool internalSource);
74 76
75 int Bitrate(unsigned int* bitrate) const; 77 int Bitrate(unsigned int* bitrate) const;
76 int FrameRate(unsigned int* framerate) const; 78 int FrameRate(unsigned int* framerate) const;
77 79
78 int32_t SetChannelParameters(uint32_t target_bitrate, // bits/s. 80 int32_t SetChannelParameters(uint32_t target_bitrate_bps,
79 uint8_t lossRate, 81 uint8_t lossRate,
80 int64_t rtt); 82 int64_t rtt,
83 VideoBitrateAllocator* bitrate_allocator);
84 // Calls SetChannelParameters(), with the previous target bitrate, loss rate
85 // and RTT, but reallocates the bitrate allocation based on a presumably
86 // updated codec configuration.
87 int32_t UpdateChannelParemeters(VideoBitrateAllocator* bitrate_allocator);
88
81 // Deprecated: 89 // Deprecated:
82 // TODO(perkj): Remove once no projects use it. 90 // TODO(perkj): Remove once no projects use it.
83 int32_t RegisterProtectionCallback(VCMProtectionCallback* protection); 91 int32_t RegisterProtectionCallback(VCMProtectionCallback* protection);
84 92
85 int32_t AddVideoFrame(const VideoFrame& videoFrame, 93 int32_t AddVideoFrame(const VideoFrame& videoFrame,
86 const CodecSpecificInfo* codecSpecificInfo); 94 const CodecSpecificInfo* codecSpecificInfo);
87 95
88 int32_t IntraFrameRequest(size_t stream_index); 96 int32_t IntraFrameRequest(size_t stream_index);
89 int32_t EnableFrameDropper(bool enable); 97 int32_t EnableFrameDropper(bool enable);
90 98
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after
201 VCMProcessTimer _receiveStatsTimer; 209 VCMProcessTimer _receiveStatsTimer;
202 VCMProcessTimer _retransmissionTimer; 210 VCMProcessTimer _retransmissionTimer;
203 VCMProcessTimer _keyRequestTimer; 211 VCMProcessTimer _keyRequestTimer;
204 QpParser qp_parser_; 212 QpParser qp_parser_;
205 ThreadUnsafeOneTimeEvent first_frame_received_; 213 ThreadUnsafeOneTimeEvent first_frame_received_;
206 }; 214 };
207 215
208 } // namespace vcm 216 } // namespace vcm
209 } // namespace webrtc 217 } // namespace webrtc
210 #endif // WEBRTC_MODULES_VIDEO_CODING_VIDEO_CODING_IMPL_H_ 218 #endif // WEBRTC_MODULES_VIDEO_CODING_VIDEO_CODING_IMPL_H_
OLDNEW
« no previous file with comments | « webrtc/modules/video_coding/video_coding.gypi ('k') | webrtc/modules/video_coding/video_coding_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698