Delete unused downloads page asset.
[chromium-blink-merge.git] / ppapi / cpp / private / video_frame_private.cc
blob9976647d5b3abac4c563234ebeaaf17f2775348d
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"
7 namespace pp {
9 VideoFrame_Private::VideoFrame_Private()
10 : video_frame_() {
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(
22 PassRef,
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)
30 : video_frame_() {
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) {
40 if (this == &other)
41 return *this;
43 set_image_data(other.image_data());
44 set_timestamp(other.timestamp());
46 return *this;
49 } // namespace pp