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 * NOTE: these must be kept in sync with the versions in media/!
14 * Keep the values in this enum unique, as they imply format (h.264 vs. VP8,
15 * for example), and keep the values for a particular format grouped together
17 * Note: Keep these in sync with media::VideoCodecProfile.
20 enum PP_VideoDecoder_Profile
{
21 PP_VIDEODECODER_PROFILE_UNKNOWN
= -1,
22 PP_VIDEODECODER_H264PROFILE_NONE
= 0,
23 PP_VIDEODECODER_H264PROFILE_BASELINE
= 1,
24 PP_VIDEODECODER_H264PROFILE_MAIN
= 2,
25 PP_VIDEODECODER_H264PROFILE_EXTENDED
= 3,
26 PP_VIDEODECODER_H264PROFILE_HIGH
= 4,
27 PP_VIDEODECODER_H264PROFILE_HIGH10PROFILE
= 5,
28 PP_VIDEODECODER_H264PROFILE_HIGH422PROFILE
= 6,
29 PP_VIDEODECODER_H264PROFILE_HIGH444PREDICTIVEPROFILE
= 7,
30 PP_VIDEODECODER_H264PROFILE_SCALABLEBASELINE
= 8,
31 PP_VIDEODECODER_H264PROFILE_SCALABLEHIGH
= 9,
32 PP_VIDEODECODER_H264PROFILE_STEREOHIGH
= 10,
33 PP_VIDEODECODER_H264PROFILE_MULTIVIEWHIGH
= 11,
34 PP_VIDEODECODER_VP8PROFILE_MAIN
= 12
38 * The data structure for video bitstream buffer.
41 struct PP_VideoBitstreamBuffer_Dev
{
43 * Client-specified identifier for the bitstream buffer. Valid values are
49 * Buffer to hold the bitstream data. Should be allocated using the
50 * PPB_Buffer interface for consistent interprocess behaviour.
55 * Size of the bitstream contained in buffer (in bytes).
61 * Struct for specifying texture-backed picture data.
64 struct PP_PictureBuffer_Dev
{
66 * Client-specified id for the picture buffer. By using this value client can
67 * keep track of the buffers it has assigned to the video decoder and how they
68 * are passed back to it. Valid values are non-negative.
73 * Dimensions of the buffer.
78 * Texture ID in the given context where picture is stored.
84 * Structure to describe a decoded output frame.
87 struct PP_Picture_Dev
{
89 * ID of the picture buffer where the picture is stored.
91 int32_t picture_buffer_id
;
94 * ID of the bitstream from which this data was decoded.
96 int32_t bitstream_buffer_id
;
100 * Decoder error codes reported to the plugin. A reasonable naive
101 * error handling policy is for the plugin to Destroy() the decoder on error.
104 enum PP_VideoDecodeError_Dev
{
106 * An operation was attempted during an incompatible decoder state.
108 PP_VIDEODECODERERROR_ILLEGAL_STATE
= 1,
111 * Invalid argument was passed to an API method.
113 PP_VIDEODECODERERROR_INVALID_ARGUMENT
= 2,
116 * Encoded input is unreadable.
118 PP_VIDEODECODERERROR_UNREADABLE_INPUT
= 3,
121 * A failure occurred at the browser layer or lower. Examples of such
122 * failures include GPU hardware failures, GPU driver failures, GPU library
123 * failures, browser programming errors, and so on.
125 PP_VIDEODECODERERROR_PLATFORM_FAILURE
= 4