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_.image_data = image_data_.pp_resource(); | |
| 13 set_timestamp(0); | |
| 14 } | |
| 15 | |
| 16 VideoFrame::VideoFrame( | |
| 17 PassRef, | |
| 18 const PP_VideoFrame& pp_video_frame) { | |
|
dmichael (off chromium)
2013/04/04 20:18:41
I think you probably need to default-initialize pp
bbudge
2013/04/04 21:15:16
Done.
| |
| 19 video_frame_ = pp_video_frame; | |
| 20 image_data_ = ImageData(PASS_REF, pp_video_frame.image_data); | |
| 21 } | |
| 22 | |
| 23 VideoFrame::VideoFrame(const VideoFrame& other) { | |
| 24 set_image_data(other.image_data()); | |
| 25 set_timestamp(other.timestamp()); | |
| 26 } | |
| 27 | |
| 28 VideoFrame::~VideoFrame() { | |
| 29 } | |
| 30 | |
| 31 VideoFrame& VideoFrame::operator=(const VideoFrame& other) { | |
| 32 if (this == &other) | |
| 33 return *this; | |
| 34 | |
| 35 set_image_data(other.image_data()); | |
| 36 set_timestamp(other.timestamp()); | |
| 37 | |
| 38 return *this; | |
| 39 } | |
| 40 | |
| 41 } // namespace pp | |
| OLD | NEW |