1 /*
2  *  Copyright (c) 2020 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 
11 #include "api/video/video_frame_metadata.h"
12 
13 #include "modules/rtp_rtcp/source/rtp_video_header.h"
14 
15 namespace webrtc {
16 
VideoFrameMetadata(const RTPVideoHeader & header)17 VideoFrameMetadata::VideoFrameMetadata(const RTPVideoHeader& header)
18     : width_(header.width), height_(header.height) {
19   if (header.generic) {
20     frame_id_ = header.generic->frame_id;
21     spatial_index_ = header.generic->spatial_index;
22     temporal_index_ = header.generic->temporal_index;
23     frame_dependencies_ = header.generic->dependencies;
24     decode_target_indications_ = header.generic->decode_target_indications;
25   }
26 }
27 
28 }  // namespace webrtc
29