summaryrefslogtreecommitdiffstats
path: root/media/libstagefright/MPEG4Extractor.cpp
diff options
context:
space:
mode:
authorJames Dong <jdong@google.com>2011-02-11 15:21:45 -0800
committerJames Dong <jdong@google.com>2011-02-11 15:25:03 -0800
commit244ba87d20aeb29c9cad727820fa1e803ec3643c (patch)
treec09f421ad1b0123b9de0c221b52e1d210ce89a11 /media/libstagefright/MPEG4Extractor.cpp
parent727a6f859841a1d421b680f56d4d4ca5ff8c6e4b (diff)
downloadframeworks_av-244ba87d20aeb29c9cad727820fa1e803ec3643c.zip
frameworks_av-244ba87d20aeb29c9cad727820fa1e803ec3643c.tar.gz
frameworks_av-244ba87d20aeb29c9cad727820fa1e803ec3643c.tar.bz2
Make available h263 DSI information from MPEG4Extractor
bug - 3446863 Change-Id: Idbaf7a564d544784fdbc36ed0339c98a519adc88
Diffstat (limited to 'media/libstagefright/MPEG4Extractor.cpp')
-rw-r--r--media/libstagefright/MPEG4Extractor.cpp24
1 files changed, 24 insertions, 0 deletions
diff --git a/media/libstagefright/MPEG4Extractor.cpp b/media/libstagefright/MPEG4Extractor.cpp
index 108a1d1..a973d7e 100644
--- a/media/libstagefright/MPEG4Extractor.cpp
+++ b/media/libstagefright/MPEG4Extractor.cpp
@@ -1164,6 +1164,30 @@ status_t MPEG4Extractor::parseChunk(off64_t *offset, int depth) {
break;
}
+ case FOURCC('d', '2', '6', '3'):
+ {
+ // d263 contains fixed 7 bytes:
+ // vendor - 4 bytes
+ // version - 1 byte
+ // level - 1 byte
+ // profile - 1 byte
+ char buffer[7];
+ if (chunk_data_size != (off64_t) sizeof(buffer)) {
+ LOGE("Incorrect D263 box size %lld", chunk_data_size);
+ return ERROR_MALFORMED;
+ }
+
+ if (mDataSource->readAt(
+ data_offset, buffer, chunk_data_size) < chunk_data_size) {
+ return ERROR_IO;
+ }
+
+ mLastTrack->meta->setData(kKeyD263, kTypeD263, buffer, chunk_data_size);
+
+ *offset += chunk_size;
+ break;
+ }
+
case FOURCC('m', 'e', 't', 'a'):
{
uint8_t buffer[4];