> ## Documentation Index
> Fetch the complete documentation index at: https://docs.liv.tv/llms.txt
> Use this file to discover all available pages before exploring further.

# Core SDK API Reference

> Complete API reference for the LIV Camera Kit (LCK) Core module in Unreal Engine, including ULCKRecorderSubsystem, ILCKEncoder, ILCKAudioSource, structs, enums, and delegates.

## Classes

### ULCKRecorderSubsystem

**ULCKRecorderSubsystem** `class`

World subsystem managing video recording lifecycle.

**Parent:** `UTickableWorldSubsystem`

**Module:** `LCKCore`

#### Properties

| Property | Type | Access | Description |
| - | - | - | - |
| `CaptureComponent` | `USceneCaptureComponent2D*` | BlueprintReadOnly | Active scene capture |
| `RenderTarget` | `UTextureRenderTarget2D*` | BlueprintReadOnly | Capture render target |

#### Methods

| Method | Return | Description |
| - | - | - |
| `SetupRecorder(Params, Component)` | `void` | Initialize recorder |
| `StartRecording()` | `bool` | Begin recording |
| `StopRecording()` | `bool` | Stop recording |
| `TakePhoto()` | `bool` | Capture single frame |
| `StartPreview()` | `void` | Start preview mode |
| `StopPreview()` | `void` | Stop preview mode |
| `IsRecording()` | `bool` | Check recording state |
| `GetTime()` | `float` | Get recording duration |
| `GetMicrophoneVolume()` | `float` | Get mic level (0-1) |
| `SetMicrophoneEnabled(bool)` | `void` | Enable/disable mic |
| `IsMicrophoneEnabled()` | `bool` | Check mic state |

***

### ILCKEncoder

**ILCKEncoder** `interface`

Abstract video encoder interface.

**Module:** `LCKCore`

#### Methods

| Method | Return | Description |
| - | - | - |
| `Open()` | `bool` | Initialize encoder, allocate resources |
| `IsEncoding()` | `bool` | Check if encoder is active |
| `EncodeTexture(Texture, Time)` | `void` | Encode a video frame |
| `EncodeAudio(PCMData)` | `void` | Encode audio samples |
| `Save(ProgressCallback)` | `void` | Finalize and write MP4 file |
| `GetAudioTime()` | `float` | Get current audio timestamp |
| `SetRecordToDisk(bRecord)` | `void` | Control whether encoder writes to disk |
| `AddPacketSink(Sink)` | `void` | Register a packet sink for encoded output |
| `RemovePacketSink(Sink)` | `void` | Unregister 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

| Method | Return | Description |
| - | - | - |
| `GetModularFeatureName()` | `FName` | Static 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

| Property | Type | Description |
| - | - | - |
| `OnAudioDataDelegate` | `FOnRenderAudioDelegate` | Audio data callback (single delegate) |

**Protected Members:**

| Property | Type | Description |
| - | - | - |
| `SupportedChannels` | `TLCKAudioChannelsMask` | Supported channel mask (set in subclass constructor) |

#### Methods

| Method | Return | Description |
| - | - | - |
| `StartCapture()` | `bool` | Start all channels |
| `StartCapture(Channels)` | `bool` | Start specific channels |
| `StopCapture()` | `void` | Stop capture |
| `GetVolume()` | `float` | Current volume (0-1) |
| `GetSourceName()` | `const FString&` | Source identifier |
| `GetSupportedChannels()` | `TLCKAudioChannelsMask` | Channel mask |

> [!WARNING]
>
> `OnAudioDataDelegate` is a **single delegate**, not multicast. Use `BindLambda()` to bind and `ExecuteIfBound()` to fire.

***

## Structures

### FLCKRecorderParams

```cpp theme={null}
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

```cpp theme={null}
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
};
```

| Value | Bit | Description |
| - | - | - |
| `None` | 0 | No audio |
| `Game` | 1 | Game audio, FMOD, Wwise, Vivox incoming |
| `Microphone` | 2 | Mic input, Oboe, Vivox outgoing |
| `VoiceChat` | 4 | Voice chat audio (used by LCKVivox) |

***

## Delegates

### FOnLCKRecorderBoolResult

```cpp theme={null}
DECLARE_DELEGATE_OneParam(FOnLCKRecorderBoolResult, bool /*bSuccess*/);
```

### FOnLCKRecorderProgress

```cpp theme={null}
DECLARE_DELEGATE_OneParam(FOnLCKRecorderProgress, float /*Progress*/);
```

### FDelegateRenderAudio

```cpp theme={null}
DECLARE_MULTICAST_DELEGATE_FourParams(FDelegateRenderAudio,
    TArrayView<const float>/*PCM-interleaved*/,
    int32/*Channels*/,
    int32/*SampleRate*/,
    ELCKAudioChannel/*SourceChannel*/);

typedef FDelegateRenderAudio::FDelegate FOnRenderAudioDelegate;
```

***

## Type Definitions

### TLCKAudioChannelsMask

```cpp theme={null}
typedef uint64 TLCKAudioChannelsMask;

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

***

## Log Categories

```cpp theme={null}
DECLARE_LOG_CATEGORY_EXTERN(LogLCK, Log, All);
DECLARE_LOG_CATEGORY_EXTERN(LogLCKEncoding, Log, All);
DECLARE_LOG_CATEGORY_EXTERN(LogLCKAudio, Log, All);
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.