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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
//! Filter graph pipeline for `OxiMedia`.
//!
//! This crate provides a filter graph implementation for processing media data
//! through a pipeline of operations. The graph connects nodes (filters) together
//! to form a processing pipeline.
//!
//! # Architecture
//!
//! The filter graph consists of:
//!
//! - **Nodes**: Processing units that implement the [`node::Node`] trait
//! - **Ports**: Connection points for data flow between nodes
//! - **Connections**: Links between output and input ports
//! - **Frames**: Data units passed through the graph
//!
//! # Example
//!
//! ```
//! use oximedia_graph::graph::GraphBuilder;
//! use oximedia_graph::filters::video::{PassthroughFilter, NullSink};
//! use oximedia_graph::node::NodeId;
//! use oximedia_graph::port::PortId;
//!
//! fn build_graph() -> Result<(), Box<dyn std::error::Error>> {
//! // Create a simple graph: source -> sink
//! let source = PassthroughFilter::new_source(NodeId(0), "source");
//! let sink = NullSink::new(NodeId(0), "sink");
//!
//! let (builder, source_id) = GraphBuilder::new().add_node(Box::new(source));
//! let (builder, sink_id) = builder.add_node(Box::new(sink));
//!
//! let graph = builder
//! .connect(source_id, PortId(0), sink_id, PortId(0))?
//! .build()?;
//!
//! assert_eq!(graph.node_count(), 2);
//! Ok(())
//! }
//!
//! build_graph().expect("graph construction should succeed");
//! ```
//!
//! # Node Types
//!
//! Nodes are classified into three types:
//!
//! - **Source**: Entry points that produce frames (e.g., decoders)
//! - **Filter**: Transform frames (e.g., scalers, color converters)
//! - **Sink**: Consume frames (e.g., encoders, displays)
//!
//! # Frame Flow
//!
//! Frames flow through the graph following the connections. The graph
//! automatically computes a topological order for execution to ensure
//! correct data flow.
// Allow common pedantic lints for this crate
// Wave-10 new modules
// Wave-13 new modules
// Wave-14 new modules
// Graph DSL parser
// Re-export commonly used items
pub use ;
pub use ;
pub use ;
pub use ;
pub use ;
pub use ;