removed references to usleep(), and replaced them with TimeConversion::sleep()
This commit is contained in:
parent
e0ab17831e
commit
bcbe880d42
|
@ -21,7 +21,7 @@ dnl Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
|||
dnl
|
||||
dnl
|
||||
dnl Author : $Author: maroy $
|
||||
dnl Version : $Revision: 1.1 $
|
||||
dnl Version : $Revision: 1.2 $
|
||||
dnl Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/modules/playlistExecutor/etc/configure.ac,v $
|
||||
dnl-----------------------------------------------------------------------------
|
||||
|
||||
|
@ -35,14 +35,14 @@ dnl-----------------------------------------------------------------------------
|
|||
AC_INIT(PlaylistExecutor, 1.0, bugs@campware.org)
|
||||
AC_PREREQ(2.59)
|
||||
AC_COPYRIGHT([Copyright (c) 2004 Media Development Loan Fund under the GNU GPL])
|
||||
AC_REVISION($Revision: 1.1 $)
|
||||
AC_REVISION($Revision: 1.2 $)
|
||||
|
||||
AC_CONFIG_SRCDIR(../src/HelixPlayer.cxx)
|
||||
|
||||
AC_CONFIG_HEADERS(configure.h)
|
||||
AC_PROG_CXX()
|
||||
|
||||
AC_CHECK_HEADERS(getopt.h)
|
||||
AC_CHECK_HEADERS(getopt.h sys/time.h)
|
||||
|
||||
dnl-----------------------------------------------------------------------------
|
||||
dnl enable compilaton for code coverage data
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
|
||||
|
||||
Author : $Author: maroy $
|
||||
Version : $Revision: 1.1 $
|
||||
Version : $Revision: 1.2 $
|
||||
Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/modules/playlistExecutor/src/Attic/AudioPlayerFactoryTest.cxx,v $
|
||||
|
||||
------------------------------------------------------------------------------*/
|
||||
|
@ -43,6 +43,8 @@
|
|||
#include <string>
|
||||
#include <iostream>
|
||||
|
||||
#include "LiveSupport/Core/TimeConversion.h"
|
||||
|
||||
#include "AudioPlayerFactoryTest.h"
|
||||
|
||||
|
||||
|
@ -129,6 +131,7 @@ AudioPlayerFactoryTest :: simplePlayTest(void)
|
|||
{
|
||||
Ptr<AudioPlayerFactory>::Ref audioPlayerFactory;
|
||||
Ptr<AudioPlayerInterface>::Ref audioPlayer;
|
||||
Ptr<time_duration>::Ref sleepT(new time_duration(microseconds(10)));
|
||||
|
||||
audioPlayerFactory = AudioPlayerFactory::getInstance();
|
||||
audioPlayer = audioPlayerFactory->getAudioPlayer();
|
||||
|
@ -138,7 +141,7 @@ AudioPlayerFactoryTest :: simplePlayTest(void)
|
|||
audioPlayer->start();
|
||||
CPPUNIT_ASSERT(audioPlayer->isPlaying());
|
||||
while (audioPlayer->isPlaying()) {
|
||||
usleep(10000);
|
||||
TimeConversion::sleep(sleepT);
|
||||
}
|
||||
CPPUNIT_ASSERT(!audioPlayer->isPlaying());
|
||||
}
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
|
||||
|
||||
Author : $Author: maroy $
|
||||
Version : $Revision: 1.3 $
|
||||
Version : $Revision: 1.4 $
|
||||
Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/modules/playlistExecutor/src/Attic/HelixPlayer.cxx,v $
|
||||
|
||||
------------------------------------------------------------------------------*/
|
||||
|
@ -35,6 +35,7 @@
|
|||
|
||||
#include "HelixDefs.h"
|
||||
|
||||
#include "LiveSupport/Core/TimeConversion.h"
|
||||
#include "HelixPlayer.h"
|
||||
|
||||
|
||||
|
@ -83,12 +84,13 @@ void *
|
|||
LiveSupport::PlaylistExecutor::eventHandlerThread(void * helixPlayer)
|
||||
throw ()
|
||||
{
|
||||
HelixPlayer * hPlayer = (HelixPlayer *) helixPlayer;
|
||||
HelixPlayer * hPlayer = (HelixPlayer *) helixPlayer;
|
||||
Ptr<time_duration>::Ref sleepT(new time_duration(microseconds(10)));
|
||||
|
||||
while (hPlayer->handleEvents) {
|
||||
struct _HXxEvent * event = 0;
|
||||
hPlayer->clientEngine->EventOccurred(event);
|
||||
usleep(10000);
|
||||
TimeConversion::sleep(sleepT);
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
|
||||
|
||||
Author : $Author: maroy $
|
||||
Version : $Revision: 1.2 $
|
||||
Version : $Revision: 1.3 $
|
||||
Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/modules/playlistExecutor/src/Attic/HelixPlayerTest.cxx,v $
|
||||
|
||||
------------------------------------------------------------------------------*/
|
||||
|
@ -43,6 +43,8 @@
|
|||
#include <string>
|
||||
#include <iostream>
|
||||
|
||||
#include "LiveSupport/Core/TimeConversion.h"
|
||||
|
||||
#include "HelixPlayer.h"
|
||||
#include "HelixPlayerTest.h"
|
||||
|
||||
|
@ -124,13 +126,15 @@ void
|
|||
HelixPlayerTest :: simplePlayTest(void)
|
||||
throw (CPPUNIT_NS::Exception)
|
||||
{
|
||||
Ptr<time_duration>::Ref sleepT(new time_duration(microseconds(10)));
|
||||
|
||||
helixPlayer->initialize();
|
||||
helixPlayer->playThis("file:var/test.mp3");
|
||||
CPPUNIT_ASSERT(!helixPlayer->isPlaying());
|
||||
helixPlayer->start();
|
||||
CPPUNIT_ASSERT(helixPlayer->isPlaying());
|
||||
while (helixPlayer->isPlaying()) {
|
||||
usleep(10000);
|
||||
TimeConversion::sleep(sleepT);
|
||||
}
|
||||
CPPUNIT_ASSERT(!helixPlayer->isPlaying());
|
||||
helixPlayer->deInitialize();
|
||||
|
@ -193,6 +197,8 @@ void
|
|||
HelixPlayerTest :: smilTest(void)
|
||||
throw (CPPUNIT_NS::Exception)
|
||||
{
|
||||
Ptr<time_duration>::Ref sleepT(new time_duration(microseconds(10)));
|
||||
|
||||
helixPlayer->initialize();
|
||||
|
||||
helixPlayer->playThis("file:var/simpleSmil.smil");
|
||||
|
@ -200,7 +206,7 @@ HelixPlayerTest :: smilTest(void)
|
|||
helixPlayer->start();
|
||||
CPPUNIT_ASSERT(helixPlayer->isPlaying());
|
||||
while (helixPlayer->isPlaying()) {
|
||||
usleep(10000);
|
||||
TimeConversion::sleep(sleepT);
|
||||
}
|
||||
CPPUNIT_ASSERT(!helixPlayer->isPlaying());
|
||||
|
||||
|
@ -212,7 +218,7 @@ HelixPlayerTest :: smilTest(void)
|
|||
helixPlayer->start();
|
||||
CPPUNIT_ASSERT(helixPlayer->isPlaying());
|
||||
while (helixPlayer->isPlaying()) {
|
||||
usleep(10000);
|
||||
TimeConversion::sleep(sleepT);
|
||||
}
|
||||
CPPUNIT_ASSERT(!helixPlayer->isPlaying());
|
||||
*/
|
||||
|
@ -224,7 +230,7 @@ HelixPlayerTest :: smilTest(void)
|
|||
helixPlayer->start();
|
||||
CPPUNIT_ASSERT(helixPlayer->isPlaying());
|
||||
while (helixPlayer->isPlaying()) {
|
||||
usleep(10000);
|
||||
TimeConversion::sleep(sleepT);
|
||||
}
|
||||
CPPUNIT_ASSERT(!helixPlayer->isPlaying());
|
||||
|
||||
|
|
Loading…
Reference in New Issue