12345678910111213141516171819 |
- def main():
- producer = kafka_producer(bootstrap_servers=['localhost:9092'], topic="VideoStream")
- test_image = Image(
- image_data = b"this is just a test string",
- height = 10,
- width = 10
- )
- for frame in range(100):
- test_image.frame = frame
- producer.send(test_image)
- sleep(1)
- if __name__ == "__main__":
- main()
|