Artem Titov | b6c6201 | 2019-01-08 13:58:23 | [diff] [blame] | 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 | |
Artem Titov | d57628f | 2019-03-22 11:34:25 | [diff] [blame] | 11 | #ifndef API_TEST_AUDIO_QUALITY_ANALYZER_INTERFACE_H_ |
| 12 | #define API_TEST_AUDIO_QUALITY_ANALYZER_INTERFACE_H_ |
Artem Titov | b6c6201 | 2019-01-08 13:58:23 | [diff] [blame] | 13 | |
Artem Titov | d57628f | 2019-03-22 11:34:25 | [diff] [blame] | 14 | #include <string> |
| 15 | |
| 16 | #include "api/test/stats_observer_interface.h" |
Andrey Logvin | 20f4582 | 2020-07-01 08:32:15 | [diff] [blame] | 17 | #include "api/test/track_id_stream_info_map.h" |
Artem Titov | b6c6201 | 2019-01-08 13:58:23 | [diff] [blame] | 18 | |
Mirko Bonadei | 12ae4f4 | 2019-02-26 14:19:07 | [diff] [blame] | 19 | namespace webrtc { |
Artem Titov | 0b44314 | 2019-03-20 10:11:08 | [diff] [blame] | 20 | namespace webrtc_pc_e2e { |
Mirko Bonadei | 12ae4f4 | 2019-02-26 14:19:07 | [diff] [blame] | 21 | |
Artem Titov | d57628f | 2019-03-22 11:34:25 | [diff] [blame] | 22 | // API is in development. Can be changed/removed without notice. |
Mirko Bonadei | 12ae4f4 | 2019-02-26 14:19:07 | [diff] [blame] | 23 | class AudioQualityAnalyzerInterface : public StatsObserverInterface { |
Artem Titov | ebd9770 | 2019-01-09 16:55:36 | [diff] [blame] | 24 | public: |
Mirko Bonadei | 12ae4f4 | 2019-02-26 14:19:07 | [diff] [blame] | 25 | ~AudioQualityAnalyzerInterface() override = default; |
Artem Titov | 5983585 | 2019-02-27 16:44:13 | [diff] [blame] | 26 | |
Mirko Bonadei | f948eb6 | 2019-04-05 13:13:23 | [diff] [blame] | 27 | // Will be called by the framework before the test. |
Artem Titov | 5983585 | 2019-02-27 16:44:13 | [diff] [blame] | 28 | // |test_case_name| is name of test case, that should be used to report all |
| 29 | // audio metrics. |
Mirko Bonadei | f948eb6 | 2019-04-05 13:13:23 | [diff] [blame] | 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, |
Andrey Logvin | 20f4582 | 2020-07-01 08:32:15 | [diff] [blame] | 34 | TrackIdStreamInfoMap* analyzer_helper) = 0; |
Mirko Bonadei | f948eb6 | 2019-04-05 13:13:23 | [diff] [blame] | 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; |
Artem Titov | ebd9770 | 2019-01-09 16:55:36 | [diff] [blame] | 39 | }; |
Artem Titov | b6c6201 | 2019-01-08 13:58:23 | [diff] [blame] | 40 | |
Artem Titov | 0b44314 | 2019-03-20 10:11:08 | [diff] [blame] | 41 | } // namespace webrtc_pc_e2e |
Artem Titov | b6c6201 | 2019-01-08 13:58:23 | [diff] [blame] | 42 | } // namespace webrtc |
| 43 | |
Artem Titov | d57628f | 2019-03-22 11:34:25 | [diff] [blame] | 44 | #endif // API_TEST_AUDIO_QUALITY_ANALYZER_INTERFACE_H_ |