public BroadcastScope(IScope parent, String name):base(parent, Constants.BroadcastScopeType, name, false) { _pipe = new InMemoryPushPushPipe(); _pipe.AddPipeConnectionListener(this); _compCounter = 0; _hasRemoved = false; _keepOnDisconnect = true; }
public IMessageOutput GetConsumerOutput(IClientStream stream) { IStreamCapableConnection streamConnection = stream.Connection; if (streamConnection == null || !(streamConnection is RtmpConnection)) return null; RtmpConnection connection = streamConnection as RtmpConnection; // TODO Better manage channels. // now we use OutputStream as a channel wrapper. OutputStream outputStream = connection.CreateOutputStream(stream.StreamId); IPipe pipe = new InMemoryPushPushPipe(); pipe.Subscribe(new ConnectionConsumer(connection, outputStream.Video.ChannelId, outputStream.Audio.ChannelId, outputStream.Data.ChannelId), null); return pipe; }