Exemplo n.º 1
0
        // Compares objects of the type
        public int CompareTo(object obj)
        {
            if (obj == null)
            {
                return(1);
            }

            VsProvider p = (VsProvider)obj;

            return(this.Name.CompareTo(p.Name));
        }
Exemplo n.º 2
0
        private void createCoreProvider(VsProvider provider)
        {
            coreProvider = provider.CreateVideoSource(provider.LoadConfiguration(providerProp));

            coreProvider.FrameOut += new VsImageEventHandler(framedOut);

            // timer
            checkForStopProviderTimer                     = new System.Timers.Timer();
            checkForStopProviderTimer.Interval            = checkForStopProviderInterval;
            checkForStopProviderTimer.SynchronizingObject = null;
            checkForStopProviderTimer.Elapsed            += new System.Timers.ElapsedEventHandler(checkForStopProvider);
        }
Exemplo n.º 3
0
        public VsProviderManager(string source, string login, string password, VsProvider provider)
        {
            providerProp["source"]   = source;
            providerProp["login"]    = login;
            providerProp["password"] = password;


            providerProp["size"]     = size;
            providerProp["stype"]    = stype;
            providerProp["interval"] = interval.ToString();

            createCoreProvider(provider);
        }
Exemplo n.º 4
0
        public VsProviderManager(Hashtable reader, VsProvider provider)
        {
            providerProp["source"]   = reader["source"];
            providerProp["login"]    = reader["login"];
            providerProp["password"] = reader["password"];


            providerProp["size"]     = size;
            providerProp["stype"]    = stype;
            providerProp["interval"] = interval.ToString();

            createCoreProvider(provider);
        }
Exemplo n.º 5
0
        public VsProviderManager(Hashtable reader, VsProvider provider)
        {
            providerProp["source"] = reader["source"];
            providerProp["login"] = reader["login"];
            providerProp["password"] = reader["password"];


            providerProp["size"] = size;
            providerProp["stype"] = stype;
            providerProp["interval"] = interval.ToString();

            createCoreProvider(provider);

        }
Exemplo n.º 6
0
        private void InitializeProviderManager(string vsAppPath, string providerPath)
        {
            VsProviderCollection vsProviders = new VsProviderCollection();

            vsProviders.Load(providerPath);

            string fullFileName = Path.Combine(vsAppPath, "cameras.config");

            Hashtable[] data = ConfigData.loadCamConfig(fullFileName);


            VsProviderManagerDic = new Dictionary <string, VsProviderManager>();
            foreach (var v in data)
            {
                string camId = v["name"].ToString();
                //// string source = v[""];

                string ProviderName = v["provider"].ToString();
                // // string ProviderName = "Vs.Provider.Axis.Axis2110Description";

                // Hashtable reader = new Hashtable();
                // reader["source"] = v["source"];//source;
                // reader["login"] = v["login"]; ;
                // reader["password"] = v["password"];

                // reader["size"] = "640x480";
                // reader["stype"] = "1";
                // reader["interval"] = "250";

                //if (coreProvider != null)
                //{
                //    coreProvider.Stop();
                //}

                VsProvider provider = vsProviders.GetProviderByName(ProviderName);

                VsProviderManagerDic.Add(camId, new VsProviderManager(v, provider));
            }
            //{
            //    string camId = "cam1";
            //    string source = "@device:pnp:\\\\?\\usb#vid_eb1a&pid_2761&mi_00#6&30952a2b&0&0000#{65e8773d-8f56-11d0-a3b9-00a0c9223196}\\global";

            //    string ProviderName = "Vs.Provider.Local.CaptureDeviceDescription";
            //    // string ProviderName = "Vs.Provider.Axis.Axis2110Description";

            //    Hashtable reader = new Hashtable();
            //    reader["source"] = source;//source;
            //    reader["login"] = "******";
            //    reader["password"] = "******";

            //    reader["size"] = "640x480";
            //    reader["stype"] = "1";
            //    reader["interval"] = "250";

            //    //if (coreProvider != null)
            //    //{
            //    //    coreProvider.Stop();
            //    //}

            //    VsProvider provider = vsProviders.GetProviderByName(ProviderName);

            //    VsProviderManagerDic.Add(camId, new VsProviderManager(reader, provider));
            //}
            //{
            //    string camId = "cam2";
            //    string source = "camera-210-01.coe.psu.ac.th";


            //    string ProviderName = "Vs.Provider.Axis.Axis2110Description";

            //    Hashtable reader = new Hashtable();
            //    reader["source"] = source;//source;
            //    reader["login"] = "******";
            //    reader["password"] = "******";

            //    reader["size"] = "640x480";
            //    reader["stype"] = "1";
            //    reader["interval"] = "250";

            //    //if (coreProvider != null)
            //    //{
            //    //    coreProvider.Stop();
            //    //}

            //    VsProvider provider = vsProviders.GetProviderByName(ProviderName);

            //    VsProviderManagerDic.Add(camId, new VsProviderManager(reader, provider));
            //}

            //coreProvider = provider.CreateVideoSource(provider.LoadConfiguration(reader));
        }
Exemplo n.º 7
0
        public VsProviderManager(string source, string login, string password, VsProvider provider)
        {
            providerProp["source"] = source;
            providerProp["login"] = login;
            providerProp["password"] = password;


            providerProp["size"] = size;
            providerProp["stype"] = stype;
            providerProp["interval"] = interval.ToString();

            createCoreProvider(provider);

        }
Exemplo n.º 8
0
        private void createCoreProvider(VsProvider provider)
        {
            coreProvider = provider.CreateVideoSource(provider.LoadConfiguration(providerProp));

            coreProvider.FrameOut += new VsImageEventHandler(framedOut);

            // timer
            checkForStopProviderTimer = new System.Timers.Timer();
            checkForStopProviderTimer.Interval = checkForStopProviderInterval;
            checkForStopProviderTimer.SynchronizingObject = null;
            checkForStopProviderTimer.Elapsed += new System.Timers.ElapsedEventHandler(checkForStopProvider);
        }
Exemplo n.º 9
0
 public VsProviderManager(string camID, VsProvider provider)
 {
     //????????????
 }
Exemplo n.º 10
0
 public VsProviderManager(string camID, VsProvider provider)
 {
     //????????????
 }