Skip to content

Commit 65a86fd

Browse files
committed
Refactored asset sending RPC
1 parent f19964a commit 65a86fd

File tree

2 files changed

+2
-9
lines changed

2 files changed

+2
-9
lines changed

cmake/Depthai/DepthaiDeviceSideConfig.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
set(DEPTHAI_DEVICE_SIDE_MATURITY "snapshot")
33

44
# "full commit hash of device side binary"
5-
set(DEPTHAI_DEVICE_SIDE_COMMIT "602822fe9eaca68a72c666497dc4979b29291b3e")
5+
set(DEPTHAI_DEVICE_SIDE_COMMIT "0f02e98b07c988a0bcf95da20046b87f3fa8df7a")
66

77
# "version if applicable"
88
set(DEPTHAI_DEVICE_SIDE_VERSION "")

src/device/DeviceBase.cpp

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1095,9 +1095,6 @@ bool DeviceBase::startPipelineImpl(const Pipeline& pipeline) {
10951095
if(!assetStorage.empty()) {
10961096
pimpl->rpcClient->call("setAssets", assets);
10971097

1098-
// allocate, returns a pointer to memory on device side
1099-
auto memHandle = pimpl->rpcClient->call("memAlloc", static_cast<std::uint32_t>(assetStorage.size())).as<uint32_t>();
1100-
11011098
// Transfer the whole assetStorage in a separate thread
11021099
const std::string streamAssetStorage = "__stream_asset_storage";
11031100
std::thread t1([this, &streamAssetStorage, &assetStorage]() {
@@ -1110,12 +1107,8 @@ bool DeviceBase::startPipelineImpl(const Pipeline& pipeline) {
11101107
} while(offset < static_cast<int64_t>(assetStorage.size()));
11111108
});
11121109

1113-
// Open a channel to transfer AssetStorage
1114-
pimpl->rpcClient->call("readFromXLink", streamAssetStorage, memHandle, assetStorage.size());
1110+
pimpl->rpcClient->call("readAssetStorageFromXLink", streamAssetStorage, assetStorage.size());
11151111
t1.join();
1116-
1117-
// After asset storage is transfers, set the asset storage
1118-
pimpl->rpcClient->call("setAssetStorage", memHandle, assetStorage.size());
11191112
}
11201113

11211114
// print assets on device side for test

0 commit comments

Comments
 (0)