diff options
Diffstat (limited to 'include/py/homekit/camera/types.py')
-rw-r--r-- | include/py/homekit/camera/types.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/include/py/homekit/camera/types.py b/include/py/homekit/camera/types.py index da0fcc6..1a97e63 100644 --- a/include/py/homekit/camera/types.py +++ b/include/py/homekit/camera/types.py @@ -23,7 +23,7 @@ class CameraType(Enum): if channel == 1: return '' elif channel == 2: - if self.value in (CameraType.HIKVISION_264, CameraType.HIKVISION_265): + if self.is_hikvision(): return '/Streaming/Channels/2' elif self.value == CameraType.ALIEXPRESS_NONAME: return '/?stream=1.sdp' @@ -41,6 +41,9 @@ class CameraType(Enum): def get_container(self) -> VideoContainerType: return VideoContainerType.MP4 if self.get_codec(1) == VideoCodecType.H264 else VideoContainerType.MOV + def is_hikvision(self) -> bool: + return self in (CameraType.HIKVISION_264.value, CameraType.HIKVISION_265) + class TimeFilterType(Enum): FIX = 'fix' |