summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorPannag Sanketi <psanketi@google.com>2011-07-25 15:00:16 -0700
committerAndroid (Google) Code Review <android-gerrit@google.com>2011-07-25 15:00:16 -0700
commitb283ac1ac6758aba907bfe56713d279e8aafd38b (patch)
tree457d913edc5336c480f46f7484c24536e5a9af4f /include
parent6e6e8a6cc9ab99ab299929fa0246e6ced64f8ce3 (diff)
parenta361483bb5dbd3bbf132c5b99b2df7d197c3fc50 (diff)
downloadframeworks_av-b283ac1ac6758aba907bfe56713d279e8aafd38b.zip
frameworks_av-b283ac1ac6758aba907bfe56713d279e8aafd38b.tar.gz
frameworks_av-b283ac1ac6758aba907bfe56713d279e8aafd38b.tar.bz2
Merge "Adding Metadata mode to SurfaceMediaSource"
Diffstat (limited to 'include')
-rw-r--r--include/media/stagefright/MetadataBufferType.h10
-rw-r--r--include/media/stagefright/SurfaceMediaSource.h6
2 files changed, 15 insertions, 1 deletions
diff --git a/include/media/stagefright/MetadataBufferType.h b/include/media/stagefright/MetadataBufferType.h
index 52a3257..4eaf8ac 100644
--- a/include/media/stagefright/MetadataBufferType.h
+++ b/include/media/stagefright/MetadataBufferType.h
@@ -69,6 +69,16 @@ typedef enum {
* kMetadataBufferTypeGrallocSource is used to indicate that
* the payload of the metadata buffers can be interpreted as
* a buffer_handle_t.
+ * So 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 it is a GRAlloc
+ * source (kMetadataBufferTypeGrallocSource)
+ * 2. This is followed by the buffer_handle_t that is a handle to the
+ * GRalloc buffer. The encoder needs to interpret this GRalloc handle
+ * and encode the frames.
+ * --------------------------------------------------------------
+ * | kMetadataBufferTypeGrallocSource | sizeof(buffer_handle_t) |
+ * --------------------------------------------------------------
*/
kMetadataBufferTypeGrallocSource = 1,
diff --git a/include/media/stagefright/SurfaceMediaSource.h b/include/media/stagefright/SurfaceMediaSource.h
index 56bd9c3..fab258c 100644
--- a/include/media/stagefright/SurfaceMediaSource.h
+++ b/include/media/stagefright/SurfaceMediaSource.h
@@ -63,6 +63,10 @@ public:
MediaBuffer **buffer, const ReadOptions *options = NULL);
virtual sp<MetaData> getFormat();
+ // Pass the metadata over to the buffer, call when you have the lock
+ void passMetadataBufferLocked(MediaBuffer **buffer);
+ bool checkBufferMatchesSlot(int slot, MediaBuffer *buffer);
+
// Get / Set the frame rate used for encoding. Default fps = 30
status_t setFrameRate(int32_t fps) ;
int32_t getFrameRate( ) const;
@@ -152,7 +156,7 @@ public:
status_t setBufferCountServer(int bufferCount);
// getTimestamp retrieves the timestamp associated with the image
- // set by the most recent call to updateFrameInfoLocked().
+ // set by the most recent call to read()
//
// The timestamp is in nanoseconds, and is monotonically increasing. Its
// other semantics (zero point, etc) are source-dependent and should be