diff --git a/livesupport/modules/playlistExecutor/src/GstreamerPlayerTest.cxx b/livesupport/modules/playlistExecutor/src/GstreamerPlayerTest.cxx index 3b867b911..8954a659c 100644 --- a/livesupport/modules/playlistExecutor/src/GstreamerPlayerTest.cxx +++ b/livesupport/modules/playlistExecutor/src/GstreamerPlayerTest.cxx @@ -21,8 +21,8 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - Author : $Author: maroy $ - Version : $Revision: 1.2 $ + Author : $Author: fgerlits $ + Version : $Revision: 1.3 $ Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/modules/playlistExecutor/src/GstreamerPlayerTest.cxx,v $ ------------------------------------------------------------------------------*/ @@ -157,7 +157,7 @@ GstreamerPlayerTest :: simplePlayTest(void) * Play a simple SMIL file *----------------------------------------------------------------------------*/ void -GstreamerPlayerTest :: smilTest(void) +GstreamerPlayerTest :: simpleSmilTest(void) throw (CPPUNIT_NS::Exception) { Ptr::Ref sleepT(new time_duration(microseconds(10))); @@ -182,6 +182,64 @@ GstreamerPlayerTest :: smilTest(void) } +/*------------------------------------------------------------------------------ + * Play a more complicated SMIL file + *----------------------------------------------------------------------------*/ +void +GstreamerPlayerTest :: secondSmilTest(void) + throw (CPPUNIT_NS::Exception) +{ + Ptr::Ref sleepT(new time_duration(microseconds(10))); + + player->initialize(); + try { + player->open("file:var/sequentialSmil.smil"); + } catch (std::invalid_argument &e) { + CPPUNIT_FAIL(e.what()); + } + CPPUNIT_ASSERT(!player->isPlaying()); + CPPUNIT_ASSERT_NO_THROW( + player->start(); + ); + CPPUNIT_ASSERT(player->isPlaying()); + while (player->isPlaying()) { + TimeConversion::sleep(sleepT); + } + CPPUNIT_ASSERT(!player->isPlaying()); + player->close(); + player->deInitialize(); +} + + +/*------------------------------------------------------------------------------ + * Play a SMIL file with sound animation + *----------------------------------------------------------------------------*/ +void +GstreamerPlayerTest :: animatedSmilTest(void) + throw (CPPUNIT_NS::Exception) +{ + Ptr::Ref sleepT(new time_duration(microseconds(10))); + + player->initialize(); + + try { + player->open("file:var/animatedSmil.smil"); + } catch (std::invalid_argument &e) { + CPPUNIT_FAIL(e.what()); + } + CPPUNIT_ASSERT(!player->isPlaying()); + player->start(); + CPPUNIT_ASSERT(player->isPlaying()); + while (player->isPlaying()) { + TimeConversion::sleep(sleepT); + } + CPPUNIT_ASSERT(!player->isPlaying()); + player->close(); + + player->deInitialize(); +} + + /*------------------------------------------------------------------------------ * Check for error conditions *----------------------------------------------------------------------------*/ diff --git a/livesupport/modules/playlistExecutor/src/GstreamerPlayerTest.h b/livesupport/modules/playlistExecutor/src/GstreamerPlayerTest.h index 894628efa..b3f6cd4b4 100644 --- a/livesupport/modules/playlistExecutor/src/GstreamerPlayerTest.h +++ b/livesupport/modules/playlistExecutor/src/GstreamerPlayerTest.h @@ -21,8 +21,8 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - Author : $Author: maroy $ - Version : $Revision: 1.2 $ + Author : $Author: fgerlits $ + Version : $Revision: 1.3 $ Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/modules/playlistExecutor/src/GstreamerPlayerTest.h,v $ ------------------------------------------------------------------------------*/ @@ -57,19 +57,21 @@ namespace PlaylistExecutor { /** * Unit test for the GstreamerPlayer class. * - * @author $Author: maroy $ - * @version $Revision: 1.2 $ + * @author $Author: fgerlits $ + * @version $Revision: 1.3 $ * @see GstreamerPlayer */ class GstreamerPlayerTest : public CPPUNIT_NS::TestFixture { CPPUNIT_TEST_SUITE(GstreamerPlayerTest); - CPPUNIT_TEST(firstTest); - CPPUNIT_TEST(simplePlayTest); - CPPUNIT_TEST(smilTest); - CPPUNIT_TEST(checkErrorConditions); - CPPUNIT_TEST(eventListenerAttachTest); - CPPUNIT_TEST(eventListenerTest); +// CPPUNIT_TEST(firstTest); +// CPPUNIT_TEST(simplePlayTest); + CPPUNIT_TEST(simpleSmilTest); + CPPUNIT_TEST(secondSmilTest); + CPPUNIT_TEST(animatedSmilTest); +// CPPUNIT_TEST(checkErrorConditions); +// CPPUNIT_TEST(eventListenerAttachTest); +// CPPUNIT_TEST(eventListenerTest); CPPUNIT_TEST_SUITE_END(); private: @@ -104,7 +106,23 @@ class GstreamerPlayerTest : public CPPUNIT_NS::TestFixture * @exception CPPUNIT_NS::Exception on test failures. */ void - smilTest(void) throw (CPPUNIT_NS::Exception); + simpleSmilTest(void) throw (CPPUNIT_NS::Exception); + + /** + * Play a more complicated SMIL file. + * + * @exception CPPUNIT_NS::Exception on test failures. + */ + void + secondSmilTest(void) throw (CPPUNIT_NS::Exception); + + /** + * Play a SMIL file with sound animation. + * + * @exception CPPUNIT_NS::Exception on test failures. + */ + void + animatedSmilTest(void) throw (CPPUNIT_NS::Exception); /** * Check for error conditions. diff --git a/livesupport/modules/playlistExecutor/var/animatedSmil.smil b/livesupport/modules/playlistExecutor/var/animatedSmil.smil new file mode 100644 index 000000000..8c3c3c807 --- /dev/null +++ b/livesupport/modules/playlistExecutor/var/animatedSmil.smil @@ -0,0 +1,29 @@ + + + + + + + + + + diff --git a/livesupport/modules/playlistExecutor/var/sequentialSmil.smil b/livesupport/modules/playlistExecutor/var/sequentialSmil.smil new file mode 100644 index 000000000..92be03461 --- /dev/null +++ b/livesupport/modules/playlistExecutor/var/sequentialSmil.smil @@ -0,0 +1,10 @@ + + + + + + + diff --git a/livesupport/products/gLiveSupport/etc/gLiveSupport.xml b/livesupport/products/gLiveSupport/etc/gLiveSupport.xml index 6ad40fdcc..60c8eabe9 100644 --- a/livesupport/products/gLiveSupport/etc/gLiveSupport.xml +++ b/livesupport/products/gLiveSupport/etc/gLiveSupport.xml @@ -78,13 +78,17 @@ - + - + + + + @@ -144,9 +148,7 @@ - + diff --git a/livesupport/products/gLiveSupport/src/GLiveSupport.cxx b/livesupport/products/gLiveSupport/src/GLiveSupport.cxx index 61261d590..aa966d8af 100644 --- a/livesupport/products/gLiveSupport/src/GLiveSupport.cxx +++ b/livesupport/products/gLiveSupport/src/GLiveSupport.cxx @@ -22,7 +22,7 @@ Author : $Author: fgerlits $ - Version : $Revision: 1.53 $ + Version : $Revision: 1.54 $ Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/products/gLiveSupport/src/GLiveSupport.cxx,v $ ------------------------------------------------------------------------------*/ @@ -903,7 +903,9 @@ GLiveSupport :: playCueAudio(Ptr::Ref playable) case Playable::PlaylistType: cueItemPlayingNow = storage->acquirePlaylist(sessionId, playable->getId()); - cuePlayer->openAndStart(cueItemPlayingNow->getPlaylist()); + cuePlayer->open(*cueItemPlayingNow->getUri()); +std::cerr << "uri: " << *cueItemPlayingNow->getUri() << ".\n"; + cuePlayer->start(); break; default: // this never happens diff --git a/livesupport/products/scheduler/etc/scheduler.xml b/livesupport/products/scheduler/etc/scheduler.xml index 8ce1d92ed..9c45455ee 100644 --- a/livesupport/products/scheduler/etc/scheduler.xml +++ b/livesupport/products/scheduler/etc/scheduler.xml @@ -72,7 +72,7 @@ - +