IVideoDeviceManager

Video device management methods.

IVideoDeviceManager provides methods related to video device testing. You can call the GetAgoraVideoDeviceManager method to get the IVideoDeviceManager interface.

EnumerateVideoDevices

Enumerates the video devices.

UFUNCTION(BlueprintCallable, Category = "Agora|IVideoDeviceManager")
	UVideoDeviceCollection* EnumerateVideoDevices();

Details

Attention: This method is for Windows and macOS only.

This method returns an IVideoDeviceCollection object including all video devices in the system. With the IVideoDeviceCollection object, the application can enumerate video devices. The application must call the Release method to release the returned object after using it.

Returns

  • Success: One IVideoDeviceCollection object including all video devices in the system.

GetCapability

Gets the detailed video frame information of the video capture device in the specified video format.

UFUNCTION(BlueprintCallable, Category = "Agora|IVideoDeviceManager")
	int GetCapability(const FString & deviceIdUTF8, int deviceCapabilityNumber, FVideoFormat& capability);

Details

Attention: This method is for Windows and macOS only.

After calling NumberOfCapabilities to get the number of video formats supported by the video capture device, you can call this method to get the specific video frame information supported by the specified index number.

Parameters

deviceIdUTF8
The ID of the video capture device.
deviceCapabilityNumber
The index number of the video format. If the return value of NumberOfCapabilities is i, the value range of this parameter is [0,i).
capability
An output parameter. Indicates the specific information of the specified video format, including width (px), height (px), and frame rate (fps). See FVideoFormat.

Returns

  • 0: Success.
  • < 0: Failure.

NumberOfCapabilities

Gets the number of video formats supported by the specified video capture device.

UFUNCTION(BlueprintCallable, Category = "Agora|IVideoDeviceManager")
	int NumberOfCapabilities(const FString & deviceIdUTF8);

Details

Attention: This method is for Windows and macOS only.

Video capture devices may support multiple video formats, and each format supports different combinations of video frame width, video frame height, and frame rate.

You can call this method to get how many video formats the specified video capture device can support, and then call GetCapability to get the specific video frame information in the specified video format.

Parameters

deviceIdUTF8
The ID of the video capture device.

Returns

  • > 0: Success. Returns the number of video formats supported by this device. For example: If the specified camera supports 10 different video formats, the return value is 10.
  • ≤ 0: Failure.

Release

Releases all the resources occupied by the IVideoDeviceManager object.

UFUNCTION(BlueprintCallable, Category = "Agora|IVideoDeviceManager")
void Release();

Details

Attention: This method is for Windows and macOS only.