# THIS FILE IS AUTOMATICALLY GENERATED BY CARGO
#
# When uploading crates to the registry Cargo will automatically
# "normalize" Cargo.toml files for maximal compatibility
# with all versions of Cargo and also rewrite `path` dependencies
# to registry (e.g., crates.io) dependencies.
#
# If you are reading this file be aware that the original Cargo.toml
# will likely look very different (and much more reasonable).
# See Cargo.toml.orig for the original contents.

[package]
edition = "2024"
rust-version = "1.93.0"
name = "ff-decode"
version = "0.14.2"
build = false
autolib = false
autobins = false
autoexamples = false
autotests = false
autobenches = false
description = "Video and audio decoding - the Rust way"
readme = "README.md"
keywords = [
    "video",
    "audio",
    "ffmpeg",
    "media",
    "decode",
]
categories = [
    "multimedia::video",
    "multimedia::audio",
]
license = "MIT OR Apache-2.0"
repository = "https://github.com/itsakeyfut/avio"
resolver = "2"

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

[features]
default = ["hwaccel"]
hwaccel = []
srt = []
tokio = [
    "dep:tokio",
    "dep:futures",
]

[lib]
name = "ff_decode"
path = "src/lib.rs"

[[example]]
name = "check_hw_accel"
path = "examples/check_hw_accel.rs"

[[test]]
name = "analysis_tests"
path = "tests/analysis_tests.rs"

[[test]]
name = "async_audio_decoder_tests"
path = "tests/async_audio_decoder_tests.rs"

[[test]]
name = "async_video_decoder_tests"
path = "tests/async_video_decoder_tests.rs"

[[test]]
name = "audio_decoder_tests"
path = "tests/audio_decoder_tests.rs"

[[test]]
name = "black_frame_detector_tests"
path = "tests/black_frame_detector_tests.rs"

[[test]]
name = "dash_stream_tests"
path = "tests/dash_stream_tests.rs"

[[test]]
name = "exr_sequence_tests"
path = "tests/exr_sequence_tests.rs"

[[test]]
name = "extract_frame_tests"
path = "tests/extract_frame_tests.rs"

[[test]]
name = "frame_extractor_tests"
path = "tests/frame_extractor_tests.rs"

[[test]]
name = "hardware_accel_tests"
path = "tests/hardware_accel_tests.rs"

[[test]]
name = "histogram_extractor_tests"
path = "tests/histogram_extractor_tests.rs"

[[test]]
name = "hls_stream_tests"
path = "tests/hls_stream_tests.rs"

[[test]]
name = "image_decoder_tests"
path = "tests/image_decoder_tests.rs"

[[test]]
name = "image_sequence_tests"
path = "tests/image_sequence_tests.rs"

[[test]]
name = "iterator_tests"
path = "tests/iterator_tests.rs"

[[test]]
name = "keyframe_enumerator_tests"
path = "tests/keyframe_enumerator_tests.rs"

[[test]]
name = "memory_usage_tests"
path = "tests/memory_usage_tests.rs"

[[test]]
name = "network_tests"
path = "tests/network_tests.rs"

[[test]]
name = "output_scale_tests"
path = "tests/output_scale_tests.rs"

[[test]]
name = "performance_validation_tests"
path = "tests/performance_validation_tests.rs"

[[test]]
name = "reconnect_tests"
path = "tests/reconnect_tests.rs"

[[test]]
name = "scene_detector_tests"
path = "tests/scene_detector_tests.rs"

[[test]]
name = "scope_analyzer_tests"
path = "tests/scope_analyzer_tests.rs"

[[test]]
name = "silence_detector_tests"
path = "tests/silence_detector_tests.rs"

[[test]]
name = "srt_stream_tests"
path = "tests/srt_stream_tests.rs"

[[test]]
name = "thumbnail_selector_tests"
path = "tests/thumbnail_selector_tests.rs"

[[test]]
name = "thumbnail_tests"
path = "tests/thumbnail_tests.rs"

[[test]]
name = "udp_stream_tests"
path = "tests/udp_stream_tests.rs"

[[test]]
name = "video_decoder_tests"
path = "tests/video_decoder_tests.rs"

[[test]]
name = "video_format_tests"
path = "tests/video_format_tests.rs"

[[test]]
name = "video_range_tests"
path = "tests/video_range_tests.rs"

[[test]]
name = "video_seeking_tests"
path = "tests/video_seeking_tests.rs"

[[test]]
name = "waveform_analyzer_tests"
path = "tests/waveform_analyzer_tests.rs"

[[bench]]
name = "decode_bench"
path = "benches/decode_bench.rs"
harness = false

[dependencies.ff-common]
version = "0.14.2"

[dependencies.ff-format]
version = "0.14.2"

[dependencies.ff-sys]
version = "0.14.2"

[dependencies.futures]
version = "0.3.32"
optional = true

[dependencies.log]
version = "0.4.29"

[dependencies.thiserror]
version = "2.0.17"

[dependencies.tokio]
version = "1.50.0"
features = ["rt"]
optional = true

[dev-dependencies.criterion]
version = "0.8.1"

[dev-dependencies.ff-format]
version = "0.14.2"

[dev-dependencies.tokio]
version = "1.50.0"
features = [
    "macros",
    "rt",
    "rt-multi-thread",
]

[target."cfg(windows)".dev-dependencies.winapi]
version = "0.3.9"
features = [
    "processthreadsapi",
    "psapi",
]

[lints.clippy]
expect_used = "warn"
if_not_else = "allow"
match_same_arms = "allow"
missing_errors_doc = "allow"
missing_panics_doc = "allow"
module_name_repetitions = "allow"
must_use_candidate = "allow"
panic = "warn"
redundant_closure_for_method_calls = "allow"
similar_names = "allow"
too_many_lines = "allow"
uninlined_format_args = "allow"
unwrap_used = "warn"

[lints.clippy.all]
level = "warn"
priority = -1

[lints.clippy.pedantic]
level = "warn"
priority = -1

[lints.rust]
unsafe_code = "warn"

[lints.rust.rust_2024_compatibility]
level = "warn"
priority = -1
