日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 编程资源 > 编程问答 >内容正文

编程问答

red5 1.0.7 集成tomcat 并且 进行整合 官方例子oflaDemo

發布時間:2023/12/20 编程问答 25 豆豆
生活随笔 收集整理的這篇文章主要介紹了 red5 1.0.7 集成tomcat 并且 进行整合 官方例子oflaDemo 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.

    • 簡介
      • eclipse 部署
      • 整合 maven 依賴關系
        • red5-server-common - pomxml
        • red5-io - pomxml
        • red5-server pomxml
        • red5-service - pomxml
      • 整合tomcat

簡介:

之所要寫,是因為網上很難找到最新的。 并且 red5-server 1.0.7 版本下的 server/war 包下完全用不了,舊的版本可以直接部署到tomcat就可以了。 但是,1.0.7 不行 日志也不行,所以特意寫寫部署的過程。

  • red5官方源碼:https://github.com/Red5
  • 整合的代碼下載:http://download.csdn.net/detail/dao2012/9555089

eclipse 部署

直接使用maven項目導入就可以了,基本上不會有什么問題。有問題的話,可能也是jdk版本的問題。可以自行更改

整合 maven 依賴關系

說明:因為有太多的包分別在各個子項目中,現在統一全部放在parent 父級中,方便我們新建red5項目的時候進行引入即可。直接上代碼(已修改好的)。

red5-server-common —-> pom.xml

<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"><parent><groupId>org.red5</groupId><artifactId>red5-parent</artifactId><version>1.0.7-RELEASE</version></parent><modelVersion>4.0.0</modelVersion><artifactId>red5-server-common</artifactId><name>Red5 :: Common server classes</name><description>Classes common for multiple red5 projects</description><packaging>jar</packaging><url>https://github.com/Red5/red5-server-common</url><organization><name>Red5</name><url>https://github.com/Red5</url></organization><licenses><license><name>Apache 2</name><url>http://www.apache.org/licenses/LICENSE-2.0.txt</url><distribution>repo</distribution><comments>A business-friendly OSS license</comments></license></licenses><mailingLists><mailingList><name>red5-interest</name><post>https://groups.google.com/forum/?fromgroups#!forum/red5interest</post></mailingList></mailingLists><issueManagement><system>github</system><url>https://github.com/Red5/red5-server-common/issues</url></issueManagement><scm><url>https://github.com/Red5/red5-server-common.git</url><connection>scm:git:git@github.com:Red5/red5-server-common.git</connection><developerConnection>scm:git:git@github.com:Red5/red5-server-common.git</developerConnection></scm><developers><developer><id>Dominick Accattato</id><email>dominick@red5.org</email></developer><developer><id>Paul Gregoire</id><email>mondain@gmail.com</email></developer><developer><id>Dan Rossi</id><email>electroteque@gmail.com</email></developer><developer><id>Tiago Jacobs</id><email>tiago.jacobs@gmail.com</email></developer></developers><repositories><repository><id>sonatype-snapshots</id><name>Sonatype Snapshots</name><url>http://oss.sonatype.org/content/repositories/snapshots</url></repository><repository><id>sonatype-releases</id><name>Sonatype Releases</name><url>http://oss.sonatype.org/content/repositories/releases</url></repository></repositories><build><defaultGoal>install</defaultGoal><resources><resource><directory>src/main/resources</directory></resource><resource><directory>src/main/java</directory><includes><include>**/*.xml</include></includes></resource></resources><testResources><testResource><directory>src/test/java</directory><excludes><exclude>**/*.java</exclude></excludes></testResource><testResource><directory>src/test/resources</directory></testResource><testResource><directory>src/test/java</directory><includes><include>**/*.xml</include><include>**/*.properties</include></includes></testResource></testResources><plugins><plugin><groupId>org.apache.felix</groupId><artifactId>maven-bundle-plugin</artifactId><extensions>true</extensions></plugin><plugin><artifactId>maven-source-plugin</artifactId></plugin><plugin><artifactId>maven-javadoc-plugin</artifactId></plugin><plugin><artifactId>maven-jar-plugin</artifactId></plugin></plugins></build><dependencyManagement><dependencies><dependency><groupId>org.red5</groupId><artifactId>red5-io</artifactId><version>${project.version}</version><exclusions><exclusion><artifactId>bcprov-jdk15on</artifactId><groupId>org.bouncycastle</groupId></exclusion><exclusion><artifactId>mina-core</artifactId><groupId>org.apache.mina</groupId></exclusion><exclusion><artifactId>mina-integration-jmx</artifactId><groupId>org.apache.mina</groupId></exclusion><exclusion><artifactId>mina-integration-beans</artifactId><groupId>org.apache.mina</groupId></exclusion><exclusion><artifactId>commons-beanutils</artifactId><groupId>commons-beanutils</groupId></exclusion><exclusion><artifactId>commons-codec</artifactId><groupId>commons-codec</groupId></exclusion><exclusion><artifactId>commons-lang3</artifactId><groupId>org.apache.commons</groupId></exclusion><exclusion><artifactId>spring-web</artifactId><groupId>org.springframework</groupId></exclusion><exclusion><artifactId>quartz</artifactId><groupId>org.quartz-scheduler</groupId></exclusion></exclusions></dependency></dependencies></dependencyManagement><dependencies><dependency><groupId>org.red5</groupId><artifactId>red5-io</artifactId></dependency><dependency><groupId>ch.qos.logback</groupId><artifactId>logback-classic</artifactId><version>${logback.version}</version></dependency></dependencies> </project>

red5-io —-> pom.xml

<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"><parent><groupId>org.red5</groupId><artifactId>red5-parent</artifactId><version>1.0.7-RELEASE</version></parent><modelVersion>4.0.0</modelVersion><artifactId>red5-io</artifactId><name>Red5 :: IO</name><description>The Red5 I/O library</description><packaging>jar</packaging><url>https://github.com/Red5/red5-io</url><organization><name>Red5</name><url>https://github.com/Red5</url></organization><licenses><license><name>Apache 2</name><url>http://www.apache.org/licenses/LICENSE-2.0.txt</url><distribution>repo</distribution><comments>A business-friendly OSS license</comments></license></licenses><mailingLists><mailingList><name>red5-interest</name><post>https://groups.google.com/forum/?fromgroups#!forum/red5interest</post></mailingList></mailingLists><issueManagement><system>github</system><url>https://github.com/Red5/red5-io/issues</url></issueManagement><scm><url>https://github.com/Red5/red5-io.git</url><connection>scm:git:git@github.com:Red5/red5-io.git</connection><developerConnection>scm:git:git@github.com:Red5/red5-io.git</developerConnection></scm><developers><developer><id>Dominick Accattato</id><email>dominick@red5.org</email></developer><developer><id>Paul Gregoire</id><email>mondain@gmail.com</email></developer><developer><id>Dan Rossi</id><email>electroteque@gmail.com</email></developer><developer><id>Tiago Jacobs</id><email>tiago.jacobs@gmail.com</email></developer></developers><build><defaultGoal>install</defaultGoal><resources><resource><directory>src/main/resources</directory></resource><resource><directory>src/main/java</directory><includes><include>**/*.xml</include></includes></resource></resources><testResources><testResource><directory>src/test/resources</directory></testResource></testResources><plugins><plugin><groupId>org.apache.felix</groupId><artifactId>maven-bundle-plugin</artifactId><extensions>true</extensions></plugin><plugin><artifactId>maven-source-plugin</artifactId></plugin><plugin><artifactId>maven-javadoc-plugin</artifactId></plugin><plugin><artifactId>maven-jar-plugin</artifactId></plugin></plugins></build><dependencies></dependencies> </project>

red5-server pom.xml

<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"><parent><groupId>org.red5</groupId><artifactId>red5-parent</artifactId><version>1.0.7-RELEASE</version></parent><modelVersion>4.0.0</modelVersion><artifactId>red5-server</artifactId><name>Red5 :: Server</name><description>The Red5 server</description><packaging>jar</packaging><url>https://github.com/Red5/red5-server</url><organization><name>Red5</name><url>https://github.com/Red5</url></organization><licenses><license><name>Apache 2</name><url>http://www.apache.org/licenses/LICENSE-2.0.txt</url><distribution>repo</distribution><comments>A business-friendly OSS license</comments></license></licenses><mailingLists><mailingList><name>red5-interest</name><post>https://groups.google.com/forum/?fromgroups#!forum/red5interest</post></mailingList></mailingLists><issueManagement><system>github</system><url>https://github.com/Red5/red5-server/issues</url></issueManagement><scm><url>https://github.com/Red5/red5-server.git</url><connection>scm:git:git@github.com:Red5/red5-server.git</connection><developerConnection>scm:git:git@github.com:Red5/red5-server.git</developerConnection></scm><developers><developer><id>Dominick Accattato</id><email>dominick@red5.org</email></developer><developer><id>Paul Gregoire</id><email>mondain@gmail.com</email></developer><developer><id>Dan Rossi</id><email>electroteque@gmail.com</email></developer><developer><id>Tiago Jacobs</id><email>tiago.jacobs@gmail.com</email></developer></developers><properties><build.dir>target</build.dir><finalName>${project.artifactId}-${project.version}</finalName><red5-io.version>${project.version}</red5-io.version><red5-service.version>${project.version}</red5-service.version><red5-server-common.version>${project.version}</red5-server-common.version></properties><repositories><repository><id>sonatype-snapshots</id><name>Sonatype Snapshots</name><url>http://oss.sonatype.org/content/repositories/snapshots</url></repository><repository><id>sonatype-releases</id><name>Sonatype Releases</name><url>http://oss.sonatype.org/content/repositories/releases</url></repository></repositories><build><defaultGoal>install</defaultGoal><directory>${build.dir}</directory><finalName>${finalName}</finalName><resources><resource><directory>src/main/resources</directory></resource><resource><directory>src/main/java</directory><includes><include>**/*.xml</include></includes></resource></resources><testResources><testResource><directory>src/test/java</directory><excludes><exclude>**/*.java</exclude></excludes></testResource><testResource><directory>src/test/resources</directory></testResource></testResources><plugins><plugin><artifactId>maven-jar-plugin</artifactId><executions><execution><id>attach-javadocs</id><goals><goal>jar</goal></goals><configuration><archive><manifest><addDefaultImplementationEntries>true</addDefaultImplementationEntries></manifest><manifestEntries><SCM-Revision>${buildNumber}</SCM-Revision><Implementation-Build>${buildNumber}</Implementation-Build></manifestEntries></archive><excludes><exclude>**/org/red5/server/Bootstrap.class</exclude><exclude>**/org/red5/server/Shutdown.class</exclude><exclude>**/org/red5/server/jmx/mxbeans/ShutdownMXBean.class</exclude><exclude>**/org/red5/classloading/**</exclude></excludes></configuration></execution></executions></plugin><plugin><groupId>org.apache.felix</groupId><artifactId>maven-bundle-plugin</artifactId><extensions>true</extensions></plugin><plugin><artifactId>maven-source-plugin</artifactId></plugin><plugin><artifactId>maven-javadoc-plugin</artifactId></plugin></plugins></build><dependencies><dependency><groupId>org.red5</groupId><artifactId>red5-server-common</artifactId><version>${red5-server-common.version}</version></dependency><dependency><groupId>org.red5</groupId><artifactId>red5-io</artifactId><version>${red5-io.version}</version><type>jar</type><exclusions><exclusion><artifactId>bcprov-jdk15on</artifactId><groupId>org.bouncycastle</groupId></exclusion><exclusion><artifactId>mina-core</artifactId><groupId>org.apache.mina</groupId></exclusion><exclusion><artifactId>mina-integration-jmx</artifactId><groupId>org.apache.mina</groupId></exclusion><exclusion><artifactId>mina-integration-beans</artifactId><groupId>org.apache.mina</groupId></exclusion><exclusion><artifactId>commons-beanutils</artifactId><groupId>commons-beanutils</groupId></exclusion><exclusion><artifactId>commons-codec</artifactId><groupId>commons-codec</groupId></exclusion><exclusion><artifactId>commons-lang3</artifactId><groupId>org.apache.commons</groupId></exclusion><exclusion><artifactId>spring-web</artifactId><groupId>org.springframework</groupId></exclusion><exclusion><artifactId>quartz</artifactId><groupId>org.quartz-scheduler</groupId></exclusion></exclusions></dependency><dependency><groupId>org.red5</groupId><artifactId>red5-service</artifactId><version>${project.version}</version></dependency></dependencies><profiles><profile><id>assemble</id><build><plugins><plugin><artifactId>maven-dependency-plugin</artifactId><version>2.8</version><executions><execution><id>copy-dependencies</id><phase>package</phase><goals><goal>copy-dependencies</goal></goals><configuration><outputDirectory>${project.build.directory}/lib</outputDirectory><includeScope>compile</includeScope><excludeScope>test</excludeScope><excludeTransitive>false</excludeTransitive></configuration></execution></executions></plugin><plugin><artifactId>maven-assembly-plugin</artifactId><version>2.6</version><configuration><descriptors><descriptor>src/main/assembly/server.xml</descriptor></descriptors></configuration><executions><execution><id>make-assembly</id><!-- this is used for inheritance merges --><phase>package</phase><!-- bind to the packaging phase --><goals><goal>single</goal></goals><configuration><finalName>${project.artifactId}</finalName></configuration></execution></executions></plugin></plugins></build></profile><profile><id>milestone</id><build><plugins><plugin><artifactId>maven-dependency-plugin</artifactId><version>2.8</version><executions><execution><id>copy-dependencies</id><phase>package</phase><goals><goal>copy-dependencies</goal></goals><configuration><outputDirectory>${project.build.directory}/lib</outputDirectory><includeScope>compile</includeScope><excludeScope>test</excludeScope><excludeTransitive>false</excludeTransitive></configuration></execution></executions></plugin><plugin><artifactId>maven-assembly-plugin</artifactId><version>2.6</version><configuration><descriptors><descriptor>src/main/assembly/milestone.xml</descriptor></descriptors></configuration><executions><execution><id>make-assembly</id><!-- this is used for inheritance merges --><phase>package</phase><!-- bind to the packaging phase --><goals><goal>single</goal></goals><configuration><finalName>${project.artifactId}</finalName></configuration></execution></executions></plugin></plugins></build></profile><profile><id>war</id><build><plugins><plugin><artifactId>maven-war-plugin</artifactId><version>2.6</version><configuration><packagingExcludes>WEB-INF/lib/*.jar</packagingExcludes></configuration></plugin><plugin><artifactId>maven-assembly-plugin</artifactId><version>2.6</version><configuration><descriptors><descriptor>src/main/assembly/war.xml</descriptor></descriptors></configuration><executions><execution><id>make-assembly</id><!-- this is used for inheritance merges --><phase>package</phase><!-- bind to the packaging phase --><goals><goal>single</goal></goals></execution></executions></plugin></plugins></build></profile></profiles> </project>

red5-service —-> pom.xml

<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"><parent><groupId>org.red5</groupId><artifactId>red5-parent</artifactId><version>1.0.7-RELEASE</version></parent><modelVersion>4.0.0</modelVersion><artifactId>red5-service</artifactId><name>Red5 :: Service</name><description>The Red5 server service daemon</description><packaging>jar</packaging><url>https://github.com/Red5/red5-service</url><organization><name>Red5</name><url>https://github.com/Red5</url></organization><licenses><license><name>Apache 2</name><url>http://www.apache.org/licenses/LICENSE-2.0.txt</url><distribution>repo</distribution><comments>A business-friendly OSS license</comments></license></licenses><mailingLists><mailingList><name>red5-interest</name><post>https://groups.google.com/forum/?fromgroups#!forum/red5interest</post></mailingList></mailingLists><issueManagement><system>github</system><url>https://github.com/Red5/red5-service/issues</url></issueManagement><scm><url>https://github.com/Red5/red5-service.git</url><connection>scm:git:git@github.com:Red5/red5-service.git</connection><developerConnection>scm:git:git@github.com:Red5/red5-service.git</developerConnection></scm><developers><developer><id>Dominick Accattato</id><email>dominick@red5.org</email></developer><developer><id>Paul Gregoire</id><email>mondain@gmail.com</email></developer><developer><id>Dan Rossi</id><email>electroteque@gmail.com</email></developer><developer><id>Tiago Jacobs</id><email>tiago.jacobs@gmail.com</email></developer></developers><build><defaultGoal>install</defaultGoal><resources><resource><directory>src/main/resources</directory></resource><resource><directory>src/main/java</directory><includes><include>**/*.xml</include></includes></resource></resources><plugins><plugin><artifactId>maven-jar-plugin</artifactId><executions><execution><configuration><archive><manifest><addDefaultImplementationEntries>true</addDefaultImplementationEntries></manifest><manifestEntries><SCM-Revision>${buildNumber}</SCM-Revision><Implementation-Build>${buildNumber}</Implementation-Build></manifestEntries></archive></configuration></execution></executions></plugin><plugin><artifactId>maven-assembly-plugin</artifactId><configuration><descriptors><descriptor>src/main/assembly/daemon.xml</descriptor></descriptors></configuration><executions><execution><id>make-assembly</id><!-- this is used for inheritance merges --><phase>package</phase><!-- bind to the packaging phase --><goals><goal>single</goal></goals></execution></executions></plugin><plugin><groupId>org.apache.felix</groupId><artifactId>maven-bundle-plugin</artifactId><extensions>true</extensions></plugin><plugin><artifactId>maven-source-plugin</artifactId></plugin><plugin><artifactId>maven-javadoc-plugin</artifactId></plugin><plugin><artifactId>maven-jar-plugin</artifactId></plugin></plugins></build><dependencies></dependencies> </project>

####red5-parent —-> pom.xml

<?xml version="1.0" encoding="UTF-8"?> <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"><!-- <![CDATA[ Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. ]]> --><modelVersion>4.0.0</modelVersion><artifactId>red5-parent</artifactId><packaging>pom</packaging><name>Red5 :: Parent</name><description>Parent project for all red5 projects containing dependency management and general info</description><groupId>org.red5</groupId><version>1.0.7-RELEASE</version><url>https://github.com/Red5/red5-parent</url><inceptionYear>2005</inceptionYear><organization><name>Red5</name><url>https://github.com/Red5</url></organization><licenses><license><name>Apache 2</name><url>http://www.apache.org/licenses/LICENSE-2.0.txt</url><distribution>repo</distribution><comments>A business-friendly OSS license</comments></license></licenses><mailingLists><mailingList><name>red5-interest</name><post>https://groups.google.com/forum/?fromgroups#!forum/red5interest</post></mailingList></mailingLists><scm><url>https://github.com/Red5/red5-parent.git</url><connection>scm:git:git@github.com:Red5/red5-parent.git</connection><developerConnection>scm:git:git@github.com:Red5/red5-parent.git</developerConnection></scm><developers><developer><id>Dominick Accattato</id><email>dominick@red5.org</email></developer><developer><id>Paul Gregoire</id><email>mondain@gmail.com</email></developer><developer><id>Dan Rossi</id><email>electroteque@gmail.com</email></developer><developer><id>Tiago Jacobs</id><email>tiago.jacobs@gmail.com</email></developer></developers><properties><project.build.sourceEncoding>UTF-8</project.build.sourceEncoding><spring.version>4.2.5.RELEASE</spring.version><mina.version>2.0.13</mina.version><slf4j.version>1.7.18</slf4j.version><logback.version>1.1.6</logback.version><quartz.version>2.2.2</quartz.version><bc.version>1.54</bc.version><junit.version>4.12</junit.version><isoparser.version>1.1.17</isoparser.version><tika.version>1.11</tika.version><ehcache.version>2.6.11</ehcache.version><commons-beanutils.version>1.9.2</commons-beanutils.version><commons-codec.version>1.10</commons-codec.version><commons-lang3.version>3.4</commons-lang3.version><httpclient.version>4.5.2</httpclient.version><httpcore.version>4.4.4</httpcore.version><xerces.version>2.11.0</xerces.version><cglib.version>3.2.0</cglib.version><tomcat.version>8.0.33</tomcat.version><commons-daemon.version>1.0.15</commons-daemon.version></properties><repositories><repository><id>central</id><name>Central Repository</name><url>http://repo.maven.apache.org/maven2</url><layout>default</layout><snapshots><enabled>false</enabled></snapshots></repository><repository><id>sonatype-snapshots</id><name>Sonatype Snapshots</name><url>http://oss.sonatype.org/content/repositories/snapshots</url></repository><repository><id>sonatype-releases</id><name>Sonatype Releases</name><url>http://oss.sonatype.org/content/repositories/releases</url></repository></repositories><dependencies><dependency><groupId>org.apache.httpcomponents</groupId><artifactId>httpclient</artifactId><version>${httpclient.version}</version><exclusions><exclusion><groupId>commons-logging</groupId><artifactId>commons-logging</artifactId></exclusion><exclusion><artifactId>commons-codec</artifactId><groupId>commons-codec</groupId></exclusion></exclusions></dependency><dependency><groupId>org.springframework</groupId><artifactId>spring-context-support</artifactId><version>${spring.version}</version><exclusions><exclusion><groupId>commons-logging</groupId><artifactId>commons-logging</artifactId></exclusion></exclusions></dependency><dependency><groupId>ch.qos.logback</groupId><artifactId>logback-access</artifactId><version>${logback.version}</version></dependency><dependency><groupId>ch.qos.logback</groupId><artifactId>logback-core</artifactId><version>${logback.version}</version></dependency><dependency><groupId>org.springframework</groupId><artifactId>spring-core</artifactId><version>${spring.version}</version><exclusions><exclusion><groupId>commons-logging</groupId><artifactId>commons-logging</artifactId></exclusion></exclusions></dependency><dependency><groupId>org.springframework</groupId><artifactId>spring-context</artifactId><version>${spring.version}</version><exclusions><exclusion><groupId>commons-logging</groupId><artifactId>commons-logging</artifactId></exclusion></exclusions></dependency><dependency><groupId>org.springframework</groupId><artifactId>spring-web</artifactId><version>${spring.version}</version><exclusions><exclusion><groupId>commons-logging</groupId><artifactId>commons-logging</artifactId></exclusion></exclusions></dependency><dependency><groupId>org.slf4j</groupId><artifactId>slf4j-api</artifactId><version>${slf4j.version}</version></dependency><dependency><groupId>org.apache.mina</groupId><artifactId>mina-parent</artifactId><version>${mina.version}</version><type>pom</type></dependency><dependency><groupId>junit</groupId><artifactId>junit</artifactId><version>${junit.version}</version><scope>test</scope></dependency><dependency><groupId>org.apache.tomcat</groupId><artifactId>tomcat-servlet-api</artifactId><version>${tomcat.version}</version><scope>compile</scope></dependency><dependency><groupId>org.slf4j</groupId><artifactId>jcl-over-slf4j</artifactId><version>${slf4j.version}</version></dependency><dependency><groupId>org.slf4j</groupId><artifactId>jul-to-slf4j</artifactId><version>${slf4j.version}</version></dependency><dependency><groupId>org.slf4j</groupId><artifactId>log4j-over-slf4j</artifactId><version>${slf4j.version}</version></dependency><dependency><groupId>uk.org.lidalia</groupId><artifactId>sysout-over-slf4j</artifactId><version>1.0.2</version></dependency><dependency><artifactId>mina-integration-beans</artifactId><groupId>org.apache.mina</groupId><version>${mina.version}</version></dependency><dependency><groupId>org.quartz-scheduler</groupId><artifactId>quartz</artifactId><version>${quartz.version}</version></dependency><dependency><groupId>ch.qos.logback</groupId><artifactId>logback-core</artifactId><version>${logback.version}</version></dependency><dependency><groupId>commons-daemon</groupId><artifactId>commons-daemon</artifactId><version>${commons-daemon.version}</version></dependency><dependency><groupId>org.bouncycastle</groupId><artifactId>bcprov-jdk15on</artifactId><version>${bc.version}</version></dependency><dependency><groupId>org.slf4j</groupId><artifactId>jcl-over-slf4j</artifactId><version>${slf4j.version}</version></dependency><dependency><groupId>org.slf4j</groupId><artifactId>jul-to-slf4j</artifactId><version>${slf4j.version}</version></dependency><dependency><groupId>org.slf4j</groupId><artifactId>log4j-over-slf4j</artifactId><version>${slf4j.version}</version></dependency><dependency><groupId>ch.qos.logback</groupId><artifactId>logback-core</artifactId><version>${logback.version}</version></dependency><dependency><groupId>org.apache.mina</groupId><artifactId>mina-core</artifactId><version>${mina.version}</version><type>bundle</type></dependency><dependency><groupId>org.apache.mina</groupId><artifactId>mina-integration-beans</artifactId><version>${mina.version}</version><type>bundle</type></dependency><dependency><groupId>org.apache.mina</groupId><artifactId>mina-integration-jmx</artifactId><version>${mina.version}</version><type>bundle</type><exclusions><exclusion><groupId>org.apache.mina</groupId><artifactId>mina-integration-ognl</artifactId></exclusion></exclusions></dependency><dependency><groupId>org.apache.tika</groupId><artifactId>tika-core</artifactId><version>${tika.version}</version></dependency><dependency><groupId>org.apache.tika</groupId><artifactId>tika-parsers</artifactId><version>${tika.version}</version><exclusions><exclusion><artifactId>cxf-rt-rs-client</artifactId><groupId>org.apache.cxf</groupId></exclusion><exclusion><artifactId>cdm</artifactId><groupId>edu.ucar</groupId></exclusion><exclusion><artifactId>pdfbox</artifactId><groupId>org.apache.pdfbox</groupId></exclusion><exclusion><artifactId>opennlp-tools</artifactId><groupId>org.apache.opennlp</groupId></exclusion><exclusion><artifactId>junrar</artifactId><groupId>com.github.junrar</groupId></exclusion><exclusion><artifactId>grib</artifactId><groupId>edu.ucar</groupId></exclusion><exclusion><artifactId>sis-metadata</artifactId><groupId>org.apache.sis.core</groupId></exclusion><exclusion><artifactId>sis-utility</artifactId><groupId>org.apache.sis.core</groupId></exclusion><exclusion><artifactId>sis-netcdf</artifactId><groupId>org.apache.sis.storage</groupId></exclusion><exclusion><artifactId>vorbis-java-core</artifactId><groupId>org.gagravarr</groupId></exclusion><exclusion><artifactId>vorbis-java-tika</artifactId><groupId>org.gagravarr</groupId></exclusion><exclusion><artifactId>xz</artifactId><groupId>org.tukaani</groupId></exclusion><exclusion><artifactId>geoapi</artifactId><groupId>org.opengis</groupId></exclusion><exclusion><artifactId>httpservices</artifactId><groupId>edu.ucar</groupId></exclusion><exclusion><artifactId>jackcess</artifactId><groupId>com.healthmarketscience.jackcess</groupId></exclusion><exclusion><artifactId>jackcess-encrypt</artifactId><groupId>com.healthmarketscience.jackcess</groupId></exclusion><exclusion><artifactId>java-libpst</artifactId><groupId>com.pff</groupId></exclusion><exclusion><artifactId>netcdf4</artifactId><groupId>edu.ucar</groupId></exclusion><exclusion><artifactId>bcmail-jdk15on</artifactId><groupId>org.bouncycastle</groupId></exclusion><exclusion><artifactId>bcpkix-jdk15on</artifactId><groupId>org.bouncycastle</groupId></exclusion><exclusion><artifactId>commons-csv</artifactId><groupId>org.apache.commons</groupId></exclusion><exclusion><artifactId>commons-exec</artifactId><groupId>org.apache.commons</groupId></exclusion><exclusion><artifactId>jhighlight</artifactId><groupId>org.codelibs</groupId></exclusion><exclusion><artifactId>jmatio</artifactId><groupId>net.sourceforge.jmatio</groupId></exclusion><exclusion><artifactId>json</artifactId><groupId>org.json</groupId></exclusion><exclusion><artifactId>json-simple</artifactId><groupId>com.googlecode.json-simple</groupId></exclusion><exclusion><artifactId>poi</artifactId><groupId>org.apache.poi</groupId></exclusion><exclusion><artifactId>poi-ooxml</artifactId><groupId>org.apache.poi</groupId></exclusion><exclusion><artifactId>poi-scratchpad</artifactId><groupId>org.apache.poi</groupId></exclusion><exclusion><artifactId>rome</artifactId><groupId>rome</groupId></exclusion></exclusions></dependency><dependency><artifactId>commons-beanutils</artifactId><groupId>commons-beanutils</groupId><version>${commons-beanutils.version}</version></dependency><dependency><artifactId>commons-codec</artifactId><groupId>commons-codec</groupId><version>${commons-codec.version}</version></dependency><dependency><groupId>org.apache.commons</groupId><artifactId>commons-lang3</artifactId><version>${commons-lang3.version}</version><exclusions><exclusion><groupId>commons-logging</groupId><artifactId>commons-logging</artifactId></exclusion></exclusions></dependency><dependency><groupId>xerces</groupId><artifactId>xercesImpl</artifactId><version>${xerces.version}</version></dependency><dependency><groupId>net.sf.ehcache</groupId><artifactId>ehcache-core</artifactId><version>${ehcache.version}</version></dependency><dependency><groupId>com.googlecode.mp4parser</groupId><artifactId>isoparser</artifactId><version>${isoparser.version}</version></dependency><dependency><groupId>org.apache.commons</groupId><artifactId>commons-lang3</artifactId><version>${commons-lang3.version}</version></dependency><dependency><artifactId>commons-beanutils</artifactId><groupId>commons-beanutils</groupId><version>${commons-beanutils.version}</version></dependency><dependency><artifactId>commons-codec</artifactId><groupId>commons-codec</groupId><version>${commons-codec.version}</version></dependency><dependency><groupId>org.quartz-scheduler</groupId><artifactId>quartz</artifactId><version>${quartz.version}</version></dependency><dependency><artifactId>bcprov-jdk15on</artifactId><groupId>org.bouncycastle</groupId><version>${bc.version}</version></dependency><dependency><groupId>org.apache.tomcat</groupId><artifactId>tomcat-servlet-api</artifactId><version>${tomcat.version}</version><scope>provided</scope></dependency></dependencies><build><plugins><plugin><artifactId>maven-compiler-plugin</artifactId><version>3.5</version><configuration><compilerVersion>1.8</compilerVersion><fork>true</fork><source>1.8</source><target>1.8</target><executable>${maven.compiler.executable}</executable></configuration></plugin><plugin><artifactId>maven-source-plugin</artifactId><version>2.4</version><executions><execution><id>attach-sources</id><goals><goal>jar-no-fork</goal></goals></execution></executions></plugin><plugin><artifactId>maven-javadoc-plugin</artifactId><version>2.10.3</version><executions><execution><id>attach-javadocs</id><goals><goal>jar</goal></goals></execution></executions><configuration><verbose>true</verbose><failOnError>false</failOnError><sourcepath>${basedir}/src/main/java</sourcepath><includeDependencySources>false</includeDependencySources><dependencySourceIncludes><dependencySourceInclude>org.red5:*</dependencySourceInclude></dependencySourceIncludes><detectOfflineLinks>false</detectOfflineLinks><stylesheetfile>javadoc.css</stylesheetfile><links><link>http://download.oracle.com/javase/7/docs/api</link><link>http://docs.spring.io/spring/docs/4.0.3.RELEASE/javadoc-api</link><link>http://www.slf4j.org/api</link><link>http://logging.apache.org/log4j/1.2/apidocs</link></links><tags><tag><name>todo</name><!-- todo tag for all places --><placement>a</placement><head>To do:</head></tag></tags></configuration></plugin><plugin><artifactId>maven-jar-plugin</artifactId><version>2.6</version><executions><execution><configuration><archive><manifest><addDefaultImplementationEntries>true</addDefaultImplementationEntries></manifest><manifestEntries><SCM-Revision>${buildNumber}</SCM-Revision><Implementation-Build>${buildNumber}</Implementation-Build></manifestEntries></archive></configuration></execution></executions></plugin><plugin><artifactId>maven-dependency-plugin</artifactId><version>2.10</version><executions><execution><id>copy-dependencies</id><phase>package</phase><goals><goal>copy-dependencies</goal></goals><configuration><outputDirectory>${project.build.directory}/lib</outputDirectory><overWriteReleases>false</overWriteReleases><overWriteSnapshots>false</overWriteSnapshots><overWriteIfNewer>true</overWriteIfNewer><excludeTransitive>true</excludeTransitive></configuration></execution></executions></plugin><plugin><artifactId>maven-project-info-reports-plugin</artifactId><version>2.8.1</version></plugin><plugin><artifactId>maven-scm-plugin</artifactId><version>1.9.4</version><configuration><connectionType>connection</connectionType></configuration></plugin><plugin><groupId>org.apache.felix</groupId><artifactId>maven-bundle-plugin</artifactId><version>3.0.1</version><extensions>true</extensions></plugin><plugin><artifactId>maven-release-plugin</artifactId><version>2.5.3</version><configuration><autoVersionSubmodules>true</autoVersionSubmodules><useReleaseProfile>false</useReleaseProfile><releaseProfiles>release</releaseProfiles><goals>deploy</goals></configuration></plugin></plugins></build><profiles><profile><id>release</id><build><plugins><plugin><groupId>org.sonatype.plugins</groupId><artifactId>nexus-staging-maven-plugin</artifactId><version>1.6.6</version><extensions>true</extensions><configuration><serverId>ossrh</serverId><nexusUrl>https://oss.sonatype.org/</nexusUrl><autoReleaseAfterClose>true</autoReleaseAfterClose></configuration></plugin><plugin><artifactId>maven-gpg-plugin</artifactId><version>1.6</version><executions><execution><id>sign-artifacts</id><phase>verify</phase><goals><goal>sign</goal></goals></execution></executions></plugin></plugins></build><distributionManagement><snapshotRepository><id>ossrh</id><url>https://oss.sonatype.org/content/repositories/snapshots</url></snapshotRepository><repository><id>ossrh</id><url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url></repository></distributionManagement></profile><profile><id>updatebuildnumber</id><build><plugins><plugin><groupId>org.codehaus.mojo</groupId><artifactId>buildnumber-maven-plugin</artifactId><executions><execution><phase>validate</phase><goals><goal>create</goal></goals></execution></executions><configuration><doCheck>false</doCheck><doUpdate>false</doUpdate><shortRevisionLength>5</shortRevisionLength></configuration></plugin></plugins></build></profile></profiles> </project>

整合tomcat

說明一下:有點模糊的就是為什么不是 red5-server整合tomcat項目,其實說白了,這只是一個jar并且spring管理的bean。所以不能單獨整合,只能通過新建的項目然后把red5-server加入即可。 當然新建的項目就是webapp項目了。

由于之前整理好了maven管理jar的關系,所以這次我在red5-parent 直接新建 maven Module 然后給個名字red5 然后選擇 maven-archetype-webapp — >next finish 就可以了。如圖:

新建立好之后 如下:

  • 然后就進行拷貝了。首先從https://github.com/Red5/red5-examples 會看到 一個子項目 oflaDemo
    直接拷貝源碼到我們新建立好的項目如下圖:

  • 接著拷貝 oflaDemo war包下的 oflaDemo-web.xml 到我們項目的 resources下面 如圖:


    我們的項目如下圖

  • 接著拷貝red5-server server包下的conf red5.properties,logback.xml,web.xml 和 webapps下面的 red5-default.xml 和 root包下面的內容(不包括 WEB-INF) 拷貝到我們的項目,red5-default.xml 需要改名字,改成 defaultContext.xml 如下圖:

  • 其他的 xml 文件是修改了。直接貼代碼如下:

beanRefContext.xml

<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http://www.springframework.org/dtd/spring-beans.dtd"> <beans><bean name="default.context"class="org.springframework.context.support.ClassPathXmlApplicationContext" ><constructor-arg><list><value> defaultContext.xml</value><value> red5-common.xml</value><value> red5-core.xml</value></list></constructor-arg></bean></beans>

red5-common.xml

<?xml version="1.0" encoding="UTF-8"?> <beans xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"xmlns:lang="http://www.springframework.org/schema/lang"xmlns="http://www.springframework.org/schema/beans"xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd http://www.springframework.org/schema/lang http://www.springframework.org/schema/lang/spring-lang-2.5.xsd" ><!-- This context is shared between all child contexts. --><!-- Server bean --><bean id="red5.server"class="org.red5.server.Server" /><!-- JMX server --><!-- Serializes objects to AMF binary --><bean id="serializer"class="org.red5.io.object.Serializer" /><!-- Deserializes objects from AMF binary --><bean id="deserializer"class="org.red5.io.object.Deserializer" /><!-- Deals with StatusObjects representing statuses like NetConnection.Connect.Success status --><bean id="statusObjectService" class="org.red5.server.net.rtmp.status.StatusObjectService" autowire="byType" /> <!-- RTMP codec factory --> <bean id="minaEncoder" class="org.red5.server.net.rtmp.codec.RTMPMinaProtocolEncoder" scope="prototype" /><bean id="minaDecoder" class="org.red5.server.net.rtmp.codec.RTMPMinaProtocolDecoder" scope="prototype" /><!-- RTMPT codec factory --><bean id="rtmptCodecFactory"autowire="byType"class="org.red5.server.net.rtmpt.codec.RTMPTCodecFactory"init-method="init" ><property name="baseTolerance" value="${rtmpt.encoder_base_tolerance}" /><property name="dropLiveFuture" value="${rtmpt.encoder_drop_live_future}" /></bean><!-- Remoting calls codec factory --><bean id="remotingCodecFactory"autowire="byType"class="org.red5.server.net.remoting.codec.RemotingCodecFactory"init-method="init" /><!-- Streamable file factory --> <bean id="streamableFileFactory" class="org.red5.server.stream.StreamableFileFactory"><property name="services"><list><bean id="flvFileService" class="org.red5.server.service.flv.impl.FLVService"><property name="generateMetadata" value="true"/></bean><bean id="mp3FileService" class="org.red5.server.service.mp3.impl.MP3Service"/><bean id="mp4FileService" class="org.red5.server.service.mp4.impl.MP4Service"/><bean id="m4aFileService" class="org.red5.server.service.m4a.impl.M4AService"/></list></property></bean><!-- Thread that writes modified objects to disk periodically --><!-- Handles creation / lookup of shared objects --><bean id="sharedObjectService" class="org.red5.server.so.SharedObjectService"><property name="maximumEventsPerUpdate" value="${so.max.events.per.update}"/><property name="persistenceClassName"><value>org.red5.server.persistence.FilePersistence</value></property><property name="scheduler"><bean class="org.springframework.scheduling.concurrent.ThreadPoolTaskScheduler"><property name="poolSize" value="${so.scheduler.pool_size}" /> <property name="waitForTasksToCompleteOnShutdown" value="false"/><property name="daemon" value="true"/><property name="threadNamePrefix" value="SharedObjectScheduler-"/></bean></property></bean><!-- High level access to streams --><bean id="streamService"class="org.red5.server.stream.StreamService" /><!-- High level access to broadcasted streams --><bean id="providerService"class="org.red5.server.stream.ProviderService" /><!-- Provides output to consumers --><bean id="consumerService"class="org.red5.server.stream.ConsumerService" /><!-- Scheduling service --><bean id="schedulingService"class="org.red5.server.scheduling.QuartzSchedulingService" /><!-- Use injection to setup thread pool for remoting clients --><bean id="remotingClient"class="org.red5.server.net.remoting.RemotingClient" ><property name="poolSize"value="2" /></bean><!--Now we can load the cache engine, only one may be enabled at a time. If no-caching is required select theNoCacheImpl. Three other implementations based on EhCache, WhirlyCache, and Red5Cache are also available.--><bean id="object.cache" class="org.red5.cache.impl.NoCacheImpl"/><!-- Cache to use for keyframe metadata. --><bean id="keyframe.cache" class="org.red5.io.CachingFileKeyFrameMetaCache"><property name="maxCacheEntry" value="${keyframe.cache.entry.max}" /></bean><!--Represents FLV filesUse injection to set the cache impl to be used with flvs--><bean id="flv.impl"class="org.red5.io.flv.impl.FLV" ><property name="cache" ><ref bean="object.cache" /></property></bean><!-- Use injection to set the keyframe cache for FLV files --><bean id="flvreader.impl" class="org.red5.io.flv.impl.FLVReader"><property name="keyFrameCache"><ref bean="keyframe.cache"/></property></bean><!-- Use injection to set the keyframe cache for MP3 files --><bean id="mp3reader.impl"class="org.red5.io.mp3.impl.MP3Reader" ><property name="frameCache" ><ref bean="keyframe.cache" /></property></bean><!-- Use injection to set the buffer type for reading FLV files --><bean class="org.springframework.beans.factory.config.MethodInvokingFactoryBean"><property name="staticMethod"><value>org.red5.io.flv.impl.FLVReader.setBufferType</value></property><!-- Three buffer types are available 'auto', 'heap', and 'direct' --><property name="arguments" value="auto"/></bean><!-- Use injection to set the buffer size for reading FLV files --><bean class="org.springframework.beans.factory.config.MethodInvokingFactoryBean"><property name="staticMethod"><value>org.red5.io.flv.impl.FLVReader.setBufferSize</value></property><!-- Three buffer types are available 'auto', 'heap', and 'direct' --><property name="arguments" value="4096"/></bean><!--Executor that will be used to schedule stream playback to keepthe client buffer filled.--><bean id="streamExecutor"class="java.util.concurrent.ScheduledThreadPoolExecutor" ><constructor-arg value="16" /><property name="maximumPoolSize"value="64" /></bean><!--ClientBroadcastStream and PlaylistSubscriberStreamthat will be used by RTMPConnection and maybe other classes.These beans are lazy-init because most likely server will needto be up and running before we can get a smart implementationof these streams--><bean id="playlistSubscriberStream" scope="prototype" lazy-init="true" class="org.red5.server.stream.PlaylistSubscriberStream"><!-- Check for buffer underruns every X ms and generate NetStream.Play.InsufficientBW accordingly.Set to 0 to disable. Be careful not to set this value too small to avoid network congestion.--><property name="bufferCheckInterval" value="${subscriberstream.buffer.check.interval}"/><!-- A NetStream.Play.InsufficientBW message is generated if more than X messages are queued for sending on the connection.This value will also control the maximum pending messages on the server. To use a smaller value on slow connectionsto get smaller delay for downstream server commands.--><property name="underrunTrigger" value="${subscriberstream.underrun.trigger}"/></bean><bean id="clientBroadcastStream"class="org.red5.server.stream.ClientBroadcastStream"lazy-init="true"scope="prototype" /></beans>

red5-core.xml

<?xml version="1.0" encoding="UTF-8"?> <beans xmlns="http://www.springframework.org/schema/beans" xmlns:lang="http://www.springframework.org/schema/lang" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsdhttp://www.springframework.org/schema/lang http://www.springframework.org/schema/lang/spring-lang.xsd"><!-- DO NOT FORMAT THIS FILE IN ECLIPSE --><bean id="customEditorConfigurer" class="org.springframework.beans.factory.config.CustomEditorConfigurer"><property name="customEditors"><map><entry key="java.net.SocketAddress" value="org.apache.mina.integration.beans.InetSocketAddressEditor" /></map></property></bean><bean id="placeholderConfig" class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"><property name="location" value="classpath:/red5.properties" /></bean><!-- RTMP --><bean id="rtmpScheduler" class="org.springframework.scheduling.concurrent.ThreadPoolTaskScheduler"><property name="poolSize" value="${rtmp.scheduler.pool_size}" /><property name="daemon" value="true" /><property name="waitForTasksToCompleteOnShutdown" value="true" /><property name="threadNamePrefix" value="RTMPConnectionScheduler-" /></bean><bean id="messageExecutor" class="org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor"><property name="corePoolSize" value="${rtmp.executor.core_pool_size}" /><property name="maxPoolSize" value="${rtmp.executor.max_pool_size}" /><property name="queueCapacity" value="${rtmp.executor.queue_capacity}" /><property name="daemon" value="false" /><property name="waitForTasksToCompleteOnShutdown" value="true" /><property name="threadNamePrefix" value="RTMPConnectionExecutor-" /></bean><bean id="deadlockGuardScheduler" class="org.springframework.scheduling.concurrent.ThreadPoolTaskScheduler"><property name="poolSize" value="${rtmp.deadlockguard.sheduler.pool_size}" /><property name="daemon" value="false" /><property name="waitForTasksToCompleteOnShutdown" value="true" /><property name="threadNamePrefix" value="DeadlockGuardScheduler-" /></bean><!-- RTMP connection manager --><bean id="rtmpConnManager" class="org.red5.server.net.rtmp.RTMPConnManager" /><!-- RTMP Handler --><bean id="rtmpHandler" class="org.red5.server.net.rtmp.RTMPHandler"><property name="server" ref="red5.server" /><property name="statusObjectService" ref="statusObjectService" /><!-- Enable this to allow unvalidated connections --><property name="unvalidatedConnectionAllowed" value="true" /></bean><!-- RTMP Mina IO Handler --><bean id="rtmpMinaIoHandler" class="org.red5.server.net.rtmp.RTMPMinaIoHandler"><property name="handler" ref="rtmpHandler" /></bean><!-- RTMP Mina Transport --><bean id="rtmpTransport" class="org.red5.server.net.rtmp.RTMPMinaTransport" init-method="start" destroy-method="stop"><property name="ioHandler" ref="rtmpMinaIoHandler" /><property name="addresses"><list><value>${rtmp.host}:${rtmp.port}</value><!-- You can now add additional ports and ip addresses<value>${rtmp.host}:1936</value>--></list></property><property name="ioThreads" value="${rtmp.io_threads}" /><property name="sendBufferSize" value="${rtmp.send_buffer_size}" /><property name="receiveBufferSize" value="${rtmp.receive_buffer_size}" /><property name="trafficClass" value="${rtmp.traffic_class}" /><property name="backlog" value="${rtmp.backlog}" /><property name="tcpNoDelay" value="${rtmp.tcp_nodelay}" /><property name="keepAlive" value="${rtmp.tcp_keepalive}" /><property name="thoughputCalcInterval" value="${rtmp.thoughput_calc_interval}" /><property name="enableDefaultAcceptor" value="${rtmp.default_acceptor}" /><!-- Pool settings are used when the default acceptor is disabled --><property name="initialPoolSize" value="${rtmp.initial_pool_size}" /><property name="maxPoolSize" value="${rtmp.max_pool_size}" /><property name="maxProcessorPoolSize" value="${rtmp.max_processor_pool_size}" /><property name="executorKeepAliveTime" value="${rtmp.executor_keepalive_time}" /><!-- This is the interval at which the sessions are polled for stats. If mina monitoring is not enabled, polling will not occur. --><property name="minaPollInterval" value="${jmx.mina.poll.interval}" /><property name="enableMinaMonitor" value="${jmx.mina.monitor.enable}" /><property name="enableMinaLogFilter" value="${mina.logfilter.enable}" /></bean><!-- RTMP Mina Connection --><bean id="rtmpMinaConnection" scope="prototype" class="org.red5.server.net.rtmp.RTMPMinaConnection"><!-- Executor for scheduled tasks --><property name="scheduler" ref="rtmpScheduler" /><!-- Executor for incoming messages --><property name="executor" ref="messageExecutor" /><!-- Deadlock guard executor --><property name="deadlockGuardScheduler" ref="deadlockGuardScheduler" /><!-- Ping clients every X ms. Set to 0 to disable ghost detection code. --><property name="pingInterval" value="${rtmp.ping_interval}" /><!-- Disconnect client after X ms of not responding. --><property name="maxInactivity" value="${rtmp.max_inactivity}" /><!-- Max. time in milliseconds to wait for a valid handshake. --><property name="maxHandshakeTimeout" value="${rtmp.max_handshake_time}" /><!-- Default server bandwidth per connection --><property name="defaultServerBandwidth" value="${rtmp.default_server_bandwidth}" /><!-- Default client bandwidth per connection --><property name="defaultClientBandwidth" value="${rtmp.default_client_bandwidth}" /><!-- Client bandwidth limit type: 0 = hard, 1 = soft, 2 = dynamic --><property name="limitType" value="${rtmp.client_bandwidth_limit_type}" /><!-- Bandwidth detection. If "false" the server will NOT initiate a check --><property name="bandwidthDetection" value="${rtmp.bandwidth_detection}" /><!-- Maximum time allowed for a single RTMP packet to be processed --><property name="maxHandlingTimeout" value="${rtmp.max_handling_time}" /><!-- Specify the size of queue that will trigger audio packet dropping, disabled if it's 0 --><property name="executorQueueSizeToDropAudioPackets" value="${rtmp.executor.queue_size_to_drop_audio_packets}" /><!-- Concurrent collection tweaks --><property name="channelsInitalCapacity" value="${rtmp.channel.initial.capacity}" /><property name="channelsConcurrencyLevel" value="${rtmp.channel.concurrency.level}" /><property name="streamsInitalCapacity" value="${rtmp.stream.initial.capacity}" /><property name="streamsConcurrencyLevel" value="${rtmp.stream.concurrency.level}" /><property name="pendingCallsInitalCapacity" value="${rtmp.pending.calls.initial.capacity}" /><property name="pendingCallsConcurrencyLevel" value="${rtmp.pending.calls.concurrency.level}" /><property name="reservedStreamsInitalCapacity" value="${rtmp.reserved.streams.initial.capacity}" /><property name="reservedStreamsConcurrencyLevel" value="${rtmp.reserved.streams.concurrency.level}" /></bean><!-- RTMPT --><!-- RTMPT Handler --><bean id="rtmptHandler" class="org.red5.server.net.rtmpt.RTMPTHandler" autowire="byType"><property name="codecFactory" ref="rtmptCodecFactory" /></bean><!-- Use injection to store RTMPT handler in servlet --><bean id="rtmptServlet" class="org.red5.server.net.rtmpt.RTMPTServlet"><property name="manager" ref="rtmpConnManager" /><property name="handler" ref="rtmptHandler" /><!-- Increasing this value results in better stream performance, but also increases the latency --><property name="targetResponseSize" value="${rtmpt.target_reponse_size}" /><!-- Response for /fcs/ident2 requests --><!--<property name="ident2" value="127.0.0.1" />--></bean><!-- RTMPT Connection --><bean id="rtmptConnection" scope="prototype" class="org.red5.server.net.rtmpt.RTMPTConnection"><!-- Executor for scheduled tasks --><property name="scheduler" ref="rtmpScheduler" /><!-- Executor for incoming messages --><property name="executor" ref="messageExecutor" /><!-- Deadlock guard executor --><property name="deadlockGuardScheduler" ref="deadlockGuardScheduler" /><!-- Ping clients every X ms. Set to 0 to disable ghost detection code. --><property name="pingInterval" value="${rtmpt.ping_interval}" /><!-- Disconnect client after X ms of not responding. --><property name="maxInactivity" value="${rtmpt.max_inactivity}" /><!-- Max. time in milliseconds to wait for a valid handshake. --><property name="maxHandshakeTimeout" value="${rtmpt.max_handshake_time}" /><!-- Maximum incoming messages to process at a time per client --><property name="maxInMessagesPerProcess" value="${rtmpt.max_in_msg_process}" /><!-- Maximum amount of time in milliseconds to wait before allowing an offer to fail on incoming or outgoing queues --><property name="maxQueueOfferTime" value="${rtmpt.max_queue_offer_time}" /><!-- Maximum offer attempts before failing on incoming or outgoing queues --><property name="maxQueueOfferAttempts" value="${rtmpt.max_queue_offer_attempts}" /><!-- Maximum time allowed for a single RTMP packet to be processed --><property name="maxHandlingTimeout" value="${rtmp.max_handling_time}" /><!-- Specify the size of queue that will trigger audio packet dropping, disabled if it's 0 --><property name="executorQueueSizeToDropAudioPackets" value="${rtmp.executor.queue_size_to_drop_audio_packets}" /><!-- Concurrent collection tweaks --><property name="channelsInitalCapacity" value="${rtmp.channel.initial.capacity}" /><property name="channelsConcurrencyLevel" value="${rtmp.channel.concurrency.level}" /><property name="streamsInitalCapacity" value="${rtmp.stream.initial.capacity}" /><property name="streamsConcurrencyLevel" value="${rtmp.stream.concurrency.level}" /><property name="pendingCallsInitalCapacity" value="${rtmp.pending.calls.initial.capacity}" /><property name="pendingCallsConcurrencyLevel" value="${rtmp.pending.calls.concurrency.level}" /><property name="reservedStreamsInitalCapacity" value="${rtmp.reserved.streams.initial.capacity}" /><property name="reservedStreamsConcurrencyLevel" value="${rtmp.reserved.streams.concurrency.level}" /></bean><!-- RTMPS --><!-- Notes to self: https://www.openssl.org/docs/apps/ciphers.html#TLS-v1.2-cipher-suites https://www.sslshopper.com/article-how-to-disable-weak-ciphers-and-ssl-2-in-tomcat.html<bean id="rtmpsMinaIoHandler" class="org.red5.server.net.rtmps.RTMPSMinaIoHandler"><property name="handler" ref="rtmpHandler" /><property name="keystorePassword" value="${rtmps.keystorepass}" /><property name="keystoreFile" value="${rtmps.keystorefile}" /><property name="truststorePassword" value="${rtmps.truststorepass}" /><property name="truststoreFile" value="${rtmps.truststorefile}" /><property name="cipherSuites"><array><value>TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256</value><value>TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384</value><value>TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA</value><value>TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384</value><value>TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA</value><value>TLS_ECDHE_RSA_WITH_RC4_128_SHA</value><value>TLS_RSA_WITH_AES_128_CBC_SHA256</value><value>TLS_RSA_WITH_AES_128_CBC_SHA</value><value>TLS_RSA_WITH_AES_256_CBC_SHA256</value><value>TLS_RSA_WITH_AES_256_CBC_SHA</value><value>SSL_RSA_WITH_RC4_128_SHA</value></array></property><property name="protocols"><array><value>TLSv1</value><value>TLSv1.1</value><value>TLSv1.2</value></array></property></bean><bean id="rtmpsTransport" class="org.red5.server.net.rtmp.RTMPMinaTransport" init-method="start" destroy-method="stop"><property name="ioHandler" ref="rtmpsMinaIoHandler" /><property name="addresses"><list><value>${rtmps.host}:${rtmps.port}</value></list></property><property name="ioThreads" value="${rtmp.io_threads}" /><property name="tcpNoDelay" value="${rtmp.tcp_nodelay}" /></bean> --><!-- Enable when you need it. - - ><bean id="rtmpProxyTransport" class="org.red5.server.net.rtmp.RTMPMinaTransport" init-method="start" destroy-method="stop"><property name="ioHandler" ref="debugProxyIoHandler" /><property name="address" value="${proxy.source_host}" /><property name="port" value="${proxy.source_port}" /><property name="ioThreads" value="${rtmp.io_threads}" /><property name="tcpNoDelay" value="${rtmp.tcp_nodelay}" /></bean><bean id="debugProxyIoHandler"class="org.red5.server.net.proxy.DebugProxyHandler"><property name="codecFactory" ref="rtmpCodecFactory" /><property name="forward" value="${proxy.destination_host}:${proxy.destination_port}" /><property name="dumpTo" value="./webapps/dump/" /></bean> --> </beans>

到這里就集成成功了:
使用 jdk 1.8 tomcat 8以上
啟動tomcat:
地址
http://localhost:8080/red5/demos/publisher.html

總結

以上是生活随笔為你收集整理的red5 1.0.7 集成tomcat 并且 进行整合 官方例子oflaDemo的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。

主站蜘蛛池模板: 日本不卡一区二区三区视频 | 中国少妇初尝黑人巨大 | 亲嘴扒胸摸屁股激烈网站 | 免费观看黄色网址 | 国产福利短视频 | 我不卡一区二区 | 嫩草www| 国产九色在线播放九色 | 国产精品无码一区二区三区 | 亚洲视频免费观看 | 日韩一级片中文字幕 | 久久黄色片 | 国产真实乱 | 国产理论在线观看 | 秋霞一区二区三区 | av在线不卡网站 | 欧美一区二区区 | 女女h百合无遮涩涩漫画软件 | 97人人爽人人 | 黑人操日本 | 高清乱码免费看污 | 伊人黄色 | 豆国产97在线 | 亚洲 | 极品人妻一区二区 | 欧美日韩在线观看一区 | 欧美日韩黄色片 | 日本黄色免费视频 | 亚洲精品在线视频 | 国产a一区二区三区 | 国产精品久免费的黄网站 | 艳妇乳肉豪妇荡乳av | 欧美成人一区在线 | 91午夜免费视频 | 11一12免费毛片 | 狠狠干天天色 | 中国美女乱淫免费看视频 | 色狠 | 日本久久久久 | 香蕉久久夜色精品国产使用方法 | 成人播放器 | 亚洲性色图 | 亚洲人午夜射精精品日韩 | caoporen超碰 | 穿越异世荒淫h啪肉np文 | 一区不卡av | 亚洲一区电影网 | 午夜视频网站 | 亚洲一区二区三区日韩 | 女优一区二区三区 | 91视频二区| 93久久精品日日躁夜夜躁欧美 | 国产午夜福利视频在线观看 | 黄网在线 | 小黄网站在线观看 | 久草视频在线免费播放 | 狠狠操人人干 | 色视频综合 | 久久九九久精品国产免费直播 | 日爽夜爽| 男人草女人 | 日韩午夜毛片 | 性欧美最猛 | 爱av导航 | 狠狠躁日日躁 | 色美av | 久久青草免费视频 | 欧美日韩视频免费 | av操操操 | 亚洲AV无码成人片在线观看 | 亚洲第一视频在线观看 | 欧美精品高清 | 国产精品夜夜爽张柏芝 | 亚洲福利午夜 | 欧美激情第五页 | 久久嫩草 | 午夜视频福利在线观看 | 俺来也俺也啪www色 欧洲一区二区视频 | 一区二区三区在线视频播放 | 熟妇高潮一区二区高潮 | 国产成年视频 | 亚洲一区二区三区av无码 | 亚洲码国产精品高潮在线 | 神马影院一区二区 | 中文字幕亚洲在线 | 欧美一级爱爱 | 欧美日韩一级在线观看 | 精品国产午夜福利 | 国产精品成人99一区无码 | 欧美精品免费一区二区 | 超碰人人超 | 91精品美女 | 黑人黄色录像 | 国产二区自拍 | 中文文字幕一区二区三三 | 午夜精品在线免费观看 | 天天爱天天干天天操 | 国产精品成熟老女人 | 嫩草嫩草嫩草嫩草嫩草嫩草 | 亚洲一区二区免费 |