blob: 88392d7fd25a6fa679907f2944d669ae980d46a2 [file] [log] [blame]
Artem Titovb6c62012019-01-08 14:58:23 +01001/*
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 12:34:25 +010011#ifndef API_TEST_AUDIO_QUALITY_ANALYZER_INTERFACE_H_
12#define API_TEST_AUDIO_QUALITY_ANALYZER_INTERFACE_H_
Artem Titovb6c62012019-01-08 14:58:23 +010013
Artem Titovd57628f2019-03-22 12:34:25 +010014#include <string>
15
16#include "api/test/stats_observer_interface.h"
Mirko Bonadeif948eb62019-04-05 15:13:23 +020017#include "api/test/track_id_stream_label_map.h"
Artem Titovb6c62012019-01-08 14:58:23 +010018
Mirko Bonadei12ae4f42019-02-26 15:19:07 +010019namespace webrtc {
Artem Titov0b443142019-03-20 11:11:08 +010020namespace webrtc_pc_e2e {
Mirko Bonadei12ae4f42019-02-26 15:19:07 +010021
Artem Titovd57628f2019-03-22 12:34:25 +010022// API is in development. Can be changed/removed without notice.
Mirko Bonadei12ae4f42019-02-26 15:19:07 +010023class AudioQualityAnalyzerInterface : public StatsObserverInterface {
Artem Titovebd97702019-01-09 17:55:36 +010024 public:
Mirko Bonadei12ae4f42019-02-26 15:19:07 +010025 ~AudioQualityAnalyzerInterface() override = default;
Artem Titov59835852019-02-27 17:44:13 +010026
Mirko Bonadeif948eb62019-04-05 15:13:23 +020027 // Will be called by the framework before the test.
Artem Titov59835852019-02-27 17:44:13 +010028 // |test_case_name| is name of test case, that should be used to report all
29 // audio metrics.
Mirko Bonadeif948eb62019-04-05 15:13:23 +020030 // |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 TrackIdStreamLabelMap* 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;
Artem Titovebd97702019-01-09 17:55:36 +010039};
Artem Titovb6c62012019-01-08 14:58:23 +010040
Artem Titov0b443142019-03-20 11:11:08 +010041} // namespace webrtc_pc_e2e
Artem Titovb6c62012019-01-08 14:58:23 +010042} // namespace webrtc
43
Artem Titovd57628f2019-03-22 12:34:25 +010044#endif // API_TEST_AUDIO_QUALITY_ANALYZER_INTERFACE_H_