load_text_symbols
def load_text_symbols(path)
changelogkit static export (read-only): 3243 symbols from 1 sources.
Supported languages: Swift、JavaScript/TypeScript、Python、C/C++、Kotlin、Java、Go、Rust、C#、Ruby、Dart
def load_text_symbols(path)
def _demangler()
No adjacent doc comment
def _heuristic_demangle(name)
No adjacent doc comment
def demangle_swift(name)
No adjacent doc comment
class MachOSymbols
No adjacent doc comment
def __init__(self, path)
No adjacent doc comment
def _parse(self)
No adjacent doc comment
def lookup(self, image_offset)
No adjacent doc comment
class AtosResolver
No adjacent doc comment
def __init__(self, dwarf_path)
No adjacent doc comment
def lookup(self, image_base, runtime_addr, arch="arm64")
No adjacent doc comment
class SymbolResolver
No adjacent doc comment
def __init__(self, symbols_path, slice_uuid=None, app_name=None)
No adjacent doc comment
def _check_text_module(self)
No adjacent doc comment
def lookup(self, image_name, image_base, offset=None, runtime_addr=None)
No adjacent doc comment
def termination_label(crash)
def short_name(name)
No adjacent doc comment
def classify_frame(func_name, is_recursive, idx, total)
No adjacent doc comment
def build_call_tree(frames_info)
No adjacent doc comment
def frame_name(f, img_map, resolver, app_name)
def thread_frames(thread, img_map, resolver, app_name)
No adjacent doc comment
def deadlock_summary(crash, img_map, resolver, app_name, ft_idx)
No adjacent doc comment
def analyze(ips_path, symbols_path=None, as_json=False)
No adjacent doc comment
def main()
No adjacent doc comment
class C
def fmt_ts(ts)
def highlight(msg, keyword, color=C.R)
No adjacent doc comment
def parse_ips(path)
No adjacent doc comment
def parse_analytics(path)
def parse_log(path)
No adjacent doc comment
def analyze(path)
public struct StreamActivityAttributes: ActivityAttributes
No adjacent doc comment
public struct ContentState: Codable, Hashable
No adjacent doc comment
public var streamStatus: StreamStatus
No adjacent doc comment
public var bitrate: String
No adjacent doc comment
public var startedAt: Date?
public var endedAt: Date?
public var updatedAt: Date?
public var elapsedTime: String
No adjacent doc comment
public var viewerCount: Int?
No adjacent doc comment
public var cpuUsage: Double?
No adjacent doc comment
public var memoryUsage: Double?
No adjacent doc comment
public init()
No adjacent doc comment
public init( streamStatus: StreamStatus = .live, bitrate: String = "", elapsedTime: String = "00:00:00", viewerCount: Int? = nil, cpuUsage: Double? = nil, memoryUsage: Double? = nil )
No adjacent doc comment
public var streamTitle: String
No adjacent doc comment
public init(streamTitle: String = "直播中")
No adjacent doc comment
public struct StreamActivityLiveView: View
No adjacent doc comment
public init(state: StreamActivityAttributes.ContentState, streamTitle: String)
No adjacent doc comment
public var body: some View
No adjacent doc comment
public struct StreamActivityElapsedView: View
private let state: StreamActivityAttributes.ContentState
No adjacent doc comment
public init(state: StreamActivityAttributes.ContentState)
public var body: some View
No adjacent doc comment
private static func elapsed(_ duration: TimeInterval) -> String
public enum StreamStatus: Codable, Hashable
No adjacent doc comment
public var label: String
No adjacent doc comment
public struct CGSize: Equatable, Sendable
No adjacent doc comment
public var width: Double
No adjacent doc comment
public var height: Double
No adjacent doc comment
public init()
No adjacent doc comment
public init(width: Double, height: Double)
No adjacent doc comment
public enum CaptureSessionMode: Sendable
No adjacent doc comment
public enum ScalingMode: Sendable
No adjacent doc comment
public enum BitRateMode: Sendable
No adjacent doc comment
public enum AudioMixerTrackMode: Sendable
No adjacent doc comment
public struct VideoCodecSettings: Sendable
No adjacent doc comment
public var bitRate: Int
No adjacent doc comment
public var videoSize: CGSize
No adjacent doc comment
public var profileLevel: String
No adjacent doc comment
public var scalingMode: ScalingMode
No adjacent doc comment
public var expectedFrameRate: Double
No adjacent doc comment
public var bitRateMode: BitRateMode
No adjacent doc comment
public var maxKeyFrameIntervalDuration: Int32
No adjacent doc comment
public var allowFrameReordering: Bool
No adjacent doc comment
public var isLowLatencyRateControlEnabled: Bool
No adjacent doc comment
public var frameInterval: Double
No adjacent doc comment
public var quality: Float?
No adjacent doc comment
public init()
No adjacent doc comment
public struct VideoMixerSettings: Sendable
No adjacent doc comment
public var mode: VideoMixerMode
No adjacent doc comment
public var mainTrack: UInt8
No adjacent doc comment
public init()
No adjacent doc comment
public enum VideoMixerMode: Sendable
No adjacent doc comment
public struct AudioMixerSettings: Sendable
No adjacent doc comment
public var tracks: [UInt8: AudioMixerTrackMode]
No adjacent doc comment
public init()
No adjacent doc comment
public struct NetworkMonitorReport: Sendable
No adjacent doc comment
public var currentBytesOutPerSecond: Int
No adjacent doc comment
public var totalBytesOut: Int
No adjacent doc comment
public var currentBytesInPerSecond: Int
No adjacent doc comment
public var totalBytesIn: Int
No adjacent doc comment
public init()
No adjacent doc comment
public init( currentBytesOutPerSecond: Int, totalBytesOut: Int, currentBytesInPerSecond: Int, totalBytesIn: Int )
No adjacent doc comment
public enum NetworkMonitorEvent: Sendable
No adjacent doc comment
public protocol StreamConvertible: AnyObject
No adjacent doc comment
func setVideoSettings(_ settings: VideoCodecSettings) async throws
No adjacent doc comment
public protocol StreamBitRateStrategy: AnyObject
No adjacent doc comment
func adjustBitrate(_ event: NetworkMonitorEvent, stream: some StreamConvertible) async
No adjacent doc comment
open class MediaMixer
No adjacent doc comment
public init(captureSessionMode: CaptureSessionMode, multiTrackAudioMixingEnabled: Bool)
No adjacent doc comment
public func startRunning() async
No adjacent doc comment
public func stopRunning() async
No adjacent doc comment
public func setVideoMixerSettings(_: VideoMixerSettings) async
No adjacent doc comment
public func setAudioMixerSettings(_: AudioMixerSettings) async
No adjacent doc comment
public func addOutput(_: Any) async
No adjacent doc comment
public func removeOutput(_: Any) async
No adjacent doc comment
public func setSessionPreset(_: Any) async
No adjacent doc comment
public func videoIO() -> Any
No adjacent doc comment
open class RTMPConnection
No adjacent doc comment
public enum Error: Swift.Error
No adjacent doc comment
public init()
No adjacent doc comment
open func connect(_: String) async throws
No adjacent doc comment
open func close() async throws
No adjacent doc comment
open class RTMPStream: StreamConvertible
No adjacent doc comment
public enum Error: Swift.Error
No adjacent doc comment
public init(connection: RTMPConnection)
No adjacent doc comment
open func publish(_: String) async throws
No adjacent doc comment
open func close() async throws
No adjacent doc comment
open func setVideoInputBufferCounts(_: Int) async
No adjacent doc comment
open func setVideoInputBufferLimits(bytes _: Int, duration _: TimeInterval)
No adjacent doc comment
public var videoSettings: VideoCodecSettings
No adjacent doc comment
public func setVideoSettings(_: VideoCodecSettings) async throws
No adjacent doc comment
open func setBitRateStrategy(_: StreamBitRateStrategy?) async
No adjacent doc comment
public final class AdaptiveVideoBufferManager
No adjacent doc comment
private var currentBufferCount: Int
No adjacent doc comment
private var lastSetBufferCount: Int
No adjacent doc comment
private var minBufferCount
No adjacent doc comment
private var maxBufferCount
No adjacent doc comment
private var lastFrameTime: CFTimeInterval
No adjacent doc comment
private var frameIntervals: [CFTimeInterval]
No adjacent doc comment
private let maxSamples
No adjacent doc comment
private var smoothedFPS: Double
No adjacent doc comment
private let emaAlpha: Double
No adjacent doc comment
private var lastAdjustTime: CFTimeInterval
No adjacent doc comment
private let adjustInterval: CFTimeInterval
No adjacent doc comment
private var lastStableFPS: Double
No adjacent doc comment
private let hysteresisMargin: Double
No adjacent doc comment
private var targetFPS: Double
No adjacent doc comment
private let lowFPSThreshold: Double
No adjacent doc comment
private let highFPSThreshold: Double
No adjacent doc comment
private var useFixedTargetFPS
No adjacent doc comment
private let fixedTargetFPS: Double
No adjacent doc comment
private var lastLogTime: CFTimeInterval
No adjacent doc comment
private let logInterval: CFTimeInterval
No adjacent doc comment
private var bufferPerformanceHistory: [Int: [Double]]
No adjacent doc comment
private let maxHistoryPerBuffer
No adjacent doc comment
public init()
No adjacent doc comment
public func monitorFPSAndAdjust( with sampleBuffer: CMSampleBuffer, rtmpStream: RTMPStream, sendlog: @escaping (String) -> Void )
No adjacent doc comment
private extension Array where Element == Double
No adjacent doc comment
func average() -> Double
No adjacent doc comment
final class AGCProcessor
No adjacent doc comment
private var targetLevel: Float
No adjacent doc comment
private var gain: Float
No adjacent doc comment
private let attack: Float
No adjacent doc comment
private let release: Float
No adjacent doc comment
func process(_ buffer: UnsafeMutablePointer<Float>, count: Int)
No adjacent doc comment
final class EchoCanceller
No adjacent doc comment
private var referenceBuffer: [Float]
No adjacent doc comment
private var writeIndex: Int
No adjacent doc comment
init(size: Int)
No adjacent doc comment
func updateReference(_ ref: UnsafePointer<Float>, count: Int)
No adjacent doc comment
func process(_ mic: UnsafeMutablePointer<Float>, count: Int)
No adjacent doc comment
final class RealTimeNoiseSuppressor
No adjacent doc comment
private let frameSize
No adjacent doc comment
private let fftSize
No adjacent doc comment
private let hopSize
No adjacent doc comment
private let log2n: vDSP_Length
No adjacent doc comment
private var fftSetup: FFTSetup
No adjacent doc comment
private var window: [Float]
No adjacent doc comment
private var inputBuffer: [Float]
No adjacent doc comment
private var fftBuffer: [Float]
No adjacent doc comment
private var outputBuffer: [Float]
No adjacent doc comment
private var real: [Float]
No adjacent doc comment
private var imag: [Float]
No adjacent doc comment
private var mag: [Float]
No adjacent doc comment
private var gain: [Float]
No adjacent doc comment
private var snr: [Float]
No adjacent doc comment
private var noiseEstimate: [Float]
No adjacent doc comment
private var tmp1: [Float]
No adjacent doc comment
private var tmp2: [Float]
No adjacent doc comment
private var outBuffer: [Float]
No adjacent doc comment
private var overlapBuffer: [Float]
No adjacent doc comment
private var ringBuffer: [Float]
No adjacent doc comment
private var writeIndex: Int
No adjacent doc comment
private var vadThreshold: Float
No adjacent doc comment
private var vadHangover: Int
No adjacent doc comment
private var vadCounter: Int
No adjacent doc comment
private var isSpeech: Bool
No adjacent doc comment
init()
No adjacent doc comment
private func pushToRingBuffer(_ input: UnsafePointer<Float>, count: Int)
No adjacent doc comment
private func loadFFTWindow(_ out: inout [Float])
No adjacent doc comment
func process(_ ptr: UnsafeMutablePointer<Float>, count: Int)
No adjacent doc comment
final class AudioEngine
No adjacent doc comment
private let preProcessor: AudioPreProcessor
No adjacent doc comment
init(micGain: Float? = nil, echoFix: Bool? = nil, noiseFix: Bool? = nil, agcFix: Bool? = nil, metalAudio: Bool? = nil)
No adjacent doc comment
func updateAudioState(micGain: Float? = nil, echoFix: Bool? = nil, noiseFix: Bool? = nil, agcFix: Bool? = nil, metalAudio: Bool? = nil)
No adjacent doc comment
func process(_ sampleBuffer: CMSampleBuffer, track: AudioTrackType)
No adjacent doc comment
func cleanup()
No adjacent doc comment
final class AudioPreProcessor
No adjacent doc comment
private struct State
No adjacent doc comment
private var state
No adjacent doc comment
private let stateQueue
No adjacent doc comment
func updateState(micGain: Float? = nil, echoFix: Bool? = nil, noiseFix: Bool? = nil, agcFix: Bool? = nil, metalAudio: Bool? = nil)
No adjacent doc comment
private var micFloatBuffer: [Float]
No adjacent doc comment
private var tempFloatBuffer: [Float]
No adjacent doc comment
private var processFloatBuffer: [Float]
No adjacent doc comment
private let agc
No adjacent doc comment
private let echo
No adjacent doc comment
private let ns
No adjacent doc comment
private var metalNS: MetalRealTimeNoiseSuppressor?
No adjacent doc comment
private let gpuLatency
No adjacent doc comment
init(maxFrameSize: Int = 512,micGain:Float? = nil,echoFix:Bool? = nil, noiseFix:Bool? = nil,agcFix:Bool? = nil,metalAudio:Bool? = nil)
No adjacent doc comment
func processApp(_ ptr: UnsafeMutablePointer<Float>, count: Int)
No adjacent doc comment
func processMic(_ ptr: UnsafeMutablePointer<Float>, count: Int)
No adjacent doc comment
func process(_ sampleBuffer: CMSampleBuffer, track: AudioTrackType)
No adjacent doc comment
private func applyPostGain(_ buffer: inout [Float], count: Int)
No adjacent doc comment
private func ensureCapacity(_ count: Int)
No adjacent doc comment
func cleanup()
No adjacent doc comment
struct NoiseSuppressParams
No adjacent doc comment
final class GPULatencyTracker
No adjacent doc comment
private var history: [Double]
No adjacent doc comment
private let maxSize
No adjacent doc comment
private var _isOverloaded
No adjacent doc comment
private var lastFallbackTime: CFTimeInterval
No adjacent doc comment
private let cooldownDuration: CFTimeInterval
No adjacent doc comment
func record(_ seconds: Double)
No adjacent doc comment
func reset()
No adjacent doc comment
final class MetalRealTimeNoiseSuppressor
No adjacent doc comment
private let frameSize
No adjacent doc comment
private let fftSize
No adjacent doc comment
private let hopSize
No adjacent doc comment
private let log2n: vDSP_Length
No adjacent doc comment
private var fftSetup: FFTSetup
No adjacent doc comment
private var window: [Float]
No adjacent doc comment
private var inputBuffer: [Float]
No adjacent doc comment
private var fftBuffer: [Float]
No adjacent doc comment
private var outputBuffer: [Float]
No adjacent doc comment
private var real: [Float]
No adjacent doc comment
private var imag: [Float]
No adjacent doc comment
private var mag: [Float]
No adjacent doc comment
private var gain: [Float]
No adjacent doc comment
private var noiseEstimate: [Float]
No adjacent doc comment
private var tmp1: [Float]
No adjacent doc comment
private var tmp2: [Float]
No adjacent doc comment
private var outBuffer: [Float]
No adjacent doc comment
private var overlapBuffer: [Float]
No adjacent doc comment
private var ringBuffer: [Float]
No adjacent doc comment
private var writeIndex: Int
No adjacent doc comment
private var vadThreshold: Float
No adjacent doc comment
private var vadHangover: Int
No adjacent doc comment
private var vadCounter: Int
No adjacent doc comment
private var isSpeech: Bool
No adjacent doc comment
private let metalDevice: MTLDevice
No adjacent doc comment
private let metalQueue: MTLCommandQueue
No adjacent doc comment
private let metalPipeline: MTLComputePipelineState
No adjacent doc comment
private let magBuffer: MTLBuffer
No adjacent doc comment
private let noiseBuffer: MTLBuffer
No adjacent doc comment
private let gainBuffer: MTLBuffer
No adjacent doc comment
private let realBuffer: MTLBuffer
No adjacent doc comment
private let imagBuffer: MTLBuffer
No adjacent doc comment
private let paramsBuffer: MTLBuffer
No adjacent doc comment
private let gpuTimeoutMs: Double
No adjacent doc comment
private let metalLogLock
No adjacent doc comment
private var lastMetalIssueLogAt
No adjacent doc comment
private var metalKernelSubmitCount: UInt64
No adjacent doc comment
private var metalKernelTimeoutCount: UInt64
No adjacent doc comment
private var metalKernelErrorCount: UInt64
No adjacent doc comment
init?()
No adjacent doc comment
private func pushToRingBuffer(_ input: UnsafePointer<Float>, count: Int)
No adjacent doc comment
private func loadFFTWindow(_ out: inout [Float])
No adjacent doc comment
func process(_ ptr: UnsafeMutablePointer<Float>, count: Int, forceCPU: Bool = false)
No adjacent doc comment
private func fallbackCPUNoiseModel(split: inout DSPSplitComplex)
No adjacent doc comment
private func runMetalKernelWithTimeout(split: inout DSPSplitComplex) -> Bool
No adjacent doc comment
private func recordMetalIssue(_ message: String)
No adjacent doc comment
private func describeCommandBufferError(_ error: Error?) -> String
No adjacent doc comment
enum AudioTrackType: UInt8
No adjacent doc comment
private func rmsSIMD(from sampleBuffer: CMSampleBuffer) -> Float?
No adjacent doc comment
func pcmBitrate(from sampleBuffer: CMSampleBuffer) -> [String:Any]
No adjacent doc comment
final class VolumeNotifier
No adjacent doc comment
func cleanup()
No adjacent doc comment
func updateVolume(app: Float? = nil, mic: Float? = nil)
No adjacent doc comment
private let minimumAudibleVolume: Double
No adjacent doc comment
private func clampUnit(_ value: Double) -> Double
No adjacent doc comment
private func formatLinearVolumeForLog(_ value: Float) -> String
No adjacent doc comment
func percentageToVolume(_ percentage: Double) -> Double
No adjacent doc comment
func volumeToPercentage(_ volume: Double) -> Double
No adjacent doc comment
actor AudioProcessorActor
No adjacent doc comment
private let mediaMixer: MediaMixer
No adjacent doc comment
private var volumeNotifier: VolumeNotifier
No adjacent doc comment
private var audioEngine: AudioEngine?
No adjacent doc comment
private var useOriginal: Bool
No adjacent doc comment
private var appAddVolume: Float
No adjacent doc comment
private var micAddVolume: Float
No adjacent doc comment
private var appVolume: Float
No adjacent doc comment
private var micVolume: Float
No adjacent doc comment
private var onAudioPage: Bool
No adjacent doc comment
private var gainFloatBuffer: [Float]
No adjacent doc comment
private var lastAppRMS: Float
No adjacent doc comment
private var lastMicRMS: Float
No adjacent doc comment
private var lastAppRMSUpdateTime: CFTimeInterval
No adjacent doc comment
private var lastMicRMSUpdateTime: CFTimeInterval
No adjacent doc comment
private var lastAppGainLogTime: CFTimeInterval
No adjacent doc comment
private var lastMicGainLogTime: CFTimeInterval
No adjacent doc comment
init(mediaMixer: MediaMixer, volumeNotifier: VolumeNotifier, appAddVolume: Float, micAddVolume: Float, appVolume: Float, micVolume: Float, onAudioPage: Bool)
No adjacent doc comment
func enqueue(_ sampleBuffer: CMSampleBuffer, trackType: AudioTrackType, originalTime: CMSampleTimingInfo) async
No adjacent doc comment
private enum PCMGainFormat
No adjacent doc comment
func applyGain(_ sampleBuffer: CMSampleBuffer, trackType: AudioTrackType) -> CMSampleBuffer
No adjacent doc comment
private func pcmGainFormat(_ sampleBuffer: CMSampleBuffer) -> PCMGainFormat?
No adjacent doc comment
private func logGainPathIfNeeded(trackType: AudioTrackType, format: PCMGainFormat, gain: Float, sampleCount: Int)
No adjacent doc comment
private func logGainPathIfNeeded(trackType: AudioTrackType, message: String)
No adjacent doc comment
private func ensureGainBufferCapacity(_ count: Int)
No adjacent doc comment
private func processRMS(_ buffer: CMSampleBuffer, trackType: AudioTrackType, originalTime: CMSampleTimingInfo)
No adjacent doc comment
func cleanup()
No adjacent doc comment
func updateAudioState(micGain: Float? = nil, echoFix: Bool? = nil, noiseFix: Bool? = nil, agcFix: Bool? = nil, metalAudio: Bool? = nil)
No adjacent doc comment
func updateVolumes(micAdd value: Float)
No adjacent doc comment
func updateVolumes(appAdd value: Float)
No adjacent doc comment
func setControlVolumes(app: Float, mic: Float, micGain: Float)
func updateVolumes(mic value: Float)
No adjacent doc comment
func updateVolumes(app value: Float)
No adjacent doc comment
func updatePage(status: Bool)
No adjacent doc comment
final class AudioProcessor
No adjacent doc comment
private let actor: AudioProcessorActor
No adjacent doc comment
init(mediaMixer: MediaMixer, volumeNotifier: VolumeNotifier, appAddVolume: Float, micAddVolume: Float, appVolume: Float, micVolume: Float, onAudioPage: Bool)
No adjacent doc comment
func enqueue(_ sampleBuffer: CMSampleBuffer, trackType: AudioTrackType, originalTime: CMSampleTimingInfo)
No adjacent doc comment
func updateVolumes(micAdd value: Float)
No adjacent doc comment
func updateVolumes(appAdd value: Float)
No adjacent doc comment
func setControlVolumes(app: Float, mic: Float, micGain: Float) async
func updateVolumes(mic value: Float)
No adjacent doc comment
func updateVolumes(app value: Float)
No adjacent doc comment
func updatePage(status: Bool)
No adjacent doc comment
func updateAudioState(micGain: Float? = nil, echoFix: Bool? = nil, noiseFix: Bool? = nil, agcFix: Bool? = nil, metalAudio: Bool? = nil)
No adjacent doc comment
func cleanup()
No adjacent doc comment
actor = AudioProcessorActor( mediaMixer: mediaMixer, volumeNotifier: volumeNotifier, appAddVolume: appAddVolume, micAddVolume: micAddVolume, appVolume: appVolume, micVolume: micVolume, onAudioPage: onAudioPage )
No adjacent doc comment
final actor MyStreamBitRateStrategy: @preconcurrency StreamBitRateStrategy
No adjacent doc comment
private let inner: StreamVideoAdaptiveBitRateStrategy
No adjacent doc comment
private var cachedVideoBitRate: Int
No adjacent doc comment
private var cachedAudioBitRate: Int
No adjacent doc comment
private var avgOutBps: Double?
No adjacent doc comment
private var lastAvgUpdateTime: Date?
No adjacent doc comment
private let tau: TimeInterval
No adjacent doc comment
private var statsLogCounter: Int
No adjacent doc comment
private let statsLogInterval: Int
No adjacent doc comment
init(videoBitRate: Int = 6_000_000, audioBitRate: Int = 128_000)
No adjacent doc comment
func adjustBitrate(_ event: HaishinKit.NetworkMonitorEvent, stream: some HaishinKit.StreamConvertible) async
No adjacent doc comment
private func updateAvgOutBps(latest: Double)
No adjacent doc comment
private func bytesToKbps(_ bytes: Int) -> Int
No adjacent doc comment
private struct UnsafeSendableValue<T>: @unchecked Sendable
No adjacent doc comment
final class RPVideoRotatorCPU_NV12: @unchecked Sendable
No adjacent doc comment
private struct PooledBuffer
No adjacent doc comment
private var bufferPool: [PooledBuffer]
No adjacent doc comment
private let poolLock
No adjacent doc comment
private let maxPoolSize: Int
No adjacent doc comment
init(maxPoolSize: Int = 3)
No adjacent doc comment
func logTo(_ message: String)
No adjacent doc comment
func cleanup()
No adjacent doc comment
func rotateAsync(sampleBuffer: CMSampleBuffer, angle: RotationAngle, needsRotation: Bool) async -> CMSampleBuffer?
No adjacent doc comment
private func getReusableBuffer(width: Int, height: Int) -> CVPixelBuffer?
No adjacent doc comment
private func rotateNV12CPU(inPixelBuffer: CVPixelBuffer, outPixelBuffer: CVPixelBuffer, angle: RotationAngle) -> Bool
No adjacent doc comment
private func rotateNV12CPUWithLetterbox(inPixelBuffer: CVPixelBuffer, outPixelBuffer: CVPixelBuffer, angle: RotationAngle, scaledW: Int, scaledH: Int, offsetX: Int, offsetY: Int) -> Bool
No adjacent doc comment
private func rotateAndScaleNV12(inPixelBuffer: CVPixelBuffer, outPixelBuffer: CVPixelBuffer, angle: RotationAngle, rotatedW: Int, rotatedH: Int, scaledW: Int, scaledH: Int, offsetX: Int, offsetY: Int) -> Bool
No adjacent doc comment
private func wrapPixelBuffer(_ pixelBuffer: CVPixelBuffer, originalSampleBuffer: CMSampleBuffer) -> CMSampleBuffer?
No adjacent doc comment
class DeviceOrientationManager
No adjacent doc comment
private var motionManager: CMMotionManager?
No adjacent doc comment
private(set) var currentOrientation: UIDeviceOrientation
No adjacent doc comment
enum MacOrientation
No adjacent doc comment
private(set) var currentOrientation: MacOrientation
No adjacent doc comment
init()
No adjacent doc comment
func startUpdates(interval: TimeInterval = 0.2)
No adjacent doc comment
func stopUpdates()
No adjacent doc comment
func setOrientation(_ orientation: MacOrientation)
No adjacent doc comment
func startUpdates(interval: TimeInterval = 0.2)
No adjacent doc comment
func stopUpdates()
No adjacent doc comment
struct StaticFormatter
No adjacent doc comment
func formattedTime() -> String
No adjacent doc comment
final class RemoteLogger
No adjacent doc comment
private var buffer: [[String: Any]]
No adjacent doc comment
private var isFlushing
No adjacent doc comment
private let queue
No adjacent doc comment
private let flushInterval: TimeInterval
No adjacent doc comment
private var flushTimer: DispatchSourceTimer?
No adjacent doc comment
private let maxLogCount
No adjacent doc comment
private var logURL: URL?
No adjacent doc comment
init()
No adjacent doc comment
func addDebugLog(title:String = "ReplyKit[Remote]", _ msg:String = "")
No adjacent doc comment
func log(title: String, message: String)
No adjacent doc comment
func flush()
No adjacent doc comment
private func setupFlushTimer()
No adjacent doc comment
final class LogManager
No adjacent doc comment
enum Mode
No adjacent doc comment
final class LogBatcher
No adjacent doc comment
private let queue
No adjacent doc comment
private var counters: [String: Int]
No adjacent doc comment
private var lastMessages: [String: String]
No adjacent doc comment
func add(title: String, message: String)
No adjacent doc comment
func flush() -> [String]
No adjacent doc comment
private let logQueue
No adjacent doc comment
private var localLogBuffer: [String]
No adjacent doc comment
private let maxRingBufferEntries
No adjacent doc comment
private let groupID
No adjacent doc comment
private let maxForceFlushLines
No adjacent doc comment
private var flushTimer: DispatchSourceTimer?
No adjacent doc comment
private var lastNotifyTime: Date
No adjacent doc comment
private var remoteLogger: RemoteLogger?
No adjacent doc comment
func setMode(_ Num:Int = 1)
No adjacent doc comment
func addDebugLog(title:String = "ReplyKit[Local]", _ msg:String = "")
No adjacent doc comment
private init()
No adjacent doc comment
func forceFlush()
No adjacent doc comment
func log(title: String = "ReplyKit", message: String, flushImmediately: Bool = false)
No adjacent doc comment
func discardBuffer()
No adjacent doc comment
func setupFlushTimer()
No adjacent doc comment
private func flushLocalLogs(forceNotify: Bool = false)
No adjacent doc comment
private let ioFailureLock
No adjacent doc comment
private var ioFailureCount
No adjacent doc comment
private var ioLastError: String?
No adjacent doc comment
private var ioFailureFlushItem: DispatchWorkItem?
No adjacent doc comment
private let ioFailureFlushDelay: TimeInterval
No adjacent doc comment
private func recordIOFailure(_ context: String, _ error: Error)
private func flushIOFailures()
No adjacent doc comment
private var lastSealedPrune
private func sealLogBatch(_ text: String, channel: String)
No adjacent doc comment
private func writeLogToFile(_ text: String)
No adjacent doc comment
private let earlyLogLock
No adjacent doc comment
private var earlyLogPending: [String]
No adjacent doc comment
private var earlyLogFlushItem: DispatchWorkItem?
No adjacent doc comment
private let earlyLogFlushDelay: TimeInterval
No adjacent doc comment
private let earlyLogFlushThreshold
No adjacent doc comment
private func enqueueEarlyLog(_ text: String)
private func scheduleEarlyLogFlush()
No adjacent doc comment
private func flushEarlyLog()
private func writeEarlyLogToFile(_ text: String)
No adjacent doc comment
private func notifyMainAppIfNeeded(forceNotify: Bool = false)
No adjacent doc comment
private func formattedTime() -> String
No adjacent doc comment
final class RPConfig
No adjacent doc comment
private let stateLock
No adjacent doc comment
func withState<T>(_ block: (inout State) -> T) -> T
No adjacent doc comment
func readState<T>(_ block: (State) -> T) -> T
No adjacent doc comment
struct State
No adjacent doc comment
func updateAudio( isOringinAudio:Bool? = nil, AppVolume:Double? = nil, MicVolume:Double? = nil, AppVolumeAdd:Double? = nil, MicVolumeAdd:Double? = nil, enableNoiseFix:Bool? = nil, enableEchoFix:Bool? = nil, enableAGCFix:Bool? = nil, enableMetalAudio:Bool? = nil )
No adjacent doc comment
func updateState(RTMPURL:String? = nil, RTMPKey:String? = nil, h264level:String? = nil, videoCodec:String? = nil, hevcLevel:String? = nil, BitRateMode:Int? = nil, BufferCount:Int? = nil, BitRate:Int? = nil, ChangeBit:Bool? = nil, isLowLatencyRateControlEnabled:Bool? = nil, allowFrameReordering:Bool? = nil, h264useCAVLC:Bool? = nil, vtSpeedPriority:Bool? = nil, useEnhancedRTMP:Bool? = nil, useBic:Bool? = nil, Rotate:Int? = nil, RotateOriginal:Bool? = nil, ADWidth:Int? = nil, ADHeight:Int? = nil, ODWidth:Int? = nil, ODHeight:Int? = nil, KeyFrameInterval:Int? = nil, enableRTMPLog:Bool? = nil, )
No adjacent doc comment
private init()
No adjacent doc comment
func applyLogMode()
No adjacent doc comment
func updateLogFixState()
No adjacent doc comment
func updateONLogFixState()
No adjacent doc comment
func sendlog(title: String = "ReplyKit", message: String, flush: Bool = false)
No adjacent doc comment
func fixlogSafeKey(_ str:String) -> String
No adjacent doc comment
class Eventlisten
No adjacent doc comment
struct GPUCommandStats: Sendable
No adjacent doc comment
final class TimestampDebugger
No adjacent doc comment
struct FrameInfo
No adjacent doc comment
private var lastOriginal: FrameInfo?
No adjacent doc comment
private var lastWrapped: FrameInfo?
No adjacent doc comment
private var frameCount: Int
No adjacent doc comment
func log(originalTime: CMSampleTimingInfo, wrapped: CMSampleBuffer?)
No adjacent doc comment
private func delta(from: CMTime?, to: CMTime) -> Double
No adjacent doc comment
private func format(_ time: CMTime) -> String
No adjacent doc comment
private func formatMS(_ ms: Double) -> String
No adjacent doc comment
enum RotationAngle: UInt32, Codable, CaseIterable, Identifiable, CustomStringConvertible
No adjacent doc comment
final class RPVideoRotatorNV12BatchQueueOptimized: @unchecked Sendable
No adjacent doc comment
enum QualityMode: CustomStringConvertible
No adjacent doc comment
private let tsDebugger
No adjacent doc comment
func tsDebug(_ on:Bool=false)
No adjacent doc comment
private var pipelineBilinear: MTLComputePipelineState?
No adjacent doc comment
private var pipelineBicubic: MTLComputePipelineState?
No adjacent doc comment
private var isActive
No adjacent doc comment
struct Params
No adjacent doc comment
struct RenderParamsKey: Equatable
private var renderParamsKey: RenderParamsKey?
private var renderParamsValue: Params?
No adjacent doc comment
static func makeParams( srcW: UInt32, srcH: UInt32, dstW: UInt32, dstH: UInt32, oDstW: UInt32, oDstH: UInt32, angle: RotationAngle ) -> Params
struct OutputKey: Hashable
No adjacent doc comment
private var outputPool: [OutputKey: CVPixelBufferPool]
No adjacent doc comment
private let outputPoolLock
No adjacent doc comment
private let maxPoolSize: Int
No adjacent doc comment
final class ReusableOutputSet
No adjacent doc comment
init(pixelBuffer: CVPixelBuffer, yTex: MTLTexture, uvTex: MTLTexture, cvY: CVMetalTexture? = nil, cvUV: CVMetalTexture? = nil)
No adjacent doc comment
actor AsyncSemaphore
No adjacent doc comment
private var capacity: Int
No adjacent doc comment
private var available: Int
No adjacent doc comment
private var waiters: [CheckedContinuation<Void, Never>]
No adjacent doc comment
struct Info
No adjacent doc comment
private var snapshot
No adjacent doc comment
init(value: Int)
No adjacent doc comment
func update(_ max:Int)
No adjacent doc comment
func wait() async
No adjacent doc comment
private func removeCurrentContinuation()
No adjacent doc comment
func signal()
No adjacent doc comment
func info() -> Info
No adjacent doc comment
func reset()
No adjacent doc comment
func cleanup()
No adjacent doc comment
private func cleanupResources()
private func cleanupResourcesLocked()
init?(dstW: Int = 0, dstH: Int = 0,outW:Int=0, outH:Int=0, debug: Bool = false, maxPoolSize: Int = 10 , useBic:QualityMode = .live ,RotateOriginal:Bool = false )
No adjacent doc comment
private var consecutiveMetalFailures
private let maxConsecutiveMetalFailures
No adjacent doc comment
private var metalPermanentFailure
private let commandBufferTimeout: TimeInterval
No adjacent doc comment
private let metalFailureLogLock
No adjacent doc comment
private var lastMetalFailureLogAt
No adjacent doc comment
private let commandStatsLock
No adjacent doc comment
private var nextCommandID: UInt64
No adjacent doc comment
private var submittedCommandCount: UInt64
No adjacent doc comment
private var completedCommandCount: UInt64
No adjacent doc comment
private var timedOutCommandCount: UInt64
No adjacent doc comment
private var commandBufferInFlight
No adjacent doc comment
private let latencyRingCapacity
No adjacent doc comment
private var latencyRing
No adjacent doc comment
private var latencyRingCount
No adjacent doc comment
private var latencyRingWrite
No adjacent doc comment
private var originalQualityMode: QualityMode?
private let lifecycleLock
private var effectiveQualityMode: QualityMode
No adjacent doc comment
private func handleMetalFailure(_ reason: String)
private func resetConsecutiveFailures()
private func handleMetalFailureLocked(_ reason: String)
private func logMetalFailure(reason: String, count: Int)
No adjacent doc comment
private func nextCommandSnapshot() -> (id: UInt64, inFlight: Int, submitted: UInt64)
No adjacent doc comment
private func markCommandCompleted(elapsedMs: Double) -> (inFlight: Int, completed: UInt64)
No adjacent doc comment
private func latencyStats() -> (avgMs: Double, maxMs: Double, p95Ms: Double)
private func markCommandTimedOut() -> UInt64
No adjacent doc comment
private func commandStatsSnapshot() -> String
No adjacent doc comment
func commandStats() -> GPUCommandStats
No adjacent doc comment
func completionLatencyStats() -> (avgMs: Double, maxMs: Double, p95Ms: Double)
private func poolSnapshot() -> String
No adjacent doc comment
private func memorySnapshot() -> String
No adjacent doc comment
private func describeCommandBufferError(_ error: Error?) -> String
No adjacent doc comment
private func ensureMetalPipelineSnapshot() -> MTLComputePipelineState?
private func resolvePipelineLocked() -> MTLComputePipelineState?
private func buildComputePipeline(functionName: String, store: inout MTLComputePipelineState?) -> Bool
No adjacent doc comment
private func logTo(_ message: String)
No adjacent doc comment
private final class FrameContext:@unchecked Sendable
No adjacent doc comment
init(timing:CMSampleTimingInfo, outSet: RPVideoRotatorNV12BatchQueueOptimized.ReusableOutputSet, inY:CVMetalTexture, inUV:CVMetalTexture )
No adjacent doc comment
private final class CommandCompletionState: @unchecked Sendable
No adjacent doc comment
private let lock
No adjacent doc comment
private var didResume
No adjacent doc comment
private var timedOut
No adjacent doc comment
func markCompletion() -> (shouldResume: Bool, completedAfterTimeout: Bool)
No adjacent doc comment
func markTimeout() -> Bool
No adjacent doc comment
func rotateAsync(pixelBuffer: CVPixelBuffer, originalTime: CMSampleTimingInfo, angle: RotationAngle) async -> CMSampleBuffer?
No adjacent doc comment
private func outputBufferPool(width: Int, height: Int) -> CVPixelBufferPool?
No adjacent doc comment
private func getReusableOutput(width: Int, height: Int) -> ReusableOutputSet?
No adjacent doc comment
private func prewarmPool()
No adjacent doc comment
func makeTexture(from pixelBuffer: CVPixelBuffer, planeIndex: Int) -> (cv: CVMetalTexture, tex: MTLTexture)?
No adjacent doc comment
private func pixelFormatDescription(_ pixelBuffer: CVPixelBuffer) -> String
No adjacent doc comment
private func textureDescription(_ texture: MTLTexture) -> String
No adjacent doc comment
private func wrapPixelBuffer( _ outSet: ReusableOutputSet, timing: CMSampleTimingInfo ) -> CMSampleBuffer?
private func fallbackSampleBuffer( pixelBuffer: CVPixelBuffer, timing: CMSampleTimingInfo ) -> CMSampleBuffer?
No adjacent doc comment
func renderPlaneYUV(cmd: MTLCommandBuffer, compute: MTLComputePipelineState, srcY: MTLTexture, srcUV: MTLTexture, dstY: MTLTexture, dstUV: MTLTexture, angle: RotationAngle, overlayEncoded: inout Bool) -> Bool
No adjacent doc comment
private func paramsForFrame( srcW: UInt32, srcH: UInt32, dstW: UInt32, dstH: UInt32, angle: RotationAngle ) -> Params
extension Collection
No adjacent doc comment
subscript(safe index: Index) -> Element?
No adjacent doc comment
extension CVMetalTextureCache
No adjacent doc comment
static func create(device: MTLDevice) throws -> CVMetalTextureCache
No adjacent doc comment
final class MetalContext: @unchecked Sendable
No adjacent doc comment
private(set) var queue: MTLCommandQueue
No adjacent doc comment
private init()
No adjacent doc comment
private func deviceDebugDescription(_ device: MTLDevice) -> String
No adjacent doc comment
func ensureTextureCache() -> CVMetalTextureCache?
No adjacent doc comment
func rebuildQueue()
No adjacent doc comment
final class OutputOverlayMetalRenderer: @unchecked Sendable
No adjacent doc comment
private struct OverlaySnapshot
No adjacent doc comment
private let stateLock
No adjacent doc comment
private var snapshot
No adjacent doc comment
private var pipeline: MTLComputePipelineState?
No adjacent doc comment
private var pendingConfig
No adjacent doc comment
private var configVersion
No adjacent doc comment
private var refreshQueued
No adjacent doc comment
private let producerQueue
No adjacent doc comment
private var lastProducedSecond
No adjacent doc comment
private var lastProducedVersion
No adjacent doc comment
private let throttleLock
No adjacent doc comment
private let statsLock
No adjacent doc comment
private var overlayFrameCount: UInt64
No adjacent doc comment
private var lastOverlayDurationLogTime: CFAbsoluteTime
No adjacent doc comment
private var lastMissingCompositeFunctionLogTime: CFAbsoluteTime
No adjacent doc comment
private var lastPipelineFailedLogTime: CFAbsoluteTime
No adjacent doc comment
private var lastBitmapContextFailedLogTime: CFAbsoluteTime
No adjacent doc comment
private var lastTextureCreateFailedLogTime: CFAbsoluteTime
No adjacent doc comment
private let formatter
No adjacent doc comment
private let startedAt
No adjacent doc comment
private init()
No adjacent doc comment
func applyIfNeeded(commandBuffer: MTLCommandBuffer, dstY: MTLTexture, dstUV: MTLTexture) -> Bool
private func frameAccess() -> (snapshot: OverlaySnapshot, pipeline: MTLComputePipelineState?)
private func requestRefreshIfNeeded(currentSecond: Int)
func reloadConfig()
No adjacent doc comment
func apply(config: OverlaySceneConfig, persist: Bool = true)
No adjacent doc comment
private func applyInternal(config: OverlaySceneConfig)
No adjacent doc comment
private func runProducer()
private func ensurePipeline()
private func finishRefreshCycle()
No adjacent doc comment
private func publish(snapshot newSnapshot: OverlaySnapshot, version: Int, second: Int)
No adjacent doc comment
private func buildSnapshot(config: OverlaySceneConfig, second: Int) -> OverlaySnapshot
No adjacent doc comment
private func rasterizeTimeTexture(config: TimeOverlayConfig, second: Int) -> (texture: MTLTexture, size: CGSize)?
No adjacent doc comment
private func timeText(config: TimeOverlayConfig, now: Date) -> String
No adjacent doc comment
private func logThrottled(last: inout CFAbsoluteTime, interval: CFAbsoluteTime = 2, message: () -> String)
No adjacent doc comment
private func recordOverlayDuration(start: CFAbsoluteTime)
No adjacent doc comment
private struct OverlayCompositeParams
No adjacent doc comment
private func uiFontWeight(_ weight: OverlayFontWeight) -> UIFont.Weight
No adjacent doc comment
private extension UIColor
No adjacent doc comment
convenience init?(overlayHex hex: String)
No adjacent doc comment
actor ReplayVolumeSynchronizer
private let mixer: MediaMixer
No adjacent doc comment
private let updateProcessor: @Sendable (Float, Float, Float) async -> Void
No adjacent doc comment
private let session
No adjacent doc comment
private var worker: Task<Void, Never>?
No adjacent doc comment
private var dirty
No adjacent doc comment
private var ended
No adjacent doc comment
private var revision
No adjacent doc comment
private var lastApp: Float?
No adjacent doc comment
private var lastMic: Float?
No adjacent doc comment
private var lastGain: Float?
No adjacent doc comment
init(mixer: MediaMixer, updateProcessor: @escaping @Sendable (Float, Float, Float) async -> Void)
No adjacent doc comment
func requestRefresh()
No adjacent doc comment
func start()
func stop()
No adjacent doc comment
private func report(status: String)
No adjacent doc comment
private func run() async
private func readSnapshot() async throws -> AudioControlSettings
No adjacent doc comment
class SharedDefaults
No adjacent doc comment
class SampleHandler: RPBroadcastSampleHandler , @unchecked Sendable
No adjacent doc comment
private var lastRuntimeDebugConfigVersion
No adjacent doc comment
private var currentOrientation: UIDeviceOrientation
No adjacent doc comment
private var nowOrientation: UIDeviceOrientation
No adjacent doc comment
private var currentOrientation: Int
No adjacent doc comment
private var nowOrientation:Int
No adjacent doc comment
private var lastVideoOrientation: AVCaptureVideoOrientation?
No adjacent doc comment
private let capturePipeline
No adjacent doc comment
private var captureLease: CaptureLease?
No adjacent doc comment
private var lastTimestamp: CMTime
No adjacent doc comment
private var needVideoConfiguration
No adjacent doc comment
private var needsReplayKitDimensionReport
No adjacent doc comment
private var needAudioConfiguration
No adjacent doc comment
private var isSessionReady
No adjacent doc comment
private var appVolume: Float
No adjacent doc comment
private var micVolume: Float
No adjacent doc comment
private var appAddVolume: Float
No adjacent doc comment
private var micAddVolume: Float
No adjacent doc comment
private var streamDiagnosticsProbe: StreamDiagnosticsProbe?
No adjacent doc comment
private var streamDiagnosticsTask: Task<Void, Never>?
No adjacent doc comment
private var rtmpConnection :RTMPConnection?
No adjacent doc comment
private var rtmpStream : RTMPStream!
No adjacent doc comment
private var lastConfiguredSize: CGSize?
No adjacent doc comment
private var isInitialSyncDone
No adjacent doc comment
private var adaptiveBufferManager: AdaptiveVideoBufferManager?
No adjacent doc comment
private let volumeSyncLock
private var storedVolumeSync: ReplayVolumeSynchronizer?
No adjacent doc comment
private var volumeSync: ReplayVolumeSynchronizer
No adjacent doc comment
func registerObservers()
No adjacent doc comment
private func removeObservers()
No adjacent doc comment
private func reloadVideoDimensions(trigger: String) async -> ( adWidth: Int, adHeight: Int, outWidth: Int, outHeight: Int )?
No adjacent doc comment
private func applyVideoDimensions(trigger: String) async
No adjacent doc comment
actor FrameState
No adjacent doc comment
init(frameRate:Double = 30.0)
No adjacent doc comment
func set(frame:Double)
No adjacent doc comment
func get() -> Double
No adjacent doc comment
private func resolveBool(_ key: String, fallback: Bool) async -> Bool
private func resolveInt(_ key: String, fallback: Int) async -> Int
No adjacent doc comment
private func applyRuntimeDebugConfig(_ config: RuntimeDebugConfig) async
func handleEvent(eventName: String)
No adjacent doc comment
override init()
No adjacent doc comment
func avOrientation(from deviceOrientation: UIDeviceOrientation) -> AVCaptureVideoOrientation?
No adjacent doc comment
func isLandscape(_ orientation: AVCaptureVideoOrientation) -> Bool
No adjacent doc comment
func updateVideoOrientation(from orientation: UIDeviceOrientation) async
No adjacent doc comment
private var processorsInitialized
No adjacent doc comment
func stopBroadcastWithError(_ message: String)
No adjacent doc comment
func prepareCompressionSession()
No adjacent doc comment
func setUserDefalutConfig(urlString:String = "rtmp://192.168.0.106/live" ,streamKey:String = "test")
No adjacent doc comment
func profileLevelString() -> String
func applyAllVideoSettings(width: Int, height: Int, stream: RTMPStream? = nil, setSize: Bool = true) async
No adjacent doc comment
private func resolvedStreamGeometry(source: CGSize? = nil) -> CaptureStreamGeometry
func configureVideo_init() async
No adjacent doc comment
func configureAudio() async
No adjacent doc comment
func configureMediaMixer() async
No adjacent doc comment
func initProcessors()
No adjacent doc comment
func rebuildAudio()
No adjacent doc comment
func rebuildVideo()
No adjacent doc comment
private func ensureVideoProcessor(_ buffer: CMSampleBuffer, timing: CMSampleTimingInfo)
No adjacent doc comment
private func ensureAudioProcessor(_ buffer: CMSampleBuffer, trackType: AudioTrackType, timing: CMSampleTimingInfo)
No adjacent doc comment
func startRTMP(url:String?,key:String?) async
No adjacent doc comment
func notifyReconnectStatus(_ status: ReconnectStatus, attempt: Int = 0)
No adjacent doc comment
enum ReconnectStatus: String
No adjacent doc comment
override func broadcastStarted( withSetupInfo setupInfo: [String : NSObject]? )
No adjacent doc comment
override func broadcastPaused()
No adjacent doc comment
override func broadcastResumed()
No adjacent doc comment
private var isBroadcasting
No adjacent doc comment
private var isBroadcastPaused
No adjacent doc comment
private var pausedAt: Date?
No adjacent doc comment
private var isReconnecting
No adjacent doc comment
private var reconnectAttempt
No adjacent doc comment
private var broadcastEndTask: Task<Void, Never>?
No adjacent doc comment
func broadcastEnd(message: String = "正常結束")
No adjacent doc comment
override func broadcastFinished()
No adjacent doc comment
private var didConfigureAudio
No adjacent doc comment
private func configureVideoUnsafe(dims: CMVideoDimensions)
static func thermalStateText() -> String
static func extensionMemoryMB() -> Double
private let healthWindowInterval: Double
No adjacent doc comment
private let healthSampleLock
No adjacent doc comment
private var healthSampleInputFPS: [Double]
No adjacent doc comment
private var healthSampleProcessedFPS: [Double]
No adjacent doc comment
private var healthSampleDroppedFPS: [Double]
No adjacent doc comment
private var healthWindowTimeoutDelta: UInt64
No adjacent doc comment
private var lastVideoHealthLogTime: Double
No adjacent doc comment
private var lastVideoHealthFrameCount: Int
No adjacent doc comment
private var lastVideoHealthProcessedCount: Int
No adjacent doc comment
private var lastVideoHealthDroppedCount: Int
No adjacent doc comment
private var lastVideoHealthTimeoutCount: UInt64
No adjacent doc comment
private let audioHealthWindowInterval: Double
No adjacent doc comment
private let audioHealthQueue
No adjacent doc comment
private struct AudioHealthSample
No adjacent doc comment
private struct AudioDiagCounter
No adjacent doc comment
private var audioHealthSamples: [AudioHealthSample]
No adjacent doc comment
private var lastAudioHealthTime: Double
No adjacent doc comment
private var appAudioFrameCount
No adjacent doc comment
private var micAudioFrameCount
No adjacent doc comment
private var lastAppAudioFrameCount
No adjacent doc comment
private var lastMicAudioFrameCount
No adjacent doc comment
private var lastAppAudioPTS: Double
No adjacent doc comment
private var lastMicAudioPTS: Double
No adjacent doc comment
private var appAudioGapMax: Double
No adjacent doc comment
private var micAudioGapMax: Double
No adjacent doc comment
private var lastAudioDiagByTrack: [UInt8: AudioDiagCounter]
No adjacent doc comment
private var lastAudioGapSequence: [UInt8: UInt64]
No adjacent doc comment
private var lastMixerOutputFrames: Int
No adjacent doc comment
private var lastAudioDiagnosticsTime: Double?
No adjacent doc comment
private var lastAudioFormats: [String: (format: AudioStreamBasicDescription, samples: Int)]
No adjacent doc comment
private var lastAudioFormatLogTimes: [String: Double]
No adjacent doc comment
private func logAudioFormatIfNeeded(_ buffer: CMSampleBuffer, trackType: AudioTrackType)
private func accumulateHealthSample( inputFPS: Double, processedFPS: Double, droppedFPS: Double, timeoutDelta: UInt64 ) -> (input: [Double], processed: [Double], dropped: [Double], timeout: UInt64)?
private func logVideoHealthIfNeeded(timestamp: CMTime)
No adjacent doc comment
private func logAudioHealthIfNeeded(trackType: AudioTrackType, timing: CMSampleTimingInfo)
No adjacent doc comment
private func finalizeAudioHealthSample( inputElapsed: Double, diagnosticsTime: Double, appFPS: Double, micFPS: Double, appGapMs: Double, micGapMs: Double, appRMS: Double, micRMS: Double, diag: AudioPipelineDiagnostics )
override func processSampleBuffer(_ sampleBuffer: CMSampleBuffer, with sampleBufferType: RPSampleBufferType)
No adjacent doc comment
private func updateLogPageState()
No adjacent doc comment
private func applyLogPage(_ logPage: Bool)
No adjacent doc comment
func stat(_ keyPath: (AudioHealthSample) -> Double) -> (min: Double, avg: Double, max: Double)
No adjacent doc comment
private extension VideoScalingMode
No adjacent doc comment
enum OverlayAnchor: String, Codable, CaseIterable, Identifiable, Hashable
No adjacent doc comment
func origin(container: CGSize, item: CGSize, marginX: CGFloat, marginY: CGFloat, offsetX: CGFloat, offsetY: CGFloat) -> CGPoint
No adjacent doc comment
enum OverlayFontWeight: String, Codable, CaseIterable, Identifiable, Hashable
No adjacent doc comment
enum TimeOverlayFormat: String, Codable, CaseIterable, Identifiable, Hashable
No adjacent doc comment
struct TimeOverlayConfig: Codable, Identifiable, Equatable
No adjacent doc comment
struct OverlaySceneConfig: Codable, Equatable
No adjacent doc comment
enum OverlayConfigStore
No adjacent doc comment
static func load(defaults: UserDefaults? = UserDefaults(suiteName: "group.nuclear.liveAPP") ?? .standard) -> OverlaySceneConfig
No adjacent doc comment
static func save(_ config: OverlaySceneConfig, defaults: UserDefaults? = UserDefaults(suiteName: "group.nuclear.liveAPP") ?? .standard)
No adjacent doc comment
extension NWListener.State
No adjacent doc comment
extension Notification.Name
No adjacent doc comment
extension SocketClient.JSONValue
No adjacent doc comment
enum TimeoutError: Error
No adjacent doc comment
private struct VideoHealthPayload: Encodable
No adjacent doc comment
enum CodingKeys: String, CodingKey
No adjacent doc comment
func encode(to encoder: Encoder) throws
No adjacent doc comment
private struct AudioHealthPayload: Encodable
No adjacent doc comment
enum CodingKeys: String, CodingKey
No adjacent doc comment
func encode(to encoder: Encoder) throws
No adjacent doc comment
func withTimeout<T>( _ seconds: TimeInterval, operation: @escaping () async throws -> T ) async throws -> T
No adjacent doc comment
class SocketClient : @unchecked Sendable
No adjacent doc comment
private var isProcessingBatch
No adjacent doc comment
private var didReceiveRTMPInBatch
No adjacent doc comment
private var didReceiveLogConfigInBatch
No adjacent doc comment
private var didReceiveOverlayConfigInBatch
No adjacent doc comment
actor ContinuationStore
No adjacent doc comment
private var store: [String: CheckedContinuation<Any?, Error>]
No adjacent doc comment
func insert(_ cont: CheckedContinuation<Any?, Error>, for key: String) -> Bool
No adjacent doc comment
func take(for key: String) -> CheckedContinuation<Any?, Error>?
No adjacent doc comment
func cancelAll()
No adjacent doc comment
private let continuationStore
No adjacent doc comment
private var rtmpBatchContinuation: CheckedContinuation<Bool, Error>?
No adjacent doc comment
private var rtmpContinuation: CheckedContinuation<Bool, Error>?
No adjacent doc comment
private var logContinuation: CheckedContinuation<Bool, Error>?
No adjacent doc comment
private func dictionary<T: Encodable>(from payload: T) -> [String: Any]?
No adjacent doc comment
private var latestVolumeTimestamp: CFAbsoluteTime
No adjacent doc comment
func updateVolumeTimestamp()
No adjacent doc comment
private var isConnection: Bool
No adjacent doc comment
private var connection: NWConnection?
No adjacent doc comment
private var readyContinuation: CheckedContinuation<Bool, Never>?
No adjacent doc comment
private let queue
No adjacent doc comment
private var connectionCreationTime: Date?
No adjacent doc comment
private let maxWaitTimeBeforeReconnect: TimeInterval
No adjacent doc comment
private var pendingBatchEntries: [String]
No adjacent doc comment
private let maxBatchEntries
No adjacent doc comment
private let maxBatchBytes
No adjacent doc comment
private var inFlightBatches
No adjacent doc comment
private let maxInflightBatches
No adjacent doc comment
private var batchTimer: DispatchSourceTimer?
No adjacent doc comment
private var isProcessingRemoteUpdate
No adjacent doc comment
init()
No adjacent doc comment
func connect(host: String = "localhost" , port: UInt16 = SocketPortSettings.port)
No adjacent doc comment
private func _connect(host: String, port: UInt16)
No adjacent doc comment
func waitForReady(timeout: TimeInterval = 10.0) async -> Bool
No adjacent doc comment
func closeConnection()
No adjacent doc comment
private func _closeConnection()
No adjacent doc comment
func start()
No adjacent doc comment
private func cleanupConnection()
No adjacent doc comment
func requestAllSettings()
No adjacent doc comment
func requestSet(for key: String, type: String) async throws -> Any?
No adjacent doc comment
func requestRTMPKEYAndLog(timeout: TimeInterval = 15.0) async -> Bool
No adjacent doc comment
private func _requestRTMPKEYAndLog() async throws -> Bool
No adjacent doc comment
func requestRTMPKEY(timeout: TimeInterval = 15.0) async -> Bool
No adjacent doc comment
private func _requestRTMPKEY() async throws -> Bool
No adjacent doc comment
func requestLogConfig(timeout: TimeInterval = 15.0) async -> Bool
No adjacent doc comment
func _requestLogConfig() async throws -> Bool
No adjacent doc comment
func sendStreamEnd()
No adjacent doc comment
func sendAudioLive(appVol:Float = 1.0, micVol:Float = 1.0,persist:Bool = false)
No adjacent doc comment
func sendVideoHealth(status: String, inputFPSMin: Double, inputFPSAvg: Double, inputFPSMax: Double, processedFPSMin: Double, processedFPSAvg: Double, processedFPSMax: Double, droppedFPSAvg: Double, latencyAvg: Double, latencyMax: Double, latencyP95: Double, timeoutDelta: UInt64)
No adjacent doc comment
func sendAudioHealth(status: String, appInputFPSMin: Double, appInputFPSAvg: Double, appInputFPSMax: Double, micInputFPSMin: Double, micInputFPSAvg: Double, micInputFPSMax: Double, appGapMaxMs: Double, alignDroppedPerSec: Double, alignInsertedPerSec: Double, alignFirePerSec: Double, alignDiffMaxSamples: Double, skipInsertedPerSec: Double, overflowDroppedPerSec: Double, resampleNoDataPerSec: Double, mixerOutputFPS: Double, appRMS: Double, micRMS: Double, outChannels: Int, outCh0RMS: Double, outCh1RMS: Double)
No adjacent doc comment
func sendSettings(key: String, value: Any)
No adjacent doc comment
func sendLog(title: String = "ReplyKitE_Sokcet", message: String)
No adjacent doc comment
private let maxPendingBytes
No adjacent doc comment
func sendLogBatch(entries: [String], force: Bool = false)
No adjacent doc comment
func flushVolumeBatch()
No adjacent doc comment
private func trimToMemoryCap()
No adjacent doc comment
private func checkBatch()
No adjacent doc comment
private func flushBatch()
No adjacent doc comment
private func _sendBatch(_ entries: [String])
No adjacent doc comment
private func startBatchTimer()
No adjacent doc comment
private func stopBatchTimer()
No adjacent doc comment
private let maxLogChunkBytes
No adjacent doc comment
private func _sendLogPayload(title: String, message: String)
No adjacent doc comment
private func _sendSingleLog(title: String, message: String)
No adjacent doc comment
func logTo(_ message:String,flush:Bool = false)
No adjacent doc comment
func cancelPendingRTMP()
No adjacent doc comment
func cancelPendingLog()
No adjacent doc comment
func cancelPendingRTMPBatch()
No adjacent doc comment
private func sendPayload(_ payload: [String: Any], completion: ((NWError?) -> Void)? = nil)
No adjacent doc comment
func sendStreamDiagnostics(_ snapshot: StreamDiagnosticsSnapshot)
func sendPayload(_ payload: [String: Any])
No adjacent doc comment
struct TypePayload: Codable
No adjacent doc comment
struct RTMPConfig: Codable
No adjacent doc comment
enum CodingKeys: String, CodingKey
No adjacent doc comment
init(from decoder: Decoder) throws
No adjacent doc comment
func encode(to encoder: Encoder) throws
No adjacent doc comment
struct LogConfig: Codable
No adjacent doc comment
struct LogMessage: Codable
No adjacent doc comment
struct OverlayConfigPayload: Codable
No adjacent doc comment
private func applyRTMP(_ c: RTMPConfig)
No adjacent doc comment
private var receiveBuffer
No adjacent doc comment
private var receiveOffset
No adjacent doc comment
enum JSONValue: Codable
No adjacent doc comment
init(from decoder: Decoder) throws
No adjacent doc comment
func encode(to encoder: Encoder) throws
No adjacent doc comment
private func handleJSONPacket(_ data: Data)
No adjacent doc comment
private func handleSingleJSON(_ data: Data)
No adjacent doc comment
private func handleSingleJSONOnQueue(data: Data, type: String)
No adjacent doc comment
private func processReceiveBuffer()
No adjacent doc comment
private func startReceiveLoop()
No adjacent doc comment
private func safeJSONValue(_ value: Any) -> Any
No adjacent doc comment
enum SocketPortSettings
No adjacent doc comment
static func save(_ port: UInt16)
No adjacent doc comment
func createPixelBuffer(width: Int, height: Int, format: OSType, reuse existing: CVPixelBuffer?) -> CVPixelBuffer?
func createContext(for pixelBuffer: CVPixelBuffer) -> CGContext?
No adjacent doc comment
func updatePausedContext(buffer: CVPixelBuffer, context: CGContext, text: String)
No adjacent doc comment
func convertBGRAtoNV12(bgra: CVPixelBuffer, nv12: CVPixelBuffer)
No adjacent doc comment
func createSampleBuffer( from pixelBuffer: CVPixelBuffer, frameIndex: inout Int, timescale: CMTimeScale = 30 ) -> CMSampleBuffer?
No adjacent doc comment
struct GPUCompletionLatencyStats: Sendable
No adjacent doc comment
struct VideoProcessorDiagnostics: Sendable
No adjacent doc comment
actor FrameProcessorActor
No adjacent doc comment
private var lastProcessingPath
No adjacent doc comment
private var gpuRotator: RPVideoRotatorNV12BatchQueueOptimized?
No adjacent doc comment
private var cpuRotator: RPVideoRotatorCPU_NV12?
No adjacent doc comment
private var lastKey: (useBic: Bool, dstW: Int, dstH: Int, outW: Int, outH: Int, rotateOriginal: Bool)?
No adjacent doc comment
private let sendlog: (String) -> Void
No adjacent doc comment
private var debug: Bool
No adjacent doc comment
private var onPermanentFailure: (@Sendable () -> Void)?
No adjacent doc comment
private var consecutiveDropCount
No adjacent doc comment
private let fallbackFreezeThreshold
No adjacent doc comment
private let maxConsecutiveDrops
No adjacent doc comment
private var lastGoodSnapshot: CVPixelBuffer?
No adjacent doc comment
private var lastGoodFormatDescription: CMVideoFormatDescription?
No adjacent doc comment
private var lastInputPTS: CMTime?
No adjacent doc comment
private var measuredInterval: CMTime?
No adjacent doc comment
init(debug: Bool, sendlog: @escaping (String) -> Void)
No adjacent doc comment
nonisolated func setPermanentFailureHandler(_ handler: @Sendable @escaping () -> Void)
No adjacent doc comment
private func _setPermanentFailureHandler(_ handler: @Sendable @escaping () -> Void)
No adjacent doc comment
func processFrame( imageBuffer: CVImageBuffer, originalTime: CMSampleTimingInfo, angle: RotationAngle ) async -> CMSampleBuffer?
No adjacent doc comment
private func trackFrameInterval(pts: CMTime)
No adjacent doc comment
private func settle(_ result: CMSampleBuffer?, originalTime: CMSampleTimingInfo, ownsOutputStorage: Bool) -> CMSampleBuffer?
No adjacent doc comment
private func storeLastGoodSnapshot(from sampleBuffer: CMSampleBuffer, ownsOutputStorage: Bool)
No adjacent doc comment
private func makeFallbackSampleBuffer( pts: CMTime, originalTime: CMSampleTimingInfo ) -> CMSampleBuffer?
No adjacent doc comment
private func copyPixelBuffer(_ source: CVPixelBuffer) -> CVPixelBuffer?
No adjacent doc comment
private func getOrCreateGpuRotator() async -> RPVideoRotatorNV12BatchQueueOptimized?
No adjacent doc comment
private func tryCpuFallback( imageBuffer: CVImageBuffer, originalTime: CMSampleTimingInfo, angle: RotationAngle ) async -> CMSampleBuffer?
No adjacent doc comment
private func wrapAsSampleBuffer(imageBuffer: CVImageBuffer, originalTime: CMSampleTimingInfo) -> CMSampleBuffer?
No adjacent doc comment
func cleanup() async
No adjacent doc comment
nonisolated func setRotatorDebug(_ on: Bool)
No adjacent doc comment
private func _setRotatorDebug(_ on: Bool)
No adjacent doc comment
nonisolated func setRotatorTsDebug(_ on: Bool)
No adjacent doc comment
private func _setRotatorTsDebug(_ on: Bool)
No adjacent doc comment
nonisolated func updateRotatorDimensions(adWidth: Int, adHeight: Int, outWidth: Int, outHeight: Int)
No adjacent doc comment
private func _updateRotatorDimensions(adWidth: Int, adHeight: Int, outWidth: Int, outHeight: Int)
No adjacent doc comment
func processingSnapshot() -> (load: VideoProcessingLoadSnapshot?, summary: String)?
func diagnostics(isActive: Bool, processedCount: Int, droppedCount: Int) -> VideoProcessorDiagnostics
No adjacent doc comment
final class VideoFrameProcessor
No adjacent doc comment
private let mediaMixer: MediaMixer
No adjacent doc comment
private let sendlog: (String) -> Void
No adjacent doc comment
private var actor: FrameProcessorActor
No adjacent doc comment
private var angle: RotationAngle
No adjacent doc comment
private let stateLock
No adjacent doc comment
private var isActiveState
No adjacent doc comment
private var processedCountState
No adjacent doc comment
private var droppedCountState
No adjacent doc comment
private var mixerSubmitted
No adjacent doc comment
private var mixerReturned
No adjacent doc comment
private var mixerNotRunning
No adjacent doc comment
private var mixerPending: [Int: CFTimeInterval]
No adjacent doc comment
private var mixerMaxWaitMs: Double
No adjacent doc comment
init(mediaMixer: MediaMixer, sendlog: @escaping (String) -> Void)
No adjacent doc comment
func process(_ sampleBuffer: CMSampleBuffer, originalTime: CMSampleTimingInfo)
No adjacent doc comment
func cleanup()
No adjacent doc comment
func setRotatorDebug(_ on: Bool)
No adjacent doc comment
func setRotatorTsDebug(_ on: Bool)
No adjacent doc comment
func updateRotatorDimensions(adWidth: Int, adHeight: Int, outWidth: Int, outHeight: Int)
No adjacent doc comment
func processingSnapshot() async -> (load: VideoProcessingLoadSnapshot?, summary: String)?
func diagnostics() async -> VideoProcessorDiagnostics
No adjacent doc comment
private func beginMixerHandoff() -> Int
No adjacent doc comment
private func endMixerHandoff(_ id: Int)
No adjacent doc comment
private func recordMixerReturned()
No adjacent doc comment
private func recordMixerNotRunning()
No adjacent doc comment
private func mixerHandoffSummary() -> String
No adjacent doc comment
func stateSnapshot() -> (isActive: Bool, processedCount: Int, droppedCount: Int)
No adjacent doc comment
private func setActive(_ value: Bool)
No adjacent doc comment
private func markProcessed() -> Int
No adjacent doc comment
private func markDropped() -> (processedCount: Int, droppedCount: Int)
No adjacent doc comment
actor.setPermanentFailureHandler(onFailure)
No adjacent doc comment
actor.setRotatorDebug(on)
No adjacent doc comment
actor.setRotatorTsDebug(on)
No adjacent doc comment
actor.updateRotatorDimensions( adWidth: adWidth, adHeight: adHeight, outWidth: outWidth, outHeight: outHeight )
No adjacent doc comment
class NotificationViewController: UIViewController, UNNotificationContentExtension
No adjacent doc comment
private let avatarImageView: UIImageView
No adjacent doc comment
private let appIconImageView: UIImageView
No adjacent doc comment
private let titleLabel: UILabel
No adjacent doc comment
private let bodyLabel: UILabel
No adjacent doc comment
override func viewDidLoad()
No adjacent doc comment
private func setupUI()
No adjacent doc comment
func didReceive(_ notification: UNNotification)
No adjacent doc comment
class BroadcastSetupViewController: UIViewController
No adjacent doc comment
func userDidFinishSetup()
No adjacent doc comment
func userDidCancelSetup()
No adjacent doc comment
class BroadcastSetupViewController: NSViewController
No adjacent doc comment
func userDidFinishSetup()
No adjacent doc comment
func userDidCancelSetup()
No adjacent doc comment
protocol BroadcastSetupDelegate: AnyObject
No adjacent doc comment
func broadcastSetupDidFinish(url: URL?, info: [String: Any])
No adjacent doc comment
func broadcastSetupDidCancel(error: Error?)
No adjacent doc comment
def source_path(root, name)
No adjacent doc comment
def encode_png(image)
No adjacent doc comment
def generate(root, name, mode='lossless')
No adjacent doc comment
def metadata(images)
No adjacent doc comment
def apply(root, output, details)
No adjacent doc comment
class IconServer(HTTPServer)
No adjacent doc comment
def __init__(self, root, port=0)
No adjacent doc comment
class Handler(BaseHTTPRequestHandler)
No adjacent doc comment
def log_message(self, *_)
No adjacent doc comment
def send(self, status, body, kind='application/json; charset=utf-8')
No adjacent doc comment
def trusted(self)
No adjacent doc comment
def do_GET(self)
No adjacent doc comment
def do_POST(self)
No adjacent doc comment
def main()
No adjacent doc comment
def git(path, *args)
No adjacent doc comment
def snapshot(path)
No adjacent doc comment
def collect(root, env)
No adjacent doc comment
def main()
No adjacent doc comment
def path(name)
No adjacent doc comment
def read(name)
No adjacent doc comment
def mime(name)
No adjacent doc comment
def render(name, **subs)
No adjacent doc comment
function esc(s)
No adjacent doc comment
function mdInline(s)
No adjacent doc comment
function mdDoc(text)
No adjacent doc comment
function kindOf(name)
No adjacent doc comment
function links(items)
No adjacent doc comment
function commitCard(repo, c)
No adjacent doc comment
function diffLineClass(l)
No adjacent doc comment
function renderDiff(j)
No adjacent doc comment
async function loadDiff(box, params)
No adjacent doc comment
function render()
No adjacent doc comment
async function load()
No adjacent doc comment
function highlight(line)
No adjacent doc comment
function fromHash()
No adjacent doc comment
function go(line, push)
No adjacent doc comment
function resolveHref(href)
function setMode(mode)
No adjacent doc comment
function swift(line, state)
No adjacent doc comment
function markdownLine(line)
No adjacent doc comment
function block(text, lang)
No adjacent doc comment
function esc(s)
No adjacent doc comment
function inline(s)
No adjacent doc comment
function mdToHtml(src)
No adjacent doc comment
async function load()
No adjacent doc comment
function renderView(e)
No adjacent doc comment
function renderEdit(e)
No adjacent doc comment
async function show(i)
No adjacent doc comment
function makeRefRow(label, url)
No adjacent doc comment
function clearRefs()
No adjacent doc comment
function collectRefs()
No adjacent doc comment
function inline(text)
No adjacent doc comment
function splitRow(line)
No adjacent doc comment
function table(header, rows)
No adjacent doc comment
function listHtml(items)
No adjacent doc comment
function quote(lines)
No adjacent doc comment
function render(text)
No adjacent doc comment
function preferred()
No adjacent doc comment
function apply(t)
No adjacent doc comment
def cmd_add(args)
No adjacent doc comment
def _matches(e, args)
No adjacent doc comment
def cmd_list(args)
No adjacent doc comment
def cmd_show(args)
No adjacent doc comment
def main(argv=None)
No adjacent doc comment
def roots()
No adjacent doc comment
def git(root, *args)
No adjacent doc comment
def files(root)
No adjacent doc comment
def safe_file(repo, name)
No adjacent doc comment
def link(repo, path, line=1)
No adjacent doc comment
def validate()
No adjacent doc comment
def _decl_keyword(line)
No adjacent doc comment
def _collect_signature(lines, start)
No adjacent doc comment
def _symbol_name(keyword, signature)
No adjacent doc comment
def scan_symbols(text, repo, name)
No adjacent doc comment
def _parse_commits(raw)
No adjacent doc comment
def _safe_pathspec(name)
No adjacent doc comment
def diff(repo, rev=None, path=None, worktree=False)
No adjacent doc comment
def snapshot()
No adjacent doc comment
def _file_page(repo, name, line)
No adjacent doc comment
def route(path, query)
No adjacent doc comment
class Handler(BaseHTTPRequestHandler)
No adjacent doc comment
def log_message(self, *a)
No adjacent doc comment
def _send(self, code, body, ctype="application/json; charset=utf-8")
No adjacent doc comment
def _serve_asset(self, name)
No adjacent doc comment
def do_GET(self)
def do_POST(self)
class _Server(ThreadingHTTPServer)
No adjacent doc comment
def serve(port=8710, open_browser=True)
No adjacent doc comment
def strip_comments(text)
def parse_entries(text=None)
No adjacent doc comment
def read_history()
No adjacent doc comment
def _heading_indices(lines)
No adjacent doc comment
def _summary_body(text)
def _norm_refs(refs)
No adjacent doc comment
def build_block(date_str, title, type_, file_, problem="", root_cause="", changes=None, refs="", time_str="")
No adjacent doc comment
def _write(lines)
def insert_block(block)
No adjacent doc comment
def _entry_range(heads, lines, i)
No adjacent doc comment
def update_entry(i, raw)
No adjacent doc comment
def delete_entry(i)
No adjacent doc comment
def git_changed_files()
def now_parts()
def today_str()
No adjacent doc comment
def git_markdown_files() -> list[Path]
No adjacent doc comment
def markdown_errors(path: Path) -> list[str]
No adjacent doc comment
def main() -> int
No adjacent doc comment
def col(text: str, *styles: str) -> str
No adjacent doc comment
def console_group(title: str) -> None
No adjacent doc comment
def console_endgroup() -> None
No adjacent doc comment
class Finding
No adjacent doc comment
def __init__(self, path: str, line: str, msg: str) -> None
No adjacent doc comment
def parse(log_text: str)
No adjacent doc comment
def warnings_total(warnings) -> int
def print_console(result) -> None
No adjacent doc comment
def render_markdown(result) -> str
No adjacent doc comment
def main() -> int
No adjacent doc comment
def load_config(path: Path) -> dict
No adjacent doc comment
def normalize(path: str) -> str
No adjacent doc comment
def matches(path: str, patterns: list[str]) -> bool
No adjacent doc comment
def classify_paths(paths: list[str], config: dict) -> dict
No adjacent doc comment
def labels_from_commits(message_text: str) -> set[str]
No adjacent doc comment
def conventional_types(message_text: str) -> set[str]
No adjacent doc comment
def exp_window(history: list[bool], window: int) -> tuple[bool, int]
No adjacent doc comment
def build_name(tag: str, tiers: list[str], areas: list[str], modifiers: list[str], max_areas: int = 3) -> str
No adjacent doc comment
def git(root: Path, *args: str) -> str
No adjacent doc comment
def semver_tags(root: Path) -> list[str]
No adjacent doc comment
def changed_paths(root: Path, from_ref: str | None, to_ref: str) -> list[str]
No adjacent doc comment
def commit_text(root: Path, from_ref: str | None, to_ref: str) -> str
No adjacent doc comment
def history_core_flags(root: Path, tags: list[str], current_index: int, window: int, config: dict) -> list[bool]
No adjacent doc comment
def classify(root: Path, tag: str, config: dict, exp_window_size: int, from_tag: str | None = None) -> dict
No adjacent doc comment
def main() -> int
No adjacent doc comment
class LogLine
No adjacent doc comment
def as_dict(self) -> dict
No adjacent doc comment
def classify_severity(message: str) -> str
No adjacent doc comment
def parse_line(number: int, raw: str) -> LogLine
No adjacent doc comment
def parse_log(path: Path) -> list[LogLine]
No adjacent doc comment
def summarize(path: Path, lines: list[LogLine]) -> dict
No adjacent doc comment
class ViewerHandler(BaseHTTPRequestHandler)
No adjacent doc comment
def log_message(self, format: str, *args) -> None: # noqa: A002,A003
No adjacent doc comment
def send_json(self, value: dict, status: int = 200) -> None
No adjacent doc comment
def send_html(self) -> None
No adjacent doc comment
def do_GET(self) -> None: # noqa: N802
No adjacent doc comment
def handle_lines(self, query: dict[str, list[str]]) -> None
No adjacent doc comment
def first(name: str) -> str
No adjacent doc comment
def matches(line: LogLine) -> bool
No adjacent doc comment
def bind_server(host: str, start_port: int, attempts: int = 20) -> ThreadingHTTPServer
No adjacent doc comment
def serve(path: Path, host: str, port: int, open_browser: bool) -> None
No adjacent doc comment
def main() -> None
No adjacent doc comment
def module_dirs(site)
No adjacent doc comment
def module_topic(module_dir)
No adjacent doc comment
def patch_base_path(site, base)
No adjacent doc comment
def write_module_redirects(site)
No adjacent doc comment
def write_home(site, modules, template_path=DEFAULT_TEMPLATE)
No adjacent doc comment
def main()
No adjacent doc comment
def inspect(path)
No adjacent doc comment
def check_icons(info, entries)
No adjacent doc comment
def suspicious_reason(name)
No adjacent doc comment
def content_report(entries, expected_exclusions)
No adjacent doc comment
def category(name, executable)
No adjacent doc comment
def report(path, expected_exclusions=None)
No adjacent doc comment
def markdown(result)
No adjacent doc comment
def mb(n)
No adjacent doc comment
def main()
No adjacent doc comment
class Candidate
No adjacent doc comment
def legacy(self)
No adjacent doc comment
def model_rank(name: str) -> int
No adjacent doc comment
def available_ios_runtimes(runtimes)
No adjacent doc comment
def eligible_ids(destinations: str) -> set[str]
No adjacent doc comment
def ordered_candidates(devices, destinations, runtimes, sdk_version=None)
No adjacent doc comment
def sort_key(candidate: Candidate)
No adjacent doc comment
def select_device(devices, destinations, runtimes, sdk_version=None)
No adjacent doc comment
def device_type_candidates(devicetypes)
No adjacent doc comment
def _arg_value(prefix)
No adjacent doc comment
def main()
No adjacent doc comment
class IconToolTests(unittest.TestCase)
No adjacent doc comment
def prepare(self, root)
No adjacent doc comment
def test_preview_then_apply_preserves_source_and_backup(self)
No adjacent doc comment
def test_rejects_transparency_and_path_escape(self)
No adjacent doc comment
def test_source_change_requires_new_preview(self)
No adjacent doc comment
def test_http_token_and_preview(self)
No adjacent doc comment
class BuildInfoTests(unittest.TestCase)
No adjacent doc comment
def setUp(self)
No adjacent doc comment
def lock(self, revision="a" * 40)
No adjacent doc comment
def test_missing_source_is_unknown_not_ci_sha(self)
No adjacent doc comment
def test_project_lock_wins_over_root_lock(self)
No adjacent doc comment
def test_matching_and_modified_checkout_are_distinct(self)
No adjacent doc comment
def test_mismatch_is_not_reported_as_verified(self)
No adjacent doc comment
def test_real_git_dirty_and_nested_nonrepository(self)
No adjacent doc comment
def test_malformed_lock_and_distinct_build_ids(self)
No adjacent doc comment
def git(*args)
No adjacent doc comment
class SummaryTests(unittest.TestCase)
No adjacent doc comment
def test_parameterized_issues_are_not_extra_failed_tests(self)
No adjacent doc comment
def test_caught_error_is_a_test_issue_not_compile_error(self)
No adjacent doc comment
def test_runner_timeout_is_separate(self)
No adjacent doc comment
def test_overall_pass_is_not_a_test_function(self)
No adjacent doc comment
def test_compile_failure_keeps_file_location(self)
No adjacent doc comment
def test_ansi_and_multiline_details(self)
No adjacent doc comment
class ReleaseClassifierTests(unittest.TestCase)
No adjacent doc comment
def test_paths_produce_tier_and_areas(self)
No adjacent doc comment
def test_ui_only_is_not_core(self)
No adjacent doc comment
def test_ignored_docs_do_not_affect_release(self)
No adjacent doc comment
def test_exp_window_counts_current_and_previous_four(self)
No adjacent doc comment
def test_name_is_built_from_parts(self)
No adjacent doc comment
def test_release_label_trailer(self)
No adjacent doc comment
def test_integration_uses_tag_history(self)
No adjacent doc comment
class IndexTests(unittest.TestCase)
No adjacent doc comment
def test_catalog(self)
No adjacent doc comment
def test_paths(self)
No adjacent doc comment
def test_source_and_missing_file(self)
No adjacent doc comment
def test_snapshot(self)
No adjacent doc comment
def test_diff(self)
No adjacent doc comment
def test_http_integration(self)
No adjacent doc comment
class DiagnosticViewerTests(unittest.TestCase)
No adjacent doc comment
def parse(self, lines)
No adjacent doc comment
def test_splits_category_session_and_fields(self)
No adjacent doc comment
def test_zero_failures_are_not_errors(self)
No adjacent doc comment
def test_nonzero_errors_are_errors(self)
No adjacent doc comment
def test_cumulative_dropped_counter_does_not_mark_every_line(self)
No adjacent doc comment
def test_summary_counts_categories_and_sessions(self)
No adjacent doc comment
class BundleReportTests(unittest.TestCase)
No adjacent doc comment
def make_ipa(self, root, pad=True, resource=True)
No adjacent doc comment
def test_valid_ipa_and_sizes(self)
No adjacent doc comment
def test_missing_ipad_declaration(self)
No adjacent doc comment
def test_missing_png(self)
No adjacent doc comment
def test_suspicious_file_detection(self)
No adjacent doc comment
def test_expected_exclusions_report_included_and_excluded(self)
No adjacent doc comment
def test_name_only_catalog_with_assets_passes(self)
No adjacent doc comment
def test_name_only_catalog_without_assets_fails(self)
No adjacent doc comment
def test_markdown_does_not_show_per_file_zip_sizes(self)
No adjacent doc comment
def test_markdown_directory_labels_missing_ipa(self)
No adjacent doc comment
class SelectionTests(unittest.TestCase)
No adjacent doc comment
def setUp(self)
No adjacent doc comment
def test_newer_runtime_excluded_when_not_compatible(self)
No adjacent doc comment
def test_other_platform_and_placeholder_do_not_match(self)
No adjacent doc comment
def test_unavailable_device_is_rejected(self)
No adjacent doc comment
def test_missing_runtime_is_ignored_even_if_device_says_available(self)
No adjacent doc comment
def test_sdk_matching_runtime_is_preferred(self)
No adjacent doc comment
def test_runtime_with_missing_path_is_ignored(self)
No adjacent doc comment
def test_standard_model_is_preferred_over_air(self)
No adjacent doc comment
def test_device_type_candidates_prefer_standard_models(self)
No adjacent doc comment
def test_falls_back_to_newest_available_ios_runtime(self)
No adjacent doc comment
def sample_source()
No adjacent doc comment
class AltStoreSourceTests(unittest.TestCase)
No adjacent doc comment
def test_new_version_is_prepended_and_keeps_other_fields(self)
No adjacent doc comment
def test_same_version_and_build_replaces_instead_of_duplicating(self)
No adjacent doc comment
def test_versions_are_capped(self)
No adjacent doc comment
def test_output_copy_leaves_template_untouched(self)
No adjacent doc comment
def test_notes_file_becomes_version_description(self)
No adjacent doc comment
def test_older_release_is_ignored(self)
No adjacent doc comment
def test_missing_bundle_identifier_fails(self)
No adjacent doc comment
def parse_args(argv: list[str] | None = None) -> argparse.Namespace
No adjacent doc comment
def make_entry(*, tag: str, version: str, build: str, size: int, repo: str, date: str, min_os: str, description: str = "") -> dict
No adjacent doc comment
def update_source(source: dict, *, bundle_id: str, entry: dict, max_versions: int) -> dict
No adjacent doc comment
def newest_release_tag(source: dict, bundle_id: str) -> str | None
No adjacent doc comment
def tag_key(tag: str) -> tuple[int, ...]
No adjacent doc comment
def resolve_date(value: str | None) -> str
No adjacent doc comment
def resolve_min_os(source: dict, bundle_id: str, override: str | None) -> str
No adjacent doc comment
def main(argv: list[str] | None = None) -> int
No adjacent doc comment
def uid(key, val=None)
No adjacent doc comment
def section_text(name)
No adjacent doc comment
def replace_section(name, new_content)
No adjacent doc comment
def insert_before_end(name, new_entries)
No adjacent doc comment
def target_exists(base: Path, target: Path) -> bool
No adjacent doc comment
def validate(site: Path) -> list[str]
No adjacent doc comment
def main() -> int
No adjacent doc comment
struct AudioControlSettings: Codable, Equatable, Sendable
init(defaults: UserDefaults)
private static func validated(_ value: Double?, range: ClosedRange<Double>) -> Float
No adjacent doc comment
struct AudioTimelineObservation
private(set) var generation
No adjacent doc comment
private var format: String?
No adjacent doc comment
private var firstPTS: Double?
No adjacent doc comment
private var lastEnd: Double?
No adjacent doc comment
private var frames: UInt64
No adjacent doc comment
private var contentSeconds
No adjacent doc comment
private var discontinuities
No adjacent doc comment
private var invalid
No adjacent doc comment
mutating func record(pts: Double, frames count: Int, rate: Double, signature: String)
func number(_ value: Double?) -> String
No adjacent doc comment
final class CaptureLease: @unchecked Sendable
private let descriptor: Int32
No adjacent doc comment
private init(descriptor: Int32)
No adjacent doc comment
static func acquire() throws -> CaptureLease
No adjacent doc comment
final class CaptureMailbox<Value: Sendable>: @unchecked Sendable
private struct Entry
No adjacent doc comment
private let lock
No adjacent doc comment
private let budget: Int
No adjacent doc comment
private let age: TimeInterval
No adjacent doc comment
private let clock: @Sendable () -> TimeInterval
No adjacent doc comment
private var entries: [Entry]
No adjacent doc comment
private var bytes
No adjacent doc comment
private var closed
No adjacent doc comment
private var waiter: CheckedContinuation<Value?, Never>?
No adjacent doc comment
private var accepted
No adjacent doc comment
private var dropped
No adjacent doc comment
init(budget: Int, age: TimeInterval = 0.1, clock: @escaping @Sendable () -> TimeInterval =
No adjacent doc comment
func offer(_ value: Value, bytes size: Int, priority: Int = 0)
func stream() -> AsyncStream<Value>
No adjacent doc comment
private func next() async -> Value?
No adjacent doc comment
func finish(discardPending: Bool = true)
final class CaptureMediaPipeline: Sendable
static func audioSettings(from original: AudioMixerSettings, microphone: Bool) -> AudioMixerSettings
No adjacent doc comment
enum DiagnosticAge
static func text(_ seconds: TimeInterval) -> String
No adjacent doc comment
enum H264EncodingProfile
static func resolve(_ value: String) -> String
static func supportedValues(_ values: [String]) -> [String]
static func title(_ value: String) -> String
final class ProcessingInFlightTracker: @unchecked Sendable
private let lock
No adjacent doc comment
private let id
No adjacent doc comment
private var count
No adjacent doc comment
private var activeSince: Double?
No adjacent doc comment
private var total
No adjacent doc comment
private var previousTime: Double?
No adjacent doc comment
private var previousTotal
No adjacent doc comment
private var submitted
No adjacent doc comment
private var completed
No adjacent doc comment
private var failed
No adjacent doc comment
private var lastPreparationMs
No adjacent doc comment
private var lastCompletionMs
No adjacent doc comment
private var angle
No adjacent doc comment
private var width
No adjacent doc comment
private var height
No adjacent doc comment
private var overlay
No adjacent doc comment
private var resized
No adjacent doc comment
func begin(at now: Double, preparationMs: Double, angle: Int, width: Int, height: Int, overlay: Bool, resized: Bool = false)
func end(at now: Double, elapsedMs: Double, success: Bool)
func sample(at now: Double = ProcessInfo.processInfo.systemUptime) -> (load: VideoProcessingLoadSnapshot?, summary: String)
struct RuntimeDebugConfig: Codable, Equatable, Sendable
init(version: Int, rotateDebug: Bool, timeDebug: Bool, pipelineLog: Bool, socketLog: Bool, rotation: Int = 90, rotateOriginal: Bool = false, includesGeometry: Bool = false)
No adjacent doc comment
private enum CodingKeys: String, CodingKey
No adjacent doc comment
init(from decoder: Decoder) throws
No adjacent doc comment
static func load(from defaults: UserDefaults?) -> RuntimeDebugConfig?
No adjacent doc comment
static func publish(to defaults: UserDefaults?) -> RuntimeDebugConfig?
enum SealedLogAccess
static func withLock<T>(directory: URL, body: () throws -> T) throws -> T
enum StreamAudioBitrate: String, CaseIterable, Identifiable, Sendable
static func load(from defaults: UserDefaults) -> Self
func resolve(recommended: Int) -> Int
struct StreamDiagnosticsSnapshot: Codable, Sendable
struct EncoderInputBufferDiagnostics: Codable, Sendable
static func from(_ stage: VideoQueueStageSnapshot) -> Self
struct AudioTrackDiagnostics: Codable, Sendable, Identifiable
struct AudioGapEvent: Codable, Sendable
static func audioTrackDiagnostics( from tracks: [AudioPipelineDiagnostics.Track] ) -> [AudioTrackDiagnostics]
final class StreamDiagnosticsProbe: MediaMixerOutput, @unchecked Sendable
private let lock
No adjacent doc comment
private var video: String?
No adjacent doc comment
private var audio: String?
No adjacent doc comment
private var audioSampleRate: Double?
No adjacent doc comment
private var firstVideoPTS: Double?
No adjacent doc comment
private var firstAudioHostTime: Double?
No adjacent doc comment
private var videoFrames: UInt64
No adjacent doc comment
private var audioBuffers: UInt64
No adjacent doc comment
private var audioFrames: UInt64
No adjacent doc comment
private var lastVideoTime
No adjacent doc comment
private var lastAudioTime
No adjacent doc comment
func selectTrack(_ id: UInt8?, mediaType: CMFormatDescription.MediaType) async
No adjacent doc comment
func mixer(_ mixer: MediaMixer, didOutput sampleBuffer: CMSampleBuffer)
No adjacent doc comment
func mixer(_ mixer: MediaMixer, didOutput buffer: AVAudioPCMBuffer, when: AVAudioTime)
No adjacent doc comment
private static func fourCC(_ value: UInt32) -> String
func mixerSnapshot(source: String, phase: String) -> StreamDiagnosticsSnapshot
func snapshot(source: String, stream: RTMPStream, connection: RTMPConnection) async -> StreamDiagnosticsSnapshot
func attachment(_ key: CFString) -> String
No adjacent doc comment
enum CaptureStreamRotation: Int, Equatable, Sendable
init(rotateLeft: Bool)
No adjacent doc comment
enum CaptureStreamOrientation: Equatable, Sendable
No adjacent doc comment
struct CaptureStreamGeometry: Equatable, Sendable
No adjacent doc comment
static func resolve(output: CGSize?, intermediate: CGSize?, source: CGSize?, rotation: CaptureStreamRotation, fixedCanvas: CGSize?, fallback: CGSize) -> CaptureStreamGeometry
static func normalized(_ size: CGSize?) -> CGSize?
enum VideoScalingMode: String, CaseIterable, Identifiable, Sendable
static func stored(_ raw: String?) -> VideoScalingMode
No adjacent doc comment
struct VideoInputBufferSettings: Equatable, Sendable
enum Source: Equatable
No adjacent doc comment
static func load(from defaults: UserDefaults?, source: Source) -> Self
struct VideoProcessingLoadSnapshot: Codable, Sendable
enum VideoBufferPolicy: Equatable, Sendable
static func resolve(rawValue: Int) -> VideoBufferPolicy
No adjacent doc comment
enum KeyFrameIntervalPolicy: Equatable, Sendable
static func resolve(rawValue: Int) -> KeyFrameIntervalPolicy
No adjacent doc comment
def parse_flv(path)
No adjacent doc comment
def analyze(name, pts, sizes, frame_ms)
No adjacent doc comment
struct AboutBuildView: View
No adjacent doc comment
private let info
No adjacent doc comment
enum AppLanguage: String, CaseIterable, Identifiable
static func localized(_ key: String) -> String
enum AppSession
static func markLaunch()
No adjacent doc comment
static func markActive()
static func markBackground()
enum AudioControlCoordinator
static func notify(_ name: String, value: Double)
No adjacent doc comment
enum AudioLogFormatting
static func linearVolume(_ value: Float) -> String
enum AudioMeterPCM
static func rms(_ sample: CMSampleBuffer) -> Float?
static func rms(_ buffer: AVAudioPCMBuffer) -> Float?
func accumulate<T>(_ type: T.Type, scale: Double, value: (T) -> Double) -> Bool
No adjacent doc comment
struct ReplayVolumeApplied: Decodable
final class LiveVolumeModel: ObservableObject
No adjacent doc comment
func reportReplayApplied(_ report: ReplayVolumeApplied)
func replayApplicationStatus(channel: String, desired: Double, now: Date) -> String
private var captureSession: String?
func reportAppliedGains(_ session: String, app: Float, mic: Float?)
private var visibleViews: Set<UUID>
No adjacent doc comment
func setVisible(_ visible: Bool, id: UUID)
func beginCapture(_ session: String)
func endCapture(_ session: String)
func reportCapture(_ session: String, channel: String, rms: Float?, at: Date)
func measurement(_ channel: String, now: Date) -> String?
init(observeNotifications: Bool = true)
No adjacent doc comment
func updateVolumes(mic: Float? = nil, app: Float? = nil, persist: Bool = false)
private func clampUnit(_ value: Double) -> Double
No adjacent doc comment
private func formatPreciseVolumePercent(_ volume: Double) -> String
No adjacent doc comment
private func formatSliderPercent(_ percentage: Double) -> String
No adjacent doc comment
enum AudioLevelPresentation
static func decibels(_ amplitude: Double) -> Double?
static func label(_ amplitude: Double, unit: String = "dBFS") -> String
static func level(_ amplitude: Double) -> Double
No adjacent doc comment
func percentageToVolume(_ percentage: Double) -> Double
No adjacent doc comment
func volumeToPercentage(_ volume: Double) -> Double
struct SafeProgressBar: View
No adjacent doc comment
struct LiveVolumeView: View
private var supportsMicGain: Bool
private func channel(title: LocalizedStringKey, value: Binding<Double>, measured: Double, color: Color, notification: String) -> some View
private func meter(_ amplitude: Double, color: Color) -> some View
private func gainSlider(_ value: Binding<Double>, notification: String) -> some View
private func publish(_ name: String, value: Double)
final class BackgroundTaskManager
No adjacent doc comment
private let socketKeepAliveTaskID
No adjacent doc comment
private var socketBackgroundTaskID: UIBackgroundTaskIdentifier
No adjacent doc comment
private init()
No adjacent doc comment
private final class CompletionState: @unchecked Sendable
No adjacent doc comment
private let lock
No adjacent doc comment
private var completed
No adjacent doc comment
func markCompleted() -> Bool
No adjacent doc comment
func registerTasks()
No adjacent doc comment
func scheduleSocketRefresh()
No adjacent doc comment
func beginSocketBackgroundWindow()
No adjacent doc comment
func endSocketBackgroundWindow()
No adjacent doc comment
func cancelAll()
No adjacent doc comment
private func handleSocketRefreshTask(_ task: BGAppRefreshTask)
No adjacent doc comment
struct BuildInformation: Decodable, Sendable
static func decode(_ data: Data?) -> Self
No adjacent doc comment
private func text(_ value: String?) -> String
No adjacent doc comment
private func modifications(dirty: Bool?, untracked: Int?, modified: Int?) -> String
No adjacent doc comment
struct AVLagObservation: Codable, Equatable, Sendable
func number(_ value: Double?) -> String
No adjacent doc comment
final class AVLagDiagnostics: @unchecked Sendable
private let lock
No adjacent doc comment
private var videoPTS: Double?
No adjacent doc comment
private var audioPTS: Double?
No adjacent doc comment
private var videoQueueAge: Double?
No adjacent doc comment
private var videoQueueOldestAge: Double?
No adjacent doc comment
private var videoProcessAge: Double?
No adjacent doc comment
private var videoSourceAge: Double?
No adjacent doc comment
private var videoContentAge: Double?
No adjacent doc comment
private var audioContentAge: Double?
No adjacent doc comment
private var videoQueue: String?
No adjacent doc comment
private var lastObservedContentAge: Double?
No adjacent doc comment
private var pendingJump: Double?
No adjacent doc comment
private var videoFrames
No adjacent doc comment
private var audioFrames
No adjacent doc comment
private var lastVideoAt: Double?
No adjacent doc comment
private var firstSourceDelta: Double?
No adjacent doc comment
private var firstSourceDeltaAt: Double?
No adjacent doc comment
private var lastSourceDelta: Double?
No adjacent doc comment
private var lastSourceDeltaAt: Double?
No adjacent doc comment
func recordVideo(arrival: Double, pts: Double, at now: Double, queue: String, queueOldestAge: Double?)
func recordVideoProcessed(arrival: Double, pts: Double, at now: Double, queue: String, queueOldestAge: Double?)
func recordAudio(arrival: Double, pts: Double, at now: Double, isMic: Bool)
func snapshot(session: String, now: Double, sampledAt: Date = Date()) -> AVLagObservation?
final class AVLagModel: ObservableObject
private var segmentIndex
No adjacent doc comment
private var segmentStartedAt: Date?
No adjacent doc comment
private var truncatedBefore
No adjacent doc comment
private var estimatedSampleBytes
No adjacent doc comment
private let maxSampleBytes
No adjacent doc comment
private let checkpointInterval: TimeInterval
private var lastCheckpointAt: Date?
No adjacent doc comment
private var recordedSampleCount
No adjacent doc comment
private var lastCheckpointRecordedCount
No adjacent doc comment
private var persistTask: Task<Void, Never>?
private var maxSamples: Int
No adjacent doc comment
private init()
No adjacent doc comment
struct Stats: Sendable
No adjacent doc comment
func begin(session: String)
func record(_ observation: AVLagObservation)
No adjacent doc comment
private func checkpointIfNeeded(now: Date)
func persistInProgress()
private func persistInProgress(force: Bool, now: Date)
No adjacent doc comment
func end(session: String? = nil)
No adjacent doc comment
func trimForMemoryPressure(maxBytes: Int = 512 * 1024)
func reportFileURL() -> URL?
func reportJSON() -> String
No adjacent doc comment
private func shouldRotateSegment(now: Date) -> Bool
No adjacent doc comment
private func rotateSegment(now: Date)
No adjacent doc comment
private func trimLocked()
No adjacent doc comment
private func trim(toBytes byteLimit: Int)
No adjacent doc comment
private func persist(session: String, startedAt: Date, segmentIndex: Int, segmentStartedAt: Date, segmentEndedAt: Date?, complete: Bool, sessionComplete: Bool, truncatedBefore: Bool, samples: [AVLagObservation])
No adjacent doc comment
private func estimatedBytes(_ observation: AVLagObservation) -> Int
struct AVLagReportDocument: Codable, Sendable
func encoded() throws -> Data
No adjacent doc comment
struct AVLagSegmentSummary: Codable, Identifiable, Sendable
No adjacent doc comment
struct AVLagSessionSummary: Codable, Identifiable, Sendable
No adjacent doc comment
private struct AVLagReportIndex: Codable
No adjacent doc comment
enum AVLagReportExport
static func url(for document: AVLagReportDocument) -> URL?
No adjacent doc comment
static func url(text: String, session: String, segmentIndex: Int) -> URL?
No adjacent doc comment
actor AVLagReportStore
private let root: URL
No adjacent doc comment
private let indexURL: URL
No adjacent doc comment
private let maxSessions
No adjacent doc comment
private let maxTotalBytes
No adjacent doc comment
private init()
No adjacent doc comment
private nonisolated func migrateLegacyReportsIfNeeded()
private func ensureDirectory() throws
No adjacent doc comment
private func fileURL(session: String, segment: Int) -> URL
No adjacent doc comment
private func encoder() -> JSONEncoder
No adjacent doc comment
private func decoder() -> JSONDecoder
No adjacent doc comment
private func readIndex() -> AVLagReportIndex
No adjacent doc comment
private func writeIndex(_ index: AVLagReportIndex) throws
No adjacent doc comment
private func notifyChanged()
No adjacent doc comment
func summaries(activeSessionID: String? = nil) -> [AVLagSessionSummary]
private func reconcile(_ index: inout AVLagReportIndex, activeSessionID: String?) -> Bool
func save(_ document: AVLagReportDocument) throws
No adjacent doc comment
func documents(for sessionID: String) -> [AVLagReportDocument]
No adjacent doc comment
func delete(sessionID: String)
No adjacent doc comment
func clear()
No adjacent doc comment
private func prune(_ index: inout AVLagReportIndex)
No adjacent doc comment
private func totalBytes(_ sessions: [AVLagSessionSummary]) -> Int
No adjacent doc comment
private func removeOldest(_ index: inout AVLagReportIndex)
No adjacent doc comment
struct AVLagReportView: View
private func refreshReport()
No adjacent doc comment
private func reloadSummaries() async
No adjacent doc comment
private func row(_ title: String, _ value: String) -> some View
No adjacent doc comment
private func seconds(_ value: Double?) -> String
No adjacent doc comment
enum AVLagPersistenceMode: String, CaseIterable, Identifiable
No adjacent doc comment
enum AVLagSettings
struct AVLagSettingsView: View
No adjacent doc comment
private var modeRaw
No adjacent doc comment
private var segmentHours
No adjacent doc comment
private var longSessionSegments
No adjacent doc comment
private var isPersistent: Bool
No adjacent doc comment
struct AVLagStoredSessionView: View
private var isActiveSession: Bool
No adjacent doc comment
private func row(_ title: String, _ value: String) -> some View
No adjacent doc comment
final class CaptureAudioOwnership: @unchecked Sendable
private let lock
No adjacent doc comment
private var captured
No adjacent doc comment
func begin()
No adjacent doc comment
func end()
No adjacent doc comment
func performUnlessCaptured(_ action: () throws -> Void) rethrows
No adjacent doc comment
final class CaptureCallbackDiagnostics: @unchecked Sendable
enum Track: String, CaseIterable
No adjacent doc comment
enum Outcome: String
No adjacent doc comment
private struct Counters
No adjacent doc comment
private let lock
No adjacent doc comment
private var tracks: [Track: Counters]
No adjacent doc comment
func record(track: Track, outcome: Outcome, state: String?, arrival: Double, pts: Double)
func summary(now: Double) -> String
func number(_ value: Double?) -> String
No adjacent doc comment
func present()
No adjacent doc comment
func stop() async
No adjacent doc comment
private var lease: CaptureLease?
No adjacent doc comment
private var driver: (any CaptureDriver)?
No adjacent doc comment
private var hasStartedCapture
func startScreenCapture(url: String, key: String, mode: CaptureWorkMode = .stream)
No adjacent doc comment
func stop()
No adjacent doc comment
private var isScreenCaptureKit: Bool
No adjacent doc comment
private var selectedWorkMode: CaptureWorkMode
No adjacent doc comment
private var controlsDisabled: Bool
No adjacent doc comment
private var backendPicker: some View
private var screenCaptureKitOptions: some View
private var recordingCodecPicker: some View
private var statusLine: some View
private func watchCaptureLease() async
enum CaptureErrorDiagnostics
static func endpoint(_ raw: String, key: String) -> String
No adjacent doc comment
static func sanitize(_ text: String, secrets: [String]) -> String
No adjacent doc comment
static func describe(_ error: Error, secrets: [String]) -> String
No adjacent doc comment
enum CaptureBackend: String, CaseIterable, Identifiable
No adjacent doc comment
enum CapturePhase: String
No adjacent doc comment
struct CaptureSessionState
private(set) var id: UUID?
No adjacent doc comment
private(set) var phase: CapturePhase
No adjacent doc comment
mutating func begin() -> UUID?
No adjacent doc comment
mutating func stopping()
No adjacent doc comment
mutating func finish(_ token: UUID)
No adjacent doc comment
enum CaptureWorkMode: String, CaseIterable, Identifiable
func accepts(endpoint: String, key: String) -> Bool
No adjacent doc comment
enum RecordingPhase: String, Codable
No adjacent doc comment
struct LocalRecording: Identifiable, Codable
No adjacent doc comment
private(set) var phase: RecordingPhase
No adjacent doc comment
mutating func markRecovered(duration: Double, bytes: Int64)
mutating func recoverAfterRelaunch()
No adjacent doc comment
func mb(_ value: Int64) -> String
No adjacent doc comment
struct CaptureStreamTelemetry: Equatable, Sendable
private var lastEventAt
No adjacent doc comment
mutating func consume(message: String, detail: String?, now: Date = Date())
func audioState(at now: Date = Date()) -> String
struct CapturePipelineStatus: Equatable
static func resolve(phase: CapturePhase, failed: Bool, sampledAt: Date?, now: Date) -> Self
struct DirectRecordingSettings: Sendable
init(defaults: UserDefaults)
struct DirectRecordingSettingsView: View
struct RecordingCompressionSettings: Sendable
init(enabled: Bool, hevc: Bool, megabits: Int, longestEdge: Int, fpsLimit: Int, systemQuality: Bool = false, multiPass: Bool = false, boundingSize: CGSize? = nil, videoBitrate: Int? = nil)
No adjacent doc comment
func outputSize(_ source: CGSize, swapsAxes: Bool = false) -> CGSize
static func load(from defaults: UserDefaults) -> Self
struct RecordingFrameRateLimiter
private(set) var lastAccepted: Double?
mutating func accepts(seconds: Double) -> Bool
struct RecordingCompressionSettingsView: View
struct RecordingFileDetails
struct AudioTrackDetails
static func codec(_ descriptions: [CMFormatDescription]) -> String
static func read(_ url: URL) async throws -> Self
private var values: [URL: (String, RecordingFileDetails)]
No adjacent doc comment
func read(_ url: URL) async throws -> RecordingFileDetails
private func dimensions(_ size: CGSize) -> String
private func value(_ key: String, _ text: String) -> some View
struct RecordingGroup: Identifiable
static func make(_ recordings: [LocalRecording]) -> [RecordingGroup]
extension RecordingLibrary
No adjacent doc comment
func merge(group: UUID) async throws -> UUID
func failure(_ text: String) -> NSError
No adjacent doc comment
func beginMerge(_ group: UUID) -> Bool
func endMerge(_ group: UUID)
func identifyMerged(_ id: UUID, group: UUID) throws
private let directory: URL
No adjacent doc comment
private var itemDirectories: [UUID: URL]
init(directory: URL? = nil)
No adjacent doc comment
private func loadRecordings(from source: URL)
func fileURL(for id: UUID) -> URL
No adjacent doc comment
private func manifestURL(_ id: UUID) -> URL
No adjacent doc comment
private func persist(_ item: LocalRecording) throws
No adjacent doc comment
func identifySegment(_ id: UUID, group: UUID, number: Int)
No adjacent doc comment
func recordSourceRange(_ id: UUID, sourceStartPTS: Double?, sourceEndPTS: Double?, sourceAudioStartPTS: Double? = nil, writeToDisk: Bool = true)
func recover(_ item: LocalRecording) async throws
func create() throws -> LocalRecording
No adjacent doc comment
func update(_ id: UUID, phase: RecordingPhase? = nil, duration: Double, bytes: Int64, message: String? = nil)
No adjacent doc comment
func compressionProgress(_ id: UUID, original: Int64? = nil, output: Int64? = nil, completed: Bool = false)
func delete(_ item: LocalRecording) throws
No adjacent doc comment
func saveToPhotos(_ item: LocalRecording) async throws
No adjacent doc comment
private var groups: [RecordingGroup]
private func recordingRow(_ item: LocalRecording) -> some View
No adjacent doc comment
init(url: URL)
No adjacent doc comment
enum RecordingOrientationCorrector
static func transform(_ orientation: Int, size: CGSize) -> CGAffineTransform
No adjacent doc comment
static func correct(url: URL, timeline: RecordingOrientationTimeline, policy: RecordingOrientationPolicy = .automatic, compression: RecordingCompressionSettings? = nil) async throws -> String
No adjacent doc comment
private static func finishWithoutCorrection(url: URL, compression: RecordingCompressionSettings?, note: String) async throws -> String
struct RecordingOrientationEvent: Equatable, Sendable
No adjacent doc comment
final class RecordingOrientationTimeline: @unchecked Sendable
private let lock
No adjacent doc comment
private var firstTime: Double?
No adjacent doc comment
private var lastTime: Double?
No adjacent doc comment
private var events: [RecordingOrientationEvent]
No adjacent doc comment
private var invalid
No adjacent doc comment
private var missing
No adjacent doc comment
func observe(seconds: Double, orientation: Int?)
No adjacent doc comment
func snapshot() -> (events: [RecordingOrientationEvent], reliable: Bool, missing: Int)
No adjacent doc comment
enum RecordingOrientationPolicy: String, CaseIterable, Identifiable, Sendable
func outputOrientation(for source: Int) -> Int
No adjacent doc comment
enum RecordingPCMSlicer
static func copy(_ sample: CMSampleBuffer, start: Int, count: Int) throws -> CMSampleBuffer
func failure(_ stage: String, code: OSStatus = -1) -> NSError
No adjacent doc comment
enum RecordingStorageMigration
struct Result
No adjacent doc comment
static func migrate(legacy: URL, destination: URL) -> Result
enum RecordingTranscoder
enum AudioMode: String, CaseIterable, Sendable
enum QualityPreset: String, CaseIterable, Sendable
static func temporaryURL(for url: URL) -> URL
private static func failure(_ message: String) -> NSError
No adjacent doc comment
private static func staged(_ stage: String, _ error: Error) -> NSError
private static func diagnosticSettings(_ settings: [String: Any]) -> String
static func normalizedColorMatrix(_ value: String) throws -> String
static func mappedColorProperties(_ extensions: [String: Any]) throws -> [String: String]
static func normalizeDecodedColor(_ sample: CMSampleBuffer, sourceMatrix: String?) throws
static func compress(url: URL, asset: AVAsset, videoComposition: AVVideoComposition? = nil, settings: RecordingCompressionSettings, destination: URL? = nil, audioMode: AudioMode = .preserve, audioBitrate: Int = 128000, qualityPreset: QualityPreset? = nil, colorMode: CompressionColorMode = .automatic, progress: (@Sendable (Double) -> Void)? = nil) async throws -> String
private static func exportSystemQuality(url: URL, asset: AVAsset, composition: AVVideoComposition?, settings: RecordingCompressionSettings, originalBytes: Int, duration: CMTime, destination: URL? = nil, qualityPreset: QualityPreset? = nil) async throws -> String
enum RecordingVideoCodec: String, CaseIterable, Identifiable
final class ScreenAudioProbe: MediaMixerOutput, @unchecked Sendable
private let lock
No adjacent doc comment
private var formats: [UInt8: String]
No adjacent doc comment
private var timelines: [UInt8: AudioTimelineObservation]
No adjacent doc comment
private var mixedTimeline
No adjacent doc comment
private var mixedBuffers
No adjacent doc comment
private var mixedFormat
No adjacent doc comment
private var lastSourcePTS: [UInt8: Double]
No adjacent doc comment
private var lastMeterTime: [String: TimeInterval]
No adjacent doc comment
private var meterInterval: TimeInterval
No adjacent doc comment
private let session: String
No adjacent doc comment
private func shouldMeasure(_ channel: String) -> Bool
private func setMeterVisible(_ visible: Bool)
No adjacent doc comment
private func report(_ rms: Float?, channel: String)
init(session: String)
No adjacent doc comment
func observe(_ sample: CMSampleBuffer, track: UInt8)
private func inspectPCM(_ sample: CMSampleBuffer, asbd: AudioStreamBasicDescription) -> String
func mixer(_ mixer: MediaMixer, didOutput sampleBuffer: CMSampleBuffer)
No adjacent doc comment
func selectTrack(_ id: UInt8?, mediaType: CMFormatDescription.MediaType) async
No adjacent doc comment
func mixer(_ mixer: MediaMixer, didOutput buffer: AVAudioPCMBuffer, when: AVAudioTime)
No adjacent doc comment
func summary() -> String
private struct SelectedCaptureFilter: @unchecked Sendable
No adjacent doc comment
private struct CapturedSample: @unchecked Sendable
No adjacent doc comment
private final class FinishResumeOnce: @unchecked Sendable
private let lock
No adjacent doc comment
private var continuation: CheckedContinuation<Void, Never>?
No adjacent doc comment
init(_ continuation: CheckedContinuation<Void, Never>)
No adjacent doc comment
func resume()
No adjacent doc comment
private final class ScreenSamplePump: NSObject, SCStreamOutput, @unchecked Sendable
private var workers: [Task<Void, Never>]
No adjacent doc comment
private var loggedFrameSize
No adjacent doc comment
init(mixer: MediaMixer, probe: ScreenAudioProbe, rotateLeft: Bool, canvas: CGSize? = nil, fills: Bool = false) throws
No adjacent doc comment
func stream(_ stream: SCStream, didOutputSampleBuffer sampleBuffer: CMSampleBuffer, of type: SCStreamOutputType)
No adjacent doc comment
func finish() async
No adjacent doc comment
private let url: String
private let key: String
private let update: @MainActor (CapturePhase, String?) -> Void
No adjacent doc comment
private var state
No adjacent doc comment
private let mode: CaptureWorkMode
No adjacent doc comment
private let recordingPolicy: RecordingOrientationPolicy
No adjacent doc comment
private let lifetimeID
private let publishingChanged: @MainActor (Bool, String?) -> Void
No adjacent doc comment
private var pipeline: CaptureMediaPipeline?
No adjacent doc comment
private let directRecordingEnabled
No adjacent doc comment
private var recordingSink: SegmentedRecordingSink?
No adjacent doc comment
private var directRecordingFailed
No adjacent doc comment
private var mediaPrepared
No adjacent doc comment
private var volumeUpdates: Task<Void, Never>?
No adjacent doc comment
private var hasRecording: Bool
No adjacent doc comment
private var audioProbe: ScreenAudioProbe?
No adjacent doc comment
private var streamDiagnosticsProbe: StreamDiagnosticsProbe?
No adjacent doc comment
private var lastAudioGapSequence: [UInt8: UInt64]
private var telemetry
No adjacent doc comment
private let telemetryChanged: @MainActor (CaptureStreamTelemetry) -> Void
No adjacent doc comment
private var recording: ScreenRecordingSession?
No adjacent doc comment
private var recordingOrientation: ScreenRecordingOrientationObserver?
No adjacent doc comment
private var publishingTask: Task<Void, Never>?
No adjacent doc comment
private var streamingViable
No adjacent doc comment
private var startupStage
No adjacent doc comment
private var publishingStage
No adjacent doc comment
private var cleaningPublishing
No adjacent doc comment
private var connection: RTMPConnection?
No adjacent doc comment
private var output: RTMPStream?
No adjacent doc comment
private var capture: SCStream?
No adjacent doc comment
private var pump: ScreenSamplePump?
No adjacent doc comment
private var operation: Task<Void, Never>?
No adjacent doc comment
private var diagnostics: Task<Void, Never>?
No adjacent doc comment
private var ownsAudioSession
No adjacent doc comment
private var previousIdleTimerDisabled: Bool?
No adjacent doc comment
private var audioObservers: [NSObjectProtocol]
No adjacent doc comment
private var priorCategory: AVAudioSession.Category?
No adjacent doc comment
private var priorMode: AVAudioSession.Mode?
No adjacent doc comment
private var priorOptions: AVAudioSession.CategoryOptions
No adjacent doc comment
private let sampleQueue
No adjacent doc comment
init(url: String, key: String, mode: CaptureWorkMode, publishingChanged: @escaping @MainActor (Bool, String?) -> Void, telemetryChanged: @escaping @MainActor (CaptureStreamTelemetry) -> Void, update: @escaping @MainActor (CapturePhase, String?) -> Void)
No adjacent doc comment
func present()
No adjacent doc comment
nonisolated func contentSharingPicker(_ picker: SCContentSharingPicker, didCancelFor stream: SCStream?)
No adjacent doc comment
nonisolated func contentSharingPickerStartDidFailWithError(_ error: Error)
No adjacent doc comment
nonisolated func contentSharingPicker(_ picker: SCContentSharingPicker, didUpdateWith filter: SCContentFilter, for stream: SCStream?)
No adjacent doc comment
private func selected(_ filter: SCContentFilter)
private func start(filter: SCContentFilter, token: UUID) async throws
private func prepareMediaPipeline(source: SCStream, filter: SCContentFilter, geometry: CaptureStreamGeometry) async throws
private static func volume(_ defaults: UserDefaults, key: String) -> Float
private func preparePublishing(size: CGSize) async throws
private func handleReconnect(_ reconnect: RTMPConnection.ReconnectState, session: UUID?) async
private func startPublishing() async throws
private func logStage()
private func logFailure(_ error: Error, stage: String)
private func publishingFailed(_ message: String) async
private func stopPublishing() async
private func stopMediaPipeline() async
nonisolated func stream(_ stream: SCStream, didStopWithError error: Error)
No adjacent doc comment
private func restoreMixingAudioSession()
private func logAudioSession(_ event: String)
private func observeAudioSession(token: UUID)
private func logResources(stage: String)
private func beginIdleTimerAssertion()
private func endIdleTimerAssertion()
No adjacent doc comment
func stop() async
No adjacent doc comment
private func finish(message: String?) async
private func awaitAtMost<T>(_ seconds: Double, task: Task<T, Never>?) async
func mark(_ stage: String)
No adjacent doc comment
final class ScreenOverlayComposer: @unchecked Sendable
private let lock
No adjacent doc comment
private let formatter
No adjacent doc comment
private let startedAt
No adjacent doc comment
private var cachedConfig: TimeOverlayConfig?
No adjacent doc comment
private var cachedSecond
No adjacent doc comment
private var cachedImage: CGImage?
No adjacent doc comment
private var cachedSize: CGSize
No adjacent doc comment
private var cachedScene
No adjacent doc comment
private var lastConfigRead
No adjacent doc comment
private enum OverlayError: Error
No adjacent doc comment
private var loggedConfig: TimeOverlayConfig?
No adjacent doc comment
func layer(canvas: CGSize) throws -> (image: CGImage, origin: CGPoint, size: CGSize)?
private func rasterize(_ config: TimeOverlayConfig, second: Int) -> (image: CGImage, size: CGSize)?
No adjacent doc comment
private func timeText(config: TimeOverlayConfig, now: Date) -> String
No adjacent doc comment
private extension UIColor
No adjacent doc comment
convenience init?(overlayHex hex: String)
No adjacent doc comment
final class ScreenRecordingOrientationObserver: NSObject, SCStreamOutput, @unchecked Sendable
No adjacent doc comment
private var lastOrientation: Int?
No adjacent doc comment
private var loggedMissing
No adjacent doc comment
private let frameLock
No adjacent doc comment
private var frameCount
No adjacent doc comment
private var firstPTS: Double?
No adjacent doc comment
private var lastPTS: Double?
No adjacent doc comment
private var maxFrameGap: Double
No adjacent doc comment
private var maxFrameGapAtPTS: Double?
No adjacent doc comment
private var lastFrameGap: Double?
No adjacent doc comment
private var frameGapsOver100ms
No adjacent doc comment
private var lastArrival: Double?
No adjacent doc comment
func frameSummary(now: Double) -> String
func stream(_ stream: SCStream, didOutputSampleBuffer sampleBuffer: CMSampleBuffer, of type: SCStreamOutputType)
No adjacent doc comment
func number(_ value: Double?) -> String
No adjacent doc comment
private(set) var terminal
No adjacent doc comment
private var output: SCRecordingOutput?
No adjacent doc comment
private let orientation: RecordingOrientationTimeline
No adjacent doc comment
private let policy: RecordingOrientationPolicy
No adjacent doc comment
private let compression: RecordingCompressionSettings
private var nativeFinished
No adjacent doc comment
private var correction: Task<Void, Never>?
No adjacent doc comment
private var progress: Task<Void, Never>?
No adjacent doc comment
private var started
No adjacent doc comment
private var detached
No adjacent doc comment
private let failed: @MainActor (String) -> Void
No adjacent doc comment
init(orientation: RecordingOrientationTimeline, policy: RecordingOrientationPolicy, failed: @escaping @MainActor (String) -> Void) throws
No adjacent doc comment
func attach(to stream: SCStream) throws
private func report(_ phase: RecordingPhase? = nil, message: String? = nil)
private func complete(_ phase: RecordingPhase, message: String? = nil)
func detach(from stream: SCStream)
func awaitCompletion() async
nonisolated func recordingOutputDidStartRecording(_ recordingOutput: SCRecordingOutput)
nonisolated func recordingOutputDidFinishRecording(_ recordingOutput: SCRecordingOutput)
nonisolated func recordingOutput(_ recordingOutput: SCRecordingOutput, didFailWithError error: any Error)
enum ScreenRecordingCodecSupport
static func isAvailable(_ codec: RecordingVideoCodec) -> Bool
static func resolve(_ preference: RecordingVideoCodec) -> (codec: AVVideoCodecType, note: String?)
private static func name(_ codec: AVVideoCodecType) -> String
No adjacent doc comment
final class ScreenStreamVideoRotator: @unchecked Sendable
private let context: CIContext
No adjacent doc comment
private let rotateLeft: Bool
No adjacent doc comment
private let overlay: ScreenOverlayComposer?
No adjacent doc comment
private let canvas: CGSize?
private let fills: Bool
private var pool: CVPixelBufferPool?
No adjacent doc comment
private var width
No adjacent doc comment
private var height
No adjacent doc comment
init(rotateLeft: Bool = true, overlay: ScreenOverlayComposer? = nil, canvas: CGSize? = nil, fills: Bool = false) throws
No adjacent doc comment
func rotate(_ sample: CMSampleBuffer) throws -> CMSampleBuffer
private func process(_ sample: CMSampleBuffer, bypass: inout Bool, configuration: inout VideoProcessingFrameInfo) throws -> CMSampleBuffer
private func check(_ status: Int32) throws
No adjacent doc comment
private enum RotationError: Error
No adjacent doc comment
actor SegmentedRecordingWriter
private let settings: DirectRecordingSettings
No adjacent doc comment
private let library: RecordingLibrary
No adjacent doc comment
private var current: RecordingSegmentWriter?
No adjacent doc comment
private var previous: RecordingSegmentWriter?
No adjacent doc comment
private var boundary: CMTime
No adjacent doc comment
private var retireAt: ContinuousClock.Instant?
No adjacent doc comment
private var finalizing: Task<Void, Error>?
No adjacent doc comment
private var number
No adjacent doc comment
private var lateAudio
No adjacent doc comment
init(settings: DirectRecordingSettings, library: RecordingLibrary)
func append(_ sample: CMSampleBuffer) async throws
private func retirePrevious()
func finishSegment() async throws
func failed(_ error: Error) async
private struct RecordingSample: @unchecked Sendable
final class SegmentedRecordingSink: MediaMixerOutput, @unchecked Sendable
private let mailbox: CaptureMailbox<RecordingSample>
No adjacent doc comment
private let worker: Task<Void, Never>
No adjacent doc comment
init(settings: DirectRecordingSettings, library: RecordingLibrary, failed: @escaping @MainActor @Sendable (String) -> Void)
func selectTrack(_ id: UInt8?, mediaType: CMFormatDescription.MediaType) async
func mixer(_ mixer: MediaMixer, didOutput sampleBuffer: CMSampleBuffer)
func mixer(_ mixer: MediaMixer, didOutput buffer: AVAudioPCMBuffer, when: AVAudioTime)
func finish() async
actor RecordingSegmentWriter
private let settings: DirectRecordingSettings
private let library: RecordingLibrary
private let group: UUID
private let number: Int
private var writer: AVAssetWriter?
private var video: AVAssetWriterInput?
private var audio: AVAssetWriterInput?
private var id: UUID?
private var url: URL?
private var start: CMTime
private var lastVideo: CMTime
private var lastAudio: CMTime
private var firstAudio: CMTime
private var lastReport
private var lastKnownBytes: Int64
private var sizeReadError: String?
private var dropped
private var videoCount
private var audioCount
private var audioEnd: CMTime
No adjacent doc comment
private var dropReasons: [String: Int]
private func recordDrop(video: Bool, reason: String)
private var limiter: RecordingFrameRateLimiter
init(settings: DirectRecordingSettings, library: RecordingLibrary, group: UUID, number: Int)
private func error(_ message: String) -> NSError
func append(_ sample: CMSampleBuffer) async throws
private func begin(_ sample: CMSampleBuffer) async throws
func finishSegment(at boundary: CMTime? = nil) async throws
private func report(phase: RecordingPhase?, completedDuration: Double? = nil) async
func failed(_ failure: Error) async
enum StreamFramePolicy: String, CaseIterable, Identifiable
struct VideoProcessingFrameInfo: CustomStringConvertible
enum VideoProcessingBudget
static func limit(width: Int, height: Int) -> Int?
No adjacent doc comment
final class VideoProcessingDiagnostics: @unchecked Sendable
private let lock
No adjacent doc comment
private var activeSince: Double?
No adjacent doc comment
private var completedBusySeconds
No adjacent doc comment
private var previousLoadTime: Double?
No adjacent doc comment
private var previousBusySeconds
No adjacent doc comment
func begin(at now: Double = ProcessInfo.processInfo.systemUptime)
func sampleLoad(at now: Double = ProcessInfo.processInfo.systemUptime) -> VideoProcessingLoadSnapshot?
private var attempts
No adjacent doc comment
private var processed
No adjacent doc comment
private var bypassed
No adjacent doc comment
private var failed
No adjacent doc comment
private var lastMilliseconds
No adjacent doc comment
private var maxMilliseconds
No adjacent doc comment
private var lastInputPTS: Double?
No adjacent doc comment
private var lastOutputPTS: Double?
No adjacent doc comment
private var lastError: String?
No adjacent doc comment
private var configuration
No adjacent doc comment
private var degraded
No adjacent doc comment
private var poolExhausted
No adjacent doc comment
private var totalMilliseconds
No adjacent doc comment
private var over16Milliseconds
No adjacent doc comment
func record(inputPTS: Double, outputPTS: Double?, elapsed: Double, bypass: Bool, configuration: VideoProcessingFrameInfo, error: String?, completedAt now: Double = ProcessInfo.processInfo.systemUptime)
func number(_ value: Double?) -> String
No adjacent doc comment
struct AnimatedButton: View
struct CompressedVideoLibraryView: View
private var folder: URL
No adjacent doc comment
private func reload()
private func deleteSelected()
private func cleanAbandoned()
private func report(_ error: Error)
No adjacent doc comment
private func bytes(_ value: Int64) -> String
No adjacent doc comment
private struct CompressedVideoDuration: View
enum CompressionColorMode: String, CaseIterable, Sendable
struct CompressionColorInfo: Sendable
init(extensions: [String: Any])
func restriction(for mode: CompressionColorMode) -> String?
func preview(for mode: CompressionColorMode) -> String
private var jobID
private var backgroundObserver: AnyCancellable?
No adjacent doc comment
private var importedSource: URL?
No adjacent doc comment
private init()
No adjacent doc comment
func report(_ error: Error)
private var captureBusy: Bool
private var task: Task<Void, Never>?
No adjacent doc comment
func select(_ url: URL)
func selectImported(_ url: URL)
private func discardImportedSource() -> Bool
func clearSource()
func start(settings: RecordingCompressionSettings, audio: RecordingTranscoder.AudioMode, audioBitrate: Int = 128000, qualityPreset: RecordingTranscoder.QualityPreset? = nil, colorMode: CompressionColorMode = .automatic)
func cancel()
struct VideoCompressionView: View
private func applySuggestedBitrate()
private func estimatedAudioBitrate(_ info: RecordingFileDetails) -> Double?
private var validOptions: Bool
private var compressionSettings: RecordingCompressionSettings
private func bytes(_ value: Int64) -> String
struct CompressionPlaybackView: View
enum VideoEncoderCapabilities
static func isHardwareEncodeSupported(_ codec: CMVideoCodecType) -> Bool
class ConfigManager<Key: Hashable & Codable, Value: Codable>: ObservableObject
No adjacent doc comment
private var layers: [[Key: Value]]
No adjacent doc comment
private let userDefaultsKey
No adjacent doc comment
private let maxLayers
No adjacent doc comment
init(defaultConfig: [Key: Value])
No adjacent doc comment
func push(_ newConfig: [Key: Value])
No adjacent doc comment
func value(forKey key: Key) -> Value?
No adjacent doc comment
private func refresh()
No adjacent doc comment
private func saveUserConfig(_ config: [Key: Value])
No adjacent doc comment
private func loadUserConfig()
No adjacent doc comment
struct StreamConfig: Identifiable, Codable
No adjacent doc comment
init(id: UUID = UUID(), name: String, rtmpURL: String, streamKey: String)
No adjacent doc comment
class StreamConfigManager: ObservableObject
No adjacent doc comment
private let configsKey
No adjacent doc comment
private let activeKey
No adjacent doc comment
private let storage: UserDefaults
No adjacent doc comment
private let endpointStorage: UserDefaults
No adjacent doc comment
init(storage: UserDefaults = .standard, endpointStorage: UserDefaults? = userDefaults)
func addConfig(_ config: StreamConfig)
No adjacent doc comment
func removeConfig(_ config: StreamConfig)
No adjacent doc comment
func updateConfig(_ config: StreamConfig)
No adjacent doc comment
func saveAndActivate(_ config: StreamConfig)
func setActiveConfig(_ config: StreamConfig)
No adjacent doc comment
private func save()
No adjacent doc comment
private func load()
No adjacent doc comment
struct ContentView: View
private func updateAudioSubscription()
enum DiagnosticCounterRate
static func value(current: UInt64?, previous: UInt64?, elapsed: Double) -> Double?
struct ExternalLogTransportView: View
private var loading
No adjacent doc comment
private var searchTask: Task<Void, Never>?
No adjacent doc comment
private var searchID
No adjacent doc comment
func load(start: Int? = nil, latest: Bool = false) async
No adjacent doc comment
func refresh() async
No adjacent doc comment
func matches(_ text: String) -> Bool
No adjacent doc comment
func cancelSearch()
No adjacent doc comment
func searchFile()
No adjacent doc comment
struct FileLogView: View
No adjacent doc comment
private var visible: [(line: Int, text: String)]
No adjacent doc comment
private func startRefreshIfNeeded()
private func stopRefresh()
No adjacent doc comment
private func row(_ text: String, line: Int) -> some View
No adjacent doc comment
private struct LogVisibleLinesKey: PreferenceKey
static func reduce(value: inout [Int: CGRect], nextValue: () -> [Int: CGRect])
No adjacent doc comment
private struct LogSelectionTextView: UIViewRepresentable
func makeUIView(context: Context) -> UITextView
No adjacent doc comment
func updateUIView(_ view: UITextView, context: Context)
No adjacent doc comment
init()
No adjacent doc comment
nonisolated static func normalizedMultiplier(savedBitrate: Int) -> Int
func setMultiplier(_ value: Double)
func updateStreamBitrate()
struct BroadcastButton: UIViewRepresentable
func resolveExtension() -> String?
No adjacent doc comment
func makeUIView(context: Context) -> RPSystemBroadcastPickerView
No adjacent doc comment
func updateUIView(_ uiView: RPSystemBroadcastPickerView, context: Context)
No adjacent doc comment
func makeCoordinator() -> Coordinator
No adjacent doc comment
func triggerButton()
No adjacent doc comment
class Coordinator: NSObject
No adjacent doc comment
private var resolvedExtension: String?
No adjacent doc comment
private var lastResolution
No adjacent doc comment
func resolveIfNeeded(resolve: () -> String?) -> String?
func attach(_ picker: RPSystemBroadcastPickerView)
No adjacent doc comment
static func trigger(attempt: Int = 0)
No adjacent doc comment
struct EncodingSettingsView: View
private var sckBufferMB
No adjacent doc comment
private var sckBufferDurationMS
No adjacent doc comment
private var replayKitBufferMB
No adjacent doc comment
private var replayKitBufferDurationMS
No adjacent doc comment
private var isH264: Bool
private var busy: Bool
No adjacent doc comment
private var request: H264CapabilityRequest
private var selection: Binding<String>
private var h264Options: some View
private var bufferOptions: some View
private func inputBufferRow(_ title: String, budget: Binding<Int>, duration: Binding<Int>, budgets: [Int], durations: [Int]) -> some View
struct H264CapabilityRequest: Hashable, Sendable
struct H264CapabilityResult: Sendable
actor H264EncoderCapabilities
private var cache: [H264CapabilityRequest: H264CapabilityResult]
No adjacent doc comment
func query(_ request: H264CapabilityRequest, refresh: Bool = false) -> H264CapabilityResult
func checkMicrophonePermission()
func checkMicrophonePermission()
extension homeView
private var bitrateControls: some View
private func notifyReplayKit(_ name: String)
struct PresetManagementView: View
struct PresetEditView: View
init(store: RTMPPresetStore, preset: RTMPPreset)
No adjacent doc comment
private func save()
No adjacent doc comment
struct RTMPPreset: Codable, Identifiable, Hashable
final class RTMPPresetStore: ObservableObject
private struct PresetFile: Codable
No adjacent doc comment
struct ImportResult
No adjacent doc comment
private let defaults: UserDefaults
No adjacent doc comment
private let bundle: Bundle
No adjacent doc comment
init(defaults: UserDefaults = .standard, bundle: Bundle = .main)
No adjacent doc comment
static func validated(_ preset: RTMPPreset, requireID: Bool) -> RTMPPreset?
func addUserPreset(name: String, rtmpURL: String, note: String? = nil) -> Bool
func removeUserPreset(_ preset: RTMPPreset)
No adjacent doc comment
func updateUserPreset(id: String, name: String, rtmpURL: String) -> RTMPPreset?
func importPresets(from data: Data) -> ImportResult
func exportData() -> Data?
private func saveUser()
No adjacent doc comment
private static func identity(_ preset: RTMPPreset) -> String
No adjacent doc comment
private static func loadUser(defaults: UserDefaults) -> [RTMPPreset]
No adjacent doc comment
private static func loadBuiltIn(bundle: Bundle) -> [RTMPPreset]
No adjacent doc comment
private struct StreamKeyField: View
struct FormView: View
private func apply(_ preset: RTMPPreset)
No adjacent doc comment
private func prepareSaveCurrent()
No adjacent doc comment
private func saveCurrentPreset()
No adjacent doc comment
private func importPresets(_ result: Result<URL, Error>)
No adjacent doc comment
private func prepareExport()
No adjacent doc comment
struct RTMPPresetExportDocument: FileDocument
init(data: Data)
No adjacent doc comment
init(configuration: ReadConfiguration) throws
No adjacent doc comment
func fileWrapper(configuration: WriteConfiguration) throws -> FileWrapper
No adjacent doc comment
struct StreamConfigurationDraft
init()
No adjacent doc comment
init(config: StreamConfig)
No adjacent doc comment
enum HEVCProfile: String, CaseIterable, Identifiable
struct ImageDataURIReference: Sendable
enum ImageDataURI
static func reference(from value: String) -> ImageDataURIReference?
static func decode(_ reference: ImageDataURIReference) -> UIImage?
static func redacted(_ text: String) -> String
enum LogArchiveStore
static func directory(beside log: URL) throws -> URL
No adjacent doc comment
static func name(prefix: String) -> String
static func files(in root: URL) throws -> [URL]
No adjacent doc comment
static func prune(_ root: URL) throws
enum LogDiagnosticExport
static func date(in line: String, zone: TimeZone) -> Date?
static func redacted(_ line: String) -> String
static func extract(snapshot: URL, start: Date, end: Date, zone: TimeZone) throws -> URL
func part(_ n: Int) -> String
No adjacent doc comment
func write(_ text: String) throws
No adjacent doc comment
func consume(_ data: Data) throws
No adjacent doc comment
struct LogDiagnosticExportView: View
private func export()
struct LogFilePage: Sendable
No adjacent doc comment
final class LogFileReader
private var offsets: [UInt64]
No adjacent doc comment
private var indexedSize: UInt64
No adjacent doc comment
private var prefix
No adjacent doc comment
private var generation
No adjacent doc comment
private var modified: Date?
No adjacent doc comment
private var fileIdentity: String?
No adjacent doc comment
func invalidate()
No adjacent doc comment
func page(url: URL, start: Int?, expectedGeneration: Int?) throws -> LogFilePage
No adjacent doc comment
enum LogSeverity: String, CaseIterable
No adjacent doc comment
struct LogPresentation: Hashable
init(_ message: String)
No adjacent doc comment
func matches(_ message: String, severityFilter: String, sourceFilter: String, query: String) -> Bool
No adjacent doc comment
enum LogRetention
static func retainedTail(_ input: Data, startsMidFile: Bool, maximumLines: Int) -> Data
enum LogMode: Int, CaseIterable, Identifiable
struct LogView: View
struct BroadcastButtonMac: View
No adjacent doc comment
func startBroadcast()
No adjacent doc comment
class Coordinator: ObservableObject
No adjacent doc comment
init(rtmpURL: String = "", rtmpKey: String = "")
No adjacent doc comment
class MacScreenBroadcaster: NSObject
No adjacent doc comment
private let captureSession
No adjacent doc comment
private var rtmpURL: String
No adjacent doc comment
private var rtmpKey: String
No adjacent doc comment
init(rtmpURL: String, rtmpKey: String)
No adjacent doc comment
func startBroadcast()
No adjacent doc comment
extension MacScreenBroadcaster: AVCaptureVideoDataOutputSampleBufferDelegate, AVCaptureAudioDataOutputSampleBufferDelegate
No adjacent doc comment
func captureOutput(_ output: AVCaptureOutput, didOutput sampleBuffer: CMSampleBuffer, from connection: AVCaptureConnection)
No adjacent doc comment
final class MemorySampler
private let queue
No adjacent doc comment
private var timer: DispatchSourceTimer?
No adjacent doc comment
private init()
No adjacent doc comment
func checkpoint(_ reason: String)
func start(interval: TimeInterval = 30)
func stop()
No adjacent doc comment
private func sample(reason: String = "periodic")
No adjacent doc comment
final class IdleMemoryComparison
private let processID
No adjacent doc comment
private let startedAt: TimeInterval
No adjacent doc comment
init(startedAt: TimeInterval = ProcessInfo.processInfo.systemUptime)
No adjacent doc comment
private var everBusy
No adjacent doc comment
private var wasBusy
No adjacent doc comment
private var baseline: Double?
No adjacent doc comment
private var firstFootprint: Double?
No adjacent doc comment
private var preCaptureFootprint: Double?
No adjacent doc comment
private var warmIdleFootprint: Double?
No adjacent doc comment
private var lastIdleFootprint: Double?
No adjacent doc comment
private var hasSettledIdle
No adjacent doc comment
private var lastBusyFootprint: Double?
No adjacent doc comment
private var stoppedAt: TimeInterval?
No adjacent doc comment
private var milestones: Set<Int>
No adjacent doc comment
func observe(footprint: Double, captureBusy: Bool, replayLive: Bool, reason: String, now: TimeInterval = ProcessInfo.processInfo.systemUptime) -> String
func number(_ value: Double?) -> String
No adjacent doc comment
enum MemoryRelief
static func releaseNonCritical(reason: String)
No adjacent doc comment
struct MetricReportAnalysis: Sendable
struct Field: Identifiable, Sendable
No adjacent doc comment
struct Section: Identifiable, Sendable
No adjacent doc comment
static func parse(_ content: String) throws -> Self
private static func scalar(_ value: Any?) -> String?
static func displayValue(_ value: String, original: Bool = false) -> String
private static func bytes(_ value: Any?) -> Double?
struct MetricReportEntry: Identifiable, Sendable
static func summary(for report: [String: Any]) -> String
final class MetricReports: NSObject, ObservableObject, MXMetricManagerSubscriber, @unchecked Sendable
private let queue
private let directory
private override init()
No adjacent doc comment
func didReceive(_ payloads: [MXMetricPayload])
func didReceive(_ payloads: [MXDiagnosticPayload])
private func save(_ data: Data, kind: String)
func refresh()
private func publishError(_ error: Error)
No adjacent doc comment
private func reloadLocked() throws
private func publishSnapshot(_ entries: [MetricReportEntry], warning: String?)
func contents(of entry: MetricReportEntry) async throws -> String
struct MetricReportsView: View
private struct MetricReportDetailView: View
struct AdaptiveSettingsGrid<Content: View>: View
struct SettingsDashboardCard<Header: View, Content: View>: View
private let header: Header
No adjacent doc comment
private let content: Content
No adjacent doc comment
init(@ViewBuilder header: () -> Header, @ViewBuilder content: () -> Content)
No adjacent doc comment
extension SettingsDashboardCard where Header == Text
No adjacent doc comment
init(_ title: LocalizedStringKey, @ViewBuilder content: () -> Content)
No adjacent doc comment
struct AdaptiveSettingsColumns<Leading: View, Trailing: View>: View
enum AppPage
final class PageState: ObservableObject
struct HomeTabView: View
struct DeviceTabView: View
struct AudioTabView: View
struct VideoToolLinks: View
struct HomeToolShortcuts: View
struct NetworkTrafficSampler
struct Reading: Identifiable
No adjacent doc comment
private struct Counter
No adjacent doc comment
private var previous: [String: Counter]
No adjacent doc comment
private var previousTime: Double?
No adjacent doc comment
private(set) var readings: [Reading]
No adjacent doc comment
private(set) var error: String?
No adjacent doc comment
mutating func sample()
struct NetworkTrafficCard: View
private func rate(_ value: Double?) -> String
enum ExternalLogPolicy
static func marksExtension(_ messageType: String) -> Bool
No adjacent doc comment
static func acceptsBatch(bytes: Int) -> Bool
No adjacent doc comment
static func canEnqueue(pendingBatches: Int, pendingBytes: Int, newBatchBytes: Int) -> Bool
No adjacent doc comment
static func takeDrainable<Item>(_ entries: inout [ExternalLogEntry<Item>], transport: String, limit: Int) -> [Item]
struct ExternalLogEntry<Item>
struct ExternalLogSubscriptions<ID: Hashable>
private(set) var externalIDs: Set<ID>
No adjacent doc comment
private(set) var extensionIDs: Set<ID>
No adjacent doc comment
mutating func markExtension(_ id: ID)
mutating func setSubscribed(_ subscribed: Bool, id: ID) -> Bool
mutating func retainExisting(_ isPresent: (ID) -> Bool)
func receivesExternalLogs(_ id: ID) -> Bool
No adjacent doc comment
extension NWListener.State
enum SocketRecoveryPolicy
enum ListenerState: CaseIterable
No adjacent doc comment
enum Action: Equatable
No adjacent doc comment
static func action(state: ListenerState, wantsRunning: Bool, blocked: Bool, changingPort: Bool, retryScheduled: Bool) -> Action
static func delay(now: TimeInterval, lastAttempt: TimeInterval?, minimum: TimeInterval) -> TimeInterval
enum SocketSendQueuePolicy
enum Decision: Equatable
No adjacent doc comment
static func decision(pendingBytes: Int, pendingPayloads: Int, newBytes: Int) -> Decision
No adjacent doc comment
extension SocketServer
enum JSONValue: Codable, Sendable
init(from decoder: Decoder) throws
func encode(to encoder: Encoder) throws
extension SocketServer.JSONValue
No adjacent doc comment
struct DataPoint: Identifiable
No adjacent doc comment
final class VideoHealthModel: ObservableObject
No adjacent doc comment
private var dataPointCounter
private let maxHistory
No adjacent doc comment
private init()
No adjacent doc comment
func record(status: String, inputFPSAvg: Double, inputFPSMin: Double, inputFPSMax: Double, processedFPSAvg: Double, processedFPSMin: Double, processedFPSMax: Double, droppedFPSAvg: Double, latencyAvg: Double, latencyMax: Double, latencyP95: Double, timeoutDelta: Double, payload: SocketServer.VideoHealthPayload? = nil)
No adjacent doc comment
private func appendOnMain(status: String, inputFPSAvg: Double, inputFPSMin: Double, inputFPSMax: Double, processedFPSAvg: Double, processedFPSMin: Double, processedFPSMax: Double, droppedFPSAvg: Double, latencyAvg: Double, latencyMax: Double, latencyP95: Double, timeoutDelta: Double)
No adjacent doc comment
private func trim()
No adjacent doc comment
final class AudioHealthModel: ObservableObject
No adjacent doc comment
private var dataPointCounter
private let maxHistory
No adjacent doc comment
private init()
No adjacent doc comment
func record(status: String, appInputFPSMin: Double, appInputFPSAvg: Double, appInputFPSMax: Double, micInputFPSMin: Double, micInputFPSAvg: Double, micInputFPSMax: Double, appGapMaxMs: Double, alignDroppedPerSec: Double, alignInsertedPerSec: Double, alignFirePerSec: Double, alignDiffMaxSamples: Double, skipInsertedPerSec: Double, overflowDroppedPerSec: Double, resampleNoDataPerSec: Double, mixerOutputFPS: Double, appRMS: Double, micRMS: Double, outChannels: Int, outCh0RMS: Double, outCh1RMS: Double, payload: SocketServer.AudioHealthPayload? = nil)
No adjacent doc comment
private func appendOnMain(status: String, appInputFPSMin: Double, appInputFPSAvg: Double, appInputFPSMax: Double, micInputFPSMin: Double, micInputFPSAvg: Double, micInputFPSMax: Double, appGapMaxMs: Double, alignDroppedPerSec: Double, alignInsertedPerSec: Double, alignFirePerSec: Double, alignDiffMaxSamples: Double, skipInsertedPerSec: Double, overflowDroppedPerSec: Double, resampleNoDataPerSec: Double, mixerOutputFPS: Double, appRMS: Double, micRMS: Double, outChannels: Int, outCh0RMS: Double, outCh1RMS: Double)
No adjacent doc comment
private func trim()
No adjacent doc comment
struct DeviceInfo
No adjacent doc comment
private static func footprintUsage() -> UInt64
No adjacent doc comment
private static func residentUsage() -> UInt64
No adjacent doc comment
struct MemoryBreakdown
class SystemCPU
No adjacent doc comment
private var prevUser: UInt32
No adjacent doc comment
private var prevSystem: UInt32
No adjacent doc comment
private var prevIdle: UInt32
No adjacent doc comment
private var prevNice: UInt32
No adjacent doc comment
func usage() -> (user: Double, system: Double, idle: Double)?
No adjacent doc comment
final class SystemDiskIO
No adjacent doc comment
private var prevPageIns: natural_t
No adjacent doc comment
private var prevPageOuts: natural_t
No adjacent doc comment
private var firstSample
No adjacent doc comment
private var previousSampleTime: TimeInterval?
No adjacent doc comment
private let pageSizeKB: Double
No adjacent doc comment
func rates() -> (pageInKBps: Double, pageOutKBps: Double)
No adjacent doc comment
struct DeviceView: View
No adjacent doc comment
private let maxHistory
No adjacent doc comment
private var memAvailableText: String
No adjacent doc comment
private var screenCard: some View
private var outputSizeCard: some View
private var cpuCard: some View
private var memoryCard: some View
private var storageCard: some View
private var diskIOCard: some View
private var networkCard: some View
private var systemCard: some View
private var gpuCard: some View
private var metricReportsCard: some View
private var capturePipelineCard: some View
private var avLagCard: some View
private func seconds(_ value: Double?) -> String
No adjacent doc comment
private var videoPipelineCard: some View
private var audioPipelineCard: some View
private var liveActivityCard: some View
private func pipelineFreshness(_ updatedAt: Date?) -> some View
private var uptimeString: String
No adjacent doc comment
private func startSamplingIfNeeded()
private func stopSampling()
No adjacent doc comment
private func sample()
final class OverlaySettingsViewModel: ObservableObject
No adjacent doc comment
init()
No adjacent doc comment
func reset()
No adjacent doc comment
private func save()
No adjacent doc comment
struct OverlaySettingsView: View
No adjacent doc comment
private var previewPanel: some View
private var compactContent: some View
No adjacent doc comment
private var controls: some View
No adjacent doc comment
private struct OverlayPreview: View
No adjacent doc comment
private var previewText: String
No adjacent doc comment
private var previewItemSize: CGSize
No adjacent doc comment
private struct OverlayAnchorGrid: View
No adjacent doc comment
private let rows: [[OverlayAnchor]]
No adjacent doc comment
private func iconName(_ anchor: OverlayAnchor) -> String
No adjacent doc comment
private func swiftUIFontWeight(_ weight: OverlayFontWeight) -> Font.Weight
No adjacent doc comment
func uiFontWeight(_ weight: OverlayFontWeight) -> UIFont.Weight
No adjacent doc comment
enum PIPAdOverlayRenderer
struct Scene
No adjacent doc comment
static func draw(in cg: CGContext, size: CGSize, scene: Scene)
No adjacent doc comment
struct ChatMessage: Identifiable, Equatable
No adjacent doc comment
static func == (lhs: ChatMessage, rhs: ChatMessage) -> Bool
No adjacent doc comment
private var cache: NSCache<NSString, UIImage>
No adjacent doc comment
actor PiPImageCache
No adjacent doc comment
private static func makeUserAgent() -> String
No adjacent doc comment
private var inFlightTasks: [String: Task<UIImage?, Never>]
No adjacent doc comment
private var pendingCallbacks: [String: [(UIImage?) -> Void]]
No adjacent doc comment
private var currentDownloads
No adjacent doc comment
private var waitingQueue: [String]
No adjacent doc comment
private init()
No adjacent doc comment
func loadImage(urlString: String, completion: @escaping (UIImage?) -> Void) async
No adjacent doc comment
private func loadEmbedded( _ reference: ImageDataURIReference, completion: @escaping (UIImage?) -> Void ) async
private func completeEmbedded(key: String, image: UIImage?) async
No adjacent doc comment
private static func imageCost(_ image: UIImage) -> Int
No adjacent doc comment
private func startDownload(urlString: String, completions: [(UIImage?) -> Void])
No adjacent doc comment
private func performDownload( urlString: String, completions: [(UIImage?) -> Void] ) async
No adjacent doc comment
private func complete( urlString: String, completions: [(UIImage?) -> Void], image: UIImage? ) async
No adjacent doc comment
private func finishDownload(urlString: String)
No adjacent doc comment
private func startNextIfPossible()
No adjacent doc comment
func clear()
No adjacent doc comment
enum MessageType
No adjacent doc comment
final class MessageLayerTuple:Equatable
No adjacent doc comment
static func == (lhs: MessageLayerTuple, rhs: MessageLayerTuple) -> Bool
No adjacent doc comment
init( avatar: CALayer?, name: CATextLayer?, message: CATextLayer?, gift: CALayer?, type:MessageType = .primary, insertionIndex:Int = 0 )
No adjacent doc comment
struct MessageSegmentData
No adjacent doc comment
final class LayerPool
No adjacent doc comment
private var textLayers: [CATextLayer]
No adjacent doc comment
private var imageLayers: [CALayer]
No adjacent doc comment
private let scale
No adjacent doc comment
func getTextLayer() -> CATextLayer
No adjacent doc comment
func recycleTextLayer(_ layer: CATextLayer)
No adjacent doc comment
func getImageLayer() -> CALayer
No adjacent doc comment
func recycleImageLayer(_ layer: CALayer)
No adjacent doc comment
final class PIPServiceMessages
No adjacent doc comment
private var insertionCounter: Int
No adjacent doc comment
func updateLogSettings(verboseFrame: Bool? = nil, verboseLayout: Bool? = nil)
No adjacent doc comment
enum AnimationPhase
No adjacent doc comment
private var phase: AnimationPhase
No adjacent doc comment
private var animatingGroups: [[MessageLayerTuple]]
No adjacent doc comment
private var lastFadeTriggerTime: CFTimeInterval
No adjacent doc comment
private var lastMoveTriggerTime: CFTimeInterval
No adjacent doc comment
private var fadingParentID: UUID?
No adjacent doc comment
func groupLeader(_ msg: MessageLayerTuple) -> MessageLayerTuple?
No adjacent doc comment
private let chatEdgeMask
private var lastChatEdgeMaskKey: String?
private func updateChatEdgeMask()
private let layerPool
No adjacent doc comment
private var bottomMessage: MessageLayerTuple?
No adjacent doc comment
private var animatingMessages: [MessageLayerTuple]
No adjacent doc comment
func setAdOverlayOffset(_ offset: CGFloat)
No adjacent doc comment
private var lastDirtyTime: CFTimeInterval
No adjacent doc comment
private var needsRelayoutAfterRemoval
No adjacent doc comment
private var fadeCandidate: MessageLayerTuple?
No adjacent doc comment
private var safeCanncel: Bool
No adjacent doc comment
func canncel()
No adjacent doc comment
private var hasLaidOutOnce
No adjacent doc comment
init(size: CGSize,scrollSpeed:CGFloat = 0.2)
No adjacent doc comment
private func collectMovingMessages()
No adjacent doc comment
func fixMoving()
No adjacent doc comment
private func relayoutTargetsOnly(updateTargetY: Bool = true,changeSY:Bool=true) -> [MessageLayerTuple]
No adjacent doc comment
func breakMessageIntoLines(_ text: String, font: UIFont, maxWidth: CGFloat) -> ([String],[CTLine])
No adjacent doc comment
private func calculateGiftOffset(lines: [CTLine], messageSize: CGSize, giftSize: CGFloat) -> (CGFloat, CGFloat)
No adjacent doc comment
private func splitLongMessage( type:MessageType, user: String, message: String, imgURL: String?, avatarImage: UIImage? = nil, giftURL: String?, emojiURLs: [String] = [], emojiPositions: [Int] = [], font: UIFont, avatarSizeLocal: CGFloat, giftSizeLocal: CGFloat, vSpacing:CGFloat = 4.0, hSpacing:CGFloat = 4.0 ) -> [MessageSegmentData]
No adjacent doc comment
func buildMessageTuple( type:MessageType = .primary, user: String = "", message: String = "", img: UIImage?, giftImg: UIImage?, showAvatar: Bool, showName: Bool, showMessage:Bool = true, showGift:Bool = false, font: UIFont, avatarSizeLocal: CGFloat, giftSizeLocal: CGFloat, verticalSpacing:CGFloat = 4, horizontalSpacing:CGFloat = 4, data: MessageSegmentData ) -> MessageLayerTuple
No adjacent doc comment
static func extractAllImageURLs( from message: String, maxURLs: Int = 20, placeholder: String = "\u
func addMessage( user: String, message: String, imgURL: String? = nil, avatarImage: UIImage? = nil, giftURL: String? = nil, isMain: Bool = true, fontSizeOverride: CGFloat? = nil, animates: Bool = true )
No adjacent doc comment
func snapshotMessage(user: String, message: String, isMain: Bool, fontSize: CGFloat, avatarImage: UIImage? = nil)
func refreshTopMargin()
func applyTextColors()
private func snapToTargets()
No adjacent doc comment
func currentBottomTargetY() -> CGFloat
No adjacent doc comment
private func segmentHeight(_ data: MessageSegmentData) -> CGFloat
No adjacent doc comment
private var visibleInsertLimit: CGFloat
No adjacent doc comment
private func currentVisibleBottom() -> CGFloat
No adjacent doc comment
private func contiguousPendingGroupEnd(parentID: UUID) -> Int
No adjacent doc comment
private func fittingPrefixCount(upTo groupEnd: Int, currentBottom: CGFloat) -> (count: Int, bottom: CGFloat)
No adjacent doc comment
func populateVisibleMessagesIfNeeded()
No adjacent doc comment
func IshasOverFlow() -> Bool
No adjacent doc comment
func layoutTargetsAndStartAnimation()
No adjacent doc comment
func isHasFade(_ parentID: UUID?) -> Bool
No adjacent doc comment
func isGroupMoving(_ parentID:UUID?) -> Bool
No adjacent doc comment
private func rebuildAnimatingGroups()
No adjacent doc comment
func animateMoveIfNeeded()
No adjacent doc comment
private func onMoveFinished()
No adjacent doc comment
private func findFadeCandidate() -> MessageLayerTuple?
No adjacent doc comment
private func prepareFade()
No adjacent doc comment
private func stepFade()
No adjacent doc comment
func removeMessage(_ msg:MessageLayerTuple)
No adjacent doc comment
func clearAllMessages()
No adjacent doc comment
private func stopAnimation()
No adjacent doc comment
func waitFade()
No adjacent doc comment
func reloadPending()
No adjacent doc comment
private func startFadeAnimation(for msg: MessageLayerTuple)
No adjacent doc comment
func tickAnimation() -> Bool
No adjacent doc comment
private func layout(msg: MessageLayerTuple, y: CGFloat,x:CGFloat? = nil)
No adjacent doc comment
private func easeOutCubic(_ t: Double) -> Double
No adjacent doc comment
func PIPChatLog(_ message:String)
No adjacent doc comment
struct DebugImageViewWrapper: UIViewRepresentable
No adjacent doc comment
func makeUIView(context: Context) -> UIView
No adjacent doc comment
func updateUIView(_ uiView: UIView, context: Context)
No adjacent doc comment
struct PIPDebugView: View
private func submit(_ text: String, avatar: UIImage? = nil)
private var preview: UIImage
enum PIPSystemControls
static func styleValue(hidesAll: Bool) -> Int
static func apply(to controller: AVPictureInPictureController?)
enum PIPDisplaySettings
static func validatedClock(_ value: Double) -> Double
struct PIPDisplaySettingsSection: View
private func apply()
struct PIPLayoutSettingsView: View
No adjacent doc comment
private var previewPanel: some View
private var preview: some View
No adjacent doc comment
private func limitedOverride(_ value: String) -> String
No adjacent doc comment
private func effectiveLabel(_ value: String, localizedKey: String) -> String
No adjacent doc comment
private enum PIPLayoutPreviewMode: String, CaseIterable, Identifiable
No adjacent doc comment
private struct PIPLayoutPreview: View
No adjacent doc comment
private func previewFrame(mode: PIPLayoutPreviewMode) -> UIImage
private func systemControlBadge(systemName: String, scale: CGFloat) -> some View
struct PIPTextItem
No adjacent doc comment
struct PIPImageItem
No adjacent doc comment
struct PIPRenderData
No adjacent doc comment
final class PIPMetalRenderer
No adjacent doc comment
private var textTextureCache: [String: (texture: MTLTexture, w: Int, h: Int)]
No adjacent doc comment
private init?()
No adjacent doc comment
func clearTextCache()
No adjacent doc comment
func render(pixelBuffer: CVPixelBuffer, renderData: PIPRenderData)
No adjacent doc comment
private func descriptor(texture: MTLTexture, clear: Bool) -> MTLRenderPassDescriptor
No adjacent doc comment
private func textTexture(_ string: String, font: UIFont, color: UIColor, scale: CGFloat) -> (texture: MTLTexture, w: Int, h: Int)?
No adjacent doc comment
private func drawText(encoder: MTLRenderCommandEncoder, text: String, font: UIFont, color: UIColor, x: CGFloat, y: CGFloat, pixelW: Int, pixelH: Int, alpha: CGFloat)
No adjacent doc comment
private func drawImage(encoder: MTLRenderCommandEncoder, image: UIImage?, frame: CGRect, pixelW: Int, pixelH: Int, alpha: CGFloat, cornerRadius: CGFloat)
No adjacent doc comment
private func quadVerts(x: CGFloat, y: CGFloat, w: CGFloat, h: CGFloat, pw: CGFloat, ph: CGFloat, alpha: CGFloat) -> [Float]
No adjacent doc comment
private func drawQuad(encoder: MTLRenderCommandEncoder, verts: [Float], texture: MTLTexture)
No adjacent doc comment
private extension UIColor
No adjacent doc comment
enum PIPNoticePagination
static func pages(_ text: String, canvasWidth: CGFloat, showAvatar: Bool) -> [String]
static func textWidth(canvasWidth: CGFloat, showAvatar: Bool, pageCount: Int) -> CGFloat
func measured(_ value: String) -> CGFloat
No adjacent doc comment
func split(_ width: CGFloat) -> [String]
No adjacent doc comment
enum PIPOverlayLayout
static func statusRowY(compact: Bool) -> CGFloat
static func nowTimeY(compact: Bool) -> CGFloat
No adjacent doc comment
static func noticeY(compact: Bool) -> CGFloat
No adjacent doc comment
static func minimumChatTopMargin(compact: Bool) -> CGFloat
static func statusRowAvailableWidth(canvasWidth: CGFloat) -> CGFloat
static func chatTopMargin(canvasHeight: CGFloat, compact: Bool) -> CGFloat
No adjacent doc comment
static func chatTopMargin(canvasHeight: CGFloat) -> CGFloat
No adjacent doc comment
static func statusRowPlan(availableWidth: CGFloat, iconWidth: CGFloat, elapsedWidth: CGFloat, statusWidth: CGFloat, viewerWidth: CGFloat) -> StatusRowPlan
func width(drawIcon: Bool, drawViewer: Bool) -> CGFloat
No adjacent doc comment
struct StatusRowPlan: Equatable
enum PIPPreviewFrameRenderer
struct Scene
No adjacent doc comment
static func render(size: CGSize = CGSize(width: 300, height: 200), scene: Scene) -> UIImage
No adjacent doc comment
enum PIPRenderPolicy
static func keepaliveSeconds(_ value: Double) -> Double
static func interval(for fps: Double) -> TimeInterval
static func targetFPS(keepalive: Bool, overlay: Bool, animating: Bool, pendingMessages: Bool, recentlyActive: Bool, keepaliveInterval: Double = defaultKeepaliveSeconds) -> Double
struct PIPRenderGeneration
private(set) var value: UInt64
mutating func invalidate() -> UInt64
func accepts(_ token: UInt64) -> Bool
final class DummyPlaybackDelegate: NSObject, AVPictureInPictureSampleBufferPlaybackDelegate
No adjacent doc comment
func pictureInPictureControllerIsPlaybackPaused(_ pictureInPictureController: AVPictureInPictureController) -> Bool
No adjacent doc comment
func pictureInPictureController(_ pictureInPictureController: AVPictureInPictureController, skipByInterval skipInterval: CMTime, completion completionHandler: @escaping () -> Void)
No adjacent doc comment
func pictureInPictureController(_ pictureInPictureController: AVPictureInPictureController, didTransitionToRenderSize newRenderSize: CMVideoDimensions)
No adjacent doc comment
func pictureInPictureController(_ pictureInPictureController: AVPictureInPictureController, setPlaying playing: Bool)
No adjacent doc comment
func pictureInPictureControllerTimeRangeForPlayback(_ pictureInPictureController: AVPictureInPictureController) -> CMTimeRange
No adjacent doc comment
final class PIPService: NSObject, ObservableObject, @unchecked Sendable
No adjacent doc comment
private var isInBackground
No adjacent doc comment
private override init()
No adjacent doc comment
private var needsRedraw
No adjacent doc comment
private var lastPeriodicRedraw: CFTimeInterval
No adjacent doc comment
private var periodicRedrawInterval: CFTimeInterval
No adjacent doc comment
private var pixelBufferPool: CVPixelBufferPool?
No adjacent doc comment
private let pixelBufferPoolSize
No adjacent doc comment
private var cachedFormatDescription: CMVideoFormatDescription?
No adjacent doc comment
private var cachedFormatSize: CGSize
No adjacent doc comment
private let rgbColorSpace
No adjacent doc comment
private var cachedTimeString: String?
No adjacent doc comment
private var cachedElapsedString: String?
No adjacent doc comment
private var lastOverlayStreamEnded: Bool
No adjacent doc comment
private var lastOverlayStreamEndMes: String
No adjacent doc comment
private var lastOverlayViewerCount: Int?
No adjacent doc comment
private var lastOverlayIsReconnecting: Bool
No adjacent doc comment
private var adOverlayUser: String?
No adjacent doc comment
private var adOverlayText: String?
No adjacent doc comment
private var adOverlayCleanText: String?
No adjacent doc comment
private var adOverlayPages: [(text: String, range: NSRange)]
No adjacent doc comment
private var adOverlayPageIndex: Int
No adjacent doc comment
private var adOverlayIconURL: String?
No adjacent doc comment
private var adOverlayIconImage: UIImage?
No adjacent doc comment
private var adOverlayEmojiURLs: [String]
No adjacent doc comment
private var adOverlayEmojiPositions: [Int]
No adjacent doc comment
private var adOverlayEmojiPositionMap: [Int: Int]
No adjacent doc comment
private var adOverlayEmojiImages: [UIImage?]
No adjacent doc comment
private var adOverlayStartTime: CFTimeInterval
No adjacent doc comment
private var adOverlayActive
No adjacent doc comment
private var adOverlayLogSkipCounter: Int
No adjacent doc comment
private var adOverlayPageDuration: CFTimeInterval
No adjacent doc comment
private func setupPixelBufferPool(size: CGSize)
No adjacent doc comment
func renderIfNeeded() -> CVPixelBuffer?
No adjacent doc comment
private var messagesLayer: PIPServiceMessages?
No adjacent doc comment
private func createSampleBuffer(from pixelBuffer: CVPixelBuffer, overridePTS: CMTime? = nil ) -> CMSampleBuffer?
No adjacent doc comment
private let pipStartThreshold: Int64
No adjacent doc comment
private var renderCancelled
No adjacent doc comment
private var renderGeneration
No adjacent doc comment
private var pipSession
No adjacent doc comment
private var scheduledRender: DispatchWorkItem?
No adjacent doc comment
private var scheduledRenderDeadline: CFTimeInterval?
No adjacent doc comment
private var renderStatsStarted
No adjacent doc comment
private var performanceSession
private var renderWorkSeconds
No adjacent doc comment
private var maxRenderMilliseconds
No adjacent doc comment
private var maxScheduleDelayMilliseconds
No adjacent doc comment
private var backpressureSkips
No adjacent doc comment
private var renderFailures
No adjacent doc comment
private var reusedFrames
No adjacent doc comment
private var renderAttempts
No adjacent doc comment
private var drawnFrames
No adjacent doc comment
private var statsInitialFrameCount: Int64
No adjacent doc comment
private(set) var isKeepaliveMode
No adjacent doc comment
private var animationFPS: Double
No adjacent doc comment
private var activeFPS: Double
No adjacent doc comment
private let idleFPS
No adjacent doc comment
private var keepaliveFPS: Double
No adjacent doc comment
private var configuredKeepaliveSeconds: Double
private var currentFPS: Double
No adjacent doc comment
private var lastDrawnKeepaliveTime: String?
No adjacent doc comment
private var lastRenderTime
No adjacent doc comment
private var lastActiveRenderTime
No adjacent doc comment
private let decayCooldown: CFTimeInterval
No adjacent doc comment
private var cachedPixelBuffer: CVPixelBuffer?
No adjacent doc comment
private var contentGeneration
No adjacent doc comment
private var lastRenderedGeneration
No adjacent doc comment
func requestAnimationFPS()
No adjacent doc comment
func markOverlayDirty()
No adjacent doc comment
func decayFPSIfNeeded()
func fadeTime(_ time:Double)
No adjacent doc comment
func scrollTime(_ time:Double)
No adjacent doc comment
private var displayLayer: AVSampleBufferDisplayLayer?
No adjacent doc comment
private var pipController: AVPictureInPictureController?
No adjacent doc comment
private var basePTS: CFTimeInterval?
No adjacent doc comment
private let dummyDelegate
No adjacent doc comment
private var frameCount: Int64
No adjacent doc comment
func setupAudioSession()
No adjacent doc comment
func setNeedsRedraw()
No adjacent doc comment
func forceRender()
No adjacent doc comment
func addMessage( user: String = "測試", msg: String, imgURL: String? = nil, avatarImage: UIImage? = nil, giftURL: String? = nil, isMain: Bool = true )
No adjacent doc comment
func addAdOverlay(user: String, text: String, iconURL: String?, useTTS: Bool)
No adjacent doc comment
func clearAdOverlay()
No adjacent doc comment
private static func splitAdText(_ text: String, font: UIFont, width: CGFloat, height: CGFloat) -> [String]
No adjacent doc comment
private var clockTextKey
private var clockText
No adjacent doc comment
private var secondaryNoticePages: [String]
No adjacent doc comment
private var secondaryNoticeFullText
No adjacent doc comment
private var secondaryNoticePageStart: CFTimeInterval
No adjacent doc comment
private var secondaryNoticeDeadline: CFTimeInterval
No adjacent doc comment
private let secondaryNoticePageDuration: CFTimeInterval
No adjacent doc comment
private var secondaryNoticeAvatar: UIImage?
No adjacent doc comment
private var secondaryNoticeAvatarURL: String?
No adjacent doc comment
private var secondaryNoticeUsesAvatar
No adjacent doc comment
private var secondaryNoticeToken
No adjacent doc comment
private var chatImage: CGImage?
No adjacent doc comment
private var chatImageGeneration
No adjacent doc comment
private var chatImageSize
No adjacent doc comment
func applyOverlayLayoutChange()
func applyTextColorSettings()
func applyNoticeDisplaySettings()
private func clearSecondaryNotice()
No adjacent doc comment
private func startSecondaryNotice(text: String, avatarImage: UIImage?, avatarURL: String?)
No adjacent doc comment
private func loadSecondaryNoticeAvatarIfNeeded()
private func repaginateSecondaryNotice()
No adjacent doc comment
func applySystemControlsStyle()
func applyDisplaySettings()
func currentTimeString() -> String
private func drawTimeOverlay(in cg: CGContext, size: CGSize)
No adjacent doc comment
private func drawAdOverlay(in cg: CGContext, size: CGSize)
No adjacent doc comment
private func renderUIViewToPixelBuffer(size: CGSize) -> CVPixelBuffer?
No adjacent doc comment
func startPiP( size: CGSize = CGSize(width: 300, height: 200) )
No adjacent doc comment
func startKeepalivePiP(size: CGSize = CGSize(width: 300, height: 200))
No adjacent doc comment
private func attachToForegroundWindow(completion: @escaping () -> Void)
No adjacent doc comment
func reAttachDisplayLayerIfNeeded()
No adjacent doc comment
private func safeTryStartPiP()
No adjacent doc comment
private func startRenderTimer()
private func scheduleNextRender(after delay: TimeInterval? = nil)
private func rescheduleRenderTimer(fps: Double)
private func cancelRenderTimer()
func cleanupMessageslayer()
No adjacent doc comment
func stopPiP()
No adjacent doc comment
private func reportPerformance(reason: String)
private func renderIncremental() -> Bool
No adjacent doc comment
func appDidEnterBackground()
No adjacent doc comment
func appWillEnterForeground()
No adjacent doc comment
func releaseNonCriticalMemory()
No adjacent doc comment
func ensureDisplayLayerAttached()
No adjacent doc comment
func PIPLogTo(_ message:String)
No adjacent doc comment
func logTo(_ message:String)
No adjacent doc comment
extension PIPService: AVPictureInPictureControllerDelegate
No adjacent doc comment
internal func pictureInPictureControllerDidStartPictureInPicture( _ pictureInPictureController: AVPictureInPictureController )
No adjacent doc comment
internal func pictureInPictureControllerDidStopPictureInPicture( _ pictureInPictureController: AVPictureInPictureController )
No adjacent doc comment
func pictureInPictureController(_ pictureInPictureController: AVPictureInPictureController, failedToStartPictureInPictureWithError error: Error)
No adjacent doc comment
final class PIPTestService: NSObject, ObservableObject
private override init()
No adjacent doc comment
private var displayLayer: AVSampleBufferDisplayLayer?
No adjacent doc comment
private var pipController: AVPictureInPictureController?
No adjacent doc comment
private var renderTimer: DispatchSourceTimer?
No adjacent doc comment
private var frameCount: Int64
No adjacent doc comment
private var startRequested
private var session
No adjacent doc comment
private let pipStartThreshold: Int64
No adjacent doc comment
private var frameSize: CGSize
No adjacent doc comment
private let playbackDelegate
No adjacent doc comment
func setupAudioSession()
No adjacent doc comment
func startPiPTest(size: CGSize = CGSize(width: 300, height: 200))
No adjacent doc comment
private func startRenderTimer()
No adjacent doc comment
func stopPiP()
No adjacent doc comment
private func renderWhiteFrame()
No adjacent doc comment
extension PIPTestService: AVPictureInPictureControllerDelegate
No adjacent doc comment
internal func pictureInPictureControllerDidStartPictureInPicture( _ pictureInPictureController: AVPictureInPictureController )
No adjacent doc comment
internal func pictureInPictureControllerDidStopPictureInPicture( _ pictureInPictureController: AVPictureInPictureController )
No adjacent doc comment
func pictureInPictureController(_ pictureInPictureController: AVPictureInPictureController, failedToStartPictureInPictureWithError error: Error)
No adjacent doc comment
enum PIPTimeOverlayRenderer
struct Scene
static func draw(in cg: CGContext, size: CGSize, scene: Scene)
No adjacent doc comment
private static func badgeWidth(text: String, font: UIFont, icon: UIImage?) -> CGFloat
private static func drawBadge( in cg: CGContext, text: String, font: UIFont, origin: CGPoint, textColor: UIColor, bgColor: UIColor, icon: UIImage? = nil, iconTintColor: UIColor? = nil, padding: UIEdgeInsets = UIEdgeInsets(top: 2, left: 8, bottom: 2, right: 8) ) -> CGFloat
No adjacent doc comment
struct PIPView: View
struct PIPKeepaliveSettingsSection: View
final class GPUSettingsViewModel: ObservableObject
No adjacent doc comment
func applyRotate(_ rotate: RotateDirection)
No adjacent doc comment
func publishRuntimeConfig(legacyEvents: [String])
func applyConfig(id: UUID)
No adjacent doc comment
func rebuildDefaultsIfMissing()
No adjacent doc comment
init()
No adjacent doc comment
struct GPURotateView: View
No adjacent doc comment
private var captureBackend
No adjacent doc comment
private var usesScreenCaptureKit: Bool
No adjacent doc comment
private var presetCard: some View
No adjacent doc comment
private var canvasCard: some View
No adjacent doc comment
private var rotationCard: some View
No adjacent doc comment
private func sizeRow( title: LocalizedStringKey, caption: LocalizedStringKey, width: Binding<Int>, height: Binding<Int>, onWidthChange: @escaping () -> Void, onHeightChange: @escaping () -> Void ) -> some View
private func sizeField( _ title: LocalizedStringKey, value: Binding<Int>, onChange: @escaping () -> Void ) -> some View
No adjacent doc comment
private func persistConfiguration()
No adjacent doc comment
private func persistOutputWidth()
No adjacent doc comment
private func persistOutputHeight()
No adjacent doc comment
private func persistProcessingWidth()
No adjacent doc comment
private func persistProcessingHeight()
No adjacent doc comment
private func updateConfig(_ update: (GPUOutputConfig) -> Void)
No adjacent doc comment
struct AudioSettingsView:View
No adjacent doc comment
struct PIPSettingsView: View
No adjacent doc comment
struct LogSettingView:View
No adjacent doc comment
private func publishDebugConfig(legacyEvent: String)
enum PortState
No adjacent doc comment
final class AppMessagePort
No adjacent doc comment
private var localPort: CFMessagePort?
No adjacent doc comment
private var remotePort: CFMessagePort?
No adjacent doc comment
private(set) var state: PortState
No adjacent doc comment
private init()
No adjacent doc comment
func logTo( _ mes:String)
No adjacent doc comment
func teardown()
No adjacent doc comment
func setupReceiver()
No adjacent doc comment
func connectToExtension()
No adjacent doc comment
func disconnectFromExt()
No adjacent doc comment
func send(toExtension dict: [String: Any])
No adjacent doc comment
final class LocalNetworkPermissionManager: ObservableObject
No adjacent doc comment
private var browser: NWBrowser?
No adjacent doc comment
func requestPermission(completion: @escaping (Bool) -> Void)
No adjacent doc comment
struct AdvancedSettingsView: View
No adjacent doc comment
struct AppIconDiagnostics
init(info: [String: Any], isPad: Bool, supported: Bool, current: String?, buildInfo: BuildInformation = .current)
No adjacent doc comment
func names(_ key: String) -> [String]
No adjacent doc comment
func files(_ key: String) -> [String]
No adjacent doc comment
func iconName(_ key: String) -> String?
No adjacent doc comment
struct AppIconSettingsView: View
private func refreshDiagnostics(updateSelection: Bool = true)
private func iconButton(name: String?, title: String) -> some View
private func changeIcon(to name: String?)
private func scheduleSelectionRefresh()
struct AppSettingsView: View
No adjacent doc comment
private func row(_ key: String, _ symbol: String) -> some View
struct SettingsBackupDocument
func encoded() throws -> Data
static func decode(_ data: Data) throws -> Self
enum SettingsBackupError: LocalizedError
enum SettingsBackupRegistry
enum Rule
No adjacent doc comment
func add(_ keys: String, _ rule: Rule)
No adjacent doc comment
static func capture(shared defaults: UserDefaults, standard local: UserDefaults, includesSecrets: Bool) throws -> SettingsBackupDocument
static func validate(_ document: SettingsBackupDocument) throws
private static func validateComplex(key: String, value: Any) throws
private static func validateCanvas(_ config: GPUOutputConfig) throws
static func apply(_ document: SettingsBackupDocument, shared defaults: UserDefaults, standard local: UserDefaults) throws
func values(_ source: UserDefaults, _ rules: [String: Rule], _ secrets: Set<String>) throws -> [String: Any]
No adjacent doc comment
func converted(_ values: [String: Any], _ rules: [String: Rule]) throws -> [String: Any]
No adjacent doc comment
final class SettingsBackupManager: ObservableObject
private var observers: [NSObjectProtocol]
No adjacent doc comment
private var scheduled: Task<Void, Never>?
No adjacent doc comment
private var lastContent: Data?
No adjacent doc comment
private var needsSave
func start()
private func schedule()
func saveAutomatic()
func export(includesSecrets: Bool) throws -> URL
func stageRestore(_ document: SettingsBackupDocument) throws
func refresh()
func cancelRestore() throws
func report(_ error: Error)
No adjacent doc comment
enum SettingsBackupStorage
static func save(_ document: SettingsBackupDocument, name: String = "settings-latest.json", directory: URL = SettingsBackupStorage.directory) throws -> URL
static func read(_ url: URL) throws -> SettingsBackupDocument
private static func readData(_ url: URL) throws -> Data
static func restorePending(shared: UserDefaults, standard: UserDefaults)
struct SettingsBackupView: View
private func read(_ url: URL)
private struct SettingsBackupPicker: UIViewControllerRepresentable
func makeCoordinator() -> Coordinator
No adjacent doc comment
func makeUIViewController(context: Context) -> UIDocumentPickerViewController
No adjacent doc comment
func updateUIViewController(_ controller: UIDocumentPickerViewController, context: Context)
No adjacent doc comment
final class Coordinator: NSObject, UIDocumentPickerDelegate
No adjacent doc comment
init(completion: @escaping (URL?) -> Void)
No adjacent doc comment
func documentPicker(_ controller: UIDocumentPickerViewController, didPickDocumentsAt urls: [URL])
No adjacent doc comment
func documentPickerWasCancelled(_ controller: UIDocumentPickerViewController)
No adjacent doc comment
struct ChatSettingsView: View
No adjacent doc comment
enum RotateDirection: Int, Codable, CaseIterable, Identifiable, CustomStringConvertible
class GPUOutputConfig: Identifiable, ObservableObject, Codable
init( id: UUID = UUID(), name: String, width: Int, height: Int, owidth:Int = 0, oheight:Int = 0, originonly:Bool = false, Rotate: RotateDirection = .landscapeRight )
No adjacent doc comment
enum CodingKeys: CodingKey
No adjacent doc comment
required init(from decoder: Decoder) throws
No adjacent doc comment
func encode(to encoder: Encoder) throws
No adjacent doc comment
static private let userDefaultsKey
No adjacent doc comment
static private let userDefaultsSelectKey
No adjacent doc comment
static func save(_ configs: [GPUOutputConfig])
No adjacent doc comment
static func load(defaults: [GPUOutputConfig]? = nil) -> [GPUOutputConfig]
No adjacent doc comment
static func saveSelected(_ config: GPUOutputConfig?)
No adjacent doc comment
static func loadSelected() -> GPUOutputConfig?
No adjacent doc comment
static func resetAll()
No adjacent doc comment
struct GeneralSettingsView: View
No adjacent doc comment
struct LegacyEncodingSettingsView: View
private var isLowLatencyRateControlEnabled
No adjacent doc comment
private var captureBackend
No adjacent doc comment
private let bitRateOptions
No adjacent doc comment
private var usesScreenCaptureKit: Bool
No adjacent doc comment
init()
No adjacent doc comment
struct LegacyPIPSettingsView: View
No adjacent doc comment
enum LiveActivitySettings
static func validatedInterval(_ value: Int) -> Int
struct LiveActivitySettingsView: View
struct LogSettingsView: View
No adjacent doc comment
private func testConnection(to urlString: String)
struct MaintenanceSettingsView: View
No adjacent doc comment
enum OverlayAnchor: String, Codable, CaseIterable, Identifiable, Hashable
No adjacent doc comment
func origin(container: CGSize, item: CGSize, marginX: CGFloat, marginY: CGFloat, offsetX: CGFloat, offsetY: CGFloat) -> CGPoint
No adjacent doc comment
enum OverlayFontWeight: String, Codable, CaseIterable, Identifiable, Hashable
No adjacent doc comment
enum TimeOverlayFormat: String, Codable, CaseIterable, Identifiable, Hashable
No adjacent doc comment
struct TimeOverlayConfig: Codable, Identifiable, Equatable
No adjacent doc comment
struct OverlaySceneConfig: Codable, Equatable
No adjacent doc comment
enum OverlayConfigStore
No adjacent doc comment
static func load(defaults: UserDefaults? = userDefaults) -> OverlaySceneConfig
No adjacent doc comment
static func save(_ config: OverlaySceneConfig, defaults: UserDefaults? = userDefaults)
No adjacent doc comment
class SocketServer:ObservableObject, @unchecked Sendable
private var receiveBuffers: [ObjectIdentifier: Data]
No adjacent doc comment
private var receiveOffsets: [ObjectIdentifier: Int]
private var listener: NWListener?
No adjacent doc comment
private var pendingListener: NWListener?
private func publishListenerState(_ status: String, port: UInt16? = nil)
private func listenerErrorMessage(_ error: Error, port: UInt16) -> String
private func configureListener(_ target: NWListener, port: UInt16)
func applyPort(_ port: UInt16)
private func finishPortAttempt(_ message: String)
private var externalDroppedCount
private var externalLogSessions
No adjacent doc comment
private let externalCountLock
No adjacent doc comment
private var externalCount
No adjacent doc comment
private func updateExternalLogCount()
private var connections: [ObjectIdentifier: NWConnection]
No adjacent doc comment
private var lastReceiveTimes: [ObjectIdentifier: Date]
No adjacent doc comment
private var keepaliveTimer: DispatchSourceTimer?
No adjacent doc comment
private let queue
No adjacent doc comment
private let queueKey
No adjacent doc comment
func performOnQueue(_ block: @escaping () -> Void)
private var currentRestartKey: UUID?
private var wantsRunning
private var recoveryBlocked
private var requestedPort: UInt16
private var lastListenerAttempt: TimeInterval?
private var lifecycleGeneration
private var lastRecoveryHintTime
private var recoveryNotificationToken: Int32?
private var recoveryState: SocketRecoveryPolicy.ListenerState
private func requestRecovery(reason: String, minimumDelay: TimeInterval = 0)
private func scheduleRestart(delay: TimeInterval = 1.5)
init()
enum IdleReason
func start(port: UInt16 = SocketPortSettings.port)
private func createListener()
func logTo(_ mes:String,title:String? = nil)
func ensureRunning()
private func connectionLogContext(_ connection: NWConnection) -> String
private func handleNewConnection(_ connection: NWConnection)
private func startReceiveLoop(for connection: NWConnection)
func debugRTMP()
private var lastMessageTime: Date
private let messageThrottleInterval: TimeInterval
struct TypePayload: Codable
struct StreamEnded: Codable
struct BatchRequest: Codable
struct OverlayConfigPayload: Codable
No adjacent doc comment
struct AdOverlay: Codable
struct ChatMessage: Codable
init(from decoder: Decoder) throws
struct SLogMessage:Codable
struct LogBatchPayload: Codable
struct UPSet:Codable
struct AudioLive:Codable
struct VideoHealthPayload: Codable, Sendable
struct AudioHealthPayload: Codable, Sendable
struct AudiencePayload: Codable
enum CodingKeys: String, CodingKey
init(from decoder: Decoder) throws
func renderChatMessage( user: String, msg: String, img: String?, giftImg: String?, isMain:Bool = true )
private func updateAudienceInfo( userNum: Int?, userList: [String]? )
func StreamStarting()
No adjacent doc comment
func StreamStatusChanged(isLive: Bool, message: String? = nil, activityEndReason: String? = nil)
private func normalizedPIPStatusMessage(isLive: Bool, message: String?) -> String
No adjacent doc comment
func GetRTMPConfig() -> [String: Any]
No adjacent doc comment
func GetLogConfig() -> [String: Any]
No adjacent doc comment
func GetOverlayConfig() -> [String: Any]
No adjacent doc comment
func pushOverlayConfig()
No adjacent doc comment
private func dictionary<T: Encodable>(from payload: T) -> [String: Any]?
No adjacent doc comment
private func handleReceivedData(_ data: Data, from connection: NWConnection)
private func handleDecodedPayload(data: Data, type: String, connection: NWConnection)
private var sendQueues: [ObjectIdentifier: [Data]]
No adjacent doc comment
private var sendingFlags: [ObjectIdentifier: Bool]
No adjacent doc comment
private func encodedData<T: Encodable>(_ payload: T) -> Data?
func queueSend(payload: some Encodable)
func queueSend(dictionary: [String: Any])
private func enqueue(_ data: Data, to conn: NWConnection)
private func enqueueLocked(_ data: Data, to conn: NWConnection)
private func sendNextPayload(for conn: NWConnection)
func broadcast(type:String = "settings",key: String, value: Any,to connection: NWConnection? = nil)
No adjacent doc comment
func broadcastExternalLogs(_ entries: [[String: String]])
func broadcastDiagnostic(_ payload: [String: Any])
private func broadcast(_ dictionary: [String: Any], excluding origin: NWConnection?)
private func sendTo(_ connection: NWConnection, payload: some Encodable)
No adjacent doc comment
private func sendTo(_ connection: NWConnection, dictionary: [String: Any])
No adjacent doc comment
private func startKeepaliveTimer()
No adjacent doc comment
private func stopKeepaliveTimer()
No adjacent doc comment
private let staleConnectionTimeout: TimeInterval
No adjacent doc comment
func sendKeepalive()
No adjacent doc comment
func broadcastPushState(key: String, value: Bool)
No adjacent doc comment
private func removeConnection(_ connection: NWConnection)
No adjacent doc comment
func stop()
func suspend()
func resume()
func prepareForBroadcast()
func prepareForBroadcastAndWaitReady(timeout: TimeInterval = 3.0) async -> Bool
private func clearStaleBroadcastConnections()
private func waitForReady( deadline: DispatchTime, generation: UUID, continuation: CheckedContinuation<Bool, Never> )
private func stopInternal()
private func safeJSONValue(_ value: Any) -> Any
private func resetReconnectState()
func fixlogSafeKey(_ str:String) -> String
No adjacent doc comment
private struct LocalIPv4Address: Identifiable
No adjacent doc comment
static func current() -> [LocalIPv4Address]
No adjacent doc comment
struct SocketConnectionSettingsView: View
No adjacent doc comment
private var validPort: UInt16?
No adjacent doc comment
private func refreshAddresses()
No adjacent doc comment
private func copy(_ value: String)
No adjacent doc comment
enum SocketPortSettings
No adjacent doc comment
static func save(_ port: UInt16)
No adjacent doc comment
enum SpeechNoisePolicy: String, Codable, CaseIterable, Identifiable, Sendable
No adjacent doc comment
struct SpeechBlockRule: Codable, Equatable
No adjacent doc comment
init(word: String, enabled: Bool = true)
No adjacent doc comment
init(from decoder: Decoder) throws
No adjacent doc comment
struct SpeechReplacement: Codable, Equatable
No adjacent doc comment
init(word: String, replacement: String, enabled: Bool = true)
No adjacent doc comment
init(from decoder: Decoder) throws
No adjacent doc comment
enum SpeechFilterImportError: LocalizedError
No adjacent doc comment
struct SpeechFilterConfiguration: Codable, Equatable
init(blockKeywords: [String], replaceKeywords: [SpeechReplacement], removeURLs: Bool? = nil, removeEmoji: Bool? = nil, removePureNumbers: Bool? = nil, removeNonWordNoise: Bool? = nil, noisePolicy: SpeechNoisePolicy? = nil)
No adjacent doc comment
private enum CodingKeys: String, CodingKey
No adjacent doc comment
func encode(to encoder: Encoder) throws
No adjacent doc comment
init(from decoder: Decoder) throws
No adjacent doc comment
func validated() throws -> Self
No adjacent doc comment
static func decode(_ data: Data) throws -> Self
No adjacent doc comment
func encoded() throws -> Data
No adjacent doc comment
func conflicts(with incoming: Self) -> [String]
No adjacent doc comment
func blockConflicts(with incoming: Self) -> [String]
No adjacent doc comment
func merging(_ incoming: Self, useIncomingConflicts: Bool) throws -> Self
No adjacent doc comment
func write(to directory: URL, backup: Bool = false) throws -> URL
No adjacent doc comment
final class StreamActivityManager: ObservableObject
No adjacent doc comment
private var currentActivity: Activity<StreamActivityAttributes>?
No adjacent doc comment
private var generation
private var streamStartedAt: Date?
No adjacent doc comment
private var updateTask: Task<Void, Never>?
No adjacent doc comment
private var dismissTask: Task<Void, Never>?
No adjacent doc comment
func startStreamActivity(streamTitle: String = "直播中")
No adjacent doc comment
func updateStreamActivity(_ state: StreamActivityAttributes.ContentState)
No adjacent doc comment
func endStreamActivity(reason: String = "活動結束(未提供原因)")
private func cleanupStaleActivities() async
No adjacent doc comment
private func checkActivityKitEntitlement()
No adjacent doc comment
private func logWidgetDiagnostics()
No adjacent doc comment
func applySettings()
func refreshStatus()
private func snapshot() -> StreamActivityAttributes.ContentState
private func startPeriodicUpdates()
private func observeDismiss(for activity: Activity<StreamActivityAttributes>)
No adjacent doc comment
private func logLifecycle(_ message: String)
No adjacent doc comment
private func describeContent(_ c: StreamActivityAttributes.ContentState) -> String
No adjacent doc comment
func record(_ snapshot: StreamDiagnosticsSnapshot, now: Date = Date())
No adjacent doc comment
struct MixerRatePoint: Identifiable
init(snapshot: StreamDiagnosticsSnapshot, previous: StreamDiagnosticsSnapshot?, elapsed: Double)
No adjacent doc comment
struct MixerPipelineCard: View
private func audioConverterSection( _ tracks: [StreamDiagnosticsSnapshot.AudioTrackDiagnostics] ) -> some View
private func rate(_ value: Double?, unit: String) -> String
struct StreamDiagnosticsSections: View
private func diagnosticsSummary(_ value: StreamDiagnosticsSnapshot) -> some View
private func formatSection(_ value: StreamDiagnosticsSnapshot) -> some View
No adjacent doc comment
private func encoderInputSection(_ value: StreamDiagnosticsSnapshot) -> some View
private func milliseconds(_ seconds: Double) -> String
No adjacent doc comment
private func encoderSection(_ value: StreamDiagnosticsSnapshot) -> some View
No adjacent doc comment
private func transportSection(_ value: StreamDiagnosticsSnapshot) -> some View
No adjacent doc comment
private func timingSection(_ value: StreamDiagnosticsSnapshot) -> some View
No adjacent doc comment
private var footnote: some View
No adjacent doc comment
private func group<Content: View>(_ title: String, @ViewBuilder content: () -> Content) -> some View
private func summaryMetric(_ label: String, _ value: String) -> some View
No adjacent doc comment
private func summaryLabel(_ value: StreamDiagnosticsSnapshot) -> some View
No adjacent doc comment
private func healthColor(_ health: String) -> Color
No adjacent doc comment
private func mediaTimingSection(_ title: String, _ value: RTMPMediaTimingDiagnostics?, sampledAt: Date) -> some View
private func timingSample(_ title: String, _ sample: RTMPMediaTimingSample?) -> some View
private func timingSeconds(_ value: Double?) -> String
private func encoderTiming(_ value: VideoEncoderTimingSample?) -> String?
private func seconds(_ value: Double?) -> String
private func bytes(_ value: Int?) -> String?
private func megabytes(_ value: Int?) -> String?
No adjacent doc comment
private func encodedVideo(_ snapshot: StreamDiagnosticsSnapshot) -> String
private func encodedAudio(_ snapshot: StreamDiagnosticsSnapshot) -> String
private func observedTime(_ time: Date?) -> String?
private func detail(_ label: String, _ value: String?) -> some View
struct CapturePipelineStatusView: View
class OrientationObserver
No adjacent doc comment
private init()
No adjacent doc comment
func setUserDefault<T>(_ value: T, forKey key: String)
func getUserDefault<T>(forKey key: String) -> T?
extension UIColor
convenience init?(hex: String)
No adjacent doc comment
extension Color
No adjacent doc comment
init?(hex: String)
No adjacent doc comment
struct ImportedVideo: Transferable
enum PhotoVideoImport
static func load(_ item: PhotosPickerItem) async throws -> URL
No adjacent doc comment
enum VideoWorkFiles
static func makeURL(kind: String, extension ext: String) throws -> URL
static func discard(_ url: URL) -> Bool
static func abandoned() throws -> [URL]
static func bytes(at url: URL) throws -> Int64
enum TTSQueueOverflowAction: Int
enum TTSDefaults
final class TTSService: NSObject, AVSpeechSynthesizerDelegate
No adjacent doc comment
private let synthesizer
No adjacent doc comment
private let callAudioKeeper
No adjacent doc comment
private var audioSessionObservers: [NSObjectProtocol]
No adjacent doc comment
private var pendingUtteranceCount
No adjacent doc comment
private var filter
No adjacent doc comment
func updateDefault()
No adjacent doc comment
func updateState(isON:Bool? = nil,min_Len:Int? = nil,MainOnly:Bool? = nil)
No adjacent doc comment
private override init()
No adjacent doc comment
func speakStreamMessage( user: String, message: String, isMain:Bool = true, force:Bool = false )
No adjacent doc comment
func speakPreview()
No adjacent doc comment
func stop()
No adjacent doc comment
func refreshAudioSessionForCurrentSetting()
No adjacent doc comment
func stopPersistentAudio()
No adjacent doc comment
private func speak(_ text: String, keepsCallAudioAlive: Bool = true)
No adjacent doc comment
nonisolated func speechSynthesizer(_ synthesizer: AVSpeechSynthesizer, didFinish utterance: AVSpeechUtterance)
No adjacent doc comment
nonisolated func speechSynthesizer(_ synthesizer: AVSpeechSynthesizer, didCancel utterance: AVSpeechUtterance)
No adjacent doc comment
private func handleAudioSessionInterruption(_ notification: Notification)
No adjacent doc comment
private func handleMediaServicesReset(_ notification: Notification)
No adjacent doc comment
private final class TTSCallAudioKeeper
No adjacent doc comment
private var isActive
No adjacent doc comment
private var isConfigured
No adjacent doc comment
func configureSessionOnly()
No adjacent doc comment
func start()
No adjacent doc comment
func stop()
No adjacent doc comment
func forceReconfigure()
No adjacent doc comment
private func configurePlaybackSession() throws
No adjacent doc comment
class SpeechFilterManager: ObservableObject
No adjacent doc comment
private var loading
No adjacent doc comment
func apply(_ config: SpeechFilterConfiguration) throws
No adjacent doc comment
func importConfiguration(_ incoming: SpeechFilterConfiguration, replace: Bool, useIncomingConflicts: Bool, directory: URL) throws -> URL
private let defaultsKey
No adjacent doc comment
private let defaults: UserDefaults
No adjacent doc comment
init(defaults: UserDefaults = .standard)
No adjacent doc comment
func processMessage(_ message: String) -> String
static func strippingNoiseTokens(_ text: String) -> String
No adjacent doc comment
private static func isNoiseToken(_ token: String) -> Bool
No adjacent doc comment
static func isNonWordNoise(_ text: String) -> Bool
private func saveToUserDefaults()
private func loadFromUserDefaults()
private struct SpeechFilterDocumentPicker: UIViewControllerRepresentable
func makeCoordinator() -> Coordinator
No adjacent doc comment
func makeUIViewController(context: Context) -> UIDocumentPickerViewController
No adjacent doc comment
func updateUIViewController(_ controller: UIDocumentPickerViewController, context: Context)
No adjacent doc comment
final class Coordinator: NSObject, UIDocumentPickerDelegate
No adjacent doc comment
init(completion: @escaping (Result<[URL], Error>) -> Void)
No adjacent doc comment
func documentPicker(_ controller: UIDocumentPickerViewController, didPickDocumentsAt urls: [URL])
No adjacent doc comment
func documentPickerWasCancelled(_ controller: UIDocumentPickerViewController)
No adjacent doc comment
private var documentsDirectory: URL
No adjacent doc comment
private var importPreview: some View
No adjacent doc comment
private func applyImport(_ incoming: SpeechFilterConfiguration, replace: Bool)
No adjacent doc comment
nonisolated private static func readConfiguration(from url: URL) throws -> SpeechFilterConfiguration
private func handleImport(_ result: Result<[URL], Error>)
No adjacent doc comment
private var inputSection: some View
No adjacent doc comment
private var listSection: some View
No adjacent doc comment
struct TTSVoiceOption: Identifiable
No adjacent doc comment
struct VoiceListView: View
No adjacent doc comment
private let groupedVoices
No adjacent doc comment
struct TTSSettingsView: View
private var groupedVoiceOptions: [(key: String, value: [TTSVoiceOption])]
No adjacent doc comment
private func saveMiddleNameDraft()
No adjacent doc comment
private func scheduleMiddleNameSave(_ value: String)
No adjacent doc comment
private func saveVoiceControlDrafts()
No adjacent doc comment
struct VideoAnalysisResult: Identifiable
No adjacent doc comment
struct TrackInfo: Identifiable
No adjacent doc comment
struct BitrateSample: Identifiable
No adjacent doc comment
actor VideoBitrateAnalyzer
No adjacent doc comment
static func analyze(url: URL) async -> VideoAnalysisResult?
No adjacent doc comment
private static func extractBitrateSamples(asset: AVAsset, duration: TimeInterval) async -> [VideoAnalysisResult.BitrateSample]
No adjacent doc comment
private static func codecString(from fourCC: FourCharCode) -> String
No adjacent doc comment
struct VideoBitrateView: View
No adjacent doc comment
private var content: some View
No adjacent doc comment
private var placeholderView: some View
No adjacent doc comment
private var loadingView: some View
No adjacent doc comment
private func resultView(_ result: VideoAnalysisResult) -> some View
No adjacent doc comment
private func fileInfoSection(_ result: VideoAnalysisResult) -> some View
No adjacent doc comment
private func bitrateChartSection(_ result: VideoAnalysisResult) -> some View
No adjacent doc comment
private func bitrateTimelineChart(_ result: VideoAnalysisResult) -> some View
No adjacent doc comment
private func videoTracksSection(_ result: VideoAnalysisResult) -> some View
No adjacent doc comment
private func audioTracksSection(_ result: VideoAnalysisResult) -> some View
No adjacent doc comment
private func infoRow(label: String, value: String, highlight: Bool = false) -> some View
No adjacent doc comment
private func resolutionString(_ size: CGSize?) -> String
No adjacent doc comment
private func bitrateString(_ bitrate: Double) -> String
No adjacent doc comment
private func cleanupTempFiles(keeping keepURL: URL? = nil)
No adjacent doc comment
private func startAnalysis(url: URL)
No adjacent doc comment
extension Notification.Name
No adjacent doc comment
struct LogItem: Identifiable, Hashable
No adjacent doc comment
init(message: String)
No adjacent doc comment
final class LogBuffer
No adjacent doc comment
private let queue
No adjacent doc comment
private var buffer: [String]
No adjacent doc comment
private var flushWorkItem: DispatchWorkItem?
No adjacent doc comment
private let flushDelay: TimeInterval
No adjacent doc comment
private let batchLimit
No adjacent doc comment
private let maxBufferSize
No adjacent doc comment
private let maxBufferBytes
No adjacent doc comment
private var bufferBytes
No adjacent doc comment
func push(_ msg: String)
No adjacent doc comment
func push(_ messages: [String])
No adjacent doc comment
private func trimIfNeededLocked()
No adjacent doc comment
private func scheduleFlushLocked()
No adjacent doc comment
private func flushLocked()
No adjacent doc comment
func clear()
No adjacent doc comment
struct Stats: Sendable
No adjacent doc comment
func trimForMemoryPressure(maxBytes: Int = 512 * 1024)
final class AppLogPersister: @unchecked Sendable
private let queue
No adjacent doc comment
private let historyReader
No adjacent doc comment
func historyPage(start: Int? = nil, generation: Int? = nil) async throws -> LogFilePage
No adjacent doc comment
func diagnosticSnapshot() async throws -> URL
private let logFileName
No adjacent doc comment
private let maxLogFileLines
No adjacent doc comment
private let trimMargin
No adjacent doc comment
private var pendingLines: [String]
No adjacent doc comment
private let batchThreshold
No adjacent doc comment
private let flushDelay: TimeInterval
No adjacent doc comment
private var flushWorkItem: DispatchWorkItem?
No adjacent doc comment
private var writeHandle: FileHandle?
No adjacent doc comment
private var estimatedLineCount
No adjacent doc comment
private var estimatedFileBytes
No adjacent doc comment
private let maxFileBytes
No adjacent doc comment
private let maxPendingBytes
No adjacent doc comment
private var lastFlushSucceeded
No adjacent doc comment
private var retryCount
No adjacent doc comment
private var retryScheduled
No adjacent doc comment
private var closeAfterFlush
No adjacent doc comment
private var idleCloseItem: DispatchWorkItem?
No adjacent doc comment
private var idleCloseGeneration
No adjacent doc comment
private var flushGeneration
No adjacent doc comment
private var logURL: URL
No adjacent doc comment
init()
No adjacent doc comment
private func calibrateLineCount()
func append(line: String)
No adjacent doc comment
func append(lines: [String])
No adjacent doc comment
func flushNow()
func setBackground(_ background: Bool) async
private func cancelScheduledFlush()
private func scheduleFlushIfNeeded()
No adjacent doc comment
private func scheduleFlush(after delay: TimeInterval)
No adjacent doc comment
private func flushPending()
No adjacent doc comment
private func scheduleIdleClose()
private func closeWriter(synchronize: Bool = false)
func copyFromAppGroup()
private func importSealedExtensionLogs() throws
func clear()
No adjacent doc comment
private let statisticsLock
No adjacent doc comment
private var writtenBytes: UInt64
No adjacent doc comment
private var ioFailureCount
No adjacent doc comment
private var ioLastError: String?
No adjacent doc comment
private var ioFailureFlushItem: DispatchWorkItem?
No adjacent doc comment
private let ioFailureFlushDelay: TimeInterval
No adjacent doc comment
private func recordIOFailure(context: String, lastError: String)
No adjacent doc comment
private func flushIOFailures()
No adjacent doc comment
private var lastWriteCanRetry
No adjacent doc comment
private func openWriteHandle() -> FileHandle?
No adjacent doc comment
private func truncateFile()
private func trimNow()
final class LogModel: ObservableObject
No adjacent doc comment
private let refreshInterval: TimeInterval
private let batchLimit
private let maxMessages
private let maxMessageBytes
No adjacent doc comment
private var messageBytes
No adjacent doc comment
struct Stats: Sendable
No adjacent doc comment
init()
No adjacent doc comment
func clearLogs()
No adjacent doc comment
func trimForMemoryPressure(maxBytes: Int = 512 * 1024)
private func trimLocked()
No adjacent doc comment
final class LogReceiver
No adjacent doc comment
private let maxPush
No adjacent doc comment
private let groupID
No adjacent doc comment
private let logFileName
No adjacent doc comment
private let bufferQueue
No adjacent doc comment
private var lastReadOffset: UInt64
No adjacent doc comment
private var buffer: [String]
No adjacent doc comment
private let flushDebounce: TimeInterval
No adjacent doc comment
private var flushWorkItem: DispatchWorkItem?
No adjacent doc comment
init()
No adjacent doc comment
private func readNewLines()
No adjacent doc comment
private func flushBuffer()
No adjacent doc comment
final class RemoteLogBuffer
No adjacent doc comment
private let queue
No adjacent doc comment
private var buffer: [ExternalLogEntry<[String: String]>]
No adjacent doc comment
private let maxBufferSize
func push(title: String, message: String)
No adjacent doc comment
func clear()
func drain(max: Int, transport: String) -> [[String: String]]
final class RemoteLogSender
No adjacent doc comment
private var timer: DispatchSourceTimer?
No adjacent doc comment
private let timerQueue
No adjacent doc comment
private let session
No adjacent doc comment
private let flushInterval: TimeInterval
No adjacent doc comment
private let batchLimit
No adjacent doc comment
private var started
No adjacent doc comment
func stop()
No adjacent doc comment
func start()
No adjacent doc comment
private func flush()
No adjacent doc comment
private func sendBatch(_ logs: [[String: String]])
No adjacent doc comment
func remotelog(title:String="liveApp",message:String)
No adjacent doc comment
struct StaticFormatter
No adjacent doc comment
func formatTime() -> String
No adjacent doc comment
func sendlog(title:String = "liveApp",message: String)
No adjacent doc comment
func receiveSocketLog(title: String = "UseESocket", message: String)
No adjacent doc comment
func showLogOnScreen(_ message: String)
No adjacent doc comment
func postSystemNotification(title: String, body: String, imageURL: String? = nil, inlineImages: [String] = [])
No adjacent doc comment
private func deliverNotification(content: UNMutableNotificationContent)
No adjacent doc comment
struct liveAPPApp: App
enum OrientationCategory
No adjacent doc comment
init()
No adjacent doc comment
private func logAppEnvironment(_ event: String)
class NotificationDelegate: NSObject, UNUserNotificationCenterDelegate
No adjacent doc comment
func userNotificationCenter(_ center: UNUserNotificationCenter, willPresent notification: UNNotification, withCompletionHandler completionHandler: @escaping (UNNotificationPresentationOptions) -> Void)
No adjacent doc comment
extension UIDeviceOrientation
No adjacent doc comment
func matches(_ interfaceOrientation: UIInterfaceOrientation) -> Bool
No adjacent doc comment
final class SharedResources
No adjacent doc comment
private(set) var logReceiver: LogReceiver?
No adjacent doc comment
private let groupID
No adjacent doc comment
private init()
No adjacent doc comment
func setupLogReceiver()
No adjacent doc comment
func releaseLogReceiver()
No adjacent doc comment
final class LPConfig
private init()
private static func localizedOverride(key: String, localizedKey: String) -> String
struct AVLagDiagnosticsTests
No adjacent doc comment
struct AppIconDiagnosticsTests
No adjacent doc comment
struct AudioMeterTests
No adjacent doc comment
struct AudioMixerRoutingTests
No adjacent doc comment
struct AudioTimelineObservationTests
No adjacent doc comment
struct AudioVolumeSliderTests
No adjacent doc comment
struct BuildInformationTests
No adjacent doc comment
struct CaptureCallbackDiagnosticsTests
No adjacent doc comment
struct CaptureErrorDiagnosticsTests
No adjacent doc comment
enum Failure: Error
No adjacent doc comment
private final class CaptureTestClock: @unchecked Sendable
No adjacent doc comment
private let lock
No adjacent doc comment
private var value: Double
No adjacent doc comment
func now() -> Double
No adjacent doc comment
func advance(_ seconds: Double)
No adjacent doc comment
struct CaptureSessionTests
No adjacent doc comment
struct CaptureStreamGeometryTests
No adjacent doc comment
struct CaptureStreamTelemetryTests
No adjacent doc comment
struct CapturePipelineStatusTests
struct DiagnosticAgeTests
No adjacent doc comment
struct DiagnosticCounterRateTests
struct ExternalLogPolicyTests
No adjacent doc comment
struct H264EncodingProfileTests
struct HexColorTests
No adjacent doc comment
struct HomeConfigurationTests
No adjacent doc comment
struct IdleMemoryComparisonTests
struct ImageDataURITests
No adjacent doc comment
private func pngDataURI() throws -> String
No adjacent doc comment
struct LiveActivitySettingsTests
func invalidIntervalUsesFiveMinutes(value: Int)
No adjacent doc comment
func supportedIntervalIsPreserved(value: Int)
No adjacent doc comment
struct LogArchiveStoreTests
struct LogDiagnosticExportTests
struct LogFileReaderTests
No adjacent doc comment
struct LogPresentationTests
No adjacent doc comment
struct LogRetentionTests
struct MetricReportAnalysisTests
struct PIPDisplaySettingsTests
func invalidClockUsesOneSecond(value: Double)
No adjacent doc comment
func supportedClockIsPreserved(value: Double)
No adjacent doc comment
struct PIPNoticePaginationTests
No adjacent doc comment
private let longText
No adjacent doc comment
struct PIPOverlayLayoutTests
No adjacent doc comment
struct PIPRenderPolicyTests
No adjacent doc comment
extension PIPRenderPolicyTests
struct ProcessingInFlightTrackerTests
No adjacent doc comment
struct RTMPPresetStoreTests
No adjacent doc comment
private func makeStore() -> (RTMPPresetStore, UserDefaults, String)
No adjacent doc comment
struct RecordingCompressionTests
struct RecordingDrainTests
struct RecordingGroupTests
private func temporaryDirectory() -> URL
No adjacent doc comment
struct RecordingOrientationTests
No adjacent doc comment
struct RecordingSizeTests
struct RecordingStorageMigrationTests
func movesWithoutOverwriting(existing: Bool) throws
No adjacent doc comment
struct RuntimeDebugConfigTests
No adjacent doc comment
struct ScreenStreamVideoRotatorTests
No adjacent doc comment
private func audibleStart(asset: AVAsset, track: AVAssetTrack) throws -> (firstPTS: Double?, audiblePTS: Double?)
private func videoSample(seconds: Double) throws -> CMSampleBuffer
func pcmSlicesPreserveChannelsAndTiming(interleaved: Bool) throws
private func audioSample(seconds: Double, interleaved: Bool = false) throws -> CMSampleBuffer
struct SettingsBackupTests
func preservesExistingPIPControlRange(value: Double) throws
No adjacent doc comment
struct SocketRecoveryPolicyTests
No adjacent doc comment
struct SocketSendQueuePolicyTests
No adjacent doc comment
struct SocketValueTests
No adjacent doc comment
struct SpeechFilterConfigurationTests
No adjacent doc comment
private func decode(_ json: String) throws -> SpeechFilterConfiguration
No adjacent doc comment
private func rejects(_ json: String) -> Bool
No adjacent doc comment
struct StreamDiagnosticsTests
No adjacent doc comment
struct StreamMessageTests
No adjacent doc comment
private func decode(_ extra: String) throws -> SocketServer.ChatMessage
No adjacent doc comment
struct VideoCompressionExportTests
func unsupportedIOSMatrixIsRejected(value: String)
func separateOutputKeepsSourceBytes(systemQuality: Bool) async throws
private final class CompressionFixtureBundle: NSObject
struct VideoInputBufferSettingsTests
No adjacent doc comment
struct VideoProcessingDiagnosticsTests
No adjacent doc comment
struct VideoStreamPoliciesTests
No adjacent doc comment
struct liveAPPTests
No adjacent doc comment
final class liveAPPUITests: XCTestCase
No adjacent doc comment
override func setUpWithError() throws
No adjacent doc comment
override func tearDownWithError() throws
No adjacent doc comment
func testExample() throws
No adjacent doc comment
func testLaunchPerformance() throws
No adjacent doc comment
final class liveAPPUITestsLaunchTests: XCTestCase
No adjacent doc comment
override class var runsForEachTargetApplicationUIConfiguration: Bool
No adjacent doc comment
override func setUpWithError() throws
No adjacent doc comment
func testLaunch() throws
No adjacent doc comment
struct LiveActivityWidgetBundle: WidgetBundle
No adjacent doc comment
struct StreamActivityWidget: Widget
No adjacent doc comment
def create_connection()
No adjacent doc comment
def reader()
No adjacent doc comment
def send(m, rid)
No adjacent doc comment