コード例 #1
0
ファイル: requesthandler.py プロジェクト: sushiomsky/AstroBox
	def ice_candidate(self, data, clientId, done):
		#Manage the ice candidate for communicating with Janus from client
		if 'sessionId' in data:
			candidate = data['candidate']
			if candidate is not None or candidate['candidate'] is not None:
				webRtcManager().tickleIceCandidate(data['sessionId'], candidate['candidate'], candidate['sdpMid'], candidate['sdpMLineIndex'])

		done(None)
コード例 #2
0
ファイル: requesthandler.py プロジェクト: IceForgTW/AstroBox
	def ice_candidate(self, data, clientId, done):
		#Manage the ice candidate for communicating with Janus from client
		if 'sessionId' in data:
			candidate = data['candidate']
			if candidate is not None or candidate['candidate'] is not None:
				webRtcManager().tickleIceCandidate(data['sessionId'], candidate['candidate'], candidate['sdpMid'], candidate['sdpMLineIndex'])

		done(None)
コード例 #3
0
ファイル: requesthandler.py プロジェクト: TheUrbanWeb/3dbox
    def init_connection(self, data, clientId, done):
        #initialize the session on Janus
        #if there is not any session before, Janus is stopped,
        #so it will turn Janus on
        sessionId = webRtcManager().startPeerSession(clientId)

        if sessionId:
            done({'success': True, 'sessionId': sessionId})

        else:
            done({'error': True, 'message': 'Unable to start a session'})
コード例 #4
0
ファイル: requesthandler.py プロジェクト: AstroPrint/AstroBox
	def init_connection(self, data, clientId, done):
		#initialize the session on Janus
		#if there is not any session before, Janus is stopped,
		#so it will turn Janus on
		sessionId = webRtcManager().startPeerSession(clientId)

		if sessionId:
			done({
				'success': True,
				'sessionId': sessionId
			})

		else:
			done({
				'error': True,
				'message': 'Unable to start a session'
			})
コード例 #5
0
ファイル: camera.py プロジェクト: AstroPrint/AstroBox
	def startStreaming(self,data,sendResponse):
			webRtcManager().startVideoStream()

			sendResponse({'success': 'no-error'})
コード例 #6
0
ファイル: camera.py プロジェクト: AstroPrint/AstroBox
def start_streaming():
	webRtcManager().startVideoStream()

	return jsonify(SUCCESS)
コード例 #7
0
ファイル: camera.py プロジェクト: IceForgTW/AstroBox
def start_streaming():
    #open_camera
    webRtcManager().startGStreamer()

    return jsonify(SUCCESS)
コード例 #8
0
ファイル: __init__.py プロジェクト: AstroPrint/AstroBox
	def closeLocalVideoSession(self, sessionId):
		return webRtcManager().closeLocalSession(sessionId)
コード例 #9
0
ファイル: __init__.py プロジェクト: AstroPrint/AstroBox
	def shutdown(self):
		self._logger.info('Shutting Down GstreamerManager')
		self._freeApPipeline()
		self._haltCamera()
		webRtcManager().shutdown()
コード例 #10
0
ファイル: requesthandler.py プロジェクト: TheUrbanWeb/3dbox
 def start_connection(self, data, clientId, done):
     #Start Janus session and it starts to share video
     sessionId = data['sessionId']
     webRtcManager().setSessionDescriptionAndStart(sessionId, data)
     done(None)
コード例 #11
0
ファイル: camera.py プロジェクト: chris25640/AstroBox
def init_janus():
	#Start session in Janus
	if webRtcManager().ensureJanusRunning():
		return jsonify(SUCCESS)

	abort(500)
コード例 #12
0
ファイル: camera.py プロジェクト: chris25640/AstroBox
def start_streaming():
	#open_camera
	webRtcManager().startGStreamer()
	
	return jsonify(SUCCESS) 
コード例 #13
0
    def startStreaming(self, data, sendResponse):
        webRtcManager().startVideoStream()

        sendResponse({'success': 'no-error'})
コード例 #14
0
 def initJanus(self, sendResponse):
     #Start session in Janus
     if webRtcManager().startJanus():
         sendResponse({'success': 'no-error'})
     else:
         sendResponse('error_init_janus', True)
コード例 #15
0
ファイル: __init__.py プロジェクト: italocjs/AstroBox
 def closeLocalVideoSession(self, sessionId):
     return webRtcManager().closeLocalSession(sessionId)
コード例 #16
0
ファイル: requesthandler.py プロジェクト: AstroPrint/AstroBox
	def start_plugin(self, data, clientId, done):
		#Manage the plugin and the type of video source: VP8 or H264
		webRtcManager().preparePlugin(data['sessionId'])
		done(None)
コード例 #17
0
ファイル: __init__.py プロジェクト: italocjs/AstroBox
 def _haltCamera(self):
     self.close_camera()
     webRtcManager().closeAllSessions()
コード例 #18
0
ファイル: requesthandler.py プロジェクト: AstroPrint/AstroBox
	def start_connection(self, data, clientId, done):
		#Start Janus session and it starts to share video
		sessionId = data['sessionId']
		webRtcManager().setSessionDescriptionAndStart(sessionId, data)
		done(None)
コード例 #19
0
ファイル: requesthandler.py プロジェクト: TheUrbanWeb/3dbox
 def start_plugin(self, data, clientId, done):
     #Manage the plugin and the type of video source: VP8 or H264
     webRtcManager().preparePlugin(data['sessionId'])
     done(None)
コード例 #20
0
ファイル: requesthandler.py プロジェクト: AstroPrint/AstroBox
	def stop_connection(self, sessionId, clientId, done):
		#Stop Janus session
		#if this is the last (or unique) session in Janus,
		#Janus will be stopped (of course, Gstreamer too)
		webRtcManager().closePeerSession(sessionId)
		done(None)
コード例 #21
0
ファイル: requesthandler.py プロジェクト: TheUrbanWeb/3dbox
 def stop_connection(self, sessionId, clientId, done):
     #Stop Janus session
     #if this is the last (or unique) session in Janus,
     #Janus will be stopped (of course, Gstreamer too)
     webRtcManager().closePeerSession(sessionId)
     done(None)
コード例 #22
0
def start_streaming():
	webRtcManager().startVideoStream()

	return jsonify(SUCCESS)
コード例 #23
0
ファイル: __init__.py プロジェクト: AstroPrint/AstroBox
	def startLocalVideoSession(self, sessionId):
		return webRtcManager().startLocalSession(sessionId)
コード例 #24
0
def init_janus():
	#Start session in Janus
	if webRtcManager().startJanus():
		return jsonify(SUCCESS)

	abort(500)
コード例 #25
0
ファイル: __init__.py プロジェクト: AstroPrint/AstroBox
	def _haltCamera(self):
		self.close_camera()
		webRtcManager().closeAllSessions()
コード例 #26
0
ファイル: __init__.py プロジェクト: madhuni/AstroBox
 def startLocalVideoSession(self, sessionId):
     return webRtcManager().startLocalSession(sessionId)
コード例 #27
0
ファイル: camera.py プロジェクト: IceForgTW/AstroBox
def init_janus():
    #Start session in Janus
    if webRtcManager().ensureJanusRunning():
        return jsonify(SUCCESS)

    abort(500)
コード例 #28
0
ファイル: __init__.py プロジェクト: italocjs/AstroBox
 def shutdown(self):
     self._logger.info('Shutting Down GstreamerManager')
     self._freeApPipeline()
     self._haltCamera()
     webRtcManager().shutdown()
コード例 #29
0
ファイル: camera.py プロジェクト: AstroPrint/AstroBox
def init_janus():
	#Start session in Janus
	if webRtcManager().startJanus():
		return jsonify(SUCCESS)

	abort(500)
コード例 #30
0
ファイル: camera.py プロジェクト: AstroPrint/AstroBox
	def initJanus(self,sendResponse):
		#Start session in Janus
		if webRtcManager().startJanus():
			sendResponse({'success': 'no-error'})
		else:
			sendResponse('error_init_janus',True)