OLD | NEW |
(Empty) | |
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef PPAPI_PROXY_VIDEO_WRITER_RESOURCE_H_ |
| 6 #define PPAPI_PROXY_VIDEO_WRITER_RESOURCE_H_ |
| 7 |
| 8 #include <string> |
| 9 |
| 10 #include "ppapi/proxy/connection.h" |
| 11 #include "ppapi/proxy/plugin_resource.h" |
| 12 #include "ppapi/proxy/ppapi_proxy_export.h" |
| 13 #include "ppapi/shared_impl/var.h" |
| 14 #include "ppapi/thunk/ppb_video_writer_api.h" |
| 15 |
| 16 struct PP_VideoFrame; |
| 17 |
| 18 namespace ppapi { |
| 19 |
| 20 class TrackedCallback; |
| 21 |
| 22 namespace proxy { |
| 23 |
| 24 class PPAPI_PROXY_EXPORT VideoWriterResource |
| 25 : public PluginResource, |
| 26 public thunk::PPB_VideoWriter_API { |
| 27 public: |
| 28 VideoWriterResource(Connection connection, |
| 29 PP_Instance instance); |
| 30 virtual ~VideoWriterResource(); |
| 31 |
| 32 // Resource overrides. |
| 33 virtual thunk::PPB_VideoWriter_API* AsPPB_VideoWriter_API() OVERRIDE; |
| 34 |
| 35 // PPB_VideoWriter_API implementation. |
| 36 virtual int32_t Open( |
| 37 PP_Var* stream_id, |
| 38 scoped_refptr<TrackedCallback> callback) OVERRIDE; |
| 39 virtual int32_t PutFrame(const PP_VideoFrame& frame) OVERRIDE; |
| 40 virtual void Close() OVERRIDE; |
| 41 |
| 42 private: |
| 43 void OnPluginMsgOpenComplete( |
| 44 PP_Var* pp_stream_id, |
| 45 scoped_refptr<TrackedCallback> callback, |
| 46 const ResourceMessageReplyParams& params, |
| 47 const std::string& stream_id); |
| 48 |
| 49 DISALLOW_COPY_AND_ASSIGN(VideoWriterResource); |
| 50 }; |
| 51 |
| 52 } // namespace proxy |
| 53 } // namespace ppapi |
| 54 |
| 55 #endif // PPAPI_PROXY_VIDEO_WRITER_RESOURCE_H_ |
OLD | NEW |