diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2015-08-18 08:22:16 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2015-08-18 08:22:16 +0200 |
commit | 26821b7e2eff4a7db22606f70daa3f3d442f7525 (patch) | |
tree | a4a200aae77034d7e5d61dc914ca5c3a85b6c0d8 /avmedia | |
parent | 6b7c23b3fb6175c04fcc3f1e12b34bedf5f4e5f8 (diff) |
tdf#84323: Make osl::Condition::wait more readable
Change-Id: Icd66ae1d390100549f903d45b2896cdcdca449be
Diffstat (limited to 'avmedia')
-rw-r--r-- | avmedia/source/gstreamer/gstplayer.cxx | 4 | ||||
-rw-r--r-- | avmedia/source/vlc/vlcframegrabber.cxx | 5 |
2 files changed, 4 insertions, 5 deletions
diff --git a/avmedia/source/gstreamer/gstplayer.cxx b/avmedia/source/gstreamer/gstplayer.cxx index eb64d1d870d6..42828335819b 100644 --- a/avmedia/source/gstreamer/gstplayer.cxx +++ b/avmedia/source/gstreamer/gstplayer.cxx @@ -21,6 +21,7 @@ #include <algorithm> #include <cassert> +#include <chrono> #include <cstddef> #include <cstring> #include <map> @@ -854,11 +855,10 @@ awt::Size SAL_CALL Player::getPreferredPlayerWindowSize() DBG( "%p pre-Player::getPreferredPlayerWindowSize, member %d x %d", this, mnWidth, mnHeight ); - TimeValue aTimeout = { 10, 0 }; #if OSL_DEBUG_LEVEL > 2 osl::Condition::Result aResult = #endif - maSizeCondition.wait( &aTimeout ); + maSizeCondition.wait( std::chrono::seconds(10) ); DBG( "%p Player::getPreferredPlayerWindowSize after waitCondition %d, member %d x %d", this, aResult, mnWidth, mnHeight ); diff --git a/avmedia/source/vlc/vlcframegrabber.cxx b/avmedia/source/vlc/vlcframegrabber.cxx index 9783349f81e6..bb100c290af9 100644 --- a/avmedia/source/vlc/vlcframegrabber.cxx +++ b/avmedia/source/vlc/vlcframegrabber.cxx @@ -18,6 +18,7 @@ */ #include <boost/bind.hpp> +#include <chrono> #include <iostream> #include <osl/conditn.hxx> #include <vcl/graph.hxx> @@ -85,9 +86,7 @@ VLCFrameGrabber::VLCFrameGrabber( wrapper::EventHandler& eh, const rtl::OUString mPlayer.setTime( ( fMediaTime > 0 ? fMediaTime : 0 ) * MSEC_IN_SEC ); mPlayer.pause(); - const TimeValue timeout = {2, 0}; - - condition.wait(&timeout); + condition.wait(std::chrono::seconds(2)); if ( !mPlayer.hasVout() ) { |