Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 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. | |
| 4 | |
| 5 #include "ppapi/cpp/video_frame.h" | |
| 6 | |
| 7 namespace pp { | |
| 8 | |
| 9 // VideoFrame ------------------------------------------------------------------ | |
| 10 | |
| 11 VideoFrame::VideoFrame() | |
| 12 : video_frame_() { | |
| 13 video_frame_.image_data = image_data_.pp_resource(); | |
| 14 } | |
| 15 | |
| 16 VideoFrame::VideoFrame(const ImageData& image_data, PP_TimeTicks timestamp) | |
| 17 : image_data_(image_data), video_frame_() { | |
| 18 video_frame_.timestamp = timestamp; | |
| 19 video_frame_.image_data = image_data_.pp_resource(); | |
| 20 } | |
| 21 | |
| 22 VideoFrame::VideoFrame(PassRef, const PP_VideoFrame& pp_video_frame) | |
| 23 : video_frame_(pp_video_frame) { | |
| 24 // Take over the image_data resource in the frame. | |
| 25 image_data_ = ImageData(PASS_REF, video_frame_.image_data); | |
| 26 } | |
| 27 | |
| 28 VideoFrame::VideoFrame(const VideoFrame& other) { | |
|
dmichael (off chromium)
2013/04/04 21:23:03
Also need:
: video_frame_()
here
bbudge
2013/04/04 21:26:47
Whoops. Done.
On 2013/04/04 21:23:03, dmichael wro
| |
| 29 set_image_data(other.image_data()); | |
| 30 set_timestamp(other.timestamp()); | |
| 31 } | |
| 32 | |
| 33 VideoFrame::~VideoFrame() { | |
| 34 } | |
| 35 | |
| 36 VideoFrame& VideoFrame::operator=(const VideoFrame& other) { | |
| 37 if (this == &other) | |
| 38 return *this; | |
| 39 | |
| 40 set_image_data(other.image_data()); | |
| 41 set_timestamp(other.timestamp()); | |
| 42 | |
| 43 return *this; | |
| 44 } | |
| 45 | |
| 46 } // namespace pp | |
| OLD | NEW |