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

Side by Side Diff: webkit/plugins/ppapi/ppb_video_decoder_impl.h

Issue 7779001: Replace the use of an int32* with a proper struct for decoder configuration. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebased Created 9 years, 3 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
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef WEBKIT_PLUGINS_PPAPI_PPB_VIDEO_DECODER_IMPL_H_ 5 #ifndef WEBKIT_PLUGINS_PPAPI_PPB_VIDEO_DECODER_IMPL_H_
6 #define WEBKIT_PLUGINS_PPAPI_PPB_VIDEO_DECODER_IMPL_H_ 6 #define WEBKIT_PLUGINS_PPAPI_PPB_VIDEO_DECODER_IMPL_H_
7 7
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 42
43 class PPB_VideoDecoder_Impl : public ::ppapi::Resource, 43 class PPB_VideoDecoder_Impl : public ::ppapi::Resource,
44 public ::ppapi::VideoDecoderImpl, 44 public ::ppapi::VideoDecoderImpl,
45 public media::VideoDecodeAccelerator::Client { 45 public media::VideoDecodeAccelerator::Client {
46 public: 46 public:
47 virtual ~PPB_VideoDecoder_Impl(); 47 virtual ~PPB_VideoDecoder_Impl();
48 // See PPB_VideoDecoder_Dev::Create. Returns 0 on failure to create & 48 // See PPB_VideoDecoder_Dev::Create. Returns 0 on failure to create &
49 // initialize. 49 // initialize.
50 static PP_Resource Create(PP_Instance instance, 50 static PP_Resource Create(PP_Instance instance,
51 PP_Resource graphics_context, 51 PP_Resource graphics_context,
52 const PP_VideoConfigElement* config); 52 const PP_VideoDecoderConfig_Dev& config);
53 53
54 // Resource overrides. 54 // Resource overrides.
55 virtual PPB_VideoDecoder_API* AsPPB_VideoDecoder_API() OVERRIDE; 55 virtual PPB_VideoDecoder_API* AsPPB_VideoDecoder_API() OVERRIDE;
56 56
57 // PPB_VideoDecoder_API implementation. 57 // PPB_VideoDecoder_API implementation.
58 virtual int32_t Decode(const PP_VideoBitstreamBuffer_Dev* bitstream_buffer, 58 virtual int32_t Decode(const PP_VideoBitstreamBuffer_Dev* bitstream_buffer,
59 PP_CompletionCallback callback) OVERRIDE; 59 PP_CompletionCallback callback) OVERRIDE;
60 virtual void AssignPictureBuffers( 60 virtual void AssignPictureBuffers(
61 uint32_t no_of_buffers, const PP_PictureBuffer_Dev* buffers) OVERRIDE; 61 uint32_t no_of_buffers, const PP_PictureBuffer_Dev* buffers) OVERRIDE;
62 virtual void ReusePictureBuffer(int32_t picture_buffer_id) OVERRIDE; 62 virtual void ReusePictureBuffer(int32_t picture_buffer_id) OVERRIDE;
(...skipping 12 matching lines...) Expand all
75 media::VideoDecodeAccelerator::Error error) OVERRIDE; 75 media::VideoDecodeAccelerator::Error error) OVERRIDE;
76 virtual void NotifyFlushDone() OVERRIDE; 76 virtual void NotifyFlushDone() OVERRIDE;
77 virtual void NotifyEndOfBitstreamBuffer(int32 buffer_id) OVERRIDE; 77 virtual void NotifyEndOfBitstreamBuffer(int32 buffer_id) OVERRIDE;
78 virtual void NotifyResetDone() OVERRIDE; 78 virtual void NotifyResetDone() OVERRIDE;
79 79
80 private: 80 private:
81 explicit PPB_VideoDecoder_Impl(PP_Instance instance); 81 explicit PPB_VideoDecoder_Impl(PP_Instance instance);
82 bool Init(PP_Resource graphics_context, 82 bool Init(PP_Resource graphics_context,
83 PluginDelegate::PlatformContext3D* context, 83 PluginDelegate::PlatformContext3D* context,
84 gpu::gles2::GLES2Implementation* gles2_impl, 84 gpu::gles2::GLES2Implementation* gles2_impl,
85 const PP_VideoConfigElement* config); 85 const PP_VideoDecoderConfig_Dev& config);
86 86
87 // This is NULL before initialization, and if this PPB_VideoDecoder_Impl is 87 // This is NULL before initialization, and if this PPB_VideoDecoder_Impl is
88 // swapped with another. 88 // swapped with another.
89 scoped_refptr<PluginDelegate::PlatformVideoDecoder> platform_video_decoder_; 89 scoped_refptr<PluginDelegate::PlatformVideoDecoder> platform_video_decoder_;
90 90
91 // Reference to the plugin requesting this interface. 91 // Reference to the plugin requesting this interface.
92 const PPP_VideoDecoder_Dev* ppp_videodecoder_; 92 const PPP_VideoDecoder_Dev* ppp_videodecoder_;
93 93
94 DISALLOW_COPY_AND_ASSIGN(PPB_VideoDecoder_Impl); 94 DISALLOW_COPY_AND_ASSIGN(PPB_VideoDecoder_Impl);
95 }; 95 };
96 96
97 } // namespace ppapi 97 } // namespace ppapi
98 } // namespace webkit 98 } // namespace webkit
99 99
100 #endif // WEBKIT_PLUGINS_PPAPI_PPB_VIDEO_DECODER_IMPL_H_ 100 #endif // WEBKIT_PLUGINS_PPAPI_PPB_VIDEO_DECODER_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698