getRendererManager() public static method

public static getRendererManager ( ) : RendererManager
return RendererManager
Beispiel #1
0
        public void setListItemSelectedForPlaying()
        {
            MediaItem_Track trackInfo;

            if (this.list == null)
            {
                return;
            }

            //lock (list) @@@
            {
                for (int i = 0; i < this.list.Count; i++)
                {
                    trackInfo = (MediaItem_Track)this.list[i];
                    if (trackInfo.listIndex == currentTrackIndexPlaying)
                    {
                        trackInfo.isSelectedForPlaying = true;
                        currentObjectIdPlaying         = trackInfo.objectId;
                    }
                    else
                    {
                        trackInfo.isSelectedForPlaying = false;
                        trackInfo.playState            = TrackPlayState.Stopped;
                    }
                    this.list[i] = trackInfo;
                }
            }

            if (Global.getRendererManager().getRendererByZoneUDN(this.zoneUDN) != null)
            {
                this.updatePlayStateOnTrackItem(Global.rendererPlayStateToTrackPlayState(Global.getRendererManager().getRendererByZoneUDN(this.zoneUDN).playState));
            }
        }
Beispiel #2
0
 public RendererVirtual getRenderer()
 {
     if (String.IsNullOrWhiteSpace(rendererUDN))
     {
         return(null);
     }
     return((RendererVirtual)Global.getRendererManager().getRenderer(rendererUDN));
 }
Beispiel #3
0
        public void linkZoneToVirtualRenderer(Zone _zone, Boolean _unlink = false, Boolean _crossLink = true)
        {
            RendererManager rendererManager = Global.getRendererManager();
            RendererVirtual renderer;

            // renderer UDN's are stored without 'uuid:' so we have to search with the uuid value cause this is the udn of the renderer
            renderer = (RendererVirtual)rendererManager.getRenderer(_zone.uuid);
            if (renderer != null)
            {
                if (_unlink)
                {
                    renderer.zoneUDN = String.Empty;
                }
                else
                {
                    renderer.zoneUDN = _zone.udn;
                }
                renderer.zoneLinked();
                //rendererManager.updateRenderersValue(renderer);
                if (_crossLink)
                {
                    rendererManager.linkVirtualRendererToZone(renderer, _unlink, false);
                }

                this.checkAllRenderersLinked();

                if (_unlink == true)
                {
                    this.writeLog(LogType.Info, String.Format("Zone '{0}' wurde von Renderer '{1}' entfernt", _zone.udn, renderer.udn));
                }
                else
                {
                    this.writeLog(LogType.Info, String.Format("Zone '{0}' wurde zu Renderer '{1}' zugeordnet", _zone.udn, renderer.udn));
                }
            }
            else
            {
                this.writeLog(LogType.Warning, String.Format("Kein Virtueller Renderer für Zone '{0}' für Zuordnung gefunden", _zone.udn));
            }
        }
Beispiel #4
0
        public void linkRoomToRoomRenderer(Room _room, Boolean _unlink = false, Boolean _crossLink = true)
        {
            RendererManager rendererManager = Global.getRendererManager();
            RendererRoom    renderer;

            renderer = (RendererRoom)rendererManager.getRenderer(_room.rendererUDN);
            if (renderer != null)
            {
                if (_unlink)
                {
                    renderer.roomUDN = String.Empty;
                }
                else
                {
                    renderer.roomUDN = _room.udn;
                }
                renderer.roomLinked();
                //rendererManager.updateRenderersValue(renderer);
                if (_crossLink)
                {
                    rendererManager.linkRoomRendererToRoom(renderer, _unlink, false);
                }

                this.checkAllRenderersLinked();

                if (_unlink == true)
                {
                    this.writeLog(LogType.Info, String.Format("Raum '{0}' wurde von Renderer '{1}' entfernt", _room.udn, renderer.udn));
                }
                else
                {
                    this.writeLog(LogType.Info, String.Format("Raum '{0}' wurde zu Renderer '{1}' zugeordnet", _room.udn, renderer.udn));
                }
            }
            else
            {
                this.writeLog(LogType.Warning, String.Format("Kein Renderer für Raum '{0}' für Zuordnung gefunden", _room.udn));
            }
        }
Beispiel #5
0
        override protected void listActionDone()
        {
            int             trackIndex;
            RendererVirtual renderer = (RendererVirtual)Global.getRendererManager().getRendererByZoneUDN(zoneUDN);

            base.listActionDone();

            // search track in list
            trackIndex = this.getListPositionOfObjectId(objectIdTmp);
            if (trackIndex == -1)
            {
                if (this.list.Count == 0)
                {
                    renderer.getRendererObject().Connections[0].SetAvTransportUri("", "");
                    currentTrackIndexPlaying = 0;
                }
                else
                {
                    if (this.list.Count < currentTrackIndexPlaying)
                    {
                        currentTrackIndexPlaying = this.list.Count;
                    }
                    else if (currentTrackIndexPlaying < 0)
                    {
                        currentTrackIndexPlaying = 0;
                    }
                    // Track was not found. Play next one
                    renderer.playTrack(currentTrackIndexPlaying);
                    //this.setTrackNrPlaying((int)trackNrPlaying);
                }
            }
            else
            {
                currentTrackIndexPlaying = trackIndex;
                renderer.getRendererObject().Connections[0].BendAvTransportUri(this.buildAvTransportUri(), containerInfoMetaData);
            }

            this.setListItemSelectedForPlaying();
        }
Beispiel #6
0
 public RendererRoom getRenderer()
 {
     return((RendererRoom)Global.getRendererManager().getRenderer(rendererUDN));
 }