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

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

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