/** {@inheritDoc} */
 public IMessageInput getVODProviderInput(IScope scope, String name) {
   log.debug("getVODProviderInput - scope: {} name: {}", scope, name);
   File file = getVODProviderFile(scope, name);
   if (file == null) {
     return null;
   }
   IPipe pipe = new InMemoryPullPullPipe();
   pipe.subscribe(new FileProvider(scope, file), null);
   return pipe;
 }
Example #2
0
 /** {@inheritDoc} */
 public IMessageOutput getConsumerOutput(IClientStream stream) {
   IStreamCapableConnection streamConn = stream.getConnection();
   if (streamConn == null || !(streamConn instanceof RTMPConnection)) {
     return null;
   }
   RTMPConnection conn = (RTMPConnection) streamConn;
   // TODO Better manage channels.
   // now we use OutputStream as a channel wrapper.
   OutputStream o = conn.createOutputStream(stream.getStreamId());
   IPipe pipe = new InMemoryPushPushPipe();
   pipe.subscribe(
       new ConnectionConsumer(
           conn, o.getVideo().getId(), o.getAudio().getId(), o.getData().getId()),
       null);
   return pipe;
 }