release: bump version to 0.71.0
This commit is contained in:
@@ -70,13 +70,14 @@ class UsbCameraInput:
|
||||
"or start the agent with --dry-run for protocol testing."
|
||||
) from exc
|
||||
|
||||
capture = cv2.VideoCapture(self.spec.index)
|
||||
capture = cv2.VideoCapture(self.spec.index, cv2.CAP_V4L2)
|
||||
if not capture or not capture.isOpened():
|
||||
raise MotionAgentCameraError(f"Unable to open USB camera index {self.spec.index}.")
|
||||
|
||||
capture.set(cv2.CAP_PROP_FRAME_WIDTH, self.spec.width)
|
||||
capture.set(cv2.CAP_PROP_FRAME_HEIGHT, self.spec.height)
|
||||
capture.set(cv2.CAP_PROP_FPS, self.spec.fps)
|
||||
capture.set(cv2.CAP_PROP_BUFFERSIZE, 1)
|
||||
self._capture = capture
|
||||
|
||||
def read(self) -> Any:
|
||||
@@ -116,6 +117,7 @@ class UrlCameraInput:
|
||||
f"Unable to open camera URL {self.spec.url}. Check the stream URL, "
|
||||
"firewall, and LAN reachability."
|
||||
)
|
||||
capture.set(cv2.CAP_PROP_BUFFERSIZE, 1)
|
||||
self._capture = capture
|
||||
|
||||
def read(self) -> Any:
|
||||
|
||||
Reference in New Issue
Block a user