diff --git a/source/SubWindowHandle.h b/source/SubWindowHandle.h index 8a25db0..aa86c75 100644 --- a/source/SubWindowHandle.h +++ b/source/SubWindowHandle.h @@ -64,6 +64,11 @@ public: bool playEvent(); + InputStream* getInputStream() + { + return &m_currStream; + } + /** * Show the image at its original size */ diff --git a/source/plaYUVerApp.cpp b/source/plaYUVerApp.cpp index 61338ab..f4c1d96 100644 --- a/source/plaYUVerApp.cpp +++ b/source/plaYUVerApp.cpp @@ -132,8 +132,13 @@ void plaYUVerApp::save() void plaYUVerApp::play() { + UInt frameRate; + UInt timeInterval; - playingTimer->start( 200 ); + frameRate = activeImageInterface()->getInputStream()->getFrameRate(); + timeInterval = (UInt)( 1000.0/frameRate + 0.5 ); + + playingTimer->start( timeInterval ); }