From c3f9ae128a303630c6afc8387d640c37d0e28c17 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stephan=20A=C3=9Fmus?= Date: Tue, 14 Sep 2010 20:15:10 +0000 Subject: [PATCH] Set the processing latency using the time it took to decode the last frame. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38653 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/apps/mediaplayer/supplier/ProxyVideoSupplier.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/apps/mediaplayer/supplier/ProxyVideoSupplier.cpp b/src/apps/mediaplayer/supplier/ProxyVideoSupplier.cpp index c2e834b255..eb2852f11d 100644 --- a/src/apps/mediaplayer/supplier/ProxyVideoSupplier.cpp +++ b/src/apps/mediaplayer/supplier/ProxyVideoSupplier.cpp @@ -37,6 +37,8 @@ status_t ProxyVideoSupplier::FillBuffer(int64 startFrame, void* buffer, const media_raw_video_format& format, bool& wasCached) { + bigtime_t now = system_time(); + BAutolock _(fSupplierLock); //printf("ProxyVideoSupplier::FillBuffer(%lld)\n", startFrame); if (fSupplier == NULL) @@ -100,6 +102,8 @@ ProxyVideoSupplier::FillBuffer(int64 startFrame, void* buffer, fCachedFrameValid = true; } + fProcessingLatency = system_time() - now; + return ret; }