Index: ppapi/proxy/video_writer_resource.h |
diff --git a/ppapi/proxy/video_writer_resource.h b/ppapi/proxy/video_writer_resource.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..61740fca6f6dcd928d38d48d3e5aef7dbcb81f26 |
--- /dev/null |
+++ b/ppapi/proxy/video_writer_resource.h |
@@ -0,0 +1,55 @@ |
+// 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_PROXY_VIDEO_WRITER_RESOURCE_H_ |
+#define PPAPI_PROXY_VIDEO_WRITER_RESOURCE_H_ |
+ |
+#include <string> |
+ |
+#include "ppapi/proxy/connection.h" |
+#include "ppapi/proxy/plugin_resource.h" |
+#include "ppapi/proxy/ppapi_proxy_export.h" |
+#include "ppapi/shared_impl/var.h" |
+#include "ppapi/thunk/ppb_video_writer_api.h" |
+ |
+struct PP_VideoFrame; |
+ |
+namespace ppapi { |
+ |
+class TrackedCallback; |
+ |
+namespace proxy { |
+ |
+class PPAPI_PROXY_EXPORT VideoWriterResource |
+ : public PluginResource, |
+ public thunk::PPB_VideoWriter_API { |
+ public: |
+ VideoWriterResource(Connection connection, |
+ PP_Instance instance); |
+ virtual ~VideoWriterResource(); |
+ |
+ // Resource overrides. |
+ virtual thunk::PPB_VideoWriter_API* AsPPB_VideoWriter_API() OVERRIDE; |
+ |
+ // PPB_VideoWriter_API implementation. |
+ virtual int32_t Open( |
+ PP_Var* stream_id, |
+ scoped_refptr<TrackedCallback> callback) OVERRIDE; |
+ virtual int32_t PutFrame(const PP_VideoFrame& frame) OVERRIDE; |
+ virtual void Close() OVERRIDE; |
+ |
+ private: |
+ void OnPluginMsgOpenComplete( |
+ PP_Var* pp_stream_id, |
+ scoped_refptr<TrackedCallback> callback, |
+ const ResourceMessageReplyParams& params, |
+ const std::string& stream_id); |
+ |
+ DISALLOW_COPY_AND_ASSIGN(VideoWriterResource); |
+}; |
+ |
+} // namespace proxy |
+} // namespace ppapi |
+ |
+#endif // PPAPI_PROXY_VIDEO_WRITER_RESOURCE_H_ |