summaryrefslogtreecommitdiff
path: root/crates/video_player
diff options
context:
space:
mode:
Diffstat (limited to 'crates/video_player')
-rw-r--r--crates/video_player/Cargo.toml20
-rw-r--r--crates/video_player/src/main.rs13
2 files changed, 33 insertions, 0 deletions
diff --git a/crates/video_player/Cargo.toml b/crates/video_player/Cargo.toml
new file mode 100644
index 0000000..df0e2bc
--- /dev/null
+++ b/crates/video_player/Cargo.toml
@@ -0,0 +1,20 @@
+[package]
+name = "newton_video_player"
+version.workspace = true
+edition.workspace = true
+authors.workspace = true
+
+[[bin]]
+name = "newton_video_player"
+path = "src/main.rs"
+
+[dependencies]
+teleia = {workspace = true}
+glam = "*" # linear algebra
+glow = "*" # gl bindings
+bitflags = "*" # C-style bitwise flags
+rand = { version = "=0.8.5", features = ["small_rng"] } # rng
+log = "*" # logging
+env_logger = "*" # native logging
+lazy_static = "*" # global constants
+uuid = {version = "*", features = ["v4"]} # generate uuids \ No newline at end of file
diff --git a/crates/video_player/src/main.rs b/crates/video_player/src/main.rs
new file mode 100644
index 0000000..e9fc5e1
--- /dev/null
+++ b/crates/video_player/src/main.rs
@@ -0,0 +1,13 @@
+#![feature(unix_socket_ancillary_data)]
+use std::os::unix::net::{SocketAncillary, UnixDatagram};
+
+fn main() {
+ let sock = UnixDatagram::unbound().expect("failed to create socket");
+ sock.connect("/tmp/newton.sock").expect("failed to connect");
+ let mut ancillary_buffer = [0; 128];
+ let mut ancillary = SocketAncillary::new(&mut ancillary_buffer);
+ ancillary.add_fds(&[1]);
+ sock.send_vectored_with_ancillary(&mut [], &mut ancillary).expect("failed to send");
+ println!("hi");
+ loop {}
+}