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

Side by Side Diff: ppapi/cpp/dev/video_decoder_dev.h

Issue 7085030: Implementation for Pepper C++ Video Decoder API (wrapper on top of C API). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Minor style fixes. Created 9 years, 6 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
« no previous file with comments | « ppapi/c/dev/ppb_video_decoder_dev.h ('k') | ppapi/cpp/dev/video_decoder_dev.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 PPAPI_CPP_DEV_VIDEO_DECODER_DEV_H_ 5 #ifndef PPAPI_CPP_DEV_VIDEO_DECODER_DEV_H_
6 #define PPAPI_CPP_DEV_VIDEO_DECODER_DEV_H_ 6 #define PPAPI_CPP_DEV_VIDEO_DECODER_DEV_H_
7 7
8 #include <vector> 8 #include <vector>
9 9
10 #include "ppapi/c/dev/pp_video_dev.h" 10 #include "ppapi/c/dev/pp_video_dev.h"
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
50 50
51 // Constructor for the video decoder. Calls the Create on the 51 // Constructor for the video decoder. Calls the Create on the
52 // PPB_VideoDecoder_Dev interface. 52 // PPB_VideoDecoder_Dev interface.
53 // 53 //
54 // Parameters: 54 // Parameters:
55 // |instance| is the pointer to the plug-in instance. 55 // |instance| is the pointer to the plug-in instance.
56 // |config| is the configuration on which the decoder should be initialized. 56 // |config| is the configuration on which the decoder should be initialized.
57 // |callback| will be called when decoder is initialized. 57 // |callback| will be called when decoder is initialized.
58 // |client| is the pointer to the client object. Ownership of the object is 58 // |client| is the pointer to the client object. Ownership of the object is
59 // not transferred and it must outlive the lifetime of this class. 59 // not transferred and it must outlive the lifetime of this class.
60 VideoDecoder(const Instance* instance, const std::vector<uint32_t>& config, 60 VideoDecoder(const Instance* instance,
61 const std::vector<PP_VideoConfigElement>& config,
brettw 2011/06/01 07:57:03 I still have concerns about using a vector here, a
Ville-Mikko Rautio 2011/06/01 09:45:26 Agreed. C-array style is better from user perspect
61 CompletionCallback callback, Client* client); 62 CompletionCallback callback, Client* client);
62 ~VideoDecoder(); 63 ~VideoDecoder();
63 64
64 // GetConfigs returns supported configurations that are subsets of given 65 // GetConfigs returns supported configurations that are subsets of given
65 // |prototype_config|. 66 // |prototype_config|.
66 static std::vector<uint32_t> GetConfigs( 67 static std::vector<PP_VideoConfigElement> GetConfigs(
67 Instance* instance, 68 Instance* instance,
68 const std::vector<uint32_t>& prototype_config); 69 const std::vector<PP_VideoConfigElement>& prototype_config);
69 70
70 // Provides the decoder with picture buffers for video decoding. 71 // Provides the decoder with picture buffers for video decoding.
71 // AssignGLESBuffers provides texture-backed buffers, whereas 72 // AssignGLESBuffers provides texture-backed buffers, whereas
72 // AssignSysmemBuffers provides system memory-backed buffers. 73 // AssignSysmemBuffers provides system memory-backed buffers.
73 void AssignGLESBuffers(uint32_t no_of_buffers, 74 void AssignGLESBuffers(const std::vector<PP_GLESBuffer_Dev>& buffers);
74 const PP_GLESBuffer_Dev& buffers); 75 void AssignSysmemBuffers(const std::vector<PP_SysmemBuffer_Dev>& buffers);
75 void AssignSysmemBuffers(uint32_t no_of_buffers,
76 const PP_SysmemBuffer_Dev& buffers);
77 76
78 // Decodes given bitstream buffer. Once decoder is done with processing 77 // Decodes given bitstream buffer. Once decoder is done with processing
79 // |bitstream_buffer| is will call |callback| with provided user data. 78 // |bitstream_buffer| is will call |callback| with provided user data.
80 bool Decode(const PP_VideoBitstreamBuffer_Dev& bitstream_buffer, 79 bool Decode(const PP_VideoBitstreamBuffer_Dev& bitstream_buffer,
81 CompletionCallback callback); 80 CompletionCallback callback);
82 81
83 // Tells the decoder to reuse given picture buffer. 82 // Tells the decoder to reuse given picture buffer.
84 void ReusePictureBuffer(int32_t picture_buffer_id); 83 void ReusePictureBuffer(int32_t picture_buffer_id);
85 84
86 // Flushes the decoder. |callback| will be called as soon as Flush has been 85 // Flushes the decoder. |callback| will be called as soon as Flush has been
(...skipping 10 matching lines...) Expand all
97 Client* client_; 96 Client* client_;
98 97
99 // Suppress compiler-generated copy constructors. 98 // Suppress compiler-generated copy constructors.
100 VideoDecoder(const VideoDecoder&); 99 VideoDecoder(const VideoDecoder&);
101 void operator=(const VideoDecoder&); 100 void operator=(const VideoDecoder&);
102 }; 101 };
103 102
104 } // namespace pp 103 } // namespace pp
105 104
106 #endif // PPAPI_CPP_DEV_VIDEO_DECODER_DEV_H_ 105 #endif // PPAPI_CPP_DEV_VIDEO_DECODER_DEV_H_
OLDNEW
« no previous file with comments | « ppapi/c/dev/ppb_video_decoder_dev.h ('k') | ppapi/cpp/dev/video_decoder_dev.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698