Chromium Code Reviews| Index: ppapi/cpp/video_frame.cc |
| diff --git a/ppapi/cpp/video_frame.cc b/ppapi/cpp/video_frame.cc |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..d79d94275540c5645019d20e68a2ef9144cf970e |
| --- /dev/null |
| +++ b/ppapi/cpp/video_frame.cc |
| @@ -0,0 +1,41 @@ |
| +// Copyright (c) 2013 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 "ppapi/cpp/video_frame.h" |
| + |
| +namespace pp { |
| + |
| +// VideoFrame ------------------------------------------------------------------ |
| + |
| +VideoFrame::VideoFrame() { |
| + video_frame_.image_data = image_data_.pp_resource(); |
| + set_timestamp(0); |
| +} |
| + |
| +VideoFrame::VideoFrame( |
| + PassRef, |
| + 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.
|
| + video_frame_ = pp_video_frame; |
| + image_data_ = ImageData(PASS_REF, pp_video_frame.image_data); |
| +} |
| + |
| +VideoFrame::VideoFrame(const VideoFrame& other) { |
| + set_image_data(other.image_data()); |
| + set_timestamp(other.timestamp()); |
| +} |
| + |
| +VideoFrame::~VideoFrame() { |
| +} |
| + |
| +VideoFrame& VideoFrame::operator=(const VideoFrame& other) { |
| + if (this == &other) |
| + return *this; |
| + |
| + set_image_data(other.image_data()); |
| + set_timestamp(other.timestamp()); |
| + |
| + return *this; |
| +} |
| + |
| +} // namespace pp |