Ejemplo n.º 1
0
 def __get_records(self, form):
     """ get record files return a json format flist """
     _ = form
     self.recmng.getlock()
     try:
         reclist = self.recmng.get_recordfiles()
     finally:
         self.__sendmsg(200, any2json_fstr(reclist))
         self.recmng.releaselock()
Ejemplo n.º 2
0
 def __get_records(self, form):
     """ get record files return a json format flist """
     _ = form
     self.recmng.getlock()
     try:
         reclist = self.recmng.get_recordfiles()
     finally:
         self.__sendmsg(200, any2json_fstr(reclist))
         self.recmng.releaselock()
Ejemplo n.º 3
0
 def __get_currparam(self, form):
     """ get curr video parameter """
     _ = form
     paradict = {}
     paradict = {'para_bright': self.vvpmng.process_cmd.bright,
                 'para_fps' : self.vvpmng.process_cmd.fps,
                 'para_bitrate' : self.vvpmng.process_cmd.bitrate,
                 'para_width' : self.vvpmng.process_cmd.width,
                 'para_height' : self.vvpmng.process_cmd.height}
     self.__sendmsg(200, any2json_fstr(paradict))
Ejemplo n.º 4
0
 def __get_currparam(self, form):
     """ get curr video parameter """
     _ = form
     paradict = {}
     paradict = {
         'para_bright': self.vvpmng.process_cmd.bright,
         'para_fps': self.vvpmng.process_cmd.fps,
         'para_bitrate': self.vvpmng.process_cmd.bitrate,
         'para_width': self.vvpmng.process_cmd.width,
         'para_height': self.vvpmng.process_cmd.height
     }
     self.__sendmsg(200, any2json_fstr(paradict))
Ejemplo n.º 5
0
 def __rm_records(self, form):
     """ remove video record """
     para_key = 'rm_fname'
     file2rm = ''
     if para_key in form.keys():
         file2rm = form[para_key].value
     else:
         return
     if file2rm:
         allfiles = self.recmng.get_recordfiles()
         if file2rm not in allfiles:
             return
     self.recmng.getlock()
     ret = -1
     try:
         ret = self.recmng.rm_recordfiles(file2rm)
     finally:
         if ret == 0 or ret == 1:
             APPLOGGER.info('rm success')
         elif ret == -1:
             APPLOGGER.info('rm failed')
         reclist = self.recmng.get_recordfiles()
         self.__sendmsg(200, any2json_fstr(reclist))
         self.recmng.releaselock()
Ejemplo n.º 6
0
 def __rm_records(self, form):
     """ remove video record """
     para_key = 'rm_fname'
     file2rm = ''
     if para_key in form.keys():
         file2rm = form[para_key].value
     else:
         return
     if file2rm:
         allfiles = self.recmng.get_recordfiles()
         if file2rm not in allfiles:
             return
     self.recmng.getlock()
     ret = -1
     try:
         ret = self.recmng.rm_recordfiles(file2rm)
     finally:
         if ret == 0 or ret == 1:
             APPLOGGER.info('rm success')
         elif ret == -1:
             APPLOGGER.info('rm failed')
         reclist = self.recmng.get_recordfiles()
         self.__sendmsg(200, any2json_fstr(reclist))
         self.recmng.releaselock()
Ejemplo n.º 7
0
 def __get_rtspport(self, form):
     """ get the real stream video port """
     _ = form
     self.__sendmsg(200, any2json_fstr(self.server.rtsp_port))
Ejemplo n.º 8
0
 def __get_vodport(self, form):
     """ get the vod serve port from cfg file """
     _ = form
     self.__sendmsg(200, any2json_fstr(self.server.vod_port))
Ejemplo n.º 9
0
 def __get_rtspport(self, form):
     """ get the real stream video port """
     _ = form
     self.__sendmsg(200, any2json_fstr(self.server.rtsp_port))
Ejemplo n.º 10
0
 def __get_vodport(self, form):
     """ get the vod serve port from cfg file """
     _ = form
     self.__sendmsg(200, any2json_fstr(self.server.vod_port))