diff --git a/livesupport/modules/playlistExecutor/include/LiveSupport/PlaylistExecutor/AudioPlayerInterface.h b/livesupport/modules/playlistExecutor/include/LiveSupport/PlaylistExecutor/AudioPlayerInterface.h index 3bd3001d8..3c57423cb 100644 --- a/livesupport/modules/playlistExecutor/include/LiveSupport/PlaylistExecutor/AudioPlayerInterface.h +++ b/livesupport/modules/playlistExecutor/include/LiveSupport/PlaylistExecutor/AudioPlayerInterface.h @@ -22,7 +22,7 @@ Author : $Author: maroy $ - Version : $Revision: 1.14 $ + Version : $Revision: 1.15 $ Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/modules/playlistExecutor/include/LiveSupport/PlaylistExecutor/AudioPlayerInterface.h,v $ ------------------------------------------------------------------------------*/ @@ -69,7 +69,7 @@ using namespace LiveSupport::Core; * A generic interface for playing audio files. * * @author $Author: maroy $ - * @version $Revision: 1.14 $ + * @version $Revision: 1.15 $ */ class AudioPlayerInterface { @@ -149,6 +149,15 @@ class AudioPlayerInterface open(const std::string fileUrl) throw (std::invalid_argument) = 0; + /** + * Tell if the audio player has been openned. + * + * @return true if the audio player is openned, false otherwise. + * @see #open + */ + virtual bool + isOpen(void) throw () = 0; + /** * Close an audio source that was opened. * diff --git a/livesupport/modules/playlistExecutor/src/GstreamerPlayer.cxx b/livesupport/modules/playlistExecutor/src/GstreamerPlayer.cxx index 0db8ad308..c51b1ad6d 100644 --- a/livesupport/modules/playlistExecutor/src/GstreamerPlayer.cxx +++ b/livesupport/modules/playlistExecutor/src/GstreamerPlayer.cxx @@ -22,7 +22,7 @@ Author : $Author: maroy $ - Version : $Revision: 1.10 $ + Version : $Revision: 1.11 $ Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/modules/playlistExecutor/src/GstreamerPlayer.cxx,v $ ------------------------------------------------------------------------------*/ @@ -240,7 +240,7 @@ GstreamerPlayer :: open(const std::string fileUrl) GstElement * fakesink; gint64 position; - if (isOpened()) { + if (isOpen()) { close(); } @@ -316,7 +316,7 @@ GstreamerPlayer :: open(const std::string fileUrl) * Tell if we've been opened. *----------------------------------------------------------------------------*/ bool -GstreamerPlayer :: isOpened(void) throw () +GstreamerPlayer :: isOpen(void) throw () { return decoder != 0; } @@ -332,7 +332,7 @@ GstreamerPlayer :: getPlaylength(void) throw (std::logic_error) gint64 ns; GstFormat format = GST_FORMAT_TIME; - if (!isOpened()) { + if (!isOpen()) { throw std::logic_error("player not open"); } @@ -358,7 +358,7 @@ GstreamerPlayer :: getPosition(void) throw (std::logic_error) gint64 ns; GstFormat format = GST_FORMAT_TIME; - if (!isOpened()) { + if (!isOpen()) { throw std::logic_error("player not open"); } @@ -380,7 +380,7 @@ GstreamerPlayer :: getPosition(void) throw (std::logic_error) void GstreamerPlayer :: start(void) throw (std::logic_error) { - if (!isOpened()) { + if (!isOpen()) { throw std::logic_error("GstreamerPlayer not opened yet"); } @@ -419,7 +419,7 @@ GstreamerPlayer :: isPlaying(void) throw () void GstreamerPlayer :: stop(void) throw (std::logic_error) { - if (!isOpened()) { + if (!isOpen()) { throw std::logic_error("GstreamerPlayer not opened yet"); } diff --git a/livesupport/modules/playlistExecutor/src/GstreamerPlayer.h b/livesupport/modules/playlistExecutor/src/GstreamerPlayer.h index a68c6b360..616624a57 100644 --- a/livesupport/modules/playlistExecutor/src/GstreamerPlayer.h +++ b/livesupport/modules/playlistExecutor/src/GstreamerPlayer.h @@ -22,7 +22,7 @@ Author : $Author: maroy $ - Version : $Revision: 1.9 $ + Version : $Revision: 1.10 $ Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/modules/playlistExecutor/src/GstreamerPlayer.h,v $ ------------------------------------------------------------------------------*/ @@ -86,7 +86,7 @@ using namespace LiveSupport::Core; * * * @author $Author: maroy $ - * @version $Revision: 1.9 $ + * @version $Revision: 1.10 $ */ class GstreamerPlayer : virtual public Configurable, virtual public AudioPlayerInterface @@ -185,15 +185,6 @@ class GstreamerPlayer : virtual public Configurable, virtual void fireOnStopEvent(void) throw (); - /** - * Tell if the object is currently opened (has a file source to - * read.) - * - * @return true if the object is currently opened, false otherwise. - */ - bool - isOpened(void) throw (); - public: /** @@ -310,6 +301,15 @@ class GstreamerPlayer : virtual public Configurable, virtual void open(const std::string fileUrl) throw (std::invalid_argument); + /** + * Tell if the object is currently opened (has a file source to + * read.) + * + * @return true if the object is currently opened, false otherwise. + */ + virtual bool + isOpen(void) throw (); + /** * Close an audio source that was opened. *