Skip to main content

Classes

ULCKRecorderSubsystem

ULCKRecorderSubsystem
class
World subsystem managing video recording lifecycle.Parent: UTickableWorldSubsystemModule: LCKCore

Properties

PropertyTypeAccessDescription
CaptureComponentUSceneCaptureComponent2D*BlueprintReadOnlyActive scene capture
RenderTargetUTextureRenderTarget2D*BlueprintReadOnlyCapture render target

Methods

MethodReturnDescription
SetupRecorder(Params, Component)voidInitialize recorder
StartRecording()boolBegin recording
StopRecording()boolStop recording
TakePhoto()boolCapture single frame
StartPreview()voidStart preview mode
StopPreview()voidStop preview mode
IsRecording()boolCheck recording state
GetTime()floatGet recording duration
GetMicrophoneVolume()floatGet mic level (0-1)
SetMicrophoneEnabled(bool)voidEnable/disable mic
IsMicrophoneEnabled()boolCheck mic state

ILCKEncoder

ILCKEncoder
interface
Abstract video encoder interface.Module: LCKCore

Methods

MethodReturnDescription
Open()boolInitialize encoder, allocate resources
IsEncoding()boolCheck if encoder is active
EncodeTexture(Texture, Time)voidEncode a video frame
EncodeAudio(PCMData)voidEncode audio samples
Save(ProgressCallback)voidFinalize and write MP4 file
GetAudioTime()floatGet current audio timestamp
SetRecordToDisk(bRecord)voidControl whether encoder writes to disk
AddPacketSink(Sink)voidRegister a packet sink for encoded output
RemovePacketSink(Sink)voidUnregister a packet sink
GetNativeEncoderHandle()void*Get native encoder handle (Android only)

ILCKEncoderFactory

ILCKEncoderFactory
interface
Factory for creating platform-specific encoders.Interface: IModularFeature, TSharedFromThis<ILCKEncoderFactory, ESPMode::ThreadSafe>Module: LCKCore

Methods

MethodReturnDescription
GetModularFeatureName()FNameStatic feature name
GetEncoderName()const FString&Encoder identifier
CreateEncoder(...)TSharedPtr<ILCKEncoder, ESPMode::ThreadSafe>Create encoder instance

ILCKAudioSource

ILCKAudioSource
interface
Audio source interface for modular audio capture.Interface: IModularFeature, TSharedFromThis<ILCKAudioSource>Module: LCKAudio

Properties

PropertyTypeDescription
OnAudioDataDelegateFOnRenderAudioDelegateAudio data callback (single delegate)
Protected Members:
PropertyTypeDescription
SupportedChannelsTLCKAudioChannelsMaskSupported channel mask (set in subclass constructor)

Methods

MethodReturnDescription
StartCapture()boolStart all channels
StartCapture(Channels)boolStart specific channels
StopCapture()voidStop capture
GetVolume()floatCurrent volume (0-1)
GetSourceName()const FString&Source identifier
GetSupportedChannels()TLCKAudioChannelsMaskChannel mask
OnAudioDataDelegate is a single delegate, not multicast. Use BindLambda() to bind and ExecuteIfBound() to fire.

Structures

FLCKRecorderParams

USTRUCT(BlueprintType)
struct LCKCORE_API FLCKRecorderParams
{
    GENERATED_BODY()

    UPROPERTY(Category="LCK", EditAnywhere, BlueprintReadWrite)
    int32 Width = 1920;

    UPROPERTY(Category="LCK", EditAnywhere, BlueprintReadWrite)
    int32 Height = 1080;

    UPROPERTY(Category="LCK", EditAnywhere, BlueprintReadWrite)
    int32 Framerate = 30;

    UPROPERTY(Category="LCK", EditAnywhere, BlueprintReadWrite)
    int32 VideoBitrate = 2 << 20;

    UPROPERTY(Category="LCK", EditAnywhere, BlueprintReadWrite)
    int32 Samplerate = 48000;

    UPROPERTY(Category="LCK", EditAnywhere, BlueprintReadWrite)
    int32 AudioBitrate = 256 << 10;
};

Enumerations

ELCKAudioChannel

enum ELCKAudioChannel : uint64
{
    None       = 0,           // No audio channel
    Game       = 1,           // Game audio output
    Microphone = 1 << 1,      // Microphone input
    VoiceChat  = 1 << 2,      // Voice chat audio (Vivox)
    Max        = 1 << 3       // Maximum value marker
};
ValueBitDescription
None0No audio
Game1Game audio, FMOD, Wwise, Vivox incoming
Microphone2Mic input, Oboe, Vivox outgoing
VoiceChat4Voice chat audio (used by LCKVivox)

Delegates

FOnLCKRecorderBoolResult

DECLARE_DELEGATE_OneParam(FOnLCKRecorderBoolResult, bool /*bSuccess*/);

FOnLCKRecorderProgress

DECLARE_DELEGATE_OneParam(FOnLCKRecorderProgress, float /*Progress*/);

FDelegateRenderAudio

DECLARE_MULTICAST_DELEGATE_FourParams(FDelegateRenderAudio,
    TArrayView<const float>/*PCM-interleaved*/,
    int32/*Channels*/,
    int32/*SampleRate*/,
    ELCKAudioChannel/*SourceChannel*/);

typedef FDelegateRenderAudio::FDelegate FOnRenderAudioDelegate;

Type Definitions

TLCKAudioChannelsMask

typedef uint64 TLCKAudioChannelsMask;

// Usage
TLCKAudioChannelsMask Channels = ELCKAudioChannel::Game | ELCKAudioChannel::Microphone;

Log Categories

DECLARE_LOG_CATEGORY_EXTERN(LogLCK, Log, All);
DECLARE_LOG_CATEGORY_EXTERN(LogLCKEncoding, Log, All);
DECLARE_LOG_CATEGORY_EXTERN(LogLCKAudio, Log, All);