blob: c3bb43e282416970aa997c3141fd05eed6dd1f75 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
// Copyright 2018 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "third_party/blink/renderer/modules/webgl/webgl_video_frame_metadata.h"
namespace blink {
WebGLVideoFrameMetadata* WebGLVideoFrameMetadata::Create(
WebMediaPlayer::VideoFrameUploadMetadata* frame_metadata_ptr) {
return MakeGarbageCollected<WebGLVideoFrameMetadata>(frame_metadata_ptr);
}
WebGLVideoFrameMetadata::WebGLVideoFrameMetadata(
WebMediaPlayer::VideoFrameUploadMetadata* frame_metadata_ptr) {
presentation_time_ = frame_metadata_ptr->timestamp.InMicrosecondsF();
expected_presentation_time_ =
frame_metadata_ptr->expected_timestamp.InMicrosecondsF();
width_ = frame_metadata_ptr->visible_rect.width();
height_ = frame_metadata_ptr->visible_rect.height();
}
} // namespace blink
|