diff options
author | Evgeny Zinoviev <me@ch1p.io> | 2024-02-27 00:01:50 +0300 |
---|---|---|
committer | Evgeny Zinoviev <me@ch1p.io> | 2024-02-27 00:01:50 +0300 |
commit | 7092c79b5693b239fec739c181d300301c434d22 (patch) | |
tree | ed1029051c70767d919a62f62fbac0ab6639e8c4 /include/py | |
parent | d638bb4f58bf81c60ef218204b1fba75cf16b36a (diff) |
some include magic; add tools/ipcam_stream.py
Diffstat (limited to 'include/py')
-rw-r--r-- | include/py/homekit/camera/types.py | 6 |
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}') |