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