summaryrefslogtreecommitdiffstats
path: root/media/libstagefright
diff options
context:
space:
mode:
authorKeith Mok <kmok@cyngn.com>2016-04-15 10:24:22 -0700
committerKeith Mok <kmok@cyngn.com>2016-04-15 11:46:56 -0700
commitc38d4f266ee016950bff2e08a8987e84f1d6461e (patch)
tree6cc98960d666dc6872a3a2004fb05d2a9ba201bc /media/libstagefright
parent5153cdc35e816a2224da1dac0e4d316bf847473d (diff)
downloadframeworks_av-c38d4f266ee016950bff2e08a8987e84f1d6461e.zip
frameworks_av-c38d4f266ee016950bff2e08a8987e84f1d6461e.tar.gz
frameworks_av-c38d4f266ee016950bff2e08a8987e84f1d6461e.tar.bz2
frameworks/av: Fix video recording breaks
Change Id0af9c8aed1a983095275ac03f7f59abc31594cc using boot time for video recording start time as default, but it is specific on devices using qcom camera HAL3 and it breaks all devices using camera HAL1. Fix by changing the default behaviour when property media.camera.ts.monotonic is not set. And newer devices such as 8996 might need to setprop media.camera.ts.monotonic 0 in order to work properly when using camera HAL3. Change-Id: Iee07ed1147713a6397fff43e3bbd4f4ed08b56b7
Diffstat (limited to 'media/libstagefright')
-rw-r--r--media/libstagefright/CameraSource.cpp9
-rw-r--r--media/libstagefright/MediaCodecSource.cpp9
2 files changed, 8 insertions, 10 deletions
diff --git a/media/libstagefright/CameraSource.cpp b/media/libstagefright/CameraSource.cpp
index 64e7f90..1f26872 100644
--- a/media/libstagefright/CameraSource.cpp
+++ b/media/libstagefright/CameraSource.cpp
@@ -702,11 +702,10 @@ status_t CameraSource::start(MetaData *meta) {
if (meta) {
int64_t startTimeUs;
- auto key = kKeyTimeBoot;
- char value[PROPERTY_VALUE_MAX];
- if (property_get("media.camera.ts.monotonic", value, "0") &&
- atoi(value)) {
- key = kKeyTime;
+ auto key = kKeyTime;
+ if (property_get_bool("persist.camera.HAL3.enabled", true) &&
+ !property_get_bool("media.camera.ts.monotonic", true)) {
+ key = kKeyTimeBoot;
}
if (meta->findInt64(key, &startTimeUs)) {
diff --git a/media/libstagefright/MediaCodecSource.cpp b/media/libstagefright/MediaCodecSource.cpp
index b15ee64..94427ef 100644
--- a/media/libstagefright/MediaCodecSource.cpp
+++ b/media/libstagefright/MediaCodecSource.cpp
@@ -664,11 +664,10 @@ status_t MediaCodecSource::onStart(MetaData *params) {
status_t err = OK;
if (mFlags & FLAG_USE_SURFACE_INPUT) {
- auto key = kKeyTimeBoot;
- char value[PROPERTY_VALUE_MAX];
- if (property_get("media.camera.ts.monotonic", value, "0") &&
- atoi(value)) {
- key = kKeyTime;
+ auto key = kKeyTime;
+ if (property_get_bool("persist.camera.HAL3.enabled", true) &&
+ !property_get_bool("media.camera.ts.monotonic", true)) {
+ key = kKeyTimeBoot;
}
int64_t startTimeUs;