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

Unified Diff: ppapi/cpp/private/video_source_private.cc

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.h ('k') | ppapi/cpp/video_frame.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ppapi/cpp/private/video_source_private.cc
diff --git a/ppapi/cpp/video_reader.cc b/ppapi/cpp/private/video_source_private.cc
similarity index 36%
rename from ppapi/cpp/video_reader.cc
rename to ppapi/cpp/private/video_source_private.cc
index 9ae83bbd662539b33d95af66e541959fad7f91f4..264c001103c021d7011c0f211306c657ef607190 100644
--- a/ppapi/cpp/video_reader.cc
+++ b/ppapi/cpp/private/video_source_private.cc
@@ -2,71 +2,69 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "ppapi/cpp/video_reader.h"
+#include "ppapi/cpp/private/video_source_private.h"
#include "ppapi/c/pp_errors.h"
-#include "ppapi/c/ppb_video_reader.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"
-#include "ppapi/cpp/video_frame.h"
namespace pp {
namespace {
-template <> const char* interface_name<PPB_VideoReader_0_1>() {
- return PPB_VIDEOREADER_INTERFACE_0_1;
+template <> const char* interface_name<PPB_VideoSource_Private_0_1>() {
+ return PPB_VIDEOSOURCE_PRIVATE_INTERFACE_0_1;
}
} // namespace
-// VideoReader -----------------------------------------------------------------
-
-VideoReader::VideoReader() {
+VideoSource_Private::VideoSource_Private() {
}
-VideoReader::VideoReader(const InstanceHandle& instance) {
- if (!has_interface<PPB_VideoReader_0_1>())
+VideoSource_Private::VideoSource_Private(const InstanceHandle& instance) {
+ if (!has_interface<PPB_VideoSource_Private_0_1>())
return;
- PassRefFromConstructor(get_interface<PPB_VideoReader_0_1>()->Create(
+ PassRefFromConstructor(get_interface<PPB_VideoSource_Private_0_1>()->Create(
instance.pp_instance()));
}
-VideoReader::VideoReader(const VideoReader& other)
+VideoSource_Private::VideoSource_Private(const VideoSource_Private& other)
: Resource(other) {
}
-VideoReader::VideoReader(PassRef, PP_Resource resource)
+VideoSource_Private::VideoSource_Private(PassRef, PP_Resource resource)
: Resource(PASS_REF, resource) {
}
-int32_t VideoReader::Open(const Var& stream_id,
- const CompletionCallback& cc) {
- if (has_interface<PPB_VideoReader_0_1>()) {
+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_VideoReader_0_1>()->Open(
+ get_interface<PPB_VideoSource_Private_0_1>()->Open(
pp_resource(),
- stream_id.pp_var(), cc.pp_completion_callback());
+ stream_url.pp_var(), cc.pp_completion_callback());
return result;
}
return cc.MayForce(PP_ERROR_NOINTERFACE);
}
-int32_t VideoReader::GetFrame(
- const CompletionCallbackWithOutput<VideoFrame>& cc) {
- if (has_interface<PPB_VideoReader_0_1>()) {
- return get_interface<PPB_VideoReader_0_1>()->GetFrame(
+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 VideoReader::Close() {
- if (has_interface<PPB_VideoReader_0_1>()) {
- get_interface<PPB_VideoReader_0_1>()->Close(pp_resource());
+void VideoSource_Private::Close() {
+ if (has_interface<PPB_VideoSource_Private_0_1>()) {
+ get_interface<PPB_VideoSource_Private_0_1>()->Close(pp_resource());
}
}
« no previous file with comments | « ppapi/cpp/private/video_source_private.h ('k') | ppapi/cpp/video_frame.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698