martinduke | 4c8897f | 2024-06-28 07:50:04 -0700 | [diff] [blame] | 1 | // Copyright 2024 The Chromium Authors. All rights reserved. |
| 2 | // Use of this source code is governed by a BSD-style license that can be |
| 3 | // found in the LICENSE file |
| 4 | |
| 5 | #include "quiche/quic/moqt/moqt_track.h" |
| 6 | |
| 7 | #include <cstdint> |
| 8 | |
| 9 | #include "quiche/quic/moqt/moqt_messages.h" |
| 10 | |
| 11 | namespace moqt { |
| 12 | |
martinduke | 4c8897f | 2024-06-28 07:50:04 -0700 | [diff] [blame] | 13 | bool RemoteTrack::CheckForwardingPreference( |
| 14 | MoqtForwardingPreference preference) { |
| 15 | if (forwarding_preference_.has_value()) { |
| 16 | return forwarding_preference_.value() == preference; |
| 17 | } |
| 18 | forwarding_preference_ = preference; |
| 19 | return true; |
| 20 | } |
| 21 | |
| 22 | } // namespace moqt |