-
-
Notifications
You must be signed in to change notification settings - Fork 995
General How to
David Maas edited this page Feb 2, 2020
·
3 revisions
Herein we cover how to do stuff with Red5.
Video tutorials:
The logging filter gives more insight into what I/O operations are occurring within the Mina layer.
- Add this node to the rtmpTransport bean entry in the conf/red5-core.xml file
<property name="enableMinaLogFilter" value="${mina.logfilter.enable}" />
- Add this to your conf/red5.properties file
mina.logfilter.enable=true
- Add this to your conf/logback.xml
<logger name="org.red5.server.net.rtmp.RTMPMinaTransport">
<level value="INFO"/>
</logger>
You'll see entries from the logger like this:
2013-04-24 09:40:35,285 [NioProcessor-2] INFO o.r.s.net.rtmp.RTMPMinaTransport - CREATED
These are the various ways to access the application adapter.
-
Via Spring [http://www.newviewnetworks.com/nvnhome/blog/client/uploads/Red5_Services.swf]
-
Through an ApplicationContext
IContext context = scope.getContext();
ApplicationContext appCtx = context.getApplicationContext();
Application app = (Application) appCtx.getBean("web.handler");
- In a Servlet or JSP
ApplicationContext appCtx = (ApplicationContext) getServletContext().getAttribute(WebApplicationContext.ROOT_WEB_APPLICATION_CONTEXT_ATTRIBUTE);
Application app = (Application) appCtx.getBean("web.handler");
- Using the ApplicationContextAware interface
this.application = (Application) appCtx.getBean("web.handler");
- Via PHP running within Red5
<?
import org.springframework.context.ApplicationContext;
import org.springframework.web.context.WebApplicationContext;
$session = $request->getSession(true);
$ctx = $session->getServletContext();
$appCtx = $ctx->getAttribute("org.springframework.web.context.WebApplicationContext.ROOT");
?>
This option uses Quercus. Blog post: PHP in Red5
####labels applicationadapter, php, servlet, application