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 | |
martinduke | 4c8897f | 2024-06-28 07:50:04 -0700 | [diff] [blame] | 7 | #include "quiche/quic/moqt/moqt_messages.h" |
| 8 | |
| 9 | namespace moqt { |
| 10 | |
martinduke | 5ccc379 | 2024-11-27 11:12:55 -0800 | [diff] [blame] | 11 | bool RemoteTrack::CheckDataStreamType(MoqtDataStreamType type) { |
| 12 | if (data_stream_type_.has_value()) { |
| 13 | return data_stream_type_.value() == type; |
martinduke | 4c8897f | 2024-06-28 07:50:04 -0700 | [diff] [blame] | 14 | } |
martinduke | 5ccc379 | 2024-11-27 11:12:55 -0800 | [diff] [blame] | 15 | data_stream_type_ = type; |
martinduke | 4c8897f | 2024-06-28 07:50:04 -0700 | [diff] [blame] | 16 | return true; |
| 17 | } |
| 18 | |
| 19 | } // namespace moqt |