|
@ -164,6 +164,9 @@ class WebRTCCamera(Thread): |
|
|
self._queue.put({'job':'connect_client', 'sid':sid}) |
|
|
self._queue.put({'job':'connect_client', 'sid':sid}) |
|
|
|
|
|
|
|
|
def disconnect_client(self, sid, room): |
|
|
def disconnect_client(self, sid, room): |
|
|
|
|
|
if sid == self.sid: |
|
|
|
|
|
print("CAMERA DISCONNECTED") |
|
|
|
|
|
return |
|
|
self._queue.put({'job':'disconnect_client', 'sid':sid}) |
|
|
self._queue.put({'job':'disconnect_client', 'sid':sid}) |
|
|
|
|
|
|
|
|
def start_global_pipeline(self): |
|
|
def start_global_pipeline(self): |
|
@ -186,6 +189,7 @@ class WebRTCCamera(Thread): |
|
|
bus = self.pipe.get_bus() |
|
|
bus = self.pipe.get_bus() |
|
|
|
|
|
|
|
|
self.pipe.set_state(Gst.State.PLAYING) |
|
|
self.pipe.set_state(Gst.State.PLAYING) |
|
|
|
|
|
print("GLOBAL PIPELINE RUNNING") |
|
|
|
|
|
|
|
|
def close_global_pipeline(self): |
|
|
def close_global_pipeline(self): |
|
|
self.pipe.set_state(Gst.State.NULL) |
|
|
self.pipe.set_state(Gst.State.NULL) |
|
@ -234,6 +238,7 @@ class WebRTCCamera(Thread): |
|
|
#webrtc.sync_children_states() |
|
|
#webrtc.sync_children_states() |
|
|
|
|
|
|
|
|
def close_client_pipeline(self, client_sid): |
|
|
def close_client_pipeline(self, client_sid): |
|
|
|
|
|
print("closing client pipeline") |
|
|
webrtcbin = self._peers[client_sid]['webrtcbin'] |
|
|
webrtcbin = self._peers[client_sid]['webrtcbin'] |
|
|
peer_bin = self._peers[client_sid]['bin'] |
|
|
peer_bin = self._peers[client_sid]['bin'] |
|
|
|
|
|
|
|
@ -247,6 +252,7 @@ class WebRTCCamera(Thread): |
|
|
|
|
|
|
|
|
self._peers[client_sid]['bin'] = None |
|
|
self._peers[client_sid]['bin'] = None |
|
|
self._peers[client_sid]['webrtcbin'] = None |
|
|
self._peers[client_sid]['webrtcbin'] = None |
|
|
|
|
|
del self._peers[client_sid] |
|
|
|
|
|
|
|
|
def handle_sdp_answer(self, sdp, client_sid): |
|
|
def handle_sdp_answer(self, sdp, client_sid): |
|
|
print("handle_sdp_answer") |
|
|
print("handle_sdp_answer") |
|
|