summaryrefslogtreecommitdiff
path: root/include/py/homekit/camera
diff options
context:
space:
mode:
authorEvgeny Zinoviev <me@ch1p.io>2024-02-26 23:35:30 +0300
committerEvgeny Zinoviev <me@ch1p.io>2024-02-26 23:35:30 +0300
commitd638bb4f58bf81c60ef218204b1fba75cf16b36a (patch)
treefe722115fb639aa8958d10dd6c5094db679826be /include/py/homekit/camera
parentc4f87ddad4058c0f331446fdfd8d762b8fc26c18 (diff)
config changes
Diffstat (limited to 'include/py/homekit/camera')
-rw-r--r--include/py/homekit/camera/config.py3
-rw-r--r--include/py/homekit/camera/types.py10
-rw-r--r--include/py/homekit/camera/util.py3
3 files changed, 9 insertions, 7 deletions
diff --git a/include/py/homekit/camera/config.py b/include/py/homekit/camera/config.py
index 257e5f1..93bd8f9 100644
--- a/include/py/homekit/camera/config.py
+++ b/include/py/homekit/camera/config.py
@@ -1,6 +1,7 @@
import socket
-from ..config import ConfigUnit, LinuxBoardsConfig
+from ..config import ConfigUnit
+from ..linux import LinuxBoardsConfig
from typing import Optional
from .types import CameraType, VideoContainerType, VideoCodecType
diff --git a/include/py/homekit/camera/types.py b/include/py/homekit/camera/types.py
index 0aaadef..aa35ebf 100644
--- a/include/py/homekit/camera/types.py
+++ b/include/py/homekit/camera/types.py
@@ -13,7 +13,7 @@ class VideoCodecType(Enum):
class CameraType(Enum):
ESP32 = 'esp32'
- ALIEXPRESS_NONAME = 'ali'
+ XMEYE = 'xmeye'
HIKVISION_264 = 'hik_264'
HIKVISION_265 = 'hik_265'
@@ -25,7 +25,7 @@ class CameraType(Enum):
elif channel == 2:
if self.is_hikvision():
return '/Streaming/Channels/2'
- elif self.value == CameraType.ALIEXPRESS_NONAME:
+ elif self.value == CameraType.XMEYE:
return '/?stream=1.sdp'
else:
raise ValueError(f'unsupported camera type {self.value}')
@@ -34,7 +34,7 @@ class CameraType(Enum):
if channel == 1:
return VideoCodecType.H264 if self.value == CameraType.HIKVISION_264 else VideoCodecType.H265
elif channel == 2:
- return VideoCodecType.H265 if self.value == CameraType.ALIEXPRESS_NONAME else VideoCodecType.H264
+ return VideoCodecType.H265 if self.value == CameraType.XMEYE else VideoCodecType.H264
else:
raise ValueError(f'unexpected channel {channel}')
@@ -44,8 +44,8 @@ class CameraType(Enum):
def is_hikvision(self) -> bool:
return self in (CameraType.HIKVISION_264, CameraType.HIKVISION_265)
- def is_ali(self) -> bool:
- return self == CameraType.ALIEXPRESS_NONAME
+ def is_xmeye(self) -> bool:
+ return self == CameraType.XMEYE
class TimeFilterType(Enum):
diff --git a/include/py/homekit/camera/util.py b/include/py/homekit/camera/util.py
index 58c2c70..6b54129 100644
--- a/include/py/homekit/camera/util.py
+++ b/include/py/homekit/camera/util.py
@@ -7,7 +7,8 @@ import re
from datetime import datetime
from typing import List, Tuple
from ..util import chunks
-from ..config import config, LinuxBoardsConfig
+from ..config import config
+from ..linux import LinuxBoardsConfig
from .config import IpcamConfig
from .types import VideoContainerType