def add_export(self): # on MacOS we will not use os.fork, elsewhere this does nothing. forking_enable(0) logger.debug("Adding new export.") should_terminate = Value(c_bool, False) frames_to_export = Value(c_int, 0) current_frame = Value(c_int, 0) rec_dir = self.g_pool.rec_dir user_dir = self.g_pool.user_dir start_frame = self.g_pool.trim_marks.in_mark end_frame = self.g_pool.trim_marks.out_mark + 1 #end_frame is exclusive frames_to_export.value = end_frame - start_frame # Here we make clones of every plugin that supports it. # So it runs in the current config when we lauch the exporter. plugins = self.g_pool.plugins.get_initializers() out_file_path = verify_out_file_path(self.rec_name, self.g_pool.rec_dir) process = Export_Process( target=export, args=(should_terminate, frames_to_export, current_frame, rec_dir, user_dir, start_frame, end_frame, plugins, out_file_path)) self.new_export = process
def add_export(self): # on MacOS we will not use os.fork, elsewhere this does nothing. forking_enable(0) logger.debug("Adding new export.") should_terminate = Value(c_bool, False) frames_to_export = Value(c_int, 0) current_frame = Value(c_int, 0) rec_dir = self.g_pool.rec_dir user_dir = self.g_pool.user_dir start_frame = self.g_pool.trim_marks.in_mark end_frame = self.g_pool.trim_marks.out_mark + 1 # end_frame is exclusive frames_to_export.value = end_frame - start_frame # Here we make clones of every plugin that supports it. # So it runs in the current config when we lauch the exporter. plugins = self.g_pool.plugins.get_initializers() out_file_path = verify_out_file_path(self.rec_name, self.g_pool.rec_dir) process = Export_Process( target=export, args=( should_terminate, frames_to_export, current_frame, rec_dir, user_dir, start_frame, end_frame, plugins, out_file_path, ), ) self.new_export = process
def init_marker_cacher(self): forking_enable(0) #for MacOs only from marker_detector_cacher import fill_cache visited_list = [False if x == False else True for x in self.cache] video_file_path = os.path.join(self.g_pool.rec_dir,'world.avi') self.cache_queue = Queue() self.cacher_seek_idx = Value(c_int,0) self.cacher_run = Value(c_bool,True) self.cacher = Process(target=fill_cache, args=(visited_list,video_file_path,self.cache_queue,self.cacher_seek_idx,self.cacher_run)) self.cacher.start()
def init_marker_cacher(self): forking_enable(0) #for MacOs only from marker_detector_cacher import fill_cache visited_list = [False if x == False else True for x in self.cache] video_file_path = self.g_pool.capture.src timestamps = self.g_pool.capture.timestamps self.cache_queue = Queue() self.cacher_seek_idx = Value('i',0) self.cacher_run = Value(c_bool,True) self.cacher = Process(target=fill_cache, args=(visited_list,video_file_path,timestamps,self.cache_queue,self.cacher_seek_idx,self.cacher_run,self.min_marker_perimeter_cacher)) self.cacher.start()