Joseph,
As you can see from the output I posted, the python script is running:
> Python appConnect: RTMPMinaConnection from 75.72.166.XXX:4340 to
> 216.70.XXX.XXX (in: 3394, out: 3073) array([], java.lang.Object )
> Python setting bandwidth limits
That is output from main.py (if I change that file, the output changes),
which handles the Application when someone connects. Yes, I can stream
and record with my Flash App.
Attached is demoservice.py (which is stripped down from what it is in
the red5 package), and my red5-web.xml file. When I start red5, I get
no errors. demoservice.py is in WEB-INF/classes/applications.
Thanks!
Mike
joseph wamicha wrote:
> Hi Mike,
>
> Are the other methods eg getListOfAvailableFLVs, working ok? Are you
> able to connect and stream?
> There's a chance your red5-web.xml is incorrectly configured and so you
> call the ordinary java classes rather than the python script and of
> course the java class doesn't have your new method. Please post your
> red5-web.xml file, so we can see.
>
>>Hello,
>
> I changed the red5-web.xml file for oflaDemo to use the Python scripts.
> I added:
>
> def toAdd():
> return '1'
>
> to demoservice.py, and restarted my server. In my Flash app I added:
>
> client_nc.call("demoService.toAdd");
>
> and when that line runs I get:
>
> Python appConnect: RTMPMinaConnection from 75.72.166.XXX:4340 to
> 216.70.XXX.XXX (in: 3394, out: 3073) array([], java.lang.Object )
> Python setting bandwidth limits
> [ERROR] 13455 pool-1-thread-5:(
> org.red5.server.service.ServiceInvoker.error ) Method toAdd not found in
> Error
>
> Any ideas?
>
> Thanks!
>
> Mike
> ~
>
> --
> C is forever.
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> Red5 mailing list
> [email protected]
> http://osflash.org/mailman/listinfo/red5_osflash.org
<?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.0.xsd
http://www.springframework.org/schema/lang http://www.springframework.org/schema/lang/spring-lang-2.0.xsd">
<bean id="placeholderConfig" class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
<property name="location" value="/WEB-INF/red5-web.properties" />
</bean>
<bean id="web.context" class="org.red5.server.Context"
autowire="byType" />
<bean id="web.scope" class="org.red5.server.WebScope"
init-method="register">
<property name="server" ref="red5.server" />
<property name="parent" ref="global.scope" />
<property name="context" ref="web.context" />
<property name="handler" ref="web.handler" />
<property name="contextPath" value="${webapp.contextPath}" />
<property name="virtualHosts" value="${webapp.virtualHosts}" />
</bean>
<bean id="web.handler" class="org.red5.server.script.jython.JythonScriptFactory">
<constructor-arg index="0" value="classpath:applications/main.py"/>
<constructor-arg index="1">
<list>
<value>org.red5.server.api.IScopeHandler</value>
<value>org.red5.server.adapter.IApplication</value>
</list>
</constructor-arg>
<constructor-arg index="2">
<list>
<value>One</value>
<value>2</value>
<value>III</value>
</list>
</constructor-arg>
</bean>
<bean id="demoService.service" class="org.red5.server.script.jython.JythonScriptFactory">
<constructor-arg index="0" value="classpath:applications/demoservice.py"/>
<constructor-arg index="1">
<list>
<value>org.red5.server.webapp.oflaDemo.IDemoService</value>
</list>
</constructor-arg>
<constructor-arg index="2" ref="web.handler"/>
</bean>
<bean class="org.springframework.scripting.support.ScriptFactoryPostProcessor"/>
</beans>
from org.red5.server.api import Red5
class DemoService:
def toAdd():
return '1'
def getInstance(*args):
print 'Arguments:', args
return DemoService()
_______________________________________________
Red5 mailing list
[email protected]
http://osflash.org/mailman/listinfo/red5_osflash.org