a couple of fixes that enabled an upgrade to Scala 2.9.2 and make deskshare debuggable in Eclipse (w. Scala IDE)

This commit is contained in:
Ralf Sippl 2012-07-10 22:22:05 +02:00
parent ad3bb375f4
commit a709b8ebcf
14 changed files with 188 additions and 48 deletions

View File

@ -1 +1,2 @@
build build
.cache

View File

@ -1,32 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<project-modules id="moduleCoreId" project-version="1.5.0"> <project-modules id="moduleCoreId" project-version="1.5.0">
<wb-module deploy-name="app"> <wb-module deploy-name="deskshare">
<property name="context-root" value="app"/> <wb-resource deploy-path="/" source-path="/src/main/webapp" tag="defaultRootSource"/>
<wb-resource deploy-path="/WEB-INF/classes" source-path="src/main/java"/> <wb-resource deploy-path="/WEB-INF/classes" source-path="/build/classes/main"/>
<wb-resource deploy-path="/WEB-INF/classes" source-path="src/main/resources"/> <dependent-module archiveName="common.jar" deploy-path="/WEB-INF/lib" handle="module:/resource/common/common">
<wb-resource deploy-path="/" source-path="src/main/webapp"/> <dependency-type>uses</dependency-type>
</dependent-module>
<property name="java-output-path" value="build/classes/main"/> <property name="java-output-path" value="build/classes/main"/>
<dependent-module deploy-path="/WEB-INF/lib" handle="module:/classpath/lib///home/firstuser/.gradle/cache/commons-fileupload/commons-fileupload/jars/commons-fileupload-1.2.1.jar"> <property name="context-root" value="deskshare"/>
<dependency-type>uses</dependency-type>
</dependent-module>
<dependent-module deploy-path="/WEB-INF/lib" handle="module:/classpath/lib///home/firstuser/.gradle/cache/commons-io/commons-io/jars/commons-io-1.4.jar">
<dependency-type>uses</dependency-type>
</dependent-module>
<dependent-module deploy-path="/WEB-INF/lib" handle="module:/classpath/lib///home/firstuser/.gradle/cache/net/lag/configgy/configgy/jars/configgy-1.5.jar">
<dependency-type>uses</dependency-type>
</dependent-module>
<dependent-module deploy-path="/WEB-INF/lib" handle="module:/classpath/lib///home/firstuser/.gradle/cache/org.apache.mina/mina-integration-spring/jars/mina-integration-spring-1.1.7.jar">
<dependency-type>uses</dependency-type>
</dependent-module>
<dependent-module deploy-path="/WEB-INF/lib" handle="module:/classpath/lib///home/firstuser/.gradle/cache/org.scala-lang/scala-library/jars/scala-library-2.7.7.jar">
<dependency-type>uses</dependency-type>
</dependent-module>
<dependent-module deploy-path="/WEB-INF/lib" handle="module:/classpath/lib///home/firstuser/.gradle/cache/spring/spring-webmvc/jars/spring-webmvc-2.5.6.jar">
<dependency-type>uses</dependency-type>
</dependent-module>
<dependent-module deploy-path="/WEB-INF/lib" handle="module:/resource/common/common">
<dependency-type>uses</dependency-type>
</dependent-module>
</wb-module> </wb-module>
</project-modules> </project-modules>

View File

@ -1,8 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<faceted-project> <faceted-project>
<fixed facet="jst.java"/> <runtime name="Red5 Server Runtime 2"/>
<fixed facet="wst.jsdt.web"/>
<fixed facet="jst.web"/> <fixed facet="jst.web"/>
<installed facet="jst.java" version="5.0"/> <fixed facet="java"/>
<installed facet="jst.web" version="2.4"/> <installed facet="java" version="1.6"/>
<installed facet="jst.web" version="2.3"/>
<installed facet="wst.jsdt.web" version="1.0"/>
</faceted-project> </faceted-project>

View File

@ -0,0 +1,2 @@
eclipse.preferences.version=1
org.eclipse.wst.ws.service.policy.projectEnabled=false

View File

@ -0,0 +1,128 @@
Xcheck-null=false
Xcheckinit=false
Xdisable-assertions=false
Xelide-below=-2147483648
Xexperimental=false
Xfatal-warnings=false
Xfuture=false
Xlog-implicits=false
Xmigration=false
Xno-uescape=false
Xpluginsdir=/Users/ralf/Development/eclipse-jee-indigo-32bit/configuration/org.eclipse.osgi/bundles/2438/1/.cp/lib
Ybuild-manager-debug=false
Yno-generic-signatures=false
Yno-imports=false
Ypresentation-debug=false
Ypresentation-delay=0
Ypresentation-verbose=false
Yrecursion=0
Yself-in-annots=false
Ystruct-dispatch=poly-cache
Ywarn-dead-code=false
buildmanager=sbt
compileorder=Mixed
deprecation=false
eclipse.preferences.version=1
explaintypes=false
formatter.alignParameters=false
formatter.alignSingleLineCaseStatements=false
formatter.alignSingleLineCaseStatements.maxArrowIndent=40
formatter.compactControlReadability=false
formatter.compactStringConcatenation=false
formatter.doubleIndentClassDeclaration=false
formatter.formatXml=true
formatter.indentLocalDefs=false
formatter.indentPackageBlocks=true
formatter.indentSpaces=2
formatter.indentWithTabs=false
formatter.multilineScaladocCommentsStartOnFirstLine=false
formatter.placeScaladocAsterisksBeneathSecondAsterisk=false
formatter.preserveDanglingCloseParenthesis=false
formatter.preserveSpaceBeforeArguments=false
formatter.rewriteArrowSymbols=false
formatter.spaceBeforeColon=false
formatter.spaceInsideBrackets=false
formatter.spaceInsideParentheses=false
formatter.spacesWithinPatternBinders=true
g=vars
no-specialization=false
nowarn=false
optimise=false
organizeimports.expandcollapse=expand
organizeimports.groups=java$scala$org$com
organizeimports.wildcards=scalaz$scalaz.Scalaz
scala.compiler.useProjectSettings=false
stopBuildOnError=false
syntaxColouring.bracket.bold=false
syntaxColouring.bracket.colour=0,0,0
syntaxColouring.bracket.italic=false
syntaxColouring.bracket.strikethrough=false
syntaxColouring.bracket.underline=false
syntaxColouring.default.bold=false
syntaxColouring.default.colour=0,0,0
syntaxColouring.default.italic=false
syntaxColouring.default.strikethrough=false
syntaxColouring.default.underline=false
syntaxColouring.keyword.bold=true
syntaxColouring.keyword.colour=127,0,85
syntaxColouring.keyword.italic=false
syntaxColouring.keyword.strikethrough=false
syntaxColouring.keyword.underline=false
syntaxColouring.operator.bold=false
syntaxColouring.operator.colour=0,0,0
syntaxColouring.operator.italic=false
syntaxColouring.operator.strikethrough=false
syntaxColouring.operator.underline=false
syntaxColouring.scaladoc.bold=false
syntaxColouring.scaladoc.colour=63,95,191
syntaxColouring.scaladoc.italic=false
syntaxColouring.scaladoc.strikethrough=false
syntaxColouring.scaladoc.underline=false
syntaxColouring.singleLineComment.bold=false
syntaxColouring.singleLineComment.colour=63,127,95
syntaxColouring.singleLineComment.italic=false
syntaxColouring.singleLineComment.strikethrough=false
syntaxColouring.singleLineComment.underline=false
syntaxColouring.string.bold=false
syntaxColouring.string.colour=42,0,255
syntaxColouring.string.italic=false
syntaxColouring.string.strikethrough=false
syntaxColouring.string.underline=false
syntaxColouring.xml.attributeName.bold=false
syntaxColouring.xml.attributeName.colour=127,0,127
syntaxColouring.xml.attributeName.italic=false
syntaxColouring.xml.attributeName.strikethrough=false
syntaxColouring.xml.attributeName.underline=false
syntaxColouring.xml.attributeValue.bold=false
syntaxColouring.xml.attributeValue.colour=42,0,255
syntaxColouring.xml.attributeValue.italic=true
syntaxColouring.xml.attributeValue.strikethrough=false
syntaxColouring.xml.attributeValue.underline=false
syntaxColouring.xml.comment.bold=false
syntaxColouring.xml.comment.colour=63,85,191
syntaxColouring.xml.comment.italic=false
syntaxColouring.xml.comment.strikethrough=false
syntaxColouring.xml.comment.underline=false
syntaxColouring.xml.equals.bold=false
syntaxColouring.xml.equals.colour=0,0,0
syntaxColouring.xml.equals.italic=false
syntaxColouring.xml.equals.strikethrough=false
syntaxColouring.xml.equals.underline=false
syntaxColouring.xml.processingInstruction.bold=false
syntaxColouring.xml.processingInstruction.colour=0,128,128
syntaxColouring.xml.processingInstruction.italic=false
syntaxColouring.xml.processingInstruction.strikethrough=false
syntaxColouring.xml.processingInstruction.underline=false
syntaxColouring.xml.tagDelimiter.bold=false
syntaxColouring.xml.tagDelimiter.colour=0,128,128
syntaxColouring.xml.tagDelimiter.italic=false
syntaxColouring.xml.tagDelimiter.strikethrough=false
syntaxColouring.xml.tagDelimiter.underline=false
syntaxColouring.xml.tagName.bold=false
syntaxColouring.xml.tagName.colour=63,127,127
syntaxColouring.xml.tagName.italic=false
syntaxColouring.xml.tagName.strikethrough=false
syntaxColouring.xml.tagName.underline=false
target=jvm-1.5
unchecked=false
verbose=false

View File

@ -34,16 +34,20 @@ dependencies {
providedCompile ':jul-to-slf4j:1.6.1@jar' providedCompile ':jul-to-slf4j:1.6.1@jar'
compile project(':common') compile project(':common')
providedCompile 'commons-fileupload:commons-fileupload:1.2.2@jar' compile 'commons-fileupload:commons-fileupload:1.2.2@jar'
providedCompile 'commons-io:commons-io:2.1@jar' compile 'commons-io:commons-io:2.1@jar'
// Libraries needed to run the scala tools // Libraries needed to run the scala tools
scalaTools 'org.scala-lang:scala-compiler:2.7.7' scalaTools 'org.scala-lang:scala-compiler:2.9.2'
scalaTools 'org.scala-lang:scala-library:2.7.7' scalaTools 'org.scala-lang:scala-library:2.9.2'
// workaround for http://issues.gradle.org/browse/GRADLE-1273
compileScala.classpath = sourceSets.main.compileClasspath + files(sourceSets.main.classesDir)
compileTestScala.classpath = sourceSets.test.compileClasspath + files(sourceSets.test.classesDir)
// Libraries needed for scala api // Libraries needed for scala api
compile 'org.scala-lang:scala-library:2.7.7' compile 'org.scala-lang:scala-library:2.9.2'
compile 'net/lag/configgy:configgy:1.5@jar' compile 'net.lag:configgy:2.0.0'
// Testing // Testing
compile 'org.testng:testng:5.8@jar' compile 'org.testng:testng:5.8@jar'
@ -55,7 +59,7 @@ dependencies {
//redis //redis
compile 'redis.clients:jedis:1.5.1' compile 'redis.clients:jedis:1.5.1'
providedCompile 'commons-pool:commons-pool:1.5.6' compile 'commons-pool:commons-pool:1.5.6'
} }
test { test {

View File

@ -26,6 +26,7 @@ import org.red5.server.so.SharedObjectService
import org.red5.server.api.so.{ISharedObject, ISharedObjectService} import org.red5.server.api.so.{ISharedObject, ISharedObjectService}
import org.red5.server.stream.{BroadcastScope, IBroadcastScope, IProviderService} import org.red5.server.stream.{BroadcastScope, IBroadcastScope, IProviderService}
import org.bigbluebutton.deskshare.server.ScreenVideoBroadcastStream import org.bigbluebutton.deskshare.server.ScreenVideoBroadcastStream
import org.bigbluebutton.deskshare.server.RtmpClientAdapter
import org.bigbluebutton.deskshare.server.stream.StreamManager import org.bigbluebutton.deskshare.server.stream.StreamManager
import org.bigbluebutton.deskshare.server.socket.DeskShareServer import org.bigbluebutton.deskshare.server.socket.DeskShareServer
import org.bigbluebutton.deskshare.server.MultiThreadedAppAdapter import org.bigbluebutton.deskshare.server.MultiThreadedAppAdapter

View File

@ -21,7 +21,6 @@
*/ */
package org.bigbluebutton.deskshare.server.sessions package org.bigbluebutton.deskshare.server.sessions
import org.bigbluebutton.deskshare.common.Dimension
import org.bigbluebutton.deskshare.server.svc1.Dimension import org.bigbluebutton.deskshare.server.svc1.Dimension
import org.bigbluebutton.deskshare.server.stream.StreamManager import org.bigbluebutton.deskshare.server.stream.StreamManager
import org.bigbluebutton.deskshare.server.session.ISessionManagerGateway import org.bigbluebutton.deskshare.server.session.ISessionManagerGateway
@ -36,10 +35,10 @@ class SessionManagerGateway(streamManager: StreamManager, keyFrameInterval: Int,
val sessionManager: SessionManagerSVC = new SessionManagerSVC(streamManager, keyFrameInterval, interframeInterval, waitForAllBlocks) val sessionManager: SessionManagerSVC = new SessionManagerSVC(streamManager, keyFrameInterval, interframeInterval, waitForAllBlocks)
sessionManager.start sessionManager.start
def createSession(room: String, screenDim: common.Dimension, blockDim: common.Dimension, seqNum: Int): Unit = { def createSession(room: String, screenDim: org.bigbluebutton.deskshare.common.Dimension, blockDim: org.bigbluebutton.deskshare.common.Dimension, seqNum: Int): Unit = {
log.info("SessionManagerGateway:createSession for %s", room) log.info("SessionManagerGateway:createSession for %s", room)
sessionManager ! new CreateSession(room, new svc1.Dimension(screenDim.getWidth(), screenDim.getHeight()), sessionManager ! new CreateSession(room, new Dimension(screenDim.getWidth(), screenDim.getHeight()),
new svc1.Dimension(blockDim.getWidth(), blockDim.getHeight()), seqNum) new Dimension(blockDim.getWidth(), blockDim.getHeight()), seqNum)
log.info("SessionManagerGateway:Sent create session for %s", room) log.info("SessionManagerGateway:Sent create session for %s", room)
} }

View File

@ -24,6 +24,7 @@ package org.bigbluebutton.deskshare.server.stream
import org.bigbluebutton.deskshare.server.recorder.Recorder import org.bigbluebutton.deskshare.server.recorder.Recorder
import org.bigbluebutton.deskshare.server.red5.DeskshareApplication import org.bigbluebutton.deskshare.server.red5.DeskshareApplication
import org.bigbluebutton.deskshare.server.ScreenVideoBroadcastStream import org.bigbluebutton.deskshare.server.ScreenVideoBroadcastStream
import org.bigbluebutton.deskshare.server.RtmpClientAdapter
import org.red5.server.api.{IContext, IScope} import org.red5.server.api.{IContext, IScope}
import org.red5.server.api.so.ISharedObject import org.red5.server.api.so.ISharedObject
import org.red5.server.net.rtmp.event.VideoData; import org.red5.server.net.rtmp.event.VideoData;
@ -62,7 +63,7 @@ class DeskshareStream(app: DeskshareApplication, name: String, val width: Int, v
broadcastStream = bs; broadcastStream = bs;
app.createDeskshareClient(name) match { app.createDeskshareClient(name) match {
case None => return false case None => return false
case Some(dsc) => { case Some(dsc:RtmpClientAdapter) => {
dsClient = dsc; dsClient = dsc;
recorder.addListener(dsClient) recorder.addListener(dsClient)
return true return true

View File

@ -30,7 +30,7 @@ import net.lag.logging.Logger
class BlockManager(room: String, screenDim: Dimension, blockDim: Dimension, waitForAllBlocks: Boolean) extends BlockFactory { class BlockManager(room: String, screenDim: Dimension, blockDim: Dimension, waitForAllBlocks: Boolean) extends BlockFactory {
private val log = Logger.get private val log = Logger.get
private var blocksMap = new ConcurrentHashMap[Integer, Block] private var blocksMap = new ConcurrentHashMap[Int, Block]
private var numberOfRows = getNumberOfRows(screenDim, blockDim) private var numberOfRows = getNumberOfRows(screenDim, blockDim)
private var numberOfColumns = getNumberOfColumns(screenDim, blockDim) private var numberOfColumns = getNumberOfColumns(screenDim, blockDim)

View File

@ -100,13 +100,13 @@ dependencies {
compile 'net.jcip:jcip-annotations:1.0@jar' compile 'net.jcip:jcip-annotations:1.0@jar'
// Libraries needed to run the scala tools // Libraries needed to run the scala tools
scalaTools 'org.scala-lang:scala-compiler:2.7.7' scalaTools 'org.scala-lang:scala-compiler:2.9.2'
scalaTools 'org.scala-lang:scala-library:2.7.7' scalaTools 'org.scala-lang:scala-library:2.9.2'
// Libraries needed for scala api // Libraries needed for scala api
compile 'org.scala-lang:scala-library:2.7.7' compile 'org.scala-lang:scala-library:2.9.2'
compile 'net/lag/configgy:configgy:1.5@jar' compile 'net.lag:configgy:2.0.0'
//redis //redis
compile 'redis.clients:jedis:2.0.0' compile 'redis.clients:jedis:2.0.0'

View File

@ -0,0 +1,7 @@
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
org.eclipse.jdt.core.compiler.compliance=1.6
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
org.eclipse.jdt.core.compiler.source=1.6

View File

@ -0,0 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<project-modules id="moduleCoreId" project-version="1.5.0">
<wb-module deploy-name="common">
<wb-resource deploy-path="/" source-path="/src/main/java"/>
<wb-resource deploy-path="/" source-path="/src/test/java"/>
</wb-module>
</project-modules>

View File

@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<faceted-project>
<runtime name="Red5 Server Runtime 2"/>
<fixed facet="jst.utility"/>
<fixed facet="java"/>
<installed facet="java" version="1.6"/>
<installed facet="jst.utility" version="1.0"/>
</faceted-project>