Files
MatchLiveTv/native/ios/MatchLiveTv/Streaming/BroadcastModels.swift
T
eminuxandCursor 7b3256c8a0 Alleggerisce il relay YouTube e rilascia Android 2.0.8.
ffmpeg fa solo remux copy A/V; le app fissano AAC 48 kHz mono; sync deploy non cancella più garage.prod.toml.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-05 19:25:40 +02:00

32 lines
862 B
Swift

import Foundation
/// Profilo RTMP allineato a MediaMTX slate + YoutubeRelay (copy A/V).
/// Audio: AAC 48 kHz mono 128 kbps.
struct BroadcastConfig: Sendable {
let rtmpUrl: String
var width: Int = 1280
var height: Int = 720
var videoBitrate: Int = 2_500_000
var audioBitrate: Int = 128_000
var fps: Int = 30
var rotation: Int = 0
var portrait: Bool = false
var maxReconnectAttempts: Int = 10
var reconnectDelayMs: Int = 5_000
static let audioSampleRateHz: Float64 = 48_000
static let audioChannels: UInt32 = 1
}
enum BroadcastPhase: String, Sendable {
case idle, preview, connecting, live, paused, reconnecting, error
}
struct BroadcastMetrics: Sendable {
var phase: BroadcastPhase = .idle
var bitrateKbps: Int = 0
var fps: Int = 0
var connected: Bool = false
var lastError: String?
}