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

Side by Side Diff: ppapi/c/dev/ppb_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_C_DEV_PPB_VIDEO_DECODER_DEV_H_ 5 #ifndef PPAPI_C_DEV_PPB_VIDEO_DECODER_DEV_H_
6 #define PPAPI_C_DEV_PPB_VIDEO_DECODER_DEV_H_ 6 #define PPAPI_C_DEV_PPB_VIDEO_DECODER_DEV_H_
7 7
8 #include "ppapi/c/dev/pp_video_dev.h" 8 #include "ppapi/c/dev/pp_video_dev.h"
9 #include "ppapi/c/pp_completion_callback.h" 9 #include "ppapi/c/pp_completion_callback.h"
10 #include "ppapi/c/pp_var.h" 10 #include "ppapi/c/pp_var.h"
11 11
12 #define PPB_VIDEODECODER_DEV_INTERFACE_0_14 "PPB_VideoDecoder(Dev);0.14" 12 #define PPB_VIDEODECODER_DEV_INTERFACE_0_15 "PPB_VideoDecoder(Dev);0.15"
13 #define PPB_VIDEODECODER_DEV_INTERFACE PPB_VIDEODECODER_DEV_INTERFACE_0_14 13 #define PPB_VIDEODECODER_DEV_INTERFACE PPB_VIDEODECODER_DEV_INTERFACE_0_15
14 14
15 // Video decoder interface. 15 // Video decoder interface.
16 // 16 //
17 // Typical usage: 17 // Typical usage:
18 // - Use Create() to get a new PPB_VideoDecoder_Dev resource. 18 // - Use Create() to get a new PPB_VideoDecoder_Dev resource.
19 // - Call Initialize() to create the underlying resources in the GPU process and 19 // - Call Initialize() to create the underlying resources in the GPU process and
20 // configure the decoder there. 20 // configure the decoder there.
21 // - Call Decode() to decode some video data. 21 // - Call Decode() to decode some video data.
22 // - Receive ProvidePictureBuffers callback 22 // - Receive ProvidePictureBuffers callback
23 // - Supply the decoder with textures using AssignPictureBuffers. 23 // - Supply the decoder with textures using AssignPictureBuffers.
(...skipping 26 matching lines...) Expand all
50 // Returns true if is a video decoder, false otherwise. 50 // Returns true if is a video decoder, false otherwise.
51 PP_Bool (*IsVideoDecoder)(PP_Resource resource); 51 PP_Bool (*IsVideoDecoder)(PP_Resource resource);
52 52
53 // Initializes the video decoder with requested configuration. 53 // Initializes the video decoder with requested configuration.
54 // 54 //
55 // Parameters: 55 // Parameters:
56 // |video_decoder| is the previously created handle to the decoder resource. 56 // |video_decoder| is the previously created handle to the decoder resource.
57 // |context| the GL context in which decoding will happen. This should be a 57 // |context| the GL context in which decoding will happen. This should be a
58 // resource of type PPB_Context3D_Dev. 58 // resource of type PPB_Context3D_Dev.
59 // |decoder_config| the configuration to use to initialize the decoder. 59 // |decoder_config| the configuration to use to initialize the decoder.
60 // |callback| called after initialization is complete.
61 // 60 //
62 // Returns an error code from pp_errors.h. 61 // Returns an error code from pp_errors.h.
63 int32_t (*Initialize)(PP_Resource video_decoder, 62 int32_t (*Initialize)(PP_Resource video_decoder,
64 PP_Resource context, 63 PP_Resource context,
65 const PP_VideoConfigElement* decoder_config, 64 const PP_VideoConfigElement* decoder_config);
piman 2011/07/28 23:40:59 Does it make sense to fold this into Create ?
Ami GONE FROM CHROMIUM 2011/07/29 05:58:48 Hell yes it does! Done.
66 struct PP_CompletionCallback callback);
67 65
68 // Dispatches bitstream buffer to the decoder. 66 // Dispatches bitstream buffer to the decoder.
69 // 67 //
70 // Parameters: 68 // Parameters:
71 // |video_decoder| is the previously created handle to the decoder resource. 69 // |video_decoder| is the previously created handle to the decoder resource.
72 // |bitstream_buffer| is the bitstream buffer that contains the input data. 70 // |bitstream_buffer| is the bitstream buffer that contains the input data.
73 // |callback| will be called when |bitstream_buffer| has been processed by 71 // |callback| will be called when |bitstream_buffer| has been processed by
74 // the decoder. 72 // the decoder.
75 // 73 //
76 // Returns an error code from pp_errors.h. 74 // Returns an error code from pp_errors.h.
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
137 // may be freed asynchronously, after this method returns no more callbacks 135 // may be freed asynchronously, after this method returns no more callbacks
138 // will be made on the client. Any resources held by the client at that point 136 // will be made on the client. Any resources held by the client at that point
139 // may be freed. 137 // may be freed.
140 // 138 //
141 // Parameters: 139 // Parameters:
142 // |video_decoder| is the previously created handle to the decoder resource. 140 // |video_decoder| is the previously created handle to the decoder resource.
143 void (*Destroy)(PP_Resource video_decoder); 141 void (*Destroy)(PP_Resource video_decoder);
144 }; 142 };
145 143
146 #endif /* PPAPI_C_DEV_PPB_VIDEO_DECODER_DEV_H_ */ 144 #endif /* PPAPI_C_DEV_PPB_VIDEO_DECODER_DEV_H_ */
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698