Files
Michael Froman d929a9cbee Bug 1980479 - Vendor libwebrtc from 7b17217e59
Upstream commit: https://webrtc.googlesource.com/src/+/7b17217e592aa4cc548007c1044a121938f9635f
    Move priority implementation to cc file

    follow-up from
      https://webrtc-review.googlesource.com/c/src/+/382120
    where IWYU failed on that header-only target.

    BUG=webrtc:42226242

    Change-Id: I8555e62e5324db8f3f0554879f61fdffdc053419
    Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/386061
    Commit-Queue: Philipp Hancke <phancke@meta.com>
    Reviewed-by: Harald Alvestrand <hta@webrtc.org>
    Reviewed-by: Evan Shrubsole <eshr@webrtc.org>
    Cr-Commit-Position: refs/heads/main@{#44515}
2025-08-21 15:03:43 +00:00

37 lines
873 B
C++

/*
* Copyright 2025 The WebRTC project authors. All Rights Reserved.
*
* Use of this source code is governed by a BSD-style license
* that can be found in the LICENSE file in the root of the source
* tree. An additional intellectual property rights grant can be found
* in the file PATENTS. All contributing project authors may
* be found in the AUTHORS file in the root of the source tree.
*/
#include "api/priority.h"
#include "rtc_base/checks.h"
namespace webrtc {
PriorityValue::PriorityValue(Priority priority) {
switch (priority) {
case Priority::kVeryLow:
value_ = 128;
break;
case Priority::kLow:
value_ = 256;
break;
case Priority::kMedium:
value_ = 512;
break;
case Priority::kHigh:
value_ = 1024;
break;
default:
RTC_CHECK_NOTREACHED();
}
}
} // namespace webrtc