public AcnStream(IPAddress bindIpAddress, int priority) { if (bindIpAddress == null) bindIpAddress = GetFirstBindAddress(); this.socket = new StreamingAcnSocket(animatrollerAcnId, "Animatroller"); this.socket.NewPacket += socket_NewPacket; this.socket.Open(bindIpAddress); log.Info("ACN binding to {0}", bindIpAddress); this.dmxStreamer = new DmxStreamer(this.socket); this.dmxStreamer.Priority = priority; this.sendingUniverses = new Dictionary<int, AcnUniverse>(); Executor.Current.Register(this); }
public AcnUniverse(Acn.DmxStreamer streamer, int universe, AcnStream parent) { this.streamer = streamer; this.universe = universe; this.parent = parent; this.dmxUniverse = new DmxUniverse(universe); bool isStreamerRunning = this.streamer.Streaming; if (isStreamerRunning) this.streamer.Stop(); this.streamer.AddUniverse(this.dmxUniverse); if (isStreamerRunning) this.streamer.Start(); }