summaryrefslogtreecommitdiffstats
path: root/media/libstagefright/OMXCodec.cpp
diff options
context:
space:
mode:
authorAndreas Huber <andih@google.com>2010-03-19 11:43:15 -0700
committerAndreas Huber <andih@google.com>2010-04-09 13:47:58 -0700
commit03b268eac37ca2589bfff0bf58daf79d29cc14f4 (patch)
treedfb5d0de728a4faa531efc77e66093b48e4ac4f9 /media/libstagefright/OMXCodec.cpp
parentfe774a9c3ffe12979e182563b0e922ffc0ad20ef (diff)
downloadframeworks_av-03b268eac37ca2589bfff0bf58daf79d29cc14f4.zip
frameworks_av-03b268eac37ca2589bfff0bf58daf79d29cc14f4.tar.gz
frameworks_av-03b268eac37ca2589bfff0bf58daf79d29cc14f4.tar.bz2
Various fixes to enable recording on passion and nexus1.
Change-Id: I75a461c9882e2449082ad754ee7b231c1ceec039
Diffstat (limited to 'media/libstagefright/OMXCodec.cpp')
-rw-r--r--media/libstagefright/OMXCodec.cpp14
1 files changed, 12 insertions, 2 deletions
diff --git a/media/libstagefright/OMXCodec.cpp b/media/libstagefright/OMXCodec.cpp
index 6037088..41ce2397 100644
--- a/media/libstagefright/OMXCodec.cpp
+++ b/media/libstagefright/OMXCodec.cpp
@@ -137,6 +137,7 @@ static const CodecInfo kEncoderInfo[] = {
{ MEDIA_MIMETYPE_VIDEO_H263, "OMX.qcom.video.encoder.h263" },
{ MEDIA_MIMETYPE_VIDEO_H263, "OMX.TI.Video.encoder" },
{ MEDIA_MIMETYPE_VIDEO_H263, "OMX.PV.h263enc" },
+ { MEDIA_MIMETYPE_VIDEO_AVC, "OMX.qcom.video.encoder.avc" },
{ MEDIA_MIMETYPE_VIDEO_AVC, "OMX.TI.Video.encoder" },
{ MEDIA_MIMETYPE_VIDEO_AVC, "OMX.PV.avcenc" },
};
@@ -679,6 +680,7 @@ static size_t getFrameSize(
case OMX_COLOR_FormatCbYCrY:
return width * height * 2;
+ case OMX_COLOR_FormatYUV420Planar:
case OMX_COLOR_FormatYUV420SemiPlanar:
return (width * height * 3) / 2;
@@ -706,7 +708,7 @@ void OMXCodec::setVideoInputFormat(
OMX_COLOR_FORMATTYPE colorFormat = OMX_COLOR_FormatYUV420SemiPlanar;
if (!strcasecmp("OMX.TI.Video.encoder", mComponentName)) {
- colorFormat = OMX_COLOR_FormatYCbYCr;
+ colorFormat = OMX_COLOR_FormatYUV420Planar;
}
CHECK_EQ(setVideoPortFormatType(
@@ -764,6 +766,14 @@ void OMXCodec::setVideoInputFormat(
mNode, OMX_IndexParamPortDefinition, &def, sizeof(def));
CHECK_EQ(err, OK);
+ err = mOMX->getParameter(
+ mNode, OMX_IndexParamPortDefinition, &def, sizeof(def));
+ CHECK_EQ(err, OK);
+
+ err = mOMX->setParameter(
+ mNode, OMX_IndexParamPortDefinition, &def, sizeof(def));
+ CHECK_EQ(err, OK);
+
switch (compressionFormat) {
case OMX_VIDEO_CodingMPEG4:
{
@@ -911,7 +921,7 @@ status_t OMXCodec::setupAVCEncoderParameters() {
CHECK_EQ(err, OK);
bitrateType.eControlRate = OMX_Video_ControlRateVariable;
- bitrateType.nTargetBitrate = 1000000;
+ bitrateType.nTargetBitrate = 3000000;
err = mOMX->setParameter(
mNode, OMX_IndexParamVideoBitrate,