summaryrefslogtreecommitdiffstats
path: root/media/libmedia/MediaProfiles.cpp
diff options
context:
space:
mode:
authorZhijun He <zhijunhe@google.com>2014-07-23 15:17:26 -0700
committerZhijun He <zhijunhe@google.com>2014-07-23 15:17:26 -0700
commite07909715b44cc56df723750af93f0608210f94d (patch)
treead5d9756f6b0fb560cd0f3adc6a0763c4e450966 /media/libmedia/MediaProfiles.cpp
parent5d76e1a639c1bae9ea7d9af1124abf1c94353344 (diff)
downloadframeworks_av-e07909715b44cc56df723750af93f0608210f94d.zip
frameworks_av-e07909715b44cc56df723750af93f0608210f94d.tar.gz
frameworks_av-e07909715b44cc56df723750af93f0608210f94d.tar.bz2
CamcorderProfiles: add high speed profile constants
Change-Id: I8f783466f8c2560820db14488acc1a309d27ab0f
Diffstat (limited to 'media/libmedia/MediaProfiles.cpp')
-rw-r--r--media/libmedia/MediaProfiles.cpp18
1 files changed, 16 insertions, 2 deletions
diff --git a/media/libmedia/MediaProfiles.cpp b/media/libmedia/MediaProfiles.cpp
index e9e453b..d2e181b 100644
--- a/media/libmedia/MediaProfiles.cpp
+++ b/media/libmedia/MediaProfiles.cpp
@@ -81,6 +81,12 @@ const MediaProfiles::NameToTagMap MediaProfiles::sCamcorderQualityNameMap[] = {
{"timelapse1080p", CAMCORDER_QUALITY_TIME_LAPSE_1080P},
{"timelapse2160p", CAMCORDER_QUALITY_TIME_LAPSE_2160P},
{"timelapseqvga", CAMCORDER_QUALITY_TIME_LAPSE_QVGA},
+
+ {"highspeedlow", CAMCORDER_QUALITY_HIGH_SPEED_LOW},
+ {"highspeedhigh", CAMCORDER_QUALITY_HIGH_SPEED_HIGH},
+ {"highspeed480p", CAMCORDER_QUALITY_HIGH_SPEED_480P},
+ {"highspeed720p", CAMCORDER_QUALITY_HIGH_SPEED_720P},
+ {"highspeed1080p", CAMCORDER_QUALITY_HIGH_SPEED_1080P},
};
#if LOG_NDEBUG
@@ -474,6 +480,11 @@ static bool isTimelapseProfile(camcorder_quality quality) {
quality <= CAMCORDER_QUALITY_TIME_LAPSE_LIST_END;
}
+static bool isHighSpeedProfile(camcorder_quality quality) {
+ return quality >= CAMCORDER_QUALITY_HIGH_SPEED_LIST_START &&
+ quality <= CAMCORDER_QUALITY_HIGH_SPEED_LIST_END;
+}
+
void MediaProfiles::initRequiredProfileRefs(const Vector<int>& cameraIds) {
ALOGV("Number of camera ids: %zu", cameraIds.size());
CHECK(cameraIds.size() > 0);
@@ -521,14 +532,17 @@ void MediaProfiles::checkAndAddRequiredProfilesIfNecessary() {
camcorder_quality refQuality;
VideoCodec *codec = NULL;
- // Check high and low from either camcorder profile or timelapse profile
- // but not both. Default, check camcorder profile
+ // Check high and low from either camcorder profile, timelapse profile
+ // or high speed profile, but not all of them. Default, check camcorder profile
size_t j = 0;
size_t o = 2;
if (isTimelapseProfile(quality)) {
// Check timelapse profile instead.
j = 2;
o = kNumRequiredProfiles;
+ } else if (isHighSpeedProfile(quality)) {
+ // Skip the check for high speed profile.
+ continue;
} else {
// Must be camcorder profile.
CHECK(isCamcorderProfile(quality));