You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@openmeetings.apache.org by so...@apache.org on 2012/07/17 18:12:41 UTC

svn commit: r1362554 [1/2] - in /incubator/openmeetings/trunk/singlewebapp: ./ WebContent/languages/ WebContent/src/base/ WebContent/src/base/hibernate/ WebContent/src/modules/conference/moderation/ src/org/openmeetings/app/remote/ src/org/openmeetings...

Author: solomax
Date: Tue Jul 17 16:12:39 2012
New Revision: 1362554

URL: http://svn.apache.org/viewvc?rev=1362554&view=rev
Log:
OPENMEETINGS-266 screen publishing is modified to send data from client directly to the publishing server (incomplete). Code clean up. 

Added:
    incubator/openmeetings/trunk/singlewebapp/src/org/openmeetings/screen/webstart/CaptureScreen.java
    incubator/openmeetings/trunk/singlewebapp/src/org/openmeetings/screen/webstart/RTMPClientPublish.java
Removed:
    incubator/openmeetings/trunk/singlewebapp/src/org/openmeetings/app/remote/StreamPublishingService.java
Modified:
    incubator/openmeetings/trunk/singlewebapp/.springBeans
    incubator/openmeetings/trunk/singlewebapp/WebContent/languages/arabic.xml
    incubator/openmeetings/trunk/singlewebapp/WebContent/languages/bulgarian.xml
    incubator/openmeetings/trunk/singlewebapp/WebContent/languages/catalan.xml
    incubator/openmeetings/trunk/singlewebapp/WebContent/languages/chinese simplified.xml
    incubator/openmeetings/trunk/singlewebapp/WebContent/languages/chinese traditional.xml
    incubator/openmeetings/trunk/singlewebapp/WebContent/languages/czech.xml
    incubator/openmeetings/trunk/singlewebapp/WebContent/languages/danish.xml
    incubator/openmeetings/trunk/singlewebapp/WebContent/languages/deutsch (studIP).xml
    incubator/openmeetings/trunk/singlewebapp/WebContent/languages/deutsch.xml
    incubator/openmeetings/trunk/singlewebapp/WebContent/languages/dutch.xml
    incubator/openmeetings/trunk/singlewebapp/WebContent/languages/english.xml
    incubator/openmeetings/trunk/singlewebapp/WebContent/languages/finnish.xml
    incubator/openmeetings/trunk/singlewebapp/WebContent/languages/french.xml
    incubator/openmeetings/trunk/singlewebapp/WebContent/languages/galician.xml
    incubator/openmeetings/trunk/singlewebapp/WebContent/languages/greek.xml
    incubator/openmeetings/trunk/singlewebapp/WebContent/languages/hebrew.xml
    incubator/openmeetings/trunk/singlewebapp/WebContent/languages/hungarian.xml
    incubator/openmeetings/trunk/singlewebapp/WebContent/languages/indonesian.xml
    incubator/openmeetings/trunk/singlewebapp/WebContent/languages/italian.xml
    incubator/openmeetings/trunk/singlewebapp/WebContent/languages/japanese.xml
    incubator/openmeetings/trunk/singlewebapp/WebContent/languages/korean.xml
    incubator/openmeetings/trunk/singlewebapp/WebContent/languages/persian.xml
    incubator/openmeetings/trunk/singlewebapp/WebContent/languages/polish.xml
    incubator/openmeetings/trunk/singlewebapp/WebContent/languages/portugues brazil.xml
    incubator/openmeetings/trunk/singlewebapp/WebContent/languages/portugues.xml
    incubator/openmeetings/trunk/singlewebapp/WebContent/languages/russian.xml
    incubator/openmeetings/trunk/singlewebapp/WebContent/languages/slovak.xml
    incubator/openmeetings/trunk/singlewebapp/WebContent/languages/spanish.xml
    incubator/openmeetings/trunk/singlewebapp/WebContent/languages/swedish.xml
    incubator/openmeetings/trunk/singlewebapp/WebContent/languages/thai.xml
    incubator/openmeetings/trunk/singlewebapp/WebContent/languages/turkish.xml
    incubator/openmeetings/trunk/singlewebapp/WebContent/languages/ukrainian.xml
    incubator/openmeetings/trunk/singlewebapp/WebContent/src/base/hibernate/hibRtmpConnection.lzx
    incubator/openmeetings/trunk/singlewebapp/WebContent/src/base/mainMethods.lzx
    incubator/openmeetings/trunk/singlewebapp/WebContent/src/modules/conference/moderation/moderationPanel.lzx
    incubator/openmeetings/trunk/singlewebapp/src/org/openmeetings/app/remote/WhiteBoardService.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/IScreenShare.java
    incubator/openmeetings/trunk/singlewebapp/src/org/openmeetings/screen/webstart/RTMPSScreenShare.java
    incubator/openmeetings/trunk/singlewebapp/src/org/openmeetings/screen/webstart/RTMPScreenShare.java
    incubator/openmeetings/trunk/singlewebapp/src/org/openmeetings/screen/webstart/RTMPTScreenShare.java
    incubator/openmeetings/trunk/singlewebapp/src/org/openmeetings/screen/webstart/gui/ScreenSharerFrame.java
    incubator/openmeetings/trunk/singlewebapp/src/org/openmeetings/servlet/outputhandler/ScreenRequestHandler.java

Modified: incubator/openmeetings/trunk/singlewebapp/.springBeans
URL: http://svn.apache.org/viewvc/incubator/openmeetings/trunk/singlewebapp/.springBeans?rev=1362554&r1=1362553&r2=1362554&view=diff
==============================================================================
--- incubator/openmeetings/trunk/singlewebapp/.springBeans (original)
+++ incubator/openmeetings/trunk/singlewebapp/.springBeans Tue Jul 17 16:12:39 2012
@@ -8,24 +8,6 @@
 	<enableImports><![CDATA[false]]></enableImports>
 	<configs>
 		<config>WebContent/WEB-INF/openmeetings-applicationContext.xml</config>
-		<config>WebContent/WEB-INF/red5-services/calendarservice.service.xml</config>
-		<config>WebContent/WEB-INF/red5-services/meetingmemberservice.service.xml</config>
-		<config>WebContent/WEB-INF/red5-services/fileservice.service.xml</config>
-		<config>WebContent/WEB-INF/red5-services/conferenceservice.service.xml</config>
-		<config>WebContent/WEB-INF/red5-services/userservice.service.xml</config>
-		<config>WebContent/WEB-INF/red5-services/organisationservice.service.xml</config>
-		<config>WebContent/WEB-INF/red5-services/configservice.service.xml</config>
-		<config>WebContent/WEB-INF/red5-services/errorservice.service.xml</config>
-		<config>WebContent/WEB-INF/red5-services/pollservice.service.xml</config>
-		<config>WebContent/WEB-INF/red5-services/xmlcrm.service.xml</config>
-		<config>WebContent/WEB-INF/red5-services/languageservice.service.xml</config>
-		<config>WebContent/WEB-INF/red5-services/chatservice.service.xml</config>
-		<config>WebContent/WEB-INF/red5-services/invitationservice.service.xml</config>
-		<config>WebContent/WEB-INF/red5-services/whiteboardservice.service.xml</config>
-		<config>WebContent/WEB-INF/red5-services/printservice.service.xml</config>
-		<config>WebContent/WEB-INF/red5-services/flvrecorderservice.service.xml</config>
-		<config>WebContent/WEB-INF/red5-services/ldapconfigservice.service.xml</config>
-		<config>WebContent/WEB-INF/red5-services/schedulerJobs.service.xml</config>
 	</configs>
 	<configSets>
 		<configSet>
@@ -34,24 +16,6 @@
 			<incomplete>false</incomplete>
 			<configs>
 				<config>WebContent/WEB-INF/openmeetings-applicationContext.xml</config>
-				<config>WebContent/WEB-INF/red5-services/calendarservice.service.xml</config>
-				<config>WebContent/WEB-INF/red5-services/chatservice.service.xml</config>
-				<config>WebContent/WEB-INF/red5-services/conferenceservice.service.xml</config>
-				<config>WebContent/WEB-INF/red5-services/configservice.service.xml</config>
-				<config>WebContent/WEB-INF/red5-services/errorservice.service.xml</config>
-				<config>WebContent/WEB-INF/red5-services/fileservice.service.xml</config>
-				<config>WebContent/WEB-INF/red5-services/flvrecorderservice.service.xml</config>
-				<config>WebContent/WEB-INF/red5-services/invitationservice.service.xml</config>
-				<config>WebContent/WEB-INF/red5-services/languageservice.service.xml</config>
-				<config>WebContent/WEB-INF/red5-services/ldapconfigservice.service.xml</config>
-				<config>WebContent/WEB-INF/red5-services/meetingmemberservice.service.xml</config>
-				<config>WebContent/WEB-INF/red5-services/organisationservice.service.xml</config>
-				<config>WebContent/WEB-INF/red5-services/pollservice.service.xml</config>
-				<config>WebContent/WEB-INF/red5-services/printservice.service.xml</config>
-				<config>WebContent/WEB-INF/red5-services/schedulerJobs.service.xml</config>
-				<config>WebContent/WEB-INF/red5-services/userservice.service.xml</config>
-				<config>WebContent/WEB-INF/red5-services/whiteboardservice.service.xml</config>
-				<config>WebContent/WEB-INF/red5-services/xmlcrm.service.xml</config>
 			</configs>
 			<profiles>
 			</profiles>

Modified: incubator/openmeetings/trunk/singlewebapp/WebContent/languages/arabic.xml
URL: http://svn.apache.org/viewvc/incubator/openmeetings/trunk/singlewebapp/WebContent/languages/arabic.xml?rev=1362554&r1=1362553&r2=1362554&view=diff
==============================================================================
--- incubator/openmeetings/trunk/singlewebapp/WebContent/languages/arabic.xml (original)
+++ incubator/openmeetings/trunk/singlewebapp/WebContent/languages/arabic.xml Tue Jul 17 16:12:39 2012
@@ -4536,4 +4536,7 @@ see http://incubator.apache.org/openmeet
   <string id="1503" name="Send SMS">
     <value>Send SMS</value>
   </string>
+  <string id="1504" name="publishing_message">
+    <value>Publishing. User:</value>
+  </string>
 </language>

Modified: incubator/openmeetings/trunk/singlewebapp/WebContent/languages/bulgarian.xml
URL: http://svn.apache.org/viewvc/incubator/openmeetings/trunk/singlewebapp/WebContent/languages/bulgarian.xml?rev=1362554&r1=1362553&r2=1362554&view=diff
==============================================================================
--- incubator/openmeetings/trunk/singlewebapp/WebContent/languages/bulgarian.xml (original)
+++ incubator/openmeetings/trunk/singlewebapp/WebContent/languages/bulgarian.xml Tue Jul 17 16:12:39 2012
@@ -4534,4 +4534,7 @@ see http://incubator.apache.org/openmeet
   <string id="1503" name="Send SMS">
     <value>Send SMS</value>
   </string>
+  <string id="1504" name="publishing_message">
+    <value>Publishing. User:</value>
+  </string>
 </language>

Modified: incubator/openmeetings/trunk/singlewebapp/WebContent/languages/catalan.xml
URL: http://svn.apache.org/viewvc/incubator/openmeetings/trunk/singlewebapp/WebContent/languages/catalan.xml?rev=1362554&r1=1362553&r2=1362554&view=diff
==============================================================================
--- incubator/openmeetings/trunk/singlewebapp/WebContent/languages/catalan.xml (original)
+++ incubator/openmeetings/trunk/singlewebapp/WebContent/languages/catalan.xml Tue Jul 17 16:12:39 2012
@@ -4535,4 +4535,7 @@ see http://incubator.apache.org/openmeet
   <string id="1503" name="Send SMS">
     <value>Send SMS</value>
   </string>
+  <string id="1504" name="publishing_message">
+    <value>Publishing. User:</value>
+  </string>
 </language>

Modified: incubator/openmeetings/trunk/singlewebapp/WebContent/languages/chinese simplified.xml
URL: http://svn.apache.org/viewvc/incubator/openmeetings/trunk/singlewebapp/WebContent/languages/chinese%20simplified.xml?rev=1362554&r1=1362553&r2=1362554&view=diff
==============================================================================
--- incubator/openmeetings/trunk/singlewebapp/WebContent/languages/chinese simplified.xml (original)
+++ incubator/openmeetings/trunk/singlewebapp/WebContent/languages/chinese simplified.xml Tue Jul 17 16:12:39 2012
@@ -4535,4 +4535,7 @@ see http://incubator.apache.org/openmeet
   <string id="1503" name="Send SMS">
     <value>Send SMS</value>
   </string>
+  <string id="1504" name="publishing_message">
+    <value>Publishing. User:</value>
+  </string>
 </language>

Modified: incubator/openmeetings/trunk/singlewebapp/WebContent/languages/chinese traditional.xml
URL: http://svn.apache.org/viewvc/incubator/openmeetings/trunk/singlewebapp/WebContent/languages/chinese%20traditional.xml?rev=1362554&r1=1362553&r2=1362554&view=diff
==============================================================================
--- incubator/openmeetings/trunk/singlewebapp/WebContent/languages/chinese traditional.xml (original)
+++ incubator/openmeetings/trunk/singlewebapp/WebContent/languages/chinese traditional.xml Tue Jul 17 16:12:39 2012
@@ -4547,4 +4547,7 @@ see http://incubator.apache.org/openmeet
   <string id="1503" name="Send SMS">
     <value>Send SMS</value>
   </string>
+  <string id="1504" name="publishing_message">
+    <value>Publishing. User:</value>
+  </string>
 </language>

Modified: incubator/openmeetings/trunk/singlewebapp/WebContent/languages/czech.xml
URL: http://svn.apache.org/viewvc/incubator/openmeetings/trunk/singlewebapp/WebContent/languages/czech.xml?rev=1362554&r1=1362553&r2=1362554&view=diff
==============================================================================
--- incubator/openmeetings/trunk/singlewebapp/WebContent/languages/czech.xml (original)
+++ incubator/openmeetings/trunk/singlewebapp/WebContent/languages/czech.xml Tue Jul 17 16:12:39 2012
@@ -4535,4 +4535,7 @@ see http://incubator.apache.org/openmeet
   <string id="1503" name="Send SMS">
     <value>Send SMS</value>
   </string>
+  <string id="1504" name="publishing_message">
+    <value>Publishing. User:</value>
+  </string>
 </language>

Modified: incubator/openmeetings/trunk/singlewebapp/WebContent/languages/danish.xml
URL: http://svn.apache.org/viewvc/incubator/openmeetings/trunk/singlewebapp/WebContent/languages/danish.xml?rev=1362554&r1=1362553&r2=1362554&view=diff
==============================================================================
--- incubator/openmeetings/trunk/singlewebapp/WebContent/languages/danish.xml (original)
+++ incubator/openmeetings/trunk/singlewebapp/WebContent/languages/danish.xml Tue Jul 17 16:12:39 2012
@@ -4534,4 +4534,7 @@ see http://incubator.apache.org/openmeet
   <string id="1503" name="Send SMS">
     <value>Send SMS</value>
   </string>
+  <string id="1504" name="publishing_message">
+    <value>Publishing. User:</value>
+  </string>
 </language>

Modified: incubator/openmeetings/trunk/singlewebapp/WebContent/languages/deutsch (studIP).xml
URL: http://svn.apache.org/viewvc/incubator/openmeetings/trunk/singlewebapp/WebContent/languages/deutsch%20%28studIP%29.xml?rev=1362554&r1=1362553&r2=1362554&view=diff
==============================================================================
--- incubator/openmeetings/trunk/singlewebapp/WebContent/languages/deutsch (studIP).xml (original)
+++ incubator/openmeetings/trunk/singlewebapp/WebContent/languages/deutsch (studIP).xml Tue Jul 17 16:12:39 2012
@@ -4535,4 +4535,7 @@ see http://incubator.apache.org/openmeet
   <string id="1503" name="Send SMS">
     <value>Send SMS</value>
   </string>
+  <string id="1504" name="publishing_message">
+    <value>Publishing. User:</value>
+  </string>
 </language>

Modified: incubator/openmeetings/trunk/singlewebapp/WebContent/languages/deutsch.xml
URL: http://svn.apache.org/viewvc/incubator/openmeetings/trunk/singlewebapp/WebContent/languages/deutsch.xml?rev=1362554&r1=1362553&r2=1362554&view=diff
==============================================================================
--- incubator/openmeetings/trunk/singlewebapp/WebContent/languages/deutsch.xml (original)
+++ incubator/openmeetings/trunk/singlewebapp/WebContent/languages/deutsch.xml Tue Jul 17 16:12:39 2012
@@ -6002,4 +6002,7 @@ see http://incubator.apache.org/openmeet
   <string id="1503" name="Send SMS">
     <value>Send SMS</value>
   </string>
+  <string id="1504" name="publishing_message">
+    <value>Publishing. User:</value>
+  </string>
 </language>

Modified: incubator/openmeetings/trunk/singlewebapp/WebContent/languages/dutch.xml
URL: http://svn.apache.org/viewvc/incubator/openmeetings/trunk/singlewebapp/WebContent/languages/dutch.xml?rev=1362554&r1=1362553&r2=1362554&view=diff
==============================================================================
--- incubator/openmeetings/trunk/singlewebapp/WebContent/languages/dutch.xml (original)
+++ incubator/openmeetings/trunk/singlewebapp/WebContent/languages/dutch.xml Tue Jul 17 16:12:39 2012
@@ -4531,4 +4531,7 @@ see http://incubator.apache.org/openmeet
   <string id="1503" name="Send SMS">
     <value>Send SMS</value>
   </string>
+  <string id="1504" name="publishing_message">
+    <value>Publishing. User:</value>
+  </string>
 </language>

Modified: incubator/openmeetings/trunk/singlewebapp/WebContent/languages/english.xml
URL: http://svn.apache.org/viewvc/incubator/openmeetings/trunk/singlewebapp/WebContent/languages/english.xml?rev=1362554&r1=1362553&r2=1362554&view=diff
==============================================================================
--- incubator/openmeetings/trunk/singlewebapp/WebContent/languages/english.xml (original)
+++ incubator/openmeetings/trunk/singlewebapp/WebContent/languages/english.xml Tue Jul 17 16:12:39 2012
@@ -5978,4 +5978,7 @@ see http://incubator.apache.org/openmeet
   <string id="1503" name="Send SMS">
     <value>Send SMS</value>
   </string>
+  <string id="1504" name="publishing_message">
+    <value>Publishing. User:</value>
+  </string>
 </language>

Modified: incubator/openmeetings/trunk/singlewebapp/WebContent/languages/finnish.xml
URL: http://svn.apache.org/viewvc/incubator/openmeetings/trunk/singlewebapp/WebContent/languages/finnish.xml?rev=1362554&r1=1362553&r2=1362554&view=diff
==============================================================================
--- incubator/openmeetings/trunk/singlewebapp/WebContent/languages/finnish.xml (original)
+++ incubator/openmeetings/trunk/singlewebapp/WebContent/languages/finnish.xml Tue Jul 17 16:12:39 2012
@@ -4534,4 +4534,7 @@ see http://incubator.apache.org/openmeet
   <string id="1503" name="Send SMS">
     <value>Send SMS</value>
   </string>
+  <string id="1504" name="publishing_message">
+    <value>Publishing. User:</value>
+  </string>
 </language>

Modified: incubator/openmeetings/trunk/singlewebapp/WebContent/languages/french.xml
URL: http://svn.apache.org/viewvc/incubator/openmeetings/trunk/singlewebapp/WebContent/languages/french.xml?rev=1362554&r1=1362553&r2=1362554&view=diff
==============================================================================
--- incubator/openmeetings/trunk/singlewebapp/WebContent/languages/french.xml (original)
+++ incubator/openmeetings/trunk/singlewebapp/WebContent/languages/french.xml Tue Jul 17 16:12:39 2012
@@ -4535,4 +4535,7 @@ see http://incubator.apache.org/openmeet
   <string id="1503" name="Send SMS">
     <value>Send SMS</value>
   </string>
+  <string id="1504" name="publishing_message">
+    <value>Publishing. User:</value>
+  </string>
 </language>

Modified: incubator/openmeetings/trunk/singlewebapp/WebContent/languages/galician.xml
URL: http://svn.apache.org/viewvc/incubator/openmeetings/trunk/singlewebapp/WebContent/languages/galician.xml?rev=1362554&r1=1362553&r2=1362554&view=diff
==============================================================================
--- incubator/openmeetings/trunk/singlewebapp/WebContent/languages/galician.xml (original)
+++ incubator/openmeetings/trunk/singlewebapp/WebContent/languages/galician.xml Tue Jul 17 16:12:39 2012
@@ -4535,4 +4535,7 @@ see http://incubator.apache.org/openmeet
   <string id="1503" name="Send SMS">
     <value>Send SMS</value>
   </string>
+  <string id="1504" name="publishing_message">
+    <value>Publishing. User:</value>
+  </string>
 </language>

Modified: incubator/openmeetings/trunk/singlewebapp/WebContent/languages/greek.xml
URL: http://svn.apache.org/viewvc/incubator/openmeetings/trunk/singlewebapp/WebContent/languages/greek.xml?rev=1362554&r1=1362553&r2=1362554&view=diff
==============================================================================
--- incubator/openmeetings/trunk/singlewebapp/WebContent/languages/greek.xml (original)
+++ incubator/openmeetings/trunk/singlewebapp/WebContent/languages/greek.xml Tue Jul 17 16:12:39 2012
@@ -4535,4 +4535,7 @@ see http://incubator.apache.org/openmeet
   <string id="1503" name="Send SMS">
     <value>Send SMS</value>
   </string>
+  <string id="1504" name="publishing_message">
+    <value>Publishing. User:</value>
+  </string>
 </language>

Modified: incubator/openmeetings/trunk/singlewebapp/WebContent/languages/hebrew.xml
URL: http://svn.apache.org/viewvc/incubator/openmeetings/trunk/singlewebapp/WebContent/languages/hebrew.xml?rev=1362554&r1=1362553&r2=1362554&view=diff
==============================================================================
--- incubator/openmeetings/trunk/singlewebapp/WebContent/languages/hebrew.xml (original)
+++ incubator/openmeetings/trunk/singlewebapp/WebContent/languages/hebrew.xml Tue Jul 17 16:12:39 2012
@@ -4535,4 +4535,7 @@ see http://incubator.apache.org/openmeet
   <string id="1503" name="Send SMS">
     <value>Send SMS</value>
   </string>
+  <string id="1504" name="publishing_message">
+    <value>Publishing. User:</value>
+  </string>
 </language>

Modified: incubator/openmeetings/trunk/singlewebapp/WebContent/languages/hungarian.xml
URL: http://svn.apache.org/viewvc/incubator/openmeetings/trunk/singlewebapp/WebContent/languages/hungarian.xml?rev=1362554&r1=1362553&r2=1362554&view=diff
==============================================================================
--- incubator/openmeetings/trunk/singlewebapp/WebContent/languages/hungarian.xml (original)
+++ incubator/openmeetings/trunk/singlewebapp/WebContent/languages/hungarian.xml Tue Jul 17 16:12:39 2012
@@ -4535,4 +4535,7 @@ see http://incubator.apache.org/openmeet
   <string id="1503" name="Send SMS">
     <value>Send SMS</value>
   </string>
+  <string id="1504" name="publishing_message">
+    <value>Publishing. User:</value>
+  </string>
 </language>

Modified: incubator/openmeetings/trunk/singlewebapp/WebContent/languages/indonesian.xml
URL: http://svn.apache.org/viewvc/incubator/openmeetings/trunk/singlewebapp/WebContent/languages/indonesian.xml?rev=1362554&r1=1362553&r2=1362554&view=diff
==============================================================================
--- incubator/openmeetings/trunk/singlewebapp/WebContent/languages/indonesian.xml (original)
+++ incubator/openmeetings/trunk/singlewebapp/WebContent/languages/indonesian.xml Tue Jul 17 16:12:39 2012
@@ -4535,4 +4535,7 @@ see http://incubator.apache.org/openmeet
   <string id="1503" name="Send SMS">
     <value>Send SMS</value>
   </string>
+  <string id="1504" name="publishing_message">
+    <value>Publishing. User:</value>
+  </string>
 </language>

Modified: incubator/openmeetings/trunk/singlewebapp/WebContent/languages/italian.xml
URL: http://svn.apache.org/viewvc/incubator/openmeetings/trunk/singlewebapp/WebContent/languages/italian.xml?rev=1362554&r1=1362553&r2=1362554&view=diff
==============================================================================
--- incubator/openmeetings/trunk/singlewebapp/WebContent/languages/italian.xml (original)
+++ incubator/openmeetings/trunk/singlewebapp/WebContent/languages/italian.xml Tue Jul 17 16:12:39 2012
@@ -4535,4 +4535,7 @@ see http://incubator.apache.org/openmeet
   <string id="1503" name="Send SMS">
     <value>Send SMS</value>
   </string>
+  <string id="1504" name="publishing_message">
+    <value>Publishing. User:</value>
+  </string>
 </language>

Modified: incubator/openmeetings/trunk/singlewebapp/WebContent/languages/japanese.xml
URL: http://svn.apache.org/viewvc/incubator/openmeetings/trunk/singlewebapp/WebContent/languages/japanese.xml?rev=1362554&r1=1362553&r2=1362554&view=diff
==============================================================================
--- incubator/openmeetings/trunk/singlewebapp/WebContent/languages/japanese.xml (original)
+++ incubator/openmeetings/trunk/singlewebapp/WebContent/languages/japanese.xml Tue Jul 17 16:12:39 2012
@@ -4534,4 +4534,7 @@ see http://incubator.apache.org/openmeet
   <string id="1503" name="Send SMS">
     <value>Send SMS</value>
   </string>
+  <string id="1504" name="publishing_message">
+    <value>Publishing. User:</value>
+  </string>
 </language>

Modified: incubator/openmeetings/trunk/singlewebapp/WebContent/languages/korean.xml
URL: http://svn.apache.org/viewvc/incubator/openmeetings/trunk/singlewebapp/WebContent/languages/korean.xml?rev=1362554&r1=1362553&r2=1362554&view=diff
==============================================================================
--- incubator/openmeetings/trunk/singlewebapp/WebContent/languages/korean.xml (original)
+++ incubator/openmeetings/trunk/singlewebapp/WebContent/languages/korean.xml Tue Jul 17 16:12:39 2012
@@ -4535,4 +4535,7 @@ see http://incubator.apache.org/openmeet
   <string id="1503" name="Send SMS">
     <value>Send SMS</value>
   </string>
+  <string id="1504" name="publishing_message">
+    <value>Publishing. User:</value>
+  </string>
 </language>

Modified: incubator/openmeetings/trunk/singlewebapp/WebContent/languages/persian.xml
URL: http://svn.apache.org/viewvc/incubator/openmeetings/trunk/singlewebapp/WebContent/languages/persian.xml?rev=1362554&r1=1362553&r2=1362554&view=diff
==============================================================================
--- incubator/openmeetings/trunk/singlewebapp/WebContent/languages/persian.xml (original)
+++ incubator/openmeetings/trunk/singlewebapp/WebContent/languages/persian.xml Tue Jul 17 16:12:39 2012
@@ -4535,4 +4535,7 @@ see http://incubator.apache.org/openmeet
   <string id="1503" name="Send SMS">
     <value>Send SMS</value>
   </string>
+  <string id="1504" name="publishing_message">
+    <value>Publishing. User:</value>
+  </string>
 </language>

Modified: incubator/openmeetings/trunk/singlewebapp/WebContent/languages/polish.xml
URL: http://svn.apache.org/viewvc/incubator/openmeetings/trunk/singlewebapp/WebContent/languages/polish.xml?rev=1362554&r1=1362553&r2=1362554&view=diff
==============================================================================
--- incubator/openmeetings/trunk/singlewebapp/WebContent/languages/polish.xml (original)
+++ incubator/openmeetings/trunk/singlewebapp/WebContent/languages/polish.xml Tue Jul 17 16:12:39 2012
@@ -4608,4 +4608,7 @@ transmitowania głosu i obrazu wideo.<
   <string id="1503" name="Send SMS">
     <value>Send SMS</value>
   </string>
+  <string id="1504" name="publishing_message">
+    <value>Publishing. User:</value>
+  </string>
 </language>

Modified: incubator/openmeetings/trunk/singlewebapp/WebContent/languages/portugues brazil.xml
URL: http://svn.apache.org/viewvc/incubator/openmeetings/trunk/singlewebapp/WebContent/languages/portugues%20brazil.xml?rev=1362554&r1=1362553&r2=1362554&view=diff
==============================================================================
--- incubator/openmeetings/trunk/singlewebapp/WebContent/languages/portugues brazil.xml (original)
+++ incubator/openmeetings/trunk/singlewebapp/WebContent/languages/portugues brazil.xml Tue Jul 17 16:12:39 2012
@@ -4536,4 +4536,7 @@ Details
   <string id="1503" name="Send SMS">
     <value>Send SMS</value>
   </string>
+  <string id="1504" name="publishing_message">
+    <value>Publishing. User:</value>
+  </string>
 </language>

Modified: incubator/openmeetings/trunk/singlewebapp/WebContent/languages/portugues.xml
URL: http://svn.apache.org/viewvc/incubator/openmeetings/trunk/singlewebapp/WebContent/languages/portugues.xml?rev=1362554&r1=1362553&r2=1362554&view=diff
==============================================================================
--- incubator/openmeetings/trunk/singlewebapp/WebContent/languages/portugues.xml (original)
+++ incubator/openmeetings/trunk/singlewebapp/WebContent/languages/portugues.xml Tue Jul 17 16:12:39 2012
@@ -4535,4 +4535,7 @@ see http://incubator.apache.org/openmeet
   <string id="1503" name="Send SMS">
     <value>Send SMS</value>
   </string>
+  <string id="1504" name="publishing_message">
+    <value>Publishing. User:</value>
+  </string>
 </language>

Modified: incubator/openmeetings/trunk/singlewebapp/WebContent/languages/russian.xml
URL: http://svn.apache.org/viewvc/incubator/openmeetings/trunk/singlewebapp/WebContent/languages/russian.xml?rev=1362554&r1=1362553&r2=1362554&view=diff
==============================================================================
--- incubator/openmeetings/trunk/singlewebapp/WebContent/languages/russian.xml (original)
+++ incubator/openmeetings/trunk/singlewebapp/WebContent/languages/russian.xml Tue Jul 17 16:12:39 2012
@@ -4535,4 +4535,7 @@ see http://incubator.apache.org/openmeet
   <string id="1503" name="Send SMS">
     <value>СМС</value>
   </string>
+  <string id="1504" name="publishing_message">
+    <value>Publishing. User:</value>
+  </string>
 </language>

Modified: incubator/openmeetings/trunk/singlewebapp/WebContent/languages/slovak.xml
URL: http://svn.apache.org/viewvc/incubator/openmeetings/trunk/singlewebapp/WebContent/languages/slovak.xml?rev=1362554&r1=1362553&r2=1362554&view=diff
==============================================================================
--- incubator/openmeetings/trunk/singlewebapp/WebContent/languages/slovak.xml (original)
+++ incubator/openmeetings/trunk/singlewebapp/WebContent/languages/slovak.xml Tue Jul 17 16:12:39 2012
@@ -4535,4 +4535,7 @@ see http://incubator.apache.org/openmeet
   <string id="1503" name="Send SMS">
     <value>Send SMS</value>
   </string>
+  <string id="1504" name="publishing_message">
+    <value>Publishing. User:</value>
+  </string>
 </language>

Modified: incubator/openmeetings/trunk/singlewebapp/WebContent/languages/spanish.xml
URL: http://svn.apache.org/viewvc/incubator/openmeetings/trunk/singlewebapp/WebContent/languages/spanish.xml?rev=1362554&r1=1362553&r2=1362554&view=diff
==============================================================================
--- incubator/openmeetings/trunk/singlewebapp/WebContent/languages/spanish.xml (original)
+++ incubator/openmeetings/trunk/singlewebapp/WebContent/languages/spanish.xml Tue Jul 17 16:12:39 2012
@@ -4543,4 +4543,7 @@ see http://incubator.apache.org/openmeet
   <string id="1503" name="Send SMS">
     <value>Send SMS</value>
   </string>
+  <string id="1504" name="publishing_message">
+    <value>Publishing. User:</value>
+  </string>
 </language>

Modified: incubator/openmeetings/trunk/singlewebapp/WebContent/languages/swedish.xml
URL: http://svn.apache.org/viewvc/incubator/openmeetings/trunk/singlewebapp/WebContent/languages/swedish.xml?rev=1362554&r1=1362553&r2=1362554&view=diff
==============================================================================
--- incubator/openmeetings/trunk/singlewebapp/WebContent/languages/swedish.xml (original)
+++ incubator/openmeetings/trunk/singlewebapp/WebContent/languages/swedish.xml Tue Jul 17 16:12:39 2012
@@ -4535,4 +4535,7 @@ see http://incubator.apache.org/openmeet
   <string id="1503" name="Send SMS">
     <value>Send SMS</value>
   </string>
+  <string id="1504" name="publishing_message">
+    <value>Publishing. User:</value>
+  </string>
 </language>

Modified: incubator/openmeetings/trunk/singlewebapp/WebContent/languages/thai.xml
URL: http://svn.apache.org/viewvc/incubator/openmeetings/trunk/singlewebapp/WebContent/languages/thai.xml?rev=1362554&r1=1362553&r2=1362554&view=diff
==============================================================================
--- incubator/openmeetings/trunk/singlewebapp/WebContent/languages/thai.xml (original)
+++ incubator/openmeetings/trunk/singlewebapp/WebContent/languages/thai.xml Tue Jul 17 16:12:39 2012
@@ -4535,4 +4535,7 @@ see http://incubator.apache.org/openmeet
   <string id="1503" name="Send SMS">
     <value>Send SMS</value>
   </string>
+  <string id="1504" name="publishing_message">
+    <value>Publishing. User:</value>
+  </string>
 </language>

Modified: incubator/openmeetings/trunk/singlewebapp/WebContent/languages/turkish.xml
URL: http://svn.apache.org/viewvc/incubator/openmeetings/trunk/singlewebapp/WebContent/languages/turkish.xml?rev=1362554&r1=1362553&r2=1362554&view=diff
==============================================================================
--- incubator/openmeetings/trunk/singlewebapp/WebContent/languages/turkish.xml (original)
+++ incubator/openmeetings/trunk/singlewebapp/WebContent/languages/turkish.xml Tue Jul 17 16:12:39 2012
@@ -4534,4 +4534,7 @@ see http://incubator.apache.org/openmeet
   <string id="1503" name="Send SMS">
     <value>Send SMS</value>
   </string>
+  <string id="1504" name="publishing_message">
+    <value>Publishing. User:</value>
+  </string>
 </language>

Modified: incubator/openmeetings/trunk/singlewebapp/WebContent/languages/ukrainian.xml
URL: http://svn.apache.org/viewvc/incubator/openmeetings/trunk/singlewebapp/WebContent/languages/ukrainian.xml?rev=1362554&r1=1362553&r2=1362554&view=diff
==============================================================================
--- incubator/openmeetings/trunk/singlewebapp/WebContent/languages/ukrainian.xml (original)
+++ incubator/openmeetings/trunk/singlewebapp/WebContent/languages/ukrainian.xml Tue Jul 17 16:12:39 2012
@@ -4535,4 +4535,7 @@ see http://incubator.apache.org/openmeet
   <string id="1503" name="Send SMS">
     <value>Send SMS</value>
   </string>
+  <string id="1504" name="publishing_message">
+    <value>Publishing. User:</value>
+  </string>
 </language>

Modified: incubator/openmeetings/trunk/singlewebapp/WebContent/src/base/hibernate/hibRtmpConnection.lzx
URL: http://svn.apache.org/viewvc/incubator/openmeetings/trunk/singlewebapp/WebContent/src/base/hibernate/hibRtmpConnection.lzx?rev=1362554&r1=1362553&r2=1362554&view=diff
==============================================================================
--- incubator/openmeetings/trunk/singlewebapp/WebContent/src/base/hibernate/hibRtmpConnection.lzx (original)
+++ incubator/openmeetings/trunk/singlewebapp/WebContent/src/base/hibernate/hibRtmpConnection.lzx Tue Jul 17 16:12:39 2012
@@ -1036,7 +1036,7 @@
                 //The onResult-Handler will be called be the rtmpconnection
                 if ($debug) Debug.write("**** closeStream: ",value);
                 if (value.isScreenClient) {
-                    if ($debug) Debug.write(" onResult stopRed5ScreenSharing : ",value.streamPublishName); 
+                    if ($debug) Debug.write(" ondata closeStream: ",value.streamPublishName); 
                     canvas.currentBaseConferenceRoom._screenSharingAdapter.closeScreenSharing(value);
                 } else {
                     //free the VideoContainer
@@ -1051,11 +1051,11 @@
         <!---
             Event is invoked if a red5 stream sharing is closed
          -->
-        <netRemoteCallHib name="stopRed5ScreenSharing" funcname="stopRed5ScreenSharing">
+        <netRemoteCallHib name="stopScreenSharingMessage" funcname="stopScreenSharingMessage">
             <handler name="ondata" args="value">
                 //The onResult-Handler will be called be the rtmpconnection
                 if ($debug) Debug.write("**** closeStream: ",value);
-                if ($debug) Debug.write(" onResult stopRed5ScreenSharing : ",value.streamPublishName); 
+                if ($debug) Debug.write(" onResult stopScreenSharingMessage : ",value.streamPublishName); 
                 canvas.currentBaseConferenceRoom._screenSharingAdapter.closeScreenSharing(value);
             </handler>   
         </netRemoteCallHib> 
@@ -1067,7 +1067,22 @@
                 //parent.getClientListScope.doCall();  
             </handler>   
         </netRemoteCallHib>   
-                      
+
+		<method name="roomDisconnectUser" args="value,id">
+			if (canvas._videocontainer!=null){
+				canvas._videocontainer.disconnectclient(id);
+				if (canvas.currentModApply!=null) canvas.currentModApply.rejectUser(value);
+				//parent.getClientListScope.doCall();
+				if (value.isRecording) {
+					canvas._mymod.recordingUser = null;
+				}
+				if (value.streamPublishStarted) {
+					canvas._mymod.publishingObj = null;
+				}
+				canvas._mymod.setMessage();
+			}
+		</method>
+		
         <netRemoteCallHib name="roomDisconnect" funcname="roomDisconnect">
             <handler name="ondata" args="value">
             <![CDATA[
@@ -1087,15 +1102,7 @@
                     var parentObj = canvas._overallchatcontent.parent.parent.parent._chatparticipants;
                     parentObj.removeItemById(value.user_id);
                 }
-                if (canvas._videocontainer!=null){
-                    canvas._videocontainer.disconnectclient(value.publicSID); 
-                    if (canvas.currentModApply!=null) canvas.currentModApply.rejectUser(value);
-                    //parent.getClientListScope.doCall();  
-                    if (value.isRecording) {
-                        canvas._mymod.recordingUser = null;
-                        canvas._mymod.setMessage();                 
-                    }
-                }
+                roomDisconnectUser(value, value.publicSID);
             ]]>
             </handler>   
         </netRemoteCallHib>
@@ -1108,6 +1115,14 @@
             </handler>   
         </netRemoteCallHib>
         
+        <netRemoteCallHib name="stopPublishingMessage" funcname="stopPublishingMessage">
+            <handler name="ondata" args="value">
+                //The onResult-Handler will be called be the rtmpconnection
+				canvas._mymod.publishingObj = null;
+                canvas._mymod.setMessage();                 
+            </handler>   
+        </netRemoteCallHib>
+        
         <netRemoteCallHib name="setSyncFlag" funcname="setSyncFlag" >      
             <handler name="ondata" args="value">
                 if ($debug) Debug.write("setSyncFlag: ",value);
@@ -1117,13 +1132,7 @@
         <netRemoteCallHib name="logicalRoomLeaveDis" funcname="logicalRoomLeaveDis" >      
             <handler name="ondata" args="value">
                 if ($debug) Debug.write("logicalRoomLeaveDis: ",value);
-                canvas._videocontainer.disconnectclient(value.broadCastID); 
-                //remove that client from sync list of wmlFileLoader/image if present
-                if (canvas.currentModApply!=null) canvas.currentModApply.rejectUser(value);
-                if (value.isRecording) {
-                    canvas._mymod.recordingUser = null;
-                    canvas._mymod.setMessage();                 
-                }               
+                roomDisconnectUser(value, value.broadCastID);
             </handler>
         </netRemoteCallHib>             
   
@@ -1356,30 +1365,29 @@
         
         <!--
             Red5 Screen Sharing
-            newRed5ScreenSharing
          -->
-        <netRemoteCallHib name="newRed5ScreenSharing" funcname="newRed5ScreenSharing">
+        <netRemoteCallHib name="newScreenSharing" funcname="newScreenSharing">
             <netparam><method name="getValue">return null;</method></netparam>
             <handler name="ondata" args="value">
                 <![CDATA[
                 
                     //The onResult-Handler will be called be the rtmpconnection
-                    //if ($debug) Debug.write(" onResult newRed5ScreenSharing 1 : ",value);  
-                    //if ($debug) Debug.write(" onResult newRed5ScreenSharing 2 : ",value.streamid); 
-                    //if ($debug) Debug.write(" onResult newRed5ScreenSharing 3 : ",canvas.streamid); 
-                    if ($debug) Debug.write(" onResult newRed5ScreenSharing 4 : ",value.streamPublishName); 
-                    if ($debug) Debug.write(" onResult newRed5ScreenSharing 5 : ",canvas.publicSID); 
+                    //if ($debug) Debug.write(" onResult newScreenSharing 1 : ",value);  
+                    //if ($debug) Debug.write(" onResult newScreenSharing 2 : ",value.streamid); 
+                    //if ($debug) Debug.write(" onResult newScreenSharing 3 : ",canvas.streamid); 
+                    if ($debug) Debug.write(" onResult newScreenSharing 4 : ",value.streamPublishName); 
+                    if ($debug) Debug.write(" onResult newcreenSharing 5 : ",canvas.publicSID); 
                     
                     canvas.currentBaseConferenceRoom._screenSharingAdapter.newScreenSharing(value);
                 ]]>
             </handler>   
         </netRemoteCallHib>
         
-        <netRemoteCallHib name="checkRed5ScreenSharing" funcname="checkRed5ScreenSharing">
+        <netRemoteCallHib name="checkScreenSharing" funcname="checkScreenSharing">
             <handler name="ondata" args="value">
                 <![CDATA[
                     //The onResult-Handler will be called be the rtmpconnection
-                    if ($debug) Debug.write(" onResult checkRed5ScreenSharing : ",value);  
+                    if ($debug) Debug.write(" onResult checkScreenSharing : ",value);  
                     if (value != null) {
                     	canvas.currentBaseConferenceRoom._screenSharingAdapter.newScreenSharings(value);
                     } else {
@@ -1835,7 +1843,15 @@
                 canvas._mymod.recordingUser = value;
                 canvas._mymod.setMessage();
             }
-            parent.checkRed5ScreenSharing.doCall();
+            parent.checkScreenSharing.doCall();
+        </handler>
+    </netRemoteCallHib>
+    
+    <netRemoteCallHib name="startedPublishing" funcname="startedPublishing" >      
+        <handler name="ondata" args="value">
+            if ($debug) Debug.write("startedPublishing: ", value);
+            canvas._mymod.publishingObj = {user: value[0], url: value[1]};
+            canvas._mymod.setMessage();
         </handler>
     </netRemoteCallHib>
     

Modified: incubator/openmeetings/trunk/singlewebapp/WebContent/src/base/mainMethods.lzx
URL: http://svn.apache.org/viewvc/incubator/openmeetings/trunk/singlewebapp/WebContent/src/base/mainMethods.lzx?rev=1362554&r1=1362553&r2=1362554&view=diff
==============================================================================
--- incubator/openmeetings/trunk/singlewebapp/WebContent/src/base/mainMethods.lzx (original)
+++ incubator/openmeetings/trunk/singlewebapp/WebContent/src/base/mainMethods.lzx Tue Jul 17 16:12:39 2012
@@ -43,7 +43,7 @@
     		if (!this.enabled) {
     			return;
     		}
-    		canvas._mymod.checkSharerSession.doCall();
+    		canvas._mymod.checkForApplyScreen("no");
     	</handler>
     </baseconfmenucommand>
     

Modified: incubator/openmeetings/trunk/singlewebapp/WebContent/src/modules/conference/moderation/moderationPanel.lzx
URL: http://svn.apache.org/viewvc/incubator/openmeetings/trunk/singlewebapp/WebContent/src/modules/conference/moderation/moderationPanel.lzx?rev=1362554&r1=1362553&r2=1362554&view=diff
==============================================================================
--- incubator/openmeetings/trunk/singlewebapp/WebContent/src/modules/conference/moderation/moderationPanel.lzx (original)
+++ incubator/openmeetings/trunk/singlewebapp/WebContent/src/modules/conference/moderation/moderationPanel.lzx Tue Jul 17 16:12:39 2012
@@ -51,6 +51,7 @@
     <attribute name="recordingsName" value="" type="string" />
     <attribute name="initial" value="true" type="boolean" />
     <attribute name="recordingUser" value="null" />
+    <attribute name="publishingObj" value="null" />
     
     <attribute name="allowUserQuestions" value="true" type="boolean" />
     <attribute name="roomName" value="" type="string" />
@@ -68,31 +69,25 @@
     <method name="setMessage">
         <![CDATA[
             if ($debug) Debug.write("setMessage: ",this.recordingUser);
+            var tString = "";
             if (this.recordingUser!=null){
-                var tString = canvas.getLabelName(419) + " "
-                        + this.recordingUser.username+" " 
-                        + this.recordingUser.firstname + " " + this.recordingUser.lastname + " "
-                        + parseDateToStringTime(this.recordingUser.roomEnter);
-                this._inner.setAttribute('text',tString);
-            } else {
-                this._inner.setAttribute('text',"");
+                tString += canvas.getLabelName(419)
+               		+ " " + this.recordingUser.username
+               		+ " " + this.recordingUser.firstname
+               		+ " " + this.recordingUser.lastname
+               		+ " " + parseDateToStringTime(this.recordingUser.roomEnter) + ";";
             }
+			if (this.publishingObj != null) {
+            	tString += canvas.getLabelName(1504)
+					+ " " + this.publishingObj.user.username
+					+ " " + this.publishingObj.user.firstname
+					+ " " + this.publishingObj.user.lastname
+					+ " " + this.publishingObj.url + ";";
+            }
+			this._inner.setAttribute('text', tString);
         ]]>
     </method>   
     
-    <netRemoteCallHib name="checkSharerSession" remotecontext="$once{ canvas.thishib }"
-        funcname="checkSharerSession"  >
-        <handler name="ondata" args="value">
-            //The onResult-Handler will be called be the rtmpconnection
-            if ($debug) Debug.write("+++++++++++++++++ checkSharerSession: ",value); 
-            if (value) {
-                parent.checkForApplyScreen("no");
-            } else {
-                new lz.labelerrorPopup(canvas,{errorlabelid:727});
-            }
-        </handler>  
-    </netRemoteCallHib> 
-    
     <method name="checkForApplyScreen" args="record">
         <![CDATA[
         
@@ -143,7 +138,7 @@
     			showhandcursor="true"
                visible="${canvas.currentRoomObj.hideScreenSharing ? false : ((canvas.ismoderator) ? true : ((canvas.isAllowedToScreenShare) ? true : false )) }" >
         <handler name="onclick">
-            this.parent.checkSharerSession.doCall();
+            this.parent.checkForApplyScreen("no");
         </handler>
         <labelTooltip labelid="239" />
     </miniIconsNew>

Modified: incubator/openmeetings/trunk/singlewebapp/src/org/openmeetings/app/remote/WhiteBoardService.java
URL: http://svn.apache.org/viewvc/incubator/openmeetings/trunk/singlewebapp/src/org/openmeetings/app/remote/WhiteBoardService.java?rev=1362554&r1=1362553&r2=1362554&view=diff
==============================================================================
--- incubator/openmeetings/trunk/singlewebapp/src/org/openmeetings/app/remote/WhiteBoardService.java (original)
+++ incubator/openmeetings/trunk/singlewebapp/src/org/openmeetings/app/remote/WhiteBoardService.java Tue Jul 17 16:12:39 2012
@@ -555,7 +555,8 @@ public class WhiteBoardService implement
 						+ numberOfInitial);
 
 				if (numberOfInitial == 0) {
-					return scopeApplicationAdapter.syncMessageToCurrentScope("sendObjectSyncCompleteFlag", wSyncLockObject, true);
+					scopeApplicationAdapter.syncMessageToCurrentScope("sendObjectSyncCompleteFlag", wSyncLockObject, true);
+					return 1;
 				} else {
 					return -4;
 				}

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=1362554&r1=1362553&r2=1362554&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 Jul 17 16:12:39 2012
@@ -51,9 +51,8 @@ import org.openmeetings.app.remote.FLVRe
 import org.openmeetings.app.remote.WhiteBoardService;
 import org.openmeetings.utils.OmFileHelper;
 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;
@@ -65,15 +64,10 @@ import org.red5.server.api.service.IPend
 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(
@@ -105,7 +99,6 @@ public class ScopeApplicationAdapter ext
 	@Autowired
 	private MeetingMemberDaoImpl meetingMemberDao;
 
-    private Map<String, StreamingProxy> streamingProxyMap = new HashMap<String, StreamingProxy>();
 	public static String lineSeperator = System.getProperty("line.separator");
 
 	public static String configKeyCryptClassName = null;
@@ -208,59 +201,50 @@ public class ScopeApplicationAdapter ext
 		return true;
 	}
 
-	@SuppressWarnings({ "rawtypes", "unchecked" })
-	public synchronized Map screenSharerAction(Map map) {
+	public synchronized Map<String, String> screenSharerAction(Map<String, Object> map) {
 		try {
-
 			IConnection current = Red5.getConnectionLocal();
 
-			RoomClient currentClient = this.clientListManager
-					.getClientByStreamId(current.getClient().getId());
+			RoomClient rc = clientListManager.getClientByStreamId(current.getClient().getId());
 
-			Map returnMap = new HashMap();
-			returnMap.put("result", "stopAll");
+			Map<String, String> returnMap = new HashMap<String, String>();
 
 			log.debug("-----------  ");
-
-			if (currentClient != null) {
-
-				if (Boolean.valueOf(map.get("stopStreaming").toString())) {
-					log.debug("start streamPublishStart Is Screen Sharing -- Stop ");
+			if (rc != null) {
+				boolean changed = false;
+				if (Boolean.valueOf("" + map.get("stopStreaming"))) {
+					changed = true;
+					rc.setStartStreaming(false);
+					//Send message to all users
+					syncMessageToCurrentScope("stopScreenSharingMessage", rc, false);
 					
+					returnMap.put("result", "stopSharingOnly");
+				}
+				if (Boolean.valueOf("" + map.get("stopRecording"))) {
+					changed = true;
+					rc.setStartRecording(false);
+					rc.setIsRecording(false);
+					
+					returnMap.put("result", "stopRecordingOnly");
 					//Send message to all users
-					syncMessageToCurrentScope("stopRed5ScreenSharing", currentClient, false);
-
-					if (currentClient.isStartRecording()) {
-						returnMap.put("result", "stopSharingOnly");
-					}
+					syncMessageToCurrentScope("stopRecordingMessage", rc, false);
 
-					currentClient.setStartStreaming(false);
-					currentClient.setScreenPublishStarted(false);
-
-					clientListManager.updateClientByStreamId(
-							currentClient.getStreamid(), currentClient);
+					flvRecorderService.stopRecordAndSave(current.getScope(), rc, null);
 				}
-				if (Boolean.valueOf(map.get("stopRecording").toString())) {
-					if (currentClient.isStartStreaming()) {
-						returnMap.put("result", "stopRecordingOnly");
-					}
+				if (Boolean.valueOf("" + map.get("stopPublishing"))) {
+					changed = true;
+					rc.setScreenPublishStarted(false);
+					returnMap.put("result", "stopPublishingOnly");
 					
 					//Send message to all users
-					syncMessageToCurrentScope("stopRecordingMessage", currentClient, false);
-
-					flvRecorderService.stopRecordAndSave(
-							current.getScope(), currentClient, null);
-
-					currentClient.setStartRecording(false);
-					currentClient.setIsRecording(false);
-
-					clientListManager.updateClientByStreamId(
-							currentClient.getStreamid(), currentClient);
+					syncMessageToCurrentScope("stopPublishingMessage", rc, false);
 				}
-				if (Boolean.valueOf(map.get("stopPublishing").toString())) {
-					streamPublishingStop();
-					if (currentClient.getIsScreenClient() && currentClient.isStartStreaming()) {
-						returnMap.put("result", "stopPublishingOnly");
+				
+				if (changed) {
+					clientListManager.updateClientByStreamId(rc.getStreamid(), rc);
+					
+					if (!rc.isStartStreaming() && !rc.isStartRecording() && !rc.isStreamPublishStarted()) {
+						returnMap.put("result", "stopAll");
 					}
 				}
 			}
@@ -271,7 +255,7 @@ public class ScopeApplicationAdapter ext
 		return null;
 	}
 
-	public List<RoomClient> checkRed5ScreenSharing() {
+	public List<RoomClient> checkScreenSharing() {
 		try {
 			IConnection current = Red5.getConnectionLocal();
 			String streamid = current.getClient().getId();
@@ -393,7 +377,7 @@ public class ScopeApplicationAdapter ext
 					log.debug("start streamPublishStart Is Screen Sharing ");
 					
 					//Send message to all users
-					syncMessageToCurrentScope("newRed5ScreenSharing", currentClient, false);
+					syncMessageToCurrentScope("newScreenSharing", currentClient, false);
 				} else if (startRecording) {
 					returnMap.put("modus", "startRecording");
 
@@ -403,12 +387,9 @@ public class ScopeApplicationAdapter ext
 
 					flvRecorderService.recordMeetingStream(recordingName, "", false);
 				} else if (Boolean.valueOf(map.get("startPublishing").toString())) {
-					if (streamPublishingStart("" + map.get("publishingHost")
-						, "" + map.get("publishingApp")
-						, "" + map.get("publishingId")))
-					{
-						returnMap.put("modus", "startPublishing");
-					}
+					syncMessageToCurrentScope("startedPublishing", new Object[]{currentClient, "rtmp://" + map.get("publishingHost") + ":1935/"
+							+ map.get("publishingApp") + "/" + map.get("publishingId")}, false, true);
+					returnMap.put("modus", "startPublishing");
 				}
 
 				return returnMap;
@@ -798,69 +779,6 @@ public class ScopeApplicationAdapter ext
 		}
 	}
 
-    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
@@ -875,8 +793,6 @@ public class ScopeApplicationAdapter ext
 		log.debug("start streamBroadcastClose broadcast close: "
 				+ stream.getPublishedName());
 		try {
-			streamPublishingStop();
-			
 			IConnection current = Red5.getConnectionLocal();
 			RoomClient rcl = clientListManager.getClientByStreamId(current.getClient().getId());
 			sendClientBroadcastNotifications(stream, "closeStream", rcl);
@@ -2339,18 +2255,10 @@ public class ScopeApplicationAdapter ext
 	/**
 	 * wrapper method
 	 * @param newMessage
-	 * @return
 	 */
-	public synchronized int sendMessageToMembers(Object newMessage) {
-		try {
-			
-			//Sync to all users of current scope
-			syncMessageToCurrentScope("sendVarsToMessage", newMessage, false);
-			
-		} catch (Exception err) {
-			log.error("[sendMessage]", err);
-		}
-		return 1;
+	public synchronized void sendMessageToMembers(Object newMessage) {
+		//Sync to all users of current scope
+		syncMessageToCurrentScope("sendVarsToMessage", newMessage, false);
 	}
 	
 	/**
@@ -2363,12 +2271,30 @@ public class ScopeApplicationAdapter ext
 	 * <li>do not send to connections where no RoomClient is registered</li>
 	 * </ul>
 	 *  
-	 * @param remoteMethodName
-	 * @param newMessage
-	 * @param sendSelf 
-	 * @return
+	 * @param remoteMethodName The method to be called
+	 * @param newMessage parameters
+	 * @param sendSelf send to the current client as well
+	 */
+	public synchronized void syncMessageToCurrentScope(String remoteMethodName, Object newMessage, boolean sendSelf) {
+		syncMessageToCurrentScope(remoteMethodName, newMessage, sendSelf, false);
+	}
+	
+	/**
+	 * General sync mechanism for all messages that are send from within the 
+	 * scope of the current client, but:
+	 * <ul>
+	 * <li>optionally do not send to self (see param: sendSelf)</li>
+	 * <li>send to clients that are screen sharing clients based on parameter</li>
+	 * <li>do not send to clients that are audio/video clients (or potentially ones)</li>
+	 * <li>do not send to connections where no RoomClient is registered</li>
+	 * </ul>
+	 *  
+	 * @param remoteMethodName The method to be called
+	 * @param newMessage parameters
+	 * @param sendSelf send to the current client as well
+	 * @param sendScreen send to the current client as well
 	 */
-	public synchronized int syncMessageToCurrentScope(String remoteMethodName, Object newMessage, boolean sendSelf) {
+	public synchronized void syncMessageToCurrentScope(String remoteMethodName, Object newMessage, boolean sendSelf, boolean sendScreen) {
 		try {
 			IConnection current = Red5.getConnectionLocal();
 
@@ -2385,7 +2311,7 @@ public class ScopeApplicationAdapter ext
 							if (rcl == null) {
 								// RoomClient can be null if there are network problems
 								continue;
-							} else if (rcl.getIsScreenClient() != null && rcl
+							} else if (!sendScreen && rcl.getIsScreenClient() != null && rcl
 											.getIsScreenClient()) {
 								// screen sharing clients do not receive events
 								continue;
@@ -2408,7 +2334,6 @@ public class ScopeApplicationAdapter ext
 		} catch (Exception err) {
 			log.error("[syncMessageToCurrentScope]", err);
 		}
-		return 1;
 	}
 
 	/**
@@ -2867,11 +2792,6 @@ public class ScopeApplicationAdapter ext
 		return null;
 	}
 	
-	//FIXME: legacy code, needs to be removed
-	public boolean checkSharerSession() {
-		return true;
-	}
-
 	/**
 	 * Stop the recording of the streams and send event to connected users of scope
 	 * 

Added: incubator/openmeetings/trunk/singlewebapp/src/org/openmeetings/screen/webstart/CaptureScreen.java
URL: http://svn.apache.org/viewvc/incubator/openmeetings/trunk/singlewebapp/src/org/openmeetings/screen/webstart/CaptureScreen.java?rev=1362554&view=auto
==============================================================================
--- incubator/openmeetings/trunk/singlewebapp/src/org/openmeetings/screen/webstart/CaptureScreen.java (added)
+++ incubator/openmeetings/trunk/singlewebapp/src/org/openmeetings/screen/webstart/CaptureScreen.java Tue Jul 17 16:12:39 2012
@@ -0,0 +1,140 @@
+package org.openmeetings.screen.webstart;
+
+import java.awt.Rectangle;
+import java.awt.Robot;
+import java.awt.image.BufferedImage;
+import java.io.IOException;
+
+import org.apache.mina.core.buffer.IoBuffer;
+import org.openmeetings.screen.webstart.gui.ScreenDimensions;
+import org.openmeetings.screen.webstart.gui.ScreenDimensions.ScreenQuality;
+import org.red5.server.net.rtmp.event.AudioData;
+import org.red5.server.net.rtmp.event.VideoData;
+import org.red5.server.stream.message.RTMPMessage;
+
+final class CaptureScreen extends Thread {
+	private CoreScreenShare core;
+	private int timeBetweenFrames = 500; // frameRate
+	private volatile long timestamp = 0;
+	private volatile boolean active = true;
+	private IScreenEncoder se;
+	private IScreenShare client;
+	private IoBuffer buffer;
+	private String host = null;
+	private String app = null;
+	private int port = -1;
+	private int streamId;
+	private boolean startPublish = false;
+	private boolean sendCursor = false;
+
+	public CaptureScreen(CoreScreenShare coreScreenShare, IScreenShare client, String host, String app, int port) {
+		core = coreScreenShare;
+		this.client = client;
+		this.host = host;
+		this.app = app;
+		this.port = port;
+		timeBetweenFrames = (ScreenDimensions.quality == ScreenQuality.VeryHigh) ? 100 : 500;
+		se = new ScreenV1Encoder();
+	}
+
+	public void release() {
+		active = false;
+	}
+
+	public void resetBuffer() {
+		se.reset();
+	}
+
+	public void run() {
+		try {
+			Robot robot = new Robot();
+			BufferedImage image = null;
+			while (active) {
+				final long ctime = System.currentTimeMillis();
+				Rectangle screen = new Rectangle(ScreenDimensions.spinnerX,
+						ScreenDimensions.spinnerY,
+						ScreenDimensions.spinnerWidth,
+						ScreenDimensions.spinnerHeight);
+				
+				image = robot.createScreenCapture(screen);
+
+				try {
+					timestamp += timeBetweenFrames;
+					byte[] data = se.encode(screen, image, new Rectangle(ScreenDimensions.resizeX,
+							ScreenDimensions.resizeY));
+
+					pushVideo(data, timestamp);
+				} catch (Exception e) {
+					e.printStackTrace();
+				}
+				final int spent = (int) (System.currentTimeMillis() - ctime);
+
+				if (sendCursor) {
+					core.sendCursorStatus();
+				}
+				Thread.sleep(Math.max(0, timeBetweenFrames - spent));
+			}
+		} catch (Exception e) {
+			e.printStackTrace();
+		}
+	}
+	
+	private void pushAudio(byte[] audio, long ts) {
+		if (startPublish) {
+			buffer.put((byte) 6);
+			buffer.put(audio);
+			buffer.flip();
+	
+			// I can stream audio
+			//packets successfully using linear PCM at 11025Hz. For those packets I
+			//push one byte (0x06) which specifies the format of audio data in a
+			//ByteBuffer, and then real audio data:
+			RTMPMessage rtmpMsg = RTMPMessage.build(new AudioData(buffer), (int) ts);
+			client.publishStreamData(streamId, rtmpMsg);
+		}
+	}
+
+	private void pushVideo(byte[] video, long ts) throws IOException {
+		if (startPublish) {
+			if (buffer == null || (buffer.capacity() < video.length && !buffer.isAutoExpand())) {
+				buffer = IoBuffer.allocate(video.length);
+				buffer.setAutoExpand(true);
+			}
+	
+			buffer.clear();
+			buffer.put(video);
+			buffer.flip();
+	
+			RTMPMessage rtmpMsg = RTMPMessage.build(new VideoData(buffer), (int) ts);
+			client.publishStreamData(streamId, rtmpMsg);
+		}
+	}
+
+	public String getHost() {
+		return host;
+	}
+
+	public String getApp() {
+		return app;
+	}
+
+	public int getPort() {
+		return port;
+	}
+
+	public int getStreamId() {
+		return streamId;
+	}
+
+	public void setStreamId(int streamId) {
+		this.streamId = streamId;
+	}
+
+	public void setStartPublish(boolean startPublish) {
+		this.startPublish = startPublish;
+	}
+
+	public void setSendCursor(boolean sendCursor) {
+		this.sendCursor = sendCursor;
+	}
+}
\ No newline at end of file

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=1362554&r1=1362553&r2=1362554&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 Jul 17 16:12:39 2012
@@ -21,7 +21,6 @@ package org.openmeetings.screen.webstart
 import java.awt.MouseInfo;
 import java.awt.Point;
 import java.awt.PointerInfo;
-import java.awt.Rectangle;
 import java.awt.Robot;
 import java.awt.Toolkit;
 import java.awt.datatransfer.Clipboard;
@@ -31,61 +30,43 @@ import java.awt.datatransfer.Transferabl
 import java.awt.datatransfer.UnsupportedFlavorException;
 import java.awt.event.InputEvent;
 import java.awt.event.KeyEvent;
-import java.awt.event.WindowAdapter;
-import java.awt.event.WindowEvent;
-import java.awt.image.BufferedImage;
 import java.io.IOException;
 import java.util.HashMap;
 import java.util.Iterator;
 import java.util.Map;
 
-import org.apache.mina.core.buffer.IoBuffer;
 import org.openmeetings.screen.webstart.gui.ScreenDimensions;
-import org.openmeetings.screen.webstart.gui.ScreenDimensions.ScreenQuality;
 import org.openmeetings.screen.webstart.gui.ScreenSharerFrame;
-import org.red5.io.ITagReader;
-import org.red5.io.ITagWriter;
+import org.red5.client.net.rtmp.INetStreamEventHandler;
 import org.red5.io.utils.ObjectMap;
 import org.red5.server.api.event.IEvent;
 import org.red5.server.api.service.IPendingServiceCall;
+import org.red5.server.api.service.IPendingServiceCallback;
 import org.red5.server.net.rtmp.Channel;
 import org.red5.server.net.rtmp.RTMPConnection;
 import org.red5.server.net.rtmp.codec.RTMP;
 import org.red5.server.net.rtmp.event.Notify;
-import org.red5.server.net.rtmp.event.VideoData;
 import org.red5.server.net.rtmp.message.Header;
 import org.red5.server.net.rtmp.status.StatusCodes;
-import org.red5.server.stream.message.RTMPMessage;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-public class CoreScreenShare {
-
-	private static final Logger logger = LoggerFactory
-			.getLogger(CoreScreenShare.class);
+public class CoreScreenShare implements IPendingServiceCallback, INetStreamEventHandler {
+	private static final Logger logger = LoggerFactory.getLogger(CoreScreenShare.class);
 
 	private IScreenShare instance = null;
 	
-	public boolean startPublish = false;
-	public Integer playStreamId;
-	public Integer publishStreamId;
 	public String publishName;
-	public ITagWriter writer;
-	public ITagReader reader;
-	public IoBuffer buffer;
-	public CaptureScreen capture = null;
-	public Thread thread = null;
-
-	public ScreenSharerFrame frame;
-
-	public String host = "btg199251";
-	public String app = "oflaDemo";
-	public int port = 1935;
+	private CaptureScreen capture = null;
+	private RTMPClientPublish publishClient = null;
+
+	private ScreenSharerFrame frame;
+
 	public int defaultQuality = 1;
 
 	public Long organization_id = 0L;
 	public Long user_id = null;
-	public Boolean allowRecording = true;
+	public boolean allowRecording = true;
 
 	private boolean startStreaming = false;
 	private boolean startRecording = false;
@@ -101,20 +82,18 @@ public class CoreScreenShare {
 	//
 	// ------------------------------------------------------------------------
 
-	public CoreScreenShare(IScreenShare instance) {
+	public CoreScreenShare(IScreenShare instance, String[] args) {
 		this.instance = instance;
-	}
-
-	public void main(String[] args) {
+		
 		try {
 			for (String arg : args) {
 				logger.debug("arg: " + arg);
 			}
 			String[] textArray = null;
 			if (args.length > 8) {
-				host = args[0];
-				app = args[1];
-				port = Integer.parseInt(args[2]);
+				String host = args[0];
+				String app = args[1];
+				int port = Integer.parseInt(args[2]);
 				publishName = args[3];
 
 				String labelTexts = args[4];
@@ -123,7 +102,7 @@ public class CoreScreenShare {
 
 				defaultQuality = Integer.parseInt(args[6]);
 				user_id = Long.parseLong(args[7]);
-				allowRecording = Boolean.parseBoolean(args[8]);
+				allowRecording = Boolean.valueOf(args[8]);
 
 				if (labelTexts.length() > 0) {
 					textArray = labelTexts.split(";");
@@ -136,14 +115,14 @@ public class CoreScreenShare {
 						logger.debug(i + " :: " + textArray[i]);
 					}
 				}
+				capture = new CaptureScreen(this, instance, host, app, port);
+				logger.debug("host: " + host + ", app: "
+						+ app + ", port: " + port + ", publish: "
+						+ publishName);
 			} else {
 				System.exit(0);
 			}
 
-			logger.debug("host: " + host + ", app: "
-					+ app + ", port: " + port + ", publish: "
-					+ publishName);
-
 			createWindow(textArray);
 		} catch (Exception err) {
 			logger.error("", err);
@@ -158,17 +137,10 @@ public class CoreScreenShare {
 	public void createWindow(String[] textArray) {
 		try {
 			frame = new ScreenSharerFrame(this, textArray);
-			frame.addWindowListener(new WindowAdapter() {
-				public void windowClosing(WindowEvent e) {
-					frame.setVisible(false);
-					System.exit(0);
-				}
-			});
 			frame.setVisible(true);
 			frame.setRecordingTabEnabled(allowRecording);
-
+			frame.setPublishingTabEnabled(allowRecording);
 			logger.debug("initialized");
-
 		} catch (Exception err) {
 			logger.error("createWindow Exception: ", err);
 			err.printStackTrace();
@@ -192,7 +164,7 @@ public class CoreScreenShare {
 			cursorPosition.put("cursor_y", y);
 
 			if (instance.getConnection() != null) {
-				instance.invoke("setNewCursorPosition", new Object[] { cursorPosition }, instance);
+				instance.invoke("setNewCursorPosition", new Object[] { cursorPosition }, this);
 			}
 		} catch (NullPointerException npe) {
 			//noop
@@ -229,7 +201,7 @@ public class CoreScreenShare {
 			map.put("organization_id", this.organization_id);
 			map.put("user_id", this.user_id);
 
-			instance.invoke("setConnectionAsSharingClient", new Object[] { map }, instance);
+			instance.invoke("setConnectionAsSharingClient", new Object[] { map }, this);
 		} catch (Exception err) {
 			logger.error("setConnectionAsSharingClient Exception: ", err);
 			frame.setStatus("Error: " + err.getLocalizedMessage());
@@ -244,7 +216,7 @@ public class CoreScreenShare {
 	public void captureScreenStart(boolean startStreaming, boolean startRecording) {
 		captureScreenStart(startStreaming, startRecording, false);
 	}
-	
+
 	public void captureScreenStart(boolean startStreaming, boolean startRecording, boolean startPublishing) {
 		try {
 			logger.debug("captureScreenStart");
@@ -253,7 +225,7 @@ public class CoreScreenShare {
 			this.startPublishing = startPublishing;
 			
 			if (!isConnected) {
-				instance.connect(host, port, app, instance);
+				instance.connect(capture.getHost(), capture.getPort(), capture.getApp(), this);
 			} else {
 				setConnectionAsSharingClient();
 			}
@@ -263,40 +235,46 @@ public class CoreScreenShare {
 		}
 	}
 
-	public void captureScreenStop(boolean stopStreaming, boolean stopRecording) {
-		captureScreenStop(stopStreaming, stopRecording, false);
-	}
-	
-	public void captureScreenStop(boolean stopStreaming, boolean stopRecording, boolean stopPublishing) {
+	public void sendCaptureScreenStop(boolean stopStreaming, boolean stopRecording) {
 		try {
 			logger.debug("INVOKE screenSharerAction" );
 
 			Map<String, Object> map = new HashMap<String, Object>();
 			map.put("stopStreaming", stopStreaming);
 			map.put("stopRecording", stopRecording);
-			map.put("stopPublishing", stopPublishing);
-
-			instance.invoke("screenSharerAction", new Object[] { map }, instance);
 
-			if (stopStreaming) {
-				frame.setSharingStatus(false);
-			} else if (stopRecording) {
-				frame.setRecordingStatus(false);
-			} else if (stopPublishing) {
-				frame.setPublishingStatus(false);
-			}
+			instance.invoke("screenSharerAction", new Object[] { map }, this);
 		} catch (Exception err) {
 			logger.error("captureScreenStop Exception: ", err);
 			frame.setStatus("Exception: " + err);
 		}
 	}
 
-	// ------------------------------------------------------------------------
-	//
-	// Public
-	//
-	// ------------------------------------------------------------------------
-
+	public void sendStopPublishing() {
+		Map<String, Object> map = new HashMap<String, Object>();
+		map.put("stopPublishing", true);
+		instance.invoke("screenSharerAction", new Object[] { map }, this);
+	}
+	
+	public void stopStreaming() {
+		startStreaming = false;
+		frame.setSharingStatus(false, !startPublishing && !startRecording && !startStreaming);
+	}
+	
+	public void stopRecording() {
+		startRecording = false;
+		frame.setRecordingStatus(false, !startPublishing && !startRecording && !startStreaming);
+	}
+	
+	public void stopPublishing() {
+		startPublishing = false;
+		frame.setPublishingStatus(false, !startPublishing && !startRecording && !startStreaming);
+		if (publishClient != null) {
+			publishClient.disconnect();
+			publishClient = null;
+		}
+	}
+	
 	protected void onInvoke(RTMPConnection conn, Channel channel,
 			Header source, Notify invoke, RTMP rtmp) {
 
@@ -309,12 +287,12 @@ public class CoreScreenShare {
 			sendRemoteCursorEvent(invoke.getCall().getArguments()[0]);
 		} else if ("screenSharerAction".equals(method)) {
 			Object[] args = invoke.getCall().getArguments();
-			if (args != null) {
+			if (args != null && args.length > 0) {
 				@SuppressWarnings("unchecked")
 				HashMap<String, Object> params = (HashMap<String, Object>)args[0];
 				if (params.containsKey("stopPublishing")
-					&& Boolean.parseBoolean("" + params.get("stopPublishing"))) {
-					frame.setPublishingStatus(false);
+					&& Boolean.valueOf("" + params.get("stopPublishing"))) {
+					stopPublishing();
 				}
 				if (params.containsKey("error")) {
 					frame.setStatus("" + params.get("error"));
@@ -327,12 +305,14 @@ public class CoreScreenShare {
 		try {
 			logger.debug("ScreenShare stopStream");
 
+			stopStreaming();
+			stopRecording();
+			stopPublishing();
 			isConnected = false;
 
 			instance.disconnect();
-			capture.stop();
+			capture.setStartPublish(false);
 			capture.release();
-			thread = null;
 		} catch (Exception e) {
 			logger.error("ScreenShare stopStream exception " + e);
 		}
@@ -349,44 +329,33 @@ public class CoreScreenShare {
 
 		if (StatusCodes.NS_PUBLISH_START.equals(code)) {
 			logger.debug( "onStreamEvent Publish start" );
-			startPublish = true;
+			capture.setStartPublish(true);
 		}
 	}
 
 	public void sendRemoteCursorEvent(Object obj) {
 		try {
-
-			// logger.debug("#### sendRemoteCursorEvent ");
-
-			// logger.debug("Result Map Type "+obj.getClass().getName());
+			logger.trace("#### sendRemoteCursorEvent ");
+			logger.trace("Result Map Type "+obj.getClass().getName());
 
 			@SuppressWarnings("rawtypes")
 			Map returnMap = (Map) obj;
 
-			// logger.debug("result "+returnMap.get("result"));
-
-			String action = returnMap.get("action").toString();
+			String action = "" + returnMap.get("action");
 
 			if (action.equals("onmouseup")) {
 
 				Robot robot = new Robot();
 
-				// VirtualScreenBean
-
 				Float scaleFactor = Float
 						.valueOf(ScreenDimensions.spinnerWidth)
 						/ Float.valueOf(ScreenDimensions.resizeX);
 
-				// logger.debug("x 1 scaleFactor "+scaleFactor);
-
 				Float part_x1 = ((Float.valueOf(returnMap.get("x").toString())
 						.floatValue() * scaleFactor) / Float
 						.valueOf(Ampl_factor));
 
-				// logger.debug("x 1 part_x1 "+part_x1);
-
-				Integer x = Math.round(part_x1
-						+ ScreenDimensions.spinnerX);
+				Integer x = Math.round(part_x1 + ScreenDimensions.spinnerX);
 
 				Integer y = Math
 						.round(((Float.valueOf(returnMap.get("y").toString())
@@ -394,11 +363,8 @@ public class CoreScreenShare {
 								* ScreenDimensions.spinnerHeight / ScreenDimensions.resizeY) / Ampl_factor)
 								+ ScreenDimensions.spinnerY);
 
-				// logger.debug("x|y "+x+" || "+y);
-
 				robot.mouseMove(x, y);
 				robot.mouseRelease(InputEvent.BUTTON1_MASK);
-
 			} else if (action.equals("onmousedown")) {
 
 				Robot robot = new Robot();
@@ -557,8 +523,7 @@ public class CoreScreenShare {
 				// public synchronized int sendMessageWithClientById(Object
 				// newMessage, String clientId)
 
-				instance.invoke("sendMessageWithClientById", new Object[] { map,
-						clientId }, instance);
+				instance.invoke("sendMessageWithClientById", new Object[]{map, clientId}, this);
 
 			} else if (action.equals("show")) {
 
@@ -573,8 +538,7 @@ public class CoreScreenShare {
 				// public synchronized int sendMessageWithClientById(Object
 				// newMessage, String clientId)
 
-				instance.invoke("sendMessageWithClientById", new Object[] { map,
-						clientId }, instance);
+				instance.invoke("sendMessageWithClientById", new Object[]{map, clientId}, this);
 
 			}
 
@@ -720,70 +684,68 @@ public class CoreScreenShare {
 
 			logger.trace( "service call result: " + call );
 
-			if (call.getServiceMethodName().equals("connect")) {
+			String method = call == null ? null : call.getServiceMethodName();
+			logger.trace("call ### get Method Name " + method);
+			if ("connect".equals(method)) {
 				isConnected = true;
 				setConnectionAsSharingClient();
-			} else if (call.getServiceMethodName().equals(
-					"setConnectionAsSharingClient")) {
+			} else if ("setConnectionAsSharingClient".equals(method)) {
 
 				Object o = call.getResult();
 
-				@SuppressWarnings("rawtypes")
-				Map returnMap = (Map) o;
+				@SuppressWarnings("unchecked")
+				Map<String, Object> returnMap = (Map<String, Object>) o;
 
 				if (o == null || !Boolean.valueOf("" + returnMap.get("alreadyPublished")).booleanValue()) {
 					logger.trace("Stream not yet started - do it ");
 
-					instance.createStream(instance);
+					instance.createStream(this);
 				} else {
-					if (this.capture != null) {
-						this.capture.resetBuffer();
-					}
-
+					capture.resetBuffer();
 					logger.trace("The Stream was already started ");
 				}
-
 				if (returnMap != null) {
 					Object modus = returnMap.get("modus");
 					if ("startStreaming".equals(modus)) {
-						frame.setSharingStatus(true);
-					} else if ("startRecording".equals(modus)) {
-						frame.setRecordingStatus(true);
-					} else if ("startPublishing".equals(modus)) {
-						frame.setPublishingStatus(true);
+						frame.setSharingStatus(true, false);
+					}
+					if ("startRecording".equals(modus)) {
+						frame.setRecordingStatus(true, false);
+					}
+					if ("startPublishing".equals(modus)) {
+						frame.setPublishingStatus(true, false);
+						publishClient = new RTMPClientPublish(
+							this
+							, frame.getPublishHost()
+							, frame.getPublishApp()
+							, frame.getPublishId());
+						publishClient.connect();
 					}
 				} else {
 					throw new Exception(
 							"Could not aquire modus for event setConnectionAsSharingClient");
 				}
 
-			} else if (call.getServiceMethodName().equals("createStream")) {
-
-				publishStreamId = (Integer) call.getResult();
-				logger.debug("createPublishStream result stream id: "
-						+ publishStreamId);
-				logger.debug("publishing video by name: " + publishName);
-				instance.publish(publishStreamId, publishName, "live", instance);
-
-				logger.debug("setup capture thread");
-
-				logger.debug("setup capture thread vScreenSpinnerWidth "
-						+ ScreenDimensions.spinnerWidth);
-				logger.debug("setup capture thread vScreenSpinnerHeight "
-						+ ScreenDimensions.spinnerHeight);
-
-				capture = new CaptureScreen();
-
-				if (thread == null) {
-					thread = new Thread(capture);
-					thread.start();
+			} else if ("createStream".equals(method)) {
+				if (startRecording || startStreaming) {
+					if (call.getResult() != null) {
+						capture.setStreamId((Integer)call.getResult());
+					}
+					logger.debug("createPublishStream result stream id: " + capture.getStreamId());
+					logger.debug("publishing video by name: " + publishName);
+					instance.publish(capture.getStreamId(), publishName, "live", this);
+	
+					logger.debug("setup capture thread");
+	
+					logger.debug("setup capture thread vScreenSpinnerWidth "
+							+ ScreenDimensions.spinnerWidth);
+					logger.debug("setup capture thread vScreenSpinnerHeight "
+							+ ScreenDimensions.spinnerHeight);
+	
+					capture.setSendCursor(true);
+					capture.start();
 				}
-				capture.start();
-
-			} else if (call.getServiceMethodName().equals("screenSharerAction")) {
-				logger.trace("call ### get Method Name "
-						+ call.getServiceMethodName());
-
+			} else if ("screenSharerAction".equals(method)) {
 				Object o = call.getResult();
 
 				logger.trace("Result Map Type " + o.getClass().getName());
@@ -795,131 +757,20 @@ public class CoreScreenShare {
 					logger.trace("Stopping to stream, there is neither a Desktop Sharing nor Recording anymore");
 					stopStream();
 				} else if ("stopSharingOnly".equals(result)) {
-					//no op
+					stopStreaming();
 				} else if ("stopRecordingOnly".equals(result)) {
-					//no op
+					stopRecording();
 				} else if ("stopPublishingOnly".equals(result)) {
-					frame.setPublishingStatus(false);
+					stopPublishing();
 				}
-			} else if (call.getServiceMethodName().equals(
-					"setNewCursorPosition")) {
-
+			} else if ("setNewCursorPosition".equals(method)) {
 				// Do not do anything
-
 			} else {
-
-				logger.debug("Unknown method " + call.getServiceMethodName());
-
+				logger.debug("Unknown method " + method);
 			}
 
 		} catch (Exception err) {
 			logger.error("[resultReceived]", err);
 		}
 	}
-
-	public void pushVideo(int len, byte[] video, long ts) throws IOException {
-
-		if (!startPublish)
-			return;
-
-		if (buffer == null || (buffer.capacity() < video.length && !buffer.isAutoExpand())) {
-			buffer = IoBuffer.allocate(video.length);
-			buffer.setAutoExpand(true);
-		}
-
-		buffer.clear();
-		buffer.put(video);
-		buffer.flip();
-
-		VideoData videoData = new VideoData(buffer);
-		videoData.setTimestamp((int) ts);
-
-		RTMPMessage rtmpMsg = RTMPMessage.build(videoData);
-		instance.publishStreamData(publishStreamId, rtmpMsg);
-	}
-
-	// ------------------------------------------------------------------------
-	//
-	// CaptureScreen
-	//
-	// ------------------------------------------------------------------------
-
-	private final class CaptureScreen extends Object implements Runnable {
-		private int timeBetweenFrames = 500; // frameRate
-		private volatile long timestamp = 0;
-		private volatile boolean active = true;
-		@SuppressWarnings("unused")
-		private volatile boolean stopped = false;
-		private IScreenEncoder se;
-
-		// ------------------------------------------------------------------------
-		//
-		// Constructor
-		//
-		// ------------------------------------------------------------------------
-
-		public CaptureScreen() {
-			timeBetweenFrames = (ScreenDimensions.quality == ScreenQuality.VeryHigh) ? 100 : 500;
-			se = new ScreenV1Encoder();
-		}
-
-		// ------------------------------------------------------------------------
-		//
-		// Public
-		//
-		// ------------------------------------------------------------------------
-		public void start() {
-			stopped = false;
-		}
-
-		public void stop() {
-			stopped = true;
-		}
-
-		public void release() {
-			active = false;
-		}
-
-		public void resetBuffer() {
-			se.reset();
-		}
-
-		// ------------------------------------------------------------------------
-		//
-		// Thread loop
-		//
-		// ------------------------------------------------------------------------
-		public void run() {
-			try {
-				Robot robot = new Robot();
-				BufferedImage image = null;
-				while (active) {
-					final long ctime = System.currentTimeMillis();
-					Rectangle screen = new Rectangle(ScreenDimensions.spinnerX,
-							ScreenDimensions.spinnerY,
-							ScreenDimensions.spinnerWidth,
-							ScreenDimensions.spinnerHeight);
-					
-					image = robot.createScreenCapture(screen);
-
-					try {
-						timestamp += timeBetweenFrames;
-						byte[] data = se.encode(screen, image, new Rectangle(ScreenDimensions.resizeX,
-								ScreenDimensions.resizeY));
-
-						pushVideo(data.length, data, timestamp);
-					} catch (Exception e) {
-						e.printStackTrace();
-					}
-					final int spent = (int) (System.currentTimeMillis() - ctime);
-
-					sendCursorStatus();
-
-					Thread.sleep(Math.max(0, timeBetweenFrames - spent));
-				}
-			} catch (Exception e) {
-				e.printStackTrace();
-			}
-		}
-	}
 }

Modified: incubator/openmeetings/trunk/singlewebapp/src/org/openmeetings/screen/webstart/IScreenShare.java
URL: http://svn.apache.org/viewvc/incubator/openmeetings/trunk/singlewebapp/src/org/openmeetings/screen/webstart/IScreenShare.java?rev=1362554&r1=1362553&r2=1362554&view=diff
==============================================================================
--- incubator/openmeetings/trunk/singlewebapp/src/org/openmeetings/screen/webstart/IScreenShare.java (original)
+++ incubator/openmeetings/trunk/singlewebapp/src/org/openmeetings/screen/webstart/IScreenShare.java Tue Jul 17 16:12:39 2012
@@ -23,7 +23,7 @@ import org.red5.server.api.service.IPend
 import org.red5.server.messaging.IMessage;
 import org.red5.server.net.rtmp.RTMPConnection;
 
-public interface IScreenShare extends IPendingServiceCallback, INetStreamEventHandler {
+public interface IScreenShare {
 	RTMPConnection getConnection();
 	void invoke(String method, Object[] params, IPendingServiceCallback callback);
 	void connect(String server, int port, String application, IPendingServiceCallback connectCallback);

Added: incubator/openmeetings/trunk/singlewebapp/src/org/openmeetings/screen/webstart/RTMPClientPublish.java
URL: http://svn.apache.org/viewvc/incubator/openmeetings/trunk/singlewebapp/src/org/openmeetings/screen/webstart/RTMPClientPublish.java?rev=1362554&view=auto
==============================================================================
--- incubator/openmeetings/trunk/singlewebapp/src/org/openmeetings/screen/webstart/RTMPClientPublish.java (added)
+++ incubator/openmeetings/trunk/singlewebapp/src/org/openmeetings/screen/webstart/RTMPClientPublish.java Tue Jul 17 16:12:39 2012
@@ -0,0 +1,71 @@
+package org.openmeetings.screen.webstart;
+
+import org.red5.client.net.rtmp.ClientExceptionHandler;
+import org.red5.client.net.rtmp.INetStreamEventHandler;
+import org.red5.client.net.rtmp.RTMPClient;
+import org.red5.server.api.service.IPendingServiceCall;
+import org.red5.server.api.service.IPendingServiceCallback;
+import org.red5.server.net.rtmp.Channel;
+import org.red5.server.net.rtmp.RTMPConnection;
+import org.red5.server.net.rtmp.codec.RTMP;
+import org.red5.server.net.rtmp.event.Notify;
+import org.red5.server.net.rtmp.message.Header;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+class RTMPClientPublish extends RTMPClient implements IPendingServiceCallback, INetStreamEventHandler, ClientExceptionHandler, IScreenShare {
+	private static final Logger logger = LoggerFactory.getLogger(RTMPClientPublish.class);
+	private final CaptureScreen publishScreen;
+	private String id;
+	
+	RTMPClientPublish(CoreScreenShare core, String host, String app, String id) {
+		this.id = id;
+		publishScreen = new CaptureScreen(core, this, host, app, 1935);
+	}
+
+	public void connect() {
+		super.connect(publishScreen.getHost(), 1935, publishScreen.getApp(), this);
+	}
+	
+	@Override
+	public void handleException(Throwable throwable) {
+		logger.error("ERROR", throwable);
+	}
+
+	@Override
+	public void connectionOpened(RTMPConnection conn, RTMP state) {
+		super.connectionOpened(conn, state);
+		createStream(this);
+	}
+	
+	@Override
+	public void connectionClosed(RTMPConnection conn, RTMP state) {
+		super.connectionClosed(conn, state);
+		publishScreen.setStartPublish(false);
+		publishScreen.release();
+	}
+	
+	@Override
+	protected void onInvoke(RTMPConnection conn,
+			Channel channel, Header source, Notify invoke,
+			RTMP rtmp) {
+		super.onInvoke(conn, channel, source, invoke, rtmp);
+	}
+	
+	public void resultReceived(IPendingServiceCall call) {
+		String method = call == null ? null : call.getServiceMethodName();
+		logger.trace("call ### get Method Name " + method);
+		if ("connect".equals(method)) {
+			//setConnectionAsSharingClient(); //FIXME
+		} else if ("createStream".equals(method)) {
+			publishScreen.setStreamId((Integer)call.getResult());
+			publish(publishScreen.getStreamId(), id, "live", this);
+			publishScreen.setStartPublish(true);
+			publishScreen.start();
+		}
+		resultReceived(call);
+	}
+
+	public void onStreamEvent(Notify notify) {
+	}
+}
\ No newline at end of file