mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-16 11:17:49 -06:00
Camera feed is also stopped when NetworkCamera is destroyed
CL-541
This commit is contained in:
parent
95b1e8f68c
commit
23330cd086
1 changed files with 4 additions and 0 deletions
|
@ -87,6 +87,10 @@ class NetworkCamera(QObject):
|
||||||
def getImage(self):
|
def getImage(self):
|
||||||
return self._image
|
return self._image
|
||||||
|
|
||||||
|
## Ensure that close gets called when object is destroyed
|
||||||
|
def __del__(self):
|
||||||
|
self.close()
|
||||||
|
|
||||||
def _onStreamDownloadProgress(self, bytes_received, bytes_total):
|
def _onStreamDownloadProgress(self, bytes_received, bytes_total):
|
||||||
# An MJPG stream is (for our purpose) a stream of concatenated JPG images.
|
# An MJPG stream is (for our purpose) a stream of concatenated JPG images.
|
||||||
# JPG images start with the marker 0xFFD8, and end with 0xFFD9
|
# JPG images start with the marker 0xFFD8, and end with 0xFFD9
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue