summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJames Dong <jdong@google.com>2012-05-07 15:06:09 -0700
committerAndroid (Google) Code Review <android-gerrit@google.com>2012-05-07 15:06:09 -0700
commit3e0f56df1a22b76f59d85699d0cc78c37ddd37c5 (patch)
tree78b73ceb6dbed3b425f1ac76924e36f04a5ae936
parente51770946feca174d2d65811f773dcfc3d66ad3b (diff)
parent7c25df82dfc8bbedb58608242f0d923a4594bb14 (diff)
downloadframeworks_av-3e0f56df1a22b76f59d85699d0cc78c37ddd37c5.zip
frameworks_av-3e0f56df1a22b76f59d85699d0cc78c37ddd37c5.tar.gz
frameworks_av-3e0f56df1a22b76f59d85699d0cc78c37ddd37c5.tar.bz2
Merge "Get rid of vendor specific video encoder component names from ACodec and OMXCodec" into jb-dev
-rw-r--r--media/libstagefright/ACodec.cpp8
-rwxr-xr-xmedia/libstagefright/OMXCodec.cpp11
2 files changed, 7 insertions, 12 deletions
diff --git a/media/libstagefright/ACodec.cpp b/media/libstagefright/ACodec.cpp
index 7d99064..1e00c5d 100644
--- a/media/libstagefright/ACodec.cpp
+++ b/media/libstagefright/ACodec.cpp
@@ -1715,7 +1715,9 @@ status_t ACodec::setupAVCEncoderParameters(const sp<AMessage> &msg) {
}
// XXX
- if (!strncmp(mComponentName.c_str(), "OMX.TI.DUCATI1", 14)) {
+ if (h264type.eProfile != OMX_VIDEO_AVCProfileBaseline) {
+ ALOGW("Use baseline profile instead of %d for AVC recording",
+ h264type.eProfile);
h264type.eProfile = OMX_VIDEO_AVCProfileBaseline;
}
@@ -1750,10 +1752,6 @@ status_t ACodec::setupAVCEncoderParameters(const sp<AMessage> &msg) {
h264type.bMBAFF = OMX_FALSE;
h264type.eLoopFilterMode = OMX_VIDEO_AVCLoopFilterEnable;
- if (!strcasecmp("OMX.Nvidia.h264.encoder", mComponentName.c_str())) {
- h264type.eLevel = OMX_VIDEO_AVCLevelMax;
- }
-
err = mOMX->setParameter(
mNode, OMX_IndexParamVideoAvc, &h264type, sizeof(h264type));
diff --git a/media/libstagefright/OMXCodec.cpp b/media/libstagefright/OMXCodec.cpp
index 56016a8..604d0e0 100755
--- a/media/libstagefright/OMXCodec.cpp
+++ b/media/libstagefright/OMXCodec.cpp
@@ -1123,9 +1123,10 @@ status_t OMXCodec::setupAVCEncoderParameters(const sp<MetaData>& meta) {
h264type.eProfile = static_cast<OMX_VIDEO_AVCPROFILETYPE>(profileLevel.mProfile);
h264type.eLevel = static_cast<OMX_VIDEO_AVCLEVELTYPE>(profileLevel.mLevel);
- // FIXME:
- // Remove the workaround after the work in done.
- if (!strncmp(mComponentName, "OMX.TI.DUCATI1", 14)) {
+ // XXX
+ if (h264type.eProfile != OMX_VIDEO_AVCProfileBaseline) {
+ ALOGW("Use baseline profile instead of %d for AVC recording",
+ h264type.eProfile);
h264type.eProfile = OMX_VIDEO_AVCProfileBaseline;
}
@@ -1160,10 +1161,6 @@ status_t OMXCodec::setupAVCEncoderParameters(const sp<MetaData>& meta) {
h264type.bMBAFF = OMX_FALSE;
h264type.eLoopFilterMode = OMX_VIDEO_AVCLoopFilterEnable;
- if (!strcasecmp("OMX.Nvidia.h264.encoder", mComponentName)) {
- h264type.eLevel = OMX_VIDEO_AVCLevelMax;
- }
-
err = mOMX->setParameter(
mNode, OMX_IndexParamVideoAvc, &h264type, sizeof(h264type));
CHECK_EQ(err, (status_t)OK);