Chromium Code Reviews| Index: ppapi/api/pp_media_codec.idl |
| diff --git a/ppapi/api/pp_media_codec.idl b/ppapi/api/pp_media_codec.idl |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..63d940600d880ebc7971f79965bc63223244bf3d |
| --- /dev/null |
| +++ b/ppapi/api/pp_media_codec.idl |
| @@ -0,0 +1,79 @@ |
| +/* Copyright (c) 2014 The Chromium Authors. All rights reserved. |
| + * Use of this source code is governed by a BSD-style license that can be |
| + * found in the LICENSE file. |
| + */ |
| + |
| +/** |
| + * Video decoder profiles. |
| + */ |
| +enum PP_MediaCodec_Profile { |
|
Ami GONE FROM CHROMIUM
2014/04/09 22:12:41
"MediaCodec" implies to me these values would matc
bbudge
2014/04/11 17:15:16
I'm open to naming suggestions :)
I'm using MediaC
|
| + PP_MEDIACODEC_H264PROFILE_BASELINE = 0, |
| + PP_MEDIACODEC_H264PROFILE_MAIN = 1, |
| + PP_MEDIACODEC_H264PROFILE_EXTENDED = 2, |
| + PP_MEDIACODEC_H264PROFILE_HIGH = 3, |
| + PP_MEDIACODEC_H264PROFILE_HIGH10PROFILE = 4, |
| + PP_MEDIACODEC_H264PROFILE_HIGH422PROFILE = 5, |
| + PP_MEDIACODEC_H264PROFILE_HIGH444PREDICTIVEPROFILE = 6, |
| + PP_MEDIACODEC_H264PROFILE_SCALABLEBASELINE = 7, |
| + PP_MEDIACODEC_H264PROFILE_SCALABLEHIGH = 8, |
| + PP_MEDIACODEC_H264PROFILE_STEREOHIGH = 9, |
| + PP_MEDIACODEC_H264PROFILE_MULTIVIEWHIGH = 10, |
| + PP_MEDIACODEC_VP8PROFILE_MAIN = 11, |
| + PP_MEDIACODEC_VP9PROFILE_MAIN = 12, |
| + PP_MEDIACODEC_PROFILE_MAX = PP_MEDIACODEC_VP9PROFILE_MAIN |
| +}; |
| + |
| +/** |
| + * Struct describing a video bitstream buffer. This struct is read-only and |
| + * should not be modified by the plugin. |
|
dmichael (off chromium)
2014/04/09 21:54:07
So this comment only refers to the struct, but the
bbudge
2014/04/11 17:15:16
Eliminated this struct.
|
| + */ |
| +struct PP_MediaCodec_BitstreamBuffer { |
| + /** |
| + * Buffer id. This can be used by the plugin to match bitstream buffers sent |
| + * to the decoder with picture buffers received from the decoder. |
| + */ |
| + int32_t buffer_id; |
| + |
| + /** |
| + * Size of buffer in bytes. |
| + */ |
| + uint32_t size; |
| + |
| + /** |
| + * Pointer to buffer data. The plugin can safely write to the address range |
| + * [addr, addr + size - 1]. |
| + */ |
| + mem_t addr; |
| +}; |
| + |
| +/** |
| + * Struct describing a decoded video picture. The decoded picture data from the |
| + * bitstream buffer corresponding to |buffer_id| is stored in the GL texture |
| + * corresponding to |texture_id|. This struct is read-only and should not be |
| + * modified by the plugin. |
| + */ |
| +struct PP_MediaCodec_PictureBuffer { |
| + /** |
| + * Identifier of the last bitstream buffer which decoded into this picture. |
| + */ |
| + int32_t buffer_id; |
| + |
| + /** |
| + * Texture ID in the plugin's GL context. The plugin can use this to render |
| + * the decoded picture. |
| + */ |
| + uint32_t texture_id; |
| + |
| + /** |
| + * The type of GL texture used to hold the decoded picture. The possible |
| + * values are: |
| + * GL_TEXTURE_2D |
| + * GL_TEXTURE_RECTANGLE_ARB |
| + */ |
| + uint32_t texture_target; |
| + |
| + /** |
| + * Dimensions of the texture holding the decoded picture. |
|
Ami GONE FROM CHROMIUM
2014/04/09 22:12:41
Elsewhere (cf. media::VideoFrame) it's been import
bbudge
2014/04/11 17:15:16
I'm not sure where that information would come fro
|
| + */ |
| + PP_Size texture_size; |
| +}; |