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 proxy
Commits
50844afe
Commit
50844afe
authored
2 years ago
by
Боярский Андрей Олегович
Browse files
Options
Download
Patches
Plain Diff
new requests added
parent
09fc5bca
master
flask
flask-docker
No related merge requests found
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
flask-app/confs/conf.json
+1
-0
flask-app/confs/conf.json
flask-app/confs/conf1.json
+2
-2
flask-app/confs/conf1.json
flask-app/utils/conf.json
+0
-1
flask-app/utils/conf.json
flask-app/utils/onvif_classes.py
+26
-6
flask-app/utils/onvif_classes.py
flask-app/utils/swagger.yml
+95
-12
flask-app/utils/swagger.yml
with
124 additions
and
21 deletions
+124
-21
flask-app/confs/conf.json
0 → 100644
+
1
−
0
View file @
50844afe
{
"default"
:
"1"
,
"default_cam"
:
"-1"
,
"ports"
:
{
"first"
:
"8001"
,
"last"
:
"8008"
},
"remote_controller"
:
{
"1"
:
{
"1"
:
{
"ip"
:
"172.18.191.193"
,
"port"
:
"8000"
,
"streamuri"
:
"rtsp://audi.proxy/studio/4"
},
"2"
:
{
"ip"
:
"172.18.191.194"
,
"port"
:
"2000"
,
"streamuri"
:
"rtsp://audi.proxy/studio/5"
},
"3"
:
{
"ip"
:
"172.18.191.195"
,
"port"
:
"2000"
,
"streamuri"
:
"rtsp://audi.proxy/studio/6"
},
"4"
:
{
"ip"
:
"172.18.191.196"
,
"port"
:
"80"
,
"streamuri"
:
"rtsp://audi.proxy/studio/7"
},
"5"
:
{
"ip"
:
"172.18.191.197"
,
"port"
:
"8080"
,
"streamuri"
:
"rtsp://audi.proxy/505/3"
}},
"2"
:
{
"1"
:
{
"ip"
:
"172.18.191.93"
,
"port"
:
"9000"
,
"streamuri"
:
"rtsp://audi.proxy/504/3"
},
"2"
:
{
"ip"
:
"172.18.191.94"
,
"port"
:
"80"
,
"streamuri"
:
"rtsp://audi.proxy/504/4"
},
"3"
:
{
"ip"
:
"172.18.191.95"
,
"port"
:
"80"
,
"streamuri"
:
"rtsp://audi.proxy/504/5"
},
"4"
:
{
"ip"
:
"172.18.191.96"
,
"port"
:
"80"
,
"streamuri"
:
"rtsp://audi.proxy/504/6"
},
"5"
:
{
"ip"
:
"172.18.191.53"
,
"port"
:
"80"
,
"streamuri"
:
"rtsp://audi.proxy/305/3"
},
"6"
:
{
"ip"
:
"172.18.191.54"
,
"port"
:
"80"
,
"streamuri"
:
"rtsp://audi.proxy/305/4"
},
"7"
:
{
"ip"
:
"172.18.191.55"
,
"port"
:
"80"
,
"streamuri"
:
"rtsp://audi.proxy/305/5"
}},
"3"
:
{
"2"
:
{
"ip"
:
"172.18.191.104"
,
"port"
:
"80"
,
"streamuri"
:
"rtsp://audi.proxy/506/4"
},
"3"
:
{
"ip"
:
"172.18.191.105"
,
"port"
:
"80"
,
"streamuri"
:
"rtsp://audi.proxy/506/5"
},
"4"
:
{
"ip"
:
"172.18.191.106"
,
"port"
:
"80"
,
"streamuri"
:
"rtsp://audi.proxy/506/6"
},
"5"
:
{
"ip"
:
"172.18.191.63"
,
"port"
:
"80"
,
"streamuri"
:
"rtsp://audi.proxy/306/3"
},
"6"
:
{
"ip"
:
"172.18.191.64"
,
"port"
:
"80"
,
"streamuri"
:
"rtsp://audi.proxy/306/4"
},
"7"
:
{
"ip"
:
"172.18.191.65"
,
"port"
:
"80"
,
"streamuri"
:
"rtsp://audi.proxy/306/5"
}},
"4"
:
{
"1"
:
{
"ip"
:
"172.18.191.83"
,
"port"
:
"80"
,
"streamuri"
:
"rtsp://audi.proxy/308/3"
},
"2"
:
{
"ip"
:
"172.18.191.84"
,
"port"
:
"80"
,
"streamuri"
:
"rtsp://audi.proxy/308/4"
},
"3"
:
{
"ip"
:
"172.18.191.85"
,
"port"
:
"80"
,
"streamuri"
:
"rtsp://audi.proxy/308/5"
},
"4"
:
{
"ip"
:
"172.18.191.86"
,
"port"
:
"80"
,
"streamuri"
:
"rtsp://audi.proxy/308/6"
},
"5"
:
{
"ip"
:
"172.18.191.73"
,
"port"
:
"80"
,
"streamuri"
:
"rtsp://audi.proxy/307/3"
},
"6"
:
{
"ip"
:
"172.18.191.74"
,
"port"
:
"80"
,
"streamuri"
:
"rtsp://audi.proxy/307/4"
},
"7"
:
{
"ip"
:
"172.18.191.75"
,
"port"
:
"80"
,
"streamuri"
:
"rtsp://audi.proxy/307/5"
}},
"5"
:
{
"1"
:
{
"ip"
:
"172.18.191.113"
,
"port"
:
"80"
,
"streamuri"
:
"rtsp://audi.proxy/00A/3"
},
"2"
:
{
"ip"
:
"172.18.191.114"
,
"port"
:
"80"
,
"streamuri"
:
"rtsp://audi.proxy/00A/4"
},
"3"
:
{
"ip"
:
"172.18.191.115"
,
"port"
:
"80"
,
"streamuri"
:
"rtsp://audi.proxy/00A/5"
},
"4"
:
{
"ip"
:
"172.18.191.116"
,
"port"
:
"80"
,
"streamuri"
:
"rtsp://audi.proxy/00A/6"
},
"5"
:
{
"ip"
:
"172.18.191.117"
,
"port"
:
"80"
,
"streamuri"
:
"rtsp://audi.proxy/00A/7"
},
"6"
:
{
"ip"
:
"172.18.191.118"
,
"port"
:
"80"
,
"streamuri"
:
"rtsp://audi.proxy/00A/8"
}},
"6"
:
{
"1"
:
{
"ip"
:
"172.18.191.123"
,
"port"
:
"9000"
,
"streamuri"
:
"rtsp://audi.proxy/00A/3"
},
"2"
:
{
"ip"
:
"172.18.191.124"
,
"port"
:
"8899"
,
"streamuri"
:
"rtsp://audi.proxy/00A/4"
},
"3"
:
{
"ip"
:
"172.18.191.125"
,
"port"
:
"80"
,
"streamuri"
:
"rtsp://audi.proxy/00A/5"
}},
"7"
:
{},
"8"
:
{
"2"
:
{
"ip"
:
"172.18.191.184"
,
"port"
:
"80"
,
"streamuri"
:
"rtsp://audi.proxy/00A/4"
},
"3"
:
{
"ip"
:
"172.18.191.185"
,
"port"
:
"2000"
,
"streamuri"
:
"rtsp://audi.proxy/00A/5"
}}},
"auditories"
:
{
"305"
:
{
"51"
:
{
"ip"
:
"172.18.191.51"
,
"port"
:
"80"
,
"streamuri"
:
"rtsp://audi.proxy/305/1"
},
"52"
:
{
"ip"
:
"172.18.191.52"
,
"port"
:
"8999"
,
"streamuri"
:
"rtsp://audi.proxy/305/2"
},
"53"
:
{
"ip"
:
"172.18.191.53"
,
"port"
:
"80"
,
"streamuri"
:
"rtsp://audi.proxy/305/3"
},
"54"
:
{
"ip"
:
"172.18.191.54"
,
"port"
:
"80"
,
"streamuri"
:
"rtsp://audi.proxy/305/4"
},
"55"
:
{
"ip"
:
"172.18.191.55"
,
"port"
:
"80"
,
"streamuri"
:
"rtsp://audi.proxy/305/5"
}},
"306"
:
{
"61"
:
{
"ip"
:
"172.18.191.61"
,
"port"
:
"80"
,
"streamuri"
:
"rtsp://audi.proxy/306/1"
},
"62"
:
{
"ip"
:
"172.18.191.62"
,
"port"
:
"80"
,
"streamuri"
:
"rtsp://audi.proxy/306/2"
},
"63"
:
{
"ip"
:
"172.18.191.63"
,
"port"
:
"80"
,
"streamuri"
:
"rtsp://audi.proxy/306/3"
},
"64"
:
{
"ip"
:
"172.18.191.64"
,
"port"
:
"80"
,
"streamuri"
:
"rtsp://audi.proxy/306/4"
},
"65"
:
{
"ip"
:
"172.18.191.65"
,
"port"
:
"80"
,
"streamuri"
:
"rtsp://audi.proxy/306/5"
}},
"307"
:
{
"71"
:
{
"ip"
:
"172.18.191.71"
,
"port"
:
"80"
,
"streamuri"
:
"rtsp://audi.proxy/307/1"
},
"72"
:
{
"ip"
:
"172.18.191.72"
,
"port"
:
"80"
,
"streamuri"
:
"rtsp://audi.proxy/307/2"
},
"73"
:
{
"ip"
:
"172.18.191.73"
,
"port"
:
"80"
,
"streamuri"
:
"rtsp://audi.proxy/307/3"
},
"74"
:
{
"ip"
:
"172.18.191.74"
,
"port"
:
"80"
,
"streamuri"
:
"rtsp://audi.proxy/307/4"
},
"75"
:
{
"ip"
:
"172.18.191.75"
,
"port"
:
"80"
,
"streamuri"
:
"rtsp://audi.proxy/307/5"
}},
"308"
:
{
"81"
:
{
"ip"
:
"172.18.191.81"
,
"port"
:
"80"
,
"streamuri"
:
"rtsp://audi.proxy/308/1"
},
"83"
:
{
"ip"
:
"172.18.191.83"
,
"port"
:
"80"
,
"streamuri"
:
"rtsp://audi.proxy/308/3"
},
"84"
:
{
"ip"
:
"172.18.191.84"
,
"port"
:
"80"
,
"streamuri"
:
"rtsp://audi.proxy/308/4"
},
"85"
:
{
"ip"
:
"172.18.191.85"
,
"port"
:
"80"
,
"streamuri"
:
"rtsp://audi.proxy/308/5"
},
"86"
:
{
"ip"
:
"172.18.191.86"
,
"port"
:
"80"
,
"streamuri"
:
"rtsp://audi.proxy/308/6"
}},
"435"
:
{
"15"
:
{
"ip"
:
"172.18.212.15"
,
"port"
:
"80"
,
"streamuri"
:
"rtsp://audi.proxy/435/4"
},
"16"
:
{
"ip"
:
"172.18.212.16"
,
"port"
:
"8080"
,
"streamuri"
:
"rtsp://audi.proxy/435/5"
},
"212"
:
{
"ip"
:
"172.18.190.212"
,
"port"
:
"8899"
,
"streamuri"
:
"rtsp://audi.proxy/435/8"
}},
"504"
:
{
"91"
:
{
"ip"
:
"172.18.191.91"
,
"port"
:
"80"
,
"streamuri"
:
"rtsp://audi.proxy/504/1"
},
"92"
:
{
"ip"
:
"172.18.191.92"
,
"port"
:
"80"
,
"streamuri"
:
"rtsp://audi.proxy/504/2"
},
"93"
:
{
"ip"
:
"172.18.191.93"
,
"port"
:
"9000"
,
"streamuri"
:
"rtsp://audi.proxy/504/3"
},
"94"
:
{
"ip"
:
"172.18.191.94"
,
"port"
:
"80"
,
"streamuri"
:
"rtsp://audi.proxy/504/4"
},
"95"
:
{
"ip"
:
"172.18.191.95"
,
"port"
:
"80"
,
"streamuri"
:
"rtsp://audi.proxy/504/5"
},
"96"
:
{
"ip"
:
"172.18.191.96"
,
"port"
:
"80"
,
"streamuri"
:
"rtsp://audi.proxy/504/6"
}},
"505"
:
{
"137"
:
{
"ip"
:
"172.18.191.137"
,
"port"
:
"8899"
,
"streamuri"
:
"rtsp://audi.proxy/505/2"
},
"192"
:
{
"ip"
:
"172.18.191.192"
,
"port"
:
"8000"
,
"streamuri"
:
"rtsp://audi.proxy/studio/3"
},
"193"
:
{
"ip"
:
"172.18.191.193"
,
"port"
:
"8000"
,
"streamuri"
:
"rtsp://audi.proxy/studio/4"
},
"194"
:
{
"ip"
:
"172.18.191.194"
,
"port"
:
"2000"
,
"streamuri"
:
"rtsp://audi.proxy/studio/5"
},
"195"
:
{
"ip"
:
"172.18.191.195"
,
"port"
:
"2000"
,
"streamuri"
:
"rtsp://audi.proxy/studio/6"
},
"196"
:
{
"ip"
:
"172.18.191.196"
,
"port"
:
"80"
,
"streamuri"
:
"rtsp://audi.proxy/studio/7"
},
"200"
:
{
"ip"
:
"172.18.191.200"
,
"port"
:
"8899"
,
"streamuri"
:
"rtsp://audi.proxy/studio/8"
},
"201"
:
{
"ip"
:
"172.18.191.201"
,
"port"
:
"8899"
,
"streamuri"
:
"rtsp://audi.proxy/505/8"
}},
"506"
:
{
"101"
:
{
"ip"
:
"172.18.191.101"
,
"port"
:
"80"
,
"streamuri"
:
"rtsp://audi.proxy/506/1"
},
"103"
:
{
"ip"
:
"172.18.191.103"
,
"port"
:
"80"
,
"streamuri"
:
"rtsp://audi.proxy/506/3"
},
"104"
:
{
"ip"
:
"172.18.191.104"
,
"port"
:
"9000"
,
"streamuri"
:
"rtsp://audi.proxy/506/4"
},
"105"
:
{
"ip"
:
"172.18.191.105"
,
"port"
:
"80"
,
"streamuri"
:
"rtsp://audi.proxy/506/5"
},
"106"
:
{
"ip"
:
"172.18.191.106"
,
"port"
:
"80"
,
"streamuri"
:
"rtsp://audi.proxy/506/6"
}},
"505a"
:
{
"197"
:
{
"ip"
:
"172.18.191.197"
,
"port"
:
"8080"
,
"streamuri"
:
"rtsp://audi.proxy/505/3"
}},
"00A"
:
{
"112"
:
{
"ip"
:
"172.18.191.112"
,
"port"
:
"80"
,
"streamuri"
:
"rtsp://audi.proxy/00A/2"
},
"113"
:
{
"ip"
:
"172.18.191.113"
,
"port"
:
"80"
,
"streamuri"
:
"rtsp://audi.proxy/00A/3"
},
"114"
:
{
"ip"
:
"172.18.191.114"
,
"port"
:
"80"
,
"streamuri"
:
"rtsp://audi.proxy/00A/4"
},
"115"
:
{
"ip"
:
"172.18.191.115"
,
"port"
:
"80"
,
"streamuri"
:
"rtsp://audi.proxy/00A/5"
},
"116"
:
{
"ip"
:
"172.18.191.116"
,
"port"
:
"80"
,
"streamuri"
:
"rtsp://audi.proxy/00A/6"
},
"117"
:
{
"ip"
:
"172.18.191.117"
,
"port"
:
"80"
,
"streamuri"
:
"rtsp://audi.proxy/00A/7"
},
"118"
:
{
"ip"
:
"172.18.191.118"
,
"port"
:
"80"
,
"streamuri"
:
"rtsp://audi.proxy/00A/8"
}},
"00B"
:
{
"122"
:
{
"ip"
:
"172.18.191.122"
,
"port"
:
"80"
,
"streamuri"
:
"rtsp://audi.proxy/00A/2"
},
"123"
:
{
"ip"
:
"172.18.191.123"
,
"port"
:
"9000"
,
"streamuri"
:
"rtsp://audi.proxy/00A/3"
},
"124"
:
{
"ip"
:
"172.18.191.124"
,
"port"
:
"8899"
,
"streamuri"
:
"rtsp://audi.proxy/00A/4"
},
"125"
:
{
"ip"
:
"172.18.191.125"
,
"port"
:
"80"
,
"streamuri"
:
"rtsp://audi.proxy/00A/5"
}}}}
\ No newline at end of file
This diff is collapsed.
Click to expand it.
flask-app/
util
s/conf1.json
→
flask-app/
conf
s/conf1.json
+
2
−
2
View file @
50844afe
...
@@ -2,8 +2,8 @@
...
@@ -2,8 +2,8 @@
"default"
:
"1"
,
"default"
:
"1"
,
"default_cam"
:
"-1"
,
"default_cam"
:
"-1"
,
"ports"
:
{
"ports"
:
{
"f"
:
"9001"
,
"f
irst
"
:
"9001"
,
"l"
:
"9028"
"l
ast
"
:
"9028"
},
},
"remote_controller"
:
{
"remote_controller"
:
{
"1"
:
{
"1"
:
{
...
...
This diff is collapsed.
Click to expand it.
flask-app/utils/conf.json
deleted
100644 → 0
+
0
−
1
View file @
09fc5bca
{
"default"
:
"8"
,
"default_cam"
:
"-1"
,
"ports"
:
{
"f"
:
"8001"
,
"l"
:
"8008"
},
"remote_controller"
:
{
"1"
:
{
"1"
:
{
"ip"
:
"172.18.191.193"
,
"port"
:
"8000"
,
"streamuri"
:
"rtsp://audi.proxy/studio/4"
},
"2"
:
{
"ip"
:
"172.18.191.194"
,
"port"
:
"2000"
,
"streamuri"
:
"rtsp://audi.proxy/studio/5"
},
"3"
:
{
"ip"
:
"172.18.191.195"
,
"port"
:
"2000"
,
"streamuri"
:
"rtsp://audi.proxy/studio/6"
},
"4"
:
{
"ip"
:
"172.18.191.196"
,
"port"
:
"80"
,
"streamuri"
:
"rtsp://audi.proxy/studio/7"
},
"5"
:
{
"ip"
:
"172.18.191.197"
,
"port"
:
"8080"
,
"streamuri"
:
"rtsp://audi.proxy/505/3"
}},
"2"
:
{
"1"
:
{
"ip"
:
"172.18.191.93"
,
"port"
:
"9000"
,
"streamuri"
:
"rtsp://audi.proxy/504/3"
},
"2"
:
{
"ip"
:
"172.18.191.94"
,
"port"
:
"80"
,
"streamuri"
:
"rtsp://audi.proxy/504/4"
},
"3"
:
{
"ip"
:
"172.18.191.95"
,
"port"
:
"80"
,
"streamuri"
:
"rtsp://audi.proxy/504/5"
},
"4"
:
{
"ip"
:
"172.18.191.96"
,
"port"
:
"80"
,
"streamuri"
:
"rtsp://audi.proxy/504/6"
},
"5"
:
{
"ip"
:
"172.18.191.53"
,
"port"
:
"80"
,
"streamuri"
:
"rtsp://audi.proxy/305/3"
},
"6"
:
{
"ip"
:
"172.18.191.54"
,
"port"
:
"80"
,
"streamuri"
:
"rtsp://audi.proxy/305/4"
},
"7"
:
{
"ip"
:
"172.18.191.55"
,
"port"
:
"80"
,
"streamuri"
:
"rtsp://audi.proxy/305/5"
}},
"3"
:
{
"2"
:
{
"ip"
:
"172.18.191.104"
,
"port"
:
"80"
,
"streamuri"
:
"rtsp://audi.proxy/506/4"
},
"3"
:
{
"ip"
:
"172.18.191.105"
,
"port"
:
"80"
,
"streamuri"
:
"rtsp://audi.proxy/506/5"
},
"4"
:
{
"ip"
:
"172.18.191.106"
,
"port"
:
"80"
,
"streamuri"
:
"rtsp://audi.proxy/506/6"
},
"5"
:
{
"ip"
:
"172.18.191.63"
,
"port"
:
"80"
,
"streamuri"
:
"rtsp://audi.proxy/306/3"
},
"6"
:
{
"ip"
:
"172.18.191.64"
,
"port"
:
"80"
,
"streamuri"
:
"rtsp://audi.proxy/306/4"
},
"7"
:
{
"ip"
:
"172.18.191.65"
,
"port"
:
"80"
,
"streamuri"
:
"rtsp://audi.proxy/306/5"
}},
"4"
:
{
"1"
:
{
"ip"
:
"172.18.191.83"
,
"port"
:
"80"
,
"streamuri"
:
"rtsp://audi.proxy/308/3"
},
"2"
:
{
"ip"
:
"172.18.191.84"
,
"port"
:
"80"
,
"streamuri"
:
"rtsp://audi.proxy/308/4"
},
"3"
:
{
"ip"
:
"172.18.191.85"
,
"port"
:
"80"
,
"streamuri"
:
"rtsp://audi.proxy/308/5"
},
"4"
:
{
"ip"
:
"172.18.191.86"
,
"port"
:
"80"
,
"streamuri"
:
"rtsp://audi.proxy/308/6"
},
"5"
:
{
"ip"
:
"172.18.191.73"
,
"port"
:
"80"
,
"streamuri"
:
"rtsp://audi.proxy/307/3"
},
"6"
:
{
"ip"
:
"172.18.191.74"
,
"port"
:
"80"
,
"streamuri"
:
"rtsp://audi.proxy/307/4"
},
"7"
:
{
"ip"
:
"172.18.191.75"
,
"port"
:
"80"
,
"streamuri"
:
"rtsp://audi.proxy/307/5"
}},
"5"
:
{
"1"
:
{
"ip"
:
"172.18.191.113"
,
"port"
:
"80"
,
"streamuri"
:
"rtsp://audi.proxy/00A/3"
},
"2"
:
{
"ip"
:
"172.18.191.114"
,
"port"
:
"80"
,
"streamuri"
:
"rtsp://audi.proxy/00A/4"
},
"3"
:
{
"ip"
:
"172.18.191.115"
,
"port"
:
"80"
,
"streamuri"
:
"rtsp://audi.proxy/00A/5"
},
"4"
:
{
"ip"
:
"172.18.191.116"
,
"port"
:
"80"
,
"streamuri"
:
"rtsp://audi.proxy/00A/6"
},
"5"
:
{
"ip"
:
"172.18.191.117"
,
"port"
:
"80"
,
"streamuri"
:
"rtsp://audi.proxy/00A/7"
},
"6"
:
{
"ip"
:
"172.18.191.118"
,
"port"
:
"80"
,
"streamuri"
:
"rtsp://audi.proxy/00A/8"
}},
"6"
:
{
"1"
:
{
"ip"
:
"172.18.191.123"
,
"port"
:
"9000"
,
"streamuri"
:
"rtsp://audi.proxy/00A/3"
},
"2"
:
{
"ip"
:
"172.18.191.124"
,
"port"
:
"8899"
,
"streamuri"
:
"rtsp://audi.proxy/00A/4"
},
"3"
:
{
"ip"
:
"172.18.191.125"
,
"port"
:
"80"
,
"streamuri"
:
"rtsp://audi.proxy/00A/5"
}},
"7"
:
{},
"8"
:
{
"2"
:
{
"ip"
:
"172.18.191.184"
,
"port"
:
"80"
,
"streamuri"
:
"rtsp://audi.proxy/00A/4"
},
"3"
:
{
"ip"
:
"172.18.191.185"
,
"port"
:
"2000"
,
"streamuri"
:
"rtsp://audi.proxy/00A/5"
}}},
"auditories"
:
{
"305"
:
{
"51"
:
{
"ip"
:
"172.18.191.51"
,
"port"
:
"80"
,
"streamuri"
:
"rtsp://audi.proxy/305/1"
},
"52"
:
{
"ip"
:
"172.18.191.52"
,
"port"
:
"8999"
,
"streamuri"
:
"rtsp://audi.proxy/305/2"
},
"53"
:
{
"ip"
:
"172.18.191.53"
,
"port"
:
"80"
,
"streamuri"
:
"rtsp://audi.proxy/305/3"
},
"54"
:
{
"ip"
:
"172.18.191.54"
,
"port"
:
"80"
,
"streamuri"
:
"rtsp://audi.proxy/305/4"
},
"55"
:
{
"ip"
:
"172.18.191.55"
,
"port"
:
"80"
,
"streamuri"
:
"rtsp://audi.proxy/305/5"
}},
"306"
:
{
"61"
:
{
"ip"
:
"172.18.191.61"
,
"port"
:
"80"
,
"streamuri"
:
"rtsp://audi.proxy/306/1"
},
"62"
:
{
"ip"
:
"172.18.191.62"
,
"port"
:
"80"
,
"streamuri"
:
"rtsp://audi.proxy/306/2"
},
"63"
:
{
"ip"
:
"172.18.191.63"
,
"port"
:
"80"
,
"streamuri"
:
"rtsp://audi.proxy/306/3"
},
"64"
:
{
"ip"
:
"172.18.191.64"
,
"port"
:
"80"
,
"streamuri"
:
"rtsp://audi.proxy/306/4"
},
"65"
:
{
"ip"
:
"172.18.191.65"
,
"port"
:
"80"
,
"streamuri"
:
"rtsp://audi.proxy/306/5"
}},
"307"
:
{
"71"
:
{
"ip"
:
"172.18.191.71"
,
"port"
:
"80"
,
"streamuri"
:
"rtsp://audi.proxy/307/1"
},
"72"
:
{
"ip"
:
"172.18.191.72"
,
"port"
:
"80"
,
"streamuri"
:
"rtsp://audi.proxy/307/2"
},
"73"
:
{
"ip"
:
"172.18.191.73"
,
"port"
:
"80"
,
"streamuri"
:
"rtsp://audi.proxy/307/3"
},
"74"
:
{
"ip"
:
"172.18.191.74"
,
"port"
:
"80"
,
"streamuri"
:
"rtsp://audi.proxy/307/4"
},
"75"
:
{
"ip"
:
"172.18.191.75"
,
"port"
:
"80"
,
"streamuri"
:
"rtsp://audi.proxy/307/5"
}},
"308"
:
{
"81"
:
{
"ip"
:
"172.18.191.81"
,
"port"
:
"80"
,
"streamuri"
:
"rtsp://audi.proxy/308/1"
},
"83"
:
{
"ip"
:
"172.18.191.83"
,
"port"
:
"80"
,
"streamuri"
:
"rtsp://audi.proxy/308/3"
},
"84"
:
{
"ip"
:
"172.18.191.84"
,
"port"
:
"80"
,
"streamuri"
:
"rtsp://audi.proxy/308/4"
},
"85"
:
{
"ip"
:
"172.18.191.85"
,
"port"
:
"80"
,
"streamuri"
:
"rtsp://audi.proxy/308/5"
},
"86"
:
{
"ip"
:
"172.18.191.86"
,
"port"
:
"80"
,
"streamuri"
:
"rtsp://audi.proxy/308/6"
}},
"435"
:
{
"15"
:
{
"ip"
:
"172.18.212.15"
,
"port"
:
"80"
,
"streamuri"
:
"rtsp://audi.proxy/435/4"
},
"16"
:
{
"ip"
:
"172.18.212.16"
,
"port"
:
"8080"
,
"streamuri"
:
"rtsp://audi.proxy/435/5"
},
"212"
:
{
"ip"
:
"172.18.190.212"
,
"port"
:
"8899"
,
"streamuri"
:
"rtsp://audi.proxy/435/8"
}},
"504"
:
{
"91"
:
{
"ip"
:
"172.18.191.91"
,
"port"
:
"80"
,
"streamuri"
:
"rtsp://audi.proxy/504/1"
},
"92"
:
{
"ip"
:
"172.18.191.92"
,
"port"
:
"80"
,
"streamuri"
:
"rtsp://audi.proxy/504/2"
},
"93"
:
{
"ip"
:
"172.18.191.93"
,
"port"
:
"9000"
,
"streamuri"
:
"rtsp://audi.proxy/504/3"
},
"94"
:
{
"ip"
:
"172.18.191.94"
,
"port"
:
"80"
,
"streamuri"
:
"rtsp://audi.proxy/504/4"
},
"95"
:
{
"ip"
:
"172.18.191.95"
,
"port"
:
"80"
,
"streamuri"
:
"rtsp://audi.proxy/504/5"
},
"96"
:
{
"ip"
:
"172.18.191.96"
,
"port"
:
"80"
,
"streamuri"
:
"rtsp://audi.proxy/504/6"
}},
"505"
:
{
"137"
:
{
"ip"
:
"172.18.191.137"
,
"port"
:
"8899"
,
"streamuri"
:
"rtsp://audi.proxy/505/2"
},
"192"
:
{
"ip"
:
"172.18.191.192"
,
"port"
:
"8000"
,
"streamuri"
:
"rtsp://audi.proxy/studio/3"
},
"193"
:
{
"ip"
:
"172.18.191.193"
,
"port"
:
"8000"
,
"streamuri"
:
"rtsp://audi.proxy/studio/4"
},
"194"
:
{
"ip"
:
"172.18.191.194"
,
"port"
:
"2000"
,
"streamuri"
:
"rtsp://audi.proxy/studio/5"
},
"195"
:
{
"ip"
:
"172.18.191.195"
,
"port"
:
"2000"
,
"streamuri"
:
"rtsp://audi.proxy/studio/6"
},
"196"
:
{
"ip"
:
"172.18.191.196"
,
"port"
:
"80"
,
"streamuri"
:
"rtsp://audi.proxy/studio/7"
},
"200"
:
{
"ip"
:
"172.18.191.200"
,
"port"
:
"8899"
,
"streamuri"
:
"rtsp://audi.proxy/studio/8"
},
"201"
:
{
"ip"
:
"172.18.191.201"
,
"port"
:
"8899"
,
"streamuri"
:
"rtsp://audi.proxy/505/8"
}},
"506"
:
{
"101"
:
{
"ip"
:
"172.18.191.101"
,
"port"
:
"80"
,
"streamuri"
:
"rtsp://audi.proxy/506/1"
},
"103"
:
{
"ip"
:
"172.18.191.103"
,
"port"
:
"80"
,
"streamuri"
:
"rtsp://audi.proxy/506/3"
},
"104"
:
{
"ip"
:
"172.18.191.104"
,
"port"
:
"9000"
,
"streamuri"
:
"rtsp://audi.proxy/506/4"
},
"105"
:
{
"ip"
:
"172.18.191.105"
,
"port"
:
"80"
,
"streamuri"
:
"rtsp://audi.proxy/506/5"
},
"106"
:
{
"ip"
:
"172.18.191.106"
,
"port"
:
"80"
,
"streamuri"
:
"rtsp://audi.proxy/506/6"
}},
"505a"
:
{
"197"
:
{
"ip"
:
"172.18.191.197"
,
"port"
:
"8080"
,
"streamuri"
:
"rtsp://audi.proxy/505/3"
}},
"00A"
:
{
"112"
:
{
"ip"
:
"172.18.191.112"
,
"port"
:
"80"
,
"streamuri"
:
"rtsp://audi.proxy/00A/2"
},
"113"
:
{
"ip"
:
"172.18.191.113"
,
"port"
:
"80"
,
"streamuri"
:
"rtsp://audi.proxy/00A/3"
},
"114"
:
{
"ip"
:
"172.18.191.114"
,
"port"
:
"80"
,
"streamuri"
:
"rtsp://audi.proxy/00A/4"
},
"115"
:
{
"ip"
:
"172.18.191.115"
,
"port"
:
"80"
,
"streamuri"
:
"rtsp://audi.proxy/00A/5"
},
"116"
:
{
"ip"
:
"172.18.191.116"
,
"port"
:
"80"
,
"streamuri"
:
"rtsp://audi.proxy/00A/6"
},
"117"
:
{
"ip"
:
"172.18.191.117"
,
"port"
:
"80"
,
"streamuri"
:
"rtsp://audi.proxy/00A/7"
},
"118"
:
{
"ip"
:
"172.18.191.118"
,
"port"
:
"80"
,
"streamuri"
:
"rtsp://audi.proxy/00A/8"
}},
"00B"
:
{
"122"
:
{
"ip"
:
"172.18.191.122"
,
"port"
:
"80"
,
"streamuri"
:
"rtsp://audi.proxy/00A/2"
},
"123"
:
{
"ip"
:
"172.18.191.123"
,
"port"
:
"9000"
,
"streamuri"
:
"rtsp://audi.proxy/00A/3"
},
"124"
:
{
"ip"
:
"172.18.191.124"
,
"port"
:
"8899"
,
"streamuri"
:
"rtsp://audi.proxy/00A/4"
},
"125"
:
{
"ip"
:
"172.18.191.125"
,
"port"
:
"80"
,
"streamuri"
:
"rtsp://audi.proxy/00A/5"
}}}}
\ No newline at end of file
This diff is collapsed.
Click to expand it.
flask-app/utils/onvif_classes.py
+
26
−
6
View file @
50844afe
...
@@ -136,6 +136,16 @@ def replace_token(response, octet):
...
@@ -136,6 +136,16 @@ def replace_token(response, octet):
def
return_soap
(
response
):
def
return_soap
(
response
):
return
Response
(
response
,
mimetype
=
'application/soap+xml'
)
return
Response
(
response
,
mimetype
=
'application/soap+xml'
)
def
return_ports_and_presets
(
input
):
output
=
{
"ports"
:
input
[
"ports"
]
}
presets
=
{}
for
i
in
list
(
input
[
"remote_controller"
].
keys
()):
presets
[
i
]
=
list
(
input
[
"remote_controller"
][
i
].
keys
())
output
[
"presets"
]
=
presets
return
output
HTTP_METHODS
=
[
'GET'
,
'HEAD'
,
'POST'
,
'PUT'
,
'DELETE'
,
'CONNECT'
,
'OPTIONS'
,
'TRACE'
,
'PATCH'
]
HTTP_METHODS
=
[
'GET'
,
'HEAD'
,
'POST'
,
'PUT'
,
'DELETE'
,
'CONNECT'
,
'OPTIONS'
,
'TRACE'
,
'PATCH'
]
#cameras = json.load(open(os.path.join(os.path.dirname(__file__), 'conf.json')))
#cameras = json.load(open(os.path.join(os.path.dirname(__file__), 'conf.json')))
...
@@ -156,15 +166,26 @@ class Proccesser():
...
@@ -156,15 +166,26 @@ class Proccesser():
with
open
(
os
.
path
.
join
(
os
.
path
.
dirname
(
os
.
path
.
realpath
(
__file__
)),
'image'
,
path
),
"rb"
)
as
f
:
with
open
(
os
.
path
.
join
(
os
.
path
.
dirname
(
os
.
path
.
realpath
(
__file__
)),
'image'
,
path
),
"rb"
)
as
f
:
return
Response
(
f
.
read
(),
mimetype
=
"image/jpeg"
)
return
Response
(
f
.
read
(),
mimetype
=
"image/jpeg"
)
@self.app.route
(
"/inconf/all"
,
methods
=
HTTP_METHODS
)
def
return_all_conf_presets
():
output
=
{}
confs_directory
=
os
.
path
.
join
(
os
.
path
.
dirname
(
os
.
path
.
dirname
(
os
.
path
.
realpath
(
__file__
))),
"confs"
)
for
root
,
dirs
,
files
in
os
.
walk
(
os
.
path
.
abspath
(
confs_directory
)):
for
file
in
files
:
output
[
file
]
=
return_ports_and_presets
(
json
.
load
(
open
(
os
.
path
.
join
(
root
,
file
))))
return
jsonify
(
output
)
@self.app.route
(
"/inconf"
,
methods
=
HTTP_METHODS
)
def
return_this_conf_presets
():
return
jsonify
(
return_ports_and_presets
(
self
.
cameras
))
@self.app.route
(
"/preset/total"
,
methods
=
HTTP_METHODS
)
@self.app.route
(
"/preset/total"
,
methods
=
HTTP_METHODS
)
@self.app.route
(
"/preset/total/<preset>"
,
methods
=
HTTP_METHODS
)
@self.app.route
(
"/preset/total/<preset>"
,
methods
=
HTTP_METHODS
)
def
return_total
(
preset
=
None
):
def
return_total
(
preset
=
None
):
if
preset
==
None
:
if
preset
==
None
:
return
Response
(
str
(
len
(
list
(
self
.
cameras
[
"remote_controller"
].
keys
()))).
encode
(),
return
jsonify
({
"number"
:
len
(
list
(
self
.
cameras
[
"remote_controller"
].
keys
()))})
status
=
200
)
else
:
else
:
return
Response
(
str
(
len
(
list
(
self
.
cameras
[
"remote_controller"
][
preset
].
keys
()))).
encode
(),
return
jsonify
({
"number"
:
len
(
list
(
self
.
cameras
[
"remote_controller"
][
preset
].
keys
()))})
status
=
200
)
@self.app.route
(
"/ports"
,
methods
=
HTTP_METHODS
)
@self.app.route
(
"/ports"
,
methods
=
HTTP_METHODS
)
def
return_ports
():
def
return_ports
():
...
@@ -178,8 +199,7 @@ class Proccesser():
...
@@ -178,8 +199,7 @@ class Proccesser():
self
.
cameras
[
"default"
]
=
preset
self
.
cameras
[
"default"
]
=
preset
with
open
(
self
.
conf_path
,
'w'
)
as
j
:
with
open
(
self
.
conf_path
,
'w'
)
as
j
:
json
.
dump
(
self
.
cameras
,
j
)
json
.
dump
(
self
.
cameras
,
j
)
return
Response
(
str
(
len
(
list
(
self
.
cameras
[
"remote_controller"
][
self
.
cameras
[
"default"
]].
keys
()))).
encode
(),
return
jsonify
({
"number"
:
len
(
list
(
self
.
cameras
[
"remote_controller"
][
self
.
cameras
[
"default"
]].
keys
()))})
status
=
200
)
@self.app.route
(
"/update"
,
methods
=
HTTP_METHODS
)
@self.app.route
(
"/update"
,
methods
=
HTTP_METHODS
)
def
update_instance
():
def
update_instance
():
self
.
cameras
=
json
.
load
(
open
(
self
.
conf_path
))
self
.
cameras
=
json
.
load
(
open
(
self
.
conf_path
))
...
...
This diff is collapsed.
Click to expand it.
flask-app/utils/swagger.yml
+
95
−
12
View file @
50844afe
...
@@ -7,7 +7,7 @@ tags:
...
@@ -7,7 +7,7 @@ tags:
-
name
:
"
Получение
технической
информации"
-
name
:
"
Получение
технической
информации"
description
:
"
Получение
технической
информации,
нужной
для
работы
пультов"
description
:
"
Получение
технической
информации,
нужной
для
работы
пультов"
-
name
:
"
Настройка"
-
name
:
"
Настройка"
description
:
"
Изменение
настроек
ONV
O
F-Proxy"
description
:
"
Изменение
настроек
ONV
I
F-Proxy"
schemes
:
schemes
:
-
"
http"
-
"
http"
paths
:
paths
:
...
@@ -20,10 +20,13 @@ paths:
...
@@ -20,10 +20,13 @@ paths:
produces
:
produces
:
-
"
application/json"
-
"
application/json"
responses
:
responses
:
"
200"
:
200
:
description
:
"
Пресет
изменен
успешно,
возвращено
число
камер
в
пресете"
description
:
"
Словарь
из
одного
значения"
"
400"
:
schema
:
description
:
"
Нет
такого
пресета"
type
:
"
object"
properties
:
number
:
type
:
"
integer"
/ports
:
/ports
:
get
:
get
:
tags
:
tags
:
...
@@ -33,13 +36,11 @@ paths:
...
@@ -33,13 +36,11 @@ paths:
-
"
application/json"
-
"
application/json"
responses
:
responses
:
200
:
200
:
description
:
"
Словарь
из
двух
значени
й
"
description
:
"
Словарь
из
одного
значени
я
"
schema
:
schema
:
type
:
"
object"
type
:
"
object"
properties
:
properties
:
f
:
number
:
type
:
"
integer"
l
:
type
:
"
integer"
type
:
"
integer"
/preset/total
:
/preset/total
:
get
:
get
:
...
@@ -50,10 +51,92 @@ paths:
...
@@ -50,10 +51,92 @@ paths:
produces
:
produces
:
-
"
text/plain"
-
"
text/plain"
responses
:
responses
:
"
200
"
:
200
:
description
:
"
Возвращено
число
пресетов
"
description
:
"
Словарь
из
одного
значения
"
schema
:
schema
:
type
:
"
integer"
type
:
"
object"
properties
:
number
:
type
:
"
integer"
/inconf
:
get
:
tags
:
-
"
Получение
технической
информации"
summary
:
"
Получение
разбивки
портов
и
занесенных
камер
в
этом
конфиге"
produces
:
-
"
application/json"
responses
:
200
:
description
:
"
Словарь
из
двух
словарей:
с
портами
и
с
занесенными
камерами"
schema
:
type
:
"
object"
properties
:
ports
:
type
:
"
object"
properties
:
first
:
type
:
"
integer"
last
:
type
:
"
integer"
presets
:
type
:
"
object"
properties
:
1
:
type
:
"
array"
example
:
[
"
1"
,
"
2"
,
"
5"
]
2
:
type
:
"
array"
example
:
[
"
1"
,
"
3"
,
"
4"
]
/inconf/all
:
get
:
tags
:
-
"
Получение
технической
информации"
summary
:
"
Получение
разбивки
портов
и
занесенных
камер
во
всех
конфигах"
produces
:
-
"
application/json"
responses
:
200
:
description
:
"
Словарь
из
словарей"
type
:
"
object"
properties
:
conf_name1
:
type
:
"
object"
properties
:
ports
:
type
:
"
object"
properties
:
first
:
type
:
"
integer"
last
:
type
:
"
integer"
presets
:
type
:
"
object"
properties
:
1
:
type
:
"
array"
example
:
[
"
1"
,
"
2"
,
"
5"
]
2
:
type
:
"
array"
example
:
[
"
1"
,
"
3"
,
"
4"
]
conf_name2
:
type
:
"
object"
properties
:
ports
:
type
:
"
object"
properties
:
first
:
type
:
"
integer"
last
:
type
:
"
integer"
presets
:
type
:
"
object"
properties
:
1
:
type
:
"
array"
example
:
[
"
1"
,
"
2"
,
"
5"
]
2
:
type
:
"
array"
example
:
[
"
1"
,
"
3"
,
"
4"
]
/preset/total/<preset>
:
/preset/total/<preset>
:
get
:
get
:
tags
:
tags
:
...
...
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