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

Unified Diff: ppapi/cpp/video_frame.h

Issue 14192054: Rename PPAPI Video Stream APIs. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Straighten out naming confusion, improve 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ppapi/cpp/private/video_source_private.cc ('k') | ppapi/cpp/video_frame.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ppapi/cpp/video_frame.h
diff --git a/ppapi/cpp/video_frame.h b/ppapi/cpp/video_frame.h
deleted file mode 100644
index cb695962dd7aa0abc2a94919292a3a41a94625d1..0000000000000000000000000000000000000000
--- a/ppapi/cpp/video_frame.h
+++ /dev/null
@@ -1,93 +0,0 @@
-// 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.
-
-#ifndef PPAPI_CPP_VIDEO_FRAME_H_
-#define PPAPI_CPP_VIDEO_FRAME_H_
-
-#include "ppapi/c/pp_time.h"
-#include "ppapi/c/pp_video_frame.h"
-#include "ppapi/cpp/completion_callback.h"
-#include "ppapi/cpp/image_data.h"
-#include "ppapi/cpp/pass_ref.h"
-
-/// @file
-/// This file defines the video frame struct used by video readers and writers.
-
-namespace pp {
-
-// VideoFrame ------------------------------------------------------------------
-
-/// The <code>VideoFrame</code> class represents a frame of video in a stream.
-class VideoFrame {
- public:
- /// Default constructor for creating a <code>VideoFrame</code> object.
- VideoFrame();
-
- /// Constructor that takes an existing <code>PP_VideoFrame</code> structure.
- /// The 'image_data' PP_Resource field in the structure will be managed by
- /// this instance.
- VideoFrame(PassRef, const PP_VideoFrame& pp_video_frame);
-
- /// Constructor that takes an existing <code>ImageData</code> instance and
- /// a timestamp.
- VideoFrame(const ImageData& image_data, PP_TimeTicks timestamp);
-
- /// The copy constructor for <code>VideoFrame</code>.
- ///
- /// @param[in] other A reference to a <code>VideoFrame</code>.
- VideoFrame(const VideoFrame& other);
-
- ~VideoFrame();
-
- VideoFrame& operator=(const VideoFrame& other);
-
- const PP_VideoFrame& pp_video_frame() const {
- return video_frame_;
- }
-
- ImageData image_data() const {
- return image_data_;
- }
- void set_image_data(const ImageData& image_data) {
- image_data_ = image_data;
- // The assignment above manages the underlying PP_Resources. Copy the new
- // one into our internal video frame struct.
- video_frame_.image_data = image_data_.pp_resource();
- }
-
- PP_TimeTicks timestamp() const { return video_frame_.timestamp; }
- void set_timestamp(PP_TimeTicks timestamp) {
- video_frame_.timestamp = timestamp;
- }
-
- private:
- ImageData image_data_; // This manages the PP_Resource in video_frame_.
- PP_VideoFrame video_frame_;
-};
-
-namespace internal {
-
-// A specialization of CallbackOutputTraits to provide the callback system the
-// information on how to handle pp::VideoFrame. This converts PP_VideoFrame to
-// pp::VideoFrame when passing to the plugin, and specifically manages the
-// PP_Resource embedded in the video_frame_ field.
-template<>
-struct CallbackOutputTraits<pp::VideoFrame> {
- typedef PP_VideoFrame* APIArgType;
- typedef PP_VideoFrame StorageType;
-
- static inline APIArgType StorageToAPIArg(StorageType& t) {
- return &t;
- }
-
- static inline pp::VideoFrame StorageToPluginArg(StorageType& t) {
- return pp::VideoFrame(PASS_REF, t);
- }
-};
-
-} // namespace internal
-
-} // namespace pp
-
-#endif // PPAPI_CPP_VIDEO_FRAME_H_
« no previous file with comments | « ppapi/cpp/private/video_source_private.cc ('k') | ppapi/cpp/video_frame.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698