[package]
name        = "mediaframe"
version     = "0.1.8"
edition     = "2024"
license     = "MIT OR Apache-2.0"
repository  = "https://github.com/Findit-AI/mediaframe"
homepage    = "https://github.com/Findit-AI/mediaframe"
documentation = "https://docs.rs/mediaframe"
description = "A common media-stream descriptor vocabulary (pixel-format, colour, and frame metadata for video — audio/subtitle to follow) for media processing pipelines."
keywords    = ["media", "video", "pixel-format", "color"]
categories  = ["multimedia", "multimedia::video", "no-std", "no-std::no-alloc"]
rust-version = "1.95.0"

[features]
default = ["std"]
alloc   = ["dep:smol_str", "dep:icu_locale_core", "icu_locale_core/alloc", "dep:bytes", "derive_more/unwrap", "derive_more/try_unwrap"]
std     = ["alloc", "thiserror/default", "smol_str?/std", "bytes?/std"]
buffa   = ["dep:buffa", "mediatime/buffa", "alloc"]
serde   = ["dep:serde", "smol_str?/serde", "bytes?/serde"]
arbitrary  = ["std", "dep:arbitrary"]
quickcheck = ["std", "dep:quickcheck", "dep:quickcheck-richderive"]

frame = [
  "yuv-planar", "yuv-semi-planar", "yuva", "yuv-packed", "yuv-444-packed",
  "y2xx", "v210", "rgb", "rgb-float", "rgb-legacy", "gbr", "gray",
  "bayer", "xyz", "mono",
]

yuv-planar      = ["derive_more/try_unwrap", "derive_more/unwrap"]
yuv-semi-planar = ["derive_more/try_unwrap", "derive_more/unwrap"]
yuva            = ["derive_more/try_unwrap", "derive_more/unwrap"]
yuv-packed      = ["derive_more/try_unwrap", "derive_more/unwrap"]
yuv-444-packed  = ["derive_more/try_unwrap", "derive_more/unwrap"]
y2xx            = ["derive_more/try_unwrap", "derive_more/unwrap"]
v210            = ["derive_more/try_unwrap", "derive_more/unwrap"]
rgb             = ["derive_more/try_unwrap", "derive_more/unwrap"]
rgb-float       = ["derive_more/try_unwrap", "derive_more/unwrap", "dep:half"]
rgb-legacy      = ["derive_more/try_unwrap", "derive_more/unwrap"]
gbr             = ["derive_more/try_unwrap", "derive_more/unwrap", "dep:half"]
gray            = ["derive_more/try_unwrap", "derive_more/unwrap", "dep:half"]
bayer           = ["derive_more/try_unwrap", "derive_more/unwrap"]
xyz             = ["derive_more/try_unwrap", "derive_more/unwrap"]
mono            = ["derive_more/try_unwrap", "derive_more/unwrap"]

[dependencies]
bitflags    = { version = "2", default-features = false }
derive_more = { version = "2", default-features = false, features = ["display", "is_variant"] }
mediatime   = { version = "0.1", default-features = false }
thiserror   = { version = "2", default-features = false }
half        = { version = "2", default-features = false, optional = true }
icu_locale_core = { version = "2", default-features = false, optional = true }
bytes       = { version = "1", default-features = false, optional = true }
buffa       = { version = "0.8", default-features = false, optional = true }
smol_str    = { version = "0.3", default-features = false, optional = true }

serde       = { version = "1", default-features = false, optional = true, features = ["derive"] }

arbitrary   = { version = "1", default-features = false, optional = true }
quickcheck            = { version = "1", optional = true }
quickcheck-richderive = { version = "0.3", optional = true }

[dev-dependencies]
serde_json  = "1"
postcard    = { version = "1", default-features = false, features = ["alloc"] }

[profile.bench]
opt-level         = 3
debug             = false
codegen-units     = 1
lto               = 'thin'
incremental       = false
debug-assertions  = false
overflow-checks   = false
rpath             = false

[package.metadata.docs.rs]
all-features = true
rustdoc-args = ["--cfg", "docsrs"]

[lints]
workspace = true
