[Red5] Problems with buffering MP3 when playing from file ( not stream)

Mamontov Sergey V. moonlight at ua.elro.com
Fri Nov 16 04:41:52 PST 2007


Kyoung,

Thanks, but this method doesn't invokes on my main Application class.
I'm using classes of StreamService methods instead of ServerStream.

The problem was solved very easy:
public void streamSubscriberStart ( ISubscriberStream stream )
{
  ClientData client = ((ClientData)Red5.getConnectionLocal().getClient().getAttribute("client"));
  client.setStreamID(stream.getName());
}

:)

Now I have other problem :) Can someone explain me how to invoke some
method of my base application class from written by me custom class?
:) I will be grateful :)

Regards,

Sergey



>   
>  Application class
>  streamPublishStart(IBroadcastStream stream) {
>    IConnection conn = Red5.getConnectionLocal();
>    conn.setAttribute("streamName", stream.publishedName);
>  }
>   
>  in other Class
>  you can get the connection attribute
>   
>   
>   
>   
>   
>  
>> Date: Thu, 15 Nov 2007 22:36:21 +0200
>> From: moonlight at ua.elro.com
>> To: red5 at osflash.org
>> Subject: Re: [Red5] Problems with buffering MP3 when playing from file ( not stream)
>> 
>> Manuel,
>> 
>> Sounds great, but I noticed, what getSubscriberStream(IScope scope,
>> String streamName), mean time StreamService createStream() returns
>> integer as stream name, and I cant paste it to getSubscriberStream :(
>> 
>> > 
>> > 
>> > Manuel, 
>> > 
>> 
>> > 
>> > Oh, thanks, this is really interesting :)
>> > 
>> > I'm just new with Red5, but I need somehow to adapt it to needs of our project.
>> > 
>> > Thanks again, I will try it now :)
>> > 
>> 
>> > 
>> > Regards,
>> > 
>> 
>> > 
>> > Sergey
>> > 
>> 
>> > 
>> 
>> > 
>> > 
>> >>
>> > 
>> 
>> > 
>> 
>> > 
>> 
>> > 
>> > 2007/11/15, Mamontov Sergey V. <moonlight at ua.elro.com>:
>> > 
>> > I see, this is my second small question, but nobody can't answer :(
>> > 
>> 
>> > 
>> > Let's try to ask the third question: how to invoke pause action on
>> > 
>> > server-side, to stop stream?
>> > 
>> 
>> > 
>> 
>> > 
>> 
>> > 
>> > I haven't tried but it could work: 
>> > 
>> 
>> > 
>> > ISubscriberStream theStream = getSubscriberStream(theScope, theStreamName);
>> > 
>> > theStream.pause(thePosition);
>> > 
>> 
>> > 
>> 
>> > 
>> > http://dl.fancycode.com/red5/api/org/red5/server/adapter/MultiThreadedApplicationAdapter.html#getSubscriberStream(org.red5.server.api.IScope,%20java.lang.String>> > 
>> > http://dl.fancycode.com/red5/api/org/red5/server/api/stream/ISubscriberStream.html#pause(int)
>> > 
>> >  
>> > 
>> 
>> > 
>> 
>> > 
>> >> I found some mysterious behavior Red5 with stream, when i calling
>> > 
>> >> NetStream("some_file.mp3") before calling play I setup
>> > 
>> >> NetStream.bufferTime = 15;
>> > 
>> 
>> > 
>> > Shouldn't it be:
>> > 
>> 
>> > 
>> > NetStream.setBufferTime(15)
>> > 
>> 
>> > 
>> > ??
>> > 
>> >  
>> > 
>> > 
>> 
>> > 
>> 
>> > 
>> 
>> > 
>> 
>> > 
>> 
>> 
>> 
>> _______________________________________________
>> Red5 mailing list
>> Red5 at osflash.org
>> http://osflash.org/mailman/listinfo/red5_osflash.org



> Connect to the next generation of MSN Messenger  Get it now! 
>   
                 mailto:moonlight at ua.elro.com




More information about the Red5 mailing list