1 /* Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 * Use of this source code is governed by a BSD-style license that can be
3 * found in the LICENSE file.
7 * This file defines the <code>PPP_VideoDecoder_Dev</code> interface.
14 * PPP_VideoDecoder_Dev structure contains the function pointers that the
15 * plugin MUST implement to provide services needed by the video decoder
18 * See PPB_VideoDecoder_Dev for general usage tips.
20 interface PPP_VideoDecoder_Dev
{
22 * Callback function to provide buffers for the decoded output pictures. If
23 * succeeds plugin must provide buffers through AssignPictureBuffers function
24 * to the API. If |req_num_of_bufs| matching exactly the specification
25 * given in the parameters cannot be allocated decoder should be destroyed.
27 * Decoding will not proceed until buffers have been provided.
30 * |instance| the plugin instance to which the callback is responding.
31 * |decoder| the PPB_VideoDecoder_Dev resource.
32 * |req_num_of_bufs| tells how many buffers are needed by the decoder.
33 * |dimensions| tells the dimensions of the buffer to allocate.
34 * |texture_target| the type of texture used. Sample targets in use are
35 * TEXTURE_2D (most platforms) and TEXTURE_EXTERNAL_OES (on ARM).
38 void ProvidePictureBuffers
(
39 [in] PP_Instance instance
,
40 [in] PP_Resource decoder
,
41 [in] uint32_t req_num_of_bufs
,
42 [in] PP_Size dimensions
,
43 [in] uint32_t texture_target
);
46 * Callback function for decoder to deliver unneeded picture buffers back to
50 * |instance| the plugin instance to which the callback is responding.
51 * |decoder| the PPB_VideoDecoder_Dev resource.
52 * |picture_buffer| points to the picture buffer that is no longer needed.
54 void DismissPictureBuffer
(
55 [in] PP_Instance instance
,
56 [in] PP_Resource decoder
,
57 [in] int32_t picture_buffer_id
);
60 * Callback function for decoder to deliver decoded pictures ready to be
61 * displayed. Decoder expects the plugin to return the buffer back to the
62 * decoder through ReusePictureBuffer function in PPB Video Decoder API.
65 * |instance| the plugin instance to which the callback is responding.
66 * |decoder| the PPB_VideoDecoder_Dev resource.
67 * |picture| is the picture that is ready.
70 [in] PP_Instance instance
,
71 [in] PP_Resource decoder
,
72 [in] PP_Picture_Dev picture
);
75 * Error handler callback for decoder to deliver information about detected
76 * errors to the plugin.
79 * |instance| the plugin instance to which the callback is responding.
80 * |decoder| the PPB_VideoDecoder_Dev resource.
81 * |error| error is the enumeration specifying the error.
84 [in] PP_Instance instance
,
85 [in] PP_Resource decoder
,
86 [in] PP_VideoDecodeError_Dev error
);