blob: 6d91ad5e3b99e446da85c6c751b36bf51510ed9a [file] [log] [blame]
Steve Anton296a0ce2018-03-22 15:17:27 -07001/*
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
11#include "modules/rtp_rtcp/source/mid_oracle.h"
12
13namespace webrtc {
14
15MidOracle::MidOracle(const std::string& mid) : mid_(mid) {}
16
17MidOracle::~MidOracle() = default;
18
19void MidOracle::OnReceivedRtcpReportBlocks(
20 const ReportBlockList& report_blocks) {
21 if (!send_mid_) {
22 return;
23 }
24 for (const RTCPReportBlock& report_block : report_blocks) {
25 if (report_block.source_ssrc == ssrc_) {
26 send_mid_ = false;
27 break;
28 }
29 }
30}
31
32} // namespace webrtc