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

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

Issue 6961018: Pepper Video Decoder API tester plugin. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Simple lint fixes. Created 9 years, 7 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 | « no previous file | ppapi/cpp/dev/video_decoder_dev.cc » ('j') | ppapi/cpp/dev/video_decoder_dev.cc » ('J')
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"
11 #include "ppapi/c/dev/ppb_video_decoder_dev.h"
11 #include "ppapi/cpp/completion_callback.h" 12 #include "ppapi/cpp/completion_callback.h"
12 #include "ppapi/cpp/dev/buffer_dev.h" 13 #include "ppapi/cpp/dev/buffer_dev.h"
13 #include "ppapi/cpp/resource.h" 14 #include "ppapi/cpp/resource.h"
14 15
15 namespace pp { 16 namespace pp {
16 17
17 class Instance; 18 class Instance;
18 19
19 // C++ wrapper for the Pepper Video Decoder interface. For more detailed 20 // C++ wrapper for the Pepper Video Decoder interface. For more detailed
20 // documentation refer to PPB_VideoDecoder_Dev and PPP_VideoDecoder_Dev 21 // documentation refer to PPB_VideoDecoder_Dev and PPP_VideoDecoder_Dev
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
63 // GetConfigs returns supported configurations that are subsets of given 64 // GetConfigs returns supported configurations that are subsets of given
64 // |prototype_config|. 65 // |prototype_config|.
65 static std::vector<uint32_t> GetConfigs( 66 static std::vector<uint32_t> GetConfigs(
66 Instance* instance, 67 Instance* instance,
67 const std::vector<uint32_t>& prototype_config); 68 const std::vector<uint32_t>& prototype_config);
68 69
69 // Provides the decoder with picture buffers for video decoding. 70 // Provides the decoder with picture buffers for video decoding.
70 // AssignGLESBuffers provides texture-backed buffers, whereas 71 // AssignGLESBuffers provides texture-backed buffers, whereas
71 // AssignSysmemBuffers provides system memory-backed buffers. 72 // AssignSysmemBuffers provides system memory-backed buffers.
72 void AssignGLESBuffers(uint32_t no_of_buffers, 73 void AssignGLESBuffers(uint32_t no_of_buffers,
73 const PP_GLESBuffer_Dev& buffers); 74 const std::vector<PP_GLESBuffer_Dev>& buffers);
74 void AssignSysmemBuffers(uint32_t no_of_buffers, 75 void AssignSysmemBuffers(uint32_t no_of_buffers,
75 const PP_SysmemBuffer_Dev& buffers); 76 const std::vector<PP_SysmemBuffer_Dev>& buffers);
76 77
77 // Decodes given bitstream buffer. Once decoder is done with processing 78 // Decodes given bitstream buffer. Once decoder is done with processing
78 // |bitstream_buffer| is will call |callback| with provided user data. 79 // |bitstream_buffer| is will call |callback| with provided user data.
79 bool Decode(const PP_VideoBitstreamBuffer_Dev& bitstream_buffer, 80 bool Decode(const PP_VideoBitstreamBuffer_Dev& bitstream_buffer,
80 CompletionCallback callback); 81 CompletionCallback callback);
81 82
82 // Tells the decoder to reuse given picture buffer. 83 // Tells the decoder to reuse given picture buffer.
83 void ReusePictureBuffer(int32_t picture_buffer_id); 84 void ReusePictureBuffer(int32_t picture_buffer_id);
84 85
85 // Flushes the decoder. |callback| will be called as soon as Flush has been 86 // Flushes the decoder. |callback| will be called as soon as Flush has been
86 // finished. 87 // finished.
87 bool Flush(CompletionCallback callback); 88 bool Flush(CompletionCallback callback);
88 89
89 // Dispatches abortion request to the decoder to abort decoding as soon as 90 // Dispatches abortion request to the decoder to abort decoding as soon as
90 // possible. |callback| will be called as soon as abortion has been finished. 91 // possible. |callback| will be called as soon as abortion has been finished.
91 bool Abort(CompletionCallback callback); 92 bool Abort(CompletionCallback callback);
92 93
93 private: 94 private:
94 // Pointer to the plugin's video decoder support interface for providing the 95 // Pointer to the plugin's video decoder support interface for providing the
95 // buffers for video decoding. 96 // buffers for video decoding.
96 Client* client_; 97 Client* client_;
97 98
99 // Pointer to the underlying C interface of the video decoder.
100 PPB_VideoDecoder_Dev* ppb_videodecoder_dev_;
Ami GONE FROM CHROMIUM 2011/05/24 17:55:07 Unused?
101
98 // Suppress compiler-generated copy constructors. 102 // Suppress compiler-generated copy constructors.
99 VideoDecoder(const VideoDecoder&); 103 VideoDecoder(const VideoDecoder&);
100 void operator=(const VideoDecoder&); 104 void operator=(const VideoDecoder&);
101 }; 105 };
102 106
103 } // namespace pp 107 } // namespace pp
104 108
105 #endif // PPAPI_CPP_DEV_VIDEO_DECODER_DEV_H_ 109 #endif // PPAPI_CPP_DEV_VIDEO_DECODER_DEV_H_
OLDNEW
« no previous file with comments | « no previous file | ppapi/cpp/dev/video_decoder_dev.cc » ('j') | ppapi/cpp/dev/video_decoder_dev.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698