当前位置: 首页>>代码示例>>C#>>正文


C# IVideoSource类代码示例

本文整理汇总了C#中IVideoSource的典型用法代码示例。如果您正苦于以下问题:C# IVideoSource类的具体用法?C# IVideoSource怎么用?C# IVideoSource使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


IVideoSource类属于命名空间,在下文中一共展示了IVideoSource类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: Camera

 public Camera( IVideoSource source, IMotionDetector detector )
 {
     this.videoSource = source;
     this.motionDetecotor = detector;
     videoSource.NewFrame += new NewFrameEventHandler( video_NewFrame );
     videoSource.VideoSourceError += new VideoSourceErrorEventHandler( video_VideoSourceError );
 }
开发者ID:Tob1112,项目名称:405sentry,代码行数:7,代码来源:Camera.cs

示例2: OpenVideoSource

        // Open video source
        private void OpenVideoSource(IVideoSource source)
        {
            // set busy cursor
            this.Cursor = Cursors.WaitCursor;

            // reset glyph processor
            lock (_sync)
            {
                _imageProcessor.Reset();
            }

            // stop current video source
            videoSourcePlayer.SignalToStop();
            videoSourcePlayer.WaitForStop();

            // start new video source
            videoSourcePlayer.VideoSource = new AsyncVideoSource(source);
            videoSourcePlayer.Start();

            // reset stop watch
            //stopWatch = null;

            // start timer
            //timer.Start();

            this.Cursor = Cursors.Default;
        }
开发者ID:MPuchkin,项目名称:glyphs_2015,代码行数:28,代码来源:Form1.cs

示例3: Camera

 public Camera(string deviceName, IVideoSource videoSource, VideoStore videoStore)
 {
     this.deviceName = deviceName;
     this.lastFrameTime = DateTime.MinValue;
     this.video = new Video(videoStore);
     this.videoSource = videoSource;
     this.videoSource.NewFrame += new NewFrameEventHandler(videoSource_NewFrame);
 }
开发者ID:zesus19,项目名称:c4.v2.T,代码行数:8,代码来源:Camera.cs

示例4: VideoInput

 public VideoInput(IVideoSource source, int frames, int pixels, int verschil)
 {
     aFrames = frames;
     bgFrame = new Background(frames, pixels, verschil);
     this.source = source;
     this.source.NewFrame += new CameraEventHandler(source_NewFrame);
     this.source.Start();
 }
开发者ID:muggenhor,项目名称:fishtank,代码行数:8,代码来源:VideoInput.cs

示例5: VideoFeed

        private VideoFeed(IVideoSource source)
        {
            videoSource = source;

            //videoSource.DesiredFrameRate = 60;
            //videoSource.DesiredFrameSize = new Size(640, 480);

            videoSource.Start();
        }
开发者ID:martikaljuve,项目名称:Robin,代码行数:9,代码来源:VideoFeed.cs

示例6: SetSource

 public void SetSource(IVideoSource videoSource)
 {
     EditableVideoSource.ErrorsChanged -= RaiseCanExecuteChanged;
     videoSourceCache = videoSource;
     var path = existingSourcePaths.First(p => p.Id == videoSource.PathId).Path;
     var source = EditableVideoSource.FromIVideoSource(videoSource, path);
     EditableVideoSource = source;
     EditableVideoSource.ErrorsChanged += RaiseCanExecuteChanged;
     EditSourceMode = true;
 }
开发者ID:zynthar,项目名称:ChillED,代码行数:10,代码来源:EditSourceViewModel.cs

示例7: FromIVideoSource

 public static EditableVideoSource FromIVideoSource(IVideoSource videoSource, string path)
 {
     return new EditableVideoSource
     {
         Path = path,
         Name = videoSource.Name,
         ContentType = videoSource.ContentType,
         InfoSource = videoSource.InfoSource,
         NoUpdate = videoSource.NoUpdate
     };
 }
开发者ID:zynthar,项目名称:ChillED,代码行数:11,代码来源:EditableVideoSource.cs

示例8: RegisterNew

        public Camera RegisterNew(string deviceName, IVideoSource videoSource)
        {
            Camera camera = null;
            var dir = CheckAndGetDeviceFolder(deviceName);
            if (!cameraMap.TryGetValue(deviceName, out camera))
            {
                camera = new Camera(deviceName, videoSource, new VideoStore(string.Format(@"{0}\{1}", dir, deviceName)));
                cameraMap[deviceName] = camera;
            }

            return camera;
        }
开发者ID:zesus19,项目名称:c4.v2.T,代码行数:12,代码来源:CameraManager.cs

示例9: Camera

        public Camera(CameraProfile profile, CameraConfig config, IVideoSource videoSource)
        {
            if (profile == null)
            throw new ArgumentNullException("profile");
              if (config == null)
            throw new ArgumentNullException("config");
              if (videoSource == null)
            throw new ArgumentNullException("videoSource");

              _profile = profile;
              _config = config;
              _videoSource = videoSource;
        }
开发者ID:sclcwwl,项目名称:Gimela,代码行数:13,代码来源:Camera.cs

示例10: YAMDDetector

 public YAMDDetector(IVideoSource source, Magnitude low, Magnitude medium, Magnitude high)
 {
     detector = new MotionDetector(
         new SimpleBackgroundModelingDetector(),
         new BlobCountingObjectsProcessing(true));
     //async video source processes images in a separate thread and uses the NewFrame event
     inputStream = new AsyncVideoSource(source);
     inputStream.NewFrame += inputStream_NewFrame;
     this.low = low;
     this.medium = medium;
     this.high = high;
     timer = new Stopwatch();
     stoptimer = new Stopwatch();
     videoRecorder = new VideoFileWriter();
     Running = false;
     buffer = new FixedSizeQueue<Bitmap>();
     buffer.Limit = 50;
     magnitudes = new Queue<int>();
 }
开发者ID:jburnett31,项目名称:SoftEng,代码行数:19,代码来源:YAMDDetector.cs

示例11: AsyncVideoSource

 /// <summary>
 /// Initializes a new instance of the <see cref="AsyncVideoSource"/> class.
 /// </summary>
 /// 
 /// <param name="nestedVideoSource">Nested video source which is the target for asynchronous processing.</param>
 /// 
 public AsyncVideoSource(IVideoSource nestedVideoSource)
 {
     this.nestedVideoSource = nestedVideoSource;
 }
开发者ID:accord-net,项目名称:framework,代码行数:10,代码来源:AsyncVideoSource.cs

示例12: YVideoClient

        //------------------------------------------------------------------------------------------------------------------------
        #endregion

        #region Constructor
        //------------------------------------------------------------------------------------------------------------------------
        public YVideoClient(IVideoSource videosource)
        {
            this.videosource = videosource;
            this.videosource.OnFrameCaptured += Videosource_OnFrameCaptured;
        }
开发者ID:yodiwo,项目名称:plegma,代码行数:10,代码来源:YVideoClient.cs

示例13: CloneStream

 public CloneStream(IVideoSource source)
 {
     _source = source;
 }
开发者ID:tdhieu,项目名称:iSpy,代码行数:4,代码来源:CloneStream.cs

示例14: Camera

 public Camera(IVideoSource source)
 {
     VideoSource = source;
     _motionDetector = null;
     VideoSource.NewFrame += VideoNewFrame;
 }
开发者ID:Jaejoon,项目名称:iSpy,代码行数:6,代码来源:Camera.cs

示例15: OpenVideoSource

        private void OpenVideoSource(IVideoSource source, bool @override)
        {
            if ([email protected] && Camera != null && Camera.VideoSource != null && Camera.VideoSource.Source == source.Source)
            {
                return;
            }
            if (Camera != null && Camera.IsRunning)
            {
                Disable();
            }
            if (source is VlcStream)
            {
                ((VlcStream) source).FormatWidth = Camobject.settings.desktopresizewidth;
                ((VlcStream) source).FormatHeight = Camobject.settings.desktopresizeheight;
            }

            if (source is FFMPEGStream)
            {
                ((FFMPEGStream)source).HasAudioStream += VideoSourceHasAudioStream;
            }
            if (source is VlcStream)
            {
                ((VlcStream)source).HasAudioStream += VideoSourceHasAudioStream;
            }
            if (source is KinectStream)
            {
                ((KinectStream)source).HasAudioStream += VideoSourceHasAudioStream;
                ((KinectStream)source).InitTripWires(Camobject.alerts.pluginconfig);
                ((KinectStream)source).TripWire += CameraAlarm;
            }
            if (source is KinectNetworkStream)
            {
                ((KinectNetworkStream)source).HasAudioStream += VideoSourceHasAudioStream;
                ((KinectNetworkStream)source).AlertHandler += CameraWindow_AlertHandler;
            }
            source.PlayingFinished += SourcePlayingFinished;
            source.VideoSourceError += SourceVideoSourceError;

            Camera = new Camera(source);
        }
开发者ID:vmail,项目名称:main,代码行数:40,代码来源:CameraWindow.cs


注:本文中的IVideoSource类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。