Skip to content
GitLab
Explore
Projects
Groups
Topics
Snippets
Projects
Groups
Topics
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
VT2 Видеотехнологии
ONVIF-PTZ proxy
Commits
ccbf750a
Commit
ccbf750a
authored
1 year ago
by
Mikhail Sennikov
Browse files
Options
Download
Patches
Plain Diff
Fix docker
parent
2e43fc87
main
dev
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
Dockerfiles/Dockerfile
+1
-1
Dockerfiles/Dockerfile
onvif_proxy/camera.py
+1
-1
onvif_proxy/camera.py
onvif_proxy/cams_connection.py
+2
-2
onvif_proxy/cams_connection.py
with
4 additions
and
4 deletions
+4
-4
Dockerfiles/Dockerfile
+
1
−
1
View file @
ccbf750a
...
@@ -11,4 +11,4 @@ RUN /ptz-proxy/rtsp/download_mediamtx.sh
...
@@ -11,4 +11,4 @@ RUN /ptz-proxy/rtsp/download_mediamtx.sh
RUN
mkdir
-p
/ptz-proxy/frontend/dist
RUN
mkdir
-p
/ptz-proxy/frontend/dist
WORKDIR
/ptz-proxy
WORKDIR
/ptz-proxy
CMD
["python", "-m", "uvicorn", "main:app", "--reload", "--host", "0.0.0.0", "--port", "9000"]
CMD
["python", "-m", "uvicorn", "main:app", "--reload", "--host", "0.0.0.0", "--port", "9000"]
\ No newline at end of file
This diff is collapsed.
Click to expand it.
onvif_proxy/camera.py
+
1
−
1
View file @
ccbf750a
...
@@ -24,7 +24,7 @@ class Camera:
...
@@ -24,7 +24,7 @@ class Camera:
else
:
else
:
raise
TypeError
raise
TypeError
wsdl_dir
=
os
.
path
.
join
(
site
.
getsitepackages
()[
0
],
'wsdl'
)
wsdl_dir
=
os
.
path
.
join
(
site
.
getsitepackages
()[
0
],
'
onvif/
wsdl'
)
self
.
onvif_camera
=
ONVIFCamera
(
host
,
port
,
username
,
password
,
wsdl_dir
)
self
.
onvif_camera
=
ONVIFCamera
(
host
,
port
,
username
,
password
,
wsdl_dir
)
self
.
media_service
=
None
self
.
media_service
=
None
self
.
profiles
=
None
self
.
profiles
=
None
...
...
This diff is collapsed.
Click to expand it.
onvif_proxy/cams_connection.py
+
2
−
2
View file @
ccbf750a
...
@@ -24,9 +24,9 @@ async def connect_cams():
...
@@ -24,9 +24,9 @@ async def connect_cams():
cams
[
_cam_id
]
=
Camera
(
**
kwargs
)
cams
[
_cam_id
]
=
Camera
(
**
kwargs
)
await
cams
[
_cam_id
].
update
()
await
cams
[
_cam_id
].
update
()
break
break
except
(
ONVIFError
,
httpx
.
ConnectTimeout
,
httpx
.
ConnectError
):
except
(
ONVIFError
,
httpx
.
ConnectTimeout
,
httpx
.
ConnectError
)
as
e
:
if
'name'
in
kwargs
:
if
'name'
in
kwargs
:
print
(
f
"Failed to connect to camera
:
{
kwargs
[
'name'
]
}
"
)
print
(
f
"Failed to connect to camera
{
kwargs
[
'name'
]
}
:
{
e
}
"
)
await
asyncio
.
sleep
(
5
)
await
asyncio
.
sleep
(
5
)
except
asyncio
.
CancelledError
:
except
asyncio
.
CancelledError
:
return
-
1
return
-
1
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment
Menu
Explore
Projects
Groups
Topics
Snippets