media_pp/lib.rs
1// docs.rs passes `--cfg docsrs` (see `package.metadata.docs.rs`), which labels
2// every feature-gated item with the Cargo feature that enables it. Stable
3// builds never see the `feature` attribute.
4#![cfg_attr(docsrs, feature(doc_cfg))]
5
6mod core;
7pub mod elements;
8pub mod error;
9mod platform;
10#[cfg(test)]
11mod test_support;
12
13// Flat re-export: `core/` only exists to group these files on disk (see
14// its module doc) — every external and internal caller keeps using
15// `crate::pipeline`/`media_pp::pipeline` etc., never `crate::core::...`.
16pub use core::{
17 buffer, bus, clock, color, control, driver, element, graph, log, pad, pipeline, playback_clock,
18 pool, pp_log, queue,
19};
20
21// Same flat-namespace reasoning as above, but crate-private: `schedule`/
22// `time` are pacing/rescale internals `crate::elements` builds on, not
23// exposed in any public element's own field/method signature — nothing
24// downstream of this crate needs `PeriodicSchedule`/`ActiveTimeline`/
25// `MediaTimestamp`/`TimeBase` itself. `pub(crate) use` keeps the same
26// `crate::schedule`/`crate::time` paths working for every internal caller
27// without also making them part of this crate's external API surface.
28pub(crate) use core::{schedule, time};
29
30pub use error::{Error, Result};
31
32/// Must be called once before using any element that touches ffmpeg.
33pub fn init() -> Result<()> {
34 ffmpeg_next::init()?;
35 Ok(())
36}