mIntrinsicPath = stereoConfigPath.substr(0, found) + std::string(".json");
mPointcloudOutputPath = pointcloudOutputPath;
- try {
- mDfsAdaptor = new DfsAdaptor();
- mDfsAdaptor->bind();
- } catch (const std::bad_alloc &e) {
- LOGE("Failed to create dfs adaptation : %s", e.what());
- return MEDIA_VISION_ERROR_OUT_OF_MEMORY;
- } catch (const std::runtime_error &e) {
- LOGE("Failed to bind %s adpator", e.what());
- return MEDIA_VISION_ERROR_INVALID_OPERATION;
+ if (!mDfsAdaptor) {
+ try {
+ mDfsAdaptor = new DfsAdaptor();
+ mDfsAdaptor->bind();
+ } catch (const std::bad_alloc &e) {
+ LOGE("Failed to create dfs adaptation : %s", e.what());
+ return MEDIA_VISION_ERROR_OUT_OF_MEMORY;
+ } catch (const std::runtime_error &e) {
+ LOGE("Failed to bind %s adpator", e.what());
+ return MEDIA_VISION_ERROR_INVALID_OPERATION;
+ }
}
return MEDIA_VISION_ERROR_NONE;