Hi,
Can someone give me a working example of using socket.socketpair with gstreamer multisocketsink?
No matter what I try, I get socket timeout event from gstreamer and only one last frame from the read socket. It seams that socketpair blocks reading until writing takes place :(
My example:
print 'creating socket for client', self.client_address[0]
reader, writer = socket.socketpair()
reader.setblocking(False)
writer.setblocking(False)
while True:
data = reader.read(65536)
if not data:
break
self.wfile.write(data)
self.wfile.flush()
On gstreamer side:
client_id = Gio.Socket().new_from_fd(writer.fileno())
self.sink.emit("add", client_id)
while client_id in self.clients.keys():
time.sleep(1)
client_id.close()
What's wrong here?
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel