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

Side by Side Diff: ppapi/proxy/video_reader_resource.h

Issue 13771020: Add Pepper VideoReader and VideoWriter plumbing (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
(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_READER_RESOURCE_H_
6 #define PPAPI_PROXY_VIDEO_READER_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_reader_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 VideoReaderResource
25 : public PluginResource,
26 public thunk::PPB_VideoReader_API {
27 public:
28 VideoReaderResource(Connection connection,
29 PP_Instance instance);
30 virtual ~VideoReaderResource();
31
32 // Resource overrides.
33 virtual thunk::PPB_VideoReader_API* AsPPB_VideoReader_API() OVERRIDE;
34
35 // PPB_VideoReader_API implementation.
36 virtual int32_t Open(
37 PP_Var stream_id,
38 scoped_refptr<TrackedCallback> callback) OVERRIDE;
39 virtual int32_t GetFrame(
40 PP_VideoFrame* frame,
41 scoped_refptr<TrackedCallback> callback) OVERRIDE;
42 virtual void Close() OVERRIDE;
43
44 private:
45 void OnPluginMsgOpenComplete(
46 scoped_refptr<TrackedCallback> callback,
47 const ResourceMessageReplyParams& params);
48 void OnPluginMsgGetFrameComplete(
49 scoped_refptr<TrackedCallback> callback,
50 PP_VideoFrame* frame,
51 const ResourceMessageReplyParams& params,
52 const HostResource& image_data,
53 double timestamp);
54
55 DISALLOW_COPY_AND_ASSIGN(VideoReaderResource);
56 };
57
58 } // namespace proxy
59 } // namespace ppapi
60
61 #endif // PPAPI_PROXY_VIDEO_READER_RESOURCE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698