I have downloaded qcom_video_codec_sample_1_3_1.zip and successfully run it on Korean Galaxy Note.
The problem that I meet is that I set the FPS but FPS is always 25 FPS.
I have checked it with ffmpeg and other programs. and I could see H.264 video source is 25 FPS set.
I used following codes to set FPS.
in setupPortParameters function,
OMX_PARAM_PORTDEFINITIONTYPE def;
if ((portIndex == 1) &&(frameRate > 0)) {
def.format.video.xFramerate = frameRate << 16;
}
I made setupVideoFrameRate function,
int QcomOmxInterfaceEncoder::setupVideoFrameRate(int frameRate) {
OMX_CONFIG_FRAMERATETYPE eFrameRate;
int err = _iomx->getConfig(_node, OMX_IndexConfigVideoFramerate, &eFrameRate, sizeof(eFrameRate));
if (err != OK) {
LOGD("QCOMOMXINTERFACE - frameRate CONTROL: ERROR getting config: %d", err);
return kQcomOmxInterfaceErrorCouldNotGetBitRateParameters;
}
//eFrameRate.nPortIndex = 1;
eFrameRate.xEncodeFramerate = frameRate<<16;
err = _iomx->setConfig(_node, OMX_IndexConfigVideoFramerate, &eFrameRate, sizeof(eFrameRate));
if (err != OK) {
LOGD("QCOMOMXINTERFACE -frameRate CONTROL: ERROR setting config: %d", err);
return kQcomOmxInterfaceErrorCouldNotSetBitRateParameters;
}
return kQcomOmxInterfaceErrorSuccess;
}
Am I missing something when FPS setting?
Are your logs showing that you're hitting the "ERROR getting config" or the "ERROR setting config" message? Is there any information in there? Sometimes this has to do with the order with which you're making the parameter setting calls, can you provide the info of the order you're setting all the config parameters and which are successful, which are failing?
When I set the parameters, I didn't see any logs related with ERROR. It seems it was set.
But, after encoding, I confirmed the encoded video(H.264) on MediaInfo. and it always shows (25FPS) even I set 10 FPS or 15 FPS.
Hi ,
Even we are facing same issue. Any clarification?