Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions amf/public/samples/CPPSamples/SimpleDecoder/SimpleDecoder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,8 @@ int main(int argc, char* argv[])
bool bNeedNewInput = true;
//amf_int32 submitted = 0;

amf_pts processStartTime = amf_high_precision_clock();

while(submitted < frameCount || frameCount < 0)
{
if(bNeedNewInput)
Expand Down Expand Up @@ -208,6 +210,14 @@ int main(int argc, char* argv[])
res = decoder->Drain();
thread.WaitForStop();

amf_pts processEndTime = amf_high_precision_clock();

auto duration = processEndTime - processStartTime;
double totalSecs = (double(duration) / MILLISEC_TIME) / 1000.0;
printf("total time = %g secs\n", totalSecs);
printf("frames submitted = %d\n", submitted);
printf("FPS = %g\n", double(submitted) / totalSecs);

// cleanup in this order
data = NULL;
decoder->Terminate();
Expand Down