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

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

Issue 7474006: PPB_VideoDecoder_Dev::Initialize is now synchronous! (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 9 years, 4 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"
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 Instance; 18 class Instance;
19 19
20 // C++ wrapper for the Pepper Video Decoder interface. For more detailed 20 // C++ wrapper for the Pepper Video Decoder interface. For more detailed
21 // documentation refer to the C interfaces. 21 // documentation refer to the C interfaces.
22 // 22 //
23 // C++ version of the PPB_VideoDecoder_Dev interface. 23 // C++ version of the PPB_VideoDecoder_Dev interface.
24 class VideoDecoder_Dev : public Resource { 24 class VideoDecoder_Dev : public Resource {
25 public: 25 public:
26 // Constructor for the video decoder. Calls the Create on the 26 // Constructor for the video decoder. Calls the Create on the
27 // PPB_VideoDecoder_Dev interface. 27 // PPB_VideoDecoder_Dev interface.
28 // 28 //
29 // Parameters: 29 // Parameters:
30 // |instance| is the pointer to the plug-in instance. 30 // |instance| is the pointer to the plug-in instance.
vrk (LEFT CHROMIUM) 2011/07/29 18:11:02 document added params?
Ami GONE FROM CHROMIUM 2011/07/29 18:20:41 Actually removed existing doco in favor of pointer
31 explicit VideoDecoder_Dev(const Instance& instance); 31 explicit VideoDecoder_Dev(const Instance& instance,
32 const Context3D_Dev& context,
33 const PP_VideoConfigElement* config);
32 explicit VideoDecoder_Dev(PP_Resource resource); 34 explicit VideoDecoder_Dev(PP_Resource resource);
33 virtual ~VideoDecoder_Dev(); 35 virtual ~VideoDecoder_Dev();
34 36
35 // PPB_VideoDecoder_Dev implementation. 37 // PPB_VideoDecoder_Dev implementation.
36 int32_t Initialize(const PP_VideoConfigElement* config,
37 const Context3D_Dev& context,
38 CompletionCallback callback);
39 void AssignPictureBuffers(const std::vector<PP_PictureBuffer_Dev>& buffers); 38 void AssignPictureBuffers(const std::vector<PP_PictureBuffer_Dev>& buffers);
40 int32_t Decode(const PP_VideoBitstreamBuffer_Dev& bitstream_buffer, 39 int32_t Decode(const PP_VideoBitstreamBuffer_Dev& bitstream_buffer,
41 CompletionCallback callback); 40 CompletionCallback callback);
42 void ReusePictureBuffer(int32_t picture_buffer_id); 41 void ReusePictureBuffer(int32_t picture_buffer_id);
43 int32_t Flush(CompletionCallback callback); 42 int32_t Flush(CompletionCallback callback);
44 int32_t Reset(CompletionCallback callback); 43 int32_t Reset(CompletionCallback callback);
45 44
46 private: 45 private:
47 // Disallow copy-construction to ensure Destroy() is called exactly once. 46 // Disallow copy-construction to ensure Destroy() is called exactly once.
48 VideoDecoder_Dev(const VideoDecoder_Dev&); 47 VideoDecoder_Dev(const VideoDecoder_Dev&);
49 }; 48 };
50 49
51 } // namespace pp 50 } // namespace pp
52 51
53 #endif // PPAPI_CPP_DEV_VIDEO_DECODER_DEV_H_ 52 #endif // PPAPI_CPP_DEV_VIDEO_DECODER_DEV_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698