Exemplo n.º 1
0
		private  void SenderStopped(string senderName)
		{
			//Debug.Log("Sender stopped, sender name : "+senderName);
			if(_instance == null || _instance.activeLocalSenders == null || _instance.stoppedSenders == null)return;
			lock(this){
				TextureInfo texInfo = new TextureInfo(senderName);
				
				_instance.stoppedSenders.Add (texInfo);

				_instance.localSenderNames.Remove(texInfo.name);

				if(_instance.activeLocalSenders.Contains(texInfo)){
					_instance.activeLocalSenders.Remove(texInfo);
				}
			}//lock
			//Debug.Log("localSenderNames.count:"+instance.localSenderNames.Count);
			//Debug.Log("activeLocalSenders.count:"+instance.activeLocalSenders.Count);
		}
Exemplo n.º 2
0
		private  void SenderStarted(string senderName, IntPtr resourceView,int textureWidth, int textureHeight)
		{
			//Debug.Log("Spout. Sender started, sender name : "+senderName);
			if(_instance == null || _instance.activeLocalSenders == null || _instance.newSenders == null)return;
			lock(this){
				TextureInfo texInfo = new TextureInfo(senderName);
				//Debug.Log("resourceView:"+resourceView.ToInt32());
				texInfo.setInfos(textureWidth,textureHeight,resourceView);
				_instance.newSenders.Add(texInfo);
				if(_instance.localSenderNames.Contains(texInfo.name)){
				_instance.activeLocalSenders.Add(texInfo);
				//Debug.Log("activeLocalSenders.count:"+_instance.activeLocalSenders.Count);
				}
				//Debug.Log("Spout.SenderStarted.End");
			}//lock
		}
Exemplo n.º 3
0
		public void  TexStopped(TextureInfo texInfo)
		{
			//Debug.Log("SpoutReceiver.texStopped:"+texInfo.name);
			if(texInfo.name == _sharingName)
			{		
				//Debug.Log("SpoutReceiver.texStopped:"+texInfo.name);
				texture = Spout.nullTexture;

				
			}
			else if(sharingName == "Any" && Spout.instance.activeSenders.Count > 0)
			{
				texture = Spout.instance.activeSenders[Spout.instance.activeSenders.Count-1].getTexture();
			}
		}
Exemplo n.º 4
0
		public void TexShared(TextureInfo texInfo)
		{
			//Debug.Log("SpoutReceiver.texShared");
			if(sharingName == "" || sharingName == texInfo.name || sharingName == "Any")
			{
				//Debug.Log("SpoutReceiver.texShared:"+texInfo.name);
				texture = texInfo.getTexture();
			}
		}
Exemplo n.º 5
0
		public void senderStopped(TextureInfo texInfo)
		{
			//Debug.Log ("Editor : senderStopped :"+texInfo.name);
			updateOptions();
		}
Exemplo n.º 6
0
        //Make it comparable for Linq

        public override bool Equals(object obj)
        {
            TextureInfo q = obj as TextureInfo;

            return(q != null && q.name == this.name);
        }