pub struct MediaCodecRegistry;Expand description
Stateless cross-platform media codec registry providing magic-byte detection and native pure-Rust decoders.
Implementations§
Source§impl MediaCodecRegistry
Magic-byte detection, MIME classification, and pure-Rust decoders for all cross-platform media formats.
impl MediaCodecRegistry
Magic-byte detection, MIME classification, and pure-Rust decoders for all cross-platform media formats.
Sourcepub fn detect_media_kind(uri: &str, bytes: &[u8]) -> MediaKind
pub fn detect_media_kind(uri: &str, bytes: &[u8]) -> MediaKind
Sourcepub fn detect_image_format(uri: &str, bytes: &[u8]) -> ImageFormat
pub fn detect_image_format(uri: &str, bytes: &[u8]) -> ImageFormat
Sourcepub fn decode_bmp(bytes: &[u8], alt_text: &str) -> Result<ImageAsset, String>
pub fn decode_bmp(bytes: &[u8], alt_text: &str) -> Result<ImageAsset, String>
Sourcepub fn decode_gif(bytes: &[u8], title: &str) -> Result<GifAnimation, String>
pub fn decode_gif(bytes: &[u8], title: &str) -> Result<GifAnimation, String>
Sourcepub fn decode_wav(bytes: &[u8], title: &str) -> Result<AudioTrack, String>
pub fn decode_wav(bytes: &[u8], title: &str) -> Result<AudioTrack, String>
Sourcepub fn parse_html(raw: &str) -> HtmlDocument
pub fn parse_html(raw: &str) -> HtmlDocument
Sourcepub fn parse_and_rasterize_svg(
raw_svg: &str,
out_w: u32,
out_h: u32,
) -> Result<SvgDocument, String>
pub fn parse_and_rasterize_svg( raw_svg: &str, out_w: u32, out_h: u32, ) -> Result<SvgDocument, String>
Parses an SVG document (<svg>, <rect>, <circle>, <line>) and rasterizes it into an ImageBuffer.
§Arguments
&str- Raw SVG XML source.u32- Target rasterization width in pixels.u32- Target rasterization height in pixels.
§Returns
Result<SvgDocument, String>- Parsed and rasterizedSvgDocumentor error.
Sourcepub fn synthesize_frame(
width: u32,
height: u32,
bg: Color,
accent: Color,
frame_idx: usize,
) -> ImageBuffer
pub fn synthesize_frame( width: u32, height: u32, bg: Color, accent: Color, frame_idx: usize, ) -> ImageBuffer
Synthesizes a clean multi-band gradient + orbiting geometric emblem frame for sample GIF/Video/LIVE buffers.
§Arguments
u32- Frame width in pixels.u32- Frame height in pixels.Color- Base background tone.Color- Primary accent tone.usize- Animation frame index.
§Returns
ImageBuffer- Rendered RGBA8 bitmap frame.
Trait Implementations§
Source§impl Clone for MediaCodecRegistry
impl Clone for MediaCodecRegistry
impl Copy for MediaCodecRegistry
Source§impl Debug for MediaCodecRegistry
impl Debug for MediaCodecRegistry
Auto Trait Implementations§
impl Forget for MediaCodecRegistry
impl Freeze for MediaCodecRegistry
impl Move for MediaCodecRegistry
impl RefUnwindSafe for MediaCodecRegistry
impl Send for MediaCodecRegistry
impl Sync for MediaCodecRegistry
impl Unpin for MediaCodecRegistry
impl UnsafeUnpin for MediaCodecRegistry
impl UnwindSafe for MediaCodecRegistry
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more