Actually close the camera in localcamera::Close

This commit is contained in:
Isaac Connor 2021-05-28 13:54:20 -04:00
parent 1a6dc18a09
commit 9dd960beac
2 changed files with 7 additions and 2 deletions

View File

@ -705,6 +705,12 @@ LocalCamera::~LocalCamera() {
} // end LocalCamera::~LocalCamera
int LocalCamera::Close() {
if (device_prime && capture)
Terminate();
return 0;
};
void LocalCamera::Initialise() {
Debug(3, "Opening video device %s", device.c_str());
//if ( (vid_fd = open( device.c_str(), O_RDWR|O_NONBLOCK, 0 )) < 0 )

View File

@ -153,8 +153,7 @@ public:
int PreCapture() override;
int Capture(std::shared_ptr<ZMPacket> &p) override;
int PostCapture() override;
int Close() override { return 0; };
int Close() override;
static bool GetCurrentSettings(const char *device, char *output, int version, bool verbose);
};