[Red5] append mode broken

Dan Rossi spam at electroteque.org
Mon Dec 18 19:18:28 EST 2006


Hi should i be filing a bug or is this already a known issue ? Also is 
the patch below going to resolve my issues or is it just a hack ?

Dan Rossi wrote:
> Ok so dont file bug ? Should we hold off on appending ?
>
> What is the go with that patch then i had to add the patch to the 
> append part of publish aswell to subscribe to it.
>
> if (IClientStream.MODE_RECORD.equals(mode)) {
>                 IContext context = conn.getScope().getContext();
>                 IProviderService providerService = (IProviderService) 
> context
>                         .getBean(IProviderService.BEAN_NAME);
>                 // TODO handle registration failure
>                 if 
> (providerService.registerBroadcastStream(conn.getScope(),
>                         name, bs)) {
>                     bsScope = getBroadcastScope(conn.getScope(), name);
>                     
> bsScope.setAttribute(IBroadcastScope.STREAM_ATTRIBUTE, bs);
>                     if (conn instanceof BaseConnection) {
>                         ((BaseConnection) 
> conn).registerBasicScope(bsScope);
>                     }
>                 }
>                
>                 bs.start();
>                 bs.saveAs(name, false);
>             } else if (IClientStream.MODE_APPEND.equals(mode)) {
>                 IContext context = conn.getScope().getContext();
>                 IProviderService providerService = (IProviderService) 
> context
>                         .getBean(IProviderService.BEAN_NAME);
>                 // TODO handle registration failure
>                 if 
> (providerService.registerBroadcastStream(conn.getScope(),
>                         name, bs)) {
>                     bsScope = getBroadcastScope(conn.getScope(), name);
>                     
> bsScope.setAttribute(IBroadcastScope.STREAM_ATTRIBUTE, bs);
>                     if (conn instanceof BaseConnection) {
>                         ((BaseConnection) 
> conn).registerBasicScope(bsScope);
>                     }
>                 }
>
>                 bs.start();
>                 bs.saveAs(name, true);
>             } else if (IClientStream.MODE_LIVE.equals(mode)) {  ......
>
>
> I get this exception
>
> ion exceeds limit
> [ERROR] 315015 pool-1-thread-11:( 
> org.red5.server.stream.consumer.FileConsumer.e
> rror ) error init file consumer
> java.nio.BufferUnderflowException
>         at java.nio.Buffer.nextGetIndex(Unknown Source)
>         at java.nio.DirectByteBuffer.get(Unknown Source)
>         at 
> org.apache.mina.common.support.BaseByteBuffer.get(BaseByteBuffer.java
> :203)
>         at 
> org.red5.io.utils.IOUtils.readUnsignedMediumInt(IOUtils.java:58)
>         at 
> org.red5.io.flv.impl.FLVReader.readTagHeader(FLVReader.java:629)
>         at org.red5.io.flv.impl.FLVReader.readTag(FLVReader.java:454)
>         at org.red5.io.flv.impl.FLV.getAppendWriter(FLV.java:238)
>         at 
> org.red5.server.stream.consumer.FileConsumer.init(FileConsumer.java:1
> 70)
>         at 
> org.red5.server.stream.consumer.FileConsumer.pushMessage(FileConsumer
> .java:92)
>         at 
> org.red5.server.messaging.InMemoryPushPushPipe.pushMessage(InMemoryPu
> shPushPipe.java:78)
>         at 
> org.red5.server.stream.ClientBroadcastStream.dispatchEvent(ClientBroa
> dcastStream.java:316)
>         at 
> org.red5.server.net.rtmp.BaseRTMPHandler.messageReceived(BaseRTMPHand
> ler.java:151)
>         at 
> org.red5.server.net.rtmp.RTMPMinaIoHandler.messageReceived(RTMPMinaIo
> Handler.java:84)
>         at 
> org.apache.mina.common.support.AbstractIoFilterChain$2.messageReceive
> d(AbstractIoFilterChain.java:189)
>         at 
> org.apache.mina.common.support.AbstractIoFilterChain.callNextMessageR
> eceived(AbstractIoFilterChain.java:502)
>         at 
> org.apache.mina.common.support.AbstractIoFilterChain.access$1000(Abst
> ractIoFilterChain.java:52)
>         at 
> org.apache.mina.common.support.AbstractIoFilterChain$EntryImpl$1.mess
> ageReceived(AbstractIoFilterChain.java:777)
>         at 
> org.red5.io.filter.ExecutorFilter.processEvent(ExecutorFilter.java:23
> 1)
>         at 
> org.red5.io.filter.ExecutorFilter$ProcessEventsRunnable.run(ExecutorF
> ilter.java:280)
>         at 
> java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source
> )
>         at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown 
> Source)
>         at java.lang.Thread.run(Unknown Source)
> [ERROR] 315015 pool-1-thread-11:( 
> org.red5.server.messaging.InMemoryPushPushPipe
> .error ) exception when pushing message to consumer
> java.lang.NullPointerException
>         at 
> org.red5.server.stream.consumer.FileConsumer.pushMessage(FileConsumer
> .java:120)
>         at 
> org.red5.server.messaging.InMemoryPushPushPipe.pushMessage(InMemoryPu
> shPushPipe.java:78)
>         at 
> org.red5.server.stream.ClientBroadcastStream.dispatchEvent(ClientBroa
> dcastStream.java:316)
>         at 
> org.red5.server.net.rtmp.BaseRTMPHandler.messageReceived(BaseRTMPHand
> ler.java:151)
>         at 
> org.red5.server.net.rtmp.RTMPMinaIoHandler.messageReceived(RTMPMinaIo
> Handler.java:84)
>         at 
> org.apache.mina.common.support.AbstractIoFilterChain$2.messageReceive
> d(AbstractIoFilterChain.java:189)
>         at 
> org.apache.mina.common.support.AbstractIoFilterChain.callNextMessageR
> eceived(AbstractIoFilterChain.java:502)
>         at 
> org.apache.mina.common.support.AbstractIoFilterChain.access$1000(Abst
> ractIoFilterChain.java:52)
>         at 
> org.apache.mina.common.support.AbstractIoFilterChain$EntryImpl$1.mess
> ageReceived(AbstractIoFilterChain.java:777)
>         at 
> org.red5.io.filter.ExecutorFilter.processEvent(ExecutorFilter.java:23
> 1)
>         at 
> org.red5.io.filter.ExecutorFilter$ProcessEventsRunnable.run(ExecutorF
> ilter.java:280)
>         at 
> java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source
> )
>         at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown 
> Source)
>         at java.lang.Thread.run(Unknown Source)
> [
> ------------------------------------------------------------------------
>
> _______________________________________________
> Red5 mailing list
> Red5 at osflash.org
> http://osflash.org/mailman/listinfo/red5_osflash.org
>   

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://osflash.org/pipermail/red5_osflash.org/attachments/20061219/1e1601c1/attachment.htm


More information about the Red5 mailing list