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

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

Issue 2994613002: Remove VideoProcessor interface. (Closed)
Patch Set: asapersson comments 1. Created 3 years, 4 months 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 22 matching lines...) Expand all
33 #include "webrtc/modules/video_coding/codecs/test/videoprocessor.h" 33 #include "webrtc/modules/video_coding/codecs/test/videoprocessor.h"
34 #include "webrtc/modules/video_coding/codecs/vp8/include/vp8.h" 34 #include "webrtc/modules/video_coding/codecs/vp8/include/vp8.h"
35 #include "webrtc/modules/video_coding/codecs/vp8/include/vp8_common_types.h" 35 #include "webrtc/modules/video_coding/codecs/vp8/include/vp8_common_types.h"
36 #include "webrtc/modules/video_coding/codecs/vp9/include/vp9.h" 36 #include "webrtc/modules/video_coding/codecs/vp9/include/vp9.h"
37 #include "webrtc/modules/video_coding/include/video_codec_interface.h" 37 #include "webrtc/modules/video_coding/include/video_codec_interface.h"
38 #include "webrtc/modules/video_coding/include/video_coding.h" 38 #include "webrtc/modules/video_coding/include/video_coding.h"
39 #include "webrtc/modules/video_coding/utility/ivf_file_writer.h" 39 #include "webrtc/modules/video_coding/utility/ivf_file_writer.h"
40 #include "webrtc/rtc_base/checks.h" 40 #include "webrtc/rtc_base/checks.h"
41 #include "webrtc/rtc_base/file.h" 41 #include "webrtc/rtc_base/file.h"
42 #include "webrtc/rtc_base/logging.h" 42 #include "webrtc/rtc_base/logging.h"
43 #include "webrtc/rtc_base/ptr_util.h"
43 #include "webrtc/test/gtest.h" 44 #include "webrtc/test/gtest.h"
44 #include "webrtc/test/testsupport/fileutils.h" 45 #include "webrtc/test/testsupport/fileutils.h"
45 #include "webrtc/test/testsupport/frame_reader.h" 46 #include "webrtc/test/testsupport/frame_reader.h"
46 #include "webrtc/test/testsupport/frame_writer.h" 47 #include "webrtc/test/testsupport/frame_writer.h"
47 #include "webrtc/test/testsupport/metrics/video_metrics.h" 48 #include "webrtc/test/testsupport/metrics/video_metrics.h"
48 #include "webrtc/test/testsupport/packet_reader.h" 49 #include "webrtc/test/testsupport/packet_reader.h"
49 #include "webrtc/typedefs.h" 50 #include "webrtc/typedefs.h"
50 51
51 namespace webrtc { 52 namespace webrtc {
52 namespace test { 53 namespace test {
(...skipping 200 matching lines...) Expand 10 before | Expand all | Expand 10 after
253 decoded_frame_writer_.reset(new test::Y4mFrameWriterImpl( 254 decoded_frame_writer_.reset(new test::Y4mFrameWriterImpl(
254 output_filename_base + "_decoded.y4m", 255 output_filename_base + "_decoded.y4m",
255 config_.codec_settings->width, config_.codec_settings->height, 256 config_.codec_settings->width, config_.codec_settings->height,
256 start_frame_rate_)); 257 start_frame_rate_));
257 RTC_CHECK(decoded_frame_writer_->Init()); 258 RTC_CHECK(decoded_frame_writer_->Init());
258 } 259 }
259 } 260 }
260 261
261 packet_manipulator_.reset(new test::PacketManipulatorImpl( 262 packet_manipulator_.reset(new test::PacketManipulatorImpl(
262 &packet_reader_, config_.networking_config, config_.verbose)); 263 &packet_reader_, config_.networking_config, config_.verbose));
263 processor_.reset(new test::VideoProcessorImpl( 264 processor_ = rtc::MakeUnique<VideoProcessor>(
264 encoder_.get(), decoder_.get(), analysis_frame_reader_.get(), 265 encoder_.get(), decoder_.get(), analysis_frame_reader_.get(),
265 analysis_frame_writer_.get(), packet_manipulator_.get(), config_, 266 analysis_frame_writer_.get(), packet_manipulator_.get(), config_,
266 &stats_, source_frame_writer_.get(), encoded_frame_writer_.get(), 267 &stats_, source_frame_writer_.get(), encoded_frame_writer_.get(),
267 decoded_frame_writer_.get())); 268 decoded_frame_writer_.get());
268 processor_->Init(); 269 processor_->Init();
269 } 270 }
270 271
271 // Reset quantities after each encoder update, update the target per-frame 272 // Reset quantities after each encoder update, update the target per-frame
272 // bandwidth. 273 // bandwidth.
273 void ResetRateControlMetrics(int num_frames_to_hit_target) { 274 void ResetRateControlMetrics(int num_frames_to_hit_target) {
274 for (int i = 0; i < num_temporal_layers_; i++) { 275 for (int i = 0; i < num_temporal_layers_; i++) {
275 num_frames_per_update_[i] = 0; 276 num_frames_per_update_[i] = 0;
276 sum_frame_size_mismatch_[i] = 0.0f; 277 sum_frame_size_mismatch_[i] = 0.0f;
277 sum_encoded_frame_size_[i] = 0.0f; 278 sum_encoded_frame_size_[i] = 0.0f;
(...skipping 486 matching lines...) Expand 10 before | Expand all | Expand 10 after
764 int start_frame_rate_; 765 int start_frame_rate_;
765 766
766 // Codec and network settings. 767 // Codec and network settings.
767 int num_temporal_layers_; 768 int num_temporal_layers_;
768 }; 769 };
769 770
770 } // namespace test 771 } // namespace test
771 } // namespace webrtc 772 } // namespace webrtc
772 773
773 #endif // WEBRTC_MODULES_VIDEO_CODING_CODECS_TEST_VIDEOPROCESSOR_INTEGRATIONTES T_H_ 774 #endif // WEBRTC_MODULES_VIDEO_CODING_CODECS_TEST_VIDEOPROCESSOR_INTEGRATIONTES T_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698