summaryrefslogtreecommitdiffstats
path: root/media
diff options
context:
space:
mode:
authorAndreas Huber <andih@google.com>2012-04-11 11:52:03 -0700
committerAndreas Huber <andih@google.com>2012-04-11 12:46:12 -0700
commitf4b7d94062c896dca565d849c6188cd3489be257 (patch)
treeb3bc6b1b2bc3641417e018a3235d144b1f8b285b /media
parentb3eb2b7e0ad11bc03344e10cc5204bdb71f0686e (diff)
downloadframeworks_av-f4b7d94062c896dca565d849c6188cd3489be257.zip
frameworks_av-f4b7d94062c896dca565d849c6188cd3489be257.tar.gz
frameworks_av-f4b7d94062c896dca565d849c6188cd3489be257.tar.bz2
Better error logging during meta data retrieval. Fixed the stagefright
commandline tool to open the file to extract thumbnails from itself since mediaserver may not have permission to open files. Change-Id: Iabe16b3248e9bb0f266b0866a8d2ccba2ab7d2a8 related-to-bug: 6321237
Diffstat (limited to 'media')
-rw-r--r--media/libstagefright/FileSource.cpp2
-rw-r--r--media/libstagefright/StagefrightMetadataRetriever.cpp3
2 files changed, 5 insertions, 0 deletions
diff --git a/media/libstagefright/FileSource.cpp b/media/libstagefright/FileSource.cpp
index 07ec265..a7ca3da 100644
--- a/media/libstagefright/FileSource.cpp
+++ b/media/libstagefright/FileSource.cpp
@@ -38,6 +38,8 @@ FileSource::FileSource(const char *filename)
if (mFd >= 0) {
mLength = lseek64(mFd, 0, SEEK_END);
+ } else {
+ ALOGE("Failed to open file '%s'. (%s)", filename, strerror(errno));
}
}
diff --git a/media/libstagefright/StagefrightMetadataRetriever.cpp b/media/libstagefright/StagefrightMetadataRetriever.cpp
index 35f9c1f..fee557d 100644
--- a/media/libstagefright/StagefrightMetadataRetriever.cpp
+++ b/media/libstagefright/StagefrightMetadataRetriever.cpp
@@ -61,12 +61,15 @@ status_t StagefrightMetadataRetriever::setDataSource(
mSource = DataSource::CreateFromURI(uri, headers);
if (mSource == NULL) {
+ ALOGE("Unable to create data source for '%s'.", uri);
return UNKNOWN_ERROR;
}
mExtractor = MediaExtractor::Create(mSource);
if (mExtractor == NULL) {
+ ALOGE("Unable to instantiate an extractor for '%s'.", uri);
+
mSource.clear();
return UNKNOWN_ERROR;