[package]
name = "iroh-live"
version = "0.1.0"
edition = "2024"
description = "audio and video live streaming over iroh"
authors = ["Franz Heinzmann <frando@n0.computer>"]
repository = "https://github.com/n0-computer/iroh-live"
license = "MIT OR Apache-2.0"

[dependencies]
anyhow = "1.0.100"
bytemuck = "1.24.0"
byte-unit = { version = "5.1", features = ["bit"] }
data-encoding = "2.9.0"
derive_more = { version = "2.0.1", features = ["display", "debug", "eq"] }
ffmpeg-next = { version = "8.0.0", default-features = false, features = ["device", "format", "filter", "software-resampling", "software-scaling"] }
ffmpeg-sys-next = { version = "8.0.1", optional = true }
firewheel = { version = "0.9.1", features = ["cpal", "peak_meter_node", "std", "stream_nodes", "cpal_resample_inputs"] }
hang = "0.9.0"
image = { version = "0.25.8", default-features = false }
iroh = "0.95.1"
iroh-gossip = "0.95.0"
iroh-moq = { path = "../iroh-moq" }
iroh-tickets = "0.2.0"
moq-lite = "0.10.1"
moq-media = { version = "0.1.0", path = "../moq-media" }
n0-error = { version = "0.1.2", features = ["anyhow"] }
n0-future = "0.3.1"
n0-watcher = "0.6.0"
nokhwa = { version = "0.10", features = [
    "input-native",
    "input-v4l",
    "output-threaded",
] }
postcard = "1.1.3"
rand = "0.9.2"
serde = { version = "1.0.228", features = ["derive"] }
strum = { version = "0.27", features = ["derive"] }
tokio = { version = "1.48.0", features = ["sync"] }
tokio-util = "0.7.17"
tracing = "0.1.41"
xcap = "0.8"
webrtc-audio-processing = { version = "0.5.0", features = ["bundled"] }
bytes = "1.11.0"
iroh-smol-kv = { git = "https://github.com/Frando/iroh-smol-kv", branch = "iroh-095", version = "0.3.1", default-features = false }
buf-list = "1.1.2"


[dev-dependencies]
clap = { version = "4.5", features = ["derive"] }
eframe = "0.33.0"
postcard = "1.1.3"
tokio = { version = "1.48.0", features = ["full"] }
tracing-subscriber = "0.3.20"

[features]
default = []

# Enable static build of ffmpeg
static = [
  "ffmpeg-next/static",
  "ffmpeg-next/build-lib-openssl",
  "ffmpeg-next/build-license-version3",
  "ffmpeg-next/build-lib-opus",
  "ffmpeg-next/build-lib-x264",
  "ffmpeg-next/build-license-gpl",
  "dep:ffmpeg-sys-next",
]

[target.'cfg(target_os = "macos")'.dependencies]
ffmpeg-sys-next = { version = "8.0.1", optional = true, features = [
  "build-videotoolbox",
  "build-audiotoolbox",
] }

[target.'cfg(target_os = "linux")'.dependencies]
ffmpeg-sys-next = { version = "8.0.1", optional = true, features = [
  "build-vaapi",
  # "build-vulkan",
  # "build-lib-libmfx",
] }

[target.'cfg(target_os = "windows")'.dependencies]
ffmpeg-sys-next = { version = "8.0.1", optional = true, features = [
  "build-lib-d3d11va",
  "build-lib-dxva2",
  # "build-nvidia",
  # "build-amf",
] }

[target.'cfg(target_os = "android")'.dependencies]
ffmpeg-sys-next = { version = "8.0.1", optional = true, features = [
  # "build-mediacodec",
] }
