Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Develop zerocopy #1053

Merged
merged 32 commits into from
Jul 12, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
4a1f818
Added SharedMemory header
TheMutta Jun 17, 2024
c36ab3b
Finalized SharedMemory class
TheMutta Jun 18, 2024
cc44859
Added differentiation between SharedMemory and VectorMemory, added he…
TheMutta Jun 19, 2024
557abfd
Replaced -1 fd with 0 fd
TheMutta Jun 19, 2024
185186d
This reverts commit 557abfd0477a5217cec6cd095477e91d526dd0d4.
TheMutta Jun 19, 2024
c4ff206
Made fd and mapping in SharedMemory protected instead of private
TheMutta Jun 24, 2024
ad66010
XLinkStream read helper functions for handling FDs
TheMutta Jun 24, 2024
3c1d976
Added SharedMemory support with FD in Buffer data structure
TheMutta Jun 25, 2024
cf35d8c
Added FD support in ImgFrame data structure
TheMutta Jun 25, 2024
a5016b6
Parsing fd in StreamMessageParser
TheMutta Jun 25, 2024
5019cca
Updated XLink version.
TheMutta Jun 26, 2024
fd710a6
Closing FDs when destructing SharedMemory
TheMutta Jun 27, 2024
1effc78
Added size parameters to stream write
TheMutta Jun 27, 2024
88e86f8
Passing FDs by value
TheMutta Jun 28, 2024
0d4b57d
Resolved conflict by reverting size changes.
TheMutta Jun 28, 2024
979573a
Added new max throughput example to test the efficency of the transfe…
TheMutta Jul 1, 2024
242d6ec
Added new example in CMakeLists.txt
TheMutta Jul 1, 2024
316c073
Disabled openssh that caused issues when cross compiling to RVC4
TheMutta Jul 1, 2024
74441bd
Added X_LINK_TCP_IP_OR_LOCAL_SHDMEM
TheMutta Jul 4, 2024
587f9a2
Changes to removed unused constructor to SharedMemory and changes to …
TheMutta Jul 5, 2024
21e4649
Removed MemoryKinds
TheMutta Jul 5, 2024
bc17b50
Re-added empty constructor.
TheMutta Jul 5, 2024
d8b81e8
Added tcpshd enviroment variable
TheMutta Jul 8, 2024
2efe453
Setting back connection in deviceInfo from connectionHandler
TheMutta Jul 10, 2024
cb9ac60
Added memfd_create constructors.
TheMutta Jul 10, 2024
9c4f05c
Readded kinds.
TheMutta Jul 11, 2024
950dbd4
Added SharedMemory Fd writing in data queue
TheMutta Jul 11, 2024
48f664d
Updated XLink
TheMutta Jul 12, 2024
26fb39c
Clangformat
TheMutta Jul 12, 2024
f99c0d8
Removed example file
TheMutta Jul 12, 2024
4560bb3
reset OpenSSL compile flag
TheMutta Jul 12, 2024
1a249f3
Merge branch 'v3_develop' into v3_develop_zerocopy
TheMutta Jul 12, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Added FD support in ImgFrame data structure
  • Loading branch information
TheMutta committed Jun 25, 2024
commit cf35d8c35acc0e2c6c8510102ff49c159e5a4c0c
1 change: 1 addition & 0 deletions include/depthai/pipeline/datatype/ImgFrame.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ class ImgFrame : public Buffer {
* Timestamp is set to now
*/
ImgFrame();
ImgFrame(long fd);
ImgFrame(size_t size);
virtual ~ImgFrame() = default;

Expand Down
6 changes: 6 additions & 0 deletions src/pipeline/datatype/ImgFrame.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,12 @@ ImgFrame::ImgFrame(size_t size) : ImgFrame() {
data = mem;
}

ImgFrame::ImgFrame(long fd) : ImgFrame() {
auto mem = std::make_shared<SharedMemory>(fd);
data = mem;

}

std::chrono::time_point<std::chrono::steady_clock, std::chrono::steady_clock::duration> ImgFrame::getTimestamp(CameraExposureOffset offset) const {
auto ts = getTimestamp();
auto expTime = getExposureTime();
Expand Down
Loading