summaryrefslogtreecommitdiff
path: root/chromium/ppapi/cpp/private
diff options
context:
space:
mode:
Diffstat (limited to 'chromium/ppapi/cpp/private')
-rw-r--r--chromium/ppapi/cpp/private/video_destination_private.cc76
-rw-r--r--chromium/ppapi/cpp/private/video_destination_private.h89
-rw-r--r--chromium/ppapi/cpp/private/video_source_private.cc71
-rw-r--r--chromium/ppapi/cpp/private/video_source_private.h87
4 files changed, 0 insertions, 323 deletions
diff --git a/chromium/ppapi/cpp/private/video_destination_private.cc b/chromium/ppapi/cpp/private/video_destination_private.cc
deleted file mode 100644
index 5233b5f09ee..00000000000
--- a/chromium/ppapi/cpp/private/video_destination_private.cc
+++ /dev/null
@@ -1,76 +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.
-
-#include "ppapi/cpp/private/video_destination_private.h"
-
-#include "ppapi/c/pp_errors.h"
-#include "ppapi/c/private/ppb_video_destination_private.h"
-#include "ppapi/cpp/instance_handle.h"
-#include "ppapi/cpp/module.h"
-#include "ppapi/cpp/module_impl.h"
-#include "ppapi/cpp/private/video_frame_private.h"
-#include "ppapi/cpp/var.h"
-
-namespace pp {
-
-namespace {
-
-template <> const char* interface_name<PPB_VideoDestination_Private_0_1>() {
- return PPB_VIDEODESTINATION_PRIVATE_INTERFACE_0_1;
-}
-
-} // namespace
-
-VideoDestination_Private::VideoDestination_Private() {
-}
-
-VideoDestination_Private::VideoDestination_Private(
- const InstanceHandle& instance) {
- if (!has_interface<PPB_VideoDestination_Private_0_1>())
- return;
- PassRefFromConstructor(
- get_interface<PPB_VideoDestination_Private_0_1>()->Create(
- instance.pp_instance()));
-}
-
-VideoDestination_Private::VideoDestination_Private(
- const VideoDestination_Private& other)
- : Resource(other) {
-}
-
-VideoDestination_Private::VideoDestination_Private(PassRef,
- PP_Resource resource)
- : Resource(PASS_REF, resource) {
-}
-
-int32_t VideoDestination_Private::Open(const Var& stream_url,
- const CompletionCallback& cc) {
- if (has_interface<PPB_VideoDestination_Private_0_1>()) {
- int32_t result =
- get_interface<PPB_VideoDestination_Private_0_1>()->Open(
- pp_resource(),
- stream_url.pp_var(),
- cc.pp_completion_callback());
- return result;
- }
- return cc.MayForce(PP_ERROR_NOINTERFACE);
-}
-
-int32_t VideoDestination_Private::PutFrame(
- const VideoFrame_Private& frame) {
- if (has_interface<PPB_VideoDestination_Private_0_1>()) {
- return get_interface<PPB_VideoDestination_Private_0_1>()->PutFrame(
- pp_resource(),
- &frame.pp_video_frame());
- }
- return PP_ERROR_NOINTERFACE;
-}
-
-void VideoDestination_Private::Close() {
- if (has_interface<PPB_VideoDestination_Private_0_1>()) {
- get_interface<PPB_VideoDestination_Private_0_1>()->Close(pp_resource());
- }
-}
-
-} // namespace pp
diff --git a/chromium/ppapi/cpp/private/video_destination_private.h b/chromium/ppapi/cpp/private/video_destination_private.h
deleted file mode 100644
index 7e2bd5b6179..00000000000
--- a/chromium/ppapi/cpp/private/video_destination_private.h
+++ /dev/null
@@ -1,89 +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_PRIVATE_VIDEO_DESTINATION_PRIVATE_H_
-#define PPAPI_CPP_PRIVATE_VIDEO_DESTINATION_PRIVATE_H_
-
-#include <stdint.h>
-
-#include <string>
-
-#include "ppapi/c/pp_time.h"
-#include "ppapi/cpp/completion_callback.h"
-#include "ppapi/cpp/pass_ref.h"
-#include "ppapi/cpp/resource.h"
-
-/// @file
-/// This file defines the <code>PPB_VideoDestination_Private</code> interface
-/// for a video destination resource, which sends video frames to a MediaStream
-/// video track in the browser.
-
-namespace pp {
-
-class InstanceHandle;
-class VideoFrame_Private;
-
-/// The <code>VideoDestination_Private</code> class contains methods for
-/// creating video destination resources and using them to send video frames to
-/// a MediaStream video track in the browser.
-class VideoDestination_Private : public Resource {
- public:
- /// Default constructor for creating a <code>VideoDestination_Private</code>
- /// object.
- VideoDestination_Private();
-
- /// Constructor for creating a <code>VideoDestination_Private</code> for an
- /// instance.
- explicit VideoDestination_Private(const InstanceHandle& instance);
-
- /// The copy constructor for <code>VideoDestination_Private</code>.
- ///
- /// @param[in] other A reference to a <code>VideoDestination_Private</code>.
- VideoDestination_Private(const VideoDestination_Private& other);
-
- /// A constructor used when you have received a PP_Resource as a return
- /// value that has had its reference count incremented for you.
- ///
- /// @param[in] resource A PP_Resource corresponding to a video destination.
- VideoDestination_Private(PassRef, PP_Resource resource);
-
- /// Opens a video destination for putting frames.
- ///
- /// @param[in] stream_url A <code>Var</code> string holding a URL identifying
- /// a MediaStream.
- /// @param[in] callback A <code>CompletionCallback</code> to be
- /// called upon completion of Open().
- ///
- /// @return An int32_t containing a result code from <code>pp_errors.h</code>.
- /// Returns PP_ERROR_BADRESOURCE if destination isn't a valid video
- /// destination.
- /// Returns PP_ERROR_INPROGRESS if destination is already open.
- /// Returns PP_ERROR_FAILED if the MediaStream doesn't exist or if there is
- /// some other browser error.
- int32_t Open(const Var& stream_url, const CompletionCallback& cc);
-
- /// Puts a frame to the video destination.
- ///
- /// After this call, you should take care to release your references to the
- /// image embedded in the video frame. If you paint to the image after
- /// PutFrame(), there is the possibility of artifacts because the browser may
- /// still be copying the frame to the stream.
- ///
- /// @param[in] frame A <code>VideoFrame_Private</code> holding the video
- /// frame to send to the destination.
- ///
- /// @return An int32_t containing a result code from <code>pp_errors.h</code>.
- /// Returns PP_ERROR_BADRESOURCE if destination isn't a valid video
- /// destination.
- /// Returns PP_ERROR_FAILED if destination is not open, if the video frame has
- /// an invalid image data resource, or if some other browser error occurs.
- int32_t PutFrame(const VideoFrame_Private& frame);
-
- /// Closes the video destination.
- void Close();
-};
-
-} // namespace pp
-
-#endif // PPAPI_CPP_PRIVATE_VIDEO_DESTINATION_PRIVATE_H_
diff --git a/chromium/ppapi/cpp/private/video_source_private.cc b/chromium/ppapi/cpp/private/video_source_private.cc
deleted file mode 100644
index 264c001103c..00000000000
--- a/chromium/ppapi/cpp/private/video_source_private.cc
+++ /dev/null
@@ -1,71 +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.
-
-#include "ppapi/cpp/private/video_source_private.h"
-
-#include "ppapi/c/pp_errors.h"
-#include "ppapi/c/private/ppb_video_source_private.h"
-#include "ppapi/cpp/instance_handle.h"
-#include "ppapi/cpp/module.h"
-#include "ppapi/cpp/module_impl.h"
-#include "ppapi/cpp/private/video_frame_private.h"
-#include "ppapi/cpp/var.h"
-
-namespace pp {
-
-namespace {
-
-template <> const char* interface_name<PPB_VideoSource_Private_0_1>() {
- return PPB_VIDEOSOURCE_PRIVATE_INTERFACE_0_1;
-}
-
-} // namespace
-
-VideoSource_Private::VideoSource_Private() {
-}
-
-VideoSource_Private::VideoSource_Private(const InstanceHandle& instance) {
- if (!has_interface<PPB_VideoSource_Private_0_1>())
- return;
- PassRefFromConstructor(get_interface<PPB_VideoSource_Private_0_1>()->Create(
- instance.pp_instance()));
-}
-
-VideoSource_Private::VideoSource_Private(const VideoSource_Private& other)
- : Resource(other) {
-}
-
-VideoSource_Private::VideoSource_Private(PassRef, PP_Resource resource)
- : Resource(PASS_REF, resource) {
-}
-
-int32_t VideoSource_Private::Open(const Var& stream_url,
- const CompletionCallback& cc) {
- if (has_interface<PPB_VideoSource_Private_0_1>()) {
- int32_t result =
- get_interface<PPB_VideoSource_Private_0_1>()->Open(
- pp_resource(),
- stream_url.pp_var(), cc.pp_completion_callback());
- return result;
- }
- return cc.MayForce(PP_ERROR_NOINTERFACE);
-}
-
-int32_t VideoSource_Private::GetFrame(
- const CompletionCallbackWithOutput<VideoFrame_Private>& cc) {
- if (has_interface<PPB_VideoSource_Private_0_1>()) {
- return get_interface<PPB_VideoSource_Private_0_1>()->GetFrame(
- pp_resource(),
- cc.output(), cc.pp_completion_callback());
- }
- return cc.MayForce(PP_ERROR_NOINTERFACE);
-}
-
-void VideoSource_Private::Close() {
- if (has_interface<PPB_VideoSource_Private_0_1>()) {
- get_interface<PPB_VideoSource_Private_0_1>()->Close(pp_resource());
- }
-}
-
-} // namespace pp
diff --git a/chromium/ppapi/cpp/private/video_source_private.h b/chromium/ppapi/cpp/private/video_source_private.h
deleted file mode 100644
index b62e0305e11..00000000000
--- a/chromium/ppapi/cpp/private/video_source_private.h
+++ /dev/null
@@ -1,87 +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_PRIVATE_VIDEO_SOURCE_PRIVATE_H_
-#define PPAPI_CPP_PRIVATE_VIDEO_SOURCE_PRIVATE_H_
-
-#include <stdint.h>
-
-#include <string>
-
-#include "ppapi/c/pp_time.h"
-#include "ppapi/cpp/completion_callback.h"
-#include "ppapi/cpp/pass_ref.h"
-#include "ppapi/cpp/resource.h"
-
-/// @file
-/// This file defines the <code>PPB_VideoSource_Private</code> interface for a
-/// video source resource, which receives video frames from a MediaStream video
-/// track in the browser.
-
-namespace pp {
-
-class InstanceHandle;
-class VideoFrame_Private;
-
-/// The <code>VideoSource_Private</code> class contains methods for creating
-/// video source resources and using them to receive video frames from a
-/// MediaStream video track in the browser.
-class VideoSource_Private : public Resource {
- public:
- /// Default constructor for creating a <code>VideoSource_Private</code>
- /// object.
- VideoSource_Private();
-
- /// Constructor for creating a <code>VideoSource_Private</code> for an
- /// instance.
- explicit VideoSource_Private(const InstanceHandle& instance);
-
- /// The copy constructor for <code>VideoSource_Private</code>.
- ///
- /// @param[in] other A reference to a <code>VideoSource_Private</code>.
- VideoSource_Private(const VideoSource_Private& other);
-
- /// A constructor used when you have received a PP_Resource as a return
- /// value that has had its reference count incremented for you.
- ///
- /// @param[in] resource A PP_Resource corresponding to a video source.
- VideoSource_Private(PassRef, PP_Resource resource);
-
- /// Opens a video source for getting frames.
- ///
- /// @param[in] stream_url A <code>Var</code> string holding a URL identifying
- /// a MediaStream.
- /// @param[in] callback A <code>CompletionCallback</code> to be called upon
- /// completion of Open().
- ///
- /// @return An int32_t containing a result code from <code>pp_errors.h</code>.
- /// Returns PP_ERROR_BADRESOURCE if source isn't a valid video source.
- /// Returns PP_ERROR_INPROGRESS if source is already open.
- /// Returns PP_ERROR_FAILED if the MediaStream doesn't exist or if there is
- /// some other browser error.
- int32_t Open(const Var& stream_url,
- const CompletionCallback& cc);
-
- /// Gets a frame from the video source. The returned frame is only valid
- /// until the next call to GetFrame.
- ///
- /// @param[out] frame A <code>VideoFrame_Private</code> to hold a video
- /// frame from the source.
- /// @param[in] callback A <code>CompletionCallbackWithOutput</code> to be
- /// called upon completion of ReceiveFrame().
- ///
- /// @return An int32_t containing a result code from <code>pp_errors.h</code>.
- /// Returns PP_ERROR_BADRESOURCE if source isn't a valid video source.
- /// Returns PP_ERROR_FAILED if the source is not open, or if some other
- /// browser error occurs.
- int32_t GetFrame(
- const CompletionCallbackWithOutput<VideoFrame_Private>& cc);
-
- /// Closes the video source.
- void Close();
-};
-
-} // namespace pp
-
-#endif // PPAPI_CPP_PRIVATE_VIDEO_SOURCE_PRIVATE_H_