summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/py/homekit/camera/types.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/include/py/homekit/camera/types.py b/include/py/homekit/camera/types.py
index aa35ebf..5db4961 100644
--- a/include/py/homekit/camera/types.py
+++ b/include/py/homekit/camera/types.py
@@ -25,16 +25,16 @@ class CameraType(Enum):
elif channel == 2:
if self.is_hikvision():
return '/Streaming/Channels/2'
- elif self.value == CameraType.XMEYE:
+ elif self.is_xmeye():
return '/?stream=1.sdp'
else:
raise ValueError(f'unsupported camera type {self.value}')
def get_codec(self, channel: int) -> VideoCodecType:
if channel == 1:
- return VideoCodecType.H264 if self.value == CameraType.HIKVISION_264 else VideoCodecType.H265
+ return VideoCodecType.H264 if self == CameraType.HIKVISION_264 else VideoCodecType.H265
elif channel == 2:
- return VideoCodecType.H265 if self.value == CameraType.XMEYE else VideoCodecType.H264
+ return VideoCodecType.H265 if self == CameraType.XMEYE else VideoCodecType.H264
else:
raise ValueError(f'unexpected channel {channel}')