Exemplo n.º 1
0
        public static Damany.Imaging.Common.IFrameStream NewFrameStream(Damany.PC.Domain.CameraInfo cameraInfo)
        {
            IFrameStream source = null;

            switch (cameraInfo.Provider)
            {
#if DEBUG
            case Damany.PC.Domain.CameraProvider.LocalDirectory:
                break;
#endif

            case Damany.PC.Domain.CameraProvider.Sanyo:
                var sanyo = new SanyoNetCamera();
                sanyo.Uri      = cameraInfo.Location;
                sanyo.UserName = cameraInfo.LoginUserName ?? "guest";
                sanyo.PassWord = cameraInfo.LoginPassword ?? "guest";
                source         = sanyo;
                break;

#if DEBUG
            case Damany.PC.Domain.CameraProvider.AipStar:

                var aip = new Damany.Cameras.Wrappers.AipStarCamera(cameraInfo.Location.Host, cameraInfo.Location.Port, "", "");
                aip.UserName = cameraInfo.LoginUserName ?? "system";
                aip.PassWord = cameraInfo.LoginPassword ?? "system";
                source       = aip;
                break;
#endif

            default:
                throw new NotSupportedException("camera type not supported");

                break;
            }


            source.Id = cameraInfo.Id;

            return(source);
        }
Exemplo n.º 2
0
        public static Damany.Imaging.Common.IFrameStream NewFrameStream(Damany.PC.Domain.CameraInfo cameraInfo)
        {
            IFrameStream source = null;

            switch (cameraInfo.Provider)
            {
            #if DEBUG
                    case Damany.PC.Domain.CameraProvider.LocalDirectory:
                    break;
            #endif

                case Damany.PC.Domain.CameraProvider.Sanyo:
                    var sanyo = new SanyoNetCamera();
                    sanyo.Uri = cameraInfo.Location;
                    sanyo.UserName = cameraInfo.LoginUserName ?? "guest";
                    sanyo.PassWord = cameraInfo.LoginPassword ?? "guest";
                    source = sanyo;
                    break;

            #if DEBUG
                    case Damany.PC.Domain.CameraProvider.AipStar:

                    var aip = new Damany.Cameras.Wrappers.AipStarCamera(cameraInfo.Location.Host, cameraInfo.Location.Port, "", "");
                    aip.UserName = cameraInfo.LoginUserName ?? "system";
                    aip.PassWord = cameraInfo.LoginPassword ?? "system";
                    source = aip;
                    break;
            #endif

                default:
                    throw new NotSupportedException("camera type not supported");

                    break;
            }

            source.Id = cameraInfo.Id;

            return source;
        }