Document.TouchScreen/bin/Debug/AForge.Video.xml

(开头部分) 3KB

这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。

<?xml version="1.0"?>
<doc>
    <assembly>
        <name>AForge.Video</name>
    </assembly>
    <members>
        <member name="T:AForge.Video.AsyncVideoSource">
            <summary>
            Proxy video source for asynchronous processing of another nested video source.
            </summary>
            
            <remarks><para>The class represents a simple proxy, which wraps the specified <see cref="P:AForge.Video.AsyncVideoSource.NestedVideoSource"/>
            with the aim of asynchronous processing of received video frames. The class intercepts <see cref="E:AForge.Video.AsyncVideoSource.NewFrame"/>
            event from the nested video source and fires it to clients from its own thread, which is different from the thread
            used by nested video source for video acquisition. This allows clients to perform processing of video frames
            without blocking video acquisition thread, which continue to run and acquire next video frame while current is still
            processed.</para>
            
            <para>For example, let’s suppose that it takes 100 ms for the nested video source to acquire single frame, so the original
            frame rate is 10 frames per second. Also let’s assume that we have an image processing routine, which also takes
            100 ms to process a single frame. If the acquisition and processing are done sequentially, then resulting
            frame rate will drop to 5 frames per second. However, if doing both in parallel, then there is a good chance to
            keep resulting frame rate equal (or close) to the original frame rate.</para>
            
            <para>The class provides a bonus side effect - easer debugging of image processing routines, which are put into
            <see cref="E:AForge.Video.AsyncVideoSource.NewFrame"/> event handler. In many cases video source classes fire their <see cref="E:AForge.Video.IVideoSource.NewFrame"/>
            event from a try/catch block, which makes it very hard to spot error made in user's code - the catch block simply
            hides exception raised in user’s code. The <see cref="T:AForge.Video.AsyncVideoSource"/> does not have any try/catch blocks around
            firing of <see cref="E:AForge.Video.AsyncVideoSource.NewFrame"/> event, so always user gets exception in the case it comes from his code. At the same time
            nested video source is not affected by the user's exception, since it runs in different thread.</para>
            
            <para>Sample usage:</para>
            <code>
            // usage of AsyncVideoSource is the same as usage of any
            // other video source class, so code change is very little
            
            // create nested video source, for example JPEGStream
            JPEGStream stream = new JPEGStream( "some url" );
            // create async video source
            AsyncVideoSource asyncSource = new AsyncVideoSource( stream );
            // set NewFrame event handler
            asyncSource.NewFrame += new NewFrameEventHandler( video_NewFrame );
            // start the video source
            asyncSource.Start( );
            // ...
            
            private void video_NewFrame( object sender, NewFrameEventArgs eventArgs )
            {
                // get new frame
                Bitmap bitmap = eventArgs.Frame;
                // process the frame
            }
            </code>
            </remarks>
            
        </member>
        <member name="T:AForge.Video.IVideoSource">
            <summary>
            Video source interface.
            </summary>

24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明

AI 解读

登录后可用,每次 10 积分,解读结果公开显示在下面。

还没有人解读过这个文件。