Skip to main content
Module: LCKTablet | Version: 0.9.2 | Platforms: All

Overview

LCKTablet provides a complete virtual tablet interface for in-game video capture, combining the LCK recording system with LCKUI components. It includes multiple camera modes, recording controls, and a reactive data model for state management.

Key Components

ULCKSubsystem

World subsystem managing ULCKService lifecycle

ULCKService

Central recording service with high-level API

ULCKTabletDataModel

Reactive data store with UI binding delegates

ALCKTabletUI

Complete tablet actor with UI and camera modes

Architecture

┌─────────────────────────────────────────────────────────────┐
│                     ULCKSubsystem                           │
│                  (World Subsystem)                          │
├─────────────────────────────────────────────────────────────┤
│                      ULCKService                            │
│               (Recording Control API)                       │
├─────────────────────────────────────────────────────────────┤
│  ┌─────────────────┐  ┌─────────────────┐                  │
│  │ ULCKTabletData  │  │ ALCKTabletUI    │                  │
│  │     Model       │  │   (Actor)       │                  │
│  └────────┬────────┘  └────────┬────────┘                  │
│           │                    │                            │
│  Delegates│         ┌─────────┴─────────┐                  │
│           ▼         │                   │                  │
│  ┌────────────┐  ┌──▼────────┐  ┌──────▼──────┐           │
│  │ UI Binding │  │  Camera   │  │   LCKUI     │           │
│  │  Events    │  │  Modes    │  │ Components  │           │
│  └────────────┘  └───────────┘  └─────────────┘           │
└─────────────────────────────────────────────────────────────┘

Quick Start

Access the Service

#include "LCKSubsystem.h"
#include "LCKService.h"

// Get service from world subsystem
ULCKSubsystem* Subsystem = GetWorld()->GetSubsystem<ULCKSubsystem>();
ULCKService* Service = Subsystem->GetService();

// Check initialization
if (Service && Service->IsInitialized())
{
    // Service ready to use
}

Basic Recording

// Configure recording settings
Service->ApplyRecordingSettings(
    1920, 1080,  // Resolution
    30,          // Framerate
    8000000,     // Video bitrate
    256000,      // Audio bitrate
    48000        // Sample rate
);

// Register capture component
Service->RegisterCaptureComponent(TEXT("MainCapture"), MyCaptureComponent);

// Start recording
Service->StartRecording();

// Stop recording
Service->StopRecording();

Event Handling

// Subscribe to events
Service->OnRecordingError.AddDynamic(this, &AMyActor::HandleError);
Service->OnRecordingSaveFinished.AddDynamic(this, &AMyActor::HandleSaveFinished);
Service->OnRecordingSaveProgress.AddDynamic(this, &AMyActor::HandleProgress);

void AMyActor::HandleError(FString ErrorMessage, int32 ErrorCode)
{
    UE_LOG(LogTemp, Error, TEXT("Recording error %d: %s"), ErrorCode, *ErrorMessage);
}

void AMyActor::HandleSaveFinished(bool bSuccess)
{
    UE_LOG(LogTemp, Log, TEXT("Save %s"), bSuccess ? TEXT("succeeded") : TEXT("failed"));
}

void AMyActor::HandleProgress(float Progress)
{
    // Progress is 0.0 to 1.0
    UpdateProgressUI(Progress * 100.0f);
}

Camera Modes

The tablet includes three camera modes:
ModeDescriptionFeatures
SelfieFront-facing cameraFollow mode, front/rear toggle
First PersonPOV cameraDirect player view
Third PersonBehind playerAdjustable distance, front/back

Camera Modes

Learn more about camera mode configuration

Data Model

The ULCKTabletDataModel provides reactive state management with delegates for UI binding:
// Get data model
ULCKTabletDataModel* Model = Tablet->GetDataModel();

// Subscribe to changes
Model->OnMicStateChanged.AddLambda([](ELCKMicState NewState) {
    // Update UI when mic state changes
});

Model->OnVideoQualityChanged.AddLambda([](ELCKVideoQuality NewQuality) {
    // Update UI when quality changes
});

// Trigger state changes
Model->ToggleMicState();
Model->CycleVideoQuality();

Recording Profiles

Pre-configured quality profiles:
ProfileResolutionTypical Use
Profile_SD1280 x 720Mobile VR, performance mode
Profile_HD1920 x 1080Standard recording
Profile_2K2560 x 1440High quality
Profile_4K3840 x 2160Maximum quality (PC only)

Log Category

DECLARE_LOG_CATEGORY_EXTERN(LogLCKTablet, Log, All);

Next Steps