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

Side by Side Diff: webrtc/video/video_quality_test.cc

Issue 2995363002: Replace gflags usages with rtc_base/flags in all targets based on test_main (Closed)
Patch Set: Fix string use after free Created 3 years, 3 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
« no previous file with comments | « webrtc/video/BUILD.gn ('k') | webrtc/voice_engine/BUILD.gn » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2015 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2015 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 #include "webrtc/video/video_quality_test.h" 10 #include "webrtc/video/video_quality_test.h"
11 11
12 #include <stdio.h> 12 #include <stdio.h>
13 #include <algorithm> 13 #include <algorithm>
14 #include <deque> 14 #include <deque>
15 #include <map> 15 #include <map>
16 #include <set> 16 #include <set>
17 #include <sstream> 17 #include <sstream>
18 #include <string> 18 #include <string>
19 #include <vector> 19 #include <vector>
20 20
21 #include "gflags/gflags.h"
22 #include "webrtc/call/call.h" 21 #include "webrtc/call/call.h"
23 #include "webrtc/common_video/libyuv/include/webrtc_libyuv.h" 22 #include "webrtc/common_video/libyuv/include/webrtc_libyuv.h"
24 #include "webrtc/logging/rtc_event_log/rtc_event_log.h" 23 #include "webrtc/logging/rtc_event_log/rtc_event_log.h"
25 #include "webrtc/media/engine/webrtcvideoengine.h" 24 #include "webrtc/media/engine/webrtcvideoengine.h"
26 #include "webrtc/modules/audio_mixer/audio_mixer_impl.h" 25 #include "webrtc/modules/audio_mixer/audio_mixer_impl.h"
27 #include "webrtc/modules/rtp_rtcp/include/rtp_header_parser.h" 26 #include "webrtc/modules/rtp_rtcp/include/rtp_header_parser.h"
28 #include "webrtc/modules/rtp_rtcp/source/rtp_format.h" 27 #include "webrtc/modules/rtp_rtcp/source/rtp_format.h"
29 #include "webrtc/modules/rtp_rtcp/source/rtp_utility.h" 28 #include "webrtc/modules/rtp_rtcp/source/rtp_utility.h"
30 #include "webrtc/modules/video_coding/codecs/h264/include/h264.h" 29 #include "webrtc/modules/video_coding/codecs/h264/include/h264.h"
31 #include "webrtc/modules/video_coding/codecs/vp8/include/vp8.h" 30 #include "webrtc/modules/video_coding/codecs/vp8/include/vp8.h"
32 #include "webrtc/modules/video_coding/codecs/vp8/include/vp8_common_types.h" 31 #include "webrtc/modules/video_coding/codecs/vp8/include/vp8_common_types.h"
33 #include "webrtc/modules/video_coding/codecs/vp9/include/vp9.h" 32 #include "webrtc/modules/video_coding/codecs/vp9/include/vp9.h"
34 #include "webrtc/rtc_base/checks.h" 33 #include "webrtc/rtc_base/checks.h"
35 #include "webrtc/rtc_base/cpu_time.h" 34 #include "webrtc/rtc_base/cpu_time.h"
36 #include "webrtc/rtc_base/event.h" 35 #include "webrtc/rtc_base/event.h"
36 #include "webrtc/rtc_base/flags.h"
37 #include "webrtc/rtc_base/format_macros.h" 37 #include "webrtc/rtc_base/format_macros.h"
38 #include "webrtc/rtc_base/logging.h" 38 #include "webrtc/rtc_base/logging.h"
39 #include "webrtc/rtc_base/memory_usage.h" 39 #include "webrtc/rtc_base/memory_usage.h"
40 #include "webrtc/rtc_base/optional.h" 40 #include "webrtc/rtc_base/optional.h"
41 #include "webrtc/rtc_base/pathutils.h" 41 #include "webrtc/rtc_base/pathutils.h"
42 #include "webrtc/rtc_base/platform_file.h" 42 #include "webrtc/rtc_base/platform_file.h"
43 #include "webrtc/rtc_base/ptr_util.h" 43 #include "webrtc/rtc_base/ptr_util.h"
44 #include "webrtc/rtc_base/timeutils.h" 44 #include "webrtc/rtc_base/timeutils.h"
45 #include "webrtc/system_wrappers/include/cpu_info.h" 45 #include "webrtc/system_wrappers/include/cpu_info.h"
46 #include "webrtc/system_wrappers/include/field_trial.h" 46 #include "webrtc/system_wrappers/include/field_trial.h"
(...skipping 786 matching lines...) Expand 10 before | Expand all | Expand 10 after
833 // Therefore this metric will depend on order in which tests are run and 833 // Therefore this metric will depend on order in which tests are run and
834 // will be flaky. 834 // will be flaky.
835 PrintResult("memory_usage", memory_usage_, " bytes"); 835 PrintResult("memory_usage", memory_usage_, " bytes");
836 #endif 836 #endif
837 837
838 // LibJpeg is not available on iOS. 838 // LibJpeg is not available on iOS.
839 #if !defined(WEBRTC_IOS) 839 #if !defined(WEBRTC_IOS)
840 // Saving only the worst frame for manual analysis. Intention here is to 840 // Saving only the worst frame for manual analysis. Intention here is to
841 // only detect video corruptions and not to track picture quality. Thus, 841 // only detect video corruptions and not to track picture quality. Thus,
842 // jpeg is used here. 842 // jpeg is used here.
843 if (FLAGS_save_worst_frame && worst_frame_) { 843 if (FLAG_save_worst_frame && worst_frame_) {
844 std::string output_dir; 844 std::string output_dir;
845 test::GetTestOutputDir(&output_dir); 845 test::GetTestOutputDir(&output_dir);
846 std::string output_path = 846 std::string output_path =
847 rtc::Pathname(output_dir, test_label_ + ".jpg").pathname(); 847 rtc::Pathname(output_dir, test_label_ + ".jpg").pathname();
848 LOG(LS_INFO) << "Saving worst frame to " << output_path; 848 LOG(LS_INFO) << "Saving worst frame to " << output_path;
849 test::JpegFrameWriter frame_writer(output_path); 849 test::JpegFrameWriter frame_writer(output_path);
850 RTC_CHECK(frame_writer.WriteFrame(worst_frame_->frame, 850 RTC_CHECK(frame_writer.WriteFrame(worst_frame_->frame,
851 100 /*best quality*/)); 851 100 /*best quality*/));
852 } 852 }
853 #endif 853 #endif
(...skipping 1305 matching lines...) Expand 10 before | Expand all | Expand 10 after
2159 if (!params_.logging.encoded_frame_base_path.empty()) { 2159 if (!params_.logging.encoded_frame_base_path.empty()) {
2160 std::ostringstream str; 2160 std::ostringstream str;
2161 str << receive_logs_++; 2161 str << receive_logs_++;
2162 std::string path = 2162 std::string path =
2163 params_.logging.encoded_frame_base_path + "." + str.str() + ".recv.ivf"; 2163 params_.logging.encoded_frame_base_path + "." + str.str() + ".recv.ivf";
2164 stream->EnableEncodedFrameRecording(rtc::CreatePlatformFile(path), 2164 stream->EnableEncodedFrameRecording(rtc::CreatePlatformFile(path),
2165 100000000); 2165 100000000);
2166 } 2166 }
2167 } 2167 }
2168 } // namespace webrtc 2168 } // namespace webrtc
OLDNEW
« no previous file with comments | « webrtc/video/BUILD.gn ('k') | webrtc/voice_engine/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698