Class RadWebCam
Represents a web cam control that displays the stream provided by a web cam.
Inherited Members
Namespace: Telerik.WinControls.UI
Assembly: Telerik.WinControls.RadWebCam.dll
Syntax
[TelerikToolboxCategory("Data Controls")]
public class RadWebCam : RadControl, INotifyPropertyChanged, ISupportInitializeNotification, ISupportInitialize, IComponentTreeHandler, ILayoutHandler, IPCHost, IAnalyticsProvider, IMediaFoundationRenderSurface
Constructors
RadWebCam()
Properties
AutoStart
Gets or sets whether the control will start the first webcam it finds upon starting the application.
Declaration
public bool AutoStart { get; set; }
Property Value
System.
|
CameraBorderElement
Gets the element representing the border of the camera.
Declaration
public LightVisualElement CameraBorderElement { get; }
Property Value
ControlPanelHeight
Gets or sets the height of the panel with the camera controls.
Declaration
public int ControlPanelHeight { get; set; }
Property Value
System.
|
DefaultSize
Gets the default size of the control.
Declaration
protected override Size DefaultSize { get; }
Property Value
System.
|
HasError
Gets a value indicating whether the camera is in a state where something is preventing normal operation.
Declaration
public bool HasError { get; protected set; }
Property Value
System.
|
IsPreviewingSnapshot
Gets or sets a value indicating whether the control is in snapshot preview mode.
Declaration
public bool IsPreviewingSnapshot { get; set; }
Property Value
System.
|
IsRecording
Gets or sets a value indicating whether the source content is being recorded to a file.
Declaration
public bool IsRecording { get; set; }
Property Value
System.
|
PreviewSnapshots
Gets or sets whether the control will go into preview mode when a snapshot is taken.
Declaration
public bool PreviewSnapshots { get; set; }
Property Value
System.
|
RecordingFilePath
Gets or sets the location where video files are stored when capturing.
Declaration
public string RecordingFilePath { get; set; }
Property Value
System.
|
SnapshotPreviewElement
Gets the snapshot preview element.
Declaration
public LightVisualElement SnapshotPreviewElement { get; }
Property Value
VideoRecordingElapsedTimeFormat
Gets or sets the format of the elapsed time displayed during recording.
Declaration
public string VideoRecordingElapsedTimeFormat { get; set; }
Property Value
System.
|
WebCamElement
Gets the main web cam control element.
Declaration
public RadWebCamElement WebCamElement { get; }
Property Value
Methods
CreateCameraBorderElement()
Creates the camera border element.
Declaration
protected virtual LightVisualElement CreateCameraBorderElement()
Returns
CreateChildItems(RadElement)
Creates the child elements of the control.
Declaration
protected override void CreateChildItems(RadElement parent)
Parameters
Rad The root element of the control's element tree. |
Overrides
CreateRootElement()
Creates the root RadElement of the control.
Declaration
protected override RootRadElement CreateRootElement()
Returns
Overrides
CreateSnapshotPreviewElement()
Creates the snapshot preview element.
Declaration
protected virtual LightVisualElement CreateSnapshotPreviewElement()
Returns
CreateWebCamElement()
Creates the main Rad
Declaration
protected virtual RadWebCamElement CreateWebCamElement()
Returns
CreateWebCamRootElement()
Creates the root element of Rad
Declaration
protected virtual WebCamRootRadElement CreateWebCamRootElement()
Returns
DiscardSnapshot()
Discards the taken snapshot when the control is in preview snapshot mode.
Declaration
public virtual void DiscardSnapshot()
Dispose(Boolean)
Releases the unmanaged resources used by the System.Windows.Forms.Control and its child controls and optionally releases the managed resources.
Declaration
protected override void Dispose(bool disposing)
Parameters
System.
|
Overrides
GetAudioCaptureDevices()
Gets a list with all the available audio capture devices.
Declaration
public static ReadOnlyCollection<MediaFoundationDeviceInfo> GetAudioCaptureDevices()
Returns
System.
|
GetVideoCaptureDevices()
Gets a list with all the available video capture devices.
Declaration
public static ReadOnlyCollection<MediaFoundationDeviceInfo> GetVideoCaptureDevices()
Returns
System.
|
GetVideoFormats(MediaFoundationDeviceInfo, Boolean)
Gets a list with all the available video file formats for the provided device.
Declaration
public static ReadOnlyCollection<MediaFoundationVideoFormatInfo> GetVideoFormats(MediaFoundationDeviceInfo device, bool recordingFormatsOnly = false)
Parameters
Media The device for which to get the available formats. |
System. If set to true - only formats that allow saving to a video file will be returned. |
Returns
System.
|
Initialize(MediaFoundationDeviceInfo, MediaFoundationVideoFormatInfo)
Starts up the video pipeline and displays the video from the source inside of the control. The device to use as a video source. The format from the video source.
Declaration
public virtual void Initialize(MediaFoundationDeviceInfo videoDevice, MediaFoundationVideoFormatInfo videoFormat)
Parameters
Media
|
Media
|
Initialize(MediaFoundationDeviceInfo, MediaFoundationVideoFormatInfo, MediaFoundationDeviceInfo)
Starts up the video pipeline and displays the video from the source inside of the control. The device to use as a video source. The format from the video source. The device to use as a audio source.
Declaration
public virtual void Initialize(MediaFoundationDeviceInfo videoDevice, MediaFoundationVideoFormatInfo videoFormat, MediaFoundationDeviceInfo audioDevice)
Parameters
Media
|
Media
|
Media
|
OnCameraError(CameraErrorEventArgs)
Fires the Camera
Declaration
protected virtual void OnCameraError(CameraErrorEventArgs e)
Parameters
Camera The event arguments. |
OnHandleCreated(EventArgs)
Raises the System.Windows.Forms.Control.HandleCreated event.
Declaration
protected override void OnHandleCreated(EventArgs e)
Parameters
System. An System.EventArgs that contains the event data. |
OnLoad(Size)
Notifies that the control is about to be visualized.
Declaration
protected override void OnLoad(Size desiredSize)
Parameters
System.
|
Overrides
OnRecordingEnded(EventArgs)
Fires the Recording
Declaration
protected virtual void OnRecordingEnded(EventArgs e)
Parameters
System. The event arguments. |
OnRecordingStarted(CancelEventArgs)
Fires the Recording
Declaration
protected virtual void OnRecordingStarted(CancelEventArgs e)
Parameters
System. The event arguments. |
OnSettingsDialogShowing(CameraSettingsDialogShowingEventArgs)
Fires the Settings
Declaration
protected virtual void OnSettingsDialogShowing(CameraSettingsDialogShowingEventArgs e)
Parameters
Camera The event arguments. |
OnSnapshotTaken(SnapshotTakenEventArgs)
Fires the Snapshot
Declaration
protected virtual void OnSnapshotTaken(SnapshotTakenEventArgs e)
Parameters
Snapshot The event arguments. |
Pause()
Pauses the video pipeline and pauses displaying the video feed.
Declaration
public virtual void Pause()
SaveSnapshot()
Triggers the Snapshot
Declaration
public virtual void SaveSnapshot()
SetBoundsCore(Int32, Int32, Int32, Int32, BoundsSpecified)
Performs the work of setting the specified bounds of this control.
Declaration
protected override void SetBoundsCore(int x, int y, int width, int height, BoundsSpecified specified)
Parameters
System.
|
System.
|
System.
|
System.
|
System.
|
Overrides
ShowSettingsDialog()
Shows the camera settings dialog.
Declaration
public virtual void ShowSettingsDialog()
ShutDown()
Shuts down the video pipeline.
Declaration
public virtual void ShutDown()
Start()
Starts the video pipeline and starts displaying the video feed.
Declaration
public virtual void Start()
StartRecording()
Starts capturing the media source(s) to a file. The Recording
Declaration
public virtual void StartRecording()
Stop()
Stops the video pipeline and stops displaying the video feed.
Declaration
public virtual void Stop()
StopRecording()
Stops the file capture.
Declaration
public virtual void StopRecording()
TakeSnapshot()
Takes a snapshot from the currently displayed video feed. To get the snapshot subscribe to the Snapshot
Declaration
public virtual void TakeSnapshot()
Events
CameraError
Occurs when an error is preventing the camera from operating normally.
Declaration
public event EventHandler<CameraErrorEventArgs> CameraError
Event Type
System.
|
RecordingEnded
Occurs when video recording has ended.
Declaration
public event EventHandler RecordingEnded
Event Type
System.
|
RecordingStarted
Occurs when video recording is started.
Declaration
public event EventHandler<CancelEventArgs> RecordingStarted
Event Type
System.
|
SettingsDialogShowing
Occurs when the settings dialog is about to be shown.
Declaration
public event EventHandler<CameraSettingsDialogShowingEventArgs> SettingsDialogShowing
Event Type
System.
|
SnapshotTaken
Occurs when a snapshot is taken. If Preview
Declaration
public event EventHandler<SnapshotTakenEventArgs> SnapshotTaken
Event Type
System.
|
Explicit Interface Implementations
IMediaFoundationRenderSurface.GetHandle()
Declaration
IntPtr IMediaFoundationRenderSurface.GetHandle()
Returns
System.
|