• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C# IVideoSource类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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


示例16: InjectVideoSource

 public void InjectVideoSource(IVideoSource source, bool skipFramesAllowed = true)
 {
     OpenVideoSource(source, skipFramesAllowed);
 }
开发者ID:Spawek,项目名称:valeo,代码行数:4,代码来源:MainForm.cs


示例17: OpenVideoSource

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

            // reset glyph processor
            imageProcessor.Reset( );

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

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

            // reset stop watch
            stopWatch = null;

            // start timer
            timer.Start( );

            this.Cursor = Cursors.Default;
        }
开发者ID:Spawek,项目名称:valeo,代码行数:25,代码来源:MainForm.cs


示例18: Camera

		/// <summary>
		/// Create new Camera object.
		/// </summary>
		/// <param name="source">Video source.</param>
		/// <param name="imageProcess">The image process system.</param>
		/// <param name="output">To where output results.</param>
		/// <param name="graphicalOutput">How to change the graphical output.</param>
		/// <param name="pictureBox">Where to display the final image.</param>
		public Camera(IVideoSource source, IImageProcess imageProcess, IOutput output, 
			GraphicalOutputDelegate graphicalOutput, PictureBox pictureBox)
		{
			if (source == null) throw new ArgumentNullException("source");
			if (imageProcess == null) throw new ArgumentNullException("imageProcess");
			if (output == null) throw new ArgumentNullException("output");
			if (graphicalOutput == null) throw new ArgumentNullException("graphicalOutput");
			if (pictureBox == null) throw new ArgumentNullException("pictureBox");

			videoSource = source;
			videoSource.NewFrame += new NewFrameEventHandler(video_NewFrame);
			this.imageProcess = imageProcess;
			this.output = output;
			this.graphicalOutput = graphicalOutput;
			this.pictureBox = pictureBox;
		
		}
开发者ID:hpbaotho,项目名称:vsl,代码行数:25,代码来源:Camera.cs


示例19: StartVideo

        /*
         * Start playing video using selected video device
         */
        private void StartVideo(String url)
        {
            // do this only once in case of multiple connect/disconnect actions
            if (_stream == null)
            {
                _stream = new MJPEGStream(url);
                _videoPlayer.VideoSource = _stream;
            }

            _stream.Start();
        }
开发者ID:walkera-hack,项目名称:walkera,代码行数:14,代码来源:VideoStream.cs


示例20: SetDevice

        /// <summary>
        /// Sets the device.
        /// </summary>
        /// <param name="monikerString">The moniker string.</param>
        /// <remarks></remarks>
        public void SetDevice(string monikerString)
        {
            if (monikerString == "") 
                return;

            Stop();
            MonkierString = monikerString;
            Source = new VideoCaptureDevice(MonkierString);
            VideoCaptureDevice s = (VideoCaptureDevice)Source;
            s.DesiredFrameRate = 30;
            s.DesiredFrameSize = new Size(640, 480);
        }
开发者ID:alierdogan70,项目名称:kwyjibo,代码行数:17,代码来源:VideoInput.cs



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# IVideoWindow类代码示例发布时间:2022-05-24
下一篇:
C# IVertexType类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap