Пример #1
0
def prepareBroadcast():        
    NetworkUtils.cleanRoutes()
    ltspGW=NetworkUtils.ltspGW()
    if ltspGW!='0':
        NetworkUtils.addRoute('239.255.255.0', ltspGW)
    else:
        reactor.callLater(10, prepareBroadcast)
Пример #2
0
 def receive(self,encodec=False,teacherIP=''):        
     self.destroyProcess(self.procRx) 
     my_login = MyUtils.getLoginName()
     isLTSP = (MyUtils.isLTSP()!='')
     if my_login == 'root': NetworkUtils.cleanRoutes()              
     command = 'vlc -I dummy ' 
     if isLTSP:
         command +=  ' --no-overlay --vout=xcb_x11 '
     command +=  '--quiet --video-on-top --skip-frames --sout-display-delay=1100  --sub-track=0 --no-overlay '
     
     command +='  -f  rtp://@239.255.255.0:'
     command += self.port 
     logged=MyUtils.logged_user()
     if not isLTSP and my_login != 'root':
         self.procRx=subprocess.Popen(command, stdout=subprocess.PIPE,shell=True)
         MyUtils.launchAs("xset s off",my_login)
     else:    
         if logged !='root':
             self.procRx=MyUtils.launchAs(command, logged)
             MyUtils.launchAs("xset s off",logged)                
         else:        
             self.procRx=MyUtils.launchAsNobody(command)
               
     MyUtils.dpms_on()        
     Actions.disableKeyboardAndMouse(False)