Click or drag to resize
VideoCaptureDevice Class
This class represents a simple interface to capture devices. It can be used to retrieve pictures from these devices.
Supported features:
  • Enumerating Captures device located on system
  • Setting Resolution and framerate of Video
  • Retrieving frames from capture devices
  • Class instances are reusable.
  • It is possible to select and configure another device while a VideoCaptureDevice is running. To make the new configuration active Stop and Start has to be executed.
Video capture device.
Inheritance Hierarchy
SystemObject
  StreamCoders.DevicesCaptureDevice
    StreamCoders.DevicesVideoCaptureDevice

Namespace: StreamCoders.Devices
Assembly: MediaSuite (in MediaSuite.dll) Version: 2.0.5.0 (2.0.5.0)
Syntax
public class VideoCaptureDevice : CaptureDevice, 
	IDisposable

The VideoCaptureDevice type exposes the following members.

Constructors
  NameDescription
Public methodVideoCaptureDevice
Default constructor.
Top
Properties
  NameDescription
Public propertyBasicMode
Gets the mode of the VideoCaptureDevice object.
Public propertyIsDeviceLost
Detects whether a capture device is lost during operation. This can happen if a capture device is physically disconnected.
Public propertyLastError
Gets the last error.
Public propertySelectedDevice
Retrieves the currently selected capture device. This property is set when SelectDevice is called successfully.
Public propertySelectedFormat
Retrieves the metrics of the device.
Currently these values are only valid after starting the device.
Top
Methods
  NameDescription
Public methodDispose
Destructor.
Public methodGetDeviceList
Retrieves a String readable list of all available and compatible Capture Devices on the System.
Public methodGetFrame
Retrieves a raw frame containing timing information of capture (MediaBuffer.startTime) and duration based on the FPS of the selected profile (MediaBuffer.EndTime). The timing information is relative to the time VideoCaptureDevice.Start was called.
(Overrides CaptureDeviceGetFrame.)
Public methodSelectCaptureDeviceFormat
Select metrics for a previously selected device.
Public methodSelectDevice
Selects a capture device to be used and returns metrics of that device.
Public methodSetBufferProvider
Public methodStatic memberShowSelectionDialog
Shows a modal device and format selection form, that creates the video capture device for the user.
Public methodStart
Start the capturing process from the selected Device Name.
Public methodStop
Stop Capture from device.
Top
Events
  NameDescription
Public eventOnSampleAvailable
Event that is raised whenever a sample is available. Events and polling (GetNextSamples) cannot be mixed.
Top
Extension Methods
  NameDescription
Public Extension MethodCopyOverloaded.
Creates a copy of the object.
(Defined by ObjectExtensions.)
Public Extension MethodCopy(Object)Overloaded.
Creates a deep copy of the object using the supplied object as a target for the copy operation.
(Defined by ObjectExtensions.)
Top
Remarks
Using VideoCaptureDevice:
  • Enumerate Devices
  • SelectDevice
  • SelectCaptureDeviceFormat
  • Start
  • Use device by capturing images
  • Stop
  • Dispose

Video capture devices can only be started once on a system. To re-use a VideoCaptureDevice the CaptureDeviceMulticastProvider can help provide multiple streams from a capture device in a single process.

See Also