summaryrefslogtreecommitdiffstats
path: root/media/libstagefright
diff options
context:
space:
mode:
authorJames Dong <jdong@google.com>2010-09-15 14:51:57 -0700
committerAndroid (Google) Code Review <android-gerrit@google.com>2010-09-15 14:51:57 -0700
commitd79091075e470f5c59a5400027fd41f6c9ea848a (patch)
tree786691f071065b535fcaaaa535a9eb57599bddae /media/libstagefright
parente78d3bba024e979715383e2c2b4b086749508090 (diff)
parenta1abc1a76741914c7bc43f1df9e32744f023ab75 (diff)
downloadframeworks_av-d79091075e470f5c59a5400027fd41f6c9ea848a.zip
frameworks_av-d79091075e470f5c59a5400027fd41f6c9ea848a.tar.gz
frameworks_av-d79091075e470f5c59a5400027fd41f6c9ea848a.tar.bz2
Merge "Add some explicit error log messages" into gingerbread
Diffstat (limited to 'media/libstagefright')
-rw-r--r--media/libstagefright/CameraSource.cpp3
-rw-r--r--media/libstagefright/MPEG4Writer.cpp10
-rw-r--r--media/libstagefright/OMXCodec.cpp5
3 files changed, 11 insertions, 7 deletions
diff --git a/media/libstagefright/CameraSource.cpp b/media/libstagefright/CameraSource.cpp
index 3e31d61..89cb135 100644
--- a/media/libstagefright/CameraSource.cpp
+++ b/media/libstagefright/CameraSource.cpp
@@ -93,6 +93,9 @@ static int32_t getColorFormat(const char* colorFormat) {
return OMX_COLOR_Format16bitRGB565;
}
+ LOGE("Uknown color format (%s), please add it to "
+ "CameraSource::getColorFormat", colorFormat);
+
CHECK_EQ(0, "Unknown color format");
}
diff --git a/media/libstagefright/MPEG4Writer.cpp b/media/libstagefright/MPEG4Writer.cpp
index de4233d..f0d8943 100644
--- a/media/libstagefright/MPEG4Writer.cpp
+++ b/media/libstagefright/MPEG4Writer.cpp
@@ -1675,9 +1675,9 @@ status_t MPEG4Writer::Track::threadEntry() {
}
- if (mSampleSizes.empty()) {
- err = ERROR_MALFORMED;
- } else if (OK != checkCodecSpecificData()) {
+ if (mSampleSizes.empty() || // no samples written
+ (!mIsAudio && mNumStssTableEntries == 0) || // no sync frames for video
+ (OK != checkCodecSpecificData())) { // no codec specific data
err = ERROR_MALFORMED;
}
mOwner->trackProgressStatus(this, -1, err);
@@ -1794,13 +1794,13 @@ status_t MPEG4Writer::Track::checkCodecSpecificData() const {
!strcasecmp(MEDIA_MIMETYPE_VIDEO_AVC, mime)) {
if (!mCodecSpecificData ||
mCodecSpecificDataSize <= 0) {
- // Missing codec specific data
+ LOGE("Missing codec specific data");
return ERROR_MALFORMED;
}
} else {
if (mCodecSpecificData ||
mCodecSpecificDataSize > 0) {
- // Unexepected codec specific data found
+ LOGE("Unexepected codec specific data found");
return ERROR_MALFORMED;
}
}
diff --git a/media/libstagefright/OMXCodec.cpp b/media/libstagefright/OMXCodec.cpp
index 165cec9..fd23b61 100644
--- a/media/libstagefright/OMXCodec.cpp
+++ b/media/libstagefright/OMXCodec.cpp
@@ -811,8 +811,7 @@ status_t OMXCodec::isColorFormatSupported(
if (OMX_ErrorNone != mOMX->getParameter(
mNode, OMX_IndexParamVideoPortFormat,
&portFormat, sizeof(portFormat))) {
-
- return UNKNOWN_ERROR;
+ break;
}
// Make sure that omx component does not overwrite
// the incremented index (bug 2897413).
@@ -832,6 +831,8 @@ status_t OMXCodec::isColorFormatSupported(
break;
}
}
+
+ LOGE("color format %d is not supported", colorFormat);
return UNKNOWN_ERROR;
}