1 /* 2 * Copyright (c) 2018 The WebRTC project authors. All Rights Reserved. 3 * 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 6 * tree. An additional intellectual property rights grant can be found 7 * in the file PATENTS. All contributing project authors may 8 * be found in the AUTHORS file in the root of the source tree. 9 */ 10 11 #ifndef API_TEST_AUDIO_QUALITY_ANALYZER_INTERFACE_H_ 12 #define API_TEST_AUDIO_QUALITY_ANALYZER_INTERFACE_H_ 13 14 #include <string> 15 16 #include "api/test/stats_observer_interface.h" 17 #include "api/test/track_id_stream_info_map.h" 18 19 namespace webrtc { 20 namespace webrtc_pc_e2e { 21 22 // API is in development. Can be changed/removed without notice. 23 class AudioQualityAnalyzerInterface : public StatsObserverInterface { 24 public: 25 ~AudioQualityAnalyzerInterface() override = default; 26 27 // Will be called by the framework before the test. 28 // |test_case_name| is name of test case, that should be used to report all 29 // audio metrics. 30 // |analyzer_helper| is a pointer to a class that will allow track_id to 31 // stream_id matching. The caller is responsible for ensuring the 32 // AnalyzerHelper outlives the instance of the AudioQualityAnalyzerInterface. 33 virtual void Start(std::string test_case_name, 34 TrackIdStreamInfoMap* analyzer_helper) = 0; 35 36 // Will be called by the framework at the end of the test. The analyzer 37 // has to finalize all its stats and it should report them. 38 virtual void Stop() = 0; 39 }; 40 41 } // namespace webrtc_pc_e2e 42 } // namespace webrtc 43 44 #endif // API_TEST_AUDIO_QUALITY_ANALYZER_INTERFACE_H_ 45