Files
displayarray/examples/test_pub_cam.py
simleek 31eb98c925 Added examples for newer API.
Former-commit-id: 7895f083379c6935d11e8ed164ee9a9eae75bc7e
2019-10-03 00:17:38 -07:00

23 lines
552 B
Python

import displayarray.frame_publising as w
import unittest as ut
class TestFrameHandler(ut.TestCase):
i = 0
def test_handler(self):
def test_frame_handler(frame, cam_id):
if self.i == 200:
w.subscriber_dictionary.stop_cam(cam_id)
if self.i % 100 == 0:
print(frame.shape)
self.i += 1
w.VideoHandlerThread(
0,
[test_frame_handler],
request_size=(1280, 720),
high_speed=True,
fps_limit=240,
)