1#![deny(unsafe_op_in_unsafe_fn)]
8
9pub mod api;
11pub mod backends;
13pub mod codecs;
15pub mod runtime;
17
18pub use api::{
19 CodecCapability, CodecConfig, CodecStreamInfo, DecodedFrame, DecodedSurface,
20 DecoderCapabilities, DecoderOptions, DecoderStats, EncodedAccessUnit, FrameDimensions,
21 PixelFormat, SubmitOutcome, VideoCodec, VideoDecoder, VideoError, VideoTimestamp,
22};
23pub use codecs::{CodecConfigTracker, ConfigUpdate, H264Config, H265Config};
24
25#[cfg(target_os = "macos")]
26pub use backends::macos::{MacOsDecoder, MacOsVideoFrame};
27#[cfg(target_os = "macos")]
29pub type PlatformDecoder = MacOsDecoder;
30
31#[cfg(target_os = "linux")]
32pub use backends::linux::{LinuxDecoder, LinuxVideoFrame};
33#[cfg(target_os = "linux")]
35pub type PlatformDecoder = LinuxDecoder;
36
37#[cfg(target_os = "windows")]
38pub use backends::windows::{WindowsDecoder, WindowsNv12Frame, WindowsVideoFrame};
39#[cfg(target_os = "windows")]
41pub type PlatformDecoder = WindowsDecoder;
42
43#[cfg(target_os = "android")]
44pub use backends::android::{
45 AndroidDecoder, AndroidImagePlane, AndroidPresentedFrame, AndroidSurfaceDecoder,
46 AndroidVideoFrame,
47};
48#[cfg(target_os = "android")]
50pub type PlatformDecoder = AndroidDecoder;
51
52#[cfg(all(target_arch = "wasm32", target_os = "unknown"))]
53pub use backends::web::{WebDecoder, WebVideoFrame};
54#[cfg(all(target_arch = "wasm32", target_os = "unknown"))]
56pub type PlatformDecoder = WebDecoder;