What would be the best way to calculate the decode time of a frame decoded by mediacodec? the execution time of the code below is clearly not the correct time. Is there any way to know how long each frame/frames took to decode?
Thanks.
startTime...
dequeueInputBuffer();
getInputBuffer();
// copy frame to input buffer
queueInputBuffer();
dequeueOutputBuffer();
releaseOutputBuffer();
stopTime...
exectime = startTime - StopTime