MediaCodec: recognize KEY_CAPTURE_RATE

Bug: 140363871
Test: manual
Change-Id: Idc25d048f792ad214497baf60950a73821f14148
gugelfrei
Wonsik Kim 5 years ago
parent b34e4ac722
commit 447eaf16ad

@ -814,9 +814,17 @@ void CCodec::configure(const sp<AMessage> &msg) {
}
{
double value;
if (msg->findDouble("time-lapse-fps", &value)) {
config->mISConfig->mCaptureFps = value;
bool captureFpsFound = false;
double timeLapseFps;
float captureRate;
if (msg->findDouble("time-lapse-fps", &timeLapseFps)) {
config->mISConfig->mCaptureFps = timeLapseFps;
captureFpsFound = true;
} else if (msg->findAsFloat(KEY_CAPTURE_RATE, &captureRate)) {
config->mISConfig->mCaptureFps = captureRate;
captureFpsFound = true;
}
if (captureFpsFound) {
(void)msg->findAsFloat(KEY_FRAME_RATE, &config->mISConfig->mCodedFps);
}
}

@ -1844,7 +1844,12 @@ status_t ACodec::configureCodec(
}
if (!msg->findDouble("time-lapse-fps", &mCaptureFps)) {
mCaptureFps = -1.0;
float captureRate;
if (msg->findAsFloat(KEY_CAPTURE_RATE, &captureRate)) {
mCaptureFps = captureRate;
} else {
mCaptureFps = -1.0;
}
}
if (!msg->findInt32(

Loading…
Cancel
Save