audio_quality_analyzer_interface.h 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  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. #ifndef API_TEST_AUDIO_QUALITY_ANALYZER_INTERFACE_H_
  11. #define API_TEST_AUDIO_QUALITY_ANALYZER_INTERFACE_H_
  12. #include <string>
  13. #include "api/test/stats_observer_interface.h"
  14. #include "api/test/track_id_stream_info_map.h"
  15. namespace webrtc {
  16. namespace webrtc_pc_e2e {
  17. // API is in development. Can be changed/removed without notice.
  18. class AudioQualityAnalyzerInterface : public StatsObserverInterface {
  19. public:
  20. ~AudioQualityAnalyzerInterface() override = default;
  21. // Will be called by the framework before the test.
  22. // |test_case_name| is name of test case, that should be used to report all
  23. // audio metrics.
  24. // |analyzer_helper| is a pointer to a class that will allow track_id to
  25. // stream_id matching. The caller is responsible for ensuring the
  26. // AnalyzerHelper outlives the instance of the AudioQualityAnalyzerInterface.
  27. virtual void Start(std::string test_case_name,
  28. TrackIdStreamInfoMap* analyzer_helper) = 0;
  29. // Will be called by the framework at the end of the test. The analyzer
  30. // has to finalize all its stats and it should report them.
  31. virtual void Stop() = 0;
  32. };
  33. } // namespace webrtc_pc_e2e
  34. } // namespace webrtc
  35. #endif // API_TEST_AUDIO_QUALITY_ANALYZER_INTERFACE_H_