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

Unified Diff: ppapi/cpp/video_writer.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/video_writer.h ('k') | ppapi/native_client/src/untrusted/pnacl_irt_shim/pnacl_shim.c » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ppapi/cpp/video_writer.cc
diff --git a/ppapi/cpp/video_writer.cc b/ppapi/cpp/video_writer.cc
deleted file mode 100644
index 372bfad3121ce8615559a285993273ebb07cfcd4..0000000000000000000000000000000000000000
--- a/ppapi/cpp/video_writer.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/video_writer.h"
-
-#include "ppapi/c/pp_errors.h"
-#include "ppapi/c/ppb_video_writer.h"
-#include "ppapi/cpp/instance_handle.h"
-#include "ppapi/cpp/module.h"
-#include "ppapi/cpp/module_impl.h"
-#include "ppapi/cpp/var.h"
-#include "ppapi/cpp/video_frame.h"
-
-namespace pp {
-
-namespace {
-
-template <> const char* interface_name<PPB_VideoWriter_0_1>() {
- return PPB_VIDEOWRITER_INTERFACE_0_1;
-}
-
-} // namespace
-
-// VideoWriter -----------------------------------------------------------------
-
-VideoWriter::VideoWriter() {
-}
-
-VideoWriter::VideoWriter(const InstanceHandle& instance) {
- if (!has_interface<PPB_VideoWriter_0_1>())
- return;
- PassRefFromConstructor(get_interface<PPB_VideoWriter_0_1>()->Create(
- instance.pp_instance()));
-}
-
-VideoWriter::VideoWriter(const VideoWriter& other)
- : Resource(other) {
-}
-
-VideoWriter::VideoWriter(PassRef, PP_Resource resource)
- : Resource(PASS_REF, resource) {
-}
-
-int32_t VideoWriter::Open(const CompletionCallbackWithOutput<Var>& cc) {
- if (has_interface<PPB_VideoWriter_0_1>()) {
- int32_t result =
- get_interface<PPB_VideoWriter_0_1>()->Open(
- pp_resource(),
- cc.output(), cc.pp_completion_callback());
- return result;
- }
- return cc.MayForce(PP_ERROR_NOINTERFACE);
-}
-
-int32_t VideoWriter::PutFrame(const VideoFrame& frame) {
- if (has_interface<PPB_VideoWriter_0_1>()) {
- return get_interface<PPB_VideoWriter_0_1>()->PutFrame(
- pp_resource(),
- &frame.pp_video_frame());
- }
- return PP_ERROR_NOINTERFACE;
-}
-
-void VideoWriter::Close() {
- if (has_interface<PPB_VideoWriter_0_1>()) {
- get_interface<PPB_VideoWriter_0_1>()->Close(pp_resource());
- }
-}
-
-} // namespace pp
« no previous file with comments | « ppapi/cpp/video_writer.h ('k') | ppapi/native_client/src/untrusted/pnacl_irt_shim/pnacl_shim.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698