removed helix from LiveSupport

This commit is contained in:
maroy 2005-07-03 08:57:50 +00:00
parent 4726b005fd
commit f767ed2dd8
72 changed files with 104 additions and 6168 deletions

View file

@ -21,7 +21,7 @@
#
#
# Author : $Author: maroy $
# Version : $Revision: 1.9 $
# Version : $Revision: 1.10 $
# Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/etc/Makefile.in,v $
#-------------------------------------------------------------------------------
@ -78,8 +78,6 @@ XMLRPCXX_DIR = ${TOOLS_DIR}/xmlrpc++
XMLRPCXX_VERSION = xmlrpc++-20040713
LCOV_DIR = ${TOOLS_DIR}/lcov
LCOV_VERSION = lcov-1.3
HELIX_DIR = ${TOOLS_DIR}/helix
HELIX_VERSION = hxclient_1_3_0_neptunex-2004-12-15
GTK_DIR = ${TOOLS_DIR}/gtk+
GTK_VERSION = gtk+-2.6.1
GTKMM_DIR = ${TOOLS_DIR}/gtkmm
@ -179,7 +177,6 @@ ${TMP_DIR}/tools_setup.stamp:
${LIBODBCXX_DIR}/${LIBODBCXX_VERSION}/bin/install.sh
${XMLRPCXX_DIR}/${XMLRPCXX_VERSION}/bin/install.sh
${LCOV_DIR}/${LCOV_VERSION}/bin/install.sh
${HELIX_DIR}/${HELIX_VERSION}/bin/install.sh
${GTK_DIR}/${GTK_VERSION}/bin/install.sh
${GTKMM_DIR}/${GTKMM_VERSION}/bin/install.sh
${GSTREAMER_DIR}/${GSTREAMER_VERSION}/bin/install.sh

View file

@ -21,8 +21,8 @@
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
Author : $Author: fgerlits $
Version : $Revision: 1.27 $
Author : $Author: maroy $
Version : $Revision: 1.28 $
Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/modules/core/include/LiveSupport/Core/AudioClip.h,v $
------------------------------------------------------------------------------*/
@ -130,8 +130,8 @@ using namespace boost::posix_time;
* <!ATTLIST audioClip uri CDATA #IMPLIED >
* </code></pre>
*
* @author $Author: fgerlits $
* @version $Revision: 1.27 $
* @author $Author: maroy $
* @version $Revision: 1.28 $
*/
class AudioClip : public Configurable,
public Playable
@ -423,7 +423,7 @@ class AudioClip : public Configurable,
/**
* Return the URI of the binary sound file of this audio clip,
* which can be played by the helix client.
* which can be played by the audio player.
*
* @return the URI.
*/
@ -435,7 +435,7 @@ class AudioClip : public Configurable,
/**
* Set the URI of the binary sound file of this audio clip,
* which can be played by the helix client.
* which can be played by the audio player.
*
* @param uri the new URI.
*/

View file

@ -21,8 +21,8 @@
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
Author : $Author: fgerlits $
Version : $Revision: 1.11 $
Author : $Author: maroy $
Version : $Revision: 1.12 $
Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/modules/core/include/LiveSupport/Core/Playable.h,v $
------------------------------------------------------------------------------*/
@ -72,8 +72,8 @@ using namespace boost::posix_time;
* An abstract class which is extended by AudioClip and Playlist.
* It contains the methods which are common to these classes.
*
* @author $Author: fgerlits $
* @version $Revision: 1.11 $
* @author $Author: maroy $
* @version $Revision: 1.12 $
*/
class Playable : public boost::enable_shared_from_this<Playable>
{
@ -133,7 +133,7 @@ class Playable : public boost::enable_shared_from_this<Playable>
/**
* Return the URI of the sound file of this audio clip or
* playlist, which can be played by the helix client. This
* playlist, which can be played by the audio player. This
* sound file can be an mp3 or a SMIL file.
*
* @return the URI.
@ -143,7 +143,7 @@ class Playable : public boost::enable_shared_from_this<Playable>
/**
* Set the URI of the sound file of this audio clip or
* playlist, which can be played by the helix client. This
* playlist, which can be played by the audio player. This
* sound file can be an mp3 or a SMIL file.
*
* @param uri the new URI.

View file

@ -21,8 +21,8 @@
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
Author : $Author: fgerlits $
Version : $Revision: 1.37 $
Author : $Author: maroy $
Version : $Revision: 1.38 $
Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/modules/core/include/LiveSupport/Core/Playlist.h,v $
------------------------------------------------------------------------------*/
@ -127,8 +127,8 @@ using namespace boost::posix_time;
* &lt;!ATTLIST playlist playlength NMTOKEN #IMPLIED &gt;
* </code></pre>
*
* @author $Author: fgerlits $
* @version $Revision: 1.37 $
* @author $Author: maroy $
* @version $Revision: 1.38 $
*/
class Playlist : public Configurable,
public Playable
@ -457,7 +457,7 @@ class Playlist : public Configurable,
/**
* Return the URI of the SMIL file created from this
* playlist, which can be played by the helix client.
* playlist, which can be played by the audio player.
*
* @return the URI.
*/
@ -469,7 +469,7 @@ class Playlist : public Configurable,
/**
* Set the URI of the SMIL file created from this
* playlist, which can be played by the helix client.
* playlist, which can be played by the audio player.
*
* @param uri the new URI.
*/

View file

@ -21,8 +21,8 @@
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
Author : $Author: fgerlits $
Version : $Revision: 1.12 $
Author : $Author: maroy $
Version : $Revision: 1.13 $
Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/modules/core/include/LiveSupport/Core/PlaylistElement.h,v $
------------------------------------------------------------------------------*/
@ -103,8 +103,8 @@ class Playlist;
* &lt;!ATTLIST playlistElement relativeOffset NMTOKEN #REQUIRED &gt;
* </code></pre>
*
* @author $Author: fgerlits $
* @version $Revision: 1.12 $
* @author $Author: maroy $
* @version $Revision: 1.13 $
*/
class PlaylistElement : public Configurable
{
@ -326,7 +326,7 @@ class PlaylistElement : public Configurable
* Return the Playable instance (an AudioClip or a Playlist)
* associated with the playlist element. Use this if you don't
* care which type this playlist element is, e.g., you
* just want to play it in a helix client.
* just want to play it in an audio player.
*
* @return the Playable instance associated with the element.
*/

View file

@ -21,7 +21,7 @@
#
#
# Author : $Author: maroy $
# Version : $Revision: 1.15 $
# Version : $Revision: 1.16 $
# Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/modules/playlistExecutor/etc/Makefile.in,v $
#
# @configure_input@
@ -57,15 +57,6 @@ USR_INCLUDE_DIR = ${USR_DIR}/include
USR_LIB_DIR = ${USR_DIR}/lib
BOOST_INCLUDE_DIR = ${USR_INCLUDE_DIR}/boost-1_31
HELIX_INCLUDE_DIR = ${USR_INCLUDE_DIR}/helix
HELIX_LIB_DIR = ${USR_LIB_DIR}/helix
HELIX_LIBS = ${HELIX_LIB_DIR}/runtlib.a \
${HELIX_LIB_DIR}/syslib.a \
${HELIX_LIB_DIR}/contlib.a \
${HELIX_LIB_DIR}/debuglib.a \
${HELIX_LIB_DIR}/utillib.a
HELIX_CFLAGS = -march=i686 -D_UNIX
MODULES_DIR = ${BASE_DIR}/..
@ -118,10 +109,8 @@ CXXFLAGS = @CXXFLAGS@ @DEFS@ @COVERAGE_CXXFLAGS@ -pthread \
-Wall -Wno-long-long \
${LIBXMLPP_CFLAGS} \
${GSTREAMER_CFLAGS} \
${HELIX_CFLAGS} \
-I${USR_INCLUDE_DIR} \
-I${BOOST_INCLUDE_DIR} \
-I${HELIX_INCLUDE_DIR} \
-I${GSTREAMER_ELEMENTS_INCLUDE_DIR} \
-I${CORE_INCLUDE_DIR} \
-I${INCLUDE_DIR} -I${TMP_DIR}
@ -133,35 +122,24 @@ LDFLAGS = @LDFLAGS@ -pthread \
-L${USR_LIB_DIR} \
-L${CORE_LIB_DIR} \
-L${GSTREAMER_ELEMENTS_LIB_DIR} \
-L${HELIX_LIB_DIR} \
-L${LIB_DIR}
#-------------------------------------------------------------------------------
# Dependencies
#-------------------------------------------------------------------------------
PLAYLIST_EXECUTOR_LIB_OBJS = ${TMP_DIR}/HelixPlayer.o \
${TMP_DIR}/HelixEventHandlerThread.o \
${TMP_DIR}/AdviseSink.o \
${TMP_DIR}/AuthenticationManager.o \
${TMP_DIR}/ClientContext.o \
${TMP_DIR}/ErrorSink.o \
${TMP_DIR}/HelixIIDs.o \
${TMP_DIR}/AudioPlayerFactory.o \
PLAYLIST_EXECUTOR_LIB_OBJS = ${TMP_DIR}/AudioPlayerFactory.o \
${TMP_DIR}/GstreamerPlayer.o
TEST_RUNNER_OBJS = ${TMP_DIR}/TestRunner.o \
${TMP_DIR}/HelixPlayerTest.o \
${TMP_DIR}/AudioPlayerFactoryTest.o \
${TMP_DIR}/AudioPlayerFactoryGstreamerTest.o \
${TMP_DIR}/GstreamerPlayerTest.o
TEST_RUNNER_LIBS = -l${PLAYLIST_EXECUTOR_LIB} -l${CORE_LIB} \
-l${GSTREAMER_ELEMENTS_LIB} \
${HELIX_LIBS} ${TAGLIB_LIBS} \
${TAGLIB_LIBS} \
-lcppunit -ldl -lm -lxmlrpc++
TWOTEST_RUNNER_OBJS = ${TMP_DIR}/TestRunner.o \
${TMP_DIR}/TwoGstreamerPlayersTest.o \
${TMP_DIR}/TwoHelixPlayersTest.o
${TMP_DIR}/TwoGstreamerPlayersTest.o
#-------------------------------------------------------------------------------

View file

@ -1,18 +0,0 @@
<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE audioPlayer [
<!ELEMENT audioPlayer (helixPlayer|gstreamerPlayer) >
<!ELEMENT helixPlayer EMPTY >
<!ATTLIST helixPlayer dllPath CDATA #REQUIRED >
<!ATTLIST helixPlayer audioDevice CDATA #IMPLIED >
<!ATTLIST helixPlayer audioStreamTimeout NMTOKEN #IMPLIED >
<!ATTLIST helixPlayer fadeLookAheatTime NMTOKEN #IMPLIED >
<!ELEMENT gstreamerPlayer EMPTY >
<!ATTLIST gstreamerPlayer audioDevice CDATA #IMPLIED >
]>
<audioPlayer>
<helixPlayer dllPath = "../../usr/lib/helix"
/>
</audioPlayer>

View file

@ -1,13 +1,7 @@
<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE audioPlayer [
<!ELEMENT audioPlayer (helixPlayer|gstreamerPlayer) >
<!ELEMENT helixPlayer EMPTY >
<!ATTLIST helixPlayer dllPath CDATA #REQUIRED >
<!ATTLIST helixPlayer audioDevice CDATA #IMPLIED >
<!ATTLIST helixPlayer audioStreamTimeout NMTOKEN #IMPLIED >
<!ATTLIST helixPlayer fadeLookAheatTime NMTOKEN #IMPLIED >
<!ELEMENT audioPlayer (gstreamerPlayer) >
<!ELEMENT gstreamerPlayer EMPTY >
<!ATTLIST gstreamerPlayer audioDevice CDATA #IMPLIED >

View file

@ -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.8 $
dnl Version : $Revision: 1.9 $
dnl Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/modules/playlistExecutor/etc/configure.ac,v $
dnl-----------------------------------------------------------------------------
@ -35,9 +35,9 @@ 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.8 $)
AC_REVISION($Revision: 1.9 $)
AC_CONFIG_SRCDIR(../src/HelixPlayer.cxx)
AC_CONFIG_SRCDIR(../src/AudioPlayerFactory.cxx)
AC_CONFIG_HEADERS(configure.h)
AC_PROG_CXX()

View file

@ -1,14 +0,0 @@
<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE helixPlayer [
<!ELEMENT helixPlayer EMPTY >
<!ATTLIST helixPlayer dllPath CDATA #REQUIRED >
<!ATTLIST helixPlayer audioDevice CDATA #IMPLIED >
<!ATTLIST helixPlayer audioStreamTimeout NMTOKEN #IMPLIED >
<!ATTLIST helixPlayer fadeLookAheadTime NMTOKEN #IMPLIED >
]>
<helixPlayer dllPath = "../../usr/lib/helix"
audioDevice = "/dev/dsp"
audioStreamTimeout="6"
fadeLookAheadTime="2510"
/>

View file

@ -1,23 +0,0 @@
<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE twoHelixPlayers [
<!ELEMENT twoHelixPlayers (helixPlayer,helixPlayer) >
<!ELEMENT helixPlayer EMPTY >
<!ATTLIST helixPlayer dllPath CDATA #REQUIRED >
<!ATTLIST helixPlayer audioDevice CDATA #IMPLIED >
<!ATTLIST helixPlayer audioStreamTimeout NMTOKEN #IMPLIED >
<!ATTLIST helixPlayer fadeLookAheadTime NMTOKEN #IMPLIED >
]>
<twoHelixPlayers>
<helixPlayer dllPath = "../../usr/lib/helix"
audioDevice = "/dev/dsp"
audioStreamTimeout = "6"
fadeLookAheadTime = "2510"
/>
<helixPlayer dllPath = "../../usr/lib/helix"
audioDevice = "/dev/dsp1"
audioStreamTimeout = "6"
fadeLookAheadTime = "2510"
/>
</twoHelixPlayers>

View file

@ -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/include/LiveSupport/PlaylistExecutor/AudioPlayerFactory.h,v $
------------------------------------------------------------------------------*/
@ -68,29 +68,26 @@ using namespace LiveSupport::Core;
* for the desired type of connection manager inside the configuration
* element for the factory.
*
* Currently only the HelixAudioPlayer is supported, thus a
* Currently only the GstreamerAudioPlayer is supported, thus a
* configuration file may look like this:
*
* <pre><code>
* &lt;audioPlayer&gt;
* <helixPlayer dllPath = "../../usr/lib/helix"
* />
<gstreamerPlayer audioDevice = "plughw:0,0" />
* &lt;/audioPlayer&gt;
* </code></pre>
*
* The DTD for the above XML structure is:
*
* <pre><code>
* <!ELEMENT audioPlayer (helixPlayer|gstreamerPlayer) >
* <!ELEMENT audioPlayer (gstreamerPlayer) >
* </code></pre>
*
* For the DTD and details of the helixPlayer or gstreamerPlayer configuration
* element, see the HelixPlayer or the GstreamerPlayer documentation,
* respectively.
* For the DTD and details of the gstreamerPlayer configuration
* element, see the GstreamerPlayer documentation.
*
* @author $Author: maroy $
* @version $Revision: 1.2 $
* @see HelixPlayer
* @version $Revision: 1.3 $
* @see GstreamerPlayer
*/
class AudioPlayerFactory :

View file

@ -21,8 +21,8 @@
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
Author : $Author: fgerlits $
Version : $Revision: 1.11 $
Author : $Author: maroy $
Version : $Revision: 1.12 $
Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/modules/playlistExecutor/include/LiveSupport/PlaylistExecutor/AudioPlayerInterface.h,v $
------------------------------------------------------------------------------*/
@ -68,8 +68,8 @@ using namespace LiveSupport::Core;
/**
* A generic interface for playing audio files.
*
* @author $Author: fgerlits $
* @version $Revision: 1.11 $
* @author $Author: maroy $
* @version $Revision: 1.12 $
*/
class AudioPlayerInterface
{
@ -206,32 +206,6 @@ class AudioPlayerInterface
stop(void) throw (std::logic_error)
= 0;
/**
* Play a playlist, with simulated fading.
*
* This is a stopgap method, and should be replaced as soon as
* the SMIL animation issues are fixed in the Helix client.
*
* The playlist is assumed to contain a URI field, which points
* to a SMIL file containing the same audio clips, with the same
* offsets, as the playlist. This can be ensured, for example, by
* calling Storage::WebStorageClient::acquirePlaylist().
*
* @param playlist the Playlist object to be played.
* @exception std::invalid_argument playlist is invalid (e.g.,
* does not have a URI field, or there is no valid
* SMIL file at the given URI).
* @exception std::logic_error thrown by start() if open() was
* unsuccessful, but returned normally (never happens)
* @exception std::runtime_error on errors thrown by the helix player
*/
virtual void
openAndStart(Ptr<Playlist>::Ref playlist)
throw (std::invalid_argument,
std::logic_error,
std::runtime_error)
= 0;
/**
* Set the audio device used for playback.
*

View file

@ -1,321 +0,0 @@
/*------------------------------------------------------------------------------
Copyright (c) 2004 Media Development Loan Fund
This file is part of the LiveSupport project.
http://livesupport.campware.org/
To report bugs, send an e-mail to bugs@campware.org
LiveSupport is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
LiveSupport is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with LiveSupport; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
Author : $Author: maroy $
Version : $Revision: 1.4 $
Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/modules/playlistExecutor/src/Attic/AdviseSink.cxx,v $
------------------------------------------------------------------------------*/
/* ============================================================ include files */
#ifdef HAVE_CONFIG_H
#include "configure.h"
#endif
#include "HelixDefs.h"
#include <hxcom.h>
#include "HelixPlayer.h"
#include "AdviseSink.h"
using namespace LiveSupport::PlaylistExecutor;
/* =================================================== local data structures */
/* ================================================ local constants & macros */
/* =============================================== local function prototypes */
/* ============================================================= module code */
/*------------------------------------------------------------------------------
* Construct the advise sink
*----------------------------------------------------------------------------*/
AdviseSink::AdviseSink(IUnknown * pUnknown,
Ptr<HelixPlayer>::Ref helixPlayer) throw ()
: lRefCount(0)
, pUnknown(NULL)
, pRegistry(NULL)
, pScheduler(NULL)
{
this->helixPlayer = helixPlayer;
if (pUnknown) {
this->pUnknown = pUnknown;
this->pUnknown->AddRef();
if (HXR_OK != this->pUnknown->QueryInterface(IID_IHXRegistry,
(void**)&pRegistry)) {
pRegistry = NULL;
}
if (HXR_OK != this->pUnknown->QueryInterface(IID_IHXScheduler,
(void**)&pScheduler)) {
pScheduler = NULL;
}
IHXPlayer* pPlayer;
if (HXR_OK == this->pUnknown->QueryInterface(IID_IHXPlayer,
(void**)&pPlayer)) {
pPlayer->AddAdviseSink(this);
pPlayer->Release();
}
}
}
/*------------------------------------------------------------------------------
* Destruct the advise sink
*----------------------------------------------------------------------------*/
AdviseSink::~AdviseSink(void) throw ()
{
if (pScheduler) {
pScheduler->Release();
pScheduler = NULL;
}
if (pRegistry) {
pRegistry->Release();
pRegistry = NULL;
}
if (pUnknown) {
pUnknown->Release();
pUnknown = NULL;
}
}
// IUnknown methods
/*------------------------------------------------------------------------------
* Implement this to export the interfaces supported by your
* object.
*----------------------------------------------------------------------------*/
STDMETHODIMP
AdviseSink::QueryInterface(REFIID riid,
void ** ppvObj) throw ()
{
if (IsEqualIID(riid, IID_IUnknown)) {
AddRef();
*ppvObj = (IUnknown*)(IHXClientAdviseSink*)this;
return HXR_OK;
} else if (IsEqualIID(riid, IID_IHXClientAdviseSink)) {
AddRef();
*ppvObj = (IHXClientAdviseSink*)this;
return HXR_OK;
}
*ppvObj = NULL;
return HXR_NOINTERFACE;
}
/*------------------------------------------------------------------------------
* Increase the refence count.
*----------------------------------------------------------------------------*/
STDMETHODIMP_(ULONG32)
AdviseSink::AddRef() throw ()
{
return InterlockedIncrement(&lRefCount);
}
/*------------------------------------------------------------------------------
* Decreaese the refence count.
*----------------------------------------------------------------------------*/
STDMETHODIMP_(ULONG32)
AdviseSink::Release() throw ()
{
if (InterlockedDecrement(&lRefCount) > 0) {
return lRefCount;
}
delete this;
return 0;
}
// IHXClientAdviseSink methods
/*------------------------------------------------------------------------------
* Called to advise the client that the position or length of the
* current playback context has changed.
*----------------------------------------------------------------------------*/
STDMETHODIMP
AdviseSink::OnPosLength(UINT32 ulPosition,
UINT32 ulLength) throw ()
{
helixPlayer->setPlaylength(ulLength);
try {
helixPlayer->implementFading(ulPosition);
} catch (std::runtime_error) {
// TODO: mark error; log it somewhere, maybe?
}
return HXR_OK;
}
/*------------------------------------------------------------------------------
* Called to advise the client a presentation has been opened.
*----------------------------------------------------------------------------*/
STDMETHODIMP
AdviseSink::OnPresentationOpened() throw ()
{
return HXR_OK;
}
/*------------------------------------------------------------------------------
* Called to advise the client a presentation has been closed.
*----------------------------------------------------------------------------*/
STDMETHODIMP
AdviseSink::OnPresentationClosed() throw ()
{
return HXR_OK;
}
/*------------------------------------------------------------------------------
* Called to advise the client that the presentation statistics
* have changed.
*----------------------------------------------------------------------------*/
STDMETHODIMP
AdviseSink::OnStatisticsChanged(void) throw ()
{
return HXR_OK;
}
/*------------------------------------------------------------------------------
* Called by client engine to inform the client that a seek is
* about to occur. The render is informed the last time for the
* stream's time line before the seek, as well as the first new
* time for the stream's time line after the seek will be completed.
*----------------------------------------------------------------------------*/
STDMETHODIMP
AdviseSink::OnPreSeek(ULONG32 ulOldTime,
ULONG32 ulNewTime) throw ()
{
return HXR_OK;
}
/*------------------------------------------------------------------------------
* Called by client engine to inform the client that a seek has
* just occured. The render is informed the last time for the
* stream's time line before the seek, as well as the first new
* time for the stream's time line after the seek.
*----------------------------------------------------------------------------*/
STDMETHODIMP
AdviseSink::OnPostSeek(ULONG32 ulOldTime,
ULONG32 ulNewTime) throw ()
{
return HXR_OK;
}
/*------------------------------------------------------------------------------
* Called by client engine to inform the client that a stop has
* just occured.
*----------------------------------------------------------------------------*/
STDMETHODIMP
AdviseSink::OnStop(void) throw ()
{
HXTimeval now;
// Find out the current time and subtract the beginning time to
// figure out how many seconds we played
now = pScheduler->GetCurrentSchedulerTime();
ulStopTime = now.tv_sec;
helixPlayer->fireOnStopEvent();
// TODO: maybe save the number of seconds played?
// GetGlobal()->g_ulNumSecondsPlayed = ulStopTime - ulStartTime;
return HXR_OK;
}
/*------------------------------------------------------------------------------
* Called by client engine to inform the client that a pause has
* just occured. The render is informed the last time for the
* stream's time line before the pause.
*----------------------------------------------------------------------------*/
STDMETHODIMP
AdviseSink::OnPause(ULONG32 ulTime) throw ()
{
return HXR_OK;
}
/*------------------------------------------------------------------------------
* Called by client engine to inform the client that a begin or
* resume has just occured. The render is informed the first time
* for the stream's time line after the resume.
*----------------------------------------------------------------------------*/
STDMETHODIMP
AdviseSink::OnBegin(ULONG32 ulTime) throw ()
{
HXTimeval now;
// Record the current time, so we can figure out many seconds we played
now = pScheduler->GetCurrentSchedulerTime();
ulStartTime = now.tv_sec;
return HXR_OK;
}
/*------------------------------------------------------------------------------
* Called by client engine to inform the client that buffering
* of data is occuring. The render is informed of the reason for
* the buffering (start-up of stream, seek has occured, network
* congestion, etc.), as well as percentage complete of the
* buffering process.
*----------------------------------------------------------------------------*/
STDMETHODIMP
AdviseSink::OnBuffering(ULONG32 ulFlags,
UINT16 unPercentComplete) throw ()
{
return HXR_OK;
}
/*------------------------------------------------------------------------------
* Called by client engine to inform the client is contacting
* hosts(s).
*----------------------------------------------------------------------------*/
STDMETHODIMP
AdviseSink::OnContacting(const char* pHostName) throw ()
{
return HXR_OK;
}

View file

@ -1,287 +0,0 @@
/*------------------------------------------------------------------------------
Copyright (c) 2004 Media Development Loan Fund
This file is part of the LiveSupport project.
http://livesupport.campware.org/
To report bugs, send an e-mail to bugs@campware.org
LiveSupport is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
LiveSupport is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with LiveSupport; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
Author : $Author: maroy $
Version : $Revision: 1.2 $
Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/modules/playlistExecutor/src/Attic/AdviseSink.h,v $
------------------------------------------------------------------------------*/
#ifndef AdviseSink_h
#define AdviseSink_h
#ifndef __cplusplus
#error This is a C++ include file
#endif
/* ============================================================ include files */
#ifdef HAVE_CONFIG_H
#include "configure.h"
#endif
#include <hxtypes.h>
#include <hxcore.h>
#include <hxmon.h>
#include <hxengin.h>
#include <hxclsnk.h>
#include "LiveSupport/Core/Ptr.h"
namespace LiveSupport {
namespace PlaylistExecutor {
using namespace LiveSupport::Core;
/* ================================================================ constants */
/* =================================================================== macros */
/* =============================================================== data types */
class HelixPlayer;
/**
* A Helix client advise sink, receiving notifications on the status
* of the client playing.
*
* @author $Author: maroy $
* @version $Revision: 1.2 $
*/
class AdviseSink : public IHXClientAdviseSink
{
private:
/**
* The reference count for this object.
*/
LONG32 lRefCount;
/**
* The pointer to the object this is an advise sink for.
*/
IUnknown * pUnknown;
/**
* Pointer to the registry of pUnkown.
*/
IHXRegistry * pRegistry;
/**
* Pointer to the scheduler of pUnkown.
*/
IHXScheduler * pScheduler;
/**
* The time playing is started.
*/
UINT32 ulStartTime;
/**
* The time playing os stopped.
*/
UINT32 ulStopTime;
/**
* The HelixPlayer object this advise sink is associated with.
*/
Ptr<HelixPlayer>::Ref helixPlayer;
public:
/**
* Constructor
*
* @param pUknown the Helix object to initialize this sink with
* @param helixPlayer the HelixPlayer object this sink is
* associated with
*/
AdviseSink(IUnknown * pUnknown,
Ptr<HelixPlayer>::Ref helixPlayer) throw ();
/**
* Destructor.
*/
virtual
~AdviseSink(void) throw ();
// IUnknown methods
/**
* Query the object to determine if it supports a specific interface.
*
* @param riid the reference identifier for the interface queried.
* @param ppvObj points to an interface pointer, that is filled
* if the requested interface is implemented.
*/
STDMETHOD(QueryInterface) (THIS_
REFIID riid,
void** ppvObj) throw ();
/**
* Increase the objects reference count by one.
*
* @return the new reference count.
*/
STDMETHOD_(ULONG32,AddRef) (THIS) throw ();
/**
* Decreases the objects reference count by one. If the count
* reaches 0, the object is destroyed.
*
* @return the new value of the reference count.
*/
STDMETHOD_(ULONG32,Release) (THIS) throw ();
// IHXClientAdviseSink methods
/**
* Called to advise the client that the position or length of the
* current playback context has changed.
*
* @param ulPosition the new position of the playback.
* @param ulLength the new length of the playback.
*/
STDMETHOD(OnPosLength) (THIS_
UINT32 ulPosition,
UINT32 ulLength) throw ();
/**
* Called to advise the client a presentation has been opened.
*/
STDMETHOD(OnPresentationOpened) (THIS) throw ();
/**
* Called to advise the client a presentation has been closed.
*/
STDMETHOD(OnPresentationClosed) (THIS) throw ();
/**
* Called to advise the client that the presentation statistics
* have changed.
*/
STDMETHOD(OnStatisticsChanged) (THIS) throw ();
/**
* Called by client engine to inform the client that a seek is
* about to occur. The render is informed the last time for the
* stream's time line before the seek, as well as the first new
* time for the stream's time line after the seek will be completed.
*
* @param ulOldTime the end of the stream's time line before the
* current seek.
* @param ulNewTime the beginning of the stream's time line after the
* current seek.
*/
STDMETHOD (OnPreSeek) (THIS_
ULONG32 ulOldTime,
ULONG32 ulNewTime) throw ();
/**
* Called by client engine to inform the client that a seek has
* just occured. The render is informed the last time for the
* stream's time line before the seek, as well as the first new
* time for the stream's time line after the seek.
*
* @param ulOldTime the end of the stream's time line before the
* current seek.
* @param ulNewTime the beginning of the stream's time line after the
* current seek.
*/
STDMETHOD (OnPostSeek) (THIS_
ULONG32 ulOldTime,
ULONG32 ulNewTime) throw ();
/**
* Called by client engine to inform the client that a stop has
* just occured.
*/
STDMETHOD (OnStop) (THIS) throw ();
/**
* Called by client engine to inform the client that a pause has
* just occured. The render is informed the last time for the
* stream's time line before the pause.
*
* @param ulTime the time in the streams time line before being
* paused.
*/
STDMETHOD (OnPause) (THIS_
ULONG32 ulTime) throw ();
/**
* Called by client engine to inform the client that a begin or
* resume has just occured. The render is informed the first time
* for the stream's time line after the resume.
*
* The time in the streams time line from which to begin or resume.
*/
STDMETHOD (OnBegin) (THIS_
ULONG32 ulTime) throw ();
/**
* Called by client engine to inform the client that buffering
* of data is occuring. The render is informed of the reason for
* the buffering (start-up of stream, seek has occured, network
* congestion, etc.), as well as percentage complete of the
* buffering process.
*
* @param ulFlags the reason for the buffering, one of:
* BUFFERING_START_UP, BUFFERING_SEEK, BUFFERING_CONGESTION
* or BUFFERING_LIVE_PAUSE
* @param unPercentComplete the percentage of the buffering that has
* completed.
*/
STDMETHOD (OnBuffering) (THIS_
ULONG32 ulFlags,
UINT16 unPercentComplete) throw ();
/**
* Called by client engine to inform the client is contacting
* hosts(s).
*
* @param pHostName the name of the host being contacted.
*/
STDMETHOD (OnContacting) (THIS_
const char* pHostName) throw ();
};
/* ================================================= external data structures */
/* ====================================================== function prototypes */
} // namespace PlaylistExecutor
} // namespace LiveSupport
#endif // AdviseSink_h

View file

@ -22,7 +22,7 @@
Author : $Author: maroy $
Version : $Revision: 1.6 $
Version : $Revision: 1.7 $
Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/modules/playlistExecutor/src/AudioPlayerFactory.cxx,v $
------------------------------------------------------------------------------*/
@ -34,7 +34,6 @@
#endif
#include "LiveSupport/PlaylistExecutor/AudioPlayerFactory.h"
#include "HelixPlayer.h"
#include "GstreamerPlayer.h"
@ -95,18 +94,7 @@ AudioPlayerFactory :: configure(const xmlpp::Element & element)
xmlpp::Node::NodeList nodes;
// try to look for a HelixPlayer configuration element
nodes = element.get_children(HelixPlayer::getConfigElementName());
if (nodes.size() >= 1) {
const xmlpp::Element * configElement =
dynamic_cast<const xmlpp::Element*> (*(nodes.begin()));
Ptr<HelixPlayer>::Ref hp(new HelixPlayer());
hp->configure(*configElement);
audioPlayer = hp;
return;
}
// try to look for a GstreamerPlayer configuration element
nodes = element.get_children(GstreamerPlayer::getConfigElementName());
if (nodes.size() >= 1) {
const xmlpp::Element * configElement =

View file

@ -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/AudioPlayerFactoryGstreamerTest.cxx,v $
------------------------------------------------------------------------------*/
@ -58,7 +58,7 @@ using namespace LiveSupport::PlaylistExecutor;
CPPUNIT_TEST_SUITE_REGISTRATION(AudioPlayerFactoryGstreamerTest);
/**
* The name of the configuration file for the Helix player.
* The name of the configuration file for the audio player.
*/
static const std::string configFileName = "etc/audioPlayerGstreamer.xml";
@ -119,7 +119,7 @@ AudioPlayerFactoryGstreamerTest :: tearDown(void) throw ()
/*------------------------------------------------------------------------------
* Test to see if the HelixPlayer engine can be started and stopped
* Test to see if the audio player engine can be started and stopped
*----------------------------------------------------------------------------*/
void
AudioPlayerFactoryGstreamerTest :: firstTest(void)

View file

@ -1,215 +0,0 @@
/*------------------------------------------------------------------------------
Copyright (c) 2004 Media Development Loan Fund
This file is part of the LiveSupport project.
http://livesupport.campware.org/
To report bugs, send an e-mail to bugs@campware.org
LiveSupport is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
LiveSupport is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with LiveSupport; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
Author : $Author: fgerlits $
Version : $Revision: 1.8 $
Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/modules/playlistExecutor/src/Attic/AudioPlayerFactoryTest.cxx,v $
------------------------------------------------------------------------------*/
/* ============================================================ include files */
#ifdef HAVE_CONFIG_H
#include "configure.h"
#endif
#if HAVE_UNISTD_H
#include <unistd.h>
#else
#error "Need unistd.h"
#endif
#include <string>
#include <iostream>
#include "LiveSupport/Core/TimeConversion.h"
#include "AudioPlayerFactoryTest.h"
using namespace LiveSupport::PlaylistExecutor;
/* =================================================== local data structures */
/* ================================================ local constants & macros */
CPPUNIT_TEST_SUITE_REGISTRATION(AudioPlayerFactoryTest);
/**
* The name of the configuration file for the Helix player.
*/
static const std::string configFileName = "etc/audioPlayer.xml";
/* =============================================== local function prototypes */
/* ============================================================= module code */
/*------------------------------------------------------------------------------
* Set up the test environment
*----------------------------------------------------------------------------*/
void
AudioPlayerFactoryTest :: setUp(void) throw ()
{
try {
Ptr<xmlpp::DomParser>::Ref parser(
new xmlpp::DomParser(configFileName, true));
const xmlpp::Document * document = parser->get_document();
const xmlpp::Element * root = document->get_root_node();
Ptr<AudioPlayerFactory>::Ref audioPlayerFactory;
audioPlayerFactory = AudioPlayerFactory::getInstance();
audioPlayerFactory->configure(*root);
// initialize the audio player configured by the factory
Ptr<AudioPlayerInterface>::Ref audioPlayer;
audioPlayer = audioPlayerFactory->getAudioPlayer();
audioPlayer->initialize();
} catch (std::invalid_argument &e) {
std::cerr << "semantic error in configuration file" << std::endl;
} catch (xmlpp::exception &e) {
std::cerr << e.what() << std::endl;
}
}
/*------------------------------------------------------------------------------
* Clean up the test environment
*----------------------------------------------------------------------------*/
void
AudioPlayerFactoryTest :: tearDown(void) throw ()
{
try {
Ptr<AudioPlayerFactory>::Ref audioPlayerFactory;
audioPlayerFactory = AudioPlayerFactory::getInstance();
// de-initialize the audio player configured by the factory
Ptr<AudioPlayerInterface>::Ref audioPlayer;
audioPlayer = audioPlayerFactory->getAudioPlayer();
audioPlayer->deInitialize();
} catch (xmlpp::exception &e) {
std::cerr << e.what() << std::endl;
}
}
/*------------------------------------------------------------------------------
* Test to see if the HelixPlayer engine can be started and stopped
*----------------------------------------------------------------------------*/
void
AudioPlayerFactoryTest :: firstTest(void)
throw (CPPUNIT_NS::Exception)
{
Ptr<AudioPlayerFactory>::Ref audioPlayerFactory;
audioPlayerFactory = AudioPlayerFactory::getInstance();
CPPUNIT_ASSERT(audioPlayerFactory.get());
Ptr<AudioPlayerInterface>::Ref audioPlayer;
audioPlayer = audioPlayerFactory->getAudioPlayer();
CPPUNIT_ASSERT(audioPlayer.get());
CPPUNIT_ASSERT(!audioPlayer->isPlaying());
}
/*------------------------------------------------------------------------------
* Play something simple
*----------------------------------------------------------------------------*/
void
AudioPlayerFactoryTest :: simplePlayTest(void)
throw (CPPUNIT_NS::Exception)
{
Ptr<AudioPlayerFactory>::Ref audioPlayerFactory;
Ptr<AudioPlayerInterface>::Ref audioPlayer;
Ptr<time_duration>::Ref sleepT;
audioPlayerFactory = AudioPlayerFactory::getInstance();
audioPlayer = audioPlayerFactory->getAudioPlayer();
try {
audioPlayer->open("file:var/test.mp3");
} catch (std::invalid_argument &e) {
CPPUNIT_FAIL(e.what());
}
CPPUNIT_ASSERT(!audioPlayer->isPlaying());
audioPlayer->start();
CPPUNIT_ASSERT(audioPlayer->isPlaying());
sleepT.reset(new time_duration(seconds(5)));
TimeConversion::sleep(sleepT);
audioPlayer->pause();
sleepT.reset(new time_duration(seconds(1)));
TimeConversion::sleep(sleepT);
audioPlayer->start();
sleepT.reset(new time_duration(seconds(2)));
TimeConversion::sleep(sleepT);
audioPlayer->pause();
sleepT.reset(new time_duration(seconds(1)));
TimeConversion::sleep(sleepT);
audioPlayer->start();
sleepT.reset(new time_duration(microseconds(10)));
while (audioPlayer->isPlaying()) {
TimeConversion::sleep(sleepT);
}
CPPUNIT_ASSERT(!audioPlayer->isPlaying());
audioPlayer->close();
}
/*------------------------------------------------------------------------------
* Send stuff to /dev/null
*----------------------------------------------------------------------------*/
void
AudioPlayerFactoryTest :: nullDeviceTest(void)
throw (CPPUNIT_NS::Exception)
{
Ptr<AudioPlayerFactory>::Ref audioPlayerFactory;
Ptr<AudioPlayerInterface>::Ref audioPlayer;
Ptr<time_duration>::Ref sleepT(new time_duration(microseconds(10)));
audioPlayerFactory = AudioPlayerFactory::getInstance();
audioPlayer = audioPlayerFactory->getAudioPlayer();
CPPUNIT_ASSERT_NO_THROW(audioPlayer->open("file:var/simpleSmil.smil"));
CPPUNIT_ASSERT(!audioPlayer->isPlaying());
CPPUNIT_ASSERT(audioPlayer->setAudioDevice("/dev/null"));
CPPUNIT_ASSERT_NO_THROW(audioPlayer->start());
CPPUNIT_ASSERT(audioPlayer->isPlaying());
while (audioPlayer->isPlaying()) {
TimeConversion::sleep(sleepT);
}
CPPUNIT_ASSERT(!audioPlayer->isPlaying());
CPPUNIT_ASSERT(audioPlayer->setAudioDevice(""));
audioPlayer->close();
}

View file

@ -1,126 +0,0 @@
/*------------------------------------------------------------------------------
Copyright (c) 2004 Media Development Loan Fund
This file is part of the LiveSupport project.
http://livesupport.campware.org/
To report bugs, send an e-mail to bugs@campware.org
LiveSupport is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
LiveSupport is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with LiveSupport; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
Author : $Author: fgerlits $
Version : $Revision: 1.2 $
Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/modules/playlistExecutor/src/Attic/AudioPlayerFactoryTest.h,v $
------------------------------------------------------------------------------*/
#ifndef AudioPlayerFactoryTest_h
#define AudioPlayerFactoryTest_h
#ifndef __cplusplus
#error This is a C++ include file
#endif
/* ============================================================ include files */
#ifdef HAVE_CONFIG_H
#include "configure.h"
#endif
#include <cppunit/extensions/HelperMacros.h>
#include "LiveSupport/PlaylistExecutor/AudioPlayerFactory.h"
namespace LiveSupport {
namespace PlaylistExecutor {
/* ================================================================ constants */
/* =================================================================== macros */
/* =============================================================== data types */
/**
* Unit test for the AudioPlayerFactory class.
*
* @author $Author: fgerlits $
* @version $Revision: 1.2 $
* @see AudioPlayerFactory
*/
class AudioPlayerFactoryTest : public CPPUNIT_NS::TestFixture
{
CPPUNIT_TEST_SUITE(AudioPlayerFactoryTest);
CPPUNIT_TEST(firstTest);
CPPUNIT_TEST(nullDeviceTest);
CPPUNIT_TEST(simplePlayTest);
CPPUNIT_TEST_SUITE_END();
protected:
/**
* A simple test.
*
* @exception CPPUNIT_NS::Exception on test failures.
*/
void
firstTest(void) throw (CPPUNIT_NS::Exception);
/**
* Play something simple.
*
* @exception CPPUNIT_NS::Exception on test failures.
*/
void
simplePlayTest(void) throw (CPPUNIT_NS::Exception);
/**
* Check the setAudioDevice() method.
*
* @exception CPPUNIT_NS::Exception on test failures.
*/
void
nullDeviceTest(void) throw (CPPUNIT_NS::Exception);
public:
/**
* Set up the environment for the test case.
*/
void
setUp(void) throw ();
/**
* Clean up the environment after the test case.
*/
void
tearDown(void) throw ();
};
/* ================================================= external data structures */
/* ====================================================== function prototypes */
} // namespace PlaylistExecutor
} // namespace LiveSupport
#endif // AudioPlayerFactoryTest_h

View file

@ -1,134 +0,0 @@
/*------------------------------------------------------------------------------
Copyright (c) 2004 Media Development Loan Fund
This file is part of the LiveSupport project.
http://livesupport.campware.org/
To report bugs, send an e-mail to bugs@campware.org
LiveSupport is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
LiveSupport is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with LiveSupport; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
Author : $Author: maroy $
Version : $Revision: 1.1 $
Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/modules/playlistExecutor/src/Attic/AuthenticationManager.cxx,v $
------------------------------------------------------------------------------*/
/* ============================================================ include files */
#ifdef HAVE_CONFIG_H
#include "configure.h"
#endif
#include "HelixDefs.h"
#include <hxcom.h>
#include "AuthenticationManager.h"
using namespace LiveSupport::PlaylistExecutor;
/* =================================================== local data structures */
/* ================================================ local constants & macros */
/* =============================================== local function prototypes */
/* ============================================================= module code */
/*------------------------------------------------------------------------------
* Construct the Authentication manager
*----------------------------------------------------------------------------*/
AuthenticationManager::AuthenticationManager() throw ()
: lRefCount(0)
{
}
/*------------------------------------------------------------------------------
* Destruct the Authentication manager
*----------------------------------------------------------------------------*/
AuthenticationManager::~AuthenticationManager() throw ()
{
}
// IUnknown methods
/*------------------------------------------------------------------------------
* Implement this to export the interfaces supported by your
* object.
*----------------------------------------------------------------------------*/
STDMETHODIMP
AuthenticationManager::QueryInterface(REFIID riid,
void ** ppvObj) throw ()
{
if (IsEqualIID(riid, IID_IUnknown)) {
AddRef();
*ppvObj = (IUnknown*)(IHXAuthenticationManager*)this;
return HXR_OK;
} else if (IsEqualIID(riid, IID_IHXAuthenticationManager)) {
AddRef();
*ppvObj = (IHXAuthenticationManager*)this;
return HXR_OK;
}
*ppvObj = NULL;
return HXR_NOINTERFACE;
}
/*------------------------------------------------------------------------------
* Increase the refence count.
*----------------------------------------------------------------------------*/
STDMETHODIMP_(UINT32)
AuthenticationManager::AddRef() throw ()
{
return InterlockedIncrement(&lRefCount);
}
/*------------------------------------------------------------------------------
* Decreaese the refence count.
*----------------------------------------------------------------------------*/
STDMETHODIMP_(UINT32)
AuthenticationManager::Release() throw ()
{
if (InterlockedDecrement(&lRefCount) > 0) {
return lRefCount;
}
delete this;
return 0;
}
/*------------------------------------------------------------------------------
* Handle an authentication request.
*----------------------------------------------------------------------------*/
STDMETHODIMP
AuthenticationManager::HandleAuthenticationRequest(
IHXAuthenticationManagerResponse* pResponse)
throw ()
{
// pass on anything
return HXR_OK;
}

View file

@ -1,140 +0,0 @@
/*------------------------------------------------------------------------------
Copyright (c) 2004 Media Development Loan Fund
This file is part of the LiveSupport project.
http://livesupport.campware.org/
To report bugs, send an e-mail to bugs@campware.org
LiveSupport is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
LiveSupport is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with LiveSupport; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
Author : $Author: maroy $
Version : $Revision: 1.1 $
Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/modules/playlistExecutor/src/Attic/AuthenticationManager.h,v $
------------------------------------------------------------------------------*/
#ifndef AuthenticationManager_h
#define AuthenticationManager_h
#ifndef __cplusplus
#error This is a C++ include file
#endif
/* ============================================================ include files */
#ifdef HAVE_CONFIG_H
#include "configure.h"
#endif
#include <hxauth.h>
namespace LiveSupport {
namespace PlaylistExecutor {
using namespace LiveSupport;
/* ================================================================ constants */
/* =================================================================== macros */
/* =============================================================== data types */
/**
* A Helix client authentication manager.
*
* @author $Author: maroy $
* @version $Revision: 1.1 $
*/
class AuthenticationManager : public IHXAuthenticationManager
{
private:
/**
* The reference count of this object.
*/
INT32 lRefCount;
public:
/**
* Constructor.
*/
AuthenticationManager() throw ();
/**
* Destructor.
*/
virtual
~AuthenticationManager() throw ();
// IUnknown methods
/**
* Query the object to determine if it supports a specific interface.
*
* @param riid the reference identifier for the interface queried.
* @param ppvObj points to an interface pointer, that is filled
* if the requested interface is implemented.
*/
STDMETHOD(QueryInterface) (THIS_
REFIID riid,
void** ppvObj) throw ();
/**
* Increase the objects reference count by one.
*
* @return the new reference count.
*/
STDMETHOD_(ULONG32,AddRef) (THIS) throw ();
/**
* Decreases the objects reference count by one. If the count
* reaches 0, the object is destroyed.
*
* @return the new value of the reference count.
*/
STDMETHOD_(ULONG32,Release) (THIS) throw ();
// IHXAuthenticationManager methods
/**
* Get a user name and password, or other authentication parameters.
*
* @param pResponse Ponter to an IHXAuthenticationManagerResponse
* interface that manages the response.
*/
STDMETHOD(HandleAuthenticationRequest)
(IHXAuthenticationManagerResponse* pResponse)
throw ();
};
/* ================================================= external data structures */
/* ====================================================== function prototypes */
} // namespace PlaylistExecutor
} // namespace LiveSupport
#endif // AuthenticationManager_h

View file

@ -1,245 +0,0 @@
/*------------------------------------------------------------------------------
Copyright (c) 2004 Media Development Loan Fund
This file is part of the LiveSupport project.
http://livesupport.campware.org/
To report bugs, send an e-mail to bugs@campware.org
LiveSupport is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
LiveSupport is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with LiveSupport; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
Author : $Author: maroy $
Version : $Revision: 1.2 $
Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/modules/playlistExecutor/src/Attic/ClientContext.cxx,v $
------------------------------------------------------------------------------*/
/* ============================================================ include files */
#ifdef HAVE_CONFIG_H
#include "configure.h"
#endif
#include "HelixDefs.h"
#include <hxbuffer.h>
#include <hxmangle.h>
#include <hxstrutl.h>
#include "ErrorSink.h"
#include "AuthenticationManager.h"
#include "ClientContext.h"
#include "HelixPlayer.h"
using namespace LiveSupport::PlaylistExecutor;
/* =================================================== local data structures */
/* ================================================ local constants & macros */
/* =============================================== local function prototypes */
/* ============================================================= module code */
/*------------------------------------------------------------------------------
* Construct the Client Context
*----------------------------------------------------------------------------*/
ClientContext::ClientContext(Ptr<HelixPlayer>::Ref helixPlayer) throw ()
: lRefCount(0)
, pClientSink(NULL)
, pErrorSink(NULL)
, pAuthMgr(NULL)
, pDefaultPrefs(NULL)
{
this->helixPlayer = helixPlayer;
}
/*------------------------------------------------------------------------------
* Destruct the Client Context
*----------------------------------------------------------------------------*/
ClientContext::~ClientContext() throw ()
{
Close();
};
/*------------------------------------------------------------------------------
* Initialize the Client Context
*----------------------------------------------------------------------------*/
void
ClientContext::Init(IUnknown * pUnknown,
IHXPreferences * pPreferences,
char * pszGUID) throw ()
{
char* pszCipher = NULL;
pClientSink = new AdviseSink(pUnknown, helixPlayer);
pErrorSink = new ErrorSink(pUnknown);
pAuthMgr = new AuthenticationManager();
if (pClientSink) {
pClientSink->AddRef();
}
if (pErrorSink) {
pErrorSink->AddRef();
}
if(pAuthMgr) {
pAuthMgr->AddRef();
}
if (pPreferences) {
pDefaultPrefs = pPreferences;
pDefaultPrefs->AddRef();
}
if (pszGUID && *pszGUID) {
// Encode GUID
pszCipher = Cipher(pszGUID);
SafeStrCpy(this->pszGUID, pszCipher, 256);
} else {
this->pszGUID[0] = '\0';
}
}
/*------------------------------------------------------------------------------
* De-Initialize the Client Context
*----------------------------------------------------------------------------*/
void ClientContext::Close() throw ()
{
HX_RELEASE(pClientSink);
HX_RELEASE(pErrorSink);
HX_RELEASE(pAuthMgr);
HX_RELEASE(pDefaultPrefs);
}
// IUnknown methods
/*------------------------------------------------------------------------------
* Implement this to export the interfaces supported by your
* object.
*----------------------------------------------------------------------------*/
STDMETHODIMP
ClientContext::QueryInterface(REFIID riid,
void ** ppvObj) throw ()
{
if (IsEqualIID(riid, IID_IUnknown)) {
AddRef();
*ppvObj = this;
return HXR_OK;
} else if (IsEqualIID(riid, IID_IHXPreferences)) {
AddRef();
*ppvObj = (IHXPreferences*)this;
return HXR_OK;
} else if (pClientSink &&
pClientSink->QueryInterface(riid, ppvObj) == HXR_OK) {
pClientSink->AddRef();
*ppvObj = pClientSink;
return HXR_OK;
} else if (pErrorSink &&
pErrorSink->QueryInterface(riid, ppvObj) == HXR_OK) {
pErrorSink->AddRef();
*ppvObj = pErrorSink;
return HXR_OK;
} else if (pAuthMgr &&
pAuthMgr->QueryInterface(riid, ppvObj) == HXR_OK) {
pErrorSink->AddRef();
*ppvObj = pAuthMgr;
return HXR_OK;
}
*ppvObj = NULL;
return HXR_NOINTERFACE;
}
/*------------------------------------------------------------------------------
* Increase the refence count.
*----------------------------------------------------------------------------*/
STDMETHODIMP_(ULONG32)
ClientContext::AddRef() throw ()
{
return InterlockedIncrement(&lRefCount);
}
/*------------------------------------------------------------------------------
* Decreaese the refence count.
*----------------------------------------------------------------------------*/
STDMETHODIMP_(ULONG32)
ClientContext::Release() throw ()
{
if (InterlockedDecrement(&lRefCount) > 0) {
return lRefCount;
}
delete this;
return 0;
}
// IHXPreferences methods
/*------------------------------------------------------------------------------
* Read a Preference from the registry.
*----------------------------------------------------------------------------*/
STDMETHODIMP
ClientContext::ReadPref(const char * pPrekKey,
IHXBuffer *& pBuffer) throw ()
{
HX_RESULT hResult = HXR_OK;
if ((stricmp(pPrekKey, CLIENT_GUID_REGNAME) == 0) && (*pszGUID)) {
// Create a Buffer
pBuffer = new CHXBuffer();
pBuffer->AddRef();
// Copy the encoded GUID into the pBuffer
pBuffer->Set((UCHAR*)pszGUID, strlen(pszGUID) + 1);
} else if (pDefaultPrefs) {
hResult = pDefaultPrefs->ReadPref(pPrekKey, pBuffer);
} else {
hResult = HXR_NOTIMPL;
}
return hResult;
}
/*------------------------------------------------------------------------------
* Write a Preference to the registry.
*----------------------------------------------------------------------------*/
STDMETHODIMP
ClientContext::WritePref(const char * pPrekKey,
IHXBuffer * pBuffer) throw ()
{
if (pDefaultPrefs) {
return pDefaultPrefs->WritePref(pPrekKey, pBuffer);
} else {
return HXR_OK;
}
}

View file

@ -1,223 +0,0 @@
/*------------------------------------------------------------------------------
Copyright (c) 2004 Media Development Loan Fund
This file is part of the LiveSupport project.
http://livesupport.campware.org/
To report bugs, send an e-mail to bugs@campware.org
LiveSupport is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
LiveSupport is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with LiveSupport; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
Author : $Author: maroy $
Version : $Revision: 1.2 $
Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/modules/playlistExecutor/src/Attic/ClientContext.h,v $
------------------------------------------------------------------------------*/
#ifndef ClientContext_h
#define ClientContext_h
#ifndef __cplusplus
#error This is a C++ include file
#endif
/* ============================================================ include files */
#ifdef HAVE_CONFIG_H
#include "configure.h"
#endif
#include <hxprefs.h>
#include <ihxpckts.h>
#include "LiveSupport/Core/Ptr.h"
#include "AdviseSink.h"
namespace LiveSupport {
namespace PlaylistExecutor {
using namespace LiveSupport::Core;
/* ================================================================ constants */
/* =================================================================== macros */
/* =============================================================== data types */
class ExampleErrorMessages;
class HelixPlayer;
/**
* A Helix client context.
*
* @author $Author: maroy $
* @version $Revision: 1.2 $
*/
class ClientContext : public IHXPreferences
{
private:
/**
* The reference count of this object.
*/
LONG32 lRefCount;
/**
* The HelixPlayer object this is the client context for,
*/
Ptr<HelixPlayer>::Ref helixPlayer;
/**
* The advise sink recieving event notifications.
*/
AdviseSink * pClientSink;
/**
* The error sink, receiving error notifications.
*/
ErrorSink * pErrorSink;
/**
* The authentication manager.
*/
AuthenticationManager * pAuthMgr;
/**
* The preferences.
*/
IHXPreferences* pDefaultPrefs;
/**
* The GUID for this context.
*/
char pszGUID[256]; /* Flawfinder: ignore */
public:
/**
* Constructor.
*
* @param helixPlayer the HelixPlayer this is a client context for.
*/
ClientContext(Ptr<HelixPlayer>::Ref helixPlayer) throw ();
/**
* Destructor.
*/
virtual
~ClientContext() throw ();
/**
* Initialize the client context.
* Always close a context by calling Close().
*
* @param pUnknown pointer to the object this will be a context for.
* @param pPreferences pointer to the helix preferences used.
* @param pszGUID the globally unique ID, if any, for the context.
* @see #Close
*/
void
Init(IUnknown * pUnknown,
IHXPreferences * pPreferences,
char * pszGUID) throw ();
/**
* De-Initialize the client context.
*
* @see #Init
*/
void Close() throw ();
/**
* Return the ErrorSink object for this client context.
*
* @return the ErrorSink object for this client context.
*/
ErrorSink *
getErrorSink(void) const throw ()
{
return pErrorSink;
}
// IUnknown methods
/**
* Query the object to determine if it supports a specific interface.
*
* @param riid the reference identifier for the interface queried.
* @param ppvObj points to an interface pointer, that is filled
* if the requested interface is implemented.
*/
STDMETHOD(QueryInterface) (THIS_
REFIID riid,
void** ppvObj) throw ();
/**
* Increase the objects reference count by one.
*
* @return the new reference count.
*/
STDMETHOD_(ULONG32,AddRef) (THIS) throw ();
/**
* Decreases the objects reference count by one. If the count
* reaches 0, the object is destroyed.
*
* @return the new value of the reference count.
*/
STDMETHOD_(ULONG32,Release) (THIS) throw ();
// IHXPreferences methods
/**
* Reaad a preference from the registry or configuration file.
*
* @param pPrekKey pointer to the name of the preference.
* @param pBuffer return a pointer to an IHXBuffer interface
* that manages the value of the preference.
*/
STDMETHOD(ReadPref) (THIS_
const char * pPrekKey,
IHXBuffer *& pBuffer) throw ();
/**
* Writes a preference to the registry of configuration file.
*
* @param pPrekKey pointer to the name of the preference.
* @param pBuffer return a pointer to an IHXBuffer interface
* that manages the value of the preference.
*/
STDMETHOD(WritePref) (THIS_
const char * pPrekKey,
IHXBuffer * pBuffer) throw ();
};
/* ================================================= external data structures */
/* ====================================================== function prototypes */
} // namespace PlaylistExecutor
} // namespace LiveSupport
#endif // ClientContext_h

View file

@ -1,157 +0,0 @@
/*------------------------------------------------------------------------------
Copyright (c) 2004 Media Development Loan Fund
This file is part of the LiveSupport project.
http://livesupport.campware.org/
To report bugs, send an e-mail to bugs@campware.org
LiveSupport is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
LiveSupport is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with LiveSupport; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
Author : $Author: maroy $
Version : $Revision: 1.3 $
Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/modules/playlistExecutor/src/Attic/ErrorSink.cxx,v $
------------------------------------------------------------------------------*/
/* ============================================================ include files */
#ifdef HAVE_CONFIG_H
#include "configure.h"
#endif
#include <iostream>
#include "HelixDefs.h"
#include <hxcom.h>
#include "ErrorSink.h"
using namespace LiveSupport::PlaylistExecutor;
/* =================================================== local data structures */
/* ================================================ local constants & macros */
/* =============================================== local function prototypes */
/* ============================================================= module code */
/*------------------------------------------------------------------------------
* Construct the Error Sink
*----------------------------------------------------------------------------*/
ErrorSink::ErrorSink(IUnknown* pUnknown) throw ()
: lRefCount(0),
pPlayer(NULL),
lastHelixErrorCode(0)
{
IHXClientEngine* pEngine = NULL;
pUnknown->QueryInterface(IID_IHXClientEngine, (void**)&pEngine );
if( pEngine ) {
IUnknown* pTmp = NULL;
pEngine->GetPlayer(0, pTmp);
pPlayer = (IHXPlayer*)pTmp;
}
HX_RELEASE( pEngine );
// HX_ASSERT(pPlayer);
}
/*------------------------------------------------------------------------------
* Destruct the Error Sink
*----------------------------------------------------------------------------*/
ErrorSink::~ErrorSink() throw ()
{
HX_RELEASE(pPlayer);
}
// IUnknown methods
/*------------------------------------------------------------------------------
* Implement this to export the interfaces supported by your
* object.
*----------------------------------------------------------------------------*/
STDMETHODIMP
ErrorSink::QueryInterface(REFIID riid,
void ** ppvObj) throw ()
{
if (IsEqualIID(riid, IID_IUnknown)) {
AddRef();
*ppvObj = (IUnknown*)(IHXErrorSink*)this;
return HXR_OK;
} else if (IsEqualIID(riid, IID_IHXErrorSink)) {
AddRef();
*ppvObj = (IHXErrorSink*) this;
return HXR_OK;
}
*ppvObj = NULL;
return HXR_NOINTERFACE;
}
/*------------------------------------------------------------------------------
* Increase the refence count.
*----------------------------------------------------------------------------*/
STDMETHODIMP_(ULONG32)
ErrorSink::AddRef() throw ()
{
return InterlockedIncrement(&lRefCount);
}
/*------------------------------------------------------------------------------
* Decreaese the refence count.
*----------------------------------------------------------------------------*/
STDMETHODIMP_(ULONG32)
ErrorSink::Release() throw ()
{
if (InterlockedDecrement(&lRefCount) > 0) {
return lRefCount;
}
delete this;
return 0;
}
// IHXErrorSink methods
/*------------------------------------------------------------------------------
* Handle an error event.
*----------------------------------------------------------------------------*/
STDMETHODIMP
ErrorSink::ErrorOccurred(const UINT8 unSeverity,
const ULONG32 ulHXCode,
const ULONG32 ulUserCode,
const char * pUserString,
const char * pMoreInfoURL) throw ()
{
lastHelixErrorCode = ulHXCode;
// TODO: do something useful with the error event
if (lastHelixErrorCode) {
std::cerr << "Helix error: " << std::hex << ulHXCode << std::endl;
}
return HXR_OK;
}

View file

@ -1,176 +0,0 @@
/*------------------------------------------------------------------------------
Copyright (c) 2004 Media Development Loan Fund
This file is part of the LiveSupport project.
http://livesupport.campware.org/
To report bugs, send an e-mail to bugs@campware.org
LiveSupport is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
LiveSupport is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with LiveSupport; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
Author : $Author: maroy $
Version : $Revision: 1.1 $
Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/modules/playlistExecutor/src/Attic/ErrorSink.h,v $
------------------------------------------------------------------------------*/
#ifndef ErrorSink_h
#define ErrorSink_h
#ifndef __cplusplus
#error This is a C++ include file
#endif
/* ============================================================ include files */
#ifdef HAVE_CONFIG_H
#include "configure.h"
#endif
#include <hxcore.h>
#include <hxerror.h>
namespace LiveSupport {
namespace PlaylistExecutor {
using namespace LiveSupport;
/* ================================================================ constants */
/* =================================================================== macros */
/* =============================================================== data types */
/**
* A Helix error sink
*
* @author $Author: maroy $
* @version $Revision: 1.1 $
*/
class ErrorSink : public IHXErrorSink
{
protected:
/**
* The reference count of this object.
*/
LONG32 lRefCount;
/**
* The player this sink gets errors from.
*/
IHXPlayer * pPlayer;
/**
* The last Helix error code receieved.
*/
UINT32 lastHelixErrorCode;
public:
/**
* Constructor.
*
* @param pUnkown pointer to the object this is an erro sink for.
*/
ErrorSink(IUnknown* pUnknown) throw ();
/**
* Destructor.
*/
virtual
~ErrorSink() throw ();
// IUnknown methods
/**
* Query the object to determine if it supports a specific interface.
*
* @param riid the reference identifier for the interface queried.
* @param ppvObj points to an interface pointer, that is filled
* if the requested interface is implemented.
*/
STDMETHOD(QueryInterface) (THIS_
REFIID riid,
void** ppvObj) throw ();
/**
* Increase the objects reference count by one.
*
* @return the new reference count.
*/
STDMETHOD_(ULONG32,AddRef) (THIS) throw ();
/**
* Decreases the objects reference count by one. If the count
* reaches 0, the object is destroyed.
*
* @return the new value of the reference count.
*/
STDMETHOD_(ULONG32,Release) (THIS) throw ();
// IHXErrorSink methods
/**
* After you have registered your error sink with an
* IHXErrorSinkControl
* (either in the server or player core) this method will be called to
* report an error, event, or status message.
*
* @param unSeverity the type of report.
* @param ulHXCode Helix Architecture error code.
* @param ulUserCode User-specific error code.
* @param pUserString User-specific error string.
* @param pMoreInfoURL pointer to a user-specific URL for more info.
*/
STDMETHOD(ErrorOccurred) (THIS_
const UINT8 unSeverity,
const ULONG32 ulHXCode,
const ULONG32 ulUserCode,
const char * pUserString,
const char * pMoreInfoURL)
throw ();
/**
* Get the Helix error code for the last error occured.
*
* @return the Helix error code for the last error occured.
*/
ULONG32
getLastErrorCode(void) const throw ()
{
return lastHelixErrorCode;
}
};
/* ================================================= external data structures */
/* ====================================================== function prototypes */
} // namespace PlaylistExecutor
} // namespace LiveSupport
#endif // ErrorSink_h

View file

@ -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/GstreamerPlayer.cxx,v $
------------------------------------------------------------------------------*/
@ -64,7 +64,7 @@ static const std::string audioDeviceName = "audioDevice";
/* ============================================================= module code */
/*------------------------------------------------------------------------------
* Configure the Helix Player.
* Configure the Audio Player.
*----------------------------------------------------------------------------*/
void
GstreamerPlayer :: configure(const xmlpp::Element & element)
@ -86,7 +86,7 @@ GstreamerPlayer :: configure(const xmlpp::Element & element)
/*------------------------------------------------------------------------------
* Initialize the Helix Player
* Initialize the Audio Player
*----------------------------------------------------------------------------*/
void
GstreamerPlayer :: initialize(void) throw (std::exception)
@ -390,18 +390,6 @@ GstreamerPlayer :: setVolume(unsigned int volume) throw ()
}
/*------------------------------------------------------------------------------
* Open a playlist, with simulated fading.
*----------------------------------------------------------------------------*/
void
GstreamerPlayer :: openAndStart(Ptr<Playlist>::Ref playlist)
throw (std::invalid_argument,
std::logic_error,
std::runtime_error)
{
}
/*------------------------------------------------------------------------------
* Set the audio device.
*----------------------------------------------------------------------------*/

View file

@ -22,7 +22,7 @@
Author : $Author: maroy $
Version : $Revision: 1.4 $
Version : $Revision: 1.5 $
Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/modules/playlistExecutor/src/GstreamerPlayer.h,v $
------------------------------------------------------------------------------*/
@ -86,7 +86,7 @@ using namespace LiveSupport::Core;
* </code></pre>
*
* @author $Author: maroy $
* @version $Revision: 1.4 $
* @version $Revision: 1.5 $
*/
class GstreamerPlayer : virtual public Configurable,
virtual public AudioPlayerInterface
@ -243,7 +243,7 @@ class GstreamerPlayer : virtual public Configurable,
std::logic_error);
/**
* Initialize the Helix Player object, so that it is ready to
* Initialize the Audio Player object, so that it is ready to
* play audio files.
*
* @exception std::exception on initialization problems.
@ -252,7 +252,7 @@ class GstreamerPlayer : virtual public Configurable,
initialize(void) throw (std::exception);
/**
* De-initialize the Helix Player object.
* De-initialize the Audio Player object.
*/
virtual void
deInitialize(void) throw ();
@ -387,30 +387,6 @@ class GstreamerPlayer : virtual public Configurable,
virtual void
setVolume(unsigned int volume) throw ();
/**
* Play a playlist, with simulated fading.
*
* This is a stopgap method, and should be replaced as soon as
* the SMIL animation issues are fixed in the Helix client.
*
* The playlist is assumed to contain a URI field, which points
* to a SMIL file containing the same audio clips, with the same
* offsets, as the playlist. This can be ensured, for example, by
* calling Storage::WebStorageClient::acquirePlaylist().
*
* @param playlist the Playlist object to be played.
* @exception std::invalid_argument playlist is invalid (e.g.,
* does not have a URI field, or there is no valid
* SMIL file at the given URI).
* @exception std::logic_error thrown by start() if open() was
* unsuccessful, but returned normally (never happens)
* @exception std::runtime_error on errors thrown by the helix player
*/
virtual void
openAndStart(Ptr<Playlist>::Ref playlist)
throw (std::invalid_argument,
std::logic_error,
std::runtime_error);
};

View file

@ -21,8 +21,8 @@
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
Author : $Author: fgerlits $
Version : $Revision: 1.3 $
Author : $Author: maroy $
Version : $Revision: 1.4 $
Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/modules/playlistExecutor/src/GstreamerPlayerTest.cxx,v $
------------------------------------------------------------------------------*/
@ -60,7 +60,7 @@ using namespace LiveSupport::PlaylistExecutor;
CPPUNIT_TEST_SUITE_REGISTRATION(GstreamerPlayerTest);
/**
* The name of the configuration file for the Helix player.
* The name of the configuration file for the audio player.
*/
static const std::string configFileName = "etc/gstreamerPlayer.xml";

View file

@ -1,524 +0,0 @@
/*------------------------------------------------------------------------------
Copyright (c) 2004 Media Development Loan Fund
This file is part of the LiveSupport project.
http://livesupport.campware.org/
To report bugs, send an e-mail to bugs@campware.org
LiveSupport is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
LiveSupport is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with LiveSupport; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
Author : $Author: maroy $
Version : $Revision: 1.1 $
Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/modules/playlistExecutor/src/Attic/HelixDefs.h,v $
------------------------------------------------------------------------------*/
#ifndef HelixDefs_h
#define HelixDefs_h
#ifndef __cplusplus
#error This is a C++ include file
#endif
/* ============================================================ include files */
/* ================================================================ constants */
/* =================================================================== macros */
/*------------------------------------------------------------------------------
* This is a list of defines used by the Helix Library.
* Some of these are Linux-specific, watch out when porting to other
* platforms.
*----------------------------------------------------------------------------*/
#ifndef HELIX_CONFIG_MS_PSDK
#define HELIX_CONFIG_MS_PSDK 1
#endif
#ifndef HELIX_FEATURE_3GPP
#define HELIX_FEATURE_3GPP 1
#endif
#ifndef HELIX_FEATURE_ADVANCEDGROUPMGR
#define HELIX_FEATURE_ADVANCEDGROUPMGR 1
#endif
#ifndef HELIX_FEATURE_ALT_URL
#define HELIX_FEATURE_ALT_URL 1
#endif
#ifndef HELIX_FEATURE_ASM
#define HELIX_FEATURE_ASM 1
#endif
#ifndef HELIX_FEATURE_AUDIO
#define HELIX_FEATURE_AUDIO 1
#endif
#ifndef HELIX_FEATURE_AUDIOHOOK
#define HELIX_FEATURE_AUDIOHOOK 1
#endif
#ifndef HELIX_FEATURE_AUDIO_AIFF
#define HELIX_FEATURE_AUDIO_AIFF 1
#endif
#ifndef HELIX_FEATURE_AUDIO_AU
#define HELIX_FEATURE_AUDIO_AU 1
#endif
#ifndef HELIX_FEATURE_AUDIO_CODEC_28_8
#define HELIX_FEATURE_AUDIO_CODEC_28_8 1
#endif
#ifndef HELIX_FEATURE_AUDIO_CODEC_AMRNB
#define HELIX_FEATURE_AUDIO_CODEC_AMRNB 1
#endif
#ifndef HELIX_FEATURE_AUDIO_CODEC_AMRWB
#define HELIX_FEATURE_AUDIO_CODEC_AMRWB 1
#endif
#ifndef HELIX_FEATURE_AUDIO_CODEC_GECKO
#define HELIX_FEATURE_AUDIO_CODEC_GECKO 1
#endif
#ifndef HELIX_FEATURE_AUDIO_CODEC_INTERLEAVE_ALL
#define HELIX_FEATURE_AUDIO_CODEC_INTERLEAVE_ALL 1
#endif
#ifndef HELIX_FEATURE_AUDIO_CODEC_O5_6
#define HELIX_FEATURE_AUDIO_CODEC_O5_6 1
#endif
#ifndef HELIX_FEATURE_AUDIO_CODEC_QCELP
#define HELIX_FEATURE_AUDIO_CODEC_QCELP 1
#endif
#ifndef HELIX_FEATURE_AUDIO_CODEC_RAAC
#define HELIX_FEATURE_AUDIO_CODEC_RAAC 1
#endif
#ifndef HELIX_FEATURE_AUDIO_CODEC_SIPRO
#define HELIX_FEATURE_AUDIO_CODEC_SIPRO 1
#endif
#ifndef HELIX_FEATURE_AUDIO_CODEC_TOKYO
#define HELIX_FEATURE_AUDIO_CODEC_TOKYO 1
#endif
#ifndef HELIX_FEATURE_AUDIO_INACCURATESAMPLING
#define HELIX_FEATURE_AUDIO_INACCURATESAMPLING 1
#endif
#ifndef HELIX_FEATURE_AUDIO_INCOMPLETESAMPLE
#define HELIX_FEATURE_AUDIO_INCOMPLETESAMPLE 1
#endif
#ifndef HELIX_FEATURE_AUDIO_MPA_LAYER1
#define HELIX_FEATURE_AUDIO_MPA_LAYER1 1
#endif
#ifndef HELIX_FEATURE_AUDIO_MPA_LAYER2
#define HELIX_FEATURE_AUDIO_MPA_LAYER2 1
#endif
#ifndef HELIX_FEATURE_AUDIO_MPA_LAYER3
#define HELIX_FEATURE_AUDIO_MPA_LAYER3 1
#endif
#ifndef HELIX_FEATURE_AUDIO_MPEG4
#define HELIX_FEATURE_AUDIO_MPEG4 1
#endif
#ifndef HELIX_FEATURE_AUDIO_MULTIPLAYER_PAUSE
#define HELIX_FEATURE_AUDIO_MULTIPLAYER_PAUSE 1
#endif
#ifndef HELIX_FEATURE_AUDIO_POSTMIXHOOK
#define HELIX_FEATURE_AUDIO_POSTMIXHOOK 1
#endif
#ifndef HELIX_FEATURE_AUDIO_PREMIXHOOK
#define HELIX_FEATURE_AUDIO_PREMIXHOOK 1
#endif
#ifndef HELIX_FEATURE_AUDIO_RALF
#define HELIX_FEATURE_AUDIO_RALF 1
#endif
#ifndef HELIX_FEATURE_AUDIO_REAL
#define HELIX_FEATURE_AUDIO_REAL 1
#endif
#ifndef HELIX_FEATURE_AUDIO_WAVE
#define HELIX_FEATURE_AUDIO_WAVE 1
#endif
#ifndef HELIX_FEATURE_AUTHENTICATION
#define HELIX_FEATURE_AUTHENTICATION 1
#endif
#ifndef HELIX_FEATURE_AUTOUPGRADE
#define HELIX_FEATURE_AUTOUPGRADE 1
#endif
#ifndef HELIX_FEATURE_BASICGROUPMGR
#define HELIX_FEATURE_BASICGROUPMGR 1
#endif
#ifndef HELIX_FEATURE_CHUNKRES
#define HELIX_FEATURE_CHUNKRES 1
#endif
#ifndef HELIX_FEATURE_CLIENT
#define HELIX_FEATURE_CLIENT 1
#endif
#ifndef HELIX_FEATURE_COOKIES
#define HELIX_FEATURE_COOKIES 1
#endif
#ifndef HELIX_FEATURE_CORECOMM
#define HELIX_FEATURE_CORECOMM 1
#endif
#ifndef HELIX_FEATURE_CROSSFADE
#define HELIX_FEATURE_CROSSFADE 1
#endif
#ifndef HELIX_FEATURE_DBG_LOG
#define HELIX_FEATURE_DBG_LOG 1
#endif
#ifndef HELIX_FEATURE_DIRECT_SOUND
#define HELIX_FEATURE_DIRECT_SOUND 1
#endif
#ifndef HELIX_FEATURE_DRM
#define HELIX_FEATURE_DRM 1
#endif
#ifndef HELIX_FEATURE_DTDR_AUDIO_DECODER
#define HELIX_FEATURE_DTDR_AUDIO_DECODER 1
#endif
#ifndef HELIX_FEATURE_DTDR_DECRYPTER
#define HELIX_FEATURE_DTDR_DECRYPTER 1
#endif
#ifndef HELIX_FEATURE_DTDR_ENCODER
#define HELIX_FEATURE_DTDR_ENCODER 1
#endif
#ifndef HELIX_FEATURE_DTDR_MIXER
#define HELIX_FEATURE_DTDR_MIXER 1
#endif
#ifndef HELIX_FEATURE_EVENTMANAGER
#define HELIX_FEATURE_EVENTMANAGER 1
#endif
#ifndef HELIX_FEATURE_FIFOCACHE
#define HELIX_FEATURE_FIFOCACHE 1
#endif
#ifndef HELIX_FEATURE_FILESYSTEMMGR
#define HELIX_FEATURE_FILESYSTEMMGR 1
#endif
#ifndef HELIX_FEATURE_FRAGMENTBUFFER
#define HELIX_FEATURE_FRAGMENTBUFFER 1
#endif
#ifndef HELIX_FEATURE_FULLGUID
#define HELIX_FEATURE_FULLGUID 1
#endif
#ifndef HELIX_FEATURE_GAINTOOL
#define HELIX_FEATURE_GAINTOOL 1
#endif
#ifndef HELIX_FEATURE_GIF_BROKENIMAGE
#define HELIX_FEATURE_GIF_BROKENIMAGE 1
#endif
#ifndef HELIX_FEATURE_GROUPMGR
#define HELIX_FEATURE_GROUPMGR 1
#endif
#ifndef HELIX_FEATURE_HTTPCLOAK
#define HELIX_FEATURE_HTTPCLOAK 1
#endif
#ifndef HELIX_FEATURE_HTTP_GZIP
#define HELIX_FEATURE_HTTP_GZIP 1
#endif
#ifndef HELIX_FEATURE_HYPER_NAVIGATE
#define HELIX_FEATURE_HYPER_NAVIGATE 1
#endif
#ifndef HELIX_FEATURE_IGNORE_SIGPIPE
#define HELIX_FEATURE_IGNORE_SIGPIPE 1
#endif
#ifndef HELIX_FEATURE_ISMA
#define HELIX_FEATURE_ISMA 1
#endif
#ifndef HELIX_FEATURE_LIMITER
#define HELIX_FEATURE_LIMITER 1
#endif
#ifndef HELIX_FEATURE_MASTERTAC
#define HELIX_FEATURE_MASTERTAC 1
#endif
#ifndef HELIX_FEATURE_MEDIAMARKER
#define HELIX_FEATURE_MEDIAMARKER 1
#endif
#ifndef HELIX_FEATURE_MEMMAP_IO
#define HELIX_FEATURE_MEMMAP_IO 1
#endif
#ifndef HELIX_FEATURE_META
#define HELIX_FEATURE_META 1
#endif
#ifndef HELIX_FEATURE_MIXER
#define HELIX_FEATURE_MIXER 1
#endif
#ifndef HELIX_FEATURE_MP3FF_LENIENT
#define HELIX_FEATURE_MP3FF_LENIENT 1
#endif
#ifndef HELIX_FEATURE_MP3FF_ONDEMANDMETAINFO
#define HELIX_FEATURE_MP3FF_ONDEMANDMETAINFO 1
#endif
#ifndef HELIX_FEATURE_MP3FF_SHOUTCAST
#define HELIX_FEATURE_MP3FF_SHOUTCAST 1
#endif
#ifndef HELIX_FEATURE_MP4_FILEFORMAT_ALTERNATES
#define HELIX_FEATURE_MP4_FILEFORMAT_ALTERNATES 1
#endif
#ifndef HELIX_FEATURE_NESTEDMETA
#define HELIX_FEATURE_NESTEDMETA 1
#endif
#ifndef HELIX_FEATURE_NETCHECK
#define HELIX_FEATURE_NETCHECK 1
#endif
#ifndef HELIX_FEATURE_NETINTERFACES
#define HELIX_FEATURE_NETINTERFACES 1
#endif
#ifndef HELIX_FEATURE_NETSERVICES_SHIM
#define HELIX_FEATURE_NETSERVICES_SHIM 1
#endif
#ifndef HELIX_FEATURE_NEXTGROUPMGR
#define HELIX_FEATURE_NEXTGROUPMGR 1
#endif
#ifndef HELIX_FEATURE_OPTIMIZED_SCHEDULER
#define HELIX_FEATURE_OPTIMIZED_SCHEDULER 1
#endif
#ifndef HELIX_FEATURE_OVERLAYMGR
#define HELIX_FEATURE_OVERLAYMGR 1
#endif
#ifndef HELIX_FEATURE_PAC
#define HELIX_FEATURE_PAC 1
#endif
#ifndef HELIX_FEATURE_PACKETHOOKMGR
#define HELIX_FEATURE_PACKETHOOKMGR 1
#endif
#ifndef HELIX_FEATURE_PLAYBACK_LOCAL
#define HELIX_FEATURE_PLAYBACK_LOCAL 1
#endif
#ifndef HELIX_FEATURE_PLAYBACK_NET
#define HELIX_FEATURE_PLAYBACK_NET 1
#endif
#ifndef HELIX_FEATURE_PLAYERNAVIGATOR
#define HELIX_FEATURE_PLAYERNAVIGATOR 1
#endif
#ifndef HELIX_FEATURE_PLUGINHANDLER2
#define HELIX_FEATURE_PLUGINHANDLER2 1
#endif
#ifndef HELIX_FEATURE_PNA
#define HELIX_FEATURE_PNA 1
#endif
#ifndef HELIX_FEATURE_PREFERENCES
#define HELIX_FEATURE_PREFERENCES 1
#endif
#ifndef HELIX_FEATURE_PREFETCH
#define HELIX_FEATURE_PREFETCH 1
#endif
#ifndef HELIX_FEATURE_PROGDOWN
#define HELIX_FEATURE_PROGDOWN 1
#endif
#ifndef HELIX_FEATURE_PROXYMGR
#define HELIX_FEATURE_PROXYMGR 1
#endif
#ifndef HELIX_FEATURE_RAREND_ADV_PACKET_FEEDER
#define HELIX_FEATURE_RAREND_ADV_PACKET_FEEDER 1
#endif
#ifndef HELIX_FEATURE_RAREND_BANDWIDTH_LISTER
#define HELIX_FEATURE_RAREND_BANDWIDTH_LISTER 1
#endif
#ifndef HELIX_FEATURE_RAREND_PREREDSTONE_SUPPORT
#define HELIX_FEATURE_RAREND_PREREDSTONE_SUPPORT 1
#endif
#ifndef HELIX_FEATURE_RAREND_SURESTREAM
#define HELIX_FEATURE_RAREND_SURESTREAM 1
#endif
#ifndef HELIX_FEATURE_RDT
#define HELIX_FEATURE_RDT 1
#endif
#ifndef HELIX_FEATURE_RECORDCONTROL
#define HELIX_FEATURE_RECORDCONTROL 1
#endif
#ifndef HELIX_FEATURE_REGISTRY
#define HELIX_FEATURE_REGISTRY 1
#endif
#ifndef HELIX_FEATURE_RESAMPLER
#define HELIX_FEATURE_RESAMPLER 1
#endif
#ifndef HELIX_FEATURE_RESOURCEMGR
#define HELIX_FEATURE_RESOURCEMGR 1
#endif
#ifndef HELIX_FEATURE_REVERTER
#define HELIX_FEATURE_REVERTER 1
#endif
#ifndef HELIX_FEATURE_RMFF_BANDWIDTH_NEGOTIATOR
#define HELIX_FEATURE_RMFF_BANDWIDTH_NEGOTIATOR 1
#endif
#ifndef HELIX_FEATURE_RMFF_DYNAMICASM
#define HELIX_FEATURE_RMFF_DYNAMICASM 1
#endif
#ifndef HELIX_FEATURE_RMFF_INDEXTABLE
#define HELIX_FEATURE_RMFF_INDEXTABLE 1
#endif
#ifndef HELIX_FEATURE_RMFF_LEGACYAUDIO
#define HELIX_FEATURE_RMFF_LEGACYAUDIO 1
#endif
#ifndef HELIX_FEATURE_RMFF_LICENSING
#define HELIX_FEATURE_RMFF_LICENSING 1
#endif
#ifndef HELIX_FEATURE_RMFF_LIVEINFO
#define HELIX_FEATURE_RMFF_LIVEINFO 1
#endif
#ifndef HELIX_FEATURE_RMFF_MULTIRATE
#define HELIX_FEATURE_RMFF_MULTIRATE 1
#endif
#ifndef HELIX_FEATURE_RMFF_ONDEMANDMETAINFO
#define HELIX_FEATURE_RMFF_ONDEMANDMETAINFO 1
#endif
#ifndef HELIX_FEATURE_RMFF_TIMEOFFSET_FIXUP
#define HELIX_FEATURE_RMFF_TIMEOFFSET_FIXUP 1
#endif
#ifndef HELIX_FEATURE_RMFF_TIMEOFFSET_HANDLER
#define HELIX_FEATURE_RMFF_TIMEOFFSET_HANDLER 1
#endif
#ifndef HELIX_FEATURE_RMFF_VIEWSOURCE
#define HELIX_FEATURE_RMFF_VIEWSOURCE 1
#endif
#ifndef HELIX_FEATURE_RTP
#define HELIX_FEATURE_RTP 1
#endif
#ifndef HELIX_FEATURE_SECURECONN
#define HELIX_FEATURE_SECURECONN 1
#endif
#ifndef HELIX_FEATURE_SETSRCPROPS
#define HELIX_FEATURE_SETSRCPROPS 1
#endif
#ifndef HELIX_FEATURE_SINKCONTROL
#define HELIX_FEATURE_SINKCONTROL 1
#endif
#ifndef HELIX_FEATURE_SMARTERNETWORK
#define HELIX_FEATURE_SMARTERNETWORK 1
#endif
#ifndef HELIX_FEATURE_SMIL1
#define HELIX_FEATURE_SMIL1 1
#endif
#ifndef HELIX_FEATURE_SMIL2
#define HELIX_FEATURE_SMIL2 1
#endif
#ifndef HELIX_FEATURE_SMIL2_ANIMATION
#define HELIX_FEATURE_SMIL2_ANIMATION 1
#endif
#ifndef HELIX_FEATURE_SMIL2_BRUSH
#define HELIX_FEATURE_SMIL2_BRUSH 1
#endif
#ifndef HELIX_FEATURE_SMIL2_MULTIWINDOWLAYOUT
#define HELIX_FEATURE_SMIL2_MULTIWINDOWLAYOUT 1
#endif
#ifndef HELIX_FEATURE_SMIL2_TRANSITIONS
#define HELIX_FEATURE_SMIL2_TRANSITIONS 1
#endif
#ifndef HELIX_FEATURE_SMIL2_VALIDATION
#define HELIX_FEATURE_SMIL2_VALIDATION 1
#endif
#ifndef HELIX_FEATURE_SMIL_REPEAT
#define HELIX_FEATURE_SMIL_REPEAT 1
#endif
#ifndef HELIX_FEATURE_SMIL_SITE
#define HELIX_FEATURE_SMIL_SITE 1
#endif
#ifndef HELIX_FEATURE_SMIL_SOUNDLEVEL
#define HELIX_FEATURE_SMIL_SOUNDLEVEL 1
#endif
#ifndef HELIX_FEATURE_STATS
#define HELIX_FEATURE_STATS 1
#endif
#ifndef HELIX_FEATURE_SYSTEMREQUIRED
#define HELIX_FEATURE_SYSTEMREQUIRED 1
#endif
#ifndef HELIX_FEATURE_THREADSAFE_MEMMAP_IO
#define HELIX_FEATURE_THREADSAFE_MEMMAP_IO 1
#endif
#ifndef HELIX_FEATURE_TIMEDTEXT
#define HELIX_FEATURE_TIMEDTEXT 1
#endif
#ifndef HELIX_FEATURE_TRANSPORT_MULTICAST
#define HELIX_FEATURE_TRANSPORT_MULTICAST 1
#endif
#ifndef HELIX_FEATURE_TURBOPLAY
#define HELIX_FEATURE_TURBOPLAY 1
#endif
#ifndef HELIX_FEATURE_VIDEO
#define HELIX_FEATURE_VIDEO 1
#endif
#ifndef HELIX_FEATURE_VIDEO_CODEC_RV10
#define HELIX_FEATURE_VIDEO_CODEC_RV10 1
#endif
#ifndef HELIX_FEATURE_VIDEO_CODEC_RV20
#define HELIX_FEATURE_VIDEO_CODEC_RV20 1
#endif
#ifndef HELIX_FEATURE_VIDEO_CODEC_RV30
#define HELIX_FEATURE_VIDEO_CODEC_RV30 1
#endif
#ifndef HELIX_FEATURE_VIDEO_CODEC_RV40
#define HELIX_FEATURE_VIDEO_CODEC_RV40 1
#endif
#ifndef HELIX_FEATURE_VIDEO_H263
#define HELIX_FEATURE_VIDEO_H263 1
#endif
#ifndef HELIX_FEATURE_VIDEO_MPEG4
#define HELIX_FEATURE_VIDEO_MPEG4 1
#endif
#ifndef HELIX_FEATURE_VIDEO_REAL
#define HELIX_FEATURE_VIDEO_REAL 1
#endif
#ifndef HELIX_FEATURE_VIDREND_OPTIMIZEDVIDEO
#define HELIX_FEATURE_VIDREND_OPTIMIZEDVIDEO 1
#endif
#ifndef HELIX_FEATURE_VIDREND_SYNCSMOOTHING
#define HELIX_FEATURE_VIDREND_SYNCSMOOTHING 1
#endif
#ifndef HELIX_FEATURE_VIEWPORT
#define HELIX_FEATURE_VIEWPORT 1
#endif
#ifndef HELIX_FEATURE_VIEWSOURCE
#define HELIX_FEATURE_VIEWSOURCE 1
#endif
#ifndef HELIX_FEATURE_VOLUME
#define HELIX_FEATURE_VOLUME 1
#endif
#ifndef HELIX_FEATURE_XMLPARSER
#define HELIX_FEATURE_XMLPARSER 1
#endif
#ifndef THREADS_SUPPORTED
#define THREADS_SUPPORTED 1
#endif
#ifndef USE_XWINDOWS
#define USE_XWINDOWS 1
#endif
#ifndef _GNU_SOURCE
#define _GNU_SOURCE 1
#endif
#ifndef _LINUX
#define _LINUX 1
#endif
#ifndef _LITTLE_ENDIAN
#define _LITTLE_ENDIAN 1
#endif
#ifndef _RED_HAT_5_X_
#define _RED_HAT_5_X_ 1
#endif
#ifndef _REENTRANT
#define _REENTRANT 1
#endif
#ifndef _TIMEDWAITS_RECURSIVE_MUTEXES
#define _TIMEDWAITS_RECURSIVE_MUTEXES 1
#endif
#ifndef _UNIX
#define _UNIX 1
#endif
#ifndef _UNIX_THREADED_NETWORK_IO
#define _UNIX_THREADED_NETWORK_IO 1
#endif
#ifndef _UNIX_THREADS_SUPPORTED
#define _UNIX_THREADS_SUPPORTED 1
#endif
/* =============================================================== data types */
/* ================================================= external data structures */
/* ====================================================== function prototypes */
#endif // HelixDefs_h

View file

@ -1,84 +0,0 @@
/*------------------------------------------------------------------------------
Copyright (c) 2004 Media Development Loan Fund
This file is part of the LiveSupport project.
http://livesupport.campware.org/
To report bugs, send an e-mail to bugs@campware.org
LiveSupport is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
LiveSupport is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with LiveSupport; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
Author : $Author: maroy $
Version : $Revision: 1.1 $
Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/modules/playlistExecutor/src/Attic/HelixEventHandlerThread.cxx,v $
------------------------------------------------------------------------------*/
/* ============================================================ include files */
#ifdef HAVE_CONFIG_H
#include "configure.h"
#endif
#include "LiveSupport/Core/TimeConversion.h"
#include "HelixEventHandlerThread.h"
using namespace LiveSupport::Core;
using namespace LiveSupport::PlaylistExecutor;
/* =================================================== local data structures */
/* ================================================ local constants & macros */
/* =============================================== local function prototypes */
/* ============================================================= module code */
/*------------------------------------------------------------------------------
* Constructor.
*----------------------------------------------------------------------------*/
HelixEventHandlerThread :: HelixEventHandlerThread(
IHXClientEngine * clientEngine,
Ptr<time_duration>::Ref granularity)
throw ()
{
this->clientEngine = clientEngine;
this->granularity = granularity;
this->shouldRun = false;
}
/*------------------------------------------------------------------------------
* The main execution body of the thread.
*----------------------------------------------------------------------------*/
void
HelixEventHandlerThread :: run(void) throw ()
{
shouldRun = true;
while (shouldRun) {
struct _HXxEvent * event = 0;
clientEngine->EventOccurred(event);
TimeConversion::sleep(granularity);
}
}

View file

@ -1,157 +0,0 @@
/*------------------------------------------------------------------------------
Copyright (c) 2004 Media Development Loan Fund
This file is part of the LiveSupport project.
http://livesupport.campware.org/
To report bugs, send an e-mail to bugs@campware.org
LiveSupport is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
LiveSupport is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with LiveSupport; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
Author : $Author: maroy $
Version : $Revision: 1.2 $
Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/modules/playlistExecutor/src/Attic/HelixEventHandlerThread.h,v $
------------------------------------------------------------------------------*/
#ifndef HelixEventHandlerThread_h
#define HelixEventHandlerThread_h
#ifndef __cplusplus
#error This is a C++ include file
#endif
/* ============================================================ include files */
#ifdef HAVE_CONFIG_H
#include "configure.h"
#endif
#include <boost/date_time/posix_time/posix_time.hpp>
#include "LiveSupport/Core/RunnableInterface.h"
#include "HelixPlayer.h"
namespace LiveSupport {
namespace PlaylistExecutor {
using namespace boost::posix_time;
using namespace LiveSupport::Core;
/* ================================================================ constants */
/* =================================================================== macros */
/* =============================================================== data types */
/**
* A thread that checks on Helix events every once in a while.
*
* @author $Author: maroy $
* @version $Revision: 1.2 $
*/
class HelixEventHandlerThread : public virtual RunnableInterface
{
private:
/**
* The Helix client engine to check.
*/
IHXClientEngine * clientEngine;
/**
* The granularity of the thread: the time it will sleep
* between checking up on the state of things.
*/
Ptr<time_duration>::Ref granularity;
/**
* Flag indicating whether the thread should still run, or
* actually terminate.
*/
bool shouldRun;
/**
* Default constructor.
*/
HelixEventHandlerThread(void) throw ()
{
}
public:
/**
* Constructor.
*
* @param clientEngine the Helix client engine to check.
* @param granularity the granularity of the thread: the time the
* thread will sleep between checking up on things.
*/
HelixEventHandlerThread(IHXClientEngine * clientEngine,
Ptr<time_duration>::Ref granularity)
throw ();
/**
* A virtual destructor, as this class has virtual functions.
*/
virtual
~HelixEventHandlerThread(void) throw ()
{
}
/**
* The main execution loop for the thread.
*/
virtual void
run(void) throw ();
/**
* Send a signal to the runnable object.
* This function simply does nothing.
*
* @param userData user-specific parameter for the signal.
*/
virtual void
signal(int userData) throw ()
{
}
/**
* Signal the thread to stop, gracefully.
*/
virtual void
stop(void) throw ()
{
shouldRun = false;
}
};
/* ================================================= external data structures */
/* ====================================================== function prototypes */
} // namespace PlaylistExecutor
} // namespace LiveSupport
#endif // HelixEventHandlerThread_h

View file

@ -1,57 +0,0 @@
/*------------------------------------------------------------------------------
Copyright (c) 2004 Media Development Loan Fund
This file is part of the LiveSupport project.
http://livesupport.campware.org/
To report bugs, send an e-mail to bugs@campware.org
LiveSupport is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
LiveSupport is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with LiveSupport; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
Author : $Author: maroy $
Version : $Revision: 1.1 $
Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/modules/playlistExecutor/src/Attic/HelixIIDs.cxx,v $
------------------------------------------------------------------------------*/
/* ============================================================ include files */
// this is just a file that by including the ones below defines some IIDs
// needed by the Helix library.
#include "HelixDefs.h"
#define INITGUID
#define NCIHACK
#include <hxtypes.h>
#include <hxcom.h>
#include <hxiids.h>
#include <hxpiids.h>
/* =================================================== local data structures */
/* ================================================ local constants & macros */
/* =============================================== local function prototypes */
/* ============================================================= module code */

View file

@ -1,721 +0,0 @@
/*------------------------------------------------------------------------------
Copyright (c) 2004 Media Development Loan Fund
This file is part of the LiveSupport project.
http://livesupport.campware.org/
To report bugs, send an e-mail to bugs@campware.org
LiveSupport is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
LiveSupport is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with LiveSupport; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
Author : $Author: maroy $
Version : $Revision: 1.21 $
Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/modules/playlistExecutor/src/Attic/HelixPlayer.cxx,v $
------------------------------------------------------------------------------*/
/* ============================================================ include files */
#ifdef HAVE_CONFIG_H
#include "configure.h"
#endif
#include <sstream>
#include "HelixDefs.h"
#include "LiveSupport/Core/TimeConversion.h"
#include "HelixEventHandlerThread.h"
#include "HelixPlayer.h"
#include <hxausvc.h>
using namespace LiveSupport::Core;
using namespace LiveSupport::PlaylistExecutor;
/* =================================================== local data structures */
/**
* Function pointer type for the SetDLLAccessPath function.
*/
typedef HX_RESULT (HXEXPORT_PTR FPRMSETDLLACCESSPATH) (const char*);
/* ================================================ local constants & macros */
/**
* The shared object access path.
*/
static DLLAccessPath accessPath;
/**
* The name of the config element for this class
*/
const std::string HelixPlayer::configElementNameStr = "helixPlayer";
/**
* The name of the attribute to get shared object path.
*/
static const std::string dllPathName = "dllPath";
/**
* The name of the audio device attribute.
*/
static const std::string audioDeviceName = "audioDevice";
/**
* The name of the audio stream timeout attribute.
*/
static const std::string audioStreamTimeoutName = "audioStreamTimeout";
/**
* The default value of the audio stream timeout attribute.
*/
static const int audioStreamTimeoutDefault = 5;
/**
* The name of the fade look ahead time attribute.
*/
static const std::string fadeLookAheadTimeName = "fadeLookAheadTime";
/**
* The default value of the fade look ahead time attribute.
*/
static const int fadeLookAheadTimeDefault = 2500;
/**
* The name of the client core shared object, as found under dllPath
*/
static const std::string clntcoreName = "/clntcore.so";
/* =============================================== local function prototypes */
/* ============================================================= module code */
/*------------------------------------------------------------------------------
* Configure the Helix Player.
*----------------------------------------------------------------------------*/
void
HelixPlayer :: configure(const xmlpp::Element & element)
throw (std::invalid_argument,
std::logic_error)
{
if (element.get_name() != configElementNameStr) {
std::string eMsg = "Bad configuration element ";
eMsg += element.get_name();
throw std::invalid_argument(eMsg);
}
const xmlpp::Attribute * attribute;
if (!(attribute = element.get_attribute(dllPathName))) {
std::string eMsg = "Missing attribute ";
eMsg += dllPathName;
throw std::invalid_argument(eMsg);
}
dllPath = attribute->get_value();
if ((attribute = element.get_attribute(audioDeviceName))) {
audioDevice = attribute->get_value();
}
if ((attribute = element.get_attribute(audioStreamTimeoutName))) {
std::stringstream timeoutStream(attribute->get_value());
timeoutStream >> audioStreamTimeout;
} else {
audioStreamTimeout = audioStreamTimeoutDefault;
}
if ((attribute = element.get_attribute(fadeLookAheadTimeName))) {
std::stringstream lookAheadStream(attribute->get_value());
lookAheadStream >> fadeLookAheadTime;
} else {
fadeLookAheadTime = fadeLookAheadTimeDefault;
}
}
/*------------------------------------------------------------------------------
* Initialize the Helix Player
*----------------------------------------------------------------------------*/
void
HelixPlayer :: initialize(void) throw (std::exception)
{
if (initialized) {
return;
}
setAudioDevice();
// open the Helix Client Core shared object
std::string staticLibPath(dllPath);
staticLibPath += clntcoreName;
if (DLLAccess::DLL_OK != dllAccess.open(staticLibPath.c_str())) {
throw std::runtime_error("Couldn't open Helix shared object");
}
// get the main entry function pointers
FPRMSETDLLACCESSPATH setDLLAccessPath;
createEngine = (FPRMCREATEENGINE) dllAccess.getSymbol("CreateEngine");
closeEngine = (FPRMCLOSEENGINE) dllAccess.getSymbol("CloseEngine");
setDLLAccessPath =
(FPRMSETDLLACCESSPATH) dllAccess.getSymbol("SetDLLAccessPath");
if (!createEngine || !closeEngine || !setDLLAccessPath) {
throw std::runtime_error(
"Couldn't access symbols from Helix shared object");
}
// set the DLL access path
std::string str = "";
str += "DT_Common=";
str += dllPath;
str += '\0';
str += "DT_Plugins=";
str += dllPath;
str += '\0';
str += "DT_Codecs=";
str += dllPath;
setDLLAccessPath(str.c_str());
// create the client engine and the player
if (HXR_OK != createEngine(&clientEngine)) {
throw std::runtime_error("Couldn't create Helix Client Engine");
}
if (HXR_OK != clientEngine->CreatePlayer(player)) {
throw std::runtime_error("Couldn't create Helix Client Player");
}
// create and attach the client context
clientContext = new ClientContext(shared_from_this());
clientContext->AddRef();
IHXPreferences * preferences = 0;
player->QueryInterface(IID_IHXPreferences, (void**) &preferences);
clientContext->Init(player, preferences, "");
player->SetClientContext(clientContext);
HX_RELEASE(preferences);
// create and attach the error sink
IHXErrorSinkControl * errorSinkControl;
player->QueryInterface(IID_IHXErrorSinkControl,
(void**) &errorSinkControl);
if (errorSinkControl) {
IHXErrorSink * errorSink;
clientContext->QueryInterface(IID_IHXErrorSink, (void**) &errorSink);
if (errorSink) {
errorSinkControl->AddErrorSink(errorSink,
HXLOG_EMERG,
HXLOG_DEBUG);
HX_RELEASE(errorSink);
}
HX_RELEASE(errorSinkControl);
}
// start the event handling thread
Ptr<time_duration>::Ref granurality(new time_duration(microseconds(10)));
Ptr<RunnableInterface>::Ref handler(new HelixEventHandlerThread(
clientEngine,
granurality));
eventHandlerThread.reset(new Thread(handler));
eventHandlerThread->start();
// set up other variables
playing = false;
initialized = true;
}
/*------------------------------------------------------------------------------
* De-initialize the Helix Player
*----------------------------------------------------------------------------*/
void
HelixPlayer :: deInitialize(void) throw ()
{
if (initialized) {
// signal stop to and wait for the event handling thread to stop
eventHandlerThread->stop();
eventHandlerThread->join();
setAudioDevice();
// release Helix resources
clientContext->Release();
clientEngine->ClosePlayer(player);
player->Release();
closeEngine(clientEngine);
dllAccess.close();
initialized = false;
}
}
/*------------------------------------------------------------------------------
* Attach an event listener.
*----------------------------------------------------------------------------*/
void
HelixPlayer :: attachListener(AudioPlayerEventListener* eventListener)
throw ()
{
listeners.push_back(eventListener);
}
/*------------------------------------------------------------------------------
* Detach an event listener.
*----------------------------------------------------------------------------*/
void
HelixPlayer :: detachListener(AudioPlayerEventListener* eventListener)
throw (std::invalid_argument)
{
ListenerVector::iterator it = listeners.begin();
ListenerVector::iterator end = listeners.end();
while (it != end) {
if (*it == eventListener) {
listeners.erase(it);
return;
}
++it;
}
throw std::invalid_argument("supplied event listener not found");
}
/*------------------------------------------------------------------------------
* Send the onStop event to all attached listeners.
*----------------------------------------------------------------------------*/
void
HelixPlayer :: fireOnStopEvent(void) throw ()
{
ListenerVector::iterator it = listeners.begin();
ListenerVector::iterator end = listeners.end();
while (it != end) {
(*it)->onStop();
++it;
}
}
/*------------------------------------------------------------------------------
* Specify which file to play
*----------------------------------------------------------------------------*/
void
HelixPlayer :: open(const std::string fileUrl)
throw (std::invalid_argument)
{
setAudioDevice();
playlength = 0UL;
// the only way to check if this is a valid URL is to see if the
// source count increases for the player.
UINT16 sourceCount = player->GetSourceCount();
if (HXR_OK != player->OpenURL(fileUrl.c_str())) {
throw std::invalid_argument("can't open URL");
}
if (sourceCount == player->GetSourceCount()) {
throw std::invalid_argument("can't open URL successfully");
}
}
/*------------------------------------------------------------------------------
* Get the length of the current audio clip.
*----------------------------------------------------------------------------*/
Ptr<time_duration>::Ref
HelixPlayer :: getPlaylength(void) throw ()
{
setAudioDevice();
Ptr<time_duration>::Ref length;
// only bother if there is something to check for.
if (player->GetSourceCount() > 0) {
Ptr<time_duration>::Ref sleepT(new time_duration(microseconds(100)));
// wait until the playlength is set to a sensible value
// by the advise sink. this may take a while
while (playlength == 0) {
TimeConversion::sleep(sleepT);
}
unsigned long secs = playlength / 1000UL;
unsigned long millisecs = playlength - (secs * 1000UL);
length.reset(new time_duration(seconds(secs) + millisec(millisecs)));
}
return length;
}
/*------------------------------------------------------------------------------
* Start playing
*----------------------------------------------------------------------------*/
void
HelixPlayer :: start(void) throw (std::logic_error)
{
setAudioDevice();
if (player->GetSourceCount() == 0) {
throw std::logic_error("HelixPlayer::open() not called yet");
}
player->Begin();
playing = true;
}
/*------------------------------------------------------------------------------
* Pause the player
*----------------------------------------------------------------------------*/
void
HelixPlayer :: pause(void) throw (std::logic_error)
{
setAudioDevice();
if (player->GetSourceCount() == 0) {
throw std::logic_error("HelixPlayer::open() not called yet");
}
player->Pause();
playing = false; // Is this what we want?
}
/*------------------------------------------------------------------------------
* Tell if we're playing
*----------------------------------------------------------------------------*/
bool
HelixPlayer :: isPlaying(void) throw ()
{
setAudioDevice();
if (playing) {
playing = !player->IsDone();
}
return playing;
}
/*------------------------------------------------------------------------------
* Stop playing
*----------------------------------------------------------------------------*/
void
HelixPlayer :: stop(void) throw (std::logic_error)
{
if (!isPlaying()) {
throw std::logic_error("HelixPlayer is not yet playing, can't stop it");
}
setAudioDevice();
player->Stop();
playing = false;
// TODO: gather error info from the ErrorSink
}
/*------------------------------------------------------------------------------
* Close the currently opened audio file.
*----------------------------------------------------------------------------*/
void
HelixPlayer :: close(void) throw ()
{
setAudioDevice();
if (isPlaying()) {
stop();
} else {
// else, call IHXPlayer->Stop(), to clean up things...
player->Stop();
}
}
/*------------------------------------------------------------------------------
* Get the volume of the player.
*----------------------------------------------------------------------------*/
unsigned int
HelixPlayer :: getVolume(void) throw ()
{
setAudioDevice();
IHXAudioPlayer * audioPlayer = 0;
player->QueryInterface(IID_IHXAudioPlayer, (void**) &audioPlayer);
if (!audioPlayer) {
std::cerr << "can't get IHXAudioPlayer interface" << std::endl;
return 0;
}
IHXVolume * ihxVolume = audioPlayer->GetAudioVolume();
return ihxVolume->GetVolume();
}
/*------------------------------------------------------------------------------
* Set the volume of the player.
*----------------------------------------------------------------------------*/
void
HelixPlayer :: setVolume(unsigned int volume) throw ()
{
setAudioDevice();
IHXAudioPlayer * audioPlayer = 0;
player->QueryInterface(IID_IHXAudioPlayer, (void**) &audioPlayer);
if (!audioPlayer) {
std::cerr << "can't get IHXAudioPlayer interface" << std::endl;
return;
}
IHXVolume * ihxVolume = audioPlayer->GetAudioVolume();
ihxVolume->SetVolume(volume);
}
/*------------------------------------------------------------------------------
* A global function needed by the Helix library, this will return the
* access path to shared objects.
*----------------------------------------------------------------------------*/
DLLAccessPath* GetDLLAccessPath(void)
{
return &accessPath;
}
/*------------------------------------------------------------------------------
* Open a playlist, with simulated fading.
*----------------------------------------------------------------------------*/
void
HelixPlayer :: openAndStart(Ptr<Playlist>::Ref playlist)
throw (std::invalid_argument,
std::logic_error,
std::runtime_error)
{
if (!playlist || !playlist->getUri()) {
throw std::invalid_argument("no playlist SMIL file found");
}
setAudioDevice();
open(*playlist->getUri()); // may throw invalid_argument
start(); // may throw logic_error
IHXAudioPlayer* audioPlayer = 0;
if (player->QueryInterface(IID_IHXAudioPlayer,
(void**)&audioPlayer) != HXR_OK
|| !audioPlayer) {
throw std::runtime_error("can't get IHXAudioPlayer interface");
}
int playlistSize = playlist->size();
IHXAudioStream* audioStream[playlistSize];
unsigned long playlength[playlistSize];
unsigned long relativeOffset[playlistSize];
unsigned long fadeIn[playlistSize];
unsigned long fadeOut[playlistSize];
Ptr<time_duration>::Ref sleepT(new time_duration(microseconds(10)));
bool hasFadeInfo = false;
Playlist::const_iterator it = playlist->begin();
for (int i = 0; i < playlistSize; ++i) {
audioStream[i] = audioPlayer->GetAudioStream(i);
int counter = 0;
while (!audioStream[i]) {
if (counter > audioStreamTimeout * 100) {
std::stringstream eMsg;
eMsg << "can't get audio stream number " << i;
throw std::runtime_error(eMsg.str());
}
TimeConversion::sleep(sleepT);
audioStream[i] = audioPlayer->GetAudioStream(i);
++counter;
}
relativeOffset[i] = it->second->getRelativeOffset()
->total_milliseconds();
playlength[i] = it->second->getPlayable()->getPlaylength()
->total_milliseconds();
if (it->second->getFadeInfo()) {
hasFadeInfo = true;
fadeIn[i] = it->second->getFadeInfo()
->getFadeIn()->total_milliseconds();
fadeOut[i] = it->second->getFadeInfo()
->getFadeOut()->total_milliseconds();
} else {
fadeIn[i] = 0;
fadeOut[i] = 0;
}
++it;
}
if (!hasFadeInfo) {
return;
}
fadeIn[0] = 0; // can't do fade-in on the first audio clip, sorry
fadeDataList.reset(new std::list<FadeData>);
FadeData fadeData;
for (int i = 0; i < playlistSize; ++i) {
if (fadeIn[i]) {
fadeData.audioStreamFrom = 0;
fadeData.audioStreamTo = audioStream[i];
fadeData.fadeAt = relativeOffset[i];
fadeData.fadeLength = fadeIn[i];
fadeDataList->push_back(fadeData);
}
if (fadeOut[i]) {
if (i < playlistSize - 1
&& fadeOut[i] == fadeIn[i+1]
&& relativeOffset[i] + playlength[i]
== relativeOffset[i+1] + fadeIn[i+1]) {
fadeData.audioStreamFrom = audioStream[i];
fadeData.audioStreamTo = audioStream[i+1];
fadeData.fadeAt = relativeOffset[i+1];
fadeData.fadeLength = fadeIn[i+1];
fadeDataList->push_back(fadeData);
fadeIn[i+1] = 0;
} else {
fadeData.audioStreamFrom = audioStream[i];
fadeData.audioStreamTo = 0;
fadeData.fadeAt = relativeOffset[i]
+ playlength[i] - fadeOut[i];
fadeData.fadeLength = fadeOut[i];
fadeDataList->push_back(fadeData);
}
}
HX_RELEASE(audioStream[i]);
}
//do {
// std::cerr << "\n";
// std::list<FadeData>::const_iterator it = fadeDataList->begin();
// while (it != fadeDataList->end()) {
// std::cerr << it->audioStreamFrom << " -> "
// << it->audioStreamTo << " : at "
// << it->fadeAt << ", for "
// << it->fadeLength << "\n";
// ++it;
// }
// std::cerr << "\n";
//} while (false);
}
/*------------------------------------------------------------------------------
* Activate the crossfading of clips in a playlist.
*----------------------------------------------------------------------------*/
void
HelixPlayer :: implementFading(unsigned long position)
throw (std::runtime_error)
{
if (!fadeDataList) {
return;
}
std::list<FadeData>::iterator it = fadeDataList->begin();
while (it != fadeDataList->end()) {
unsigned long fadeAt = it->fadeAt;
if (fadeAt < position) { // we missed it
it = fadeDataList->erase(it);
continue;
} else if (fadeAt < position + fadeLookAheadTime) { // we are on time
IHXAudioPlayer* audioPlayer = 0;
if (player->QueryInterface(IID_IHXAudioPlayer,
(void**)&audioPlayer) != HXR_OK
|| !audioPlayer) {
throw std::runtime_error("can't get IHXAudioPlayer interface");
}
IHXAudioCrossFade* crossFade = 0;
if (audioPlayer->QueryInterface(IID_IHXAudioCrossFade,
(void**)&crossFade) != HXR_OK
|| !crossFade) {
throw std::runtime_error("can't get IHXAudioCrossFade "
"interface");
}
//std::cerr << "position:" << position << "\n"
// << "fadeAt: " << fadeAt << "\n"
// << "fadeLength: " << it->fadeLength << "\n\n";
crossFade->CrossFade(it->audioStreamFrom, it->audioStreamTo,
fadeAt, fadeAt, it->fadeLength);
HX_RELEASE(crossFade);
HX_RELEASE(audioPlayer);
it = fadeDataList->erase(it);
continue;
} else {
++it;
}
}
}
/*------------------------------------------------------------------------------
* Set the audio device.
*----------------------------------------------------------------------------*/
bool
HelixPlayer :: setAudioDevice(const std::string &deviceName)
throw ()
{
return (setenv("AUDIO", deviceName.c_str(), 1) == 0);
// 1 = overwrite if exists
}
/*------------------------------------------------------------------------------
* Set the audio device, based on the audioDevice property, if it's
* not empty.
*----------------------------------------------------------------------------*/
void
HelixPlayer :: setAudioDevice(void) throw ()
{
if (!audioDevice.empty()) {
setAudioDevice(audioDevice);
}
}

View file

@ -1,537 +0,0 @@
/*------------------------------------------------------------------------------
Copyright (c) 2004 Media Development Loan Fund
This file is part of the LiveSupport project.
http://livesupport.campware.org/
To report bugs, send an e-mail to bugs@campware.org
LiveSupport is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
LiveSupport is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with LiveSupport; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
Author : $Author: maroy $
Version : $Revision: 1.19 $
Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/modules/playlistExecutor/src/Attic/HelixPlayer.h,v $
------------------------------------------------------------------------------*/
#ifndef HelixPlayer_h
#define HelixPlayer_h
#ifndef __cplusplus
#error This is a C++ include file
#endif
/* ============================================================ include files */
#ifdef HAVE_CONFIG_H
#include "configure.h"
#endif
#include <list>
#include <boost/enable_shared_from_this.hpp>
#include "LiveSupport/Core/Configurable.h"
#include "LiveSupport/Core/Thread.h"
#include "LiveSupport/PlaylistExecutor/AudioPlayerInterface.h"
#include <dllacces.h>
#include <dllpath.h>
#include "ErrorSink.h"
#include "AuthenticationManager.h"
#include "ClientContext.h"
#include "LiveSupport/Core/Playlist.h"
#include <hxausvc.h>
namespace LiveSupport {
namespace PlaylistExecutor {
using namespace boost;
using namespace LiveSupport;
using namespace LiveSupport::Core;
/* ================================================================ constants */
/* =================================================================== macros */
/* =============================================================== data types */
/**
* A class to play audio files and SMIL files through the Helix
* Community Library.
* This class can be configured with the following XML element.
*
* <pre><code>
* <helixPlayer dllPath = "../../usr/lib/helix"
* audioDevice = "/dev/sound/dsp"
* />
* </code></pre>
*
* where the dllPath is the path to the directory containing the Helix
* library shared objects. The optional audioDevice argument sets the
* AUDIO environment variable which is read by the Helix client.
*
* There are two parameters which are only there because the current version
* of the Helix client does not handle animation tags in SMIL files properly.
* They will be removed from later versions.
* <ul>
* <li>audioStreamTimeOut (milliseconds) - the time to wait for each
* GetAudioStream() operation before a timeout occurs;
* the default is 5;</li>
* <li>fadeLookAheadTime (milliseconds) - each fade-in or fade-out is
* scheduled (using IHXAudioCrossFade::CrossFade()) this
* much time before it is to happen; the default is 2500. </li>
* </ul>
*
* The DTD for the above configuration is the following:
*
* <pre><code>
* <!ELEMENT helixPlayer EMPTY >
* <!ATTLIST helixPlayer dllPath CDATA #REQUIRED >
* <!ATTLIST helixPlayer audioDevice CDATA #IMPLIED >
* <!ATTLIST helixPlayer audioStreamTimeout #IMPLIED >
* <!ATTLIST helixPlayer fadeLookAheatTime #IMPLIED >
* </code></pre>
*
* @author $Author: maroy $
* @version $Revision: 1.19 $
*/
class HelixPlayer : virtual public Configurable,
virtual public AudioPlayerInterface,
public boost::enable_shared_from_this<HelixPlayer>
{
private:
/**
* The name of the configuration XML elmenent used by HelixPlayer
*/
static const std::string configElementNameStr;
/**
* The full path to the Helix library shared objects.
*/
std::string dllPath;
/**
* Max time to wait for an audio stream, in milliseconds.
*/
int audioStreamTimeout;
/**
* Schedule fading this many milliseconds in advance.
*/
int fadeLookAheadTime;
/**
* The shared object access point.
*/
DLLAccess dllAccess;
/**
* Function pointer to create the Helix engine.
*/
FPRMCREATEENGINE createEngine;
/**
* Function pointer to close the Helix engine.
*/
FPRMCLOSEENGINE closeEngine;
/**
* The Helix Client engine.
*/
IHXClientEngine * clientEngine;
/**
* The Helix player.
*/
IHXPlayer * player;
/**
* The example client context.
*/
ClientContext * clientContext;
/**
* The URL to play.
*/
std::string url;
/**
* The length of the currently playing audio clip,
* in milliseconds.
*/
unsigned long playlength;
/**
* Flag to indicate if this object has been initialized.
*/
bool initialized;
/**
* Flag to indicate if the player is currently playing.
* Make sure no to rely on this flag, as it's not aware of
* the case that the playing has ended naturally. Always
* call isPlaying() instead.
*/
bool playing;
/**
* The audio device to play on.
*/
std::string audioDevice;
/**
* The type for the vector of listeners.
* Just a shorthand notation, to make reference to the type
* easier.
*/
typedef std::vector<AudioPlayerEventListener*>
ListenerVector;
/**
* A vector of event listeners, which are interested in events
* related to this player.
*/
ListenerVector listeners;
/**
* A thread for handling helix events, on a regular basis.
* Helix apperantly needs to be polled all the time to function.
*/
Ptr<Thread>::Ref eventHandlerThread;
/**
* A type to contain the data about a single fade-in or fade-out
* event.
*/
struct FadeData {
IHXAudioStream* audioStreamFrom;
IHXAudioStream* audioStreamTo;
unsigned long fadeAt;
unsigned long fadeLength;
};
/**
* A list of fade-in/fade-out events.
* This is set by the openAndStartPlaylist() method, and the
* actual fading is done by implementFading(), called from
* AdviseSink::OnPosLength().
*/
Ptr<std::list<FadeData> >::Ref fadeDataList;
/**
* Declare AdviseSink::OnPosLength() to be a friend, so it can
* call the private method implementFading().
*/
friend STDMETHODIMP
AdviseSink::OnPosLength(UINT32 ulPosition,
UINT32 ulLength)
throw ();
/**
* Implement the actual fading scheduled by open(Ptr<Playlist>::Ref).
* This method is called from AdviceSink::OnPosLength().
* DO NOT call this method directly.
*
* @param position the clip position
*/
void
implementFading(unsigned long position)
throw(std::runtime_error);
/**
* Set the audio device used for playback.
*
* Sets the environment variable AUDIO. This should be replaced with
* a Helix function call as soon as this functionality is provided.
*
* There are some strange issues with this: e.g., if you set the
* device to "/dev/null", this works fine for SMIL files, but gives
* Helix error 80040100 (HXR_AUDIO_DRIVER) when an mp3 file is played.
*
* @param deviceName the new device name, e.g., /dev/dsp
* @return true if successful, false if not
*/
virtual bool
setAudioDevice(const std::string &deviceName)
throw ();
public:
/**
* Set the audio device used for playback, based on the audioDevice
* property. If audioDevice is empty, nothing is done.
*
* Sets the environment variable AUDIO. This should be replaced with
* a Helix function call as soon as this functionality is provided.
*
* There are some strange issues with this: e.g., if you set the
* device to "/dev/null", this works fine for SMIL files, but gives
* Helix error 80040100 (HXR_AUDIO_DRIVER) when an mp3 file is played.
*/
virtual void
setAudioDevice(void) throw ();
public:
/**
* Constructor.
*/
HelixPlayer(void) throw ()
{
playing = false;
initialized = false;
playlength = 0UL;
}
/**
* A virtual destructor, as this class has virtual functions.
*/
virtual
~HelixPlayer(void) throw ()
{
deInitialize();
}
/**
* Return the name of the XML element this object expects
* to be sent to a call to configure().
*
* @return the name of the expected XML configuration element.
*/
static const std::string
getConfigElementName(void) throw ()
{
return configElementNameStr;
}
/**
* Configure the object based on the XML element supplied.
*
* @param element the XML element to configure the object from.
* @exception std::invalid_argument if the supplied XML element
* contains bad configuraiton information
* @exception std::logic_error if the scheduler daemon has already
* been configured, and can not be reconfigured.
*/
virtual void
configure(const xmlpp::Element & element)
throw (std::invalid_argument,
std::logic_error);
/**
* Initialize the Helix Player object, so that it is ready to
* play audio files.
*
* @exception std::exception on initialization problems.
*/
virtual void
initialize(void) throw (std::exception);
/**
* De-initialize the Helix Player object.
*/
virtual void
deInitialize(void) throw ();
/**
* Attach an event listener for this audio player.
* After this call, the supplied event will recieve all events
* related to this audio player.
*
* @param eventListener the event listener to register.
* @see #detach
*/
virtual void
attachListener(AudioPlayerEventListener* eventListener)
throw ();
/**
* Detach an event listener for this audio player.
*
* @param eventListener the event listener to unregister.
* @exception std::invalid_argument if the supplied event listener
* has not been previously registered.
* @see #attach
*/
virtual void
detachListener(AudioPlayerEventListener* eventListener)
throw (std::invalid_argument);
/**
* Send the onStop event to all attached listeners.
*/
virtual void
fireOnStopEvent(void) throw ();
/**
* Specify which audio resource to play.
* The file may be a playlist, referencing other files, which
* will be accessed automatically.
* Note: this call will <b>not</b> start playing! You will
* have to call the start() function to begin playing.
* Always close any opened resource with a call to close().
*
* @param fileUrl a URL to a file
* @exception std::invalid_argument if the supplied fileUrl
* seems to be invalid.
* @see #close
* @see #start
*/
virtual void
open(const std::string fileUrl) throw (std::invalid_argument);
/**
* Close an audio source that was opened.
*
* @see #open
*/
virtual void
close(void) throw ();
/**
* Start playing.
* This call will start playing the active playlist, which was
* set by a previous call to open().
* Playing can be stopped by calling stop().
*
* @exception std::logic_error if there was no previous call to
* open().
* @see #open
* @see #stop
*/
virtual void
start(void) throw (std::logic_error);
/**
* Pause the player.
* Playing can be resumed by calling start().
*
* @exception std::logic_error if there was no previous call to
* open().
* @see #open
* @see #start
*/
virtual void
pause(void) throw (std::logic_error);
/**
* Tell if we're currently playing.
*
* @return true of the player is currently playing, false
* otherwise.
*/
virtual bool
isPlaying(void) throw ();
/**
* Stop playing.
*
* @exception std::logic_error if there was no previous call to
* start()
*/
virtual void
stop(void) throw (std::logic_error);
/**
* Set the length of the currenlty playing audio clip.
* This is called by AdviseSink only!
*
* @param playlength the length of the currently playing audio clip.
* in milliseconds
* @see AdviseSink#OnPosLength
*/
void
setPlaylength(unsigned long playlength)
{
this->playlength = playlength;
}
/**
* Get the length of the currently opened audio clip.
* This function waits as long as necessary to get the length.
*
* @return the length of the currently playing audio clip, or 0,
* if nothing is openned.
*/
virtual Ptr<posix_time::time_duration>::Ref
getPlaylength(void) throw ();
/**
* Get the volume of the player.
*
* @return the volume, from 1 to 100.
*/
virtual unsigned int
getVolume(void) throw ();
/**
* Set the volume of the player.
*
* @param volume the new volume, from 1 to 100.
*/
virtual void
setVolume(unsigned int volume) throw ();
/**
* Play a playlist, with simulated fading.
*
* This is a stopgap method, and should be replaced as soon as
* the SMIL animation issues are fixed in the Helix client.
*
* The playlist is assumed to contain a URI field, which points
* to a SMIL file containing the same audio clips, with the same
* offsets, as the playlist. This can be ensured, for example, by
* calling Storage::WebStorageClient::acquirePlaylist().
*
* @param playlist the Playlist object to be played.
* @exception std::invalid_argument playlist is invalid (e.g.,
* does not have a URI field, or there is no valid
* SMIL file at the given URI).
* @exception std::logic_error thrown by start() if open() was
* unsuccessful, but returned normally (never happens)
* @exception std::runtime_error on errors thrown by the helix player
*/
virtual void
openAndStart(Ptr<Playlist>::Ref playlist)
throw (std::invalid_argument,
std::logic_error,
std::runtime_error);
};
/* ================================================= external data structures */
/* ====================================================== function prototypes */
} // namespace PlaylistExecutor
} // namespace LiveSupport
/**
* A global function returning the shared object access path to
* the Helix library.
*/
DLLAccessPath* GetDLLAccessPath(void);
#endif // HelixPlayer_h

View file

@ -1,556 +0,0 @@
/*------------------------------------------------------------------------------
Copyright (c) 2004 Media Development Loan Fund
This file is part of the LiveSupport project.
http://livesupport.campware.org/
To report bugs, send an e-mail to bugs@campware.org
LiveSupport is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
LiveSupport is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with LiveSupport; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
Author : $Author: fgerlits $
Version : $Revision: 1.12 $
Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/modules/playlistExecutor/src/Attic/HelixPlayerTest.cxx,v $
------------------------------------------------------------------------------*/
/* ============================================================ include files */
#ifdef HAVE_CONFIG_H
#include "configure.h"
#endif
#if HAVE_UNISTD_H
#include <unistd.h>
#else
#error "Need unistd.h"
#endif
#include <string>
#include <iostream>
#include "LiveSupport/Core/TimeConversion.h"
#include "HelixPlayer.h"
#include "TestEventListener.h"
#include "HelixPlayerTest.h"
using namespace LiveSupport::PlaylistExecutor;
/* =================================================== local data structures */
/* ================================================ local constants & macros */
CPPUNIT_TEST_SUITE_REGISTRATION(HelixPlayerTest);
/**
* The name of the configuration file for the Helix player.
*/
static const std::string configFileName = "etc/helixPlayer.xml";
/**
* The name of the configuration file for the test playlist in the
* openAndStartPlaylist() method.
*/
static const std::string playlistConfigFileName = "etc/playlist.xml";
/* =============================================== local function prototypes */
/* ============================================================= module code */
/*------------------------------------------------------------------------------
* Set up the test environment
*----------------------------------------------------------------------------*/
void
HelixPlayerTest :: setUp(void) throw ()
{
try {
Ptr<xmlpp::DomParser>::Ref parser(
new xmlpp::DomParser(configFileName, true));
const xmlpp::Document * document = parser->get_document();
const xmlpp::Element * root = document->get_root_node();
helixPlayer.reset(new HelixPlayer());
helixPlayer->configure(*root);
} catch (std::invalid_argument &e) {
std::cerr << "semantic error in configuration file" << std::endl;
} catch (xmlpp::exception &e) {
std::cerr << e.what() << std::endl;
}
}
/*------------------------------------------------------------------------------
* Clean up the test environment
*----------------------------------------------------------------------------*/
void
HelixPlayerTest :: tearDown(void) throw ()
{
helixPlayer.reset();
}
/*------------------------------------------------------------------------------
* Test to see if the HelixPlayer engine can be started and stopped
*----------------------------------------------------------------------------*/
void
HelixPlayerTest :: firstTest(void)
throw (CPPUNIT_NS::Exception)
{
try {
helixPlayer->initialize();
CPPUNIT_ASSERT(!helixPlayer->isPlaying());
helixPlayer->deInitialize();
} catch (std::exception &e) {
CPPUNIT_FAIL("failed to initialize or de-initialize HelixPlayer");
}
}
/*------------------------------------------------------------------------------
* Check the length of an audio file
*----------------------------------------------------------------------------*/
void
HelixPlayerTest :: playlengthTest(void)
throw (CPPUNIT_NS::Exception)
{
Ptr<time_duration>::Ref sleepT(new time_duration(microseconds(10)));
helixPlayer->initialize();
try {
helixPlayer->open("file:var/test.mp3");
} catch (std::invalid_argument &e) {
CPPUNIT_FAIL(e.what());
}
CPPUNIT_ASSERT(!helixPlayer->isPlaying());
Ptr<time_duration>::Ref playlength = helixPlayer->getPlaylength();
CPPUNIT_ASSERT(playlength.get());
CPPUNIT_ASSERT(playlength->seconds() == 14);
CPPUNIT_ASSERT(playlength->fractional_seconds() == 785000);
helixPlayer->close();
helixPlayer->deInitialize();
}
/*------------------------------------------------------------------------------
* Play something simple
*----------------------------------------------------------------------------*/
void
HelixPlayerTest :: simplePlayTest(void)
throw (CPPUNIT_NS::Exception)
{
Ptr<time_duration>::Ref sleepT(new time_duration(microseconds(10)));
helixPlayer->initialize();
try {
helixPlayer->open("file:var/test.mp3");
} catch (std::invalid_argument &e) {
CPPUNIT_FAIL(e.what());
}
CPPUNIT_ASSERT(!helixPlayer->isPlaying());
helixPlayer->start();
CPPUNIT_ASSERT(helixPlayer->isPlaying());
while (helixPlayer->isPlaying()) {
TimeConversion::sleep(sleepT);
}
CPPUNIT_ASSERT(!helixPlayer->isPlaying());
helixPlayer->close();
helixPlayer->deInitialize();
}
/*------------------------------------------------------------------------------
* Check for error conditions
*----------------------------------------------------------------------------*/
void
HelixPlayerTest :: checkErrorConditions(void)
throw (CPPUNIT_NS::Exception)
{
helixPlayer->initialize();
bool gotException;
CPPUNIT_ASSERT(!helixPlayer->isPlaying());
gotException = false;
try {
helixPlayer->start();
} catch (std::logic_error &e) {
gotException = true;
}
CPPUNIT_ASSERT(gotException);
gotException = false;
try {
helixPlayer->stop();
} catch (std::logic_error &e) {
gotException = true;
}
CPPUNIT_ASSERT(gotException);
gotException = false;
try {
helixPlayer->open("totally/bad/URL");
} catch (std::invalid_argument &e) {
gotException = true;
}
CPPUNIT_ASSERT(gotException);
gotException = false;
try {
helixPlayer->start();
} catch (std::logic_error &e) {
gotException = true;
}
CPPUNIT_ASSERT(gotException);
// check for opening a wrong URL after opening a proper one
try {
helixPlayer->open("file:var/test.mp3");
} catch (std::invalid_argument &e) {
CPPUNIT_FAIL(e.what());
}
helixPlayer->close();
gotException = false;
try {
helixPlayer->open("totally/bad/URL");
} catch (std::invalid_argument &e) {
gotException = true;
}
CPPUNIT_ASSERT(gotException);
helixPlayer->deInitialize();
}
/*------------------------------------------------------------------------------
* Test different SMIL file features
*----------------------------------------------------------------------------*/
void
HelixPlayerTest :: smilTest(void)
throw (CPPUNIT_NS::Exception)
{
Ptr<time_duration>::Ref sleepT(new time_duration(microseconds(10)));
helixPlayer->initialize();
try {
helixPlayer->open("file:var/simpleSmil.smil");
} catch (std::invalid_argument &e) {
CPPUNIT_FAIL(e.what());
}
CPPUNIT_ASSERT(!helixPlayer->isPlaying());
helixPlayer->start();
CPPUNIT_ASSERT(helixPlayer->isPlaying());
while (helixPlayer->isPlaying()) {
TimeConversion::sleep(sleepT);
}
CPPUNIT_ASSERT(!helixPlayer->isPlaying());
helixPlayer->close();
helixPlayer->deInitialize();
}
/*------------------------------------------------------------------------------
* Play a specific file.
* Assumes that the player was already initialized.
*----------------------------------------------------------------------------*/
void
HelixPlayerTest :: playFile(const std::string & fileName)
throw (CPPUNIT_NS::Exception)
{
Ptr<time_duration>::Ref sleepT(new time_duration(microseconds(10)));
try {
helixPlayer->open(fileName.c_str());
} catch (std::invalid_argument &e) {
CPPUNIT_FAIL(e.what());
}
CPPUNIT_ASSERT(!helixPlayer->isPlaying());
helixPlayer->start();
CPPUNIT_ASSERT(helixPlayer->isPlaying());
while (helixPlayer->isPlaying()) {
TimeConversion::sleep(sleepT);
}
CPPUNIT_ASSERT(!helixPlayer->isPlaying());
helixPlayer->close();
}
/*------------------------------------------------------------------------------
* 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
*----------------------------------------------------------------------------*/
void
HelixPlayerTest :: smilSoundAnimationTest(void)
throw (CPPUNIT_NS::Exception)
{
Ptr<time_duration>::Ref sleepT(new time_duration(microseconds(10)));
helixPlayer->initialize();
/* TODO: there is a bug with sound level animation, it causes a segfault
see https://bugs.helixcommunity.org/show_bug.cgi?id=3310
*/
try {
helixPlayer->open("file:var/animateSound.smil");
} catch (std::invalid_argument &e) {
CPPUNIT_FAIL(e.what());
}
CPPUNIT_ASSERT(!helixPlayer->isPlaying());
helixPlayer->start();
CPPUNIT_ASSERT(helixPlayer->isPlaying());
while (helixPlayer->isPlaying()) {
TimeConversion::sleep(sleepT);
}
CPPUNIT_ASSERT(!helixPlayer->isPlaying());
helixPlayer->close();
helixPlayer->deInitialize();
}
/*------------------------------------------------------------------------------
* Test different SMIL file features
*----------------------------------------------------------------------------*/
void
HelixPlayerTest :: animationWorkaroundTest(void)
throw (CPPUNIT_NS::Exception)
{
Ptr<Playlist>::Ref playlist;
try {
Ptr<xmlpp::DomParser>::Ref parser(
new xmlpp::DomParser(playlistConfigFileName, true));
const xmlpp::Document * document = parser->get_document();
const xmlpp::Element * root = document->get_root_node();
playlist.reset(new Playlist());
playlist->configure(*root);
} catch (std::invalid_argument &e) {
std::cerr << "semantic error in configuration file" << std::endl;
} catch (xmlpp::exception &e) {
std::cerr << e.what() << std::endl;
}
CPPUNIT_ASSERT(playlist);
CPPUNIT_ASSERT(playlist->getId());
Ptr<std::string>::Ref uri(new std::string("file:var/playlist.smil"));
playlist->setUri(uri);
CPPUNIT_ASSERT_NO_THROW(helixPlayer->initialize());
CPPUNIT_ASSERT_NO_THROW(helixPlayer->openAndStart(playlist));
CPPUNIT_ASSERT(helixPlayer->isPlaying());
Ptr<time_duration>::Ref sleepT(new time_duration(microseconds(10)));
while (helixPlayer->isPlaying()) {
TimeConversion::sleep(sleepT);
}
CPPUNIT_ASSERT(!helixPlayer->isPlaying());
helixPlayer->close();
helixPlayer->deInitialize();
}
/*------------------------------------------------------------------------------
* Test to see if attaching and detaching event listeners works.
*----------------------------------------------------------------------------*/
void
HelixPlayerTest :: eventListenerAttachTest(void)
throw (CPPUNIT_NS::Exception)
{
CPPUNIT_ASSERT_NO_THROW(helixPlayer->initialize());
Ptr<TestEventListener>::Ref listener1(new TestEventListener());
Ptr<TestEventListener>::Ref listener2(new TestEventListener());
// try with one listener
helixPlayer->attachListener(listener1.get());
CPPUNIT_ASSERT_NO_THROW(
helixPlayer->detachListener(listener1.get())
);
CPPUNIT_ASSERT_THROW(
helixPlayer->detachListener(listener1.get()),
std::invalid_argument
);
// try with two listeners
helixPlayer->attachListener(listener1.get());
CPPUNIT_ASSERT_THROW(
helixPlayer->detachListener(listener2.get()),
std::invalid_argument
);
helixPlayer->attachListener(listener2.get());
CPPUNIT_ASSERT_NO_THROW(
helixPlayer->detachListener(listener1.get());
);
helixPlayer->deInitialize();
}
/*------------------------------------------------------------------------------
* Test to see if the player event listener mechanism works.
*----------------------------------------------------------------------------*/
void
HelixPlayerTest :: eventListenerTest(void)
throw (CPPUNIT_NS::Exception)
{
CPPUNIT_ASSERT_NO_THROW(helixPlayer->initialize());
Ptr<time_duration>::Ref sleepT(new time_duration(microseconds(10)));
Ptr<TestEventListener>::Ref listener1(new TestEventListener());
helixPlayer->attachListener(listener1.get());
// try with one listener
CPPUNIT_ASSERT(!listener1->stopFlag);
CPPUNIT_ASSERT_NO_THROW(
helixPlayer->open("file:var/test.mp3");
);
CPPUNIT_ASSERT(!helixPlayer->isPlaying());
CPPUNIT_ASSERT(!listener1->stopFlag);
helixPlayer->start();
CPPUNIT_ASSERT(helixPlayer->isPlaying());
CPPUNIT_ASSERT(!listener1->stopFlag);
while (helixPlayer->isPlaying()) {
CPPUNIT_ASSERT(!listener1->stopFlag);
TimeConversion::sleep(sleepT);
}
CPPUNIT_ASSERT(!helixPlayer->isPlaying());
CPPUNIT_ASSERT(listener1->stopFlag);
listener1->stopFlag = false;
// try with two listeners
Ptr<TestEventListener>::Ref listener2(new TestEventListener());
helixPlayer->attachListener(listener2.get());
CPPUNIT_ASSERT(!listener1->stopFlag);
CPPUNIT_ASSERT(!listener2->stopFlag);
CPPUNIT_ASSERT_NO_THROW(
helixPlayer->open("file:var/test.mp3");
);
CPPUNIT_ASSERT(!helixPlayer->isPlaying());
CPPUNIT_ASSERT(!listener1->stopFlag);
CPPUNIT_ASSERT(!listener2->stopFlag);
helixPlayer->start();
CPPUNIT_ASSERT(helixPlayer->isPlaying());
CPPUNIT_ASSERT(!listener1->stopFlag);
CPPUNIT_ASSERT(!listener2->stopFlag);
while (helixPlayer->isPlaying()) {
CPPUNIT_ASSERT(!listener1->stopFlag);
CPPUNIT_ASSERT(!listener2->stopFlag);
TimeConversion::sleep(sleepT);
}
CPPUNIT_ASSERT(!helixPlayer->isPlaying());
CPPUNIT_ASSERT(listener1->stopFlag);
CPPUNIT_ASSERT(listener2->stopFlag);
listener1->stopFlag = false;
listener2->stopFlag = false;
// try with only the second listener
CPPUNIT_ASSERT_NO_THROW(
helixPlayer->detachListener(listener1.get());
);
CPPUNIT_ASSERT(!listener2->stopFlag);
CPPUNIT_ASSERT_NO_THROW(
helixPlayer->open("file:var/test.mp3");
);
CPPUNIT_ASSERT(!helixPlayer->isPlaying());
CPPUNIT_ASSERT(!listener2->stopFlag);
helixPlayer->start();
CPPUNIT_ASSERT(helixPlayer->isPlaying());
CPPUNIT_ASSERT(!listener2->stopFlag);
while (helixPlayer->isPlaying()) {
CPPUNIT_ASSERT(!listener2->stopFlag);
TimeConversion::sleep(sleepT);
}
CPPUNIT_ASSERT(!helixPlayer->isPlaying());
CPPUNIT_ASSERT(listener2->stopFlag);
listener2->stopFlag = false;
helixPlayer->close();
helixPlayer->deInitialize();
}

View file

@ -1,243 +0,0 @@
/*------------------------------------------------------------------------------
Copyright (c) 2004 Media Development Loan Fund
This file is part of the LiveSupport project.
http://livesupport.campware.org/
To report bugs, send an e-mail to bugs@campware.org
LiveSupport is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
LiveSupport is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with LiveSupport; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
Author : $Author: maroy $
Version : $Revision: 1.9 $
Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/modules/playlistExecutor/src/Attic/HelixPlayerTest.h,v $
------------------------------------------------------------------------------*/
#ifndef HelixPlayerTest_h
#define HelixPlayerTest_h
#ifndef __cplusplus
#error This is a C++ include file
#endif
/* ============================================================ include files */
#ifdef HAVE_CONFIG_H
#include "configure.h"
#endif
#include <cppunit/extensions/HelperMacros.h>
namespace LiveSupport {
namespace PlaylistExecutor {
/* ================================================================ constants */
/* =================================================================== macros */
/* =============================================================== data types */
/**
* Unit test for the HelixPlayer class.
*
* @author $Author: maroy $
* @version $Revision: 1.9 $
* @see HelixPlayer
*/
class HelixPlayerTest : public CPPUNIT_NS::TestFixture
{
CPPUNIT_TEST_SUITE(HelixPlayerTest);
CPPUNIT_TEST(firstTest);
CPPUNIT_TEST(playlengthTest);
CPPUNIT_TEST(simplePlayTest);
CPPUNIT_TEST(checkErrorConditions);
CPPUNIT_TEST(smilTest);
// CPPUNIT_TEST(smilParallelTest0);
// CPPUNIT_TEST(smilParallelTest1);
// CPPUNIT_TEST(smilParallelTest2);
// CPPUNIT_TEST(smilParallelTest3);
// CPPUNIT_TEST(smilParallelTest4);
// CPPUNIT_TEST(smilSoundAnimationTest);
CPPUNIT_TEST(animationWorkaroundTest);
CPPUNIT_TEST(eventListenerAttachTest);
CPPUNIT_TEST(eventListenerTest);
CPPUNIT_TEST_SUITE_END();
private:
/**
* The helix player to use for the tests.
*/
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:
/**
* A simple test.
*
* @exception CPPUNIT_NS::Exception on test failures.
*/
void
firstTest(void) throw (CPPUNIT_NS::Exception);
/**
* Check the length of an audio file
*
* @exception CPPUNIT_NS::Exception on test failures.
*/
void
playlengthTest(void) throw (CPPUNIT_NS::Exception);
/**
* Play something simple.
*
* @exception CPPUNIT_NS::Exception on test failures.
*/
void
simplePlayTest(void) throw (CPPUNIT_NS::Exception);
/**
* Check for error conditions.
*
* @exception CPPUNIT_NS::Exception on test failures.
*/
void
checkErrorConditions(void) throw (CPPUNIT_NS::Exception);
/**
* Test features of SMIL files.
*
* @exception CPPUNIT_NS::Exception on test failures.
*/
void
smilTest(void) throw (CPPUNIT_NS::Exception);
/**
* Test SMIL files, when playing audio clips in parallel.
*
* @exception CPPUNIT_NS::Exception on test failures.
*/
void
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.
*
* @exception CPPUNIT_NS::Exception on test failures.
*/
void
smilSoundAnimationTest(void) throw (CPPUNIT_NS::Exception);
/**
* Test the openAndStartPlaylist() method.
*
* @exception CPPUNIT_NS::Exception on test failures.
*/
void
animationWorkaroundTest(void) throw (CPPUNIT_NS::Exception);
/**
* Test to see if attaching and detaching event listeners works.
*
* @exception CPPUNIT_NS::Exception on test failures.
*/
void
eventListenerAttachTest(void) throw (CPPUNIT_NS::Exception);
/**
* Test to see if the player event listener mechanism works.
*
* @exception CPPUNIT_NS::Exception on test failures.
*/
void
eventListenerTest(void) throw (CPPUNIT_NS::Exception);
public:
/**
* Set up the environment for the test case.
*/
void
setUp(void) throw ();
/**
* Clean up the environment after the test case.
*/
void
tearDown(void) throw ();
};
/* ================================================= external data structures */
/* ====================================================== function prototypes */
} // namespace PlaylistExecutor
} // namespace LiveSupport
#endif // HelixPlayerTest_h

View file

@ -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/TwoGstreamerPlayersTest.cxx,v $
------------------------------------------------------------------------------*/
@ -60,7 +60,7 @@ using namespace LiveSupport::PlaylistExecutor;
CPPUNIT_TEST_SUITE_REGISTRATION(TwoGstreamerPlayersTest);
/**
* The name of the configuration file for the Helix player.
* The name of the configuration file for the audio player.
*/
static const std::string configFileName = "etc/twoGstreamerPlayers.xml";

View file

@ -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/TwoGstreamerPlayersTest.h,v $
------------------------------------------------------------------------------*/
@ -55,11 +55,11 @@ namespace PlaylistExecutor {
/* =============================================================== data types */
/**
* Unit test for the GstreamerPlayer class, two see if two helix players,
* Unit test for the GstreamerPlayer class, two see if two audio players,
* playing on two different sound cards work correctly.
*
* @author $Author: maroy $
* @version $Revision: 1.1 $
* @version $Revision: 1.2 $
* @see GstreamerPlayer
*/
class TwoGstreamerPlayersTest : public CPPUNIT_NS::TestFixture
@ -74,12 +74,12 @@ class TwoGstreamerPlayersTest : public CPPUNIT_NS::TestFixture
private:
/**
* Helix player #1 to use for the tests.
* Audio player #1 to use for the tests.
*/
Ptr<GstreamerPlayer>::Ref player1;
/**
* Helix player #2 to use for the tests.
* Audio player #2 to use for the tests.
*/
Ptr<GstreamerPlayer>::Ref player2;

View file

@ -1,248 +0,0 @@
/*------------------------------------------------------------------------------
Copyright (c) 2004 Media Development Loan Fund
This file is part of the LiveSupport project.
http://livesupport.campware.org/
To report bugs, send an e-mail to bugs@campware.org
LiveSupport is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
LiveSupport is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with LiveSupport; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
Author : $Author: maroy $
Version : $Revision: 1.1 $
Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/modules/playlistExecutor/src/Attic/TwoHelixPlayersTest.cxx,v $
------------------------------------------------------------------------------*/
/* ============================================================ include files */
#ifdef HAVE_CONFIG_H
#include "configure.h"
#endif
#if HAVE_UNISTD_H
#include <unistd.h>
#else
#error "Need unistd.h"
#endif
#include <string>
#include <iostream>
#include "LiveSupport/Core/TimeConversion.h"
#include "HelixPlayer.h"
#include "TestEventListener.h"
#include "TwoHelixPlayersTest.h"
using namespace LiveSupport::PlaylistExecutor;
/* =================================================== local data structures */
/* ================================================ local constants & macros */
CPPUNIT_TEST_SUITE_REGISTRATION(TwoHelixPlayersTest);
/**
* The name of the configuration file for the Helix player.
*/
static const std::string configFileName = "etc/twoHelixPlayers.xml";
/**
* The name of the root XML element in the configuration file.
*/
static const std::string rootElementName = "twoHelixPlayers";
/* =============================================== local function prototypes */
/* ============================================================= module code */
/*------------------------------------------------------------------------------
* Set up the test environment
*----------------------------------------------------------------------------*/
void
TwoHelixPlayersTest :: setUp(void) throw ()
{
try {
Ptr<xmlpp::DomParser>::Ref parser(
new xmlpp::DomParser(configFileName, true));
const xmlpp::Document * document = parser->get_document();
const xmlpp::Element * root = document->get_root_node();
xmlpp::Node::NodeList children;
const xmlpp::Element * element;
children = root->get_children(HelixPlayer::getConfigElementName());
element = dynamic_cast<const xmlpp::Element*> (*(children.begin()));
helixPlayer1.reset(new HelixPlayer());
helixPlayer1->configure(*element);
children.pop_front();
element = dynamic_cast<const xmlpp::Element*> (*(children.begin()));
helixPlayer2.reset(new HelixPlayer());
helixPlayer2->configure(*element);
} catch (std::invalid_argument &e) {
std::cerr << "semantic error in configuration file" << std::endl;
} catch (xmlpp::exception &e) {
std::cerr << e.what() << std::endl;
}
}
/*------------------------------------------------------------------------------
* Clean up the test environment
*----------------------------------------------------------------------------*/
void
TwoHelixPlayersTest :: tearDown(void) throw ()
{
helixPlayer2.reset();
helixPlayer1.reset();
}
/*------------------------------------------------------------------------------
* Test to see if the HelixPlayer engine can be started and stopped
*----------------------------------------------------------------------------*/
void
TwoHelixPlayersTest :: firstTest(void)
throw (CPPUNIT_NS::Exception)
{
try {
helixPlayer1->initialize();
helixPlayer2->initialize();
CPPUNIT_ASSERT(!helixPlayer1->isPlaying());
CPPUNIT_ASSERT(!helixPlayer2->isPlaying());
helixPlayer2->deInitialize();
helixPlayer1->deInitialize();
} catch (std::exception &e) {
CPPUNIT_FAIL("failed to initialize or de-initialize HelixPlayer");
}
}
/*------------------------------------------------------------------------------
* Play something simple on player #1
*----------------------------------------------------------------------------*/
void
TwoHelixPlayersTest :: simplePlay1Test(void)
throw (CPPUNIT_NS::Exception)
{
Ptr<time_duration>::Ref sleepT(new time_duration(microseconds(10)));
helixPlayer1->initialize();
try {
helixPlayer1->open("file:var/test.mp3");
} catch (std::invalid_argument &e) {
CPPUNIT_FAIL(e.what());
}
CPPUNIT_ASSERT(!helixPlayer1->isPlaying());
helixPlayer1->start();
CPPUNIT_ASSERT(helixPlayer1->isPlaying());
while (helixPlayer1->isPlaying()) {
TimeConversion::sleep(sleepT);
}
CPPUNIT_ASSERT(!helixPlayer1->isPlaying());
helixPlayer1->close();
helixPlayer1->deInitialize();
}
/*------------------------------------------------------------------------------
* Play something simple on player #2
*----------------------------------------------------------------------------*/
void
TwoHelixPlayersTest :: simplePlay2Test(void)
throw (CPPUNIT_NS::Exception)
{
Ptr<time_duration>::Ref sleepT(new time_duration(microseconds(10)));
helixPlayer2->initialize();
try {
helixPlayer2->open("file:var/test.mp3");
} catch (std::invalid_argument &e) {
CPPUNIT_FAIL(e.what());
}
CPPUNIT_ASSERT(!helixPlayer2->isPlaying());
helixPlayer2->start();
CPPUNIT_ASSERT(helixPlayer2->isPlaying());
while (helixPlayer2->isPlaying()) {
TimeConversion::sleep(sleepT);
}
CPPUNIT_ASSERT(!helixPlayer2->isPlaying());
helixPlayer2->close();
helixPlayer2->deInitialize();
}
/*------------------------------------------------------------------------------
* Play something simple on both players
*----------------------------------------------------------------------------*/
void
TwoHelixPlayersTest :: playBothTest(void)
throw (CPPUNIT_NS::Exception)
{
Ptr<time_duration>::Ref sleepT(new time_duration(microseconds(10)));
helixPlayer1->initialize();
helixPlayer2->initialize();
// start playing on player1
try {
helixPlayer1->open("file:var/test.mp3");
} catch (std::invalid_argument &e) {
CPPUNIT_FAIL(e.what());
}
CPPUNIT_ASSERT(!helixPlayer1->isPlaying());
helixPlayer1->start();
CPPUNIT_ASSERT(helixPlayer1->isPlaying());
// sleep some time
for (unsigned i = 0; i < 100; ++i) {
TimeConversion::sleep(sleepT);
}
helixPlayer2->setAudioDevice();
// start playing on player2
try {
helixPlayer2->open("file:var/test.mp3");
} catch (std::invalid_argument &e) {
CPPUNIT_FAIL(e.what());
}
CPPUNIT_ASSERT(!helixPlayer2->isPlaying());
helixPlayer2->start();
CPPUNIT_ASSERT(helixPlayer2->isPlaying());
// wait for both players to finish
while (helixPlayer1->isPlaying() || helixPlayer2->isPlaying()) {
TimeConversion::sleep(sleepT);
}
CPPUNIT_ASSERT(!helixPlayer1->isPlaying());
CPPUNIT_ASSERT(!helixPlayer2->isPlaying());
helixPlayer2->close();
helixPlayer1->close();
helixPlayer2->deInitialize();
helixPlayer1->deInitialize();
}

View file

@ -1,161 +0,0 @@
/*------------------------------------------------------------------------------
Copyright (c) 2004 Media Development Loan Fund
This file is part of the LiveSupport project.
http://livesupport.campware.org/
To report bugs, send an e-mail to bugs@campware.org
LiveSupport is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
LiveSupport is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with LiveSupport; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
Author : $Author: maroy $
Version : $Revision: 1.1 $
Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/modules/playlistExecutor/src/Attic/TwoHelixPlayersTest.h,v $
------------------------------------------------------------------------------*/
#ifndef TwoHelixPlayersTest_h
#define TwoHelixPlayersTest_h
#ifndef __cplusplus
#error This is a C++ include file
#endif
/* ============================================================ include files */
#ifdef HAVE_CONFIG_H
#include "configure.h"
#endif
#include <cppunit/extensions/HelperMacros.h>
namespace LiveSupport {
namespace PlaylistExecutor {
/* ================================================================ constants */
/* =================================================================== macros */
/* =============================================================== data types */
/**
* Unit test for the HelixPlayer class, two see if two helix players,
* playing on two different sound cards work correctly.
*
* @author $Author: maroy $
* @version $Revision: 1.1 $
* @see HelixPlayer
*/
class TwoHelixPlayersTest : public CPPUNIT_NS::TestFixture
{
CPPUNIT_TEST_SUITE(TwoHelixPlayersTest);
CPPUNIT_TEST(firstTest);
CPPUNIT_TEST(simplePlay1Test);
CPPUNIT_TEST(simplePlay2Test);
CPPUNIT_TEST(playBothTest);
CPPUNIT_TEST_SUITE_END();
private:
/**
* Helix player #1 to use for the tests.
*/
Ptr<HelixPlayer>::Ref helixPlayer1;
/**
* Helix player #2 to use for the tests.
*/
Ptr<HelixPlayer>::Ref helixPlayer2;
/**
* Play a specific file.
*
* @param fileName the name of the file to play.
* @param player the player to use for playing the file.
* @exception CPPUNIT_NS::Exception on playing failures
*/
void
playFile(const std::string & fileName,
Ptr<HelixPlayer>::Ref player)
throw (CPPUNIT_NS::Exception);
protected:
/**
* A simple test.
*
* @exception CPPUNIT_NS::Exception on test failures.
*/
void
firstTest(void) throw (CPPUNIT_NS::Exception);
/**
* Play something on player #1.
*
* @exception CPPUNIT_NS::Exception on test failures.
*/
void
simplePlay1Test(void) throw (CPPUNIT_NS::Exception);
/**
* Play something on player #2.
*
* @exception CPPUNIT_NS::Exception on test failures.
*/
void
simplePlay2Test(void) throw (CPPUNIT_NS::Exception);
/**
* Play something on both players, at the same time.
*
* @exception CPPUNIT_NS::Exception on test failures.
*/
void
playBothTest(void) throw (CPPUNIT_NS::Exception);
public:
/**
* Set up the environment for the test case.
*/
void
setUp(void) throw ();
/**
* Clean up the environment after the test case.
*/
void
tearDown(void) throw ();
};
/* ================================================= external data structures */
/* ====================================================== function prototypes */
} // namespace PlaylistExecutor
} // namespace LiveSupport
#endif // TwoHelixPlayersTest_h

View file

@ -1,15 +0,0 @@
<smil xmlns="http://www.w3.org/2001/SMIL20/Language">
<head>
<layout>
<root-layout height="1" width="1"/>
<region id="audio_region" soundLevel="100%"/>
</layout>
</head>
<body>
<audio src="file:var/test.mp3" region="audio_region">
<animate targetElement="audio_region" attributeName="soundLevel" from="100%" to="20%" calcMode="linear" begin="2s" dur="5s" fill="freeze"/>
<animate targetElement="audio_region" attributeName="soundLevel" from="20%" to="200%" calcMode="linear" begin="8s" dur="5s" fill="freeze"/>
<animate targetElement="audio_region" attributeName="soundLevel" from="200%" to="100%" calcMode="linear" begin="16s" dur="5s" fill="freeze"/>
</audio>
</body>
</smil>

View file

@ -1,11 +0,0 @@
<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>

View file

@ -1,10 +0,0 @@
<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>

View file

@ -1,11 +0,0 @@
<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>

View file

@ -1,11 +0,0 @@
<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>

View file

@ -1,11 +0,0 @@
<smil xmlns = "http://www.w3.org/2001/SMIL20/Language"
xmlns:rn = "http://features.real.com/2001/SMIL20/Extensions">
<body>
<par>
<!-- play the same files over each other, with some offset -->
<audio src="file:var/test.mp3"/>
<audio src="file:var/test.mp3" begin="3s"/>
</par>
</body>
</smil>

View file

@ -1,10 +0,0 @@
<smil xmlns = "http://www.w3.org/2001/SMIL20/Language"
xmlns:rn = "http://features.real.com/2001/SMIL20/Extensions">
<body>
<par>
<audio src="file:var/test10001.mp3" begin="0s"/>
<audio src="file:var/test10002.mp3" begin="6s"/>
<audio src="file:var/test10003.mp3" begin="18.2s"/>
</par>
</body>
</smil>

View file

@ -21,8 +21,8 @@
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
Author : $Author: fgerlits $
Version : $Revision: 1.16 $
Author : $Author: maroy $
Version : $Revision: 1.17 $
Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/modules/storage/include/LiveSupport/Storage/StorageClientInterface.h,v $
------------------------------------------------------------------------------*/
@ -65,8 +65,8 @@ using namespace Core;
/**
* An interface for storage clients.
*
* @author $Author: fgerlits $
* @version $Revision: 1.16 $
* @author $Author: maroy $
* @version $Revision: 1.17 $
*/
class StorageClientInterface
{
@ -183,7 +183,7 @@ class StorageClientInterface
* each sub-playlist contained in the playlist.)
* The address of this local copy is
* stored in the <code>uri</code> field of the playlist. The SMIL
* file can be played using the Helix client.
* file can be played using the audio player.
* For each audio clip contained (directly or indirectly) in the
* playlist, acquireAudioClip() is called
*
@ -286,7 +286,7 @@ class StorageClientInterface
/**
* Acquire the resources for the audio clip with the specified id.
* The <code>uri</code> field of the audio clip returned by the
* method points to a binary sound file playable by the Helix client.
* method points to a binary sound file playable by the audio player.
* This binary sound file can be randomly accessed.
*
* The returned audio clip also contains a <code>token</code> field

View file

@ -21,8 +21,8 @@
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
Author : $Author: fgerlits $
Version : $Revision: 1.35 $
Author : $Author: maroy $
Version : $Revision: 1.36 $
Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/modules/storage/src/TestStorageClient.h,v $
------------------------------------------------------------------------------*/
@ -85,8 +85,8 @@ using namespace LiveSupport::Core;
* &lt;!ATTLIST testStorage tempFiles CDATA #REQUIRED &gt;
* </code></pre>
*
* @author $Author: fgerlits $
* @version $Revision: 1.35 $
* @author $Author: maroy $
* @version $Revision: 1.36 $
*/
class TestStorageClient :
virtual public Configurable,
@ -322,7 +322,7 @@ class TestStorageClient :
* each sub-playlist contained in the playlist.)
* The address of this local copy is
* stored in the <code>uri</code> field of the playlist. The SMIL
* file can be played using the Helix client.
* file can be played using the audio player.
* For each audio clip contained (directly or indirectly) in the
* playlist, acquireAudioClip() is called
*
@ -416,7 +416,7 @@ class TestStorageClient :
/**
* Acquire the resources for the audio clip with the specified id.
* The <code>uri</code> field of the audio clip returned by the
* method points to a binary sound file playable by the Helix client.
* method points to a binary sound file playable by the audio player.
* This binary sound file can be randomly accessed.
*
* The returned audio clip also contains a <code>token</code> field

View file

@ -21,8 +21,8 @@
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
Author : $Author: fgerlits $
Version : $Revision: 1.30 $
Author : $Author: maroy $
Version : $Revision: 1.31 $
Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/modules/storage/src/WebStorageClient.h,v $
------------------------------------------------------------------------------*/
@ -95,8 +95,8 @@ using namespace LiveSupport::Core;
* &lt;!ATTLIST location path CDATA #REQUIRED &gt;
* </code></pre>
*
* @author $Author: fgerlits $
* @version $Revision: 1.30 $
* @author $Author: maroy $
* @version $Revision: 1.31 $
*/
class WebStorageClient :
virtual public Configurable,
@ -316,7 +316,7 @@ class WebStorageClient :
* each sub-playlist contained in the playlist.)
* The address of this local copy is
* stored in the <code>uri</code> field of the playlist. The SMIL
* file can be played using the Helix client.
* file can be played using the audio player.
* For each audio clip contained (directly or indirectly) in the
* playlist, acquireAudioClip() is called
*
@ -423,7 +423,7 @@ class WebStorageClient :
/**
* Acquire the resources for the audio clip with the specified id.
* The <code>uri</code> field of the audio clip returned by the
* method points to a binary sound file playable by the Helix client.
* method points to a binary sound file playable by the audio player.
* This binary sound file can be randomly accessed.
*
* The returned audio clip also contains a <code>token</code> field

View file

@ -21,7 +21,7 @@
#
#
# Author : $Author: maroy $
# Version : $Revision: 1.45 $
# Version : $Revision: 1.46 $
# Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/products/gLiveSupport/etc/Makefile.in,v $
#
# @configure_input@
@ -59,13 +59,6 @@ USR_LIB_DIR = ${USR_DIR}/lib
USR_BIN_DIR = ${USR_DIR}/bin
BOOST_INCLUDE_DIR = ${USR_INCLUDE_DIR}/boost-1_31
HELIX_LIB_DIR = ${USR_LIB_DIR}/helix
HELIX_LIBS = ${HELIX_LIB_DIR}/runtlib.a \
${HELIX_LIB_DIR}/syslib.a \
${HELIX_LIB_DIR}/contlib.a \
${HELIX_LIB_DIR}/debuglib.a \
${HELIX_LIB_DIR}/utillib.a
GENRB = ${USR_BIN_DIR}/genrb
GENRBOPTS = --destdir ${TMP_DIR} \
--encoding utf-8 \
@ -186,7 +179,6 @@ LDFLAGS = @LDFLAGS@ -pthread \
${GSTREAMER_LIBS} \
${TAGLIB_LIBS} \
-L${USR_LIB_DIR} \
-L${HELIX_LIB_DIR} \
-L${CORE_LIB_DIR} \
-L${AUTHENTICATION_LIB_DIR} \
-L${STORAGE_LIB_DIR} \
@ -238,7 +230,6 @@ G_LIVESUPPORT_EXE_LIBS = -l${PLAYLIST_EXECUTOR_LIB} \
-l${WIDGETS_LIB} \
-l${SCHEDULER_CLIENT_LIB} \
-l${CORE_LIB} \
${HELIX_LIBS} \
-lboost_date_time-gcc \
-lxmlrpc++ -lssl

View file

@ -1,12 +1,12 @@
<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE audioPlayer [
<!ELEMENT audioPlayer (helixPlayer) >
<!ELEMENT audioPlayer (gstreamerPlayer) >
<!ELEMENT gstreamerPlayer EMPTY >
<!ATTLIST gstreamerPlayer audioDevice CDATA #IMPLIED >
<!ELEMENT helixPlayer EMPTY >
<!ATTLIST helixPlayer dllPath CDATA #REQUIRED >
]>
<audioPlayer>
<helixPlayer dllPath = "../../usr/lib/helix"
/>
<gstreamerPlayer audioDevice = "plughw:0,0" />
</audioPlayer>

View file

@ -78,14 +78,7 @@
<!ELEMENT outputPlayer (audioPlayer) >
<!ELEMENT cuePlayer (audioPlayer) >
<!ELEMENT audioPlayer (helixPlayer|
gstreamerPlayer) >
<!ELEMENT helixPlayer EMPTY >
<!ATTLIST helixPlayer dllPath CDATA #REQUIRED >
<!ATTLIST helixPlayer audioDevice CDATA #IMPLIED >
<!ATTLIST helixPlayer audioStreamTimeout NMTOKEN #IMPLIED >
<!ATTLIST helixPlayer fadeLookAheadTime NMTOKEN #IMPLIED >
<!ELEMENT audioPlayer (gstreamerPlayer) >
<!ELEMENT gstreamerPlayer EMPTY >
<!ATTLIST gstreamerPlayer audioDevice CDATA #IMPLIED >

View file

@ -78,14 +78,7 @@
<!ELEMENT outputPlayer (audioPlayer) >
<!ELEMENT cuePlayer (audioPlayer) >
<!ELEMENT audioPlayer (helixPlayer|
gstreamerPlayer) >
<!ELEMENT helixPlayer EMPTY >
<!ATTLIST helixPlayer dllPath CDATA #REQUIRED >
<!ATTLIST helixPlayer audioDevice CDATA #IMPLIED >
<!ATTLIST helixPlayer audioStreamTimeout NMTOKEN #IMPLIED >
<!ATTLIST helixPlayer fadeLookAheadTime NMTOKEN #IMPLIED >
<!ELEMENT audioPlayer (gstreamerPlayer) >
<!ELEMENT gstreamerPlayer EMPTY >
<!ATTLIST gstreamerPlayer audioDevice CDATA #IMPLIED >

View file

@ -78,14 +78,7 @@
<!ELEMENT outputPlayer (audioPlayer) >
<!ELEMENT cuePlayer (audioPlayer) >
<!ELEMENT audioPlayer (helixPlayer|
gstreamerPlayer) >
<!ELEMENT helixPlayer EMPTY >
<!ATTLIST helixPlayer dllPath CDATA #REQUIRED >
<!ATTLIST helixPlayer audioDevice CDATA #IMPLIED >
<!ATTLIST helixPlayer audioStreamTimeout NMTOKEN #IMPLIED >
<!ATTLIST helixPlayer fadeLookAheadTime NMTOKEN #IMPLIED >
<!ELEMENT audioPlayer (gstreamerPlayer) >
<!ELEMENT gstreamerPlayer EMPTY >
<!ATTLIST gstreamerPlayer audioDevice CDATA #IMPLIED >

View file

@ -21,8 +21,8 @@
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
Author : $Author: fgerlits $
Version : $Revision: 1.1 $
Author : $Author: maroy $
Version : $Revision: 1.2 $
Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/products/gLiveSupport/src/AudioPlayerTest.cxx,v $
------------------------------------------------------------------------------*/
@ -67,7 +67,7 @@ using namespace LiveSupport::gLiveSupport;
CPPUNIT_TEST_SUITE_REGISTRATION(AudioPlayerTest);
/**
* The name of the configuration file for the Helix player.
* The name of the configuration file for the audio player.
*/
static const std::string audioPlayerConfigFileName
= "etc/audioPlayer.xml";
@ -195,7 +195,7 @@ AudioPlayerTest :: tearDown(void) throw ()
/*------------------------------------------------------------------------------
* Test to see if the HelixPlayer engine can be started and stopped
* Test to see if the audio player engine can be started and stopped
*----------------------------------------------------------------------------*/
void
AudioPlayerTest :: firstTest(void)

View file

@ -21,7 +21,7 @@
#
#
# Author : $Author: maroy $
# Version : $Revision: 1.61 $
# Version : $Revision: 1.62 $
# Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/products/scheduler/etc/Makefile.in,v $
#
# @configure_input@
@ -56,13 +56,6 @@ USR_INCLUDE_DIR = ${USR_DIR}/include
USR_LIB_DIR = ${USR_DIR}/lib
BOOST_INCLUDE_DIR = ${USR_INCLUDE_DIR}/boost-1_31
HELIX_LIB_DIR = ${USR_LIB_DIR}/helix
HELIX_LIBS = ${HELIX_LIB_DIR}/runtlib.a \
${HELIX_LIB_DIR}/syslib.a \
${HELIX_LIB_DIR}/contlib.a \
${HELIX_LIB_DIR}/debuglib.a \
${HELIX_LIB_DIR}/utillib.a
VPATH = ${SRC_DIR}
@ -174,7 +167,6 @@ LDFLAGS = @LDFLAGS@ -pthread \
${ICU_LIBS} \
${TAGLIB_LIBS} \
-L${USR_LIB_DIR} \
-L${HELIX_LIB_DIR} \
-L${CORE_LIB_DIR} \
-L${AUTHENTICATION_LIB_DIR} \
-L${DB_LIB_DIR} \
@ -226,7 +218,6 @@ SCHEDULER_EXE_LIBS = -l${EVENT_SCHEDULER_LIB} -l${PLAYLIST_EXECUTOR_LIB} \
-l${GSTREAMER_ELEMENTS_LIB} \
-l${STORAGE_LIB} -l${DB_LIB} -l${AUTHENTICATION_LIB} \
-l${CORE_LIB} \
${HELIX_LIBS} \
-lboost_date_time-gcc \
-lxmlrpc++ -lssl

View file

@ -1,12 +0,0 @@
<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE audioPlayer [
<!ELEMENT audioPlayer (helixPlayer) >
<!ELEMENT helixPlayer EMPTY >
<!ATTLIST helixPlayer dllPath CDATA #REQUIRED >
]>
<audioPlayer>
<helixPlayer dllPath = "../../usr/lib/helix"
/>
</audioPlayer>

View file

@ -63,10 +63,7 @@
<!ELEMENT playLogFactory (postgresqlPlayLog) >
<!ELEMENT postgresqlPlayLog EMPTY >
<!ELEMENT audioPlayer (helixPlayer|gstreamerPlayer) >
<!ELEMENT helixPlayer EMPTY >
<!ATTLIST helixPlayer dllPath CDATA #REQUIRED >
<!ELEMENT audioPlayer (gstreamerPlayer) >
<!ELEMENT gstreamerPlayer EMPTY >
<!ATTLIST gstreamerPlayer audioDevice CDATA #IMPLIED >

View file

@ -66,13 +66,7 @@
<!ELEMENT playLogFactory (postgresqlPlayLog) >
<!ELEMENT postgresqlPlayLog EMPTY >
<!ELEMENT audioPlayer (helixPlayer|gstreamerPlayer) >
<!ELEMENT helixPlayer EMPTY >
<!ATTLIST helixPlayer dllPath CDATA #REQUIRED >
<!ATTLIST helixPlayer audioDevice CDATA #IMPLIED >
<!ATTLIST helixPlayer audioStreamTimeout NMTOKEN #IMPLIED >
<!ATTLIST helixPlayer fadeLookAheadTime NMTOKEN #IMPLIED >
<!ELEMENT audioPlayer (gstreamerPlayer) >
<!ELEMENT gstreamerPlayer EMPTY >
<!ATTLIST gstreamerPlayer audioDevice CDATA #IMPLIED >

View file

@ -66,13 +66,7 @@
<!ELEMENT playLogFactory (postgresqlPlayLog) >
<!ELEMENT postgresqlPlayLog EMPTY >
<!ELEMENT audioPlayer (helixPlayer|gstreamerPlayer) >
<!ELEMENT helixPlayer EMPTY >
<!ATTLIST helixPlayer dllPath CDATA #REQUIRED >
<!ATTLIST helixPlayer audioDevice CDATA #IMPLIED >
<!ATTLIST helixPlayer audioStreamTimeout NMTOKEN #IMPLIED >
<!ATTLIST helixPlayer fadeLookAheatTime NMTOKEN #IMPLIED >
<!ELEMENT audioPlayer (gstreamerPlayer) >
<!ELEMENT gstreamerPlayer EMPTY >
<!ATTLIST gstreamerPlayer audioDevice CDATA #IMPLIED >

View file

@ -21,8 +21,8 @@
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
Author : $Author: fgerlits $
Version : $Revision: 1.29 $
Author : $Author: maroy $
Version : $Revision: 1.30 $
Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/products/scheduler/src/SchedulerDaemon.cxx,v $
------------------------------------------------------------------------------*/
@ -376,7 +376,8 @@ SchedulerDaemon :: startup (void) throw ()
audioPlayer->initialize();
} catch (std::exception &e) {
// TODO: mark error
std::cerr << "Helix initialization problem: " << e.what() << std::endl;
std::cerr << "audio player initialization problem: " << e.what()
<< std::endl;
}
if (!eventScheduler.get()) {
Ptr<PlaylistEventContainer>::Ref eventContainer;

View file

@ -1,77 +0,0 @@
#!/bin/sh
#-------------------------------------------------------------------------------
# Copyright (c) 2004 Media Development Loan Fund
#
# This file is part of the LiveSupport project.
# http://livesupport.campware.org/
# To report bugs, send an e-mail to bugs@campware.org
#
# LiveSupport is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# LiveSupport is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with LiveSupport; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
#
# Author : $Author: maroy $
# Version : $Revision: 1.4 $
# Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/tools/helix/all_clients_nodist-helix-20041010/bin/Attic/install.sh,v $
#-------------------------------------------------------------------------------
#-------------------------------------------------------------------------------
# Run this script to install the helix libraries into the development system usr
# environment.
#-------------------------------------------------------------------------------
product=all_clients_nodist-helix-20041010
reldir=`dirname $0`/..
basedir=`cd $reldir; pwd;`
installdir=`cd $basedir/../../../usr; pwd;`
tmpdir=$basedir/tmp
etcdir=$basedir/etc
tar=$basedir/src/$product-source.zip
echo "installing $product from $basedir to $installdir"
mkdir -p $tmpdir
cd $tmpdir
unzip $tar
cd $product
# usr the Helix build tool to compile the libraries
# for some reason, despite the -k flag, this script will try to connect
# to the Helix CVS server.
# see https://bugs.helixcommunity.org/show_bug.cgi?id=3309
export BUILD_ROOT=$tmpdir/$product/build
./build/bin/build -m helix -trelease -k -P helix-client-all-defines-nodist splay
# copy all the necessary files manually
helix_include_dir=$installdir/include/helix
mkdir -p $helix_include_dir
cp -rf ./common/runtime/pub/* $helix_include_dir
cp -rf ./common/include/* $helix_include_dir
cp -rf ./client/include/* $helix_include_dir
cp -rf ./common/container/pub/* $helix_include_dir
cp -rf ./datatype/rm/include/* $helix_include_dir
cp -rf ./common/system/pub/* $helix_include_dir
cp -rf ./common/dbgtool/pub/* $helix_include_dir
cp -rf ./common/util/pub/* $helix_include_dir
helix_lib_dir=$installdir/lib/helix
mkdir -p $helix_lib_dir
cp ./release/*.a $helix_lib_dir
cp ./release/*.so $helix_lib_dir
# clean up
cd $basedir
rm -rf tmp

View file

@ -1,92 +0,0 @@
#!/bin/sh
#-------------------------------------------------------------------------------
# Copyright (c) 2004 Media Development Loan Fund
#
# This file is part of the LiveSupport project.
# http://livesupport.campware.org/
# To report bugs, send an e-mail to bugs@campware.org
#
# LiveSupport is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# LiveSupport is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with LiveSupport; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
#
# Author : $Author: maroy $
# Version : $Revision: 1.2 $
# Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/tools/helix/hxclient_1_3_0_neptunex-2004-12-15/bin/Attic/get_sources.sh,v $
#-------------------------------------------------------------------------------
#-------------------------------------------------------------------------------
# Run this script to get the sources from the Helix CVS server, for
# branch hxclient_1_3_0_neptunex and for the date 2004-12-15
#
# Before running this script, register at http://helixcommunity.org/
# to have CVS access to the Helix DNA CVS server. This script expects
# your Helix user id as the first parameter.
#-------------------------------------------------------------------------------
if [ "x$1" == "x" ]; then
echo "specify your Helix CVS user name as the first parameter to this script";
exit;
fi
helixUser=$1
helixProfile=helix-client-all-defines-nodist
branch=hxclient_1_3_0_neptunex
date=2004-12-15
product=$branch-$date
export SYSTEM_ID=linux-2.4-glibc23-i686
reldir=`dirname $0`/..
basedir=`cd $reldir; pwd;`
installdir=`cd $basedir/../../../usr; pwd;`
tmpdir=$basedir/tmp
etcdir=$basedir/etc
srcdir=$basedir/src
tar=$srcdir/$product.tar.bz2
echo "getting Helix sources for user $helixUser";
echo "using branch $branch and date $date";
mkdir -p $tmpdir
cd $tmpdir
# create a directory with the name of the tarball
mkdir $product
cd $product
# check out the build tool
cvs -d :ext:$helixUser@cvs.helixcommunity.org:/cvsroot/ribosome co build
export BUILD_ROOT=`pwd`/build
build=$BUILD_ROOT/bin/build
# make the build tool update its BIF files
$build -m $branch -P $helixProfile -o -v splay
# get the sources
$build -m $branch -P $helixProfile -D $date -h -o -v splay
# remove remnants of the CVS system
rm -rf `find . -type d -name CVS`
# create the source tarball
cd $tmpdir
tar cfj $tar $product
# clean up
cd $basedir
rm -rf tmp

View file

@ -1,88 +0,0 @@
#!/bin/sh
#-------------------------------------------------------------------------------
# Copyright (c) 2004 Media Development Loan Fund
#
# This file is part of the LiveSupport project.
# http://livesupport.campware.org/
# To report bugs, send an e-mail to bugs@campware.org
#
# LiveSupport is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# LiveSupport is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with LiveSupport; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
#
# Author : $Author: maroy $
# Version : $Revision: 1.4 $
# Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/tools/helix/hxclient_1_3_0_neptunex-2004-12-15/bin/Attic/install.sh,v $
#-------------------------------------------------------------------------------
#-------------------------------------------------------------------------------
# Run this script to install the helix libraries into the development system usr
# environment.
#-------------------------------------------------------------------------------
product=hxclient_1_3_0_neptunex-2004-12-15
helixProfile=helix-client-all-defines-nodist
branch=hxclient_1_3_0_neptunex
export SYSTEM_ID=linux-2.4-glibc23-i686
reldir=`dirname $0`/..
basedir=`cd $reldir; pwd;`
installdir=`cd $basedir/../../../usr; pwd;`
tmpdir=$basedir/tmp
etcdir=$basedir/etc
srcdir=$basedir/src
tar=$srcdir/$product.tar.bz2
echo "installing $product from $basedir to $installdir"
mkdir -p $tmpdir
cd $tmpdir
tar xfj $tar
cd $product
# usr the Helix build tool to compile the libraries
# for some reason, despite the -k flag, this script will try to connect
# to the Helix CVS server.
# see https://bugs.helixcommunity.org/show_bug.cgi?id=3309
export BUILD_ROOT=$tmpdir/$product/build
export BUILDRC=$etcdir/buildrc
build=$BUILD_ROOT/bin/build
$build -m $branch -P $helixProfile -trelease -k splay
# copy all the necessary files manually
helix_include_dir=$installdir/include/helix
mkdir -p $helix_include_dir
cp -rf ./common/runtime/pub/* $helix_include_dir
cp -rf ./common/include/* $helix_include_dir
cp -rf ./client/include/* $helix_include_dir
cp -rf ./common/container/pub/* $helix_include_dir
cp -rf ./datatype/rm/include/* $helix_include_dir
cp -rf ./common/system/pub/* $helix_include_dir
cp -rf ./common/dbgtool/pub/* $helix_include_dir
cp -rf ./common/util/pub/* $helix_include_dir
helix_lib_dir=$installdir/lib/helix
mkdir -p $helix_lib_dir
cp ./release/*.a $helix_lib_dir
cp ./release/*.so $helix_lib_dir
usr_bin_dir=$installdir/bin
mkdir -p $usr_bin_dir
cp ./release/splay $usr_bin_dir
# clean up
cd $basedir
rm -rf tmp

View file

@ -1,4 +0,0 @@
AddBIFPath("common", "[helix]/common/build/BIF")
AddBIFPath("client", "[helix]/client/build/BIF")
SetSDKPath("oggvorbissdk", "/usr")

View file

@ -1,92 +0,0 @@
#!/bin/sh
#-------------------------------------------------------------------------------
# Copyright (c) 2004 Media Development Loan Fund
#
# This file is part of the LiveSupport project.
# http://livesupport.campware.org/
# To report bugs, send an e-mail to bugs@campware.org
#
# LiveSupport is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# LiveSupport is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with LiveSupport; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
#
# Author : $Author: maroy $
# Version : $Revision: 1.1 $
# Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/tools/helix/hxclient_1_3_0_neptunex-2005-02-11/bin/Attic/get_sources.sh,v $
#-------------------------------------------------------------------------------
#-------------------------------------------------------------------------------
# Run this script to get the sources from the Helix CVS server, for
# branch hxclient_1_3_0_neptunex and for the date 2004-12-15
#
# Before running this script, register at http://helixcommunity.org/
# to have CVS access to the Helix DNA CVS server. This script expects
# your Helix user id as the first parameter.
#-------------------------------------------------------------------------------
if [ "x$1" == "x" ]; then
echo "specify your Helix CVS user name as the first parameter to this script";
exit;
fi
helixUser=$1
helixProfile=helix-client-all-defines-nodist
branch=hxclient_1_3_0_neptunex
date=2005-02-11
product=$branch-$date
export SYSTEM_ID=linux-2.4-glibc23-i686
reldir=`dirname $0`/..
basedir=`cd $reldir; pwd;`
installdir=`cd $basedir/../../../usr; pwd;`
tmpdir=$basedir/tmp
etcdir=$basedir/etc
srcdir=$basedir/src
tar=$srcdir/$product.tar.bz2
echo "getting Helix sources for user $helixUser";
echo "using branch $branch and date $date";
mkdir -p $tmpdir
cd $tmpdir
# create a directory with the name of the tarball
mkdir $product
cd $product
# check out the build tool
cvs -d :ext:$helixUser@cvs.helixcommunity.org:/cvsroot/ribosome co build
export BUILD_ROOT=`pwd`/build
build=$BUILD_ROOT/bin/build
# make the build tool update its BIF files
$build -m $branch -P $helixProfile -o -v splay
# get the sources
$build -m $branch -P $helixProfile -D $date -h -o -v splay
# remove remnants of the CVS system
rm -rf `find . -type d -name CVS`
# create the source tarball
cd $tmpdir
tar cfj $tar $product
# clean up
cd $basedir
rm -rf tmp

View file

@ -1,88 +0,0 @@
#!/bin/sh
#-------------------------------------------------------------------------------
# Copyright (c) 2004 Media Development Loan Fund
#
# This file is part of the LiveSupport project.
# http://livesupport.campware.org/
# To report bugs, send an e-mail to bugs@campware.org
#
# LiveSupport is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# LiveSupport is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with LiveSupport; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
#
# Author : $Author: maroy $
# Version : $Revision: 1.1 $
# Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/tools/helix/hxclient_1_3_0_neptunex-2005-02-11/bin/Attic/install.sh,v $
#-------------------------------------------------------------------------------
#-------------------------------------------------------------------------------
# Run this script to install the helix libraries into the development system usr
# environment.
#-------------------------------------------------------------------------------
product=hxclient_1_3_0_neptunex-2005-02-11
helixProfile=helix-client-all-defines-nodist
branch=hxclient_1_3_0_neptunex
export SYSTEM_ID=linux-2.4-glibc23-i686
reldir=`dirname $0`/..
basedir=`cd $reldir; pwd;`
installdir=`cd $basedir/../../../usr; pwd;`
tmpdir=$basedir/tmp
etcdir=$basedir/etc
srcdir=$basedir/src
tar=$srcdir/$product.tar.bz2
echo "installing $product from $basedir to $installdir"
mkdir -p $tmpdir
cd $tmpdir
tar xfj $tar
cd $product
# usr the Helix build tool to compile the libraries
# for some reason, despite the -k flag, this script will try to connect
# to the Helix CVS server.
# see https://bugs.helixcommunity.org/show_bug.cgi?id=3309
export BUILD_ROOT=$tmpdir/$product/build
export BUILDRC=$etcdir/buildrc
build=$BUILD_ROOT/bin/build
$build -m $branch -P $helixProfile -trelease -k splay
# copy all the necessary files manually
helix_include_dir=$installdir/include/helix
mkdir -p $helix_include_dir
cp -rf ./common/runtime/pub/* $helix_include_dir
cp -rf ./common/include/* $helix_include_dir
cp -rf ./client/include/* $helix_include_dir
cp -rf ./common/container/pub/* $helix_include_dir
cp -rf ./datatype/rm/include/* $helix_include_dir
cp -rf ./common/system/pub/* $helix_include_dir
cp -rf ./common/dbgtool/pub/* $helix_include_dir
cp -rf ./common/util/pub/* $helix_include_dir
helix_lib_dir=$installdir/lib/helix
mkdir -p $helix_lib_dir
cp ./release/*.a $helix_lib_dir
cp ./release/*.so $helix_lib_dir
usr_bin_dir=$installdir/bin
mkdir -p $usr_bin_dir
cp ./release/splay $usr_bin_dir
# clean up
cd $basedir
rm -rf tmp

View file

@ -1,4 +0,0 @@
AddBIFPath("common", "[helix]/common/build/BIF")
AddBIFPath("client", "[helix]/client/build/BIF")
SetSDKPath("oggvorbissdk", "/usr")