Skip to content

Commit 8731a43

Browse files
committed
Merge branch 'bbb-red5-r4592'
2 parents 091ba72 + 897cc08 commit 8731a43

File tree

26 files changed

+479
-533
lines changed

26 files changed

+479
-533
lines changed

bbb-video/build.gradle

Lines changed: 24 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -70,28 +70,35 @@ dependencies {
7070
providedCompile 'javax.servlet:servlet-api:2.5@jar'
7171

7272
// Mina
73-
providedCompile 'mina:mina-core:2.0.4@jar'
74-
providedCompile 'mina:mina-integration-beans:2.0.4@jar'
75-
providedCompile 'mina:mina-integration-jmx:2.0.4@jar'
73+
providedCompile 'org.apache.mina:mina-core:2.0.7@jar'
74+
providedCompile 'org.apache.mina:mina-integration-beans:2.0.7@jar'
75+
providedCompile 'org.apache.mina:mina-integration-jmx:2.0.7@jar'
7676

7777
// Spring
78-
providedCompile 'org.springframework:spring-web:3.0.6.RELEASE@jar'
79-
providedCompile 'org.springframework:spring-beans:3.0.6.RELEASE@jar'
80-
providedCompile 'org.springframework:spring-context:3.0.6.RELEASE@jar'
81-
providedCompile 'org.springframework:spring-core:3.0.6.RELEASE@jar'
82-
78+
providedCompile 'org.springframework:spring-web:3.1.1.RELEASE@jar'
79+
providedCompile 'org.springframework:spring-beans:3.1.1.RELEASE@jar'
80+
providedCompile 'org.springframework:spring-context:3.1.1.RELEASE@jar'
81+
providedCompile 'org.springframework:spring-core:3.1.1.RELEASE@jar'
82+
8383
// Red5
84-
providedCompile 'org/red5:red5:1.0r4415@jar'
84+
providedCompile 'org/red5:red5:1.0r4592@jar'
8585

8686
// Logging
87-
providedCompile 'org.slf4j:com.springsource.slf4j.api:1.6.1@jar'
88-
providedCompile 'org.slf4j:com.springsource.slf4j.bridge:1.6.1@jar'
89-
providedCompile ':logback-core:0.9.28@jar'
90-
providedCompile ':logback-classic:0.9.28@jar'
91-
providedCompile ':log4j-over-slf4j:1.6.1@jar'
92-
providedCompile ':jcl-over-slf4j:1.6.1@jar'
93-
providedCompile ':jul-to-slf4j:1.6.1@jar'
94-
87+
providedCompile 'ch.qos.logback:logback-core:1.0.9@jar'
88+
providedCompile 'ch.qos.logback:logback-classic:1.0.9@jar'
89+
providedCompile 'org.slf4j:log4j-over-slf4j:1.7.2@jar'
90+
providedCompile 'org.slf4j:jcl-over-slf4j:1.7.2@jar'
91+
providedCompile 'org.slf4j:jul-to-slf4j:1.7.2@jar'
92+
providedCompile 'org.slf4j:slf4j-api:1.7.2@jar'
93+
94+
// Needed for the JVM shutdown hook but needs to be put into red5/lib dir.
95+
// Otherwise we get exception on aop utils class not found.
96+
providedCompile 'org.springframework:spring-aop:3.0.6.RELEASE@jar'
97+
compile 'aopalliance:aopalliance:1.0@jar'
98+
99+
// Java Concurrency In Practice
100+
providedCompile 'net.jcip:jcip-annotations:1.0@jar'
101+
95102
// Testing
96103
compile 'org.testng:testng:5.8@jar'
97104
compile 'org.easymock:easymock:2.4@jar'
@@ -107,7 +114,6 @@ test {
107114

108115
war.doLast {
109116
ant.unzip(src: war.archivePath, dest: "$buildDir/video")
110-
ant.copy(file: "$buildDir/video/WEB-INF/logback-video.xml", todir: "$buildDir/video/WEB-INF/classes")
111117
}
112118

113119

bbb-voice/build.gradle

Lines changed: 29 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -70,37 +70,48 @@ dependencies {
7070
providedCompile 'javax.servlet:servlet-api:2.5@jar'
7171

7272
// Mina
73-
providedCompile 'mina:mina-core:2.0.4@jar'
74-
providedCompile 'mina:mina-integration-beans:2.0.4@jar'
75-
providedCompile 'mina:mina-integration-jmx:2.0.4@jar'
73+
providedCompile 'org.apache.mina:mina-core:2.0.7@jar'
74+
providedCompile 'org.apache.mina:mina-integration-beans:2.0.7@jar'
75+
providedCompile 'org.apache.mina:mina-integration-jmx:2.0.7@jar'
7676

7777
// Spring
78-
providedCompile 'org.springframework:spring-web:3.0.6.RELEASE@jar'
79-
providedCompile 'org.springframework:spring-beans:3.0.6.RELEASE@jar'
80-
providedCompile 'org.springframework:spring-context:3.0.6.RELEASE@jar'
81-
providedCompile 'org.springframework:spring-core:3.0.6.RELEASE@jar'
82-
78+
providedCompile 'org.springframework:spring-web:3.1.1.RELEASE@jar'
79+
providedCompile 'org.springframework:spring-beans:3.1.1.RELEASE@jar'
80+
providedCompile 'org.springframework:spring-context:3.1.1.RELEASE@jar'
81+
providedCompile 'org.springframework:spring-core:3.1.1.RELEASE@jar'
82+
8383
// Red5
84-
providedCompile 'org/red5:red5:1.0r4415@jar'
84+
providedCompile 'org/red5:red5:1.0r4592@jar'
8585

8686
// Logging
87-
providedCompile 'org.slf4j:com.springsource.slf4j.api:1.6.1@jar'
88-
providedCompile 'org.slf4j:com.springsource.slf4j.bridge:1.6.1@jar'
89-
providedCompile ':logback-core:0.9.28@jar'
90-
providedCompile ':logback-classic:0.9.28@jar'
91-
providedCompile ':log4j-over-slf4j:1.6.1@jar'
92-
providedCompile ':jcl-over-slf4j:1.6.1@jar'
93-
providedCompile ':jul-to-slf4j:1.6.1@jar'
94-
95-
compile 'javax/media:jmf:2.1.1e@jar'
87+
providedCompile 'ch.qos.logback:logback-core:1.0.9@jar'
88+
providedCompile 'ch.qos.logback:logback-classic:1.0.9@jar'
89+
providedCompile 'org.slf4j:log4j-over-slf4j:1.7.2@jar'
90+
providedCompile 'org.slf4j:jcl-over-slf4j:1.7.2@jar'
91+
providedCompile 'org.slf4j:jul-to-slf4j:1.7.2@jar'
92+
providedCompile 'org.slf4j:slf4j-api:1.7.2@jar'
93+
94+
// Needed for the JVM shutdown hook but needs to be put into red5/lib dir.
95+
// Otherwise we get exception on aop utils class not found.
96+
providedCompile 'org.springframework:spring-aop:3.0.6.RELEASE@jar'
97+
compile 'aopalliance:aopalliance:1.0@jar'
9698

99+
// Java Concurrency In Practice
100+
providedCompile 'net.jcip:jcip-annotations:1.0@jar'
101+
97102
// Testing
98103
compile 'org.testng:testng:5.8@jar'
99104
compile 'org.easymock:easymock:2.4@jar'
100105

101106
// Testing
102107
testRuntime 'org/testng:testng:5.8@jar'
103108
testRuntime 'org.easymock:easymock:2.4@jar'
109+
110+
compile 'javax/media:jmf:2.1.1e@jar'
111+
112+
113+
114+
104115
}
105116

106117
test {
@@ -109,7 +120,6 @@ test {
109120

110121
war.doLast {
111122
ant.unzip(src: war.archivePath, dest: "$buildDir/sip")
112-
ant.copy(file: "$buildDir/sip/WEB-INF/logback-sip.xml", todir: "$buildDir/sip/WEB-INF/classes")
113123
}
114124

115125

bigbluebutton-apps/build.gradle

Lines changed: 15 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -62,27 +62,26 @@ dependencies {
6262
providedCompile 'javax.servlet:servlet-api:2.5@jar'
6363

6464
// Mina
65-
providedCompile 'mina:mina-core:2.0.4@jar'
66-
providedCompile 'mina:mina-integration-beans:2.0.4@jar'
67-
providedCompile 'mina:mina-integration-jmx:2.0.4@jar'
65+
providedCompile 'org.apache.mina:mina-core:2.0.7@jar'
66+
providedCompile 'org.apache.mina:mina-integration-beans:2.0.7@jar'
67+
providedCompile 'org.apache.mina:mina-integration-jmx:2.0.7@jar'
6868

6969
// Spring
70-
providedCompile 'org.springframework:spring-web:3.0.6.RELEASE@jar'
71-
providedCompile 'org.springframework:spring-beans:3.0.6.RELEASE@jar'
72-
providedCompile 'org.springframework:spring-context:3.0.6.RELEASE@jar'
73-
providedCompile 'org.springframework:spring-core:3.0.6.RELEASE@jar'
70+
providedCompile 'org.springframework:spring-web:3.1.1.RELEASE@jar'
71+
providedCompile 'org.springframework:spring-beans:3.1.1.RELEASE@jar'
72+
providedCompile 'org.springframework:spring-context:3.1.1.RELEASE@jar'
73+
providedCompile 'org.springframework:spring-core:3.1.1.RELEASE@jar'
7474

7575
// Red5
76-
providedCompile 'org/red5:red5:1.0r4415@jar'
76+
providedCompile 'org/red5:red5:1.0r4592@jar'
7777

7878
// Logging
79-
providedCompile 'org.slf4j:com.springsource.slf4j.api:1.6.1@jar'
80-
providedCompile 'org.slf4j:com.springsource.slf4j.bridge:1.6.1@jar'
81-
providedCompile ':logback-core:0.9.28@jar'
82-
providedCompile ':logback-classic:0.9.28@jar'
83-
providedCompile ':log4j-over-slf4j:1.6.1@jar'
84-
providedCompile ':jcl-over-slf4j:1.6.1@jar'
85-
providedCompile ':jul-to-slf4j:1.6.1@jar'
79+
providedCompile 'ch.qos.logback:logback-core:1.0.9@jar'
80+
providedCompile 'ch.qos.logback:logback-classic:1.0.9@jar'
81+
providedCompile 'org.slf4j:log4j-over-slf4j:1.7.2@jar'
82+
providedCompile 'org.slf4j:jcl-over-slf4j:1.7.2@jar'
83+
providedCompile 'org.slf4j:jul-to-slf4j:1.7.2@jar'
84+
providedCompile 'org.slf4j:slf4j-api:1.7.2@jar'
8685

8786
// Needed for the JVM shutdown hook but needs to be put into red5/lib dir.
8887
// Otherwise we get exception on aop utils class not found.
@@ -111,7 +110,7 @@ dependencies {
111110
compile 'org/freeswitch:fs-esl-client:0.8.2@jar'
112111
compile 'org.jboss.netty:netty:3.2.1.Final@jar'
113112
compile 'com.google.code.gson:gson:1.7.1'
114-
providedCompile 'commons:commons-lang3:3.0-beta'
113+
providedCompile 'org.apache.commons:commons-lang3:3.1'
115114
compile 'commons-lang:commons-lang:2.5'
116115
}
117116

@@ -121,7 +120,6 @@ test {
121120

122121
war.doLast {
123122
ant.unzip(src: war.archivePath, dest: "$buildDir/$appName")
124-
ant.copy(file: "$buildDir/$appName/WEB-INF/logback-bigbluebutton.xml", todir: "$buildDir/$appName/WEB-INF/classes")
125123
}
126124

127125

bigbluebutton-apps/src/main/java/org/bigbluebutton/conference/BigBlueButtonApplication.java

Lines changed: 68 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
import org.red5.logging.Red5LoggerFactory;
2626
import org.red5.server.adapter.IApplication;
2727
import org.red5.server.adapter.MultiThreadedApplicationAdapter;
28+
import org.red5.server.api.IClient;
2829
import org.red5.server.api.IConnection;
2930
import org.red5.server.api.IContext;
3031
import org.red5.server.api.scope.IScope;
@@ -40,98 +41,132 @@ public class BigBlueButtonApplication extends MultiThreadedApplicationAdapter {
4041
private RecorderApplication recorderApplication;
4142
private AbstractApplicationContext appCtx;
4243
private ConnectionInvokerService connInvokerService;
43-
44+
45+
private static final String APP = "BBB";
46+
47+
@Override
48+
public boolean appConnect(IConnection conn, Object[] params) {
49+
log.debug("***** " + APP + " [ " + " appConnect *********");
50+
return super.appConnect(conn, params);
51+
}
52+
53+
@Override
54+
public void appDisconnect(IConnection conn) {
55+
log.debug("***** " + APP + " [ " + " appDisconnect *********");
56+
super.appDisconnect(conn);
57+
}
58+
59+
@Override
60+
public boolean appJoin(IClient client, IScope scope) {
61+
log.debug("***** " + APP + " [ " + " appJoin [ " + scope.getName() + "] *********");
62+
return super.appJoin(client, scope);
63+
}
64+
65+
@Override
66+
public void appLeave(IClient client, IScope scope) {
67+
log.debug("***** " + APP + " [ " + " appLeave [ " + scope.getName() + "] *********");
68+
super.appLeave(client, scope);
69+
}
70+
71+
@Override
72+
public boolean roomJoin(IClient client, IScope scope) {
73+
log.debug("***** " + APP + " [ " + " roomJoin [ " + scope.getName() + "] *********");
74+
return super.roomJoin(client, scope);
75+
}
76+
77+
@Override
78+
public void roomLeave(IClient client, IScope scope) {
79+
log.debug("***** " + APP + " [ " + " roomLeave [ " + scope.getName() + "] *********");
80+
super.roomLeave(client, scope);
81+
}
82+
4483
@Override
4584
public boolean appStart(IScope app) {
46-
log.debug("Starting BigBlueButton ");
85+
log.debug("***** " + APP + " [ " + " appStart [ " + scope.getName() + "] *********");
4786
IContext context = app.getContext();
4887
appCtx = (AbstractApplicationContext) context.getApplicationContext();
4988
appCtx.addApplicationListener(new ShutdownHookListener());
5089
appCtx.registerShutdownHook();
51-
return super.appStart(app);
90+
super.appStart(app);
91+
92+
connInvokerService.start();
93+
94+
return true;
5295
}
5396

5497
@Override
5598
public void appStop(IScope app) {
56-
log.debug("Stopping BigBlueButton ");
99+
log.debug("***** " + APP + " [ " + " appStop [ " + scope.getName() + "] *********");
100+
connInvokerService.stop();
57101
super.appStop(app);
58102
}
59103

60104
@Override
61105
public boolean roomStart(IScope room) {
62-
log.debug("Starting room [" + room.getName() + "].");
63-
assert participantsApplication != null;
64-
connInvokerService.addScope(room.getName(), room);
106+
log.debug("***** " + APP + " [ " + " roomStart [ " + scope.getName() + "] *********");
107+
108+
connInvokerService.addScope(room.getName(), room);
65109
return super.roomStart(room);
66110
}
67111

68112
@Override
69113
public void roomStop(IScope room) {
70-
log.debug("Stopping room [" + room.getName() + "].");
71-
super.roomStop(room);
72-
assert participantsApplication != null;
114+
log.debug("***** " + APP + " [ " + " roomStop [ " + scope.getName() + "] *********");
115+
73116
participantsApplication.destroyRoom(room.getName());
74117
BigBlueButtonSession bbbSession = getBbbSession();
75-
assert bbbSession != null;
76118

77-
/**
78-
* Need to figure out if the next 2 lines should be removed. (ralam nov 25, 2010).
79-
*/
80-
assert recorderApplication != null;
81119
recorderApplication.destroyRecordSession(bbbSession.getSessionName());
82120
connInvokerService.removeScope(room.getName());
83-
log.debug("Stopped room [" + room.getName() + "].");
121+
122+
super.roomStop(room);
84123
}
85124

86125
@Override
87126
public boolean roomConnect(IConnection connection, Object[] params) {
88-
String remoteHost = Red5.getConnectionLocal().getRemoteAddress();
89-
int remotePort = Red5.getConnectionLocal().getRemotePort();
127+
log.debug("***** " + APP + " [ " + " roomConnect [ " + connection.getScope().getName() + "] *********");
128+
90129
String username = ((String) params[0]).toString();
91130
String role = ((String) params[1]).toString();
92131
String conference = ((String)params[2]).toString();
93132

94-
/*
95-
* Convert the id to Long because it gets converted to ascii decimal
96-
* equivalent (i.e. zero (0) becomes 48) if we don't.
97-
*/
98-
long clientID = Long.parseLong(Red5.getConnectionLocal().getClient().getId());
99133
String sessionName = ((String)params[3]).toString();
100-
log.info("[clientid=" + clientID + "] connected from " + remoteHost + ":" + remotePort + ".");
101-
134+
102135
String voiceBridge = ((String) params[4]).toString();
103136
String room = sessionName;
104-
assert recorderApplication != null;
137+
105138
boolean record = (Boolean)params[5];
106-
log.debug("record value - [" + record + "]");
107-
139+
108140
String externalUserID = ((String) params[6]).toString();
109141
String internalUserID = ((String) params[7]).toString();
110142

111143
if (record == true) {
112144
recorderApplication.createRecordSession(sessionName);
113145
}
114146

115-
BigBlueButtonSession bbbSession = new BigBlueButtonSession(sessionName, clientID, internalUserID, username, role,
147+
BigBlueButtonSession bbbSession = new BigBlueButtonSession(sessionName, internalUserID, username, role,
116148
conference, room, voiceBridge, record, externalUserID);
117149
connection.setAttribute(Constants.SESSION, bbbSession);
118150

119151
String debugInfo = "internalUserID=" + internalUserID + ",username=" + username + ",role=" + role + ",conference=" + conference + "," +
120152
"session=" + sessionName + ",voiceConf=" + voiceBridge + ",room=" + room + ",externalUserid=" + externalUserID;
121153
log.debug("User [{}] connected to room [{}]", debugInfo, room);
122154
participantsApplication.createRoom(room);
123-
super.roomConnect(connection, params);
124-
155+
125156
connInvokerService.addConnection(bbbSession.getInternalUserID(), connection);
126-
return true;
157+
158+
return super.roomConnect(connection, params);
159+
127160
}
128161

129162
@Override
130163
public void roomDisconnect(IConnection conn) {
164+
log.debug("***** " + APP + " [ " + " roomDisconnect [ " + conn.getScope().getName() + "] *********");
165+
131166
String remoteHost = Red5.getConnectionLocal().getRemoteAddress();
132167
int remotePort = Red5.getConnectionLocal().getRemotePort();
133168
String clientId = Red5.getConnectionLocal().getClient().getId();
134-
log.info("[clientid=" + clientId + "] disconnnected from " + remoteHost + ":" + remotePort + ".");
169+
log.info("***** " + APP + "[clientid=" + clientId + "] disconnnected from " + remoteHost + ":" + remotePort + ".");
135170

136171
connInvokerService.removeConnection(getBbbSession().getInternalUserID());
137172

@@ -167,7 +202,6 @@ private BigBlueButtonSession getBbbSession() {
167202
}
168203

169204
public void setConnInvokerService(ConnectionInvokerService connInvokerService) {
170-
System.out.print("Setting conn invoket service!!!!");
171205
this.connInvokerService = connInvokerService;
172206
}
173207

bigbluebutton-apps/src/main/java/org/bigbluebutton/conference/BigBlueButtonSession.java

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,13 +25,12 @@ public class BigBlueButtonSession {
2525
private final String conference;
2626
private final String room;
2727
private final String internalUserID;
28-
private final long clientID;
2928
private final String sessionName;
3029
private final String voiceBridge;
3130
private final Boolean record;
3231
private final String externalUserID;
3332

34-
public BigBlueButtonSession(String sessionName, long clientID, String internalUserID, String username,
33+
public BigBlueButtonSession(String sessionName, String internalUserID, String username,
3534
String role, String conference, String room, String voiceBridge, Boolean record,
3635
String externalUserID){
3736
this.internalUserID = internalUserID;
@@ -40,7 +39,6 @@ public BigBlueButtonSession(String sessionName, long clientID, String internalUs
4039
this.role = role;
4140
this.conference = conference;
4241
this.room = room;
43-
this.clientID = clientID;
4442
this.voiceBridge = voiceBridge;
4543
this.record = record;
4644
this.externalUserID = externalUserID;

0 commit comments

Comments
 (0)