blob: c1044795d18e3210270c5f5ad7fbd6a0c485c875 [file] [log] [blame]
Artem Titovb6c62012019-01-08 13:58:231/*
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 Titovd57628f2019-03-22 11:34:2511#ifndef API_TEST_AUDIO_QUALITY_ANALYZER_INTERFACE_H_
12#define API_TEST_AUDIO_QUALITY_ANALYZER_INTERFACE_H_
Artem Titovb6c62012019-01-08 13:58:2313
Artem Titovd57628f2019-03-22 11:34:2514#include <string>
15
16#include "api/test/stats_observer_interface.h"
Andrey Logvin20f45822020-07-01 08:32:1517#include "api/test/track_id_stream_info_map.h"
Artem Titovb6c62012019-01-08 13:58:2318
Mirko Bonadei12ae4f42019-02-26 14:19:0719namespace webrtc {
Artem Titov0b443142019-03-20 10:11:0820namespace webrtc_pc_e2e {
Mirko Bonadei12ae4f42019-02-26 14:19:0721
Artem Titovd57628f2019-03-22 11:34:2522// API is in development. Can be changed/removed without notice.
Mirko Bonadei12ae4f42019-02-26 14:19:0723class AudioQualityAnalyzerInterface : public StatsObserverInterface {
Artem Titovebd97702019-01-09 16:55:3624 public:
Mirko Bonadei12ae4f42019-02-26 14:19:0725 ~AudioQualityAnalyzerInterface() override = default;
Artem Titov59835852019-02-27 16:44:1326
Mirko Bonadeif948eb62019-04-05 13:13:2327 // Will be called by the framework before the test.
Artem Titov59835852019-02-27 16:44:1328 // |test_case_name| is name of test case, that should be used to report all
29 // audio metrics.
Mirko Bonadeif948eb62019-04-05 13:13:2330 // |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 Logvin20f45822020-07-01 08:32:1534 TrackIdStreamInfoMap* analyzer_helper) = 0;
Mirko Bonadeif948eb62019-04-05 13:13:2335
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 Titovebd97702019-01-09 16:55:3639};
Artem Titovb6c62012019-01-08 13:58:2340
Artem Titov0b443142019-03-20 10:11:0841} // namespace webrtc_pc_e2e
Artem Titovb6c62012019-01-08 13:58:2342} // namespace webrtc
43
Artem Titovd57628f2019-03-22 11:34:2544#endif // API_TEST_AUDIO_QUALITY_ANALYZER_INTERFACE_H_