Author: solomax
Date: Tue May 29 03:05:25 2012
New Revision: 1343457
URL: http://svn.apache.org/viewvc?rev=1343457&view=rev
Log:
Hardcoded strings in aar/jar names are replaces with project.distname property
Modified:
incubator/openmeetings/trunk/singlewebapp/.classpath
incubator/openmeetings/trunk/singlewebapp/WebContent/WEB-INF/openmeetings-applicationContext.xml
incubator/openmeetings/trunk/singlewebapp/build.xml
incubator/openmeetings/trunk/singlewebapp/src/META-INF/mysql_persistence.xml
incubator/openmeetings/trunk/singlewebapp/src/org/openmeetings/app/conference/session/RoomClient.java
incubator/openmeetings/trunk/singlewebapp/src/org/openmeetings/app/remote/red5/ScopeApplicationAdapter.java
incubator/openmeetings/trunk/singlewebapp/src/org/openmeetings/screen/webstart/CoreScreenShare.java
incubator/openmeetings/trunk/singlewebapp/src/org/openmeetings/screen/webstart/gui/ScreenSharerFrame.java
Modified: incubator/openmeetings/trunk/singlewebapp/.classpath
URL:
http://svn.apache.org/viewvc/incubator/openmeetings/trunk/singlewebapp/.classpath?rev=1343457&r1=1343456&r2=1343457&view=diff
==============================================================================
--- incubator/openmeetings/trunk/singlewebapp/.classpath (original)
+++ incubator/openmeetings/trunk/singlewebapp/.classpath Tue May 29 03:05:25
2012
@@ -114,7 +114,7 @@
<classpathentry kind="lib"
path="build/lib/dtd-generator/trang-jar-20091111.jar"/>
<classpathentry kind="lib"
path="build/lib/om/axis2-kernel-jar-1.7.0-SNAPSHOT.jar"/>
<classpathentry kind="lib"
path="build/red5/dist/commons-cli-jar-1.2.jar"/>
- <classpathentry kind="lib"
path="build/lib/mainlibs/red5-client-jar-1.0-RC2.jar"/>
+ <classpathentry kind="lib"
path="build/lib/mainlibs/red5-client-jar-1.0-RC2.jar"
sourcepath="D:/mm_src/svn/red5-client/src"/>
<classpathentry kind="lib"
path="build/lib/mainlibs/cglib-jar-2.2.2.jar"/>
<classpathentry kind="lib"
path="build/lib/mainlibs/commons-fileupload-jar-1.2.2.jar"/>
<classpathentry kind="lib"
path="build/lib/mainlibs/commons-io-jar-2.1.jar"/>
Modified:
incubator/openmeetings/trunk/singlewebapp/WebContent/WEB-INF/openmeetings-applicationContext.xml
URL:
http://svn.apache.org/viewvc/incubator/openmeetings/trunk/singlewebapp/WebContent/WEB-INF/openmeetings-applicationContext.xml?rev=1343457&r1=1343456&r2=1343457&view=diff
==============================================================================
---
incubator/openmeetings/trunk/singlewebapp/WebContent/WEB-INF/openmeetings-applicationContext.xml
(original)
+++
incubator/openmeetings/trunk/singlewebapp/WebContent/WEB-INF/openmeetings-applicationContext.xml
Tue May 29 03:05:25 2012
@@ -70,6 +70,7 @@
<bean id="chatservice.service"
class="org.openmeetings.app.remote.ChatService" />
<bean id="calendarservice.service"
class="org.openmeetings.app.remote.CalendarService" />
<bean id="flvrecorderservice.service"
class="org.openmeetings.app.remote.FLVRecorderService" />
+ <bean id="streamPublishingService"
class="org.openmeetings.app.remote.StreamPublishingService" />
<bean id="openmeetings.FlvRecorderConverterTask"
class="org.openmeetings.app.data.flvrecord.converter.FlvRecorderConverterTask"
/>
<bean id="openmeetings.FlvInterviewConverterTask"
Modified: incubator/openmeetings/trunk/singlewebapp/build.xml
URL:
http://svn.apache.org/viewvc/incubator/openmeetings/trunk/singlewebapp/build.xml?rev=1343457&r1=1343456&r2=1343457&view=diff
==============================================================================
--- incubator/openmeetings/trunk/singlewebapp/build.xml (original)
+++ incubator/openmeetings/trunk/singlewebapp/build.xml Tue May 29 03:05:25 2012
@@ -266,7 +266,7 @@
</jar>
<!-- Build WebServices -->
- <jar
destfile="${dist.webapps.dir}/WEB-INF/services/OpenMeetingsService-${jar.suffix}.aar">
+ <jar
destfile="${dist.webapps.dir}/WEB-INF/services/${project.distname}-${jar.suffix}.aar">
<fileset dir="src/">
<include name="META-INF/services.xml" />
</fileset>
@@ -275,7 +275,7 @@
<include name="META-INF/NOTICE" />
</fileset>
</jar>
- <jar
destfile="${dist.webapps.dir}/WEB-INF/lib/openmeetings-WebService-${jar.suffix}.jar">
+ <jar
destfile="${dist.webapps.dir}/WEB-INF/lib/${project.distname}-WebService-${jar.suffix}.jar">
<fileset dir="${main.out.dir}">
<include name="**/openmeetings/axis/**" />
<include name="META-INF/LICENSE" />
Modified:
incubator/openmeetings/trunk/singlewebapp/src/META-INF/mysql_persistence.xml
URL:
http://svn.apache.org/viewvc/incubator/openmeetings/trunk/singlewebapp/src/META-INF/mysql_persistence.xml?rev=1343457&r1=1343456&r2=1343457&view=diff
==============================================================================
---
incubator/openmeetings/trunk/singlewebapp/src/META-INF/mysql_persistence.xml
(original)
+++
incubator/openmeetings/trunk/singlewebapp/src/META-INF/mysql_persistence.xml
Tue May 29 03:05:25 2012
@@ -75,7 +75,7 @@
<property name="openjpa.ConnectionDriverName"
value="org.apache.commons.dbcp.BasicDataSource" />
<property name="openjpa.ConnectionProperties"
value="DriverClassName=com.mysql.jdbc.Driver
- ,
Url=jdbc:mysql://localhost:3306/openmeetings?autoReconnect=true&useUnicode=true&createDatabaseIfNotExist=true&characterEncoding=utf-8&connectionCollation=utf8_general_ci&cachePrepStmts=true&cacheCallableStatements=true&cacheServerConfiguration=true&useLocalSessionState=true&elideSetAutoCommits=true&alwaysSendSetIsolation=false&enableQueryTimeouts=false&prepStmtCacheSize=3000&prepStmtCacheSqlLimit=1000
+ ,
Url=jdbc:mysql://192.168.72.105:3306/openmeetings?autoReconnect=true&useUnicode=true&createDatabaseIfNotExist=true&characterEncoding=utf-8&connectionCollation=utf8_general_ci&cachePrepStmts=true&cacheCallableStatements=true&cacheServerConfiguration=true&useLocalSessionState=true&elideSetAutoCommits=true&alwaysSendSetIsolation=false&enableQueryTimeouts=false&prepStmtCacheSize=3000&prepStmtCacheSqlLimit=1000
, MaxActive=100
, MaxWait=10000
, TestOnBorrow=true
@@ -89,6 +89,6 @@
<property name="openjpa.QueryCache" value="false"/>
<property name="openjpa.jdbc.DBDictionary"
value="batchLimit=100,tableType=myisam"/>
<property name="openjpa.jdbc.QuerySQLCache"
value="false"/>
- </properties>
+ </properties>
</persistence-unit>
</persistence>
Modified:
incubator/openmeetings/trunk/singlewebapp/src/org/openmeetings/app/conference/session/RoomClient.java
URL:
http://svn.apache.org/viewvc/incubator/openmeetings/trunk/singlewebapp/src/org/openmeetings/app/conference/session/RoomClient.java?rev=1343457&r1=1343456&r2=1343457&view=diff
==============================================================================
---
incubator/openmeetings/trunk/singlewebapp/src/org/openmeetings/app/conference/session/RoomClient.java
(original)
+++
incubator/openmeetings/trunk/singlewebapp/src/org/openmeetings/app/conference/session/RoomClient.java
Tue May 29 03:05:25 2012
@@ -84,7 +84,6 @@ public class RoomClient implements Seria
* If true this client is only used to stream audio/video events,
* he should not receive any sync events / push messages <br/>
* <br/>
- * null means not initialized yet<br/>
* true the user is an audio/video connection<br/>
* false the user is a regular user with full session object<br/>
*
@@ -111,7 +110,7 @@ public class RoomClient implements Seria
*/
private int userport;
/*
- * current room idd while conferencing
+ * current room id while conferencing
*/
private Long room_id;
@@ -164,6 +163,7 @@ public class RoomClient implements Seria
boolean startRecording = false;
boolean startStreaming = false;
private boolean screenPublishStarted = false;
+ private boolean streamPublishStarted = false;
/*
* Indicates if this User is broadcasting his stream at all
@@ -594,6 +594,14 @@ public class RoomClient implements Seria
this.isAVClient = isAVClient;
}
+ public boolean isStreamPublishStarted() {
+ return streamPublishStarted;
+ }
+
+ public void setStreamPublishStarted(boolean streamPublishStarted) {
+ this.streamPublishStarted = streamPublishStarted;
+ }
+
/**
* To improve our trace log
*/
Modified:
incubator/openmeetings/trunk/singlewebapp/src/org/openmeetings/app/remote/red5/ScopeApplicationAdapter.java
URL:
http://svn.apache.org/viewvc/incubator/openmeetings/trunk/singlewebapp/src/org/openmeetings/app/remote/red5/ScopeApplicationAdapter.java?rev=1343457&r1=1343456&r2=1343457&view=diff
==============================================================================
---
incubator/openmeetings/trunk/singlewebapp/src/org/openmeetings/app/remote/red5/ScopeApplicationAdapter.java
(original)
+++
incubator/openmeetings/trunk/singlewebapp/src/org/openmeetings/app/remote/red5/ScopeApplicationAdapter.java
Tue May 29 03:05:25 2012
@@ -49,31 +49,23 @@ import org.openmeetings.app.persistence.
import org.openmeetings.app.persistence.beans.rooms.Rooms;
import org.openmeetings.app.persistence.beans.user.Users;
import org.openmeetings.app.remote.FLVRecorderService;
+import org.openmeetings.app.remote.StreamPublishingService;
import org.openmeetings.app.remote.WhiteBoardService;
import org.openmeetings.utils.math.CalendarPatterns;
-import org.red5.client.net.rtmp.ClientExceptionHandler;
import org.red5.logging.Red5LoggerFactory;
-import org.red5.server.adapter.ApplicationAdapter;
+import org.red5.server.adapter.MultiThreadedApplicationAdapter;
import org.red5.server.api.IClient;
import org.red5.server.api.IConnection;
import org.red5.server.api.Red5;
-import org.red5.server.api.scope.IBasicScope;
-import org.red5.server.api.scope.IBroadcastScope;
import org.red5.server.api.scope.IScope;
-import org.red5.server.api.scope.ScopeType;
import org.red5.server.api.service.IPendingServiceCall;
import org.red5.server.api.service.IPendingServiceCallback;
import org.red5.server.api.service.IServiceCapableConnection;
import org.red5.server.api.stream.IBroadcastStream;
-import org.red5.server.api.stream.IStreamListener;
-import org.red5.server.api.stream.IStreamPacket;
-import org.red5.server.net.rtmp.event.IRTMPEvent;
-import org.red5.server.stream.StreamingProxy;
-import org.red5.server.stream.message.RTMPMessage;
import org.slf4j.Logger;
import org.springframework.beans.factory.annotation.Autowired;
-public class ScopeApplicationAdapter extends ApplicationAdapter implements
+public class ScopeApplicationAdapter extends MultiThreadedApplicationAdapter
implements
IPendingServiceCallback {
private static final Logger log = Red5LoggerFactory.getLogger(
@@ -104,8 +96,9 @@ public class ScopeApplicationAdapter ext
private UsersDaoImpl usersDao;
@Autowired
private MeetingMemberDaoImpl meetingMemberDao;
+ @Autowired
+ private StreamPublishingService streamPublishingService;
- private Map<String, StreamingProxy> streamingProxyMap = new
HashMap<String, StreamingProxy>();
// This is the Folder where all executables are written
// for windows platform
public static String batchFileDir = "webapps" + File.separatorChar +
"ROOT"
@@ -269,7 +262,7 @@ public class ScopeApplicationAdapter ext
currentClient.getStreamid(), currentClient);
}
if
(Boolean.valueOf(map.get("stopPublishing").toString())) {
- streamPublishingStop();
+
streamPublishingService.streamPublishingStop(this);
if (currentClient.getIsScreenClient()
&& currentClient.isStartStreaming()) {
returnMap.put("result",
"stopPublishingOnly");
}
@@ -414,7 +407,9 @@ public class ScopeApplicationAdapter ext
flvRecorderService.recordMeetingStream(recordingName, "", false);
} else if
(Boolean.valueOf(map.get("startPublishing").toString())) {
- if (streamPublishingStart("" +
map.get("publishingHost")
+ if
(streamPublishingService.streamPublishingStart(
+ this
+ , "" + map.get("publishingHost")
, "" + map.get("publishingApp")
, "" + map.get("publishingId")))
{
@@ -800,78 +795,6 @@ public class ScopeApplicationAdapter ext
}
}
- public IBroadcastScope getBroadcastScope(IScope scope, String name) {
- IBasicScope basicScope =
scope.getBasicScope(ScopeType.BROADCAST, name);
- if (!(basicScope instanceof IBroadcastScope)) {
- return null;
- } else {
- return (IBroadcastScope) basicScope;
- }
- }
-
- public boolean streamPublishingStart(String host, String app, String id) {
- final boolean[] result = {true};
- final IConnection conn = Red5.getConnectionLocal();
- RoomClient rc =
clientListManager.getClientByStreamId(conn.getClient().getId());
- String publishName = rc.getStreamPublishName();
-
- if (rc.getIsScreenClient() && rc.isStartStreaming()) {
- IScope scope = conn.getScope();
- IBroadcastStream stream = getBroadcastStream(scope,
publishName);
- IBroadcastScope bsScope = getBroadcastScope(scope, publishName);
- final StreamingProxy proxy = new StreamingProxy();
- proxy.setHost(host);
- proxy.setApp(app);
- proxy.setPort(1935);
- proxy.init();
- proxy.setExceptionHandler(new ClientExceptionHandler() {
- public void handleException(Throwable
throwable) {
- result[0] = false;
- HashMap<String, Object> params = new
HashMap<String, Object>();
- params.put("stopPublishing", true);
- params.put("error",
throwable.getMessage());
-
((IServiceCapableConnection)conn).invoke(
- "screenSharerAction"
- , new Object[] { params }
- , ScopeApplicationAdapter.this);
- }
- });
- bsScope.subscribe(proxy, null);
- proxy.start(id, "live", null);
- streamingProxyMap.put(publishName, proxy);
- stream.addStreamListener(new IStreamListener() {
- public void packetReceived(IBroadcastStream
stream, IStreamPacket packet) {
- try {
- RTMPMessage m =
RTMPMessage.build((IRTMPEvent)packet, packet.getTimestamp());
- proxy.pushMessage(null, m);
- } catch (Exception e) {
- log.error("Exception while
sending proxy message", e);
- }
- }
- });
- }
- return result[0];
- }
-
- public void streamPublishingStop() {
- IConnection current = Red5.getConnectionLocal();
- RoomClient rc =
clientListManager.getClientByStreamId(current.getClient().getId());
- String publishName = rc.getStreamPublishName();
-
- if (rc.getIsScreenClient() && publishName != null) {
- IScope scope = current.getScope();
- IBroadcastStream stream = getBroadcastStream(scope,
publishName);
- StreamingProxy proxy =
streamingProxyMap.remove(publishName);
- if (proxy != null) {
- proxy.stop();
- IBroadcastScope bsScope =
getBroadcastScope(scope, stream.getPublishedName());
- if (bsScope != null) {
- bsScope.unsubscribe(proxy);
- }
- }
- }
- }
-
/**
* This method handles the Event after a stream has been removed all
* connected Clients in the same room will get a notification
@@ -886,7 +809,7 @@ public class ScopeApplicationAdapter ext
log.debug("start streamBroadcastClose broadcast close: "
+ stream.getPublishedName());
try {
- streamPublishingStop();
+ streamPublishingService.streamPublishingStop(this);
IConnection current = Red5.getConnectionLocal();
RoomClient rcl =
clientListManager.getClientByStreamId(current.getClient().getId());
Modified:
incubator/openmeetings/trunk/singlewebapp/src/org/openmeetings/screen/webstart/CoreScreenShare.java
URL:
http://svn.apache.org/viewvc/incubator/openmeetings/trunk/singlewebapp/src/org/openmeetings/screen/webstart/CoreScreenShare.java?rev=1343457&r1=1343456&r2=1343457&view=diff
==============================================================================
---
incubator/openmeetings/trunk/singlewebapp/src/org/openmeetings/screen/webstart/CoreScreenShare.java
(original)
+++
incubator/openmeetings/trunk/singlewebapp/src/org/openmeetings/screen/webstart/CoreScreenShare.java
Tue May 29 03:05:25 2012
@@ -166,6 +166,7 @@ public class CoreScreenShare {
});
frame.setVisible(true);
frame.setRecordingTabEnabled(allowRecording);
+ frame.setPublishingTabEnabled(allowRecording);
logger.debug("initialized");
Modified:
incubator/openmeetings/trunk/singlewebapp/src/org/openmeetings/screen/webstart/gui/ScreenSharerFrame.java
URL:
http://svn.apache.org/viewvc/incubator/openmeetings/trunk/singlewebapp/src/org/openmeetings/screen/webstart/gui/ScreenSharerFrame.java?rev=1343457&r1=1343456&r2=1343457&view=diff
==============================================================================
---
incubator/openmeetings/trunk/singlewebapp/src/org/openmeetings/screen/webstart/gui/ScreenSharerFrame.java
(original)
+++
incubator/openmeetings/trunk/singlewebapp/src/org/openmeetings/screen/webstart/gui/ScreenSharerFrame.java
Tue May 29 03:05:25 2012
@@ -524,7 +524,7 @@ public class ScreenSharerFrame extends J
BorderFactory.createEmptyBorder(0, 5, 0, 0)));
panelStatus.add(lblStatus);
- setPublishingTabEnabled(false);
+ //setPublishingTabEnabled(false);
contentPane.setLayout(gl_contentPane);
// Background Image
@@ -559,7 +559,7 @@ public class ScreenSharerFrame extends J
tabbedPane.setToolTipTextAt(0, enabled ? null :
recordingTipLabel);
}
- private void setPublishingTabEnabled(boolean enabled) {
+ public void setPublishingTabEnabled(boolean enabled) {
panelPublish.setEnabled(enabled);
btnStopPublish.setEnabled(false);
tabbedPane.setEnabledAt(1, enabled);