Skip to main content

apple_cf/cm/
mod.rs

1//! `CoreMedia` primitives — `CMTime`, `CMSampleBuffer`, `CMBlockBuffer`,
2//! `CMFormatDescription`, audio buffer list bridging.
3//!
4//! These are the framework-agnostic value types and reference-counted
5//! wrappers shared by every Apple media framework. `ScreenCaptureKit` /
6//! `VideoToolbox` / `AVFoundation` / `AVAssetWriter` all speak `CMSampleBuffer`,
7//! and this module is the single source of truth for the safe Rust wrapper.
8//!
9//! The image-buffer accessor (`CMSampleBuffer::image_buffer`) is gated
10//! behind the `cv` feature so users who only need `CMSampleBuffer` for
11//! audio / encoded video don't pay the `CoreVideo` dependency cost.
12//! The `SCStreamFrameInfo` attachment readers stay in `screencapturekit-rs`
13//! since they're tied to `ScreenCaptureKit`'s specific attachment keys.
14
15pub mod audio;
16/// Core Media block-buffer wrappers.
17pub mod block_buffer;
18/// Core Media format-description wrappers.
19pub mod format_description;
20/// Core Media sample-buffer wrappers.
21pub mod sample_buffer;
22/// Core Media time and time-range wrappers.
23pub mod time;
24/// Core Media timebase wrappers.
25pub mod timebase;
26
27pub use audio::{AudioBuffer, AudioBufferList, AudioBufferListRaw};
28pub use block_buffer::CMBlockBuffer;
29pub use format_description::{CMFormatDescription, CMMetadataFormatDescription};
30pub use sample_buffer::CMSampleBuffer;
31pub use time::{CMClock, CMSampleTimingInfo, CMTime, CMTimeRange};
32pub use timebase::CMTimebase;