diff --git a/bbb-screenshare/app/jws/lib/ffmpeg-linux-x86-svc2.jar b/bbb-screenshare/app/jws/lib/ffmpeg-linux-x86-svc2.jar
new file mode 100644
index 0000000000..f15d430672
Binary files /dev/null and b/bbb-screenshare/app/jws/lib/ffmpeg-linux-x86-svc2.jar differ
diff --git a/bbb-screenshare/app/jws/lib/ffmpeg-linux-x86_64-svc2.jar b/bbb-screenshare/app/jws/lib/ffmpeg-linux-x86_64-svc2.jar
new file mode 100644
index 0000000000..bb6de91b22
Binary files /dev/null and b/bbb-screenshare/app/jws/lib/ffmpeg-linux-x86_64-svc2.jar differ
diff --git a/bbb-screenshare/app/jws/lib/ffmpeg-svc2.jar b/bbb-screenshare/app/jws/lib/ffmpeg-svc2.jar
new file mode 100644
index 0000000000..a2d74e5f2a
Binary files /dev/null and b/bbb-screenshare/app/jws/lib/ffmpeg-svc2.jar differ
diff --git a/bbb-screenshare/app/jws/lib/ffmpeg-win-x86-native-svc2.jar b/bbb-screenshare/app/jws/lib/ffmpeg-win-x86-native-svc2.jar
new file mode 100644
index 0000000000..5c53f67dd6
Binary files /dev/null and b/bbb-screenshare/app/jws/lib/ffmpeg-win-x86-native-svc2.jar differ
diff --git a/bbb-screenshare/app/jws/lib/ffmpeg-win-x86-svc2.jar b/bbb-screenshare/app/jws/lib/ffmpeg-win-x86-svc2.jar
new file mode 100644
index 0000000000..da55767c28
Binary files /dev/null and b/bbb-screenshare/app/jws/lib/ffmpeg-win-x86-svc2.jar differ
diff --git a/bbb-screenshare/app/jws/lib/ffmpeg-win-x86_64-native-svc2.jar b/bbb-screenshare/app/jws/lib/ffmpeg-win-x86_64-native-svc2.jar
new file mode 100644
index 0000000000..49ad45d6b5
Binary files /dev/null and b/bbb-screenshare/app/jws/lib/ffmpeg-win-x86_64-native-svc2.jar differ
diff --git a/bbb-screenshare/app/jws/lib/ffmpeg-win-x86_64-svc2.jar b/bbb-screenshare/app/jws/lib/ffmpeg-win-x86_64-svc2.jar
new file mode 100644
index 0000000000..accc9d301b
Binary files /dev/null and b/bbb-screenshare/app/jws/lib/ffmpeg-win-x86_64-svc2.jar differ
diff --git a/bbb-screenshare/app/jws/lib/ffmpeg-windows-x86_64.jar b/bbb-screenshare/app/jws/lib/ffmpeg-windows-x86_64.jar
index 4f389ecfd5..9fa0d56a61 100755
Binary files a/bbb-screenshare/app/jws/lib/ffmpeg-windows-x86_64.jar and b/bbb-screenshare/app/jws/lib/ffmpeg-windows-x86_64.jar differ
diff --git a/bbb-screenshare/app/jws/lib/ffmpeg.jar b/bbb-screenshare/app/jws/lib/ffmpeg.jar
index 0e7e707feb..74a76e6508 100755
Binary files a/bbb-screenshare/app/jws/lib/ffmpeg.jar and b/bbb-screenshare/app/jws/lib/ffmpeg.jar differ
diff --git a/bbb-screenshare/app/jws/lib/javacv-screenshare-0.0.1.jar b/bbb-screenshare/app/jws/lib/javacv-screenshare-0.0.1.jar
index e22587c1ae..c7f8daf6e1 100755
Binary files a/bbb-screenshare/app/jws/lib/javacv-screenshare-0.0.1.jar and b/bbb-screenshare/app/jws/lib/javacv-screenshare-0.0.1.jar differ
diff --git a/bbb-screenshare/app/jws/screenshare.jnlp b/bbb-screenshare/app/jws/screenshare.jnlp
index 08bd5b2a65..33911927b3 100755
--- a/bbb-screenshare/app/jws/screenshare.jnlp
+++ b/bbb-screenshare/app/jws/screenshare.jnlp
@@ -12,23 +12,23 @@
-
+
-
+
-
+
-
+
-
+
@@ -45,6 +45,7 @@
$$fullScreen
$$codecOptions
$$session
+ $$useH264
$$errorMessage
diff --git a/bbb-screenshare/app/screenshare.jnlp b/bbb-screenshare/app/screenshare.jnlp
deleted file mode 100755
index 08bd5b2a65..0000000000
--- a/bbb-screenshare/app/screenshare.jnlp
+++ /dev/null
@@ -1,52 +0,0 @@
-
-
-
-
- BigBlueButton Screen Share
- BigBlueButton
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- $$publishUrl
- $$serverUrl
- $$meetingId
- $$streamId
- $$fullScreen
- $$codecOptions
- $$session
- $$errorMessage
-
-
-
-
diff --git a/bbb-screenshare/app/src/main/java/jnlp/sample/servlet/JnlpFileHandler.java b/bbb-screenshare/app/src/main/java/jnlp/sample/servlet/JnlpFileHandler.java
index 4d1f43a7fd..75b8cda798 100755
--- a/bbb-screenshare/app/src/main/java/jnlp/sample/servlet/JnlpFileHandler.java
+++ b/bbb-screenshare/app/src/main/java/jnlp/sample/servlet/JnlpFileHandler.java
@@ -41,6 +41,8 @@ import java.io.*;
import javax.servlet.*;
import javax.servlet.http.*;
import javax.xml.parsers.*;
+
+import com.sun.org.apache.xpath.internal.operations.Bool;
import org.xml.sax.*;
import javax.xml.transform.*;
import javax.xml.transform.dom.DOMSource;
@@ -314,12 +316,23 @@ public class JnlpFileHandler {
if (sInfo == null) {
errorMessage = "ERROR_GETTING_INFO_USING_TOKEN";
} else {
- publishUrl = sInfo.publishUrl;
+
+ System.out.println("********* URL=" + sInfo.publishUrl);
+ if (sInfo.tunnel) {
+ publishUrl = sInfo.publishUrl.replaceFirst("rtmp","rtmpt");
+ } else {
+ publishUrl = sInfo.publishUrl;
+ }
+
streamId = sInfo.streamId;
session = sInfo.session;
}
-
+
+
+ System.out.println("********* URL=" + publishUrl);
+
String jnlpUrl = configurator.getJnlpUrl();
+ Boolean useH264 = configurator.isUseH264();
String codecOptions = configurator.getCodecOptions();
log.debug("Codec Options = [" + codecOptions + "]");
@@ -337,6 +350,7 @@ public class JnlpFileHandler {
jnlpTemplate = substitute(jnlpTemplate, "$$session", session);
jnlpTemplate = substitute(jnlpTemplate, "$$streamId", streamId);
jnlpTemplate = substitute(jnlpTemplate, "$$codecOptions", codecOptions);
+ jnlpTemplate = substitute(jnlpTemplate, "$$useH264", useH264.toString());
jnlpTemplate = substitute(jnlpTemplate, "$$errorMessage", errorMessage);
// fix for 5039951: Add $$hostname macro
jnlpTemplate = substitute(jnlpTemplate, "$$hostname", request.getServerName());
diff --git a/bbb-screenshare/app/src/main/java/org/bigbluebutton/app/screenshare/IScreenShareApplication.java b/bbb-screenshare/app/src/main/java/org/bigbluebutton/app/screenshare/IScreenShareApplication.java
index 173c391121..a99e0e9aaf 100755
--- a/bbb-screenshare/app/src/main/java/org/bigbluebutton/app/screenshare/IScreenShareApplication.java
+++ b/bbb-screenshare/app/src/main/java/org/bigbluebutton/app/screenshare/IScreenShareApplication.java
@@ -11,7 +11,7 @@ public interface IScreenShareApplication {
Boolean recordStream(String meetingId, String streamId);
void isScreenSharing(String meetingId, String userId);
- void requestShareToken(String meetingId, String userId, Boolean record);
+ void requestShareToken(String meetingId, String userId, Boolean record, Boolean tunnel);
void startShareRequest(String meetingId, String userId, String session);
void pauseShareRequest(String meetingId, String userId, String streamId);
void restartShareRequest(String meetingId, String userId);
diff --git a/bbb-screenshare/app/src/main/java/org/bigbluebutton/app/screenshare/ScreenShareInfo.java b/bbb-screenshare/app/src/main/java/org/bigbluebutton/app/screenshare/ScreenShareInfo.java
index 1a4581329e..0f1a4c7b4d 100755
--- a/bbb-screenshare/app/src/main/java/org/bigbluebutton/app/screenshare/ScreenShareInfo.java
+++ b/bbb-screenshare/app/src/main/java/org/bigbluebutton/app/screenshare/ScreenShareInfo.java
@@ -5,10 +5,12 @@ public class ScreenShareInfo {
public final String session;
public final String streamId;
public final String publishUrl;
+ public final Boolean tunnel;
- public ScreenShareInfo(String session, String publishUrl, String streamId) {
+ public ScreenShareInfo(String session, String publishUrl, String streamId, Boolean tunnel) {
this.session = session;
this.streamId = streamId;
this.publishUrl = publishUrl;
+ this.tunnel = tunnel;
}
}
diff --git a/bbb-screenshare/app/src/main/java/org/bigbluebutton/app/screenshare/red5/Red5AppHandler.java b/bbb-screenshare/app/src/main/java/org/bigbluebutton/app/screenshare/red5/Red5AppHandler.java
index 012e4ff317..7595990e4a 100755
--- a/bbb-screenshare/app/src/main/java/org/bigbluebutton/app/screenshare/red5/Red5AppHandler.java
+++ b/bbb-screenshare/app/src/main/java/org/bigbluebutton/app/screenshare/red5/Red5AppHandler.java
@@ -34,8 +34,8 @@ public class Red5AppHandler {
app.isScreenSharing(meetingId, userId);
}
- public void requestShareToken(String meetingId, String userId, Boolean record) {
- app.requestShareToken(meetingId, userId, record);
+ public void requestShareToken(String meetingId, String userId, Boolean record, Boolean tunnel) {
+ app.requestShareToken(meetingId, userId, record, tunnel);
}
public void startShareRequest(String meetingId, String userId, String session) {
diff --git a/bbb-screenshare/app/src/main/java/org/bigbluebutton/app/screenshare/red5/Red5AppService.java b/bbb-screenshare/app/src/main/java/org/bigbluebutton/app/screenshare/red5/Red5AppService.java
index b869b89a9c..240b8ceb67 100755
--- a/bbb-screenshare/app/src/main/java/org/bigbluebutton/app/screenshare/red5/Red5AppService.java
+++ b/bbb-screenshare/app/src/main/java/org/bigbluebutton/app/screenshare/red5/Red5AppService.java
@@ -133,12 +133,13 @@ public class Red5AppService {
Boolean record = (Boolean) msg.get("record");
String meetingId = Red5.getConnectionLocal().getScope().getName();
String userId = (String) Red5.getConnectionLocal().getAttribute("USERID");
+ Boolean tunnel = (Boolean) msg.get("tunnel");
if (log.isDebugEnabled()) {
log.debug("Received startShareRequest for meetingId=" + meetingId + " from user=" + userId);
}
- handler.requestShareToken(meetingId, userId, record);
+ handler.requestShareToken(meetingId, userId, record, tunnel);
}
public void stopShareRequest(Map msg) {
diff --git a/bbb-screenshare/app/src/main/java/org/bigbluebutton/app/screenshare/server/servlet/JnlpConfigurator.java b/bbb-screenshare/app/src/main/java/org/bigbluebutton/app/screenshare/server/servlet/JnlpConfigurator.java
index 755ba59cdc..3d6e119a65 100755
--- a/bbb-screenshare/app/src/main/java/org/bigbluebutton/app/screenshare/server/servlet/JnlpConfigurator.java
+++ b/bbb-screenshare/app/src/main/java/org/bigbluebutton/app/screenshare/server/servlet/JnlpConfigurator.java
@@ -10,6 +10,7 @@ public class JnlpConfigurator {
private IScreenShareApplication screenShareApplication;
private String streamBaseUrl;
private String codecOptions;
+ private boolean useH264 = false;
public String getJnlpUrl() {
@@ -35,6 +36,14 @@ public class JnlpConfigurator {
public String getCodecOptions() {
return codecOptions;
}
+
+ public void setUseH264(boolean h264) {
+ useH264 = h264;
+ }
+
+ public boolean isUseH264() {
+ return useH264;
+ }
public ScreenShareInfo getScreenShareInfo(String meetingId, String token) {
ScreenShareInfoResponse resp = screenShareApplication.getScreenShareInfo(meetingId, token);
diff --git a/bbb-screenshare/app/src/main/scala/org/bigbluebutton/app/screenshare/ScreenShareApplication.scala b/bbb-screenshare/app/src/main/scala/org/bigbluebutton/app/screenshare/ScreenShareApplication.scala
index 3b434aa14f..bb88deddd8 100755
--- a/bbb-screenshare/app/src/main/scala/org/bigbluebutton/app/screenshare/ScreenShareApplication.scala
+++ b/bbb-screenshare/app/src/main/scala/org/bigbluebutton/app/screenshare/ScreenShareApplication.scala
@@ -98,7 +98,7 @@ class ScreenShareApplication(val bus: IEventsMessageBus, val jnlpFile: String,
val reply = Await.result(future, timeout.duration).asInstanceOf[ScreenShareInfoRequestReply]
val publishUrl = streamBaseUrl + "/" + meetingId
- val info = new ScreenShareInfo(reply.session, publishUrl, reply.streamId)
+ val info = new ScreenShareInfo(reply.session, publishUrl, reply.streamId, reply.tunnel)
new ScreenShareInfoResponse(info, null)
} catch {
case e: TimeoutException =>
@@ -157,12 +157,12 @@ class ScreenShareApplication(val bus: IEventsMessageBus, val jnlpFile: String,
}
- def requestShareToken(meetingId: String, userId: String, record: java.lang.Boolean) {
+ def requestShareToken(meetingId: String, userId: String, record: java.lang.Boolean, tunnel: java.lang.Boolean) {
if (logger.isDebugEnabled()) {
logger.debug("Received request share token on meeting=" + meetingId + "for user=" + userId + "]")
}
- screenShareManager ! RequestShareTokenMessage(meetingId, userId, jnlpFile, record)
+ screenShareManager ! RequestShareTokenMessage(meetingId, userId, jnlpFile, record, tunnel)
}
def startShareRequest(meetingId: String, userId: String, session: String) {
diff --git a/bbb-screenshare/app/src/main/scala/org/bigbluebutton/app/screenshare/server/sessions/ActiveSession.scala b/bbb-screenshare/app/src/main/scala/org/bigbluebutton/app/screenshare/server/sessions/ActiveSession.scala
index cc2be29d4e..3790a60d92 100755
--- a/bbb-screenshare/app/src/main/scala/org/bigbluebutton/app/screenshare/server/sessions/ActiveSession.scala
+++ b/bbb-screenshare/app/src/main/scala/org/bigbluebutton/app/screenshare/server/sessions/ActiveSession.scala
@@ -6,12 +6,12 @@ import org.bigbluebutton.app.screenshare.events.IEventsMessageBus
object ActiveSession {
def apply(parent: Screenshare, bus: IEventsMessageBus, meetingId: String, streamId: String,
- token: String, recorded: Boolean, userId: String)(implicit context: ActorContext) =
- new ActiveSession(parent, bus, meetingId, streamId, token, recorded, userId)(context)
+ token: String, recorded: Boolean, userId: String, tunnel: Boolean)(implicit context: ActorContext) =
+ new ActiveSession(parent, bus, meetingId, streamId, token, recorded, userId, tunnel)(context)
}
class ActiveSession(parent: Screenshare, bus: IEventsMessageBus, val meetingId: String,
val streamId: String, val token: String, val recorded: Boolean,
- val userId: String)(implicit val context: ActorContext) {
+ val userId: String, val tunnel: Boolean)(implicit val context: ActorContext) {
// val actorRef = context.actorOf(Session.props(parent, bus, meetingId, streamId, token, recorded, userId))
}
diff --git a/bbb-screenshare/app/src/main/scala/org/bigbluebutton/app/screenshare/server/sessions/Screenshare.scala b/bbb-screenshare/app/src/main/scala/org/bigbluebutton/app/screenshare/server/sessions/Screenshare.scala
index 121d102e54..eb4d692509 100755
--- a/bbb-screenshare/app/src/main/scala/org/bigbluebutton/app/screenshare/server/sessions/Screenshare.scala
+++ b/bbb-screenshare/app/src/main/scala/org/bigbluebutton/app/screenshare/server/sessions/Screenshare.scala
@@ -143,6 +143,9 @@ class Screenshare(val sessionManager: ScreenshareManager,
private val PRESENTER_AUTO_RECONNECTED_REASON = "PRESENTER_AUTO_RECONNECTED_REASON"
private val JWS_START_FAILED_REASON = "JWS_START_FAILED_REASON"
+ // RTMP or RTMPT
+ private var tunnel: Boolean = false;
+
val sessionAudit = context.actorOf(ScreenShareAuditInternal.props(meetingId))
def receive = {
@@ -283,7 +286,7 @@ class Screenshare(val sessionManager: ScreenshareManager,
sss <- screenShareSession
} yield {
if (as.token == msg.token) {
- sender ! new ScreenShareInfoRequestReply(msg.meetingId, as.streamId, sss)
+ sender ! new ScreenShareInfoRequestReply(msg.meetingId, as.streamId, sss, as.tunnel)
}
}
@@ -446,7 +449,7 @@ class Screenshare(val sessionManager: ScreenshareManager,
val token = streamId
val userId = trimUserId(msg.userId).getOrElse(msg.userId)
- val session = ActiveSession(this, bus, meetingId, streamId, token, record, userId)
+ val session = ActiveSession(this, bus, meetingId, streamId, token, record, userId, tunnel)
activeSession = Some(session)
sessionStartedTimestamp = TimeUtil.currentMonoTimeInSeconds()
status = START
@@ -474,7 +477,8 @@ class Screenshare(val sessionManager: ScreenshareManager,
val userId = trimUserId(msg.userId).getOrElse(msg.userId)
- val session = ActiveSession(this, bus, meetingId, streamId, token, msg.record, userId)
+ tunnel = msg.tunnel
+ val session = ActiveSession(this, bus, meetingId, streamId, token, msg.record, userId, tunnel)
activeSession = Some(session)
currentPresenterId = Some(msg.userId)
diff --git a/bbb-screenshare/app/src/main/scala/org/bigbluebutton/app/screenshare/server/sessions/messages/IMessage.scala b/bbb-screenshare/app/src/main/scala/org/bigbluebutton/app/screenshare/server/sessions/messages/IMessage.scala
index f776c048f5..9819d80723 100755
--- a/bbb-screenshare/app/src/main/scala/org/bigbluebutton/app/screenshare/server/sessions/messages/IMessage.scala
+++ b/bbb-screenshare/app/src/main/scala/org/bigbluebutton/app/screenshare/server/sessions/messages/IMessage.scala
@@ -1,6 +1,6 @@
package org.bigbluebutton.app.screenshare.server.sessions.messages
-case class RequestShareTokenMessage(meetingId: String, userId: String, jnlp: String, record: Boolean)
+case class RequestShareTokenMessage(meetingId: String, userId: String, jnlp: String, record: Boolean, tunnel: Boolean)
case class StartShareRequestMessage(meetingId: String, userId: String, session: String)
@@ -37,7 +37,7 @@ case class IsScreenSharingReply(sharing: Boolean, streamId: String,
case class ScreenShareInfoRequest(meetingId: String, token: String)
-case class ScreenShareInfoRequestReply(meetingId: String, streamId: String, session: String)
+case class ScreenShareInfoRequestReply(meetingId: String, streamId: String, session: String, tunnel: Boolean)
case class UserDisconnected(meetingId: String, userId: String)
diff --git a/bbb-screenshare/app/src/main/webapp/WEB-INF/red5-web.xml b/bbb-screenshare/app/src/main/webapp/WEB-INF/red5-web.xml
index 0e6048703c..1773918626 100755
--- a/bbb-screenshare/app/src/main/webapp/WEB-INF/red5-web.xml
+++ b/bbb-screenshare/app/src/main/webapp/WEB-INF/red5-web.xml
@@ -83,6 +83,7 @@ with BigBlueButton; if not, see .
+
diff --git a/bbb-screenshare/app/src/main/webapp/WEB-INF/screenshare.properties b/bbb-screenshare/app/src/main/webapp/WEB-INF/screenshare.properties
index 68844814d8..3a2c18f6ad 100755
--- a/bbb-screenshare/app/src/main/webapp/WEB-INF/screenshare.properties
+++ b/bbb-screenshare/app/src/main/webapp/WEB-INF/screenshare.properties
@@ -18,6 +18,7 @@ redis.port=6379
streamBaseUrl=rtmp://192.168.23.53/screenshare
jnlpUrl=http://192.168.23.53/screenshare
jnlpFile=http://192.168.23.53/screenshare/screenshare.jnlp
+useH264=false
# NOTES:
# 1. GOP (group of pictures) is calculated as frameRate * keyFrameInterval
diff --git a/bbb-screenshare/jws/native-libs/ffmpeg-linux-x86/svc2/build.gradle b/bbb-screenshare/jws/native-libs/ffmpeg-linux-x86/svc2/build.gradle
new file mode 100755
index 0000000000..7e20f10a8c
--- /dev/null
+++ b/bbb-screenshare/jws/native-libs/ffmpeg-linux-x86/svc2/build.gradle
@@ -0,0 +1,10 @@
+apply plugin: 'java'
+apply plugin: 'eclipse'
+
+sourceCompatibility=1.6
+targetCompatibility=1.6
+
+version = '0.0.1'
+archivesBaseName = 'ffmpeg-linux-x86'
+
+
diff --git a/bbb-screenshare/jws/native-libs/ffmpeg-linux-x86/svc2/build.xml b/bbb-screenshare/jws/native-libs/ffmpeg-linux-x86/svc2/build.xml
new file mode 100755
index 0000000000..3aa62722a7
--- /dev/null
+++ b/bbb-screenshare/jws/native-libs/ffmpeg-linux-x86/svc2/build.xml
@@ -0,0 +1,38 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/bbb-screenshare/jws/native-libs/ffmpeg-linux-x86/svc2/ffmpeg-3.0.2-1.2-linux-x86.jar b/bbb-screenshare/jws/native-libs/ffmpeg-linux-x86/svc2/ffmpeg-3.0.2-1.2-linux-x86.jar
new file mode 100755
index 0000000000..c59c9814bd
Binary files /dev/null and b/bbb-screenshare/jws/native-libs/ffmpeg-linux-x86/svc2/ffmpeg-3.0.2-1.2-linux-x86.jar differ
diff --git a/bbb-screenshare/jws/native-libs/ffmpeg-linux-x86/svc2/sign-jar.sh b/bbb-screenshare/jws/native-libs/ffmpeg-linux-x86/svc2/sign-jar.sh
new file mode 100755
index 0000000000..11d22ee19b
--- /dev/null
+++ b/bbb-screenshare/jws/native-libs/ffmpeg-linux-x86/svc2/sign-jar.sh
@@ -0,0 +1,18 @@
+FFMPEG=ffmpeg-3.0.2-1.2-linux-x86.jar
+mkdir workdir
+cp $FFMPEG workdir/ffmpeg-linux-x86.jar
+rm -rf src
+mkdir -p src/main/resources
+mkdir -p src/main/java
+cd workdir
+jar xvf ffmpeg-linux-x86.jar
+cp org/bytedeco/javacpp/linux-x86/*.so* ../src/main/resources
+cd ..
+gradle jar
+cp build/libs/ffmpeg-linux-x86-0.0.1.jar ../../unsigned-jars/ffmpeg-linux-x86-svc2-unsigned.jar
+ant sign-jar
+cp build/libs/ffmpeg-linux-x86-0.0.1.jar ../../../../app/jws/lib/ffmpeg-linux-x86-svc2.jar
+rm -rf workdir
+rm -rf src
+
+
diff --git a/bbb-screenshare/jws/native-libs/ffmpeg-linux-x86_64/svc2/build.gradle b/bbb-screenshare/jws/native-libs/ffmpeg-linux-x86_64/svc2/build.gradle
new file mode 100755
index 0000000000..6cc065a7df
--- /dev/null
+++ b/bbb-screenshare/jws/native-libs/ffmpeg-linux-x86_64/svc2/build.gradle
@@ -0,0 +1,10 @@
+apply plugin: 'java'
+apply plugin: 'eclipse'
+
+sourceCompatibility=1.6
+targetCompatibility=1.6
+
+version = '0.0.1'
+archivesBaseName = 'ffmpeg-linux-x86_64'
+
+
diff --git a/bbb-screenshare/jws/native-libs/ffmpeg-linux-x86_64/svc2/build.xml b/bbb-screenshare/jws/native-libs/ffmpeg-linux-x86_64/svc2/build.xml
new file mode 100755
index 0000000000..ac9a22aaef
--- /dev/null
+++ b/bbb-screenshare/jws/native-libs/ffmpeg-linux-x86_64/svc2/build.xml
@@ -0,0 +1,38 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/bbb-screenshare/jws/native-libs/ffmpeg-linux-x86_64/svc2/ffmpeg-3.0.2-1.2-linux-x86_64.jar b/bbb-screenshare/jws/native-libs/ffmpeg-linux-x86_64/svc2/ffmpeg-3.0.2-1.2-linux-x86_64.jar
new file mode 100755
index 0000000000..6f3ade7193
Binary files /dev/null and b/bbb-screenshare/jws/native-libs/ffmpeg-linux-x86_64/svc2/ffmpeg-3.0.2-1.2-linux-x86_64.jar differ
diff --git a/bbb-screenshare/jws/native-libs/ffmpeg-linux-x86_64/svc2/sign-jar.sh b/bbb-screenshare/jws/native-libs/ffmpeg-linux-x86_64/svc2/sign-jar.sh
new file mode 100755
index 0000000000..cd5e6490dc
--- /dev/null
+++ b/bbb-screenshare/jws/native-libs/ffmpeg-linux-x86_64/svc2/sign-jar.sh
@@ -0,0 +1,17 @@
+FFMPEG=ffmpeg-3.0.2-1.2-linux-x86_64.jar
+mkdir workdir
+cp $FFMPEG workdir/ffmpeg-linux-x86_64.jar
+rm -rf src
+mkdir -p src/main/resources
+mkdir -p src/main/java
+cd workdir
+jar xvf ffmpeg-linux-x86_64.jar
+cp org/bytedeco/javacpp/linux-x86_64/*.so* ../src/main/resources
+cd ..
+gradle jar
+cp build/libs/ffmpeg-linux-x86_64-0.0.1.jar ../../unsigned-jars/ffmpeg-linux-x86_64-svc2-unsigned.jar
+ant sign-jar
+cp build/libs/ffmpeg-linux-x86_64-0.0.1.jar ../../../../app/jws/lib/ffmpeg-linux-x86_64-svc2.jar
+rm -rf workdir
+rm -rf src
+
diff --git a/bbb-screenshare/jws/native-libs/ffmpeg-windows-x86/svc2/api/build.xml b/bbb-screenshare/jws/native-libs/ffmpeg-windows-x86/svc2/api/build.xml
new file mode 100755
index 0000000000..449e42c0c1
--- /dev/null
+++ b/bbb-screenshare/jws/native-libs/ffmpeg-windows-x86/svc2/api/build.xml
@@ -0,0 +1,53 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/bbb-screenshare/jws/native-libs/ffmpeg-windows-x86/svc2/api/ffmpeg-3.0.2-1.2-svc2.jar b/bbb-screenshare/jws/native-libs/ffmpeg-windows-x86/svc2/api/ffmpeg-3.0.2-1.2-svc2.jar
new file mode 100755
index 0000000000..a1b10cabad
Binary files /dev/null and b/bbb-screenshare/jws/native-libs/ffmpeg-windows-x86/svc2/api/ffmpeg-3.0.2-1.2-svc2.jar differ
diff --git a/bbb-screenshare/jws/native-libs/ffmpeg-windows-x86/svc2/api/sign-ffmpeg-svc2.sh b/bbb-screenshare/jws/native-libs/ffmpeg-windows-x86/svc2/api/sign-ffmpeg-svc2.sh
new file mode 100755
index 0000000000..c7dbc57dd6
--- /dev/null
+++ b/bbb-screenshare/jws/native-libs/ffmpeg-windows-x86/svc2/api/sign-ffmpeg-svc2.sh
@@ -0,0 +1,16 @@
+FFMPEG=ffmpeg-3.0.2-1.2-svc2.jar
+if [ -d "workdir" ]; then
+ rm -rf workdir
+fi
+mkdir workdir
+cp $FFMPEG workdir
+cd workdir
+jar xf $FFMPEG
+rm $FFMPEG
+rm -rf META-INF
+jar cf ffmpeg.jar *
+cd ..
+ant sign-ffmpeg-jar
+cp workdir/ffmpeg.jar ../../../../../app/jws/lib/ffmpeg-win-x86-svc2.jar
+rm -rf workdir
+
diff --git a/bbb-screenshare/jws/native-libs/ffmpeg-windows-x86/svc2/native/build.gradle b/bbb-screenshare/jws/native-libs/ffmpeg-windows-x86/svc2/native/build.gradle
new file mode 100755
index 0000000000..3ab1f6fe39
--- /dev/null
+++ b/bbb-screenshare/jws/native-libs/ffmpeg-windows-x86/svc2/native/build.gradle
@@ -0,0 +1,10 @@
+apply plugin: 'java'
+apply plugin: 'eclipse'
+
+sourceCompatibility=1.6
+targetCompatibility=1.6
+
+version = '0.0.1'
+archivesBaseName = 'ffmpeg-windows-x86'
+
+
diff --git a/bbb-screenshare/jws/native-libs/ffmpeg-windows-x86/svc2/native/build.xml b/bbb-screenshare/jws/native-libs/ffmpeg-windows-x86/svc2/native/build.xml
new file mode 100755
index 0000000000..54ca846d98
--- /dev/null
+++ b/bbb-screenshare/jws/native-libs/ffmpeg-windows-x86/svc2/native/build.xml
@@ -0,0 +1,38 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/bbb-screenshare/jws/native-libs/ffmpeg-windows-x86/svc2/native/ffmpeg-3.0.2-1.2-windows-x86.jar b/bbb-screenshare/jws/native-libs/ffmpeg-windows-x86/svc2/native/ffmpeg-3.0.2-1.2-windows-x86.jar
new file mode 100755
index 0000000000..2eb41a3209
Binary files /dev/null and b/bbb-screenshare/jws/native-libs/ffmpeg-windows-x86/svc2/native/ffmpeg-3.0.2-1.2-windows-x86.jar differ
diff --git a/bbb-screenshare/jws/native-libs/ffmpeg-windows-x86/svc2/native/sign-jar.sh b/bbb-screenshare/jws/native-libs/ffmpeg-windows-x86/svc2/native/sign-jar.sh
new file mode 100755
index 0000000000..9e0f77ac24
--- /dev/null
+++ b/bbb-screenshare/jws/native-libs/ffmpeg-windows-x86/svc2/native/sign-jar.sh
@@ -0,0 +1,17 @@
+FFMPEG=ffmpeg-3.0.2-1.2-windows-x86.jar
+mkdir workdir
+cp $FFMPEG workdir/ffmpeg-windows-x86.jar
+rm -rf src
+mkdir -p src/main/resources
+mkdir -p src/main/java
+cd workdir
+jar xvf ffmpeg-windows-x86.jar
+cp org/bytedeco/javacpp/windows-x86/*.dll ../src/main/resources
+cd ..
+rm -rf workdir
+gradle jar
+cp build/libs/ffmpeg-windows-x86-0.0.1.jar ../../../unsigned-jars/ffmpeg-win-x86-native-svc2-unsigned.jar
+ant sign-jar
+cp build/libs/ffmpeg-windows-x86-0.0.1.jar ../../../../../app/jws/lib/ffmpeg-win-x86-native-svc2.jar
+rm -rf src
+
diff --git a/bbb-screenshare/jws/native-libs/ffmpeg-windows-x86_64/ffmpeg-3.0.2-1.2-windows-x86_64.jar b/bbb-screenshare/jws/native-libs/ffmpeg-windows-x86_64/ffmpeg-3.0.2-1.2-windows-x86_64.jar
index f20a5031ec..84439d3356 100755
Binary files a/bbb-screenshare/jws/native-libs/ffmpeg-windows-x86_64/ffmpeg-3.0.2-1.2-windows-x86_64.jar and b/bbb-screenshare/jws/native-libs/ffmpeg-windows-x86_64/ffmpeg-3.0.2-1.2-windows-x86_64.jar differ
diff --git a/bbb-screenshare/jws/native-libs/ffmpeg-windows-x86_64/sign-jar.sh b/bbb-screenshare/jws/native-libs/ffmpeg-windows-x86_64/sign-jar.sh
index ac1216e767..7dce386a5d 100755
--- a/bbb-screenshare/jws/native-libs/ffmpeg-windows-x86_64/sign-jar.sh
+++ b/bbb-screenshare/jws/native-libs/ffmpeg-windows-x86_64/sign-jar.sh
@@ -10,8 +10,8 @@ cp org/bytedeco/javacpp/windows-x86_64/*.dll ../src/main/resources
cd ..
rm -rf workdir
gradle jar
-cp build/libs/ffmpeg-windows-x86_64-0.0.1.jar ../unsigned-jars/ffmpeg-windows-x86_64-unsigned.jar
+cp build/libs/ffmpeg-windows-x86_64-0.0.1.jar ../unsigned-jars/ffmpeg-win-x86_64-svc2--unsigned.jar
ant sign-jar
-cp build/libs/ffmpeg-windows-x86_64-0.0.1.jar ../../../app/jws/lib/ffmpeg-windows-x86_64.jar
+cp build/libs/ffmpeg-windows-x86_64-0.0.1.jar ../../../app/jws/lib/ffmpeg-win-x86_64-svc2.jar
rm -rf src
diff --git a/bbb-screenshare/jws/native-libs/ffmpeg-windows-x86_64/svc2/api/build.xml b/bbb-screenshare/jws/native-libs/ffmpeg-windows-x86_64/svc2/api/build.xml
new file mode 100755
index 0000000000..449e42c0c1
--- /dev/null
+++ b/bbb-screenshare/jws/native-libs/ffmpeg-windows-x86_64/svc2/api/build.xml
@@ -0,0 +1,53 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/bbb-screenshare/jws/native-libs/ffmpeg-windows-x86_64/svc2/api/ffmpeg-3.0.2-1.2-svc2.jar b/bbb-screenshare/jws/native-libs/ffmpeg-windows-x86_64/svc2/api/ffmpeg-3.0.2-1.2-svc2.jar
new file mode 100755
index 0000000000..9ef2ae2262
Binary files /dev/null and b/bbb-screenshare/jws/native-libs/ffmpeg-windows-x86_64/svc2/api/ffmpeg-3.0.2-1.2-svc2.jar differ
diff --git a/bbb-screenshare/jws/native-libs/ffmpeg-windows-x86_64/svc2/api/sign-ffmpeg-svc2.sh b/bbb-screenshare/jws/native-libs/ffmpeg-windows-x86_64/svc2/api/sign-ffmpeg-svc2.sh
new file mode 100755
index 0000000000..7d69a02f14
--- /dev/null
+++ b/bbb-screenshare/jws/native-libs/ffmpeg-windows-x86_64/svc2/api/sign-ffmpeg-svc2.sh
@@ -0,0 +1,16 @@
+FFMPEG=ffmpeg-3.0.2-1.2-svc2.jar
+if [ -d "workdir" ]; then
+ rm -rf workdir
+fi
+mkdir workdir
+cp $FFMPEG workdir
+cd workdir
+jar xf $FFMPEG
+rm $FFMPEG
+rm -rf META-INF
+jar cf ffmpeg.jar *
+cd ..
+ant sign-ffmpeg-jar
+cp workdir/ffmpeg.jar ../../../../../app/jws/lib/ffmpeg-win-x86_64-svc2.jar
+rm -rf workdir
+
diff --git a/bbb-screenshare/jws/native-libs/ffmpeg-windows-x86_64/svc2/dll/build.gradle b/bbb-screenshare/jws/native-libs/ffmpeg-windows-x86_64/svc2/dll/build.gradle
new file mode 100755
index 0000000000..1d9791a055
--- /dev/null
+++ b/bbb-screenshare/jws/native-libs/ffmpeg-windows-x86_64/svc2/dll/build.gradle
@@ -0,0 +1,10 @@
+apply plugin: 'java'
+apply plugin: 'eclipse'
+
+sourceCompatibility=1.6
+targetCompatibility=1.6
+
+version = '0.0.1'
+archivesBaseName = 'ffmpeg-windows-x86_64'
+
+
diff --git a/bbb-screenshare/jws/native-libs/ffmpeg-windows-x86_64/svc2/dll/build.xml b/bbb-screenshare/jws/native-libs/ffmpeg-windows-x86_64/svc2/dll/build.xml
new file mode 100755
index 0000000000..769a2130bd
--- /dev/null
+++ b/bbb-screenshare/jws/native-libs/ffmpeg-windows-x86_64/svc2/dll/build.xml
@@ -0,0 +1,38 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/bbb-screenshare/jws/native-libs/ffmpeg-windows-x86_64/svc2/dll/ffmpeg-3.0.2-1.2-windows-x86_64.jar b/bbb-screenshare/jws/native-libs/ffmpeg-windows-x86_64/svc2/dll/ffmpeg-3.0.2-1.2-windows-x86_64.jar
new file mode 100755
index 0000000000..ec52a38f10
Binary files /dev/null and b/bbb-screenshare/jws/native-libs/ffmpeg-windows-x86_64/svc2/dll/ffmpeg-3.0.2-1.2-windows-x86_64.jar differ
diff --git a/bbb-screenshare/jws/native-libs/ffmpeg-windows-x86_64/svc2/dll/sign-jar.sh b/bbb-screenshare/jws/native-libs/ffmpeg-windows-x86_64/svc2/dll/sign-jar.sh
new file mode 100755
index 0000000000..b9ab51caf4
--- /dev/null
+++ b/bbb-screenshare/jws/native-libs/ffmpeg-windows-x86_64/svc2/dll/sign-jar.sh
@@ -0,0 +1,17 @@
+FFMPEG=ffmpeg-3.0.2-1.2-windows-x86_64.jar
+mkdir workdir
+cp $FFMPEG workdir/ffmpeg-windows-x86_64.jar
+rm -rf src
+mkdir -p src/main/resources
+mkdir -p src/main/java
+cd workdir
+jar xvf ffmpeg-windows-x86_64.jar
+cp org/bytedeco/javacpp/windows-x86_64/*.dll ../src/main/resources
+cd ..
+rm -rf workdir
+gradle jar
+cp build/libs/ffmpeg-windows-x86_64-0.0.1.jar ../../../unsigned-jars/ffmpeg-win-x86_64-native-svc2-unsigned.jar
+ant sign-jar
+cp build/libs/ffmpeg-windows-x86_64-0.0.1.jar ../../../../../app/jws/lib/ffmpeg-win-x86_64-native-svc2.jar
+rm -rf src
+
diff --git a/bbb-screenshare/jws/native-libs/ffmpeg-windows-x86_64/svc2/ffmpeg-3.0.2-1.2.jar b/bbb-screenshare/jws/native-libs/ffmpeg-windows-x86_64/svc2/ffmpeg-3.0.2-1.2.jar
new file mode 100755
index 0000000000..efcc7bdaeb
Binary files /dev/null and b/bbb-screenshare/jws/native-libs/ffmpeg-windows-x86_64/svc2/ffmpeg-3.0.2-1.2.jar differ
diff --git a/bbb-screenshare/jws/native-libs/unsigned-jars/ffmpeg-3.0.2-1.2-svc2.jar b/bbb-screenshare/jws/native-libs/unsigned-jars/ffmpeg-3.0.2-1.2-svc2.jar
new file mode 100755
index 0000000000..9ef2ae2262
Binary files /dev/null and b/bbb-screenshare/jws/native-libs/unsigned-jars/ffmpeg-3.0.2-1.2-svc2.jar differ
diff --git a/bbb-screenshare/jws/native-libs/unsigned-jars/ffmpeg-3.0.2-1.2.jar b/bbb-screenshare/jws/native-libs/unsigned-jars/ffmpeg-3.0.2-1.2.jar
index 8552eaf4a6..efcc7bdaeb 100755
Binary files a/bbb-screenshare/jws/native-libs/unsigned-jars/ffmpeg-3.0.2-1.2.jar and b/bbb-screenshare/jws/native-libs/unsigned-jars/ffmpeg-3.0.2-1.2.jar differ
diff --git a/bbb-screenshare/jws/native-libs/unsigned-jars/ffmpeg-linux-x86-svc2-unsigned.jar b/bbb-screenshare/jws/native-libs/unsigned-jars/ffmpeg-linux-x86-svc2-unsigned.jar
new file mode 100644
index 0000000000..1cabd4229d
Binary files /dev/null and b/bbb-screenshare/jws/native-libs/unsigned-jars/ffmpeg-linux-x86-svc2-unsigned.jar differ
diff --git a/bbb-screenshare/jws/native-libs/unsigned-jars/ffmpeg-linux-x86-unsigned.jar b/bbb-screenshare/jws/native-libs/unsigned-jars/ffmpeg-linux-x86-unsigned.jar
deleted file mode 100755
index 13638d6e08..0000000000
Binary files a/bbb-screenshare/jws/native-libs/unsigned-jars/ffmpeg-linux-x86-unsigned.jar and /dev/null differ
diff --git a/bbb-screenshare/jws/native-libs/unsigned-jars/ffmpeg-linux-x86_64-svc2-unsigned.jar b/bbb-screenshare/jws/native-libs/unsigned-jars/ffmpeg-linux-x86_64-svc2-unsigned.jar
new file mode 100644
index 0000000000..4702bb25cc
Binary files /dev/null and b/bbb-screenshare/jws/native-libs/unsigned-jars/ffmpeg-linux-x86_64-svc2-unsigned.jar differ
diff --git a/bbb-screenshare/jws/native-libs/unsigned-jars/ffmpeg-linux-x86_64-unsigned.jar b/bbb-screenshare/jws/native-libs/unsigned-jars/ffmpeg-linux-x86_64-unsigned.jar
deleted file mode 100644
index d26edb544d..0000000000
Binary files a/bbb-screenshare/jws/native-libs/unsigned-jars/ffmpeg-linux-x86_64-unsigned.jar and /dev/null differ
diff --git a/bbb-screenshare/jws/native-libs/unsigned-jars/ffmpeg-macosx-x86_64-unsigned.jar b/bbb-screenshare/jws/native-libs/unsigned-jars/ffmpeg-macosx-x86_64-unsigned.jar
deleted file mode 100644
index 74f878fda7..0000000000
Binary files a/bbb-screenshare/jws/native-libs/unsigned-jars/ffmpeg-macosx-x86_64-unsigned.jar and /dev/null differ
diff --git a/bbb-screenshare/jws/native-libs/unsigned-jars/ffmpeg-win-x86-native-svc2-unsigned.jar b/bbb-screenshare/jws/native-libs/unsigned-jars/ffmpeg-win-x86-native-svc2-unsigned.jar
new file mode 100644
index 0000000000..5d0d435411
Binary files /dev/null and b/bbb-screenshare/jws/native-libs/unsigned-jars/ffmpeg-win-x86-native-svc2-unsigned.jar differ
diff --git a/bbb-screenshare/jws/native-libs/unsigned-jars/ffmpeg-win-x86-svc2-unsigned.jar b/bbb-screenshare/jws/native-libs/unsigned-jars/ffmpeg-win-x86-svc2-unsigned.jar
new file mode 100644
index 0000000000..f759260339
Binary files /dev/null and b/bbb-screenshare/jws/native-libs/unsigned-jars/ffmpeg-win-x86-svc2-unsigned.jar differ
diff --git a/bbb-screenshare/jws/native-libs/unsigned-jars/ffmpeg-win-x86_64-native-svc2-unsigned.jar b/bbb-screenshare/jws/native-libs/unsigned-jars/ffmpeg-win-x86_64-native-svc2-unsigned.jar
new file mode 100644
index 0000000000..c15535c7cb
Binary files /dev/null and b/bbb-screenshare/jws/native-libs/unsigned-jars/ffmpeg-win-x86_64-native-svc2-unsigned.jar differ
diff --git a/bbb-screenshare/jws/native-libs/unsigned-jars/ffmpeg-win-x86_64-svc2-unsigned.jar b/bbb-screenshare/jws/native-libs/unsigned-jars/ffmpeg-win-x86_64-svc2-unsigned.jar
new file mode 100644
index 0000000000..7ace3ca93e
Binary files /dev/null and b/bbb-screenshare/jws/native-libs/unsigned-jars/ffmpeg-win-x86_64-svc2-unsigned.jar differ
diff --git a/bbb-screenshare/jws/native-libs/unsigned-jars/ffmpeg-windows-x86-unsigned.jar b/bbb-screenshare/jws/native-libs/unsigned-jars/ffmpeg-windows-x86-unsigned.jar
deleted file mode 100644
index 19cfc70697..0000000000
Binary files a/bbb-screenshare/jws/native-libs/unsigned-jars/ffmpeg-windows-x86-unsigned.jar and /dev/null differ
diff --git a/bbb-screenshare/jws/native-libs/unsigned-jars/ffmpeg-windows-x86_64-unsigned.jar b/bbb-screenshare/jws/native-libs/unsigned-jars/ffmpeg-windows-x86_64-unsigned.jar
deleted file mode 100644
index ba86528877..0000000000
Binary files a/bbb-screenshare/jws/native-libs/unsigned-jars/ffmpeg-windows-x86_64-unsigned.jar and /dev/null differ
diff --git a/bbb-screenshare/jws/native-libs/unsigned-jars/sign-ffmpeg-svc2.sh b/bbb-screenshare/jws/native-libs/unsigned-jars/sign-ffmpeg-svc2.sh
new file mode 100755
index 0000000000..d5d8d74129
--- /dev/null
+++ b/bbb-screenshare/jws/native-libs/unsigned-jars/sign-ffmpeg-svc2.sh
@@ -0,0 +1,16 @@
+FFMPEG=ffmpeg-3.0.2-1.2-svc2.jar
+if [ -d "workdir" ]; then
+ rm -rf workdir
+fi
+mkdir workdir
+cp $FFMPEG workdir
+cd workdir
+jar xf $FFMPEG
+rm $FFMPEG
+rm -rf META-INF
+jar cf ffmpeg.jar *
+cd ..
+ant sign-ffmpeg-jar
+cp workdir/ffmpeg.jar ../../../app/jws/lib/ffmpeg-svc2.jar
+rm -rf workdir
+
diff --git a/bbb-screenshare/jws/webstart/deploy.sh b/bbb-screenshare/jws/webstart/deploy.sh
new file mode 100755
index 0000000000..d8322cc802
--- /dev/null
+++ b/bbb-screenshare/jws/webstart/deploy.sh
@@ -0,0 +1,2 @@
+cp build/libs/javacv-screenshare-0.0.1.jar /usr/share/red5/webapps/screenshare/lib
+
diff --git a/bbb-screenshare/jws/webstart/src/main/java/org/bigbluebutton/screenshare/client/DeskshareClient.java b/bbb-screenshare/jws/webstart/src/main/java/org/bigbluebutton/screenshare/client/DeskshareClient.java
index f3d0ed1a9e..a52bf10c27 100755
--- a/bbb-screenshare/jws/webstart/src/main/java/org/bigbluebutton/screenshare/client/DeskshareClient.java
+++ b/bbb-screenshare/jws/webstart/src/main/java/org/bigbluebutton/screenshare/client/DeskshareClient.java
@@ -94,13 +94,14 @@ public class DeskshareClient {
private boolean fullScreen = false;
private String URL = "rtmp://192.168.23.23/live/foo/room2";
private String session = "";
+ private Boolean useH264 = false;
public NewBuilder host(String host) {
this.host = host;
return this;
}
- public NewBuilder port(int port) {
+ public NewBuilder port(int port) {
this.port = port;
return this;
}
@@ -155,6 +156,11 @@ public class DeskshareClient {
return this;
}
+ public NewBuilder useH264(boolean useH264) {
+ this.useH264 = useH264;
+ return this;
+ }
+
public NewBuilder x(int x) {
this.x = x;
return this;
@@ -219,6 +225,7 @@ public class DeskshareClient {
ssi.sysTrayIcon = sysTrayIcon;
ssi.enableTrayActions = enableTrayActions;
ssi.session = session;
+ ssi.useH264 = useH264;
System.out.println("ScreenShareInfo[captureWidth=" + captureWidth + ",captureHeight=" + captureHeight + "][" + x + "," + y +"]"
+ "[scaleWidth=" + scaleWidth + ",scaleHeight=" + scaleHeight + "]");
diff --git a/bbb-screenshare/jws/webstart/src/main/java/org/bigbluebutton/screenshare/client/DeskshareMain.java b/bbb-screenshare/jws/webstart/src/main/java/org/bigbluebutton/screenshare/client/DeskshareMain.java
index 676cbad50d..ee67adb58a 100755
--- a/bbb-screenshare/jws/webstart/src/main/java/org/bigbluebutton/screenshare/client/DeskshareMain.java
+++ b/bbb-screenshare/jws/webstart/src/main/java/org/bigbluebutton/screenshare/client/DeskshareMain.java
@@ -106,21 +106,25 @@ public class DeskshareMain implements ClientListener, LifeLineListener {
Boolean captureFullScreen = false;
String session = null;
String codecOptions = null;
-
- if(args != null && args.length == 8) {
+ boolean useH264 = true;
+
+ if(args != null && args.length == 9) {
System.out.println("Using passed args: length=[" + args.length + "]");
url = args[0];
serverUrl = args[1];
meetingId = args[2];
streamId = args[3];
captureFullScreen = Boolean.parseBoolean(args[4]);
+ useH264 = false;
System.out.println("Using passed args: [" + url + "] meetingId=[" + meetingId + "] streamId=[" + streamId + "] captureFullScreen=" + captureFullScreen);
codecOptions = args[5];
session = args[6];
- String errorMessage = args[7];
+ useH264 = Boolean.parseBoolean(args[7]);
+
+ String errorMessage = args[8];
if (! errorMessage.equalsIgnoreCase("NO_ERRORS")) {
dsMain.displayJavaWarning(errorMessage);
@@ -147,7 +151,8 @@ public class DeskshareMain implements ClientListener, LifeLineListener {
.captureHeight(cHeightValue).scaleWidth(sWidthValue).scaleHeight(sHeightValue)
.quality(true).autoScale(0).codecOptions(codecOptions)
.x(xValue).y(yValue).fullScreen(captureFullScreen).withURL(url)
- .httpTunnel(tunnelValue).trayIcon(image).enableTrayIconActions(true).build();
+ .httpTunnel(tunnelValue).trayIcon(image).enableTrayIconActions(true)
+ .useH264(useH264).build();
client.addClientListener(dsMain);
client.start();
@@ -218,7 +223,7 @@ public class DeskshareMain implements ClientListener, LifeLineListener {
try {
System.out.println("Trigger stop client. " + exitReasonQ.remainingCapacity());
exitReasonQ.put(reason);
- System.out.println("Triggered stop client.");
+ System.out.println("Triggered stop client. reason=" + reason.getExitCode());
} catch (InterruptedException e) {
// TODO Auto-generated catch block
e.printStackTrace();
diff --git a/bbb-screenshare/jws/webstart/src/main/java/org/bigbluebutton/screenshare/client/ScreenRegionSharer.java b/bbb-screenshare/jws/webstart/src/main/java/org/bigbluebutton/screenshare/client/ScreenRegionSharer.java
index 4fdea997d3..d726575eee 100755
--- a/bbb-screenshare/jws/webstart/src/main/java/org/bigbluebutton/screenshare/client/ScreenRegionSharer.java
+++ b/bbb-screenshare/jws/webstart/src/main/java/org/bigbluebutton/screenshare/client/ScreenRegionSharer.java
@@ -114,14 +114,14 @@ public class ScreenRegionSharer implements ScreenSharer, NetworkConnectionListen
public void networkConnectionException(ExitCode reason, String streamId) {
if (listener != null) {
if (reason.getExitCode() == ExitCode.PAUSED.getExitCode()) {
- //System.out.println(NAME + "Pausing. Reason=" + reason.getExitCode());
+ System.out.println(NAME + "Pausing. Reason=" + reason.getExitCode());
pause();
} else if (reason.getExitCode() == ExitCode.START.getExitCode()) {
this.streamId = streamId;
- //System.out.println(NAME + "starting. StreamId=" + this.streamId + " fullScreen=" + fullScreen);
+ System.out.println(NAME + "starting. StreamId=" + this.streamId + " fullScreen=" + fullScreen);
start();
} else {
- //System.out.println(NAME + "Closing. Reason=" + reason.getExitCode());
+ System.out.println(NAME + "Closing. Reason=" + reason.getExitCode());
listener.onClientStop(reason);
}
}
diff --git a/bbb-screenshare/jws/webstart/src/main/java/org/bigbluebutton/screenshare/client/ScreenShareInfo.java b/bbb-screenshare/jws/webstart/src/main/java/org/bigbluebutton/screenshare/client/ScreenShareInfo.java
index 33a9d9bf74..79c99ea914 100755
--- a/bbb-screenshare/jws/webstart/src/main/java/org/bigbluebutton/screenshare/client/ScreenShareInfo.java
+++ b/bbb-screenshare/jws/webstart/src/main/java/org/bigbluebutton/screenshare/client/ScreenShareInfo.java
@@ -40,4 +40,5 @@ public class ScreenShareInfo {
public boolean enableTrayActions;
public String URL;
public String session;
+ public boolean useH264;
}
diff --git a/bbb-screenshare/jws/webstart/src/main/java/org/bigbluebutton/screenshare/client/ScreenSharerRunner.java b/bbb-screenshare/jws/webstart/src/main/java/org/bigbluebutton/screenshare/client/ScreenSharerRunner.java
index 8e76fc8d28..33eba24f14 100755
--- a/bbb-screenshare/jws/webstart/src/main/java/org/bigbluebutton/screenshare/client/ScreenSharerRunner.java
+++ b/bbb-screenshare/jws/webstart/src/main/java/org/bigbluebutton/screenshare/client/ScreenSharerRunner.java
@@ -39,8 +39,8 @@ public class ScreenSharerRunner {
this.ssi = ssi;
this.listener = listener;
-// System.out.println("ScreenSharerRunner[captureWidth=" + ssi.captureWidth + ",captureHeight=" + ssi.captureHeight + "][" + ssi.x + "," + ssi.y +"]"
-// + "[scaleWidth=" + ssi.scaleWidth + ",scaleHeight=" + ssi.scaleHeight + "]");
+ System.out.println("ScreenSharerRunner[captureWidth=" + ssi.captureWidth + ",captureHeight=" + ssi.captureHeight + "][" + ssi.x + "," + ssi.y +"]"
+ + "[scaleWidth=" + ssi.scaleWidth + ",scaleHeight=" + ssi.scaleHeight + "]");
jcs = new FfmpegScreenshare(ssi, listener);
}
@@ -76,12 +76,12 @@ public class ScreenSharerRunner {
}
public void disconnectSharing(){
- //System.out.println(NAME + "Disconnected");
+ System.out.println(NAME + "Disconnected");
jcs.stop();
}
public void stopSharing() {
- //System.out.println(NAME + "Stopping");
+ System.out.println(NAME + "Stopping");
jcs.stop();
}
diff --git a/bbb-screenshare/jws/webstart/src/main/java/org/bigbluebutton/screenshare/client/javacv/FfmpegScreenshare.java b/bbb-screenshare/jws/webstart/src/main/java/org/bigbluebutton/screenshare/client/javacv/FfmpegScreenshare.java
index 6827ddcf8a..b98c0403e9 100755
--- a/bbb-screenshare/jws/webstart/src/main/java/org/bigbluebutton/screenshare/client/javacv/FfmpegScreenshare.java
+++ b/bbb-screenshare/jws/webstart/src/main/java/org/bigbluebutton/screenshare/client/javacv/FfmpegScreenshare.java
@@ -77,6 +77,8 @@ public class FfmpegScreenshare {
System.out.println("Platform : " + Loader.getPlatform());
System.out.println("Platform lib path: " + System.getProperty("java.library.path"));
System.out.println("Capturing w=[" + width + "] h=[" + height + "] at x=[" + x + "] y=[" + y + "]");
+ System.out.println("URL=" + ssi.URL);
+ System.out.println("useH264=" + ssi.useH264);
Map codecOptions = splitToMap(ssi.codecOptions, "&", "=");
Double frameRate = parseFrameRate(codecOptions.get(FRAMERATE_KEY));
@@ -85,13 +87,14 @@ public class FfmpegScreenshare {
String osName = System.getProperty("os.name").toLowerCase();
if (platform.startsWith("windows")) {
grabber = setupWindowsGrabber(width, height, x, y);
- mainRecorder = setupWindowsRecorder(URL, width, height, codecOptions);
+ mainRecorder = setupWindowsRecorder(URL, width, height, codecOptions, ssi.useH264);
} else if (platform.startsWith("linux")) {
grabber = setupLinuxGrabber(width, height, x, y);
- mainRecorder = setupLinuxRecorder(URL, width, height, codecOptions);
+ mainRecorder = setupLinuxRecorder(URL, width, height, codecOptions, ssi.useH264);
} else if (platform.startsWith("macosx-x86_64")) {
grabber = setupMacOsXGrabber(width, height, x, y);
- mainRecorder = setupMacOsXRecorder(URL, width, height, codecOptions);
+
+ mainRecorder = setupMacOsXRecorder(URL, width, height, codecOptions, ssi.useH264);
}
grabber.setFrameRate(frameRate);
@@ -99,6 +102,7 @@ public class FfmpegScreenshare {
ignoreDisconnect = false;
grabber.start();
} catch (Exception e) {
+ System.out.println("Exception starting grabber.");
listener.networkConnectionException(ExitCode.INTERNAL_ERROR, null);
}
@@ -109,6 +113,7 @@ public class FfmpegScreenshare {
try {
mainRecorder.start();
} catch (Exception e) {
+ System.out.println("Exception starting recorder. \n" + e.toString());
listener.networkConnectionException(ExitCode.INTERNAL_ERROR, null);
}
}
@@ -153,13 +158,14 @@ public class FfmpegScreenshare {
//System.out.println("frame timestamp=[" + frame.timestamp + "] ");
mainRecorder.record(frame);
} catch (Exception e) {
- //System.out.println("CaptureScreen Exception 1");
+ System.out.println("CaptureScreen Exception 1");
if (!ignoreDisconnect) {
listener.networkConnectionException(ExitCode.INTERNAL_ERROR, null);
}
}
}
} catch (Exception e1) {
+ System.out.println("Exception grabbing image");
listener.networkConnectionException(ExitCode.INTERNAL_ERROR, null);
}
@@ -168,7 +174,7 @@ public class FfmpegScreenshare {
//System.out.println("timestamp=[" + timestamp + "]");
mainRecorder.setFrameNumber(frameNumber);
-// System.out.println("[ENCODER] encoded image " + frameNumber + " in " + (System.currentTimeMillis() - now));
+ //System.out.println("[ENCODER] encoded image " + frameNumber + " in " + (System.currentTimeMillis() - now));
frameNumber++;
long execDuration = (System.currentTimeMillis() - now);
@@ -181,6 +187,7 @@ public class FfmpegScreenshare {
try{
Thread.sleep(dur);
} catch (Exception e){
+ System.out.println("Exception pausing screen share.");
listener.networkConnectionException(ExitCode.INTERNAL_ERROR, null);
}
}
@@ -192,28 +199,29 @@ public class FfmpegScreenshare {
while (startBroadcast){
captureScreen();
}
- //System.out.println("*******************Stopped screen capture. !!!!!!!!!!!!!!!!!!!");
+ System.out.println("*******************Stopped screen capture. !!!!!!!!!!!!!!!!!!!");
}
};
startBroadcastExec.execute(startBroadcastRunner);
}
public void stop() {
- //System.out.println("Stopping screen capture.");
+ System.out.println("Stopping screen capture.");
startBroadcast = false;
if (mainRecorder != null) {
try {
ignoreDisconnect = true;
- //System.out.println("mainRecorder.stop.");
+ System.out.println("mainRecorder.stop.");
mainRecorder.stop();
- //System.out.println("mainRecorder.release.");
+ System.out.println("mainRecorder.release.");
mainRecorder.release();
- //System.out.println("grabber.stop.");
+ System.out.println("grabber.stop.");
// Do not invoke grabber.stop as it exits the JWS app.
// Not sure why. (ralam - aug 10, 2016)
//grabber.stop();
//System.out.println("End stop sequence.");
} catch (Exception e) {
+ System.out.println("Exception stopping screen share.");
listener.networkConnectionException(ExitCode.INTERNAL_ERROR, null);
}
}
@@ -263,7 +271,9 @@ public class FfmpegScreenshare {
//==============================================
// RECORDERS
//==============================================
-private FFmpegFrameRecorder setupWindowsRecorder(String url, int width, int height, Map codecOptions) {
+private FFmpegFrameRecorder setupWindowsRecorder(String url, int width, int height,
+ Map codecOptions,
+ Boolean useH264) {
FFmpegFrameRecorder winRecorder = new FFmpegFrameRecorder(url, grabber.getImageWidth(), grabber.getImageHeight());
Double frameRate = parseFrameRate(codecOptions.get(FRAMERATE_KEY));
winRecorder.setFrameRate(frameRate);
@@ -285,19 +295,30 @@ private FFmpegFrameRecorder setupWindowsRecorder(String url, int width, int hei
System.out.println("==== END CODEC OPTIONS =====");
winRecorder.setFormat("flv");
-
- // H264
- winRecorder.setVideoCodec(AV_CODEC_ID_H264);
- winRecorder.setPixelFormat(AV_PIX_FMT_YUV420P);
- winRecorder.setVideoOption("crf", "38");
- winRecorder.setVideoOption("preset", "veryfast");
- winRecorder.setVideoOption("tune", "zerolatency");
- winRecorder.setVideoOption("intra-refresh", "1");
+
+ if (useH264) {
+ System.out.println("Using H264 codec");
+ // H264
+ winRecorder.setVideoCodec(AV_CODEC_ID_H264);
+ winRecorder.setPixelFormat(AV_PIX_FMT_YUV420P);
+ winRecorder.setVideoOption("crf", "38");
+ winRecorder.setVideoOption("preset", "veryfast");
+ winRecorder.setVideoOption("tune", "zerolatency");
+ winRecorder.setVideoOption("intra-refresh", "1");
+ } else {
+ System.out.println("Using SVC2 codec");
+ // Flash SVC2
+ winRecorder.setVideoCodec(AV_CODEC_ID_FLASHSV2);
+ winRecorder.setPixelFormat(AV_PIX_FMT_BGR24);
+ }
+
return winRecorder;
}
-private FFmpegFrameRecorder setupLinuxRecorder(String url, int width, int height, Map codecOptions) {
+private FFmpegFrameRecorder setupLinuxRecorder(String url, int width, int height,
+ Map codecOptions,
+ Boolean useH264) {
FFmpegFrameRecorder linuxRecorder = new FFmpegFrameRecorder(url, grabber.getImageWidth(), grabber.getImageHeight());
Double frameRate = parseFrameRate(codecOptions.get(FRAMERATE_KEY));
linuxRecorder.setFrameRate(frameRate);
@@ -319,19 +340,29 @@ private FFmpegFrameRecorder setupLinuxRecorder(String url, int width, int heigh
System.out.println("==== END CODEC OPTIONS =====");
linuxRecorder.setFormat("flv");
+
+ if (useH264) {
+ // H264
+ linuxRecorder.setVideoCodec(AV_CODEC_ID_H264);
+ linuxRecorder.setPixelFormat(AV_PIX_FMT_YUV420P);
+ linuxRecorder.setVideoOption("crf", "38");
+ linuxRecorder.setVideoOption("preset", "veryfast");
+ linuxRecorder.setVideoOption("tune", "zerolatency");
+ linuxRecorder.setVideoOption("intra-refresh", "1");
+ } else {
+ // Flash SVC2
+ linuxRecorder.setVideoCodec(AV_CODEC_ID_FLASHSV2);
+ linuxRecorder.setPixelFormat(AV_PIX_FMT_BGR24);
+ }
- // H264
- linuxRecorder.setVideoCodec(AV_CODEC_ID_H264);
- linuxRecorder.setPixelFormat(AV_PIX_FMT_YUV420P);
- linuxRecorder.setVideoOption("crf", "38");
- linuxRecorder.setVideoOption("preset", "veryfast");
- linuxRecorder.setVideoOption("tune", "zerolatency");
- linuxRecorder.setVideoOption("intra-refresh", "1");
+
return linuxRecorder;
}
-private FFmpegFrameRecorder setupMacOsXRecorder(String url, int width, int height, Map codecOptions) {
+private FFmpegFrameRecorder setupMacOsXRecorder(String url, int width, int height,
+ Map codecOptions,
+ Boolean useH264) {
FFmpegFrameRecorder macRecorder = new FFmpegFrameRecorder(url, grabber.getImageWidth(), grabber.getImageHeight());
Double frameRate = parseFrameRate(codecOptions.get(FRAMERATE_KEY));
macRecorder.setFrameRate(frameRate);
@@ -353,15 +384,23 @@ private FFmpegFrameRecorder setupMacOsXRecorder(String url, int width, int heig
System.out.println("==== END CODEC OPTIONS =====");
macRecorder.setFormat("flv");
-
- // H264
- macRecorder.setVideoCodec(AV_CODEC_ID_H264);
- macRecorder.setPixelFormat(AV_PIX_FMT_YUV420P);
- macRecorder.setVideoOption("crf", "34");
- macRecorder.setVideoOption("preset", "veryfast");
+
+ if (useH264) {
+ // H264
+ macRecorder.setVideoCodec(AV_CODEC_ID_H264);
+ macRecorder.setPixelFormat(AV_PIX_FMT_YUV420P);
+ macRecorder.setVideoOption("crf", "34");
+ macRecorder.setVideoOption("preset", "veryfast");
+
+ // Mac doesn't support the options below.
// macRecorder.setVideoOption("tune", "zerolatency");
-// macRecorder.setVideoOption("intra-refresh", "1");
-
+// macRecorder.setVideoOption("intra-refresh", "1");
+ } else {
+ // Flash SVC2
+ macRecorder.setVideoCodec(AV_CODEC_ID_FLASHSV2);
+ macRecorder.setPixelFormat(AV_PIX_FMT_BGR24);
+ }
+
return macRecorder;
}
diff --git a/bigbluebutton-client/src/org/bigbluebutton/modules/screenshare/services/MessageSender.as b/bigbluebutton-client/src/org/bigbluebutton/modules/screenshare/services/MessageSender.as
index f0c2e0b8b3..398da418b9 100755
--- a/bigbluebutton-client/src/org/bigbluebutton/modules/screenshare/services/MessageSender.as
+++ b/bigbluebutton-client/src/org/bigbluebutton/modules/screenshare/services/MessageSender.as
@@ -34,8 +34,8 @@ package org.bigbluebutton.modules.screenshare.services
conn.isScreenSharing(meetingId);
}
- public function requestShareToken(meetingId: String, userId: String, record: Boolean):void {
- conn.requestShareToken(meetingId, userId, record);
+ public function requestShareToken(meetingId: String, userId: String, record: Boolean, tunnel: Boolean):void {
+ conn.requestShareToken(meetingId, userId, record, tunnel);
}
public function startShareRequest(meetingId: String, userId: String, session: String):void {
diff --git a/bigbluebutton-client/src/org/bigbluebutton/modules/screenshare/services/ScreenshareService.as b/bigbluebutton-client/src/org/bigbluebutton/modules/screenshare/services/ScreenshareService.as
index c0ecd75aa6..185bd9240c 100755
--- a/bigbluebutton-client/src/org/bigbluebutton/modules/screenshare/services/ScreenshareService.as
+++ b/bigbluebutton-client/src/org/bigbluebutton/modules/screenshare/services/ScreenshareService.as
@@ -24,6 +24,7 @@ package org.bigbluebutton.modules.screenshare.services {
import org.as3commons.logging.api.getClassLogger;
import org.bigbluebutton.core.UsersUtil;
import org.bigbluebutton.modules.screenshare.services.red5.Connection;
+ import org.bigbluebutton.core.BBB;
/**
* The DeskShareProxy communicates with the Red5 deskShare server application
@@ -81,7 +82,8 @@ package org.bigbluebutton.modules.screenshare.services {
}
public function requestShareToken():void {
- sender.requestShareToken(UsersUtil.getInternalMeetingID(), UsersUtil.getMyUserID(), UsersUtil.isRecorded());
+ sender.requestShareToken(UsersUtil.getInternalMeetingID(), UsersUtil.getMyUserID(), UsersUtil.isRecorded(),
+ BBB.initConnectionManager().isTunnelling);
}
public function sharingStartMessage(session: String):void {
diff --git a/bigbluebutton-client/src/org/bigbluebutton/modules/screenshare/services/red5/Connection.as b/bigbluebutton-client/src/org/bigbluebutton/modules/screenshare/services/red5/Connection.as
index daf6627886..334c07114b 100755
--- a/bigbluebutton-client/src/org/bigbluebutton/modules/screenshare/services/red5/Connection.as
+++ b/bigbluebutton-client/src/org/bigbluebutton/modules/screenshare/services/red5/Connection.as
@@ -163,11 +163,12 @@ package org.bigbluebutton.modules.screenshare.services.red5 {
}, message);
}
- public function requestShareToken(meetingId:String, userId:String, record:Boolean):void {
+ public function requestShareToken(meetingId:String, userId:String, record:Boolean, tunnel: Boolean):void {
var message:Object = new Object();
message["meetingId"] = meetingId;
message["userId"] = userId;
message["record"] = record;
+ message["tunnel"] = tunnel;
sendMessage("screenshare.requestShareToken", function(result:String):void { // On successful result
LOGGER.debug(result);