1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
//! Core Media types and wrappers
//!
//! This module provides Rust wrappers for Core Media framework types used in
//! screen capture operations.
//!
//! ## Main Types
//!
//! - [`CMSampleBuffer`] - Container for media samples (audio/video frames)
//! - [`CMTime`] - Time value with rational timescale for precise timing
//! - [`IOSurface`] - Hardware-accelerated surface for zero-copy GPU access
//! - [`CMBlockBuffer`] - Block of contiguous data (audio/compressed video)
//! - [`AudioBuffer`] - Audio data buffer with sample data
//! - [`AudioBufferList`] - Collection of audio buffers for multi-channel audio
//! - [`SCFrameStatus`] - Status of a captured frame (complete, idle, dropped, etc.)
//!
//! ## Example
//!
//! ```rust,no_run
//! use screencapturekit::cm::{CMSampleBuffer, CMTime, SCFrameStatus};
//!
//! fn process_frame(sample: CMSampleBuffer) {
//! // Check frame status
//! if sample.frame_status() == Some(SCFrameStatus::Complete) {
//! // Get timestamp
//! let pts = sample.presentation_timestamp();
//! println!("Frame at {:?}", pts);
//!
//! // Access pixel buffer for CPU processing
//! if let Some(pixel_buffer) = sample.image_buffer() {
//! // Access IOSurface for GPU processing
//! if let Some(surface) = pixel_buffer.io_surface() {
//! println!("Surface: {}x{}", surface.width(), surface.height());
//! }
//! }
//! }
//! }
//! ```
// Re-export all public types
pub use ;
pub use CMBlockBuffer;
pub use CMFormatDescription;
pub use SCFrameStatus;
pub use ;
pub use CMSampleBuffer;
pub use ;
// Re-export codec and media type modules from format_description
pub use codec_types;
pub use media_types;