1 // Copyright (c) 2013 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.
5 #include "ppapi/cpp/private/video_frame_private.h"
9 VideoFrame_Private::VideoFrame_Private()
11 video_frame_
.image_data
= image_data_
.pp_resource();
14 VideoFrame_Private::VideoFrame_Private(const ImageData
& image_data
,
15 PP_TimeTicks timestamp
)
16 : image_data_(image_data
), video_frame_() {
17 video_frame_
.timestamp
= timestamp
;
18 video_frame_
.image_data
= image_data_
.pp_resource();
21 VideoFrame_Private::VideoFrame_Private(
23 const PP_VideoFrame_Private
& pp_video_frame
)
24 : video_frame_(pp_video_frame
) {
25 // Take over the image_data resource in the frame.
26 image_data_
= ImageData(PASS_REF
, video_frame_
.image_data
);
29 VideoFrame_Private::VideoFrame_Private(const VideoFrame_Private
& other
)
31 set_image_data(other
.image_data());
32 set_timestamp(other
.timestamp());
35 VideoFrame_Private::~VideoFrame_Private() {
38 VideoFrame_Private
& VideoFrame_Private::operator=(
39 const VideoFrame_Private
& other
) {
43 set_image_data(other
.image_data());
44 set_timestamp(other
.timestamp());