Ejemplo n.º 1
0
    def load_media(self):
        # update list of media
        dct_media = {}
        # Create personalize media
        for conf_media in self.config.get_lst_media_config():
            name = conf_media.name
            o_media = conf_media.media(conf_media)
            if o_media.is_opened():
                if name in dct_media.keys():
                    log.print_function(logger.error,
                                       "Media %s already exist." % name)
                    continue
                dct_media[name] = o_media
                logger.info("Media %s detected." % name)
            else:
                log.print_function(logger.error,
                                   "Camera %s not detected" % name)
        # Force media_video
        media_video = media.media_video.MediaVideo(
            keys.get_media_file_video_name())
        dct_media[keys.get_media_file_video_name()] = media_video
        # TODO this is a hack to remove missing key warning about publisher
        # Register in publisher
        # media_video._get_cb_publisher()
        # Force create empty media
        from SeaGoatVision.server.media.implementation.empty import Empty

        dct_media[keys.get_media_empty_name()] = Empty(
            keys.get_media_empty_name())

        self.dct_media = dct_media
        self.set_all_publisher()
Ejemplo n.º 2
0
    def load_media(self):
        # update list of media
        dct_media = {}
        # Create personalize media
        for conf_media in self.config.get_lst_media_config():
            name = conf_media.name
            o_media = conf_media.media(conf_media)
            if o_media.is_opened():
                if name in dct_media.keys():
                    log.print_function(logger.error, "Media %s already exist." % name)
                    continue
                dct_media[name] = o_media
                logger.info("Media %s detected." % name)
            else:
                log.print_function(logger.error, "Camera %s not detected" % name)
        # Force media_video
        media_video = media.media_video.MediaVideo(keys.get_media_file_video_name())
        dct_media[keys.get_media_file_video_name()] = media_video
        # TODO this is a hack to remove missing key warning about publisher
        # Register in publisher
        # media_video._get_cb_publisher()
        # Force create empty media
        from SeaGoatVision.server.media.implementation.empty import Empty

        dct_media[keys.get_media_empty_name()] = Empty(keys.get_media_empty_name())

        self.dct_media = dct_media
        self.set_all_publisher()
Ejemplo n.º 3
0
 def get_type_media(self):
     return keys.get_media_empty_name()
Ejemplo n.º 4
0
 def get_type_media(self):
     return keys.get_media_empty_name()