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