| 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 |
| (...skipping 235 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 246 rtc::TaskQueue* const task_queue_; | 246 rtc::TaskQueue* const task_queue_; |
| 247 }; | 247 }; |
| 248 | 248 |
| 249 // Invoked by the callback adapter when a frame has completed encoding. | 249 // Invoked by the callback adapter when a frame has completed encoding. |
| 250 void FrameEncoded(webrtc::VideoCodecType codec, | 250 void FrameEncoded(webrtc::VideoCodecType codec, |
| 251 const webrtc::EncodedImage& encodedImage); | 251 const webrtc::EncodedImage& encodedImage); |
| 252 | 252 |
| 253 // Invoked by the callback adapter when a frame has completed decoding. | 253 // Invoked by the callback adapter when a frame has completed decoding. |
| 254 void FrameDecoded(const webrtc::VideoFrame& image); | 254 void FrameDecoded(const webrtc::VideoFrame& image); |
| 255 | 255 |
| 256 bool initialized_ GUARDED_BY(sequence_checker_); | 256 bool initialized_ RTC_GUARDED_BY(sequence_checker_); |
| 257 TestConfig config_ GUARDED_BY(sequence_checker_); | 257 TestConfig config_ RTC_GUARDED_BY(sequence_checker_); |
| 258 | 258 |
| 259 webrtc::VideoEncoder* const encoder_; | 259 webrtc::VideoEncoder* const encoder_; |
| 260 webrtc::VideoDecoder* const decoder_; | 260 webrtc::VideoDecoder* const decoder_; |
| 261 const std::unique_ptr<VideoBitrateAllocator> bitrate_allocator_; | 261 const std::unique_ptr<VideoBitrateAllocator> bitrate_allocator_; |
| 262 | 262 |
| 263 // Adapters for the codec callbacks. | 263 // Adapters for the codec callbacks. |
| 264 VideoProcessorEncodeCompleteCallback encode_callback_; | 264 VideoProcessorEncodeCompleteCallback encode_callback_; |
| 265 VideoProcessorDecodeCompleteCallback decode_callback_; | 265 VideoProcessorDecodeCompleteCallback decode_callback_; |
| 266 | 266 |
| 267 // Fake network. | 267 // Fake network. |
| 268 PacketManipulator* const packet_manipulator_; | 268 PacketManipulator* const packet_manipulator_; |
| 269 | 269 |
| 270 // These (mandatory) file manipulators are used for, e.g., objective PSNR and | 270 // These (mandatory) file manipulators are used for, e.g., objective PSNR and |
| 271 // SSIM calculations at the end of a test run. | 271 // SSIM calculations at the end of a test run. |
| 272 FrameReader* const analysis_frame_reader_; | 272 FrameReader* const analysis_frame_reader_; |
| 273 FrameWriter* const analysis_frame_writer_; | 273 FrameWriter* const analysis_frame_writer_; |
| 274 | 274 |
| 275 // These (optional) file writers are used to persistently store the encoded | 275 // These (optional) file writers are used to persistently store the encoded |
| 276 // and decoded bitstreams. The purpose is to give the experimenter an option | 276 // and decoded bitstreams. The purpose is to give the experimenter an option |
| 277 // to subjectively evaluate the quality of the processing. Each frame writer | 277 // to subjectively evaluate the quality of the processing. Each frame writer |
| 278 // is enabled by being non-null. | 278 // is enabled by being non-null. |
| 279 IvfFileWriter* const encoded_frame_writer_; | 279 IvfFileWriter* const encoded_frame_writer_; |
| 280 FrameWriter* const decoded_frame_writer_; | 280 FrameWriter* const decoded_frame_writer_; |
| 281 | 281 |
| 282 // Keep track of inputed/encoded/decoded frames, so we can detect frame drops. | 282 // Keep track of inputed/encoded/decoded frames, so we can detect frame drops. |
| 283 int last_inputed_frame_num_ GUARDED_BY(sequence_checker_); | 283 int last_inputed_frame_num_ RTC_GUARDED_BY(sequence_checker_); |
| 284 int last_encoded_frame_num_ GUARDED_BY(sequence_checker_); | 284 int last_encoded_frame_num_ RTC_GUARDED_BY(sequence_checker_); |
| 285 int last_decoded_frame_num_ GUARDED_BY(sequence_checker_); | 285 int last_decoded_frame_num_ RTC_GUARDED_BY(sequence_checker_); |
| 286 | 286 |
| 287 // Store an RTP timestamp -> frame number map, since the timestamps are | 287 // Store an RTP timestamp -> frame number map, since the timestamps are |
| 288 // based off of the frame rate, which can change mid-test. | 288 // based off of the frame rate, which can change mid-test. |
| 289 std::map<uint32_t, int> rtp_timestamp_to_frame_num_ | 289 std::map<uint32_t, int> rtp_timestamp_to_frame_num_ |
| 290 GUARDED_BY(sequence_checker_); | 290 RTC_GUARDED_BY(sequence_checker_); |
| 291 | 291 |
| 292 // Keep track of if we have excluded the first key frame from packet loss. | 292 // Keep track of if we have excluded the first key frame from packet loss. |
| 293 bool first_key_frame_has_been_excluded_ GUARDED_BY(sequence_checker_); | 293 bool first_key_frame_has_been_excluded_ RTC_GUARDED_BY(sequence_checker_); |
| 294 | 294 |
| 295 // Keep track of the last successfully decoded frame, since we write that | 295 // Keep track of the last successfully decoded frame, since we write that |
| 296 // frame to disk when decoding fails. | 296 // frame to disk when decoding fails. |
| 297 rtc::Buffer last_decoded_frame_buffer_ GUARDED_BY(sequence_checker_); | 297 rtc::Buffer last_decoded_frame_buffer_ RTC_GUARDED_BY(sequence_checker_); |
| 298 | 298 |
| 299 // Statistics. | 299 // Statistics. |
| 300 Stats* stats_; | 300 Stats* stats_; |
| 301 std::vector<int> num_dropped_frames_ GUARDED_BY(sequence_checker_); | 301 std::vector<int> num_dropped_frames_ RTC_GUARDED_BY(sequence_checker_); |
| 302 std::vector<int> num_spatial_resizes_ GUARDED_BY(sequence_checker_); | 302 std::vector<int> num_spatial_resizes_ RTC_GUARDED_BY(sequence_checker_); |
| 303 int rate_update_index_ GUARDED_BY(sequence_checker_); | 303 int rate_update_index_ RTC_GUARDED_BY(sequence_checker_); |
| 304 | 304 |
| 305 rtc::SequencedTaskChecker sequence_checker_; | 305 rtc::SequencedTaskChecker sequence_checker_; |
| 306 | 306 |
| 307 RTC_DISALLOW_COPY_AND_ASSIGN(VideoProcessor); | 307 RTC_DISALLOW_COPY_AND_ASSIGN(VideoProcessor); |
| 308 }; | 308 }; |
| 309 | 309 |
| 310 } // namespace test | 310 } // namespace test |
| 311 } // namespace webrtc | 311 } // namespace webrtc |
| 312 | 312 |
| 313 #endif // WEBRTC_MODULES_VIDEO_CODING_CODECS_TEST_VIDEOPROCESSOR_H_ | 313 #endif // WEBRTC_MODULES_VIDEO_CODING_CODECS_TEST_VIDEOPROCESSOR_H_ |
| OLD | NEW |