openmeetings-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From solo...@apache.org
Subject svn commit: r1437866 - in /incubator/openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/screen/webstart: CaptureScreen.java CoreScreenShare.java
Date Thu, 24 Jan 2013 06:27:45 GMT
Author: solomax
Date: Thu Jan 24 06:27:44 2013
New Revision: 1437866

URL: http://svn.apache.org/viewvc?rev=1437866&view=rev
Log:
[OPENMEETINGS-515] gray areas are removed from the recording

Modified:
    incubator/openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/screen/webstart/CaptureScreen.java
    incubator/openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/screen/webstart/CoreScreenShare.java

Modified: incubator/openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/screen/webstart/CaptureScreen.java
URL: http://svn.apache.org/viewvc/incubator/openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/screen/webstart/CaptureScreen.java?rev=1437866&r1=1437865&r2=1437866&view=diff
==============================================================================
--- incubator/openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/screen/webstart/CaptureScreen.java
(original)
+++ incubator/openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/screen/webstart/CaptureScreen.java
Thu Jan 24 06:27:44 2013
@@ -65,6 +65,9 @@ final class CaptureScreen extends Thread
 
 	public void run() {
 		try {
+			while (!core.isReadyToRecord()) {
+				Thread.sleep(60);
+			}
 			Robot robot = new Robot();
 			BufferedImage image = null;
 			while (active) {

Modified: incubator/openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/screen/webstart/CoreScreenShare.java
URL: http://svn.apache.org/viewvc/incubator/openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/screen/webstart/CoreScreenShare.java?rev=1437866&r1=1437865&r2=1437866&view=diff
==============================================================================
--- incubator/openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/screen/webstart/CoreScreenShare.java
(original)
+++ incubator/openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/screen/webstart/CoreScreenShare.java
Thu Jan 24 06:27:44 2013
@@ -77,6 +77,7 @@ public class CoreScreenShare implements 
 	private boolean startPublishing = false;
 	public float Ampl_factor = 1f;
 	public boolean isConnected = false;
+	private boolean readyToRecord = false;
 
 	public Map<Integer, Boolean> currentPressedKeys = new HashMap<Integer, Boolean>();
 
@@ -285,6 +286,14 @@ public class CoreScreenShare implements 
 		}
 	}
 	
+	synchronized public boolean isReadyToRecord() {
+		return readyToRecord;
+	}
+	
+	synchronized private void setReadyToRecord(boolean readyToRecord) {
+		this.readyToRecord = readyToRecord;
+	}
+	
 	protected void onInvoke(RTMPConnection conn, Channel channel,
 			Header source, Notify invoke, RTMP rtmp) {
 
@@ -321,6 +330,7 @@ public class CoreScreenShare implements 
 			isConnected = false;
 
 			instance.disconnect();
+			setReadyToRecord(false);
 			getCapture().setStartPublish(false);
 			getCapture().release();
 			capture = null;
@@ -341,6 +351,7 @@ public class CoreScreenShare implements 
 		if (StatusCodes.NS_PUBLISH_START.equals(code)) {
 			logger.debug( "onStreamEvent Publish start" );
 			getCapture().setStartPublish(true);
+			setReadyToRecord(true);
 		}
 	}
 



Mime
View raw message