|
Direct Camera for Unreal
Direct Camera Unreal docs
|
#include <DirectCameraFrameBuffer.h>
Public Member Functions | |
| bool | SetFrameBufferCallback (UDirectCameraFrameCapture *InCallback) |
| bool | RemoveFrameBufferCallback (UDirectCameraFrameCapture *InCallback) |
| UDirectCameraFrameBuffer () | |
| virtual | ~UDirectCameraFrameBuffer () |
| void | GetYUVPlanes (TArray< uint8 > &OutPlaneY, TArray< uint8 > &OutPlaneU, TArray< uint8 > &OutPlaneV) const |
| void | GetImageData (TArray< uint8 > &OutImageData) const |
| bool | IsReady () const |
| void | Clear () |
| FString | GetFrameTypeString () const |
| bool | StopCapture () |
| bool | InitializeFromCaptureRequest (FDirectCameraMediaPlayer *InPlayer, int32 InCaptureID, DirectCameraFrameType InFrameType) |
| void | SetReady () |
| bool | SaveImage (const FString &FileName, bool ToGallery) |
Static Public Member Functions | |
| static UDirectCameraFrameBuffer * | CreateCaptureFrameBuffer (UMediaPlayer *MediaPlayer, DirectCameraFrameType frameType, int Width, int Height, UObject *WorldContextObject) |
Public Attributes | |
| FOnFrameBufferReady | OnFrameBufferReady |
| int32 | Width |
| int32 | Height |
| DirectCameraFrameType | FrameType |
| int32 | CaptureID |
| UObject * | WorldContext |
Protected Attributes | |
| bool | bIsReady |
| FDirectCameraMediaPlayer * | LinkedPlayer |
| TArray< uint8 > | PlaneYOrImageData |
| TArray< uint8 > | PlaneU |
| TArray< uint8 > | PlaneV |
| UDirectCameraFrameCapture * | FrameBufferCallback |
Friends | |
| class | UDirectCameraFrameCapture |
UDirectCameraFrameBuffer - A Blueprint-compatible class that holds camera frame data This class provides a data buffer from the camera and exposes a second execution output pin which fires when a frame is ready
| UDirectCameraFrameBuffer::UDirectCameraFrameBuffer | ( | ) |
|
virtual |
| void UDirectCameraFrameBuffer::Clear | ( | ) |
Clear the frame buffer and reset its state
|
static |
| FString UDirectCameraFrameBuffer::GetFrameTypeString | ( | ) | const |
Get the frame format as a string for debugging
|
inline |
|
inline |
|
inline |
| bool UDirectCameraFrameBuffer::IsReady | ( | ) | const |
Check if the frame buffer is ready for use
| bool UDirectCameraFrameBuffer::RemoveFrameBufferCallback | ( | UDirectCameraFrameCapture * | InCallback | ) |
| bool UDirectCameraFrameBuffer::SaveImage | ( | const FString & | FileName, |
| bool | ToGallery ) |
| bool UDirectCameraFrameBuffer::SetFrameBufferCallback | ( | UDirectCameraFrameCapture * | InCallback | ) |
| void UDirectCameraFrameBuffer::SetReady | ( | ) |
Set the buffer as ready and trigger the delegate
| bool UDirectCameraFrameBuffer::StopCapture | ( | ) |
Start capturing frames - if this is a video format it will repeatedly capture, otherwise it will capture one frame and fire the event when the frame is ready
|
friend |
|
protected |
Internal state tracking if the buffer is ready
| int32 UDirectCameraFrameBuffer::CaptureID |
|
protected |
| DirectCameraFrameType UDirectCameraFrameBuffer::FrameType |
Type of frame data (VIDEO, YUV420, JPEG, HEIF)
| int32 UDirectCameraFrameBuffer::Height |
Height of the frame in pixels
|
protected |
| FOnFrameBufferReady UDirectCameraFrameBuffer::OnFrameBufferReady |
Delegate called when the frame buffer is ready for use
|
protected |
|
protected |
|
protected |
| int32 UDirectCameraFrameBuffer::Width |
Width of the frame in pixels
| UObject* UDirectCameraFrameBuffer::WorldContext |