diff --git a/Cargo.toml b/Cargo.toml
index 753a4c9..e67e01f 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -37,6 +37,7 @@ rand = "0.8"
[dev-dependencies]
env_logger = "0.10.0"
+tempfile = "3.8.0"
[features]
python = ["pyo3", "pyo3-log"]
diff --git a/assets/xsd/FLUTE-FDT-3GPP-2005-Extensions.xsd b/assets/xsd/FLUTE-FDT-3GPP-2005-Extensions.xsd
new file mode 100644
index 0000000..6373d41
--- /dev/null
+++ b/assets/xsd/FLUTE-FDT-3GPP-2005-Extensions.xsd
@@ -0,0 +1,20 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/assets/xsd/FLUTE-FDT-3GPP-2007-Extensions.xsd b/assets/xsd/FLUTE-FDT-3GPP-2007-Extensions.xsd
new file mode 100644
index 0000000..8d67301
--- /dev/null
+++ b/assets/xsd/FLUTE-FDT-3GPP-2007-Extensions.xsd
@@ -0,0 +1,17 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/assets/xsd/FLUTE-FDT-3GPP-2008-Extensions.xsd b/assets/xsd/FLUTE-FDT-3GPP-2008-Extensions.xsd
new file mode 100644
index 0000000..66f090b
--- /dev/null
+++ b/assets/xsd/FLUTE-FDT-3GPP-2008-Extensions.xsd
@@ -0,0 +1,8 @@
+
+
+
+
diff --git a/assets/xsd/FLUTE-FDT-3GPP-2009-Extensions.xsd b/assets/xsd/FLUTE-FDT-3GPP-2009-Extensions.xsd
new file mode 100644
index 0000000..9fccb7f
--- /dev/null
+++ b/assets/xsd/FLUTE-FDT-3GPP-2009-Extensions.xsd
@@ -0,0 +1,7 @@
+
+
+
+
diff --git a/assets/xsd/FLUTE-FDT-3GPP-2012-Extensions.xsd b/assets/xsd/FLUTE-FDT-3GPP-2012-Extensions.xsd
new file mode 100644
index 0000000..801eefd
--- /dev/null
+++ b/assets/xsd/FLUTE-FDT-3GPP-2012-Extensions.xsd
@@ -0,0 +1,21 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/assets/xsd/FLUTE-FDT-3GPP-2015-Extensions.xsd b/assets/xsd/FLUTE-FDT-3GPP-2015-Extensions.xsd
new file mode 100644
index 0000000..206704b
--- /dev/null
+++ b/assets/xsd/FLUTE-FDT-3GPP-2015-Extensions.xsd
@@ -0,0 +1,11 @@
+
+
+
+
+
+
+
diff --git a/assets/xsd/FLUTE-FDT-3GPP-Main.xsd b/assets/xsd/FLUTE-FDT-3GPP-Main.xsd
new file mode 100644
index 0000000..2368b26
--- /dev/null
+++ b/assets/xsd/FLUTE-FDT-3GPP-Main.xsd
@@ -0,0 +1,90 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/assets/xsd/schema-version.xsd b/assets/xsd/schema-version.xsd
new file mode 100644
index 0000000..3559649
--- /dev/null
+++ b/assets/xsd/schema-version.xsd
@@ -0,0 +1,8 @@
+
+
+
+
+
diff --git a/examples/udpreceiver.rs b/examples/udpreceiver.rs
index e394904..ef4edd8 100644
--- a/examples/udpreceiver.rs
+++ b/examples/udpreceiver.rs
@@ -1,4 +1,7 @@
-use flute::receiver::{writer, MultiReceiver, UDPEndpoint};
+use flute::{
+ core::UDPEndpoint,
+ receiver::{writer, MultiReceiver},
+};
use std::{net::UdpSocket, rc::Rc};
fn main() {
diff --git a/examples/udpsender.rs b/examples/udpsender.rs
index 65100a3..75fa094 100644
--- a/examples/udpsender.rs
+++ b/examples/udpsender.rs
@@ -1,10 +1,14 @@
-use flute::sender::{Cenc, ObjectDesc, Sender};
+use flute::{
+ core::UDPEndpoint,
+ sender::{Cenc, ObjectDesc, Sender},
+};
use std::{net::UdpSocket, time::SystemTime};
fn main() {
std::env::set_var("RUST_LOG", "info");
env_logger::builder().try_init().ok();
let dest = "224.0.0.1:3400";
+ let endpoint = UDPEndpoint::new(None, "224.0.0.1".to_owned(), 3400);
let args: Vec = std::env::args().collect();
if args.len() == 1 {
@@ -14,11 +18,12 @@ fn main() {
}
log::info!("Create UDP Socket");
+
let udp_socket = UdpSocket::bind("0.0.0.0:0").unwrap();
log::info!("Create FLUTE Sender");
let tsi = 1;
- let mut sender = Sender::new(tsi, &Default::default(), &Default::default());
+ let mut sender = Sender::new(endpoint, tsi, &Default::default(), &Default::default());
log::info!("Connect to {}", dest);
udp_socket.connect(dest).expect("Connection failed");
@@ -39,6 +44,7 @@ fn main() {
1,
None,
None,
+ None,
Cenc::Null,
true,
None,
diff --git a/src/common/alc.rs b/src/common/alc.rs
index 35e4072..1c849a3 100644
--- a/src/common/alc.rs
+++ b/src/common/alc.rs
@@ -235,6 +235,18 @@ pub fn parse_payload_id(pkt: &AlcPkt, oti: &oti::Oti) -> Result {
codec.get_fec_payload_id(pkt, oti)
}
+/// Get Inline Payload ID
+pub fn get_fec_inline_payload_id(pkt: &AlcPkt) -> Result {
+ let fec: oti::FECEncodingID = pkt
+ .lct
+ .cp
+ .try_into()
+ .map_err(|_| FluteError::new(format!("Codepoint {} not supported", pkt.lct.cp)))?;
+
+ let codec = ::instance(fec);
+ codec.get_fec_inline_payload_id(pkt)
+}
+
fn parse_ext_fdt(ext: &[u8]) -> Result