Ahh, gotcha.  Can I change the config so only python file is being used?

Mike

Mondain wrote:
> Your script is implementing an interface (as shown in the xml config)
> org.red5.server.webapp.oflaDemo.IDemoService which is the "hook" into
> the java environment.
> Therefore, you must add your method signature to that interface to have
> it visible to "callers"
> 
> Paul
> 
> On 1/28/07, *Michael Cassano* <[EMAIL PROTECTED]
> <mailto:[EMAIL PROTECTED]>> wrote:
> 
>     I clearly don't understand how this entire system works, but here is
>     where I am:
> 
>     1) I switched DemoService to run the JS version (demoservice.js).
>     2) I can't add any functions to demoservice.js, it claims they
>     aren't found
>     3) *I can* run the getListOfAvailableFLVs function in demoservice.js.
>     That works.
> 
>     Why can't I add function to this file?  Why can't I change the return
>     type of getListOfAvailableFLVs to, for example, a int?  There is
>     something restricting how I can use handler, but I don't understand how.
> 
>     Thanks so much, I feel like I am getting close.
> 
>     Mike
> 
>     Michael Cassano wrote:
>     > 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] <mailto:[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
>     <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] <mailto:[email protected]>
>     > http://osflash.org/mailman/listinfo/red5_osflash.org
> 
> 
>     _______________________________________________
>     Red5 mailing list
>     [email protected] <mailto:[email protected]>
>     http://osflash.org/mailman/listinfo/red5_osflash.org
> 
> 
> 
> 
> -- 
> The early bird may get the worm, but the second mouse gets the cheese.
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> Red5 mailing list
> [email protected]
> http://osflash.org/mailman/listinfo/red5_osflash.org


_______________________________________________
Red5 mailing list
[email protected]
http://osflash.org/mailman/listinfo/red5_osflash.org

Reply via email to