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" |
11 #include "ppapi/cpp/completion_callback.h" | 11 #include "ppapi/cpp/completion_callback.h" |
12 #include "ppapi/cpp/dev/buffer_dev.h" | 12 #include "ppapi/cpp/dev/buffer_dev.h" |
13 #include "ppapi/cpp/resource.h" | 13 #include "ppapi/cpp/resource.h" |
14 | 14 |
15 namespace pp { | 15 namespace pp { |
16 | 16 |
17 class Context3D_Dev; | 17 class Context3D_Dev; |
18 class Graphics3D_Dev; | 18 class Graphics3D_Dev; |
19 class Instance; | 19 class Instance; |
20 | 20 |
21 // C++ wrapper for the Pepper Video Decoder interface. For more detailed | 21 // C++ wrapper for the Pepper Video Decoder interface. For more detailed |
22 // documentation refer to the C interfaces. | 22 // documentation refer to the C interfaces. |
23 // | 23 // |
24 // C++ version of the PPB_VideoDecoder_Dev interface. | 24 // C++ version of the PPB_VideoDecoder_Dev interface. |
25 class VideoDecoder_Dev : public Resource { | 25 class VideoDecoder_Dev : public Resource { |
26 public: | 26 public: |
27 // See PPB_VideoDecoder_Dev::Create. | 27 // See PPB_VideoDecoder_Dev::Create. |
28 VideoDecoder_Dev(const Instance& instance, | 28 VideoDecoder_Dev(const Instance& instance, |
brettw
2011/08/31 15:45:38
While you're here, can you convert the Instance& t
Ami GONE FROM CHROMIUM
2011/08/31 18:28:34
Done.
| |
29 const Context3D_Dev& context, | 29 const Context3D_Dev& context, |
30 const PP_VideoConfigElement* config); | 30 const PP_VideoDecoderConfig_Dev& config); |
31 VideoDecoder_Dev(const Instance& instance, | 31 VideoDecoder_Dev(const Instance& instance, |
32 const Graphics3D_Dev& context, | 32 const Graphics3D_Dev& context, |
33 const PP_VideoConfigElement* config); | 33 const PP_VideoDecoderConfig_Dev& config); |
34 | 34 |
35 explicit VideoDecoder_Dev(PP_Resource resource); | 35 explicit VideoDecoder_Dev(PP_Resource resource); |
36 virtual ~VideoDecoder_Dev(); | 36 virtual ~VideoDecoder_Dev(); |
37 | 37 |
38 // PPB_VideoDecoder_Dev implementation. | 38 // PPB_VideoDecoder_Dev implementation. |
39 void AssignPictureBuffers(const std::vector<PP_PictureBuffer_Dev>& buffers); | 39 void AssignPictureBuffers(const std::vector<PP_PictureBuffer_Dev>& buffers); |
40 int32_t Decode(const PP_VideoBitstreamBuffer_Dev& bitstream_buffer, | 40 int32_t Decode(const PP_VideoBitstreamBuffer_Dev& bitstream_buffer, |
41 CompletionCallback callback); | 41 CompletionCallback callback); |
42 void ReusePictureBuffer(int32_t picture_buffer_id); | 42 void ReusePictureBuffer(int32_t picture_buffer_id); |
43 int32_t Flush(CompletionCallback callback); | 43 int32_t Flush(CompletionCallback callback); |
44 int32_t Reset(CompletionCallback callback); | 44 int32_t Reset(CompletionCallback callback); |
45 | 45 |
46 private: | 46 private: |
47 // Disallow copy-construction to ensure Destroy() is called exactly once. | 47 // Disallow copy-construction to ensure Destroy() is called exactly once. |
48 VideoDecoder_Dev(const VideoDecoder_Dev&); | 48 VideoDecoder_Dev(const VideoDecoder_Dev&); |
49 }; | 49 }; |
50 | 50 |
51 } // namespace pp | 51 } // namespace pp |
52 | 52 |
53 #endif // PPAPI_CPP_DEV_VIDEO_DECODER_DEV_H_ | 53 #endif // PPAPI_CPP_DEV_VIDEO_DECODER_DEV_H_ |
OLD | NEW |