def add_export(self,export_range,export_dir):
logger.debug("Adding new video export process.")
should_terminate = mp.Value(c_bool,False)
frames_to_export = mp.Value(c_int,0)
current_frame = mp.Value(c_int,0)
rec_dir = self.g_pool.rec_dir
user_dir = self.g_pool.user_dir
start_frame= export_range.start
end_frame= export_range.stop+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,export_dir)
process = Export_Process(target=export, args=(should_terminate,frames_to_export,current_frame, rec_dir,user_dir,self.g_pool.min_data_confidence,start_frame,end_frame,plugins,out_file_path))
self.new_export = process
评论列表
文章目录