Skip to main content

alpha2_media/
lib.rs

1//! Host-independent media vocabulary and I/O contracts.
2//!
3//! These types describe media itself, not any application built on it: source
4//! identity and color, decoded frames and audio blocks, the decoder and encoder
5//! traits that platform bindings implement, and output rate control. The
6//! renderer, the timeline model, and the platform bindings all speak them, and
7//! none of those owns them.
8
9mod color;
10mod container;
11mod ids;
12mod io;
13mod rate_control;
14
15pub use color::{
16    ColorMatrix, ColorMetadata, ColorPrimaries, ColorRange, DynamicRange, TransferFunction,
17    YcbcrLevels, YuvEncoding,
18};
19pub use container::{Container, ContainerError, resolve_export_format};
20pub use ids::{IdError, SourceId};
21pub use io::{
22    AudioBlock, AudioBlockProvider, AudioBlockSink, AudioSpan, CancelToken, ChromaLocation,
23    DecodeError, DecodeEvent, DecodeRequest, DecodeRequestKind, DecodeResult, DecodedVideoFrame,
24    Decoder, EmojiPolicy, EncodeError, EncodeEvent, EncodeSink, GPU_TIMEOUT_MESSAGE, GpuFault,
25    HostTexture, HostTexturePixels, MAX_AUDIO_CHANNELS, MAX_FRAME_DIMENSION, MAX_FRAME_PIXELS,
26    Orientation, PixelFormat, Plane, Premultiplication, RasterColorSpace, Rect, Rotation,
27    SampleAspectRatio, Speaker, SpeakerLayout, StreamInfo, StreamKind, TextAlign, TextTexture,
28    YuvFormat, frame_size_supported, sample_ticks_floor,
29};
30pub use rate_control::{
31    AudioCodec, BitrateMode, FRAME_RATE_EXPONENT, MIN_VIDEO_BITRATE, QualityLevel, REFERENCE_FPS,
32    REFERENCE_PIXELS, RESOLUTION_EXPONENT, RateControlError, VideoCodec, VideoRateControl,
33    codec_factor, level_quantizer, resolve_audio_bitrate, resolve_video_rate_control,
34};