Example #1
0
        protected void mediaRendererRemovedSink(CpAVRenderer _avRenderer)
        {
            Renderer.Renderer renderer;

            this.writeLog(LogType.Info, String.Format("MediaRenderer '{0}' verloren (UDN: {1})", _avRenderer.FriendlyName, _avRenderer.UniqueDeviceName));

            if (!renderers.ContainsKey(_avRenderer.UniqueDeviceName))
                return;

            if (!renderers.TryGetValue(_avRenderer.UniqueDeviceName, out renderer))
                return;

            if (renderer.isVirtualRenderer())
                this.linkVirtualRendererToZone((RendererVirtual)renderer, true, false);

            renderers.Remove(renderer.udn);

            if (mediaRendererFound != null) mediaRendererRemoved();
        }
Example #2
0
 public Renderer(CpAVRenderer _avRenderer)
 {
     renderer = _avRenderer;
     udn = renderer.UniqueDeviceName;
     currentTrack = new TrackInfo();
 }
Example #3
0
        protected void mediaRendererFoundSink(CpAVRenderer _avRenderer)
        {
            Renderer.Renderer   renderer;

            this.writeLog(LogType.Info, String.Format("MediaRenderer '{0}' gefunden (UDN: {1})", _avRenderer.FriendlyName, _avRenderer.UniqueDeviceName));

            if (_avRenderer.isVirtualRenderer())
            {
                renderer = new RendererVirtual(_avRenderer);
                if (renderers.ContainsKey(renderer.udn))
                    renderers.Remove(renderer.udn);
                renderers.Add(renderer.udn, renderer);
                this.linkVirtualRendererToZone((RendererVirtual)renderer);
            }
            else
            {
                renderer = new RendererRoom(_avRenderer);
                if (renderers.ContainsKey(renderer.udn))
                    renderers.Remove(renderer.udn);
                renderers.Add(renderer.udn, renderer);
                this.linkRoomRendererToRoom((RendererRoom)renderer);
            }

            renderer.muteStateChanged += renderer_muteStateChangedSink;
            renderer.volumeChanged += renderer_volumeChangedSink;

            if (mediaRendererFound != null) mediaRendererFound();
        }
Example #4
0
 public RendererRoom(CpAVRenderer _avRenderer)
     : base(_avRenderer)
 {
     this.setListen();
 }
Example #5
0
 public RendererVirtual(CpAVRenderer _avRenderer)
     : base(_avRenderer)
 {
     renderer.Connections[0].initTimer(); // hmmm.... doesnt work for any reason?!
     this.setListen();
 }
Example #6
0
 protected void volumeChangedSink(CpAVRenderer _connection, ushort _volume)
 {
     currentVolume = _volume;
     if (volumeChanged != null) volumeChanged(this.udn, _volume);
 }
Example #7
0
 protected void resultSetVolumeSink(CpAVRenderer _renderer, object _o)
 {
     isSetVolumeInProgress = false;
     if (storedVolume > 0)
     {
         setVolume((uint)storedVolume);
         storedVolume = -1;
     }
 }
Example #8
0
 protected void muteStatusChangedSink(CpAVRenderer _connection, bool _newMuteState)
 {
     isMuted = _newMuteState;
     if (muteStateChanged != null) muteStateChanged(this.udn, _newMuteState);
 }
Example #9
0
 protected void RendererRemovedSink(CpAVRenderer _renderer)
 {
     if (onMediaRendererRemoved != null) this.onMediaRendererRemoved(_renderer);
 }
Example #10
0
 protected void RendererFoundSink(CpAVRenderer _renderer)
 {
     if (onMediaRendererFound != null) this.onMediaRendererFound(_renderer);
 }