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

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: Removed unused parameter error detected by tryserver. 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
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 PP_VideoConfigElement* config,
Ami GONE FROM CHROMIUM 2011/06/01 18:26:28 should be const*
Ville-Mikko Rautio 2011/06/03 09:26:05 Done.
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 bool GetConfigs(Instance* instance,
67 Instance* instance, 68 const PP_VideoConfigElement* prototype_config,
68 const std::vector<uint32_t>& prototype_config); 69 PP_VideoConfigElement* matching_configs,
70 uint32_t matching_configs_size,
71 uint32_t* num_of_matching_configs);
Ami GONE FROM CHROMIUM 2011/06/01 18:26:28 I've been confused about this API for the last 24h
Ville-Mikko Rautio 2011/06/03 09:26:05 Yes, that is the idea.
69 72
70 // Provides the decoder with picture buffers for video decoding. 73 // Provides the decoder with picture buffers for video decoding.
71 // AssignGLESBuffers provides texture-backed buffers, whereas 74 // AssignGLESBuffers provides texture-backed buffers, whereas
72 // AssignSysmemBuffers provides system memory-backed buffers. 75 // AssignSysmemBuffers provides system memory-backed buffers.
73 void AssignGLESBuffers(uint32_t no_of_buffers, 76 void AssignGLESBuffers(const std::vector<PP_GLESBuffer_Dev>& buffers);
74 const PP_GLESBuffer_Dev& buffers); 77 void AssignSysmemBuffers(const std::vector<PP_SysmemBuffer_Dev>& buffers);
75 void AssignSysmemBuffers(uint32_t no_of_buffers,
76 const PP_SysmemBuffer_Dev& buffers);
77 78
78 // Decodes given bitstream buffer. Once decoder is done with processing 79 // Decodes given bitstream buffer. Once decoder is done with processing
79 // |bitstream_buffer| is will call |callback| with provided user data. 80 // |bitstream_buffer| is will call |callback| with provided user data.
80 bool Decode(const PP_VideoBitstreamBuffer_Dev& bitstream_buffer, 81 bool Decode(const PP_VideoBitstreamBuffer_Dev& bitstream_buffer,
81 CompletionCallback callback); 82 CompletionCallback callback);
82 83
83 // Tells the decoder to reuse given picture buffer. 84 // Tells the decoder to reuse given picture buffer.
84 void ReusePictureBuffer(int32_t picture_buffer_id); 85 void ReusePictureBuffer(int32_t picture_buffer_id);
85 86
86 // Flushes the decoder. |callback| will be called as soon as Flush has been 87 // Flushes the decoder. |callback| will be called as soon as Flush has been
(...skipping 10 matching lines...) Expand all
97 Client* client_; 98 Client* client_;
98 99
99 // Suppress compiler-generated copy constructors. 100 // Suppress compiler-generated copy constructors.
100 VideoDecoder(const VideoDecoder&); 101 VideoDecoder(const VideoDecoder&);
101 void operator=(const VideoDecoder&); 102 void operator=(const VideoDecoder&);
102 }; 103 };
103 104
104 } // namespace pp 105 } // namespace pp
105 106
106 #endif // PPAPI_CPP_DEV_VIDEO_DECODER_DEV_H_ 107 #endif // PPAPI_CPP_DEV_VIDEO_DECODER_DEV_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698