added more parallel tests, as they seem to be fixed with
hxclient_1_3_0_neptunex-2004-12-15
This commit is contained in:
parent
f7399d9674
commit
b306b0c2dd
8 changed files with 158 additions and 14 deletions
|
@ -22,7 +22,7 @@
|
||||||
|
|
||||||
|
|
||||||
Author : $Author: maroy $
|
Author : $Author: maroy $
|
||||||
Version : $Revision: 1.4 $
|
Version : $Revision: 1.5 $
|
||||||
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 $
|
||||||
|
|
||||||
------------------------------------------------------------------------------*/
|
------------------------------------------------------------------------------*/
|
||||||
|
@ -213,21 +213,16 @@ HelixPlayerTest :: smilTest(void)
|
||||||
|
|
||||||
|
|
||||||
/*------------------------------------------------------------------------------
|
/*------------------------------------------------------------------------------
|
||||||
* Test different SMIL file features
|
* Play a specific file.
|
||||||
|
* Assumes that the player was already initialized.
|
||||||
*----------------------------------------------------------------------------*/
|
*----------------------------------------------------------------------------*/
|
||||||
void
|
void
|
||||||
HelixPlayerTest :: smilParallelTest(void)
|
HelixPlayerTest :: playFile(const std::string & fileName)
|
||||||
throw (CPPUNIT_NS::Exception)
|
throw (CPPUNIT_NS::Exception)
|
||||||
{
|
{
|
||||||
Ptr<time_duration>::Ref sleepT(new time_duration(microseconds(10)));
|
Ptr<time_duration>::Ref sleepT(new time_duration(microseconds(10)));
|
||||||
|
|
||||||
helixPlayer->initialize();
|
helixPlayer->playThis(fileName.c_str());
|
||||||
|
|
||||||
/* TODO: there is a bug with playing parallel, as it doesn't end
|
|
||||||
for some reason.
|
|
||||||
see https://bugs.helixcommunity.org/show_bug.cgi?id=3311
|
|
||||||
*/
|
|
||||||
helixPlayer->playThis("file:var/parallel.smil");
|
|
||||||
CPPUNIT_ASSERT(!helixPlayer->isPlaying());
|
CPPUNIT_ASSERT(!helixPlayer->isPlaying());
|
||||||
helixPlayer->start();
|
helixPlayer->start();
|
||||||
CPPUNIT_ASSERT(helixPlayer->isPlaying());
|
CPPUNIT_ASSERT(helixPlayer->isPlaying());
|
||||||
|
@ -238,6 +233,66 @@ HelixPlayerTest :: smilParallelTest(void)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/*------------------------------------------------------------------------------
|
||||||
|
* Test parallel play
|
||||||
|
*----------------------------------------------------------------------------*/
|
||||||
|
void
|
||||||
|
HelixPlayerTest :: smilParallelTest0(void)
|
||||||
|
throw (CPPUNIT_NS::Exception)
|
||||||
|
{
|
||||||
|
helixPlayer->initialize();
|
||||||
|
playFile("file:var/parallel-0.smil");
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/*------------------------------------------------------------------------------
|
||||||
|
* Test parallel play
|
||||||
|
*----------------------------------------------------------------------------*/
|
||||||
|
void
|
||||||
|
HelixPlayerTest :: smilParallelTest1(void)
|
||||||
|
throw (CPPUNIT_NS::Exception)
|
||||||
|
{
|
||||||
|
helixPlayer->initialize();
|
||||||
|
playFile("file:var/parallel-1.smil");
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/*------------------------------------------------------------------------------
|
||||||
|
* Test parallel play
|
||||||
|
*----------------------------------------------------------------------------*/
|
||||||
|
void
|
||||||
|
HelixPlayerTest :: smilParallelTest2(void)
|
||||||
|
throw (CPPUNIT_NS::Exception)
|
||||||
|
{
|
||||||
|
helixPlayer->initialize();
|
||||||
|
playFile("file:var/parallel-2.smil");
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/*------------------------------------------------------------------------------
|
||||||
|
* Test parallel play
|
||||||
|
*----------------------------------------------------------------------------*/
|
||||||
|
void
|
||||||
|
HelixPlayerTest :: smilParallelTest3(void)
|
||||||
|
throw (CPPUNIT_NS::Exception)
|
||||||
|
{
|
||||||
|
helixPlayer->initialize();
|
||||||
|
playFile("file:var/parallel-3.smil");
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/*------------------------------------------------------------------------------
|
||||||
|
* Test parallel play
|
||||||
|
*----------------------------------------------------------------------------*/
|
||||||
|
void
|
||||||
|
HelixPlayerTest :: smilParallelTest4(void)
|
||||||
|
throw (CPPUNIT_NS::Exception)
|
||||||
|
{
|
||||||
|
helixPlayer->initialize();
|
||||||
|
playFile("file:var/parallel-4.smil");
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/*------------------------------------------------------------------------------
|
/*------------------------------------------------------------------------------
|
||||||
* Test different SMIL file features
|
* Test different SMIL file features
|
||||||
*----------------------------------------------------------------------------*/
|
*----------------------------------------------------------------------------*/
|
||||||
|
|
|
@ -22,7 +22,7 @@
|
||||||
|
|
||||||
|
|
||||||
Author : $Author: maroy $
|
Author : $Author: maroy $
|
||||||
Version : $Revision: 1.4 $
|
Version : $Revision: 1.5 $
|
||||||
Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/modules/playlistExecutor/src/Attic/HelixPlayerTest.h,v $
|
Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/modules/playlistExecutor/src/Attic/HelixPlayerTest.h,v $
|
||||||
|
|
||||||
------------------------------------------------------------------------------*/
|
------------------------------------------------------------------------------*/
|
||||||
|
@ -58,7 +58,7 @@ namespace PlaylistExecutor {
|
||||||
* Unit test for the HelixPlayer class.
|
* Unit test for the HelixPlayer class.
|
||||||
*
|
*
|
||||||
* @author $Author: maroy $
|
* @author $Author: maroy $
|
||||||
* @version $Revision: 1.4 $
|
* @version $Revision: 1.5 $
|
||||||
* @see HelixPlayer
|
* @see HelixPlayer
|
||||||
*/
|
*/
|
||||||
class HelixPlayerTest : public CPPUNIT_NS::TestFixture
|
class HelixPlayerTest : public CPPUNIT_NS::TestFixture
|
||||||
|
@ -68,7 +68,11 @@ class HelixPlayerTest : public CPPUNIT_NS::TestFixture
|
||||||
CPPUNIT_TEST(simplePlayTest);
|
CPPUNIT_TEST(simplePlayTest);
|
||||||
CPPUNIT_TEST(checkErrorConditions);
|
CPPUNIT_TEST(checkErrorConditions);
|
||||||
CPPUNIT_TEST(smilTest);
|
CPPUNIT_TEST(smilTest);
|
||||||
// CPPUNIT_TEST(smilParallelTest);
|
CPPUNIT_TEST(smilParallelTest0);
|
||||||
|
CPPUNIT_TEST(smilParallelTest1);
|
||||||
|
CPPUNIT_TEST(smilParallelTest2);
|
||||||
|
CPPUNIT_TEST(smilParallelTest3);
|
||||||
|
CPPUNIT_TEST(smilParallelTest4);
|
||||||
// CPPUNIT_TEST(smilSoundAnimationTest);
|
// CPPUNIT_TEST(smilSoundAnimationTest);
|
||||||
CPPUNIT_TEST_SUITE_END();
|
CPPUNIT_TEST_SUITE_END();
|
||||||
|
|
||||||
|
@ -79,6 +83,16 @@ class HelixPlayerTest : public CPPUNIT_NS::TestFixture
|
||||||
*/
|
*/
|
||||||
Ptr<HelixPlayer>::Ref helixPlayer;
|
Ptr<HelixPlayer>::Ref helixPlayer;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Play a specific file.
|
||||||
|
*
|
||||||
|
* @param fileName the name of the file to play.
|
||||||
|
* @exception CPPUNIT_NS::Exception on playing failures
|
||||||
|
*/
|
||||||
|
void
|
||||||
|
playFile(const std::string & fileName)
|
||||||
|
throw (CPPUNIT_NS::Exception);
|
||||||
|
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
|
||||||
|
@ -120,7 +134,39 @@ class HelixPlayerTest : public CPPUNIT_NS::TestFixture
|
||||||
* @exception CPPUNIT_NS::Exception on test failures.
|
* @exception CPPUNIT_NS::Exception on test failures.
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
smilParallelTest(void) throw (CPPUNIT_NS::Exception);
|
smilParallelTest0(void) throw (CPPUNIT_NS::Exception);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Test SMIL files, when playing audio clips in parallel.
|
||||||
|
*
|
||||||
|
* @exception CPPUNIT_NS::Exception on test failures.
|
||||||
|
*/
|
||||||
|
void
|
||||||
|
smilParallelTest1(void) throw (CPPUNIT_NS::Exception);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Test SMIL files, when playing audio clips in parallel.
|
||||||
|
*
|
||||||
|
* @exception CPPUNIT_NS::Exception on test failures.
|
||||||
|
*/
|
||||||
|
void
|
||||||
|
smilParallelTest2(void) throw (CPPUNIT_NS::Exception);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Test SMIL files, when playing audio clips in parallel.
|
||||||
|
*
|
||||||
|
* @exception CPPUNIT_NS::Exception on test failures.
|
||||||
|
*/
|
||||||
|
void
|
||||||
|
smilParallelTest3(void) throw (CPPUNIT_NS::Exception);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Test SMIL files, when playing audio clips in parallel.
|
||||||
|
*
|
||||||
|
* @exception CPPUNIT_NS::Exception on test failures.
|
||||||
|
*/
|
||||||
|
void
|
||||||
|
smilParallelTest4(void) throw (CPPUNIT_NS::Exception);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Test SMIL files, when animating the sound of a played clip.
|
* Test SMIL files, when animating the sound of a played clip.
|
||||||
|
|
11
livesupport/modules/playlistExecutor/var/parallel-0.smil
Normal file
11
livesupport/modules/playlistExecutor/var/parallel-0.smil
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
<smil xmlns = "http://www.w3.org/2001/SMIL20/Language"
|
||||||
|
xmlns:rn = "http://features.real.com/2001/SMIL20/Extensions">
|
||||||
|
<body>
|
||||||
|
<par>
|
||||||
|
<!-- play a short file in the beginning (2 secs)
|
||||||
|
then a longer one after that -->
|
||||||
|
<audio src="test-short.mp3"/>
|
||||||
|
<audio src="test.mp3" begin="3s"/>
|
||||||
|
</par>
|
||||||
|
</body>
|
||||||
|
</smil>
|
10
livesupport/modules/playlistExecutor/var/parallel-1.smil
Normal file
10
livesupport/modules/playlistExecutor/var/parallel-1.smil
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
<smil xmlns = "http://www.w3.org/2001/SMIL20/Language"
|
||||||
|
xmlns:rn = "http://features.real.com/2001/SMIL20/Extensions">
|
||||||
|
<body>
|
||||||
|
<par>
|
||||||
|
<!-- play a long file, and a shorter one inside it -->
|
||||||
|
<audio src="test.mp3"/>
|
||||||
|
<audio src="test-short.mp3" begin="3s"/>
|
||||||
|
</par>
|
||||||
|
</body>
|
||||||
|
</smil>
|
11
livesupport/modules/playlistExecutor/var/parallel-2.smil
Normal file
11
livesupport/modules/playlistExecutor/var/parallel-2.smil
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
<smil xmlns = "http://www.w3.org/2001/SMIL20/Language"
|
||||||
|
xmlns:rn = "http://features.real.com/2001/SMIL20/Extensions">
|
||||||
|
<body>
|
||||||
|
<par endsync="first">
|
||||||
|
<!-- play a short file, with another longer behing
|
||||||
|
but end when the short file ends -->
|
||||||
|
<audio src="test-short.mp3"/>
|
||||||
|
<audio src="test.mp3" begin="3s"/>
|
||||||
|
</par>
|
||||||
|
</body>
|
||||||
|
</smil>
|
11
livesupport/modules/playlistExecutor/var/parallel-3.smil
Normal file
11
livesupport/modules/playlistExecutor/var/parallel-3.smil
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
<smil xmlns = "http://www.w3.org/2001/SMIL20/Language"
|
||||||
|
xmlns:rn = "http://features.real.com/2001/SMIL20/Extensions">
|
||||||
|
<body>
|
||||||
|
<par endsync="first">
|
||||||
|
<!-- play a long file, and a short inside
|
||||||
|
end when the long one ends -->
|
||||||
|
<audio src="test.mp3"/>
|
||||||
|
<audio src="test-short.mp3" begin="3s"/>
|
||||||
|
</par>
|
||||||
|
</body>
|
||||||
|
</smil>
|
BIN
livesupport/modules/playlistExecutor/var/test-short.mp3
Normal file
BIN
livesupport/modules/playlistExecutor/var/test-short.mp3
Normal file
Binary file not shown.
Loading…
Add table
Add a link
Reference in a new issue