Поделиться через


VideoBrush.SetSource Method (CaptureSource)

Microsoft Silverlight will reach end of support after October 2021. Learn more.

Sets the source of the VideoBrush using a video capture source

Namespace:  System.Windows.Media
Assembly:  System.Windows (in System.Windows.dll)

Syntax

'Declaration
Public Sub SetSource ( _
    source As CaptureSource _
)
public void SetSource(
    CaptureSource source
)

Parameters

Remarks

To obtain a CaptureSource for video, you must derive from VideoSink. Using your derived VideoSink, you can initiate a capture and set it into the VideoSink.CaptureSource by calling CaptureSource.Start. You typically also need to specifically request client permission for capture device access; if you do not have user permission, requesting information from a CaptureSource will throw exceptions. For more information on obtaining capture device access, see CaptureDeviceConfiguration.

The scenario for SetSource is to provide a simple playback capability for captured video such that it can easily be displayed in client UI without having to process individual frames of video or video formats. Other more advanced scenarios for using a video CaptureSource exist whereby you can access the raw video; for information on these scenarios, see VideoSink.

Version Information

Silverlight

Supported in: 5, 4

Silverlight for Windows Phone

Supported in: Windows Phone OS 7.1

Platforms

For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.