Exemplo n.º 1
0
 /// <summary>
 /// Clean up any resources being used.
 /// </summary>
 protected override void Dispose(bool disposing)
 {
     if (disposing)
     {
         if (components != null)
         {
             components.Dispose();
         }
     }
     base.Dispose(disposing);
     if (bPluginLoaded)
     {
         freeframe.deInstantiate(instanceID);
         freeframe.Dispose();
     }
     if (webcam != null)
     {
         webcam.Dispose();
         webcam = null;
     }
     if (video != null)
     {
         video.Dispose();
         video = null;
     }
 }
Exemplo n.º 2
0
        private void listBox1_SelectedIndexChanged(object sender, System.EventArgs e)
        {
            if (bPluginLoaded)
            {
                freeframe.deInstantiate(instanceID);
                freeframe.Dispose();
                bPluginLoaded = false;
            }

            freeframe = new FreeFrame(Application.StartupPath + "\\plugins", listBox1.SelectedItem.ToString());             // "MultipleStripsNEW.dll" "PeteLiveFeed2.dll"

            //if((int) freeframe.Supports32BitVideo == (int) FreeFrame.ReturnCode.FF_SUPPORTED)
            //{
            //	instanceID = freeframe.instantiate(320, 240, (uint) FreeFrame.PixelFormat.Format32bppArgb,(uint) FreeFrame.Orientation.OriginTopLeft);
            //	webcam.PixelFormat = PixelFormat.Format32bppArgb;
            //}
            //else
            if ((int)freeframe.Supports24BitVideo == (int)FreeFrame.ReturnCode.FF_SUPPORTED)
            {
                instanceID         = freeframe.instantiate(320, 240, (uint)FreeFrame.PixelFormat.Format24bppRgb, (uint)FreeFrame.Orientation.OriginTopLeft);
                webcam.PixelFormat = PixelFormat.Format24bppRgb;
            }
            else
            {
                freeframe.Dispose();
                return;
            }

            listBox2.Items.Clear();
            foreach (String param in freeframe.parameterName)
            {
                listBox2.Items.Add(param);
            }

            bPluginLoaded = true;
            pictureBox2.Refresh();
        }
Exemplo n.º 3
0
		private void listBox1_SelectedIndexChanged(object sender, System.EventArgs e)
		{
			if (bPluginLoaded)
			{
				freeframe.deInstantiate(instanceID);
				freeframe.Dispose();
				bPluginLoaded = false;
			}

			freeframe = new FreeFrame(Application.StartupPath + "\\plugins", listBox1.SelectedItem.ToString()); // "MultipleStripsNEW.dll" "PeteLiveFeed2.dll"
			
			//if((int) freeframe.Supports32BitVideo == (int) FreeFrame.ReturnCode.FF_SUPPORTED)
			//{
			//	instanceID = freeframe.instantiate(320, 240, (uint) FreeFrame.PixelFormat.Format32bppArgb,(uint) FreeFrame.Orientation.OriginTopLeft);
			//	webcam.PixelFormat = PixelFormat.Format32bppArgb;
			//}
			//else
			if((int) freeframe.Supports24BitVideo == (int) FreeFrame.ReturnCode.FF_SUPPORTED)
			{
				instanceID = freeframe.instantiate(320, 240, (uint) FreeFrame.PixelFormat.Format24bppRgb,(uint) FreeFrame.Orientation.OriginTopLeft);
				webcam.PixelFormat = PixelFormat.Format24bppRgb;
			}
			else
			{
				freeframe.Dispose();
				return;
			}

			listBox2.Items.Clear();
			foreach (String param in freeframe.parameterName)
			{
				listBox2.Items.Add(param);
			}

			bPluginLoaded = true;
			pictureBox2.Refresh();
		}