Set connection strategy to keep open
Apply to both default camera server and examples.
This commit is contained in:
parent
3f2ab23563
commit
0e9d2fbb99
1
deps/examples/cpp-multiCameraServer/main.cpp
vendored
1
deps/examples/cpp-multiCameraServer/main.cpp
vendored
|
@ -162,6 +162,7 @@ cs::UsbCamera StartCamera(const CameraConfig& config) {
|
|||
config.name, config.path);
|
||||
|
||||
camera.SetConfigJson(config.config);
|
||||
camera.SetConnectionStrategy(cs::VideoSource::kConnectionKeepOpen);
|
||||
|
||||
return camera;
|
||||
}
|
||||
|
|
|
@ -173,6 +173,7 @@ public final class Main {
|
|||
Gson gson = new GsonBuilder().create();
|
||||
|
||||
camera.setConfigJson(gson.toJson(config.config));
|
||||
camera.setConnectionStrategy(VideoSource.ConnectionStrategy.kKeepOpen);
|
||||
|
||||
return camera;
|
||||
}
|
||||
|
|
|
@ -127,6 +127,7 @@ def startCamera(config):
|
|||
.startAutomaticCapture(name=config.name, path=config.path)
|
||||
|
||||
camera.setConfigJson(json.dumps(config.config))
|
||||
camera.setConnectionStrategy(VideoSource.ConnectionStrategy.kKeepOpen)
|
||||
|
||||
return camera
|
||||
|
||||
|
|
1
deps/tools/multiCameraServer.cpp
vendored
1
deps/tools/multiCameraServer.cpp
vendored
|
@ -163,6 +163,7 @@ void StartCamera(const CameraConfig& config) {
|
|||
config.name, config.path);
|
||||
|
||||
camera.SetConfigJson(config.config);
|
||||
camera.SetConnectionStrategy(cs::VideoSource::kConnectionKeepOpen);
|
||||
}
|
||||
} // namespace
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user