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 "common_video/generic_frame_descriptor/generic_frame_info.h"
11 
12 #include <utility>
13 
14 #include "rtc_base/checks.h"
15 
16 namespace webrtc {
17 
18 GenericFrameInfo::GenericFrameInfo() = default;
19 GenericFrameInfo::GenericFrameInfo(const GenericFrameInfo&) = default;
20 GenericFrameInfo::~GenericFrameInfo() = default;
21 
22 GenericFrameInfo::Builder::Builder() = default;
23 GenericFrameInfo::Builder::~Builder() = default;
24 
Build() const25 GenericFrameInfo GenericFrameInfo::Builder::Build() const {
26   return info_;
27 }
28 
T(int temporal_id)29 GenericFrameInfo::Builder& GenericFrameInfo::Builder::T(int temporal_id) {
30   info_.temporal_id = temporal_id;
31   return *this;
32 }
33 
S(int spatial_id)34 GenericFrameInfo::Builder& GenericFrameInfo::Builder::S(int spatial_id) {
35   info_.spatial_id = spatial_id;
36   return *this;
37 }
38 
Dtis(absl::string_view indication_symbols)39 GenericFrameInfo::Builder& GenericFrameInfo::Builder::Dtis(
40     absl::string_view indication_symbols) {
41   info_.decode_target_indications =
42       webrtc_impl::StringToDecodeTargetIndications(indication_symbols);
43   return *this;
44 }
45 
46 }  // namespace webrtc
47