Skip to main content Module media Copy item path Source use std::collections::HashMap ; π use std::collections::HashSet ; π use std::path::PathBuf ; π use std::sync::Arc ; π use std::sync::Mutex ; π use std::time::Duration ; π use std::time::Instant ; π use std::time::SystemTime ; π use async_trait::async_trait ; π use base64::Engine as _; π use base64::engine::general_purpose; π use futures::FutureExt; π use futures::Stream; π use futures::StreamExt; π use futures::TryFutureExt; π use futures::TryStreamExt; π use futures::pin_mut; π use http::StatusCode; π use object_store::ObjectMeta; π use ruma::Mxc; π use ruma::OwnedMxcUri; π use ruma::OwnedUserId; π use ruma::UserId; π use ruma::api::error::ErrorKind; π use ruma::api::error::RetryAfter; π use ruma::http_headers::ContentDisposition; π use tokio::sync::Semaphore; π use tokio::fs; π use tokio::sync::Notify; π use tuwunel_core::Err ; π use tuwunel_core::Error ; π use tuwunel_core::Result ; π use tuwunel_core::config::Media as MediaConfig; π use tuwunel_core::debug ; π use tuwunel_core::debug ; π use tuwunel_core::debug_error ; π use tuwunel_core::debug_info ; π use tuwunel_core::debug_warn ; π use tuwunel_core::err ; π use tuwunel_core::implement; π use tuwunel_core::trace ; π use tuwunel_core::utils ; π use tuwunel_core::utils::BoolExt ; π use tuwunel_core::utils::MutexMap ; π use tuwunel_core::utils::result::LogDebugErr ; π use tuwunel_core::utils::stream::BroadbandExt ; π use tuwunel_core::utils::stream::IterStream ; π use tuwunel_core::utils::stream::ReadyExt ; π use tuwunel_core::utils::stream::TryReadyExt ; π use tuwunel_core::utils::time::now_millis ; π use tuwunel_core::warn ; π use url::Url ; π use self::video::FAILURES ; π use self::video::Failures ; π use self::video::sweep_staging_dir ; π use self::data::Data ; π use self::preview::Agent ; π use self::remote::Fetch ; π use self::thumbnail::sequence ; π pub use self::data::Metadata ;pub use self::preview::UrlPreviewData ;pub use self::thumbnail::Animate ;pub use self::thumbnail::Dim ;use crate::storage::Provider ; π data π migrations π preview π URL Previews remote π space π thumbnail π Handles media thumbnail requests. video π Video Thumbnails Fetched A picture fetched from a peer, and what a walk of its container settled. MXCState π For MSC2246 Media Service UploadStat One locally-uploaded media itemβs uploader and storage-object byte length
and modification time, the row shape of the media-statistics scan. UserMediaEntry One row of a userβs uploaded media, holding only the fields tuwunel can
derive from the uploader index and storage-provider object metadata. The
uploader is carried when the index holds a row for it. CACHE_CONTROL_IMMUTABLE Cache control for immutable objects. CORP_CROSS_ORIGIN Default cross-origin resource policy. MXC_LENGTH generated MXC ID (media-id) length REDIRECT_TTL π Validity window for a presigned media download redirect (MSC3860). encode_key mtime_millis π