public RestService()
        {
            CCTVInfo[] info = new CCTVInfo[] {
                new CCTVInfo()
                {
                    ch = "1", MjpegUrl = "http://192.192.85.33/axis-cgi/mjpg/video.cgi?camera=1", UserName = "******", Password = "******", StreamServerPort = 9090
                },
                new CCTVInfo()
                {
                    ch = "2", MjpegUrl = "http://192.192.85.33:204/axis-cgi/mjpg/video.cgi?camera=1", UserName = "******", Password = "******", StreamServerPort = 9091
                },
                new CCTVInfo()
                {
                    ch = "3", MjpegUrl = "http://192.192.85.33/axis-cgi/mjpg/video.cgi?camera=1", UserName = "******", Password = "******", StreamServerPort = 9092
                },
                new CCTVInfo()
                {
                    ch = "4", MjpegUrl = "http://192.192.85.33:204/axis-cgi/mjpg/video.cgi?camera=1", UserName = "******", Password = "******", StreamServerPort = 9093
                }
            };


            ETAGReader reader = new ETAGReader("192.192.85.33", 50007);

            obj = new RiaObject(info, reader, 1, 7);

            RiaObject.AddWhiteList("0X00BFDE232520FF63991F027B");
            RiaObject.AddWhiteList("0X110514000000000000000386");
        }
Example #2
0
        public RiaObject(CCTVInfo[] cctvInfos/*string CCTVMJpegString,string cctvUserName,string cctvUserPwd,int MjpegBroadcasePort*/, ETAGReader reader, int enterChno, int leaveChno)
        {
            this.EnterChno = enterChno;
               this.LeaveChno = leaveChno;
               _Servers=new ImageStreamingServer[cctvInfos.Length];
               for (int i=0;i<cctvInfos.Length;i++)
               {
               cctvInfos[i].riaobject = this;

               _Servers[i] = new ImageStreamingServer(cctvInfos[i].MjpegUrl, cctvInfos[i].UserName, cctvInfos[i].Password);
               _Servers[i].Start(cctvInfos[i].StreamServerPort);

               dictChStreamServer.Add(cctvInfos[i].ch, _Servers[i]);
               }
             //  _Server = new ImageStreamingServer("http://192.192.85.33/axis-cgi/mjpg/video.cgi?camera=1", "root", "pass");
              // _Server = new ImageStreamingServer(CCTVMJpegString, cctvUserName, cctvUserPwd);

               //    _Server = new ImageStreamingServer(CCTVMJpegString, cctvUserName, cctvUserPwd);
             //  _Server.Start(MjpegBroadcasePort);

              //  reader = new ETAGReader("192.192.85.33", 50007);

            reader.OnEtagArriveEvent += reader_OnEtagArriveEvent;
            objList.Add(this);
        }
Example #3
0
        protected override void OnStart(string[] args)
        {
            reader = new ETAGReader("192.192.85.33", 50007);
             CCTVInfo[] infos = new CCTVInfo[]{

                 new CCTVInfo(){  MjpegUrl="http://192.192.85.33/axis-cgi/mjpg/video.cgi?camera=1", UserName= "******", Password="******", StreamServerPort=9090}
               };
              obj= new RiaObject(infos, reader, 1, 7);
               // 0x00BFDE232520FF63991F027A
            RiaObject.AddWhiteList("0x00BFDE232520FF63991F027A");

            host = new ServiceHost(new Service1());
        }
        protected override void OnStart(string[] args)
        {
            reader = new ETAGReader("192.192.85.33", 50007);
            CCTVInfo[] infos = new CCTVInfo[] {
                new CCTVInfo()
                {
                    MjpegUrl = "http://192.192.85.33/axis-cgi/mjpg/video.cgi?camera=1", UserName = "******", Password = "******", StreamServerPort = 9090
                }
            };
            obj = new RiaObject(infos, reader, 1, 7);
            // 0x00BFDE232520FF63991F027A
            RiaObject.AddWhiteList("0x00BFDE232520FF63991F027A");

            host = new ServiceHost(new Service1());
        }
Example #5
0
        public RiaObject(CCTVInfo[] cctvInfos /*string CCTVMJpegString,string cctvUserName,string cctvUserPwd,int MjpegBroadcasePort*/, ETAGReader reader, int enterChno, int leaveChno)
        {
            this.EnterChno = enterChno;
            this.LeaveChno = leaveChno;
            _Servers       = new ImageStreamingServer[cctvInfos.Length];
            for (int i = 0; i < cctvInfos.Length; i++)
            {
                cctvInfos[i].riaobject = this;

                _Servers[i] = new ImageStreamingServer(cctvInfos[i].MjpegUrl, cctvInfos[i].UserName, cctvInfos[i].Password);
                _Servers[i].Start(cctvInfos[i].StreamServerPort);

                dictChStreamServer.Add(cctvInfos[i].ch, _Servers[i]);
            }
            //  _Server = new ImageStreamingServer("http://192.192.85.33/axis-cgi/mjpg/video.cgi?camera=1", "root", "pass");
            // _Server = new ImageStreamingServer(CCTVMJpegString, cctvUserName, cctvUserPwd);


            //    _Server = new ImageStreamingServer(CCTVMJpegString, cctvUserName, cctvUserPwd);
            //  _Server.Start(MjpegBroadcasePort);

            //  reader = new ETAGReader("192.192.85.33", 50007);

            reader.OnEtagArriveEvent += reader_OnEtagArriveEvent;
            objList.Add(this);
        }