OSDN Git Service

media: add kMetadataBufferTypeGraphicBuffer
authorLajos Molnar <lajos@google.com>
Tue, 14 Oct 2014 05:56:09 +0000 (22:56 -0700)
committerLajos Molnar <lajos@google.com>
Tue, 14 Oct 2014 05:58:03 +0000 (22:58 -0700)
Bug: 17935149
Change-Id: I1c26d1e83d8fa0a9ccdb25f6f3b19a86b1dc6f37

include/media/hardware/MetadataBufferType.h

index 4eaf8ac..5876c40 100644 (file)
@@ -82,6 +82,24 @@ typedef enum {
      */
     kMetadataBufferTypeGrallocSource = 1,
 
+    /*
+     * kMetadataBufferTypeGraphicBuffer is used to indicate that
+     * the payload of the metadata buffers can be interpreted as
+     * a GraphicBuffer.  It is only to be used by software encoders.
+     * In this case, the metadata that the encoder receives
+     * will have a byte stream that consists of two parts:
+     * 1. First, there is an integer indicating that the metadata
+     * contains a GraphicBuffer (kMetadataBufferTypeGraphicBuffer)
+     * 2. This is followed by the pointer to the GraphicBuffer that
+     * is to be encoded.  Encoder must not create a sp<> from this
+     * graphic buffer, or free it, as it does not actually own this
+     * buffer.
+     * --------------------------------------------------------------
+     * |  kMetadataBufferTypeGraphicBuffer | sizeof(GraphicBuffer *) |
+     * --------------------------------------------------------------
+     */
+    kMetadataBufferTypeGraphicBuffer = 2,
+
     // Add more here...
 
 } MetadataBufferType;