//! # Topaz Video AI Integration Library
//!
//! A Rust library for integrating with Topaz Video AI to perform video and image enhancement
//! including super-resolution upscaling and frame interpolation.
//!
//! ## Features
//!
//! - Video super-resolution upscaling
//! - Frame interpolation for smooth slow motion
//! - Image super-resolution upscaling
//! - Batch processing capabilities
//! - GPU acceleration support
//! - Multiple AI model options
//!
//! ## Quick Start
//!
//! ```rust,no_run
//! use tvai::*;
//!
//! #[tokio::main]
//! async fn main() -> std::result::Result<(), Box<dyn std::error::Error>> {
//!     // Quick video upscaling
//!     quick_upscale_video(
//!         std::path::Path::new("input.mp4"),
//!         std::path::Path::new("output.mp4"),
//!         2.0,
//!     ).await?;
//!
//!     Ok(())
//! }
//! ```

pub mod core;
pub mod video;
pub mod image;
pub mod config;
pub mod utils;
pub mod filters;
pub mod web_api;

// Re-export main types for convenience
pub use core::{TvaiProcessor, TvaiConfig, ProcessResult, ProcessMetadata, ProgressCallback, ProcessingOptions};
pub use video::{VideoUpscaleParams, InterpolationParams, VideoEnhanceParams};
pub use image::{ImageUpscaleParams, ImageFormat};
pub use config::{
    UpscaleModel, InterpolationModel, QualityPreset,
    GlobalSettings, SettingsManager, global_settings,
    VideoPreset, ImagePreset, PresetManager, global_presets,
    TopazTemplate, TopazTemplateManager, AppliedTemplate, BuiltinTemplates,
    FfmpegCommandOptions, RateControlMode, global_topaz_templates
};
pub use web_api::{WebApi, GenerateCommandRequest, GenerateCommandResponse, TemplateInfo};
pub use utils::{
    GpuInfo, FfmpegInfo, VideoInfo, ImageInfo, TempFileManager,
    GpuManager, DetailedGpuInfo, GpuDevice, GpuSettings, GpuBenchmarkResult,
    PerformanceMonitor, PerformanceMetrics, PerformanceSettings, ProcessingMode, PerformanceSummary,
    ModelManager, ModelInfo, ModelType, ValidationReport,
    optimize_for_system, list_available_models, validate_models
};
pub use filters::{
    FilterCombination, QualityLevel, ProcessOptions, FilterProcessor,
    presets::{PresetType, CustomPreset, PresetManager as FilterPresetManager},
    builder::{FilterCombinationBuilder, quick_builders}
};

// Re-export error types
pub use core::TvaiError;
pub type Result<T> = std::result::Result<T, TvaiError>;

// Quick processing functions
pub use video::quick_upscale_video;
pub use video::quick_upscale_video_with_model;
pub use video::quick_interpolate_video;
pub use image::quick_upscale_image;
pub use video::auto_enhance_video;

// Template-based processing functions
pub use video::{
    process_with_template, list_available_templates, get_template_info,
    upscale_to_4k, convert_to_60fps, remove_noise, slow_motion_4x, auto_crop_stabilization
};

// System detection functions
pub use utils::{detect_topaz_installation, detect_gpu_support, detect_ffmpeg};
pub use utils::{get_video_info, get_image_info, estimate_processing_time};
