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

Side by Side Diff: content/renderer/pepper/ppb_video_decoder_impl.h

Issue 225903006: PPAPI: Run clang_format.py on content/renderer/pepper (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: merge Created 6 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
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 CONTENT_RENDERER_PEPPER_PPB_VIDEO_DECODER_IMPL_H_ 5 #ifndef CONTENT_RENDERER_PEPPER_PPB_VIDEO_DECODER_IMPL_H_
6 #define CONTENT_RENDERER_PEPPER_PPB_VIDEO_DECODER_IMPL_H_ 6 #define CONTENT_RENDERER_PEPPER_PPB_VIDEO_DECODER_IMPL_H_
7 7
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "base/compiler_specific.h" 9 #include "base/compiler_specific.h"
10 #include "base/memory/ref_counted.h" 10 #include "base/memory/ref_counted.h"
(...skipping 21 matching lines...) Expand all
32 class PPB_VideoDecoder_Impl : public ppapi::PPB_VideoDecoder_Shared, 32 class PPB_VideoDecoder_Impl : public ppapi::PPB_VideoDecoder_Shared,
33 public media::VideoDecodeAccelerator::Client { 33 public media::VideoDecodeAccelerator::Client {
34 public: 34 public:
35 // See PPB_VideoDecoder_Dev::Create. Returns 0 on failure to create & 35 // See PPB_VideoDecoder_Dev::Create. Returns 0 on failure to create &
36 // initialize. 36 // initialize.
37 static PP_Resource Create(PP_Instance instance, 37 static PP_Resource Create(PP_Instance instance,
38 PP_Resource graphics_context, 38 PP_Resource graphics_context,
39 PP_VideoDecoder_Profile profile); 39 PP_VideoDecoder_Profile profile);
40 40
41 // PPB_VideoDecoder_API implementation. 41 // PPB_VideoDecoder_API implementation.
42 virtual int32_t Decode( 42 virtual int32_t Decode(const PP_VideoBitstreamBuffer_Dev* bitstream_buffer,
43 const PP_VideoBitstreamBuffer_Dev* bitstream_buffer, 43 scoped_refptr<ppapi::TrackedCallback> callback)
44 scoped_refptr<ppapi::TrackedCallback> callback) OVERRIDE; 44 OVERRIDE;
45 virtual void AssignPictureBuffers( 45 virtual void AssignPictureBuffers(uint32_t no_of_buffers,
46 uint32_t no_of_buffers, const PP_PictureBuffer_Dev* buffers) OVERRIDE; 46 const PP_PictureBuffer_Dev* buffers)
47 OVERRIDE;
47 virtual void ReusePictureBuffer(int32_t picture_buffer_id) OVERRIDE; 48 virtual void ReusePictureBuffer(int32_t picture_buffer_id) OVERRIDE;
48 virtual int32_t Flush( 49 virtual int32_t Flush(scoped_refptr<ppapi::TrackedCallback> callback)
49 scoped_refptr<ppapi::TrackedCallback> callback) OVERRIDE; 50 OVERRIDE;
50 virtual int32_t Reset( 51 virtual int32_t Reset(scoped_refptr<ppapi::TrackedCallback> callback)
51 scoped_refptr<ppapi::TrackedCallback> callback) OVERRIDE; 52 OVERRIDE;
52 virtual void Destroy() OVERRIDE; 53 virtual void Destroy() OVERRIDE;
53 54
54 // media::VideoDecodeAccelerator::Client implementation. 55 // media::VideoDecodeAccelerator::Client implementation.
55 virtual void ProvidePictureBuffers(uint32 requested_num_of_buffers, 56 virtual void ProvidePictureBuffers(uint32 requested_num_of_buffers,
56 const gfx::Size& dimensions, 57 const gfx::Size& dimensions,
57 uint32 texture_target) OVERRIDE; 58 uint32 texture_target) OVERRIDE;
58 virtual void DismissPictureBuffer(int32 picture_buffer_id) OVERRIDE; 59 virtual void DismissPictureBuffer(int32 picture_buffer_id) OVERRIDE;
59 virtual void PictureReady(const media::Picture& picture) OVERRIDE; 60 virtual void PictureReady(const media::Picture& picture) OVERRIDE;
60 virtual void NotifyError( 61 virtual void NotifyError(media::VideoDecodeAccelerator::Error error) OVERRIDE;
61 media::VideoDecodeAccelerator::Error error) OVERRIDE;
62 virtual void NotifyFlushDone() OVERRIDE; 62 virtual void NotifyFlushDone() OVERRIDE;
63 virtual void NotifyEndOfBitstreamBuffer(int32 buffer_id) OVERRIDE; 63 virtual void NotifyEndOfBitstreamBuffer(int32 buffer_id) OVERRIDE;
64 virtual void NotifyResetDone() OVERRIDE; 64 virtual void NotifyResetDone() OVERRIDE;
65 65
66 private: 66 private:
67 virtual ~PPB_VideoDecoder_Impl(); 67 virtual ~PPB_VideoDecoder_Impl();
68 68
69 explicit PPB_VideoDecoder_Impl(PP_Instance instance); 69 explicit PPB_VideoDecoder_Impl(PP_Instance instance);
70 bool Init(PP_Resource graphics_context, 70 bool Init(PP_Resource graphics_context,
71 PlatformContext3D* context, 71 PlatformContext3D* context,
72 gpu::gles2::GLES2Implementation* gles2_impl, 72 gpu::gles2::GLES2Implementation* gles2_impl,
73 PP_VideoDecoder_Profile profile); 73 PP_VideoDecoder_Profile profile);
74 74
75 // This is NULL before initialization, and if this PPB_VideoDecoder_Impl is 75 // This is NULL before initialization, and if this PPB_VideoDecoder_Impl is
76 // swapped with another. 76 // swapped with another.
77 scoped_ptr<PlatformVideoDecoder> platform_video_decoder_; 77 scoped_ptr<PlatformVideoDecoder> platform_video_decoder_;
78 78
79 // Reference to the plugin requesting this interface. 79 // Reference to the plugin requesting this interface.
80 const PPP_VideoDecoder_Dev* ppp_videodecoder_; 80 const PPP_VideoDecoder_Dev* ppp_videodecoder_;
81 81
82 DISALLOW_COPY_AND_ASSIGN(PPB_VideoDecoder_Impl); 82 DISALLOW_COPY_AND_ASSIGN(PPB_VideoDecoder_Impl);
83 }; 83 };
84 84
85 } // namespace content 85 } // namespace content
86 86
87 #endif // CONTENT_RENDERER_PEPPER_PPB_VIDEO_DECODER_IMPL_H_ 87 #endif // CONTENT_RENDERER_PEPPER_PPB_VIDEO_DECODER_IMPL_H_
OLDNEW
« no previous file with comments | « content/renderer/pepper/ppb_var_deprecated_impl.cc ('k') | content/renderer/pepper/ppb_video_decoder_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698