Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
sk1p committed Jun 17, 2024
1 parent fb65e5e commit 511c9ea
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 1 deletion.
2 changes: 1 addition & 1 deletion common/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ edition = "2021"
bincode = "1.3.3"
ipc-test = { path = "../ipc_test" }
stats = { path = "../stats" }
pyo3 = "0.21.2"
pyo3 = { version = "0.21.2", features = ["abi3-py37"] }
numpy = "0.21"
serde = "1.0.199"
tempfile = "3.10.1"
Expand Down
1 change: 1 addition & 0 deletions common/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ pub mod decoder;
pub mod frame_stack;
pub mod generic_connection;
pub mod generic_receiver;
pub mod py_buffer_for_slot;
pub mod py_cam_client;
pub mod py_connection;
pub mod stats;
19 changes: 19 additions & 0 deletions common/src/py_buffer_for_slot.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
use std::ffi::c_int;

use ipc_test::Slot;
use pyo3::{ffi, pyclass, pymethods};

// FIXME: can/should we make this Send'able?
#[pyclass(unsendable)]
struct SlotBuffer {
slot: Slot,
}

impl SlotBuffer {}

#[pymethods]
impl SlotBuffer {
unsafe fn __getbuffer__(&self, view: *mut ffi::Py_buffer, flags: c_int) {
todo!()
}
}

0 comments on commit 511c9ea

Please sign in to comment.