Skip to content

Commit ca07d3e

Browse files
committed
Merge pull request #3 from PolygonalTree/master
Pull request to merge pySolo-VIdeo-RpiMod with PySolo-Video
2 parents 2c18142 + 71a74c8 commit ca07d3e

File tree

16 files changed

+811
-1
lines changed

16 files changed

+811
-1
lines changed

accessories/DesktopApp/receive_stream.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,9 @@ def open_with_socket():
3636
# Connect a client socket to my_server:8000 (change my_server to the
3737
# hostname of your server)
3838
client_socket = socket.socket()
39+
3940
client_socket.connect(('192.168.1.201', 8000))
41+
4042
connection = client_socket.makefile('rb')
4143

4244
try:

accessories/__init__.pyc

173 Bytes
Binary file not shown.
170 Bytes
Binary file not shown.
7.62 KB
Binary file not shown.
Binary file not shown.

mask.msk

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{"referencePoints": "none", "pointsToTrack": [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], "serial": "NO_SERIAL", "ROIS": [[[16, 52], [16, 452], [790, 452], [790, 52]], [[16, 52], [16, 78], [403, 78], [403, 52]], [[16, 78], [16, 104], [403, 104], [403, 78]], [[16, 102], [16, 128], [403, 128], [403, 102]], [[16, 128], [16, 153], [403, 153], [403, 128]], [[16, 153], [16, 179], [403, 179], [403, 153]], [[16, 177], [16, 203], [403, 203], [403, 177]], [[16, 203], [16, 228], [403, 228], [403, 203]], [[16, 227], [16, 252], [403, 252], [403, 227]], [[16, 252], [16, 278], [403, 278], [403, 252]], [[16, 278], [16, 304], [403, 304], [403, 278]], [[16, 302], [16, 328], [403, 328], [403, 302]], [[16, 328], [16, 353], [403, 353], [403, 328]], [[16, 353], [16, 379], [403, 379], [403, 353]], [[16, 377], [16, 403], [403, 403], [403, 377]], [[16, 403], [16, 428], [403, 428], [403, 403]], [[16, 427], [16, 452], [403, 452], [403, 427]], [[403, 52], [403, 78], [790, 78], [790, 52]], [[403, 78], [403, 104], [790, 104], [790, 78]], [[403, 102], [403, 128], [790, 128], [790, 102]], [[403, 128], [403, 153], [790, 153], [790, 128]], [[403, 153], [403, 179], [790, 179], [790, 153]], [[403, 177], [403, 203], [790, 203], [790, 177]], [[403, 203], [403, 228], [790, 228], [790, 203]], [[403, 227], [403, 252], [790, 252], [790, 227]], [[403, 252], [403, 278], [790, 278], [790, 252]], [[403, 278], [403, 304], [790, 304], [790, 278]], [[403, 302], [403, 328], [790, 328], [790, 302]], [[403, 328], [403, 353], [790, 353], [790, 328]], [[403, 353], [403, 379], [790, 379], [790, 353]], [[403, 377], [403, 403], [790, 403], [790, 377]], [[403, 403], [403, 428], [790, 428], [790, 403]], [[403, 427], [403, 452], [790, 452], [790, 427]]]}

pysolo_video.cfg

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
[Folders]
2+
data_folder = .
3+
mask_folder = .
4+
5+
[Recording]
6+
fps_recording = 15
7+
fps_preview = 5
8+
resolution = 1280, 720
9+
10+
[General]
11+
webcams = 1
12+
monitors = 1
13+
14+
[Monitor1]
15+
source = 1
16+
track = 0
17+
mask_file =
18+
track_type = XY_COORDS
19+
serial_port = NO SD
20+
inactivity_threshold = 7
21+
outputfile =
22+

pysolovide.zip

17.5 KB
Binary file not shown.

pysolovideo.py

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
# MA 02110-1301, USA.
2222
#
2323
#
24-
"""Version 1.3
24+
"""Version 1.4
2525
2626
Each Monitor has a camera that can be: realCam || VirtualCamMovies || VirtualCamFrames
2727
The class Monitor is handling the motion detection and data processing while the class Cam only handles
@@ -191,13 +191,23 @@ def startNetworkStream(self, port=8000):
191191
self.socket = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
192192
self.socket.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1)
193193
self.socket.bind(('', port))
194+
<<<<<<< HEAD
195+
print ("Live stream socket listening on port {p}...".format(p=port))
196+
=======
194197
print "Live stream socket listening on port {p}...".format(p=port)
198+
>>>>>>> 2c18142d99048230a47ad507b4237c753bbd75ed
195199
self.pipe = None
196200

197201
self.socket.listen(5)
198202

199203
self.socket_thread_1 = threading.Thread(target=self.socket_listen)
204+
<<<<<<< HEAD
205+
self.socket_thread_1.daemon=True
200206
self.socket_thread_2 = threading.Thread(target=self.socket_stream)
207+
self.socket_thread_2.daemon=True
208+
=======
209+
self.socket_thread_2 = threading.Thread(target=self.socket_stream)
210+
>>>>>>> 2c18142d99048230a47ad507b4237c753bbd75ed
201211
self.keepSocket = True
202212

203213
self.socket_thread_1.start()

rPI/restartScript.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
from subprocess import call
2+
3+
call(["ps axf | grep server.py | grep -v grep | awk '{print \"kill -2 \" $1}' | sh"],shell=True)
4+
5+
call(["python2 server.py"],shell=True)

0 commit comments

Comments
 (0)