Revision: 16274
Author: oleg.kulikoff
Date: Sat Jan 8 09:56:21 2011
Log: Separate generic player interface
http://code.google.com/p/mobicents/source/detail?r=16274
Added:
/trunk/servers/media/core/server-spi/src/main/java/org/mobicents/media/server/spi/player
/trunk/servers/media/core/server-spi/src/main/java/org/mobicents/media/server/spi/player/Player.java
/trunk/servers/media/core/server-spi/src/main/java/org/mobicents/media/server/spi/player/PlayerEvent.java
/trunk/servers/media/core/server-spi/src/main/java/org/mobicents/media/server/spi/player/PlayerListener.java
Deleted:
/trunk/servers/media/core/server-spi/src/main/java/org/mobicents/media/server/spi/dtmf/player/Player.java
/trunk/servers/media/core/server-spi/src/main/java/org/mobicents/media/server/spi/dtmf/player/PlayerEvent.java
/trunk/servers/media/core/server-spi/src/main/java/org/mobicents/media/server/spi/dtmf/player/PlayerListener.java
=======================================
--- /dev/null
+++
/trunk/servers/media/core/server-spi/src/main/java/org/mobicents/media/server/spi/player/Player.java
Sat Jan 8 09:56:21 2011
@@ -0,0 +1,57 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright XXXX, Red Hat Middleware LLC, and individual contributors as
indicated
+ * by the @authors tag. All rights reserved.
+ * See the copyright.txt in the distribution for a full listing
+ * of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU General Public License, v. 2.0.
+ * This program is distributed in the hope that it will be useful, but
WITHOUT A
+ * 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,
+ * v. 2.0 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301, USA.
+ */
+package org.mobicents.media.server.spi.player;
+
+import java.io.IOException;
+import org.mobicents.media.server.spi.ResourceUnavailableException;
+import org.mobicents.media.server.spi.listener.TooManyListenersException;
+
+/**
+ *
+ * @author kulikov
+ */
+public interface Player {
+ /**
+ * Assigns URL to play media from.
+ *
+ * @param url the url to media file.
+ * @throws java.io.IOException if file can not be read
+ * @throws java.io.ResourceUnavailableException if file is not
supported.
+ */
+ public void setURL(String url) throws IOException,
ResourceUnavailableException;
+
+ /**
+ * Starts media processing.
+ */
+ public void start();
+
+ /**
+ * Terminates media processing.
+ */
+ public void stop();
+
+ public void setMaxDuration(long duration);
+ public void setMediaTime(long timestamp);
+
+ public void setInitialDelay(long delay);
+
+ public void addListener(PlayerListener listener) throws
TooManyListenersException;
+ public void removeListener(PlayerListener listener);
+
+
+}
=======================================
--- /dev/null
+++
/trunk/servers/media/core/server-spi/src/main/java/org/mobicents/media/server/spi/player/PlayerEvent.java
Sat Jan 8 09:56:21 2011
@@ -0,0 +1,32 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright XXXX, Red Hat Middleware LLC, and individual contributors as
indicated
+ * by the @authors tag. All rights reserved.
+ * See the copyright.txt in the distribution for a full listing
+ * of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU General Public License, v. 2.0.
+ * This program is distributed in the hope that it will be useful, but
WITHOUT A
+ * 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,
+ * v. 2.0 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301, USA.
+ */
+package org.mobicents.media.server.spi.player;
+
+import org.mobicents.media.server.spi.listener.Event;
+
+/**
+ *
+ * @author kulikov
+ */
+public interface PlayerEvent extends Event<Player> {
+ public static final int START = 1;
+ public static final int STOP = 2;
+ public static final int FAILED = 3;
+
+ public int getID();
+}
=======================================
--- /dev/null
+++
/trunk/servers/media/core/server-spi/src/main/java/org/mobicents/media/server/spi/player/PlayerListener.java
Sat Jan 8 09:56:21 2011
@@ -0,0 +1,28 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright XXXX, Red Hat Middleware LLC, and individual contributors as
indicated
+ * by the @authors tag. All rights reserved.
+ * See the copyright.txt in the distribution for a full listing
+ * of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU General Public License, v. 2.0.
+ * This program is distributed in the hope that it will be useful, but
WITHOUT A
+ * 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,
+ * v. 2.0 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301, USA.
+ */
+package org.mobicents.media.server.spi.player;
+
+import org.mobicents.media.server.spi.listener.Listener;
+
+/**
+ *
+ * @author kulikov
+ */
+public interface PlayerListener extends Listener<PlayerEvent> {
+
+}
=======================================
---
/trunk/servers/media/core/server-spi/src/main/java/org/mobicents/media/server/spi/dtmf/player/Player.java
Sat Jan 8 09:40:59 2011
+++ /dev/null
@@ -1,56 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright XXXX, Red Hat Middleware LLC, and individual contributors as
indicated
- * by the @authors tag. All rights reserved.
- * See the copyright.txt in the distribution for a full listing
- * of individual contributors.
- * This copyrighted material is made available to anyone wishing to use,
- * modify, copy, or redistribute it subject to the terms and conditions
- * of the GNU General Public License, v. 2.0.
- * This program is distributed in the hope that it will be useful, but
WITHOUT A
- * 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,
- * v. 2.0 along with this distribution; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
- * MA 02110-1301, USA.
- */
-package org.mobicents.media.server.spi.dtmf.player;
-
-import java.io.IOException;
-import org.mobicents.media.server.spi.ResourceUnavailableException;
-
-/**
- *
- * @author kulikov
- */
-public interface Player {
- /**
- * Assigns URL to play media from.
- *
- * @param url the url to media file.
- * @throws java.io.IOException if file can not be read
- * @throws java.io.ResourceUnavailableException if file is not
supported.
- */
- public void setURL(String url) throws IOException,
ResourceUnavailableException;
-
- /**
- * Starts media processing.
- */
- public void start();
-
- /**
- * Terminates media processing.
- */
- public void stop();
-
- public void setMaxDuration(long duration);
- public void setMediaTime(long timestamp);
-
- public void setInitialDelay(long delay);
-
- public void addListener(PlayerListener listener);
- public void removeListener(PlayerListener listener);
-
-
-}
=======================================
---
/trunk/servers/media/core/server-spi/src/main/java/org/mobicents/media/server/spi/dtmf/player/PlayerEvent.java
Sat Jan 8 09:40:20 2011
+++ /dev/null
@@ -1,31 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright XXXX, Red Hat Middleware LLC, and individual contributors as
indicated
- * by the @authors tag. All rights reserved.
- * See the copyright.txt in the distribution for a full listing
- * of individual contributors.
- * This copyrighted material is made available to anyone wishing to use,
- * modify, copy, or redistribute it subject to the terms and conditions
- * of the GNU General Public License, v. 2.0.
- * This program is distributed in the hope that it will be useful, but
WITHOUT A
- * 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,
- * v. 2.0 along with this distribution; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
- * MA 02110-1301, USA.
- */
-package org.mobicents.media.server.spi.dtmf.player;
-
-import org.mobicents.media.server.spi.listener.Event;
-
-/**
- *
- * @author kulikov
- */
-public interface PlayerEvent extends Event<Player> {
- public static final int START = 1;
- public static final int STOP = 2;
-
- public int getID();
-}
=======================================
---
/trunk/servers/media/core/server-spi/src/main/java/org/mobicents/media/server/spi/dtmf/player/PlayerListener.java
Sat Jan 8 09:40:20 2011
+++ /dev/null
@@ -1,28 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright XXXX, Red Hat Middleware LLC, and individual contributors as
indicated
- * by the @authors tag. All rights reserved.
- * See the copyright.txt in the distribution for a full listing
- * of individual contributors.
- * This copyrighted material is made available to anyone wishing to use,
- * modify, copy, or redistribute it subject to the terms and conditions
- * of the GNU General Public License, v. 2.0.
- * This program is distributed in the hope that it will be useful, but
WITHOUT A
- * 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,
- * v. 2.0 along with this distribution; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
- * MA 02110-1301, USA.
- */
-package org.mobicents.media.server.spi.dtmf.player;
-
-import org.mobicents.media.server.spi.listener.Listener;
-
-/**
- *
- * @author kulikov
- */
-public interface PlayerListener extends Listener<PlayerEvent> {
-
-}