Package org.red5.server.stream

Source Code of org.red5.server.stream.DummyConsumerService

package org.red5.server.stream;

import org.red5.server.api.stream.IClientStream;
import org.red5.server.api.stream.IStreamCapableConnection;
import org.red5.server.messaging.IMessageOutput;
import org.red5.server.messaging.IPipe;
import org.red5.server.messaging.InMemoryPushPushPipe;
import org.red5.server.net.rtmp.Channel;
import org.red5.server.stream.consumer.ConnectionConsumer;

public class DummyConsumerService implements IConsumerService {

  /** {@inheritDoc} */
  public IMessageOutput getConsumerOutput(IClientStream stream) {
    IStreamCapableConnection streamConn = stream.getConnection();
    if (streamConn != null) {
      Channel data = new Channel(null, 4);
      Channel video = new Channel(null, 5);
      Channel audio = new Channel(null, 6);
      IPipe pipe = new InMemoryPushPushPipe();
      pipe.subscribe(new ConnectionConsumer(video, audio, data), null);
      return pipe;
    }
    return null;
  }

}
TOP

Related Classes of org.red5.server.stream.DummyConsumerService

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.