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

Side by Side Diff: webkit/glue/plugins/pepper_video_decoder.h

Issue 3087009: add pepper video decoder glue and delegate (Closed) Base URL: http://src.chromium.org/git/chromium.git
Patch Set: reload Created 10 years, 4 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
« no previous file with comments | « webkit/glue/plugins/pepper_resource.h ('k') | webkit/glue/plugins/pepper_video_decoder.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright (c) 2010 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 WEBKIT_GLUE_PLUGINS_PEPPER_VIDEO_DECODER_H_
6 #define WEBKIT_GLUE_PLUGINS_PEPPER_VIDEO_DECODER_H_
7
8 #include <queue>
9
10 #include "base/scoped_ptr.h"
11 #include "third_party/ppapi/c/pp_video.h"
12 #include "third_party/ppapi/c/ppb_video_decoder.h"
13 #include "webkit/glue/plugins/pepper_plugin_delegate.h"
14 #include "webkit/glue/plugins/pepper_resource.h"
15
16 namespace pepper {
17
18 class PluginInstance;
19
20 class VideoDecoder : public Resource {
21 public:
22 VideoDecoder(PluginInstance* instance);
23 virtual ~VideoDecoder();
24
25 // Returns a pointer to the interface implementing PPB_VideoDecoder that is
26 // exposed to the plugin.
27 static const PPB_VideoDecoder* GetInterface();
28
29 // Resource overrides.
30 VideoDecoder* AsVideoDecoder() { return this; }
31
32 PluginInstance* instance() { return instance_.get(); }
33
34 // PPB_VideoDecoder implementation.
35 bool Init(const PP_VideoDecoderConfig& decoder_config);
36 bool Decode(PP_VideoCompressedDataBuffer& input_buffer);
37 int32_t Flush(PP_CompletionCallback& callback);
38 bool ReturnUncompressedDataBuffer(PP_VideoUncompressedDataBuffer& buffer);
39
40 private:
41 // This is NULL before initialization, and if this VideoDecoder is
42 // swapped with another.
43 scoped_ptr<PluginDelegate::PlatformVideoDecoder> platform_video_decoder_;
44 scoped_refptr<PluginInstance> instance_;
45 };
46
47 } // namespace pepper
48
49 #endif // WEBKIT_GLUE_PLUGINS_PEPPER_VIDEO_DECODER_H_
OLDNEW
« no previous file with comments | « webkit/glue/plugins/pepper_resource.h ('k') | webkit/glue/plugins/pepper_video_decoder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698