Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion client/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<parent>
<groupId>org.red5</groupId>
<artifactId>red5-parent</artifactId>
<version>2.0.17</version>
<version>2.0.18</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>red5-client</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion client/src/main/java/org/red5/client/Red5Client.java
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ public final class Red5Client {
/**
* Current server version with revision
*/
public static final String VERSION = "Red5 Client 2.0.17";
public static final String VERSION = "Red5 Client 2.0.18";

/**
* Create a new Red5Client object using the connection local to the current thread A bit of magic that lets you access the red5 scope
Expand Down
4 changes: 2 additions & 2 deletions common/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<parent>
<groupId>org.red5</groupId>
<artifactId>red5-parent</artifactId>
<version>2.0.17</version>
<version>2.0.18</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>red5-server-common</artifactId>
Expand Down Expand Up @@ -105,7 +105,7 @@
<dependency>
<groupId>net.engio</groupId>
<artifactId>mbassador</artifactId>
<version>2.0.17</version>
<version>2.0.18</version>
</dependency> -->
<dependency>
<groupId>junit</groupId>
Expand Down
4 changes: 2 additions & 2 deletions common/src/main/java/org/red5/server/api/Red5.java
Original file line number Diff line number Diff line change
Expand Up @@ -57,12 +57,12 @@ public final class Red5 {
/**
* Server version with revision
*/
public static final String VERSION = "Red5 Server 2.0.17";
public static final String VERSION = "Red5 Server 2.0.18";

/**
* Server version for fmsVer requests
*/
public static final String FMS_VERSION = "RED5/2,0,17,0";
public static final String FMS_VERSION = "RED5/2,0,18,0";

/**
* Server capabilities
Expand Down
2 changes: 1 addition & 1 deletion io/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<parent>
<groupId>org.red5</groupId>
<artifactId>red5-parent</artifactId>
<version>2.0.17</version>
<version>2.0.18</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>red5-io</artifactId>
Expand Down
2 changes: 0 additions & 2 deletions io/src/main/java/org/red5/codec/HEVCVideo.java
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@
import java.util.concurrent.CopyOnWriteArrayList;

import org.apache.mina.core.buffer.IoBuffer;
import org.red5.io.IoConstants;
import org.red5.util.ByteNibbler;

/**
* Red5 video codec for the HEVC (h265) video format. Stores DecoderConfigurationRecord and last keyframe.
Expand Down
10 changes: 5 additions & 5 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
<name>Red5</name>
<description>The Red5 server</description>
<groupId>org.red5</groupId>
<version>2.0.17</version>
<version>2.0.18</version>
<url>https://github.com/Red5/red5-server</url>
<inceptionYear>2005</inceptionYear>
<organization>
Expand Down Expand Up @@ -100,18 +100,18 @@
<red5-server-common.version>${project.version}</red5-server-common.version>
<red5-service.version>${project.version}</red5-service.version>
<slf4j.version>2.0.17</slf4j.version>
<logback.version>1.5.6</logback.version>
<logback.version>1.5.18</logback.version>
<bc.version>1.79</bc.version>
<mina.version>2.0.23</mina.version>
<spring.version>6.2.7</spring.version>
<tomcat.version>11.0.7</tomcat.version>
<junit.version>[4.13.1,)</junit.version>
<isoparser.version>1.9.59</isoparser.version>
<ehcache.version>2.10.6</ehcache.version>
<commons-beanutils.version>1.10.0</commons-beanutils.version>
<commons-codec.version>1.17.2</commons-codec.version>
<commons-beanutils.version>1.10.1</commons-beanutils.version>
<commons-codec.version>1.18.0</commons-codec.version>
<commons-collections.version>4.4</commons-collections.version>
<commons-io.version>2.18.0</commons-io.version>
<commons-io.version>2.19.0</commons-io.version>
<commons-lang3.version>3.17.0</commons-lang3.version>
<httpcore.version>[4.4.11,)</httpcore.version>
<httpclient.version>[4.5.13,)</httpclient.version>
Expand Down
2 changes: 1 addition & 1 deletion server/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<parent>
<groupId>org.red5</groupId>
<artifactId>red5-parent</artifactId>
<version>2.0.17</version>
<version>2.0.18</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>red5-server</artifactId>
Expand Down
35 changes: 23 additions & 12 deletions server/src/main/java/org/red5/server/tomcat/TomcatLoader.java
Original file line number Diff line number Diff line change
Expand Up @@ -180,26 +180,42 @@ public boolean accept(File dir, String name) {
/**
* Flag to indicate if we should await plugin loading
*/
protected boolean awaitPlugins = true;

private static ExecutorService executor;
protected boolean awaitPlugins;

/**
* War deployer
*/
private WarDeployer deployer;

{
// allow setting to true if we're running in Red5 Pro
if (!awaitPlugins) {
try {
awaitPlugins = Class.forName("com.red5pro.plugin.Red5ProPlugin") != null;
log.debug("Red5ProPlugin found, awaiting plugins");
} catch (ClassNotFoundException e) {
log.debug("Red5ProPlugin not found, not awaiting plugins");
}
}
}

// TODO(paul) decouple this from Spring init bean use start method
@Override
public void afterPropertiesSet() throws Exception {
// if we are not awaiting plugins, start immediately
if (awaitPlugins) {
log.info("Awaiting plugin loading");
executor = Executors.newSingleThreadExecutor();
executor.submit(() -> {
final String oldName = Thread.currentThread().getName();
Executors.newVirtualThreadPerTaskExecutor().submit(() -> {
Thread.currentThread().setName("TomcatLoader-delayed-start");
try {
while (!Red5.isPluginsReady()) {
// wait for plugins to load but only up to 60 seconds
long startTime = System.currentTimeMillis();
while (System.currentTimeMillis() - startTime < 60000L) {
// check if plugins are ready
if (Red5.isPluginsReady()) {
log.info("Plugins are ready");
break;
}
log.trace("Waiting for plugins to load");
Thread.sleep(2000L);
}
Expand All @@ -208,8 +224,6 @@ public void afterPropertiesSet() throws Exception {
log.error("Error starting Tomcat", e);
} catch (InterruptedException e) {
log.error("Error waiting for plugins", e);
} finally {
Thread.currentThread().setName(oldName);
}
});
} else {
Expand Down Expand Up @@ -940,9 +954,6 @@ public void destroy() throws Exception {
deployer.stop();
deployer = null;
}
if (executor != null) {
executor.shutdown();
}
// run through the applications and ensure that spring is told to commence shutdown / disposal
AbstractApplicationContext absCtx = (AbstractApplicationContext) LoaderBase.getApplicationContext();
if (absCtx != null) {
Expand Down
2 changes: 2 additions & 0 deletions server/src/main/server/conf/jee-container.xml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@
<property name="secureEnabled" value="${secure.enabled}" />
<property name="websocketEnabled" value="${websocket.enabled}" />
<property name="webappFolder" value="${red5.root}/webapps" />
<!-- Allows a wait period to allow plugins to start before starting Tomcat -->
<property name="awaitPlugins" value="${await.plugins}" />
<property name="connectors">
<list>
<bean name="httpConnector" class="org.red5.server.tomcat.TomcatConnector">
Expand Down
1 change: 1 addition & 0 deletions server/src/main/server/conf/red5.properties
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ http.acceptor_thread_count=100
http.processor_cache=200
secure.enabled=false
websocket.enabled=true
await.plugins=false

# RTMP
rtmp.host=0.0.0.0
Expand Down
2 changes: 1 addition & 1 deletion server/src/main/server/red5.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ fi
if [ -f "${JAVA_HOME}/bin/java" ]; then
JAVA_HOME=${JAVA_HOME}
else
echo "Please set JAVA_HOME in your current path. Preferably use JDK 11."
echo "Please set JAVA_HOME in your current path. Preferably use JDK 21 or newer."
fi

P=":" # The default classpath separator
Expand Down
4 changes: 2 additions & 2 deletions service/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<parent>
<groupId>org.red5</groupId>
<artifactId>red5-parent</artifactId>
<version>2.0.17</version>
<version>2.0.18</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>red5-service</artifactId>
Expand All @@ -12,7 +12,7 @@
<packaging>jar</packaging>
<properties>
<maven.test.skip>true</maven.test.skip>
<commons-daemon.version>1.2.4</commons-daemon.version>
<commons-daemon.version>1.4.1</commons-daemon.version>
</properties>
<build>
<defaultGoal>install</defaultGoal>
Expand Down
4 changes: 2 additions & 2 deletions service/src/main/daemon/install-service.bat
Original file line number Diff line number Diff line change
Expand Up @@ -88,9 +88,9 @@ echo Installing '%SERVICE_NAME%' service
--StopClass org.red5.daemon.EngineLauncher ^
--StopMethod windowsService ^
--StopParams 9999 ^
--JvmOptions "-Xverify:none;-XX:+TieredCompilation;-XX:+UseBiasedLocking;-XX:+UseStringCache;-XX:+UseParNewGC;-XX:InitialCodeCacheSize=8m;-XX:ReservedCodeCacheSize=32m;-Dorg.terracotta.quartz.skipUpdateCheck=true;-Dlogback.ContextSelector=org.red5.logging.LoggingContextSelector;-Dcatalina.home=%RED5_HOME%;-Dcatalina.useNaming=true;-Djava.security.debug=failure;" ^
--JvmOptions "-Xverify:none;-XX:+TieredCompilation;-XX:+UseBiasedLocking;-XX:+UseStringCache;-XX:+ZGC;-XX:InitialCodeCacheSize=8m;-XX:ReservedCodeCacheSize=32m;-Dorg.terracotta.quartz.skipUpdateCheck=true;-Dlogback.ContextSelector=org.red5.logging.LoggingContextSelector;-Dcatalina.home=%RED5_HOME%;-Dcatalina.useNaming=true;-Djava.security.debug=failure;" ^
--JvmMs 256 ^
--JvmMx 768
--JvmMx 1024
if not errorlevel 1 goto installed
echo Failed installing '%SERVICE_NAME%' service
goto end
Expand Down
2 changes: 1 addition & 1 deletion service/src/main/daemon/red5
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ echo "Path $FILE_PATH";
JAVA_HOME="/usr/lib/jvm/default-java"

# Our classpath including our jar file and the Apache Commons Daemon library
CLASS_PATH="$FILE_PATH/commons-daemon-1.0.15.jar:$FILE_PATH/red5-service.jar:$FILE_PATH/conf"
CLASS_PATH="$FILE_PATH/commons-daemon-1.4.1.jar:$FILE_PATH/red5-service.jar:$FILE_PATH/conf"

# The fully qualified name of the class to execute
CLASS="org.red5.daemon.EngineLauncher"
Expand Down
2 changes: 1 addition & 1 deletion servlet/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<parent>
<groupId>org.red5</groupId>
<artifactId>red5-parent</artifactId>
<version>2.0.17</version>
<version>2.0.18</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>red5-servlet</artifactId>
Expand Down