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

Side by Side Diff: webrtc/modules/video_coding/codecs/test/videoprocessor.h

Issue 2510583002: Reland #2 of Issue 2434073003: Extract bitrate allocation ... (Closed)
Patch Set: Addressed comments 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
11 #ifndef WEBRTC_MODULES_VIDEO_CODING_CODECS_TEST_VIDEOPROCESSOR_H_ 11 #ifndef WEBRTC_MODULES_VIDEO_CODING_CODECS_TEST_VIDEOPROCESSOR_H_
12 #define WEBRTC_MODULES_VIDEO_CODING_CODECS_TEST_VIDEOPROCESSOR_H_ 12 #define WEBRTC_MODULES_VIDEO_CODING_CODECS_TEST_VIDEOPROCESSOR_H_
13 13
14 #include <memory>
14 #include <string> 15 #include <string>
15 16
16 #include "webrtc/base/checks.h" 17 #include "webrtc/base/checks.h"
17 #include "webrtc/common_video/libyuv/include/webrtc_libyuv.h" 18 #include "webrtc/common_video/libyuv/include/webrtc_libyuv.h"
18 #include "webrtc/modules/video_coding/include/video_codec_interface.h" 19 #include "webrtc/modules/video_coding/include/video_codec_interface.h"
19 #include "webrtc/modules/video_coding/codecs/test/packet_manipulator.h" 20 #include "webrtc/modules/video_coding/codecs/test/packet_manipulator.h"
20 #include "webrtc/modules/video_coding/codecs/test/stats.h" 21 #include "webrtc/modules/video_coding/codecs/test/stats.h"
21 #include "webrtc/test/testsupport/frame_reader.h" 22 #include "webrtc/test/testsupport/frame_reader.h"
22 #include "webrtc/test/testsupport/frame_writer.h" 23 #include "webrtc/test/testsupport/frame_writer.h"
23 #include "webrtc/video_frame.h" 24 #include "webrtc/video_frame.h"
24 25
25 namespace webrtc { 26 namespace webrtc {
27
28 class VideoBitrateAllocator;
29
26 namespace test { 30 namespace test {
27 31
28 // Defines which frame types shall be excluded from packet loss and when. 32 // Defines which frame types shall be excluded from packet loss and when.
29 enum ExcludeFrameTypes { 33 enum ExcludeFrameTypes {
30 // Will exclude the first keyframe in the video sequence from packet loss. 34 // Will exclude the first keyframe in the video sequence from packet loss.
31 // Following keyframes will be targeted for packet loss. 35 // Following keyframes will be targeted for packet loss.
32 kExcludeOnlyFirstKeyFrame, 36 kExcludeOnlyFirstKeyFrame,
33 // Exclude all keyframes from packet loss, no matter where in the video 37 // Exclude all keyframes from packet loss, no matter where in the video
34 // sequence they occur. 38 // sequence they occur.
35 kExcludeAllKeyFrames 39 kExcludeAllKeyFrames
(...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after
184 size_t EncodedFrameSize() override; 188 size_t EncodedFrameSize() override;
185 // Return the encoded frame type (key or delta). 189 // Return the encoded frame type (key or delta).
186 FrameType EncodedFrameType() override; 190 FrameType EncodedFrameType() override;
187 // Return the number of dropped frames. 191 // Return the number of dropped frames.
188 int NumberDroppedFrames() override; 192 int NumberDroppedFrames() override;
189 // Return the number of spatial resizes. 193 // Return the number of spatial resizes.
190 int NumberSpatialResizes() override; 194 int NumberSpatialResizes() override;
191 195
192 webrtc::VideoEncoder* encoder_; 196 webrtc::VideoEncoder* encoder_;
193 webrtc::VideoDecoder* decoder_; 197 webrtc::VideoDecoder* decoder_;
198 std::unique_ptr<VideoBitrateAllocator> bitrate_allocator_;
194 FrameReader* frame_reader_; 199 FrameReader* frame_reader_;
195 FrameWriter* frame_writer_; 200 FrameWriter* frame_writer_;
196 PacketManipulator* packet_manipulator_; 201 PacketManipulator* packet_manipulator_;
197 const TestConfig& config_; 202 const TestConfig& config_;
198 Stats* stats_; 203 Stats* stats_;
199 204
200 EncodedImageCallback* encode_callback_; 205 EncodedImageCallback* encode_callback_;
201 DecodedImageCallback* decode_callback_; 206 DecodedImageCallback* decode_callback_;
202 // Keep track of the last successful frame, since we need to write that 207 // Keep track of the last successful frame, since we need to write that
203 // when decoding fails: 208 // when decoding fails:
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
252 257
253 private: 258 private:
254 VideoProcessorImpl* video_processor_; 259 VideoProcessorImpl* video_processor_;
255 }; 260 };
256 }; 261 };
257 262
258 } // namespace test 263 } // namespace test
259 } // namespace webrtc 264 } // namespace webrtc
260 265
261 #endif // WEBRTC_MODULES_VIDEO_CODING_CODECS_TEST_VIDEOPROCESSOR_H_ 266 #endif // WEBRTC_MODULES_VIDEO_CODING_CODECS_TEST_VIDEOPROCESSOR_H_
OLDNEW
« no previous file with comments | « webrtc/modules/video_coding/codecs/i420/include/i420.h ('k') | webrtc/modules/video_coding/codecs/test/videoprocessor.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698