Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(23)

Side by Side Diff: ppapi/cpp/video_frame.cc

Issue 13461010: Add PP_VideoFrame, PPB_VideoReader, and PPB_VideoWriter APIs to Pepper. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Revise API after design review, address review comments. Created 7 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
(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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698