You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

37 lines
1.2 KiB

​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
  1. /*
  2. * Copyright (c) 2019 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. #include "test/pc/e2e/analyzer_helper.h"
  11. #include <utility>
  12. namespace webrtc {
  13. namespace webrtc_pc_e2e {
  14. AnalyzerHelper::AnalyzerHelper() {
  15. signaling_sequence_checker_.Detach();
  16. }
  17. void AnalyzerHelper::AddTrackToStreamMapping(std::string track_id,
  18. std::string stream_label) {
  19. RTC_DCHECK_RUN_ON(&signaling_sequence_checker_);
  20. track_to_stream_map_.insert({std::move(track_id), std::move(stream_label)});
  21. }
  22. const std::string& AnalyzerHelper::GetStreamLabelFromTrackId(
  23. const std::string& track_id) const {
  24. RTC_DCHECK_RUN_ON(&signaling_sequence_checker_);
  25. auto track_to_stream_pair = track_to_stream_map_.find(track_id);
  26. RTC_CHECK(track_to_stream_pair != track_to_stream_map_.end());
  27. return track_to_stream_pair->second;
  28. }
  29. } // namespace webrtc_pc_e2e
  30. } // namespace webrtc