OLD | NEW |
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...) Loading... |
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...) Loading... |
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_ |
OLD | NEW |