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

Unified Diff: ppapi/c/dev/pp_video_dev.h

Issue 6901036: Update VideoDecode PPAPI structs to be consistent with media structures, part 1 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 8 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 side-by-side diff with in-line comments
Download patch
Index: ppapi/c/dev/pp_video_dev.h
diff --git a/ppapi/c/dev/pp_video_dev.h b/ppapi/c/dev/pp_video_dev.h
index 50ad226de6ff4e16efd21bf245dde1c6c55cd1d5..176916b9053f5988c1f82bc74721a34521980cf8 100644
--- a/ppapi/c/dev/pp_video_dev.h
+++ b/ppapi/c/dev/pp_video_dev.h
@@ -270,46 +270,52 @@ struct PP_VideoBitstreamBuffer_Dev {
// Size of the bitstream contained in buffer (in bytes).
int32_t bitstream_size;
- // Optional pointer for application to associate information with a sample.
- // The pointer will be associated with the resulting decoded picture.
- // Typically applications associate timestamps with buffers.
+ // Handle to identify the bitstream buffer.
void* user_handle;
-
- // TODO(vmr): Add information about access unit boundaries.
};
-// Union for specifying picture data.
-union PP_PictureData_Dev {
- // Resource representing system memory from shared memory address space.
- // Use PPB_Buffer_Dev interface to handle this resource.
- PP_Resource sysmem;
- // Structure to define explicitly a GLES2 context.
- struct {
- // Context allocated using PPB_Context3D_Dev.
- PP_Resource context;
- // Texture ID in the given context where picture is stored.
- GLuint texture_id;
- } gles2_texture;
- // Client-specified id for the picture buffer. By using this value client can
- // keep track of the buffers it has assigned to the video decoder and how they
- // are passed back to it.
+// Struct for specifiying picture buffers.
+struct PP_PictureBuffer_Dev {
+ // Client-specified id for the picture buffer.
int32_t id;
+
+ union {
+ // Resource representing system memory from shared memory address space.
+ // Use PPB_Buffer_Dev interface to handle this resource.
+ PP_Resource sysmem;
+ // Structure to define explicitly a GLES2 context.
+ struct {
+ // Context allocated using PPB_Context3D_Dev.
+ PP_Resource context;
+ // Texture ID in the given context where picture is stored.
+ GLuint texture_id;
+ } gles2_texture;
+ } storage;
+
+ PP_PictureBufferType_Dev storage_type;
+
+ // Pixel width and height of the buffer.
+ uint32_t width;
Ami GONE FROM CHROMIUM 2011/04/26 23:01:57 WDYT, worth using PP_Size?
vrk (LEFT CHROMIUM) 2011/04/27 00:40:33 Good catch! Yes, I think so. I changed this and th
+ uint32_t height;
};
// Structure to describe the decoded output picture for the plug-in along with
// optional metadata associated with the picture.
struct PP_Picture_Dev {
- // Resource that represents the buffer where the picture data is stored.
- // Actual implementation style of the picture buffer may be OpenGL ES texture
- // (allocated using PPB_OpenGLES2_Dev) or system memory (allocated using
- // PPB_Buffer_Dev).
- union PP_PictureData_Dev picture_data;
+ // ID for the picture buffer where the picture is stored.
+ int32_t picture_buffer_id;
- // Optional pointer to associated metadata with the picture. Typical
- // information carried over metadata includes timestamps. If there is
- // multiple NAL units each with their own respective metadata, only the
- // metadata from the latest call to Decode will be carried over.
- void* user_handle;
+ // Handle to identify the bitstream buffer from which this picture was
+ // decoded.
+ void* bitstream_user_handle;
+
+ // Visible width and height of the picture.
+ uint32_t visible_width;
+ uint32_t visible_height;
+
+ // Decoded width and height of the picture.
+ uint32_t decoded_width;
+ uint32_t decoded_height;
};
// Enumeration for error events that may be reported through

Powered by Google App Engine
This is Rietveld 408576698