2 * Copyright (c) 2020 The WebRTC project authors. All Rights Reserved.
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.
11 #include "modules/video_coding/rtp_frame_id_only_ref_finder.h"
15 #include "rtc_base/logging.h"
19 RtpFrameReferenceFinder::ReturnVector
RtpFrameIdOnlyRefFinder::ManageFrame(
20 std::unique_ptr
<RtpFrameObject
> frame
,
22 frame
->SetSpatialIndex(0);
23 frame
->SetId(unwrapper_
.Unwrap(frame_id
& (kFrameIdLength
- 1)));
24 frame
->num_references
=
25 frame
->frame_type() == VideoFrameType::kVideoFrameKey
? 0 : 1;
26 frame
->references
[0] = frame
->Id() - 1;
28 RtpFrameReferenceFinder::ReturnVector res
;
29 res
.push_back(std::move(frame
));