red5 边服务器是通过mian框架完成的,就我理解,就是边服务器接收客户端的rtmp请求后再转发给原服务器处理。
关于边服务器的类,个人理解:
org.red5.server.net.rtmp.EdgeRTMPMinaIoHandler - 接收到客户连接后注册ioSession
org.red5.server.net.rtmp.RTMPConnManager - 持有客户端连接(ioSession)
org.red5.server.net.mrtmp.EdgeMRTMPHandler - 连接源服务器成功后注册ioSession
org.red5.server.net.mrtmp.SimpleMRTMPEdgeManager - 持有源服务器的连接(ioSession)
主要配置文件有:
源:
conf/red5.properties - 主要配置端口和ip
conf/red5.xml - 上下文的配置,和不同模块的spring加载
conf/red5-origin-core.xml 源服务的核心配置
边:
conf/red5.properties - 主要配置端口和ip
conf/red5.xml - 上下文的配置,和不同模块的spring加载
conf/red5-edge-core.xml 边服务的核心配置
我遇到的问题:
边服务不能转发请求给源服务, 排查问题后, 发现类 org.red5.server.net.rtmp.EdgeRTMPHandler(messageReceived 71) 转换枚举类型错误,StreamAction.valueOf(action),修改成如下代码,正常运行
if (call.getServiceName() == null && !conn.isConnected() && action.equals(StreamAction.CONNECT.toString())) { handleConnect(conn, channel, header, (Invoke) message, (RTMP) state); return; }
附件中的red5-0.9.1.jar是我修改后的,直接修改名称为red5.jar 覆盖原有的red5.jar即可
注:red5 的log配置文件屏蔽了一些类的日志,可根据自身情况修改 conf/logback.xml 日志文件的配置,查看更详细的信息
以下是我运行成功的配器文件内容
一、源服务器,主要配置文件
conf/red5.xml
<?xml version="1.0" encoding="UTF-8"?> <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:lang="http://www.springframework.org/schema/lang" 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 file just wires together the context tree. Its accessed by ContextSingletonBeanFactoryLocator --> <bean id="placeholderConfig" class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"> <property name="location" value="classpath:/red5.properties" /> </bean> <!-- First we load the common context, its shared between all the other contexts --> <!-- Global context serves are the parent to all child contexts. --> <bean id="red5.common" class="org.springframework.context.support.FileSystemXmlApplicationContext"> <constructor-arg><list><value>classpath:/red5-common.xml</value></list></constructor-arg> </bean> <!-- Then we load the core context, with the common as parent --> <!-- Context holding all the networking, users should need to edit. --> <bean id="red5.core" class="org.springframework.context.support.FileSystemXmlApplicationContext"> <constructor-arg><list><value>classpath:/red5-origin-core.xml</value></list></constructor-arg> <constructor-arg><ref bean="red5.common" /></constructor-arg> </bean> <!-- Then we load the global contexts, note its important this happens before app container loads --> <bean id="context.loader" class="org.red5.server.ContextLoader" init-method="init"> <property name="parentContext" ref="red5.core" /> <property name="contextsConfig" value="classpath:red5.globals" /> </bean> <!-- Now we can load the servlet engine, this has to happen after the context are loaded --> <!-- <bean id="jetty6.server" class="org.red5.server.jetty.JettyLoader" init-method="init" autowire="byType" depends-on="context.loader"> <property name="webappFolder" value="${red5.root}/webapps" /> </bean> --> <!-- Tomcat servlet engine / http server --> <bean id="tomcat.server" class="org.red5.server.tomcat.TomcatLoader" init-method="init" destroy-method="shutdown" depends-on="context.loader"> <property name="webappFolder" value="${red5.root}/webapps" /> <property name="connector"> <bean class="org.apache.catalina.connector.Connector"> <constructor-arg type="java.lang.String" value="org.apache.coyote.http11.Http11Protocol" /> <property name="port"><value>${http.port}</value></property> <property name="redirectPort"><value>${https.port}</value></property> <property name="enableLookups"><value>false</value></property> </bean> </property> <property name="baseHost"> <bean class="org.apache.catalina.core.StandardHost"> <property name="name" value="${http.host}" /> <property name="unpackWARs" value="true" /> <property name="autoDeploy" value="true" /> <property name="xmlValidation" value="false" /> <property name="xmlNamespaceAware" value="false" /> </bean> </property> <property name="valves"> <list> <bean id="valve.access" class="org.apache.catalina.valves.AccessLogValve"> <property name="directory" value="log" /> <property name="prefix" value="${http.host}_access." /> <property name="suffix" value=".log" /> <property name="pattern" value="common" /> <property name="resolveHosts" value="false" /> <property name="rotatable" value="true" /> </bean> </list> </property> </bean> <!-- <bean id="tomcat.server" class="org.red5.server.tomcat.TomcatLoader" init-method="init" destroy-method="shutdown" autowire="byType" depends-on="context.loader"> <!- - Note: the webapp root folder must be specified before the "contexts" property - -> <property name="webappFolder" value="${red5.root}/webapps" /> <property name="embedded"> <bean class="org.apache.catalina.startup.Embedded" /> </property> <property name="engine"> <bean class="org.apache.catalina.core.StandardEngine"> <property name="name" value="red5Engine" /> <property name="defaultHost" value="localhost" /> </bean> </property> <property name="realm"> <bean class="org.apache.catalina.realm.MemoryRealm" /> </property> <property name="connector"> <bean class="org.apache.catalina.connector.Connector"> <property name="port"><value>5080</value></property> <property name="redirectPort"><value>8443</value></property> <property name="enableLookups"><value>false</value></property> </bean> </property> <property name="baseHost"> <bean class="org.apache.catalina.core.StandardHost"> <property name="name" value="localhost" /> <property name="unpackWARs" value="true" /> <property name="autoDeploy" value="true" /> <property name="xmlValidation" value="false" /> <property name="xmlNamespaceAware" value="false" /> </bean> </property> <property name="valves"> <list> <bean id="valve.access" class="org.apache.catalina.valves.AccessLogValve"> <property name="directory" value="." /> <property name="prefix" value="localhost_access." /> <property name="suffix" value=".log" /> <property name="pattern" value="common" /> <property name="resolveHosts" value="false" /> <property name="rotatable" value="true" /> </bean> </list> </property> <property name="contexts"> <map> <entry> <key><value>/</value></key> <value>/root</value> </entry> </map> </property> </bean> --> <!-- Default context. This can be shared between web app contexts --> <bean id="default.context" class="org.springframework.context.support.FileSystemXmlApplicationContext"> <constructor-arg><value>/webapps/red5-default.xml</value></constructor-arg> <constructor-arg><ref bean="red5.common" /></constructor-arg> </bean> <!-- You can add further contexts here. This allows for multiple separate global scopes --> </beans>
conf/red5-origin-core.xml
<?xml version="1.0" encoding="UTF-8" ?> <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:lang="http://www.springframework.org/schema/lang" 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 holds all the networking: mina --> <bean id="customEditorConfigurer" class="org.springframework.beans.factory.config.CustomEditorConfigurer"> <property name="customEditors"> <map> <entry key="java.net.SocketAddress"> <bean class="org.apache.mina.integration.beans.InetSocketAddressEditor" /> </entry> </map> </property> </bean> <bean id="placeholderConfig" class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"> <property name="location" value="classpath:/red5.properties" /> </bean> <!-- RTMP Handler --> <bean id="rtmpHandler" class="org.red5.server.net.rtmp.RTMPHandler"> <property name="server" ref="red5.server" /> <property name="statusObjectService" ref="statusObjectService" /> <property name="globalScopeConnectionAllowed" value="true" /> </bean> <bean id="mrtmpManager" class="org.red5.server.net.mrtmp.SimpleMRTMPOriginManager" > <property name="originMRTMPHandler" ref="mrtmpMinaIoHandler" /> </bean> <bean id="mrtmpCodecFactory" class="org.red5.server.net.mrtmp.codec.MRTMPCodecFactory" /> <!-- MRTMP Mina IO Handler --> <bean id="mrtmpMinaIoHandler" class="org.red5.server.net.mrtmp.OriginMRTMPHandler"> <property name="handler" ref="rtmpHandler" /> <property name="mrtmpManager" ref="mrtmpManager" /> <property name="codecFactory" ref="mrtmpCodecFactory" /> </bean> <!-- MRTMP Mina Transport --> <bean id="mrtmpTransport" class="org.red5.server.net.mrtmp.MRTMPMinaTransport" init-method="start" destroy-method="stop"> <property name="ioHandler" ref="mrtmpMinaIoHandler" /> <property name="address" value="${mrtmp.host}" /> <property name="port" value="${mrtmp.port}" /> <property name="receiveBufferSize" value="${mrtmp.receive_buffer_size}" /> <property name="sendBufferSize" value="${mrtmp.send_buffer_size}" /> <property name="eventThreadsCore" value="${mrtmp.event_threads_core}" /> <property name="eventThreadsMax" value="${mrtmp.event_threads_max}" /> <property name="eventThreadsQueue" value="${mrtmp.event_threads_queue}" /> <property name="eventThreadsKeepalive" value="${mrtmp.event_threads_keepalive}" /> <property name="tcpNoDelay" value="${mrtmp.tcp_nodelay}" /> </bean> <!-- Uncomment this if you run Origin on a different server from Edge and still want to use RTMP <bean id="rtmpConnManager" class="org.red5.server.net.rtmp.RTMPConnManager"> </bean> <bean id="rtmpMinaIoHandler" class="org.red5.server.net.rtmp.RTMPMinaIoHandler"> <property name="handler" ref="rtmpHandler" /> <property name="codecFactory" ref="rtmpCodecFactory" /> <property name="rtmpConnManager" ref="rtmpConnManager" /> </bean> <bean id="rtmpTransport" class="org.red5.server.net.rtmp.RTMPMinaTransport" init-method="start" destroy-method="stop"> <property name="ioHandler" ref="rtmpMinaIoHandler" /> <property name="address" value="${rtmp.host}" /> <property name="port" value="${rtmp.port}" /> <property name="receiveBufferSize" value="${rtmp.receive_buffer_size}" /> <property name="sendBufferSize" value="${rtmp.send_buffer_size}" /> <property name="eventThreadsCore" value="${rtmp.event_threads_core}" /> <property name="eventThreadsMax" value="${rtmp.event_threads_max}" /> <property name="eventThreadsQueue" value="${rtmp.event_threads_queue}" /> <property name="eventThreadsKeepalive" value="${rtmp.event_threads_keepalive}" /> <property name="jmxPollInterval" value="1000" /> <property name="tcpNoDelay" value="${rtmp.tcp_nodelay}" /> </bean> <bean id="rtmpMinaConnection" scope="prototype" class="org.red5.server.net.rtmp.RTMPMinaConnection"> <property name="pingInterval" value="${rtmp.ping_interval}" /> <property name="maxInactivity" value="${rtmp.max_inactivity}" /> <property name="maxHandshakeTimeout" value="5000" /> </bean> --> <bean id="rtmpMinaConnManager" class="org.red5.server.net.rtmp.RTMPConnManager"> </bean> <bean id="rtmpMinaIoHandler" class="org.red5.server.net.rtmp.RTMPMinaIoHandler"> <property name="handler" ref="rtmpHandler" /> <property name="codecFactory" ref="rtmpCodecFactory" /> <property name="rtmpConnManager" ref="rtmpMinaConnManager" /> </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="connectors"> <list> <bean class="java.net.InetSocketAddress"> <constructor-arg index="0" type="java.lang.String" value="${rtmp.host}" /> <constructor-arg index="1" type="int" value="${rtmp.port}" /> </bean> <!-- You can now add additional ports and ip addresses <bean class="java.net.InetSocketAddress"> <constructor-arg index="0" type="java.lang.String" value="${rtmp.host}" /> <constructor-arg index="1" type="int" value="1936" /> </bean> --> </list> </property> <property name="receiveBufferSize" value="${rtmp.receive_buffer_size}" /> <property name="sendBufferSize" value="${rtmp.send_buffer_size}" /> <property name="connectionThreads" value="${rtmp.connect_threads}" /> <property name="ioThreads" value="${rtmp.io_threads}" /> <!-- This is the interval at which the sessions are polled for stats. If mina monitoring is not enabled, polling will not occur. --> <property name="jmxPollInterval" value="1000" /> <property name="tcpNoDelay" value="${rtmp.tcp_nodelay}" /> </bean> <!-- RTMP Mina Connection --> <bean id="rtmpMinaConnection" scope="prototype" class="org.red5.server.net.rtmp.RTMPMinaConnection"> <!-- 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="5000" /> </bean> <!-- + The following configuration is for RTMPT. --> <bean id="rtmptConnManager" class="org.red5.server.net.rtmp.RTMPConnManager"> </bean> <!-- 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="handler" ref="rtmptHandler" /> <property name="rtmpConnManager" ref="rtmptConnManager" /> </bean> <!-- RTMPT Connection --> <bean id="rtmptConnection" scope="prototype" class="org.red5.server.net.rtmpt.RTMPTConnection"> <!-- 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="5000" /> </bean> <!-- Jetty RTMPT Container --> <!-- <bean id="rtmpt.server" class="org.red5.server.net.rtmpt.RTMPTLoader" init-method="init" autowire="byType" /> --> <!-- Tomcat Container --> <!-- <bean id="rtmpt.server" class="org.red5.server.net.rtmpt.TomcatRTMPTLoader" init-method="init" lazy-init="true"> <property name="webappFolder" value="${red5.root}/webapps" /> <property name="connector"> <bean class="org.apache.catalina.connector.Connector"> <constructor-arg type="java.lang.String" value="org.apache.coyote.http11.Http11NioProtocol" /> <property name="port"><value>${rtmpt.port}</value></property> <property name="enableLookups"><value>false</value></property> </bean> </property> <property name="host"> <bean class="org.apache.catalina.core.StandardHost"> <property name="name" value="${rtmpt.host}" /> <property name="unpackWARs" value="false" /> <property name="autoDeploy" value="false" /> <property name="xmlValidation" value="false" /> <property name="xmlNamespaceAware" value="false" /> </bean> </property> </bean> --> <bean id="rtmpt.server" class="org.red5.server.tomcat.rtmpt.RTMPTLoader" init-method="init" lazy-init="true"> <property name="webappFolder" value="${red5.root}/webapps" /> <property name="connector"> <bean class="org.apache.catalina.connector.Connector"> <constructor-arg type="java.lang.String" value="org.apache.coyote.http11.Http11NioProtocol" /> <property name="port"><value>${rtmpt.port}</value></property> <property name="enableLookups"><value>false</value></property> </bean> </property> <property name="connectionProperties"> <map> <entry key="maxKeepAliveRequests" value="${rtmpt.max_keep_alive_requests}"/> <entry key="useExecutor" value="true"/> <entry key="maxThreads" value="${rtmpt.max_threads}"/> <entry key="acceptorThreadCount" value="${rtmpt.acceptor_thread_count}"/> <entry key="processorCache" value="${rtmpt.processor_cache}"/> </map> </property> <property name="host"> <bean class="org.apache.catalina.core.StandardHost"> <property name="name" value="${rtmpt.host}" /> <property name="unpackWARs" value="false" /> <property name="autoDeploy" value="false" /> <property name="xmlValidation" value="false" /> <property name="xmlNamespaceAware" value="false" /> </bean> </property> </bean> <!-- <bean id="rtmpt.server" class="org.red5.server.net.rtmpt.TomcatRTMPTLoader" init-method="init" autowire="byType"> <property name="embedded"> <bean class="org.apache.catalina.startup.Embedded" /> </property> <property name="engine"> <bean class="org.apache.catalina.core.StandardEngine"> <property name="name" value="rtmptServletHandler" /> <property name="defaultHost" value="localhost" /> </bean> </property> <property name="connector"> <bean class="org.apache.catalina.connector.Connector"> <property name="port"><value>8088</value></property> <property name="enableLookups"><value>false</value></property> </bean> </property> <property name="host"> <bean class="org.apache.catalina.core.StandardHost"> <property name="name" value="localhost" /> <property name="unpackWARs" value="false" /> <property name="autoDeploy" value="false" /> <property name="xmlValidation" value="false" /> <property name="xmlNamespaceAware" value="false" /> </bean> </property> <property name="context"> <map> <entry> <key><value>name</value></key> <value>rtmptContext</value> </entry> <entry> <key><value>path</value></key> <value></value> </entry> <entry> <key><value>docBase</value></key> <value>/</value> </entry> </map> </property> <property name="wrapper"> <bean class="org.apache.catalina.core.StandardWrapper"> <property name="servletName" value="RTMPTServlet" /> <property name="servletClass" value="org.red5.server.net.servlet.RTMPTServlet" /> </bean> </property> <property name="mappings"> <map> <entry> <key><value>RTMPTServlet</value></key> <value>/open/*</value> </entry> <entry> <key><value>RTMPTServlet</value></key> <value>/close/*</value> </entry> <entry> <key><value>RTMPTServlet</value></key> <value>/send/*</value> </entry> <entry> <key><value>RTMPTServlet</value></key> <value>/idle/*</value> </entry> </map> </property> </bean> --> <!-- RTMPS --> <!-- <bean id="rtmps.server" class="org.red5.server.net.rtmps.TomcatRTMPSLoader" init-method="init" lazy-init="true"> <property name="webappFolder" value="${red5.root}/webapps" /> <property name="connector"> <bean class="org.apache.catalina.connector.Connector"> <constructor-arg type="java.lang.String" value="org.apache.coyote.http11.Http11NioProtocol" /> <property name="port" value="${rtmps.port}" /> <property name="redirectPort" value="${rtmp.port}" /> </bean> </property> <property name="host"> <bean class="org.apache.catalina.core.StandardHost"> <property name="name" value="${rtmps.host}" /> <property name="unpackWARs" value="false" /> <property name="autoDeploy" value="false" /> <property name="xmlValidation" value="false" /> <property name="xmlNamespaceAware" value="false" /> </bean> </property> <property name="connectionProperties"> <map> <entry> <key><value>SSLEnabled</value></key> <value>true</value> </entry> <entry> <key><value>sslProtocol</value></key> <value>TLS</value> </entry> <entry> <key><value>clientAuth</value></key> <value>false</value> </entry> <entry> <key><value>keystoreFile</value></key> <value>conf/keystore</value> </entry> <entry> <key><value>keystorePass</value></key> <value>${rtmps.keystorepass}</value> </entry> <entry> <key><value>keystoreType</value></key> <value>JKS</value> </entry> </map> </property> <property name="valves"> <list> <bean id="valve.access" class="org.apache.catalina.valves.AccessLogValve"> <property name="directory" value="log" /> <property name="prefix" value="${rtmps.host}_rtmps_access." /> <property name="suffix" value=".log" /> <property name="pattern" value="common" /> <property name="resolveHosts" value="false" /> <property name="rotatable" value="true" /> </bean> </list> </property> </bean> --> </beans>
二、边服务器的主要配置
conf/red5.xml
<?xml version="1.0" encoding="UTF-8"?> <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:lang="http://www.springframework.org/schema/lang" 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 file just wires together the context tree. Its accessed by ContextSingletonBeanFactoryLocator --> <bean id="placeholderConfig" class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"> <property name="location" value="classpath:/red5.properties" /> </bean> <!-- First we load the common context, its shared between all the other contexts --> <!-- Global context serves are the parent to all child contexts. --> <bean id="red5.common" class="org.springframework.context.support.FileSystemXmlApplicationContext"> <constructor-arg><list><value>classpath:/red5-common.xml</value></list></constructor-arg> </bean> <!-- Then we load the core context, with the common as parent --> <!-- Context holding all the networking, users should need to edit. --> <bean id="red5.core" class="org.springframework.context.support.FileSystemXmlApplicationContext"> <constructor-arg><list><value>classpath:/red5-edge-core.xml</value></list></constructor-arg> <constructor-arg><ref bean="red5.common" /></constructor-arg> </bean> <!-- Then we load the global contexts, note its important this happens before app container loads --> <bean id="context.loader" class="org.red5.server.ContextLoader" init-method="init"> <property name="parentContext" ref="red5.common" /> <property name="contextsConfig" value="classpath:red5.globals" /> </bean> </beans>
conf/red5-edge-core.xml
<?xml version="1.0" encoding="UTF-8" ?> <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:lang="http://www.springframework.org/schema/lang" 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 holds all the networking: mina --> <bean id="customEditorConfigurer" class="org.springframework.beans.factory.config.CustomEditorConfigurer"> <property name="customEditors"> <map> <entry key="java.net.SocketAddress"> <bean class="org.apache.mina.integration.beans.InetSocketAddressEditor" /> </entry> </map> </property> </bean> <bean id="placeholderConfig" class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"> <property name="location" value="classpath:/red5.properties" /> </bean> <!-- RTMP Handler --> <bean id="rtmpHandler" class="org.red5.server.net.rtmp.EdgeRTMPHandler"> <property name="server" ref="red5.server" /> <property name="statusObjectService" ref="statusObjectService" /> <property name="MRTMPManager" ref="mrtmpEdgeManager" /> </bean> <bean id="rtmpMinaConnManager" class="org.red5.server.net.rtmp.RTMPConnManager"> </bean> <!-- RTMP Mina IO Handler --> <bean id="rtmpMinaIoHandler" class="org.red5.server.net.rtmp.EdgeRTMPMinaIoHandler"> <property name="handler" ref="rtmpHandler" /> <property name="codecFactory" ref="rtmpCodecFactory" /> <property name="rtmpConnManager" ref="rtmpMinaConnManager" /> </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="address" value="${rtmp.host}" /> <property name="port" value="${rtmp.port}" /> <property name="receiveBufferSize" value="${rtmp.receive_buffer_size}" /> <property name="sendBufferSize" value="${rtmp.send_buffer_size}" /> <property name="eventThreadsCore" value="${rtmp.event_threads_core}" /> <property name="eventThreadsMax" value="${rtmp.event_threads_max}" /> <property name="eventThreadsQueue" value="${rtmp.event_threads_queue}" /> <property name="eventThreadsKeepalive" value="${rtmp.event_threads_keepalive}" /> --> <!-- This is the interval at which the sessions are polled for stats. If mina monitoring is not enabled, polling will not occur. --> <!-- <property name="jmxPollInterval" value="1000" /> <property name="tcpNoDelay" value="${rtmp.tcp_nodelay}" /> </bean> --> <bean id="rtmpTransport" class="org.red5.server.net.rtmp.RTMPMinaTransport" init-method="start" destroy-method="stop"> <property name="ioHandler" ref="rtmpMinaIoHandler" /> <property name="connectors"> <list> <bean class="java.net.InetSocketAddress"> <constructor-arg index="0" type="java.lang.String" value="${rtmp.host}" /> <constructor-arg index="1" type="int" value="${rtmp.port}" /> </bean> <!-- You can now add additional ports and ip addresses <bean class="java.net.InetSocketAddress"> <constructor-arg index="0" type="java.lang.String" value="${rtmp.host}" /> <constructor-arg index="1" type="int" value="1936" /> </bean> --> </list> </property> <property name="receiveBufferSize" value="${rtmp.receive_buffer_size}" /> <property name="sendBufferSize" value="${rtmp.send_buffer_size}" /> <property name="connectionThreads" value="${rtmp.connect_threads}" /> <property name="ioThreads" value="${rtmp.io_threads}" /> <!-- This is the interval at which the sessions are polled for stats. If mina monitoring is not enabled, polling will not occur. --> <property name="jmxPollInterval" value="1000" /> <property name="tcpNoDelay" value="${rtmp.tcp_nodelay}" /> </bean> <!-- RTMP Mina Connection --> <bean id="rtmpEdgeMinaConnection" scope="prototype" class="org.red5.server.net.rtmp.EdgeRTMPMinaConnection"> <!-- 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="5000" /> <property name="mrtmpManager" ref="mrtmpEdgeManager" /> </bean> <bean id="mrtmpCodecFactory" class="org.red5.server.net.mrtmp.codec.MRTMPCodecFactory" /> <bean id="mrtmpHandler" class="org.red5.server.net.mrtmp.EdgeMRTMPHandler"> <property name="mrtmpManager" ref="mrtmpEdgeManager"/> <property name="codecFactory" ref="mrtmpCodecFactory" /> <property name="rtmpConnManager" ref="rtmpMinaConnManager" /> </bean> <bean id="mrtmpClient" class="org.red5.server.net.mrtmp.MRTMPClient" init-method="start" > <property name="ioHandler" ref="mrtmpHandler" /> <property name="server" value="${mrtmp.server}" /> <property name="port" value="${mrtmp.port}" /> </bean> <bean id="mrtmpEdgeManager" class="org.red5.server.net.mrtmp.SimpleMRTMPEdgeManager"> <property name="rtmpConnManager" ref="rtmpMinaConnManager" /> </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="receiveBufferSize" value="${rtmp.receive_buffer_size}" /> <property name="sendBufferSize" value="${rtmp.send_buffer_size}" /> <property name="eventThreadsCore" value="${rtmp.event_threads_core}" /> <property name="eventThreadsMax" value="${rtmp.event_threads_max}" /> <property name="eventThreadsQueue" value="${rtmp.event_threads_queue}" /> <property name="eventThreadsKeepalive" value="${rtmp.event_threads_keepalive}" /> </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>
相关推荐
总的来说,"red5-0.9.1.tar.gz"是一个用于搭建流媒体服务的工具包,适用于开发者和系统管理员,他们可以通过它构建和管理自己的音视频流应用,提供高效、稳定的多媒体内容传输服务。如果你是初次接触Red5,建议参考...
总的来说,Red5-0.9.1是一个功能强大的流媒体服务器解决方案,适合那些对服务器有定制需求或希望在不依赖第三方服务的情况下提供视频直播的开发者和企业。不过,由于版本较旧,可能不支持最新的技术标准和优化,因此...
red5-0.9.1 red5-0.9.1
这个“setup-Red5-0.9.1.rar”压缩包包含的是Red5服务器的安装程序“setup-Red5-0.9.1.exe”,用于在你的计算机上部署Red5服务。 Red5的出现主要是为了提供与Adobe Flash Media Server(FMS)类似的功能,但作为一...
标题中的"proxool-0.9.1.jar"和"proxool_cglib-0.9.1.jar"是两个Java库文件,它们是Proxool项目在0.9.1版本时的实现。Proxool是一个开源的数据库连接池,它提供了一种灵活且高效的解决方案来管理数据库连接。在Java...
赠送原API文档:jjwt-0.9.1-javadoc.jar; 赠送源代码:jjwt-0.9.1-sources.jar; 赠送Maven依赖信息文件:jjwt-0.9.1.pom; 包含翻译后的API文档:jjwt-0.9.1-javadoc-API文档-中文(简体)版.zip; Maven坐标:io....
validatious-0.9.1-src.zipvalidatious-0.9.1-src.zipvalidatious-0.9.1-src.zipvalidatious-0.9.1-src.zipvalidatious-0.9.1-src.zipvalidatious-0.9.1-src.zipvalidatious-0.9.1-src.zipvalidatious-0.9.1-src....
setup-Red5-1.0.0.exe 官方安装包 java开源流媒体软件 windows版本
《NFS-TexEd-0.9.1:纹理编辑器在极品飞车9中的应用与探索》 在游戏世界中,尤其是赛车类游戏,视觉效果对于玩家的沉浸感至关重要。"NFS-TexEd-0.9.1"是一款专为极品飞车9(Need for Speed: Most Wanted)设计的...
标题中的"red5-0.9.1.src.zip"表明这是一个关于Red5服务器的0.9.1版本的源代码压缩包。 源代码是软件开发的核心,它揭示了程序的内部工作原理,对于开发者来说极其重要。通过分析和修改源代码,开发者可以深入理解...
torchvision-0.9.1+cpu-cp38-cp38-linux_x86_64.whl
proxool-0.9.1.jar包是一个数据库连接池包,最新版解决前几个版本里在二次关闭一个rs集的时候警告等一些bug。proxool-0.9.1.jar监控在对中文监控出现乱码情况做了更改。具体是对org.logicalcobwebs.proxool.admin....
torchvision-0.9.1+cpu-cp38-cp38-linux_x86_64.whl.zip
标题中的“hibernate3+ proxool-0.9.1配置”涉及到的是在Java开发中,使用Hibernate3 ORM框架与Proxool连接池的整合配置。Hibernate3是一款流行的持久层框架,它允许开发者用面向对象的方式来操作数据库,而Proxool...
EasyDBO是一个超轻量级对象-关系映射(Object/Relation Mapping,简称ORM)系统,主要解决关系数据库系统中表数据与对象的自动映射,当前支持My SQL、MS SQL、Access三种数据库系统下测试通过。
"Proxool-0.9.1-source"是Proxool的一个特定版本的源代码包,主要用于数据库连接池管理。Proxool是一个开源的、基于Java的数据库连接池实现,它提供了一种灵活且可扩展的方式来管理和优化数据库连接。在这个0.9.1...
5. **tez-mapreduce-0.9.1.jar**:提供了与Hadoop MapReduce的集成,使得可以在MapReduce环境中使用Tez。 6. **tez-runtime-internals-0.9.1.jar**:包含了Tez运行时的内部实现,例如任务执行、资源管理和通信协议...
torchvision-0.9.1-cp39-cp39-linux_x86_64.whl