Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 3 Current »

- Declaration

static void UpdateVideoInput(FCavrnusVideoInputDevice Device);

- Description

Sets which camera the user wishes to use. Note that the FCavrnusVideoInputDevice provided to this function can only be acquired by calling FetchVideoInputs to search for available cameras.

- Blueprint Sample

Sample is taken from WBP_AudioVideoWidget.uasset in the Plugin. VideoInputDeviceResponse is a Blueprint array of FCavrnusVideoInputDevice instances that was provided earlier via Fetch Video Inputs.

UpdateVideoInput.png

- Code Sample

#include "CavrnusFunctionLibrary.h"
#include "Types/CavrnusVideoInputDevice.h"

void UClassName::OnVideoInputDeviceSelected(const FString& DeviceId)
{
  // Member is TMap<FString, FCavrnusVideoInputDevice> VideoInputDeviceList
  FCavrnusVideoInputDevice* InputDevice = VideoInputDeviceList.Find(DeviceId);
  if (InputDevice)
  {
    UCavrnusFunctionLibrary::UpdateVideoInput(*InputDevice);
  }
  else
  {
    UE_LOG(LogTemp, Warning, TEXT("Selected Video Input Device not found: %s"), *DeviceId);
  }
}
  • No labels