OLD | NEW |
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 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
47 // Callback to notify about decoding errors. | 47 // Callback to notify about decoding errors. |
48 virtual void NotifyError(PP_VideoDecodeError_Dev error) = 0; | 48 virtual void NotifyError(PP_VideoDecodeError_Dev error) = 0; |
49 }; | 49 }; |
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 // |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 |
58 // not transferred and it must outlive the lifetime of this class. | 59 // not transferred and it must outlive the lifetime of this class. |
59 VideoDecoder(const Instance* instance, const std::vector<uint32_t>& config, | 60 VideoDecoder(const Instance* instance, const std::vector<uint32_t>& config, |
60 Client* client); | 61 CompletionCallback callback, Client* client); |
61 ~VideoDecoder(); | 62 ~VideoDecoder(); |
62 | 63 |
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 |
(...skipping 25 matching lines...) Expand all Loading... |
96 Client* client_; | 97 Client* client_; |
97 | 98 |
98 // Suppress compiler-generated copy constructors. | 99 // Suppress compiler-generated copy constructors. |
99 VideoDecoder(const VideoDecoder&); | 100 VideoDecoder(const VideoDecoder&); |
100 void operator=(const VideoDecoder&); | 101 void operator=(const VideoDecoder&); |
101 }; | 102 }; |
102 | 103 |
103 } // namespace pp | 104 } // namespace pp |
104 | 105 |
105 #endif // PPAPI_CPP_DEV_VIDEO_DECODER_DEV_H_ | 106 #endif // PPAPI_CPP_DEV_VIDEO_DECODER_DEV_H_ |
OLD | NEW |