def exist(lib_name, list_target_name, target) : global __system_list debug.verbose("exist= " + lib_name + " in " + str(list_target_name)) find_target = False for target_name in list_target_name: if target_name in __system_list: find_target = True if find_target == False: return False for target_name in reversed(list_target_name): if target_name not in __system_list: continue for data in __system_list[target_name]: if data["name"] == lib_name: # we find it in the List ==> need to check if it is present in the system : if data["loaded"] == False: debug.verbose("add to path: '" + os.path.dirname(data["path"]) + "'") sys.path.append(os.path.dirname(data["path"])) debug.verbose("import system : '" + data["name"] + "'") the_system = __import__(env.get_build_system_base_name() + __start_system_name + target_name + "_" + data["name"]) #create the system module debug.verbose("SYSTEM: request: " + str(data["name"])) if "System" in dir(the_system): data["system"] = the_system.System(target) data["exist"] = data["system"].get_valid() """ if data["exist"] == False: debug.warning("Can not Import: '" + data["name"] + "' ==> disabled") """ else: debug.warning("Not find: '" + data["name"] + "' ==> get exception") return data["exist"] return False
def parse_arg(argument): debug.warning("parse arg : " + argument.get_option_name() + " " + argument.get_arg()) if argument.get_option_name() == "help": usage() return True elif argument.get_option_name() == "version": version() return True elif argument.get_option_name() == "verbose": debug.set_level(int(argument.get_arg())) return True elif argument.get_option_name() == "color": if check_boolean(argument.get_arg()) == True: debug.enable_color() else: debug.disable_color() return True elif argument.get_option_name() == "folder": folder = argument.get_arg() return True elif argument.get_option_name() == "action": global requestAction requestAction = argument.get_arg() return True return False
def check_save(self): if self.need_save == False: return debug.warning("Save bdd: " + self.file) data = json.dumps(self.bdd, sort_keys=True, indent=4) self.need_save = False tools.file_write_data_safe(self.file, data)
def resize(src_file, dest_file, x, y, cmd_file=None): if os.path.exists(src_file) == False: debug.error("Request a resize an image that does not existed : '" + src_file + "'") return if enable_resize_image == False: debug.warning("Can not resize image missing pillow or CoreGraphics : '" + src_file + "' (just copy)") tools.copy_file(src_file, dest_file) return cmd_line = "resize Image : " + src_file + " ==> " + dest_file + " newSize=(" + str(x) + "x" + str(y) + ")" if depend.need_re_build(dest_file, src_file, file_cmd=cmd_file , cmd_line=cmd_line) == False: return # add cmdLine ... x = get_pow_2_multiple(x) extension = dest_file[dest_file.rfind('.'):] if platform.system() == "Darwin": source_image = CoreGraphics.CGImageImport(CoreGraphics.CGDataProviderCreateWithFilename(src_file)) source_width = source_image.getWidth() source_height = source_image.getHeight() if source_width <= x: # for small image just copy: tools.copy_file(src_file, dest_file) else: if y <= 0: # keep ratio : y = int(float(x) * float(source_height) / float(source_width)) y = get_pow_2_multiple(y) debug.print_element("resize Image (" + str(x) + "x" + str(y) + ")", src_file, "==>", dest_file) debug.debug("Resize image: " + src_file + " size=(" + str(source_width) + "x" + str(source_height) + ") -> (" + str(x) + "x" + str(y) + ")") source_image_rect = CoreGraphics.CGRectMake(0, 0, source_width, source_height) new_image = source_image.createWithImageInRect(source_image_rect) colors_space = CoreGraphics.CGColorSpaceCreateDeviceRGB() colors = CoreGraphics.CGFloatArray(5) context = CoreGraphics.CGBitmapContextCreateWithColor(x, y, colors_space, colors) context.setInterpolationQuality(CoreGraphics.kCGInterpolationHigh) new_image_rect = CoreGraphics.CGRectMake(0, 0, x, y) context.drawImage(new_image_rect, new_image) tools.create_directory_of_file(dest_file) if extension == ".jpeg": context.writeToFile(dest_file, CoreGraphics.kCGImageFormatJPEG) elif extension == ".png": context.writeToFile(dest_file, CoreGraphics.kCGImageFormatPNG) else: debug.error(" can not manage extention ... : " + dest_file) else: # open an image file (.bmp,.jpg,.png,.gif) you have in the working path im1 = Image.open(src_file) if im1.size[0] <= x: # for small image just copy: tools.copy_file(src_file, dest_file) else: if y <= 0: # keep ratio : y = int(float(x) * float(im1.size[1]) / float(im1.size[0])) y = get_pow_2_multiple(y) debug.print_element("resize Image (" + str(x) + "x" + str(y) + ")", src_file, "==>", dest_file) # use one of these filter options to resize the image tmpImage = im1.resize((x, y), Image.ANTIALIAS) tools.create_directory_of_file(dest_file) tmpImage.save(dest_file) tools.store_command(cmd_line, cmd_file)
def configure(target, my_module): my_module.add_header_file([ 'ffmpeg/*.h', ], recursive=True) generated_path = os.path.join("generated", target.get_name()) generated_path_bs = os.path.join( "generated", target.get_name() + "_" + str(target.get_bus_size())) if os.path.exists( os.path.join(os.path.dirname(__file__), generated_path_bs)) == True: #my_module.add_path(generated_path_bs) my_module.add_header_file([ generated_path_bs + "/*", ], recursive=True) elif os.path.exists(os.path.join(os.path.dirname(__file__), generated_path)) == True: #my_module.add_path(generated_path) my_module.add_header_file([ generated_path + "/*", ], recursive=True) else: debug.warning("get default Path for type: " + str(target.get_type())) #my_module.add_path("generated/Linux") my_module.add_header_file([ "generated/Linux/*", ], recursive=True) return True
async def streaming(_response): debug.info("streaming " + str(_response)) total_size = 0 temporary_file = os.path.join(_app.config['REST_TMP_DATA'], str(tmp_value) + ".tmp") if not os.path.exists(_app.config['REST_TMP_DATA']): os.makedirs(_app.config['REST_TMP_DATA']) if not os.path.exists(_app.config['REST_MEDIA_DATA']): os.makedirs(_app.config['REST_MEDIA_DATA']) file_stream = open(temporary_file, "wb") sha1 = hashlib.sha512() while True: body = await _request.stream.read() if body is None: debug.warning("empty body") break total_size += len(body) debug.verbose("body " + str(len(body)) + "/" + str(total_size)) file_stream.write(body) sha1.update(body) file_stream.close() print("SHA512: " + str(sha1.hexdigest())) destination_filename = os.path.join(_app.config['REST_MEDIA_DATA'], str(sha1.hexdigest())) if os.path.isfile(destination_filename) == True: answer_data = { "size": total_size, "sha512": str(sha1.hexdigest()), 'filename': _request.headers["filename"], 'mime-type': _request.headers["mime-type"], "already_exist": True, } await _response.write( json.dumps(answer_data, sort_keys=True, indent=4)) return # move the file shutil.move(temporary_file, destination_filename) # collect media info ... media_info = MediaInfo.parse(destination_filename) data_metafile = { "sha512": str(sha1.hexdigest()), "size": total_size, 'filename': _request.headers["filename"], 'mime-type': _request.headers["mime-type"], 'media-info': json.loads(media_info.to_json()) } tools.file_write_data( destination_filename + ".meta", json.dumps(data_metafile, sort_keys=True, indent=4)) answer_data = { "size": total_size, "sha512": str(sha1.hexdigest()), 'filename': _request.headers["filename"], 'mime-type': _request.headers["mime-type"], "already_exist": True, } await _response.write( json.dumps(answer_data, sort_keys=True, indent=4))
def list_append_to(out_list, in_list, order=False): if type(in_list) == str: list_append_and_check(out_list, in_list, order) elif type(in_list) == list: # mulyiple imput in the list ... for elem in in_list: list_append_and_check(out_list, elem, order) elif type(in_list) == dict: list_append_and_check(out_list, in_list, order) else: debug.warning("can not add in list other than {list/dict/str} : " + str(type(in_list)))
def list_all_target_with_desc(): global __target_list tmpList = [] for mod in __target_list: sys.path.append(os.path.dirname(mod[1])) theTarget = __import__(env.get_build_system_base_name() + __start_target_name + mod[0]) try: tmpdesc = theTarget.get_desc() tmpList.append([mod[0], tmpdesc]) except: debug.warning("has no name : " + mod[0]) tmpList.append([mod[0], ""]) return tmpList
def show_video(elem_video_id, indent): indent_data = "" while indent > 0: indent_data += "\t" indent -= 1 result_video = requests.get("http://127.0.0.1:15080/video/" + str(elem_video_id) + "") if result_video.status_code == 200: video = result_video.json() debug.info(indent_data + "- " + str(video["generated_name"])) else: debug.warning(indent_data + "get video id: " + str(elem_video_id) + " !!!!!! " + str(result_video.status_code) + "")
def configure(target, my_module): # add the file to compile: my_module.add_src_file([ 'ffmpeg/libswresample/audioconvert.c', 'ffmpeg/libswresample/dither.c', 'ffmpeg/libswresample/options.c', 'ffmpeg/libswresample/rematrix.c', 'ffmpeg/libswresample/resample.c', 'ffmpeg/libswresample/resample_dsp.c', 'ffmpeg/libswresample/swresample.c', 'ffmpeg/libswresample/swresample_frame.c', ]) if target.get_arch() == "x86": my_module.add_src_file([ 'ffmpeg/libswresample/x86/audio_convert_init.c', 'ffmpeg/libswresample/x86/rematrix_init.c', 'ffmpeg/libswresample/x86/resample_init.c', ]) elif target.get_arch() == "arm" \ and target.get_bus_size() == "32": my_module.add_src_file([ 'ffmpeg/libswresample/arm/audio_convert_init.c', 'ffmpeg/libswresample/arm/audio_convert_neon.S', 'ffmpeg/libswresample/arm/resample.S', 'ffmpeg/libswresample/arm/resample_init.c', ]) elif target.get_arch() == "arm" \ and target.get_bus_size() == "64": my_module.add_src_file([ 'ffmpeg/libswresample/aarch64/audio_convert_init.c', 'ffmpeg/libswresample/aarch64/audio_convert_neon.S', 'ffmpeg/libswresample/aarch64/neontest.c', ]) else: debug.warning("unknow architecture ..."); my_module.compile_version("c", 1999) lutinLib_ffmpegCommon.add_common_property(target, my_module); # add dependency of libraries: my_module.add_depend('c') my_module.add_depend('m') my_module.add_depend('z') my_module.add_depend('pthread') my_module.add_depend([ 'ffmpeg-avutil', 'ffmpeg-headers', ]) return True
def add_generate_path(target, my_module): #return generated_path = os.path.join("generated", target.get_name()) generated_path_bs = os.path.join( "generated", target.get_name() + "_" + str(target.get_bus_size())) if os.path.exists( os.path.join(os.path.dirname(__file__), generated_path_bs)) == True: #debug.error(" ppppp: " + generated_path); my_module.add_path(generated_path_bs) elif os.path.exists(os.path.join(os.path.dirname(__file__), generated_path)) == True: #debug.error(" ppppp: " + generated_path); my_module.add_path(generated_path) else: debug.warning("get default Path for type: " + str(target.get_type())) my_module.add_path("generated/Linux")
def get_maintainer_from_file_or_direct(path_module, filename_or_author): # check case of iser set the version directly if type(filename_or_author) == list: return filename_or_author # this use a version file file_data = file_read_data(os.path.join(path_module, filename_or_author)) if len(file_data) == 0: debug.warning("not enought data in the file author size=0 " + path_module + " / " + filename_or_author) return [] # One user by line and # for comment line out = [] for elem in file_data.split('\n'): if len(elem) == 0: continue if elem[0] == "#": # comment ... continue out.append(elem) return out
def __init__(self, target): system.System.__init__(self) # create some HELP: self.set_help("CXX: Generic C++ library") self.set_valid(True) if target.config["compilator"] == "clang": if target.board_id < 21: debug.error("Clang work only with the board wersion >= 21 : android 5.x.x") self.valid = False return self.add_flag("c++", "-D__STDCPP_LLVM__") # llvm is BSD-like licence self.add_path(os.path.join(target.path_ndk, "sources", "cxx-stl", "llvm-libc++", "libcxx", "include")) if target.type_arch == "armv5": stdCppBasePath = os.path.join(target.path_ndk, "sources", "cxx-stl", "llvm-libc++", "libcxx", "libs", "armeabi") self.add_path( os.path.join(stdCppBasePath, "include")) self.add_flag("link", os.path.join(stdCppBasePath, "libc++_static.a")) elif target.type_arch == "armv7": stdCppBasePath = os.path.join(target.path_ndk, "sources", "cxx-stl", "llvm-libc++", "libs", "armeabi-v7a") self.add_path( os.path.join(stdCppBasePath + "include")) self.add_flag("link", os.path.join(stdCppBasePath, "thumb", "libc++_static.a")) elif target.type_arch == "mips": stdCppBasePath = os.path.join(target.path_ndk, "sources", "cxx-stl", "llvm-libc++", "libcxx", "libs", "mips") self.add_path( os.path.join(stdCppBasePath + "include")) self.add_flag("link", os.path.join(stdCppBasePath + "libc++_static.a")) elif target.type_arch == "x86": stdCppBasePath = os.path.join(target.path_ndk, "sources", "cxx-stl", "llvm-libc++", "libcxx", "libs", "x86") self.add_path( os.path.join(stdCppBasePath, "include")) self.add_flag("link", os.path.join(stdCppBasePath, "libc++_static.a")) else: debug.warning("unknow architecture: '" + str(target.arch) + "'"); else: self.add_flag("c++", "-D__STDCPP_GNU__") self.add_flag("c++-remove","-nostdlib") self.add_flag("need-libstdc++", True) # GPL v3 (+ exception link for gcc compilator) self.add_path(os.path.join(target.path_ndk, "sources", "cxx-stl", "gnu-libstdc++", target.compilator_version, "include")) if target.type_arch == "armv5": stdCppBasePath = os.path.join(target.path_ndk, "sources", "cxx-stl", "gnu-libstdc++", target.compilator_version, "libs", "armeabi") self.add_path( os.path.join(stdCppBasePath, "include")) self.add_flag("link", os.path.join(stdCppBasePath, "thumb", "libgnustl_static.a")) self.add_flag("link", os.path.join(stdCppBasePath, "thumb", "libsupc++.a")) elif target.type_arch == "armv7": stdCppBasePath = os.path.join(target.path_ndk, "sources", "cxx-stl", "gnu-libstdc++", target.compilator_version, "libs", "armeabi-v7a") self.add_path( os.path.join(stdCppBasePath, "include")) self.add_flag("link", os.path.join(stdCppBasePath, "thumb", "libgnustl_static.a")) self.add_flag("link", os.path.join(stdCppBasePath, "thumb", "libsupc++.a")) elif target.type_arch == "mips": stdCppBasePath = os.path.join(target.path_ndk, "sources", "cxx-stl", "gnu-libstdc++", target.compilator_version, "libs", "mips") self.add_path( os.path.join(stdCppBasePath, "include/")) self.add_flag("link", os.path.join(stdCppBasePath, "libgnustl_static.a")) self.add_flag("link", os.path.join(stdCppBasePath, "libsupc++.a")) elif target.type_arch == "x86": stdCppBasePath = os.path.join(target.path_ndk, "sources", "cxx-stl", "gnu-libstdc++", target.compilator_version, "libs", "x86") self.add_path( os.path.join(stdCppBasePath, "include")) self.add_flag("link", os.path.join(stdCppBasePath, "libgnustl_static.a")) self.add_flag("link", os.path.join(stdCppBasePath, "libsupc++.a")) else: debug.warning("unknow architecture: '" + str(target.arch) + "'"); debug.warning("plop")
def run(self): debug.verbose("Starting " + self.name) global exit_flag global current_thread_working working_set = False while exit_flag == False: self.lock.acquire() if not self.queue.empty(): if working_set == False: current_thread_working += 1 working_set = True data = self.queue.get() self.lock.release() debug.verbose(self.name + " processing '" + data[0] + "'") if data[0]=="cmd_line": comment = data[2] cmd_line = data[1] cmd_store_file = data[3] debug.print_element("[" + str(data[4]) + "][" + str(self.thread_id) + "] " + comment[0], comment[1], comment[2], comment[3]) run_command(cmd_line, cmd_store_file, build_id=data[4], file=comment[3], store_output_file=data[5], depend_data=data[6]) else: debug.warning("unknow request command : " + data[0]) else: if working_set==True: current_thread_working -= 1 working_set=False # no element to parse, just wait ... self.lock.release() time.sleep(0.2) # kill requested ... debug.verbose("Exiting " + self.name)
def run_command_direct(cmd_line): # prepare command line: args = shlex.split(cmd_line) debug.verbose("cmd = " + str(args)) try: # create the subprocess p = subprocess.Popen(args, stdout=subprocess.PIPE, stderr=subprocess.PIPE) except subprocess.CalledProcessError as e: debug.error("subprocess.CalledProcessError : " + str(args)) except: debug.error("Exception on : " + str(args)) # launch the subprocess: output, err = p.communicate() if sys.version_info >= (3, 0): output = output.decode("utf-8") err = err.decode("utf-8") # Check error : if p.returncode == 0: if output == None: return err[:-1]; return output[:-1]; else: debug.warning("get an error cmd " + str(err)) return False
def get_version_from_file_or_direct(path_module, filename_or_version): # check case of iser set the version directly if type(filename_or_version) == list: return filename_or_version # this use a version file file_data = file_read_data(os.path.join(path_module, filename_or_version)) if len(file_data) == 0: debug.warning("not enought data in the file version size=0 " + path_module + " / " + filename_or_version) return [0, 0, 0] lines = file_data.split("\n") if len(lines) != 1: debug.warning( "More thatn one line in the file version ==> bas case use mode: 'XX', XX.YYY', 'XX.Y.ZZZ' or 'XX.Y-dev' : " + path_module + " / " + filename_or_version) return [0, 0, 0] line = lines[0] debug.debug("Parse line: '" + line + "'") #check if we have "-dev" dev_mode = "" list_tiret = line.split('-') if len(list_tiret) > 2: debug.warning("more than one '-' in version file " + str(filename_or_version) + " : '" + str(list_tiret) + "' in '" + path_module + "'") if len(list_tiret) >= 2: dev_mode = list_tiret[1] line = list_tiret[0] out = [] list_elem = line.split('.') for elem in list_elem: out.append(int(elem)) if dev_mode != "": out.append(dev_mode) debug.debug(" ==> " + str(out)) return out
def check_with_model(self, _data): if self.model == None: return True values = [] for elem in dir(self.model): if elem[:2] == "__": continue values.append(elem) have_error = False for key in _data.keys(): if key not in values: have_error = True # TODO: ... debug.warning("Add element that is not allowed " + key + " not in " + str(values)) for elem in values: if key not in _data.keys(): have_error = True # TODO: ... debug.warning("Missing key " + elem + " not in " + str(_data.keys())) if have_error == True: return False for key in _data.keys(): elem = getattr(self.model, key) if type(elem) == list: find_error = True for my_type in elem: if type(_data[key]) == my_type: find_error = False break if find_error == True: debug.warning("data : " + str(_data)) tmp_list = [] for my_type in elem: tmp_list.append(my_type.__name__) debug.warning("[key='" + key + "'] try to add wrong type in BDD " + type(_data[key]).__name__ + " is not: " + str(my_type)) else: if type(_data[key]) != getattr(self.model, key): debug.warning("data : " + str(_data)) debug.warning("[key='" + key + "'] try to add wrong type in BDD " + type(_data[key]).__name__ + " is not: " + getattr(self.model, key).__name__) return False return True
def make_package_binary(self, pkg_name, pkg_properties, base_pkg_path, heritage_list, static): debug.debug("------------------------------------------------------------------------") debug.info("Generate package '" + pkg_name + "' v" + tools.version_to_string(pkg_properties["VERSION"])) debug.debug("------------------------------------------------------------------------") #output path target_outpath = self.get_staging_path(pkg_name) tools.create_directory_of_file(target_outpath) ## Create share datas: self.make_package_binary_data(target_outpath, pkg_name, base_pkg_path, heritage_list, static) ## copy binary files # in Android Package we have no binary element, only shared object ... (and java start file) ## Create libraries (special case of Android...) copy_list={} target_outpath_lib = os.path.join(target_outpath, self.pkg_path_lib) tools.create_directory_of_file(target_outpath_lib) # copy application lib: (needed to lunch ...) file_src = self.get_build_file_dynamic(pkg_name) if os.path.isfile(file_src): debug.debug(" need copy: " + file_src + " to " + target_outpath_lib) tools.copy_file(file_src, os.path.join(target_outpath_lib, os.path.basename(file_src)), in_list=copy_list) # copy other if needed: if static == False: #copy all shared libsh... debug.verbose("libs for " + str(pkg_name) + ":") for heritage in heritage_list.list_heritage: debug.debug("sub elements: " + str(heritage.name)) file_src = self.get_build_file_dynamic(heritage.name) debug.verbose(" has directory: " + file_src) if os.path.isfile(file_src): debug.debug(" need copy: " + file_src + " to " + target_outpath_lib) #copy all data: # TODO : We can have a problem when writing over library files ... tools.copy_file(file_src, os.path.join(target_outpath_lib, os.path.basename(file_src)), in_list=copy_list) #real copy files tools.copy_list(copy_list) if self.pkg_path_lib != "": # remove unneded files (NOT folder ...) tools.clean_directory(target_outpath_lib, copy_list) ## Create generic files: self.make_package_generic_files(target_outpath, pkg_properties, pkg_name, base_pkg_path, heritage_list, static) ## create specific android project (local) pkg_name_application_name = pkg_name if self.config["mode"] == "debug": pkg_name_application_name += "debug" #debug.info("ploppppp: " + str(pkg_properties)) # FINAL_path_JAVA_PROJECT self.path_java_project = os.path.join(target_outpath, "src") if pkg_properties["COMPAGNY_TYPE"] != "": self.path_java_project = os.path.join(self.path_java_project, pkg_properties["COMPAGNY_TYPE"]) if pkg_properties["COMPAGNY_NAME2"] != "": self.path_java_project = os.path.join(self.path_java_project, pkg_properties["COMPAGNY_NAME2"]) self.path_java_project = os.path.join(self.path_java_project, pkg_name_application_name) #FINAL_FILE_ABSTRACTION self.file_final_abstraction = os.path.join(self.path_java_project, pkg_name_application_name + ".java") compleatePackageName = "" if pkg_properties["COMPAGNY_TYPE"] != "": compleatePackageName += pkg_properties["COMPAGNY_TYPE"] + "." if pkg_properties["COMPAGNY_NAME2"] != "": compleatePackageName += pkg_properties["COMPAGNY_NAME2"] + "." compleatePackageName += pkg_name_application_name if "ADMOD_ID" in pkg_properties: pkg_properties["RIGHT"].append("INTERNET") pkg_properties["RIGHT"].append("ACCESS_NETWORK_STATE") debug.print_element("pkg", "absractionFile", "<==", "dynamic file") # Create path : tools.create_directory_of_file(self.file_final_abstraction) # Create file : # java ==> done by ewol wrapper ... (and compiled in the normal compilation system ==> must be find in the dependency list of jar ... tools.create_directory_of_file(target_outpath + "/res/drawable/icon.png"); if "ICON" in pkg_properties.keys() \ and pkg_properties["ICON"] != "": image.resize(pkg_properties["ICON"], target_outpath + "/res/drawable/icon.png", 256, 256) else: # to be sure that we have all time a resource ... tmpFile = open(target_outpath + "/res/drawable/plop.txt", 'w') tmpFile.write('plop\n') tmpFile.flush() tmpFile.close() if pkg_properties["ANDROID_MANIFEST"]!="": debug.print_element("pkg", "AndroidManifest.xml", "<==", pkg_properties["ANDROID_MANIFEST"]) tools.copy_file(pkg_properties["ANDROID_MANIFEST"], target_outpath + "/AndroidManifest.xml", force=True) else: debug.error("missing parameter 'ANDROID_MANIFEST' in the properties ... ") #add properties on wallpaper : # myModule.add_pkg("ANDROID_WALLPAPER_PROPERTIES", ["list", key, title, summary, [["key","value display"],["key2","value display 2"]]) # myModule.add_pkg("ANDROID_WALLPAPER_PROPERTIES", ["list", "testpattern", "Select test pattern", "Choose which test pattern to display", [["key","value display"],["key2","value display 2"]]]) # myModule.add_pkg("ANDROID_WALLPAPER_PROPERTIES", ["bool", key, title, summary, ["enable string", "disable String"]) # myModule.add_pkg("ANDROID_WALLPAPER_PROPERTIES", ["bool", "movement", "Motion", "Apply movement to test pattern", ["Moving test pattern", "Still test pattern"] #copy needed resources : for res_source, res_dest in pkg_properties["ANDROID_RESOURCES"]: if res_source == "": continue tools.copy_file(res_source , target_outpath + "/res/" + res_dest + "/" + os.path.basename(res_source), force=True) # Doc : # http://asantoso.wordpress.com/2009/09/15/how-to-build-android-application-package-apk-from-the-command-line-using-the-sdk-tools-continuously-integrated-using-cruisecontrol/ debug.print_element("pkg", "R.java", "<==", "Resources files") tools.create_directory_of_file(target_outpath + "/src/noFile") android_tool_path = self.path_sdk + "/build-tools/" # find android tool version dirnames = tools.get_list_sub_path(android_tool_path) if len(dirnames) == 0: debug.warning("This does not comport directory: '" + android_tool_path + "'") debug.error("An error occured when getting the tools for android") elif len(dirnames) > 1: dirnames = sorted(dirnames, reverse=True) debug.debug("sort tools directory: '" + str(dirnames) + "' ==> select : " + str(dirnames[0])) android_tool_path += dirnames[0] + "/" # this is to create resource file for android ... (we did not use aset in jar with ewol ... adModResoucepath = "" if "ADMOD_ID" in pkg_properties: adModResoucepath = " -S " + self.path_sdk + "/extras/google/google_play_services/libproject/google-play-services_lib/res/ " cmdLine = android_tool_path + "aapt p -f " \ + "-M " + target_outpath + "/AndroidManifest.xml " \ + "-F " + target_outpath + "/resources.res " \ + "-I " + self.path_sdk + "/platforms/android-" + str(self.board_id) + "/android.jar "\ + "-S " + target_outpath + "/res/ " \ + adModResoucepath \ + "-J " + target_outpath + "/src/ " multiprocess.run_command(cmdLine) tools.create_directory_of_file(target_outpath + "/build/classes/noFile") debug.print_element("pkg", "*.class", "<==", "*.java") #generate android java files: filesString="" """ old : if "ADMOD_ID" in pkg_properties: # TODO : check this I do not think it is really usefull ... ==> write for IDE only ... filesString += self.path_sdk + "/extras/google/google_play_services/libproject/google-play-services_lib/src/android/UnusedStub.java " if len(pkg_properties["ANDROID_WALLPAPER_PROPERTIES"])!=0: filesString += self.path_java_project + pkg_name_application_name + "Settings.java " adModJarFile = "" if "ADMOD_ID" in pkg_properties: adModJarFile = ":" + self.path_sdk + "/extras/google/google_play_services/libproject/google-play-services_lib/libs/google-play-services.jar" cmdLine = "javac " \ + "-d " + self.get_staging_path(pkg_name) + "/build/classes " \ + "-classpath " + self.path_sdk + "/platforms/android-" + str(self.board_id) + "/android.jar" \ + adModJarFile + " " \ + filesString \ + self.file_final_abstraction + " " \ + self.get_staging_path(pkg_name) + "/src/R.java " multiprocess.run_command(cmdLine) """ debug.verbose("heritage .so=" + str(tools.filter_extention(heritage_list.src['dynamic'], ["so"]))) debug.verbose("heritage .jar=" + str(tools.filter_extention(heritage_list.src['src'], ["jar"]))) class_extern = "" upper_jar = tools.filter_extention(heritage_list.src['src'], ["jar"]) #debug.warning("ploppppp = " + str(upper_jar)) for elem in upper_jar: if len(class_extern) > 0: class_extern += ":" class_extern += elem # create enpoint element : cmdLine = "javac " \ + "-d " + target_outpath + "/build/classes " \ + "-classpath " + class_extern + " " \ + target_outpath + "/src/R.java " multiprocess.run_command(cmdLine) debug.print_element("pkg", ".dex", "<==", "*.class") cmdLine = android_tool_path + "dx " \ + "--dex --no-strict " \ + "--output=" + target_outpath + "/build/" + pkg_name_application_name + ".dex " \ + target_outpath + "/build/classes/ " if "ADMOD_ID" in pkg_properties: cmdLine += self.path_sdk + "/extras/google/google_play_services/libproject/google-play-services_lib/libs/google-play-services.jar " # add element to dexification: for elem in upper_jar: # remove android sdk: if elem[-len("android.jar"):] != "android.jar": cmdLine += elem + " " multiprocess.run_command(cmdLine) debug.print_element("pkg", ".apk", "<==", ".dex, assets, .so, res") #builderDebug="-agentlib:jdwp=transport=dt_socket,server=y,address=8050,suspend=y " builderDebug="" # note : set -u not signed application... #+ ":" + self.path_sdk + "/extras/google/google_play_services/libproject/google-play-services_lib/libs/google-play-services.jar " cmdLine = "java -Xmx128M " \ + " -classpath " + self.path_sdk + "/tools/lib/sdklib.jar " \ + builderDebug \ + " com.android.sdklib.build.ApkBuilderMain " \ + target_outpath + "/build/" + pkg_name_application_name + "-unalligned.apk " \ + " -u " \ + " -z " + target_outpath + "/resources.res " \ + " -f " + target_outpath + "/build/" + pkg_name_application_name + ".dex " \ + " -rf " + target_outpath + "/data " multiprocess.run_command(cmdLine) # doc : # http://developer.android.com/tools/publishing/app-signing.html # Create a key for signing your application: # keytool -genkeypair -v -keystore AndroidKey.jks -storepass Pass__AndroidDebugKey -alias alias__AndroidDebugKey -keypass PassKey__AndroidDebugKey -keyalg RSA -validity 36500 if self.config["mode"] == "debug": debug.print_element("pkg", ".apk(signed debug)", "<==", ".apk (not signed)") # verbose mode : #debugOption = "-verbose -certs " debugOption = "" cmdLine = "jarsigner " \ + debugOption \ + "-keystore " + tools.get_current_path(__file__) + "/AndroidDebugKey.jks " \ + " -sigalg SHA1withRSA -digestalg SHA1 " \ + " -storepass Pass__AndroidDebugKey " \ + " -keypass PassKey__AndroidDebugKey " \ + target_outpath + "/build/" + pkg_name_application_name + "-unalligned.apk " \ + " alias__AndroidDebugKey" multiprocess.run_command(cmdLine) tmpFile = open("tmpPass.boo", 'w') tmpFile.write("\n") tmpFile.flush() tmpFile.close() else: print("On release mode we need the file : and key an pasword to sign the application ...") debug.print_element("pkg", ".apk(signed debug)", "<==", ".apk (not signed)") cmdLine = "jarsigner " \ + " -keystore " + pkg_properties["ANDROID_SIGN"] + " " \ + " -sigalg SHA1withRSA -digestalg SHA1 " \ + target_outpath + "/build/" + pkg_name_application_name + "-unalligned.apk " \ + " " + pkg_name_application_name multiprocess.run_command(cmdLine) cmdLine = "jarsigner " \ + " -verify -verbose -certs " \ + " -sigalg SHA1withRSA -digestalg SHA1 " \ + target_outpath + "/build/" + pkg_name_application_name + "-unalligned.apk " multiprocess.run_command(cmdLine) debug.print_element("pkg", ".apk(aligned)", "<==", ".apk (not aligned)") tools.remove_file(target_outpath + "/" + pkg_name_application_name + ".apk") # verbose mode : -v cmdLine = android_tool_path + "zipalign 4 " \ + target_outpath + "/build/" + pkg_name_application_name + "-unalligned.apk " \ + target_outpath + "/" + pkg_name_application_name + ".apk " multiprocess.run_command(cmdLine) # copy file in the final stage : tools.copy_file(target_outpath + "/" + pkg_name_application_name + ".apk", self.get_final_path() + "/" + pkg_name_application_name + ".apk", force=True)
def push_video_file(_path, _basic_key={}): file_name, file_extension = os.path.splitext(_path) debug.info("Send file: '" + file_name + "' with extention " + file_extension) # internal file_extension ... if file_extension == "sha512": debug.verbose("file: '" + _path + "' sha512 extention ...") return True debug.info("Add media : '" + _path + "'") if file_extension[1:] not in ["avi", "mkv", "mov", "mp4", "ts"] \ and file_name not in ["cover_1.jpg","cover_1.png", "cover_1.till", "cover_1.bmp", "cover_1.tga"]: debug.warning("Not send file : " + _path + " Not manage file_extension... " + file_extension) return False if file_name in [ "cover_1.jpg", "cover_1.png", "cover_1.till", "cover_1.bmp", "cover_1.tga" ]: # find a cover... debug.warning("Not send cover Not managed ... : " + _path + " Not manage ...") """ debug.info("Send cover for: " + _basic_key["series-name"] + " " + _basic_key["saison"]); if _basic_key["series-name"] == "": debug.error(" ==> can not asociate at a specific seri"); return False; etk::String groupName = _basic_key["series-name"]; if _basic_key["saison"] != "": groupName += ":" + _basic_key["saison"]; auto sending = _srv.setGroupCover(zeus::File::create(_path.getString(), ""), groupName); sending.onSignal(progressCallback); sending.waitFor(echrono::seconds(20000)); """ return True """ if etk::path::exist(_path + ".sha512") == True: debug.verbose("file sha512 exist ==> read it"); uint64_t time_sha512 = get_modify_time(_path + ".sha512"); uint64_t time_elem = get_modify_time(_path); storedSha512_file = file_read_data(_path + ".sha512") debug.verbose("file sha == " + storedSha512_file); if time_elem > time_sha512: debug.verbose("file time > sha time ==> regenerate new one ..."); # check the current sha512 storedSha512 = calculate_sha512(_path); debug.verbose("calculated new sha'" + storedSha512 + "'"); if storedSha512_file != storedSha512: # need to remove the old sha file auto idFileToRemove_fut = _srv.getId(storedSha512_file).waitFor(echrono::seconds(2)); if idFileToRemove_fut.hasError() == True: debug.error("can not remove the remote file with sha " + storedSha512_file); else: debug.info("Remove old deprecated file: " + storedSha512_file); _srv.remove(idFileToRemove_fut.get()); # note, no need to wait the call is async ... and the user does not interested with the result ... # store new sha512 ==> this update tile too ... file.open(etk::io::OpenMode::Write); file.writeAll(storedSha512); file.close(); else: # store new sha512 /* storedSha512 = file.readAllString(); file.open(etk::io::OpenMode::Read); file.writeAll(storedSha512); file.close(); */ storedSha512 = storedSha512_file; debug.verbose("read all sha from the file'" + storedSha512 + "'"); else: """ """ if True: storedSha512 = calculate_sha512(_path) file_write_data(_path + ".sha512", storedSha512); debug.info("calculate and store sha512 '" + storedSha512 + "'"); debug.info("check file existance: sha='" + storedSha512 + "'"); """ # push only if the file exist """ # TODO : Check the metadata updating ... auto idFile_fut = _srv.getId(storedSha512).waitFor(echrono::seconds(2)); if idFile_fut.hasError() == False: # media already exit ==> stop here ... return True; # TODO: Do it better ==> add the calback to know the push progression ... debug.verbose("Add File : " + _path + " sha='" + storedSha512 + "'"); auto sending = _srv.add(zeus::File::create(_path, storedSha512)); sending.onSignal(progressCallback); debug.verbose("Add done ... now waiting ... "); uint32_t mediaId = sending.waitFor(echrono::seconds(20000)).get(); debug.verbose("END WAITING ... "); if mediaId == 0: debug.error("Get media ID = 0 With no error"); return False; """ mime = magic.Magic(mime=True) mime_type = mime.from_file(_path) headers_values = {'filename': _path, 'mime-type': mime_type} result_send_data = requests.post("http://127.0.0.1:15080/data", headers=headers_values, data=upload_in_chunks(_path, chunksize=4096)) debug.info("result *********** : " + str(result_send_data) + " " + result_send_data.text) file_name = os.path.basename(file_name) debug.info("Find file_name : '" + file_name + "'") # Remove Date (XXXX) or other titreadsofarle file_name, dates = extract_and_remove(file_name, '(', ')') have_date = False have_Title = False for it in dates: if len(it) == 0: continue if it[0] == '0' \ or it[0] == '1' \ or it[0] == '2' \ or it[0] == '3' \ or it[0] == '4' \ or it[0] == '5' \ or it[0] == '6' \ or it[0] == '7' \ or it[0] == '8' \ or it[0] == '9': # find a date ... if have_date == True: debug.info(" '" + file_name + "'") debug.error("Parse Date error : () : " + it + " ==> multiple date") continue have_date = True _basic_key["date"] = it else: if have_Title == True: debug.info(" '" + file_name + "'") debug.error("Parse Title error : () : " + it + " ==> multiple title") continue have_Title = True # Other title _basic_key.set["title2"] = it # Remove the actors [XXX YYY][EEE TTT]... file_name, actors = extract_and_remove(file_name, '[', ']') if len(actors) > 0: debug.info(" '" + file_name + "'") actor_list = [] for it_actor in actors: if actor_list != "": actor_list += ";" actor_list.append(it_actor) _basic_key["actors"] = actor_list list_element_base = file_name.split('-') debug.warning("==> Title file: " + file_name) debug.warning("==> Title cut : " + str(list_element_base)) list_element = [] tmp_start_string = "" iii = 0 while iii < len(list_element_base): if list_element_base[iii][0] != 's' \ and list_element_base[iii][0] != 'e': if tmp_start_string != "": tmp_start_string += '-' tmp_start_string += list_element_base[iii] else: list_element.append(tmp_start_string) tmp_start_string = "" while iii < len(list_element_base): list_element.append(list_element_base[iii]) iii += 1 iii += 1 debug.warning("==> start elem: " + str(tmp_start_string)) if tmp_start_string != "": list_element.append(tmp_start_string) debug.warning("==> list_element : " + str(list_element)) if len(list_element) == 1: # nothing to do , it might be a film ... _basic_key["title"] = list_element[0] else: if len(list_element) > 3 \ and list_element[1][0] == 's' \ and list_element[2][0] == 'e': debug.warning("Parse format: xxx-sXX-eXX-kjhlkjlkj(1234).*") # internal formalisme ... saison = -1 episode = -1 series_name = list_element[0] _basic_key["series-name"] = series_name full_episode_name = list_element[3] for yyy in range(4, len(list_element)): full_episode_name += "-" + list_element[yyy] _basic_key["title"] = full_episode_name if list_element[1][1:] == "XX": # saison unknow ... ==> nothing to do ... #saison = 123456789; pass else: saison = int(list_element[1][1:]) if list_element[2][1:] == "XX": # episode unknow ... ==> nothing to do ... pass else: episode = int(list_element[2][1:]) _basic_key["episode"] = int(episode) debug.info("Find a internal mode series: :") debug.info(" origin : '" + file_name + "'") saisonPrint = "XX" episodePrint = "XX" if saison < 0: # nothing to do pass else: saisonPrint = str(saison) _basic_key["saison"] = saison if episode < 0: # nothing to do pass elif episode < 10: episodePrint = "0" + str(episode) _basic_key["episode"] = episode else: episodePrint = str(episode) _basic_key["episode"] = episode debug.info(" ==> '" + series_name + "-s" + saisonPrint + "-e" + episodePrint + "-" + full_episode_name + "'") elif len(list_element) > 2 \ and list_element[1][0] == 'e': debug.warning("Parse format: xxx-eXX-kjhlkjlkj(1234).*") # internal formalisme ... saison = -1 episode = -1 series_name = list_element[0] _basic_key["series-name"] = series_name full_episode_name = list_element[2] for yyy in range(3, len(list_element)): full_episode_name += "-" + list_element[yyy] _basic_key["title"] = full_episode_name if list_element[1][1:] == "XX": # episode unknow ... ==> nothing to do ... pass else: episode = int(list_element[1][1:]) _basic_key["episode"] = int(episode) debug.info("Find a internal mode series: :") debug.info(" origin : '" + file_name + "'") saisonPrint = "XX" episodePrint = "XX" if episode < 0: # nothing to do pass elif episode < 10: episodePrint = "0" + str(episode) _basic_key["episode"] = episode else: episodePrint = str(episode) _basic_key["episode"] = episode debug.info(" ==> '" + series_name + "-s" + saisonPrint + "-e" + episodePrint + "-" + full_episode_name + "'") result_send_data_json = json.loads(result_send_data.text) debug.info("pared meta data: " + json.dumps(_basic_key, sort_keys=True, indent=4)) data_model = { "type_id": _basic_key["type"], "sha512": result_send_data_json["sha512"], #"group_id": int, "name": _basic_key["title"], # number of second "time": None, } for elem in ["date", "description", "episode" ]: #["actors", "date", "description", "episode", "title2"]: if elem in _basic_key.keys(): data_model[elem] = _basic_key[elem] if "series-name" in _basic_key.keys(): result_group_data = requests.post( "http://127.0.0.1:15080/group/find", data=json.dumps({"name": _basic_key["series-name"]}, sort_keys=True, indent=4)) debug.info("Create group ??? *********** : " + str(result_group_data) + " " + result_group_data.text) if result_group_data.status_code == 404: result_group_data = requests.post( "http://127.0.0.1:15080/group", data=json.dumps({"name": _basic_key["series-name"]}, sort_keys=True, indent=4)) debug.info("yes we create new group *********** : " + str(result_group_data) + " " + result_group_data.text) group_id = result_group_data.json()["id"] data_model["group_id"] = group_id if "saison" in _basic_key.keys(): result_saison_data = requests.post( "http://127.0.0.1:15080/saison/find", data=json.dumps( { "number": _basic_key["saison"], "group_id": group_id }, sort_keys=True, indent=4)) debug.info("Create saison ??? *********** : " + str(result_saison_data) + " " + result_saison_data.text) if result_saison_data.status_code == 404: result_saison_data = requests.post( "http://127.0.0.1:15080/saison", data=json.dumps( { "number": _basic_key["saison"], "group_id": group_id }, sort_keys=True, indent=4)) debug.info("yes we create new saison *********** : " + str(result_saison_data) + " " + result_saison_data.text) saison_id = result_saison_data.json()["id"] data_model["saison_id"] = saison_id result_send_data = requests.post("http://127.0.0.1:15080/video", data=json.dumps(data_model, sort_keys=True, indent=4)) debug.info("result *********** : " + str(result_send_data) + " " + result_send_data.text) return True
def configure(target, my_module): # add the file to compile: my_module.add_src_file([ 'ffmpeg/libavcodec/012v.c', 'ffmpeg/libavcodec/4xm.c', 'ffmpeg/libavcodec/8bps.c', 'ffmpeg/libavcodec/8svx.c', 'ffmpeg/libavcodec/a64multienc.c', 'ffmpeg/libavcodec/aac_ac3_parser.c', 'ffmpeg/libavcodec/aac_adtstoasc_bsf.c', 'ffmpeg/libavcodec/aac_parser.c', 'ffmpeg/libavcodec/aacadtsdec.c', 'ffmpeg/libavcodec/aaccoder.c', 'ffmpeg/libavcodec/aacdec.c', 'ffmpeg/libavcodec/aacdec_fixed.c', 'ffmpeg/libavcodec/aacenc.c', 'ffmpeg/libavcodec/aacenc_is.c', 'ffmpeg/libavcodec/aacenc_ltp.c', 'ffmpeg/libavcodec/aacenc_pred.c', 'ffmpeg/libavcodec/aacenc_tns.c', 'ffmpeg/libavcodec/aacenctab.c', 'ffmpeg/libavcodec/aacps_fixed.c', 'ffmpeg/libavcodec/aacps_float.c', 'ffmpeg/libavcodec/aacpsdsp_fixed.c', 'ffmpeg/libavcodec/aacpsdsp_float.c', 'ffmpeg/libavcodec/aacpsy.c', 'ffmpeg/libavcodec/aacsbr.c', 'ffmpeg/libavcodec/aacsbr_fixed.c', 'ffmpeg/libavcodec/aactab.c', 'ffmpeg/libavcodec/aandcttab.c', 'ffmpeg/libavcodec/aasc.c', 'ffmpeg/libavcodec/ac3.c', 'ffmpeg/libavcodec/ac3_parser.c', 'ffmpeg/libavcodec/ac3dec_data.c', 'ffmpeg/libavcodec/ac3dec_fixed.c', 'ffmpeg/libavcodec/ac3dec_float.c', 'ffmpeg/libavcodec/ac3dsp.c', 'ffmpeg/libavcodec/ac3enc.c', 'ffmpeg/libavcodec/ac3enc_fixed.c', 'ffmpeg/libavcodec/ac3enc_float.c', 'ffmpeg/libavcodec/ac3tab.c', 'ffmpeg/libavcodec/acelp_filters.c', 'ffmpeg/libavcodec/acelp_pitch_delay.c', 'ffmpeg/libavcodec/acelp_vectors.c', 'ffmpeg/libavcodec/adpcm.c', 'ffmpeg/libavcodec/adpcm_data.c', 'ffmpeg/libavcodec/adpcmenc.c', 'ffmpeg/libavcodec/adx.c', 'ffmpeg/libavcodec/adx_parser.c', 'ffmpeg/libavcodec/adxdec.c', 'ffmpeg/libavcodec/adxenc.c', 'ffmpeg/libavcodec/aic.c', 'ffmpeg/libavcodec/alac.c', 'ffmpeg/libavcodec/alac_data.c', 'ffmpeg/libavcodec/alacdsp.c', 'ffmpeg/libavcodec/alacenc.c', 'ffmpeg/libavcodec/aliaspixdec.c', 'ffmpeg/libavcodec/aliaspixenc.c', 'ffmpeg/libavcodec/allcodecs.c', 'ffmpeg/libavcodec/alsdec.c', 'ffmpeg/libavcodec/amrnbdec.c', 'ffmpeg/libavcodec/amrwbdec.c', 'ffmpeg/libavcodec/anm.c', 'ffmpeg/libavcodec/ansi.c', 'ffmpeg/libavcodec/apedec.c', 'ffmpeg/libavcodec/ass.c', 'ffmpeg/libavcodec/ass_split.c', 'ffmpeg/libavcodec/assdec.c', 'ffmpeg/libavcodec/assenc.c', 'ffmpeg/libavcodec/asv.c', 'ffmpeg/libavcodec/asvdec.c', 'ffmpeg/libavcodec/asvenc.c', 'ffmpeg/libavcodec/atrac.c', 'ffmpeg/libavcodec/atrac1.c', 'ffmpeg/libavcodec/atrac3.c', 'ffmpeg/libavcodec/atrac3plus.c', 'ffmpeg/libavcodec/atrac3plusdec.c', 'ffmpeg/libavcodec/atrac3plusdsp.c', 'ffmpeg/libavcodec/audio_frame_queue.c', 'ffmpeg/libavcodec/audioconvert.c', 'ffmpeg/libavcodec/audiodsp.c', 'ffmpeg/libavcodec/aura.c', 'ffmpeg/libavcodec/avdct.c', 'ffmpeg/libavcodec/avfft.c', 'ffmpeg/libavcodec/avpacket.c', 'ffmpeg/libavcodec/avpicture.c', 'ffmpeg/libavcodec/avrndec.c', 'ffmpeg/libavcodec/avs.c', 'ffmpeg/libavcodec/avuidec.c', 'ffmpeg/libavcodec/avuienc.c', 'ffmpeg/libavcodec/bethsoftvideo.c', 'ffmpeg/libavcodec/bfi.c', 'ffmpeg/libavcodec/bgmc.c', 'ffmpeg/libavcodec/bink.c', 'ffmpeg/libavcodec/binkaudio.c', 'ffmpeg/libavcodec/binkdsp.c', 'ffmpeg/libavcodec/bintext.c', 'ffmpeg/libavcodec/bitstream.c', 'ffmpeg/libavcodec/bitstream_filter.c', 'ffmpeg/libavcodec/bitstream_filters.c', 'ffmpeg/libavcodec/blockdsp.c', 'ffmpeg/libavcodec/bmp.c', 'ffmpeg/libavcodec/bmp_parser.c', 'ffmpeg/libavcodec/bmpenc.c', 'ffmpeg/libavcodec/bmvaudio.c', 'ffmpeg/libavcodec/bmvvideo.c', 'ffmpeg/libavcodec/brenderpix.c', 'ffmpeg/libavcodec/bsf.c', 'ffmpeg/libavcodec/bswapdsp.c', 'ffmpeg/libavcodec/c93.c', 'ffmpeg/libavcodec/cabac.c', 'ffmpeg/libavcodec/canopus.c', 'ffmpeg/libavcodec/cavs.c', 'ffmpeg/libavcodec/cavs_parser.c', 'ffmpeg/libavcodec/cavsdata.c', 'ffmpeg/libavcodec/cavsdec.c', 'ffmpeg/libavcodec/cavsdsp.c', 'ffmpeg/libavcodec/cbrt_data.c', 'ffmpeg/libavcodec/cbrt_data_fixed.c', 'ffmpeg/libavcodec/ccaption_dec.c', 'ffmpeg/libavcodec/cdgraphics.c', 'ffmpeg/libavcodec/cdxl.c', 'ffmpeg/libavcodec/celp_filters.c', 'ffmpeg/libavcodec/celp_math.c', 'ffmpeg/libavcodec/cfhd.c', 'ffmpeg/libavcodec/cfhddata.c', 'ffmpeg/libavcodec/cga_data.c', 'ffmpeg/libavcodec/chomp_bsf.c', 'ffmpeg/libavcodec/cinepak.c', 'ffmpeg/libavcodec/cinepakenc.c', 'ffmpeg/libavcodec/cljrdec.c', 'ffmpeg/libavcodec/cljrenc.c', 'ffmpeg/libavcodec/cllc.c', 'ffmpeg/libavcodec/cngdec.c', 'ffmpeg/libavcodec/cngenc.c', 'ffmpeg/libavcodec/codec_desc.c', 'ffmpeg/libavcodec/cook.c', 'ffmpeg/libavcodec/cook_parser.c', 'ffmpeg/libavcodec/cpia.c', 'ffmpeg/libavcodec/cscd.c', 'ffmpeg/libavcodec/cyuv.c', 'ffmpeg/libavcodec/d3d11va.c', 'ffmpeg/libavcodec/dca.c', 'ffmpeg/libavcodec/dca_core.c', 'ffmpeg/libavcodec/dca_core_bsf.c', 'ffmpeg/libavcodec/dca_exss.c', 'ffmpeg/libavcodec/dca_lbr.c', 'ffmpeg/libavcodec/dca_parser.c', 'ffmpeg/libavcodec/dca_xll.c', 'ffmpeg/libavcodec/dcadata.c', 'ffmpeg/libavcodec/dcadct.c', 'ffmpeg/libavcodec/dcadec.c', 'ffmpeg/libavcodec/dcadsp.c', 'ffmpeg/libavcodec/dcaenc.c', 'ffmpeg/libavcodec/dcahuff.c', 'ffmpeg/libavcodec/dct.c', 'ffmpeg/libavcodec/dct32_fixed.c', 'ffmpeg/libavcodec/dct32_float.c', 'ffmpeg/libavcodec/dds.c', 'ffmpeg/libavcodec/dfa.c', 'ffmpeg/libavcodec/dirac.c', 'ffmpeg/libavcodec/dirac_arith.c', 'ffmpeg/libavcodec/dirac_dwt.c', 'ffmpeg/libavcodec/dirac_parser.c', 'ffmpeg/libavcodec/diracdec.c', 'ffmpeg/libavcodec/diracdsp.c', 'ffmpeg/libavcodec/diractab.c', 'ffmpeg/libavcodec/dnxhd_parser.c', 'ffmpeg/libavcodec/dnxhddata.c', 'ffmpeg/libavcodec/dnxhddec.c', 'ffmpeg/libavcodec/dnxhdenc.c', 'ffmpeg/libavcodec/dpcm.c', 'ffmpeg/libavcodec/dpx.c', 'ffmpeg/libavcodec/dpx_parser.c', 'ffmpeg/libavcodec/dpxenc.c', 'ffmpeg/libavcodec/dsd.c', 'ffmpeg/libavcodec/dsddec.c', 'ffmpeg/libavcodec/dsicinaudio.c', 'ffmpeg/libavcodec/dsicinvideo.c', 'ffmpeg/libavcodec/dss_sp.c', 'ffmpeg/libavcodec/dstdec.c', 'ffmpeg/libavcodec/dump_extradata_bsf.c', 'ffmpeg/libavcodec/dv.c', 'ffmpeg/libavcodec/dv_profile.c', 'ffmpeg/libavcodec/dvaudio_parser.c', 'ffmpeg/libavcodec/dvaudiodec.c', 'ffmpeg/libavcodec/dvbsub.c', 'ffmpeg/libavcodec/dvbsub_parser.c', 'ffmpeg/libavcodec/dvbsubdec.c', 'ffmpeg/libavcodec/dvd_nav_parser.c', 'ffmpeg/libavcodec/dvdata.c', 'ffmpeg/libavcodec/dvdec.c', 'ffmpeg/libavcodec/dvdsub_parser.c', 'ffmpeg/libavcodec/dvdsubdec.c', 'ffmpeg/libavcodec/dvdsubenc.c', 'ffmpeg/libavcodec/dvenc.c', 'ffmpeg/libavcodec/dxa.c', 'ffmpeg/libavcodec/dxtory.c', 'ffmpeg/libavcodec/dxv.c', 'ffmpeg/libavcodec/eac3_data.c', 'ffmpeg/libavcodec/eac3enc.c', 'ffmpeg/libavcodec/eacmv.c', 'ffmpeg/libavcodec/eaidct.c', 'ffmpeg/libavcodec/eamad.c', 'ffmpeg/libavcodec/eatgq.c', 'ffmpeg/libavcodec/eatgv.c', 'ffmpeg/libavcodec/eatqi.c', 'ffmpeg/libavcodec/elbg.c', 'ffmpeg/libavcodec/elsdec.c', 'ffmpeg/libavcodec/error_resilience.c', 'ffmpeg/libavcodec/escape124.c', 'ffmpeg/libavcodec/escape130.c', 'ffmpeg/libavcodec/evrcdec.c', 'ffmpeg/libavcodec/exif.c', 'ffmpeg/libavcodec/exr.c', 'ffmpeg/libavcodec/faandct.c', 'ffmpeg/libavcodec/faanidct.c', 'ffmpeg/libavcodec/faxcompr.c', 'ffmpeg/libavcodec/fdctdsp.c', 'ffmpeg/libavcodec/fft_fixed.c', 'ffmpeg/libavcodec/fft_fixed_32.c', 'ffmpeg/libavcodec/fft_float.c', 'ffmpeg/libavcodec/fft_init_table.c', 'ffmpeg/libavcodec/ffv1.c', 'ffmpeg/libavcodec/ffv1dec.c', 'ffmpeg/libavcodec/ffv1enc.c', 'ffmpeg/libavcodec/ffwavesynth.c', 'ffmpeg/libavcodec/fic.c', 'ffmpeg/libavcodec/flac.c', 'ffmpeg/libavcodec/flac_parser.c', 'ffmpeg/libavcodec/flacdata.c', 'ffmpeg/libavcodec/flacdec.c', 'ffmpeg/libavcodec/flacdsp.c', 'ffmpeg/libavcodec/flacenc.c', 'ffmpeg/libavcodec/flashsv.c', 'ffmpeg/libavcodec/flashsv2enc.c', 'ffmpeg/libavcodec/flashsvenc.c', 'ffmpeg/libavcodec/flicvideo.c', 'ffmpeg/libavcodec/flvdec.c', 'ffmpeg/libavcodec/flvenc.c', 'ffmpeg/libavcodec/fmtconvert.c', 'ffmpeg/libavcodec/frame_thread_encoder.c', 'ffmpeg/libavcodec/fraps.c', 'ffmpeg/libavcodec/frwu.c', 'ffmpeg/libavcodec/g2meet.c', 'ffmpeg/libavcodec/g722.c', 'ffmpeg/libavcodec/g722dec.c', 'ffmpeg/libavcodec/g722dsp.c', 'ffmpeg/libavcodec/g722enc.c', 'ffmpeg/libavcodec/g723_1.c', 'ffmpeg/libavcodec/g723_1dec.c', 'ffmpeg/libavcodec/g723_1enc.c', 'ffmpeg/libavcodec/g726.c', 'ffmpeg/libavcodec/g729_parser.c', 'ffmpeg/libavcodec/g729dec.c', 'ffmpeg/libavcodec/g729postfilter.c', 'ffmpeg/libavcodec/gif.c', 'ffmpeg/libavcodec/gifdec.c', 'ffmpeg/libavcodec/golomb.c', 'ffmpeg/libavcodec/gsm_parser.c', 'ffmpeg/libavcodec/gsmdec.c', 'ffmpeg/libavcodec/gsmdec_data.c', 'ffmpeg/libavcodec/h261.c', 'ffmpeg/libavcodec/h261_parser.c', 'ffmpeg/libavcodec/h261data.c', 'ffmpeg/libavcodec/h261dec.c', 'ffmpeg/libavcodec/h261enc.c', 'ffmpeg/libavcodec/h263.c', 'ffmpeg/libavcodec/h263_parser.c', 'ffmpeg/libavcodec/h263data.c', 'ffmpeg/libavcodec/h263dec.c', 'ffmpeg/libavcodec/h263dsp.c', 'ffmpeg/libavcodec/h264.c', 'ffmpeg/libavcodec/h2645_parse.c', 'ffmpeg/libavcodec/h264_cabac.c', 'ffmpeg/libavcodec/h264_cavlc.c', 'ffmpeg/libavcodec/h264_direct.c', 'ffmpeg/libavcodec/h264_loopfilter.c', 'ffmpeg/libavcodec/h264_mb.c', 'ffmpeg/libavcodec/h264_mp4toannexb_bsf.c', 'ffmpeg/libavcodec/h264_parse.c', 'ffmpeg/libavcodec/h264_parser.c', 'ffmpeg/libavcodec/h264_picture.c', 'ffmpeg/libavcodec/h264_ps.c', 'ffmpeg/libavcodec/h264_refs.c', 'ffmpeg/libavcodec/h264_sei.c', 'ffmpeg/libavcodec/h264_slice.c', 'ffmpeg/libavcodec/h264chroma.c', 'ffmpeg/libavcodec/h264data.c', 'ffmpeg/libavcodec/h264dsp.c', 'ffmpeg/libavcodec/h264idct.c', 'ffmpeg/libavcodec/h264pred.c', 'ffmpeg/libavcodec/h264qpel.c', 'ffmpeg/libavcodec/hap.c', 'ffmpeg/libavcodec/hapdec.c', 'ffmpeg/libavcodec/hevc.c', 'ffmpeg/libavcodec/hevc_cabac.c', 'ffmpeg/libavcodec/hevc_data.c', 'ffmpeg/libavcodec/hevc_filter.c', 'ffmpeg/libavcodec/hevc_mp4toannexb_bsf.c', 'ffmpeg/libavcodec/hevc_mvs.c', 'ffmpeg/libavcodec/hevc_parser.c', 'ffmpeg/libavcodec/hevc_ps.c', 'ffmpeg/libavcodec/hevc_refs.c', 'ffmpeg/libavcodec/hevc_sei.c', 'ffmpeg/libavcodec/hevcdsp.c', 'ffmpeg/libavcodec/hevcpred.c', 'ffmpeg/libavcodec/hnm4video.c', 'ffmpeg/libavcodec/hpeldsp.c', 'ffmpeg/libavcodec/hq_hqa.c', 'ffmpeg/libavcodec/hq_hqadata.c', 'ffmpeg/libavcodec/hq_hqadsp.c', 'ffmpeg/libavcodec/hqx.c', 'ffmpeg/libavcodec/hqxdsp.c', 'ffmpeg/libavcodec/hqxvlc.c', 'ffmpeg/libavcodec/htmlsubtitles.c', 'ffmpeg/libavcodec/huffman.c', 'ffmpeg/libavcodec/huffyuv.c', 'ffmpeg/libavcodec/huffyuvdec.c', 'ffmpeg/libavcodec/huffyuvdsp.c', 'ffmpeg/libavcodec/huffyuvenc.c', 'ffmpeg/libavcodec/huffyuvencdsp.c', 'ffmpeg/libavcodec/idcinvideo.c', 'ffmpeg/libavcodec/idctdsp.c', 'ffmpeg/libavcodec/iff.c', 'ffmpeg/libavcodec/iirfilter.c', 'ffmpeg/libavcodec/imc.c', 'ffmpeg/libavcodec/imdct15.c', 'ffmpeg/libavcodec/imgconvert.c', 'ffmpeg/libavcodec/imx_dump_header_bsf.c', 'ffmpeg/libavcodec/indeo2.c', 'ffmpeg/libavcodec/indeo3.c', 'ffmpeg/libavcodec/indeo4.c', 'ffmpeg/libavcodec/indeo5.c', 'ffmpeg/libavcodec/intelh263dec.c', 'ffmpeg/libavcodec/interplayacm.c', 'ffmpeg/libavcodec/interplayvideo.c', 'ffmpeg/libavcodec/intrax8.c', 'ffmpeg/libavcodec/intrax8dsp.c', 'ffmpeg/libavcodec/ituh263dec.c', 'ffmpeg/libavcodec/ituh263enc.c', 'ffmpeg/libavcodec/ivi.c', 'ffmpeg/libavcodec/ivi_dsp.c', 'ffmpeg/libavcodec/j2kenc.c', 'ffmpeg/libavcodec/jacosubdec.c', 'ffmpeg/libavcodec/jfdctfst.c', 'ffmpeg/libavcodec/jfdctint.c', 'ffmpeg/libavcodec/jni.c', 'ffmpeg/libavcodec/jpeg2000.c', 'ffmpeg/libavcodec/jpeg2000dec.c', 'ffmpeg/libavcodec/jpeg2000dsp.c', 'ffmpeg/libavcodec/jpeg2000dwt.c', 'ffmpeg/libavcodec/jpegls.c', 'ffmpeg/libavcodec/jpeglsdec.c', 'ffmpeg/libavcodec/jpeglsenc.c', 'ffmpeg/libavcodec/jpegtables.c', 'ffmpeg/libavcodec/jrevdct.c', 'ffmpeg/libavcodec/jvdec.c', 'ffmpeg/libavcodec/kbdwin.c', 'ffmpeg/libavcodec/kgv1dec.c', 'ffmpeg/libavcodec/kmvc.c', 'ffmpeg/libavcodec/lagarith.c', 'ffmpeg/libavcodec/lagarithrac.c', 'ffmpeg/libavcodec/latm_parser.c', 'ffmpeg/libavcodec/lcldec.c', 'ffmpeg/libavcodec/lclenc.c', 'ffmpeg/libavcodec/ljpegenc.c', 'ffmpeg/libavcodec/loco.c', 'ffmpeg/libavcodec/lossless_audiodsp.c', 'ffmpeg/libavcodec/lossless_videodsp.c', 'ffmpeg/libavcodec/lpc.c', 'ffmpeg/libavcodec/lsp.c', 'ffmpeg/libavcodec/lzf.c', 'ffmpeg/libavcodec/lzw.c', 'ffmpeg/libavcodec/lzwenc.c', 'ffmpeg/libavcodec/m101.c', 'ffmpeg/libavcodec/mace.c', 'ffmpeg/libavcodec/magicyuv.c', 'ffmpeg/libavcodec/mathtables.c', 'ffmpeg/libavcodec/mdct_fixed.c', 'ffmpeg/libavcodec/mdct_fixed_32.c', 'ffmpeg/libavcodec/mdct_float.c', 'ffmpeg/libavcodec/mdec.c', 'ffmpeg/libavcodec/me_cmp.c', 'ffmpeg/libavcodec/metasound.c', 'ffmpeg/libavcodec/metasound_data.c', 'ffmpeg/libavcodec/microdvddec.c', 'ffmpeg/libavcodec/mimic.c', 'ffmpeg/libavcodec/mjpeg2jpeg_bsf.c', 'ffmpeg/libavcodec/mjpeg_parser.c', 'ffmpeg/libavcodec/mjpega_dump_header_bsf.c', 'ffmpeg/libavcodec/mjpegbdec.c', 'ffmpeg/libavcodec/mjpegdec.c', 'ffmpeg/libavcodec/mjpegenc.c', 'ffmpeg/libavcodec/mjpegenc_common.c', 'ffmpeg/libavcodec/mlp.c', 'ffmpeg/libavcodec/mlp_parser.c', 'ffmpeg/libavcodec/mlpdec.c', 'ffmpeg/libavcodec/mlpdsp.c', 'ffmpeg/libavcodec/mmvideo.c', 'ffmpeg/libavcodec/motion_est.c', 'ffmpeg/libavcodec/motionpixels.c', 'ffmpeg/libavcodec/movsub_bsf.c', 'ffmpeg/libavcodec/movtextdec.c', 'ffmpeg/libavcodec/movtextenc.c', 'ffmpeg/libavcodec/mp3_header_decompress_bsf.c', 'ffmpeg/libavcodec/mpc.c', 'ffmpeg/libavcodec/mpc7.c', 'ffmpeg/libavcodec/mpc8.c', 'ffmpeg/libavcodec/mpeg12.c', 'ffmpeg/libavcodec/mpeg12data.c', 'ffmpeg/libavcodec/mpeg12dec.c', 'ffmpeg/libavcodec/mpeg12enc.c', 'ffmpeg/libavcodec/mpeg4_unpack_bframes_bsf.c', 'ffmpeg/libavcodec/mpeg4audio.c', 'ffmpeg/libavcodec/mpeg4video.c', 'ffmpeg/libavcodec/mpeg4video_parser.c', 'ffmpeg/libavcodec/mpeg4videodec.c', 'ffmpeg/libavcodec/mpeg4videoenc.c', 'ffmpeg/libavcodec/mpeg_er.c', 'ffmpeg/libavcodec/mpegaudio.c', 'ffmpeg/libavcodec/mpegaudio_parser.c', 'ffmpeg/libavcodec/mpegaudiodata.c', 'ffmpeg/libavcodec/mpegaudiodec_fixed.c', 'ffmpeg/libavcodec/mpegaudiodec_float.c', 'ffmpeg/libavcodec/mpegaudiodecheader.c', 'ffmpeg/libavcodec/mpegaudiodsp.c', 'ffmpeg/libavcodec/mpegaudiodsp_data.c', 'ffmpeg/libavcodec/mpegaudiodsp_fixed.c', 'ffmpeg/libavcodec/mpegaudiodsp_float.c', 'ffmpeg/libavcodec/mpegaudioenc_fixed.c', 'ffmpeg/libavcodec/mpegaudioenc_float.c', 'ffmpeg/libavcodec/mpegpicture.c', 'ffmpeg/libavcodec/mpegutils.c', 'ffmpeg/libavcodec/mpegvideo.c', 'ffmpeg/libavcodec/mpegvideo_enc.c', 'ffmpeg/libavcodec/mpegvideo_motion.c', 'ffmpeg/libavcodec/mpegvideo_parser.c', 'ffmpeg/libavcodec/mpegvideodata.c', 'ffmpeg/libavcodec/mpegvideodsp.c', 'ffmpeg/libavcodec/mpegvideoencdsp.c', 'ffmpeg/libavcodec/mpl2dec.c', 'ffmpeg/libavcodec/mqc.c', 'ffmpeg/libavcodec/mqcdec.c', 'ffmpeg/libavcodec/mqcenc.c', 'ffmpeg/libavcodec/msgsmdec.c', 'ffmpeg/libavcodec/msmpeg4.c', 'ffmpeg/libavcodec/msmpeg4data.c', 'ffmpeg/libavcodec/msmpeg4dec.c', 'ffmpeg/libavcodec/msmpeg4enc.c', 'ffmpeg/libavcodec/msrle.c', 'ffmpeg/libavcodec/msrledec.c', 'ffmpeg/libavcodec/mss1.c', 'ffmpeg/libavcodec/mss12.c', 'ffmpeg/libavcodec/mss2.c', 'ffmpeg/libavcodec/mss2dsp.c', 'ffmpeg/libavcodec/mss3.c', 'ffmpeg/libavcodec/mss34dsp.c', 'ffmpeg/libavcodec/mss4.c', 'ffmpeg/libavcodec/msvideo1.c', 'ffmpeg/libavcodec/msvideo1enc.c', 'ffmpeg/libavcodec/mvcdec.c', 'ffmpeg/libavcodec/mxpegdec.c', 'ffmpeg/libavcodec/nellymoser.c', 'ffmpeg/libavcodec/nellymoserdec.c', 'ffmpeg/libavcodec/nellymoserenc.c', 'ffmpeg/libavcodec/noise_bsf.c', 'ffmpeg/libavcodec/nuv.c', 'ffmpeg/libavcodec/on2avc.c', 'ffmpeg/libavcodec/on2avcdata.c', 'ffmpeg/libavcodec/options.c', 'ffmpeg/libavcodec/opus.c', 'ffmpeg/libavcodec/opus_celt.c', 'ffmpeg/libavcodec/opus_parser.c', 'ffmpeg/libavcodec/opus_silk.c', 'ffmpeg/libavcodec/opusdec.c', 'ffmpeg/libavcodec/pafaudio.c', 'ffmpeg/libavcodec/pafvideo.c', 'ffmpeg/libavcodec/pamenc.c', 'ffmpeg/libavcodec/parser.c', 'ffmpeg/libavcodec/pcm-bluray.c', 'ffmpeg/libavcodec/pcm-dvd.c', 'ffmpeg/libavcodec/pcm.c', 'ffmpeg/libavcodec/pcx.c', 'ffmpeg/libavcodec/pcxenc.c', 'ffmpeg/libavcodec/pgssubdec.c', 'ffmpeg/libavcodec/pictordec.c', 'ffmpeg/libavcodec/pixblockdsp.c', 'ffmpeg/libavcodec/png.c', 'ffmpeg/libavcodec/png_parser.c', 'ffmpeg/libavcodec/pngdec.c', 'ffmpeg/libavcodec/pngdsp.c', 'ffmpeg/libavcodec/pngenc.c', 'ffmpeg/libavcodec/pnm.c', 'ffmpeg/libavcodec/pnm_parser.c', 'ffmpeg/libavcodec/pnmdec.c', 'ffmpeg/libavcodec/pnmenc.c', 'ffmpeg/libavcodec/profiles.c', 'ffmpeg/libavcodec/proresdata.c', 'ffmpeg/libavcodec/proresdec2.c', 'ffmpeg/libavcodec/proresdec_lgpl.c', 'ffmpeg/libavcodec/proresdsp.c', 'ffmpeg/libavcodec/proresenc_anatoliy.c', 'ffmpeg/libavcodec/proresenc_kostya.c', 'ffmpeg/libavcodec/psymodel.c', 'ffmpeg/libavcodec/pthread.c', 'ffmpeg/libavcodec/pthread_frame.c', 'ffmpeg/libavcodec/pthread_slice.c', 'ffmpeg/libavcodec/ptx.c', 'ffmpeg/libavcodec/qcelpdec.c', 'ffmpeg/libavcodec/qdm2.c', 'ffmpeg/libavcodec/qdrw.c', 'ffmpeg/libavcodec/qpeg.c', 'ffmpeg/libavcodec/qpeldsp.c', 'ffmpeg/libavcodec/qsv_api.c', 'ffmpeg/libavcodec/qtrle.c', 'ffmpeg/libavcodec/qtrleenc.c', 'ffmpeg/libavcodec/r210dec.c', 'ffmpeg/libavcodec/r210enc.c', 'ffmpeg/libavcodec/ra144.c', 'ffmpeg/libavcodec/ra144dec.c', 'ffmpeg/libavcodec/ra144enc.c', 'ffmpeg/libavcodec/ra288.c', 'ffmpeg/libavcodec/ralf.c', 'ffmpeg/libavcodec/rangecoder.c', 'ffmpeg/libavcodec/ratecontrol.c', 'ffmpeg/libavcodec/raw.c', 'ffmpeg/libavcodec/rawdec.c', 'ffmpeg/libavcodec/rawenc.c', 'ffmpeg/libavcodec/rdft.c', 'ffmpeg/libavcodec/realtextdec.c', 'ffmpeg/libavcodec/remove_extradata_bsf.c', 'ffmpeg/libavcodec/resample.c', 'ffmpeg/libavcodec/resample2.c', 'ffmpeg/libavcodec/rl.c', 'ffmpeg/libavcodec/rl2.c', 'ffmpeg/libavcodec/rle.c', 'ffmpeg/libavcodec/roqaudioenc.c', 'ffmpeg/libavcodec/roqvideo.c', 'ffmpeg/libavcodec/roqvideodec.c', 'ffmpeg/libavcodec/roqvideoenc.c', 'ffmpeg/libavcodec/rpza.c', 'ffmpeg/libavcodec/rscc.c', 'ffmpeg/libavcodec/rtjpeg.c', 'ffmpeg/libavcodec/rv10.c', 'ffmpeg/libavcodec/rv10enc.c', 'ffmpeg/libavcodec/rv20enc.c', 'ffmpeg/libavcodec/rv30.c', 'ffmpeg/libavcodec/rv30dsp.c', 'ffmpeg/libavcodec/rv34.c', 'ffmpeg/libavcodec/rv34_parser.c', 'ffmpeg/libavcodec/rv34dsp.c', 'ffmpeg/libavcodec/rv40.c', 'ffmpeg/libavcodec/rv40dsp.c', 'ffmpeg/libavcodec/s302m.c', 'ffmpeg/libavcodec/s302menc.c', 'ffmpeg/libavcodec/samidec.c', 'ffmpeg/libavcodec/sanm.c', 'ffmpeg/libavcodec/sbrdsp.c', 'ffmpeg/libavcodec/sbrdsp_fixed.c', 'ffmpeg/libavcodec/screenpresso.c', 'ffmpeg/libavcodec/sgidec.c', 'ffmpeg/libavcodec/sgienc.c', 'ffmpeg/libavcodec/sgirledec.c', 'ffmpeg/libavcodec/sheervideo.c', 'ffmpeg/libavcodec/shorten.c', 'ffmpeg/libavcodec/simple_idct.c', 'ffmpeg/libavcodec/sinewin.c', 'ffmpeg/libavcodec/sinewin_fixed.c', 'ffmpeg/libavcodec/sipr.c', 'ffmpeg/libavcodec/sipr16k.c', 'ffmpeg/libavcodec/smacker.c', 'ffmpeg/libavcodec/smc.c', 'ffmpeg/libavcodec/smvjpegdec.c', 'ffmpeg/libavcodec/snappy.c', 'ffmpeg/libavcodec/snow.c', 'ffmpeg/libavcodec/snow_dwt.c', 'ffmpeg/libavcodec/snowdec.c', 'ffmpeg/libavcodec/snowenc.c', 'ffmpeg/libavcodec/sonic.c', 'ffmpeg/libavcodec/sp5xdec.c', 'ffmpeg/libavcodec/srtdec.c', 'ffmpeg/libavcodec/srtenc.c', 'ffmpeg/libavcodec/startcode.c', 'ffmpeg/libavcodec/subviewerdec.c', 'ffmpeg/libavcodec/sunrast.c', 'ffmpeg/libavcodec/sunrastenc.c', 'ffmpeg/libavcodec/svq1.c', 'ffmpeg/libavcodec/svq13.c', 'ffmpeg/libavcodec/svq1dec.c', 'ffmpeg/libavcodec/svq1enc.c', 'ffmpeg/libavcodec/svq3.c', 'ffmpeg/libavcodec/synth_filter.c', 'ffmpeg/libavcodec/tak.c', 'ffmpeg/libavcodec/tak_parser.c', 'ffmpeg/libavcodec/takdec.c', 'ffmpeg/libavcodec/takdsp.c', 'ffmpeg/libavcodec/targa.c', 'ffmpeg/libavcodec/targa_y216dec.c', 'ffmpeg/libavcodec/targaenc.c', 'ffmpeg/libavcodec/tdsc.c', 'ffmpeg/libavcodec/textdec.c', 'ffmpeg/libavcodec/texturedsp.c', 'ffmpeg/libavcodec/tiertexseqv.c', 'ffmpeg/libavcodec/tiff.c', 'ffmpeg/libavcodec/tiff_common.c', 'ffmpeg/libavcodec/tiff_data.c', 'ffmpeg/libavcodec/tiffenc.c', 'ffmpeg/libavcodec/tmv.c', 'ffmpeg/libavcodec/tpeldsp.c', 'ffmpeg/libavcodec/truemotion1.c', 'ffmpeg/libavcodec/truemotion2.c', 'ffmpeg/libavcodec/truemotion2rt.c', 'ffmpeg/libavcodec/truespeech.c', 'ffmpeg/libavcodec/tscc.c', 'ffmpeg/libavcodec/tscc2.c', 'ffmpeg/libavcodec/tta.c', 'ffmpeg/libavcodec/ttadata.c', 'ffmpeg/libavcodec/ttadsp.c', 'ffmpeg/libavcodec/ttaenc.c', 'ffmpeg/libavcodec/twinvq.c', 'ffmpeg/libavcodec/twinvqdec.c', 'ffmpeg/libavcodec/txd.c', 'ffmpeg/libavcodec/ulti.c', 'ffmpeg/libavcodec/utils.c', 'ffmpeg/libavcodec/utvideo.c', 'ffmpeg/libavcodec/utvideodec.c', 'ffmpeg/libavcodec/utvideoenc.c', 'ffmpeg/libavcodec/v210dec.c', 'ffmpeg/libavcodec/v210enc.c', 'ffmpeg/libavcodec/v210x.c', 'ffmpeg/libavcodec/v308dec.c', 'ffmpeg/libavcodec/v308enc.c', 'ffmpeg/libavcodec/v408dec.c', 'ffmpeg/libavcodec/v408enc.c', 'ffmpeg/libavcodec/v410dec.c', 'ffmpeg/libavcodec/v410enc.c', 'ffmpeg/libavcodec/vb.c', 'ffmpeg/libavcodec/vble.c', 'ffmpeg/libavcodec/vc1.c', 'ffmpeg/libavcodec/vc1_block.c', 'ffmpeg/libavcodec/vc1_loopfilter.c', 'ffmpeg/libavcodec/vc1_mc.c', 'ffmpeg/libavcodec/vc1_parser.c', 'ffmpeg/libavcodec/vc1_pred.c', 'ffmpeg/libavcodec/vc1data.c', 'ffmpeg/libavcodec/vc1dec.c', 'ffmpeg/libavcodec/vc1dsp.c', 'ffmpeg/libavcodec/vc2enc.c', 'ffmpeg/libavcodec/vc2enc_dwt.c', 'ffmpeg/libavcodec/vcr1.c', 'ffmpeg/libavcodec/videodsp.c', 'ffmpeg/libavcodec/vima.c', 'ffmpeg/libavcodec/vmdaudio.c', 'ffmpeg/libavcodec/vmdvideo.c', 'ffmpeg/libavcodec/vmnc.c', 'ffmpeg/libavcodec/vorbis.c', 'ffmpeg/libavcodec/vorbis_data.c', 'ffmpeg/libavcodec/vorbis_parser.c', 'ffmpeg/libavcodec/vorbisdec.c', 'ffmpeg/libavcodec/vorbisdsp.c', 'ffmpeg/libavcodec/vorbisenc.c', 'ffmpeg/libavcodec/vp3.c', 'ffmpeg/libavcodec/vp3_parser.c', 'ffmpeg/libavcodec/vp3dsp.c', 'ffmpeg/libavcodec/vp5.c', 'ffmpeg/libavcodec/vp56.c', 'ffmpeg/libavcodec/vp56data.c', 'ffmpeg/libavcodec/vp56dsp.c', 'ffmpeg/libavcodec/vp56rac.c', 'ffmpeg/libavcodec/vp6.c', 'ffmpeg/libavcodec/vp6dsp.c', 'ffmpeg/libavcodec/vp8.c', 'ffmpeg/libavcodec/vp8_parser.c', 'ffmpeg/libavcodec/vp8dsp.c', 'ffmpeg/libavcodec/vp9.c', 'ffmpeg/libavcodec/vp9_parser.c', 'ffmpeg/libavcodec/vp9_superframe_bsf.c', 'ffmpeg/libavcodec/vp9dsp.c', 'ffmpeg/libavcodec/vp9dsp_10bpp.c', 'ffmpeg/libavcodec/vp9dsp_12bpp.c', 'ffmpeg/libavcodec/vp9dsp_8bpp.c', 'ffmpeg/libavcodec/vqavideo.c', 'ffmpeg/libavcodec/wavpack.c', 'ffmpeg/libavcodec/wavpackenc.c', 'ffmpeg/libavcodec/webp.c', 'ffmpeg/libavcodec/webvttdec.c', 'ffmpeg/libavcodec/webvttenc.c', 'ffmpeg/libavcodec/wma.c', 'ffmpeg/libavcodec/wma_common.c', 'ffmpeg/libavcodec/wma_freqs.c', 'ffmpeg/libavcodec/wmadec.c', 'ffmpeg/libavcodec/wmaenc.c', 'ffmpeg/libavcodec/wmalosslessdec.c', 'ffmpeg/libavcodec/wmaprodec.c', 'ffmpeg/libavcodec/wmavoice.c', 'ffmpeg/libavcodec/wmv2.c', 'ffmpeg/libavcodec/wmv2data.c', 'ffmpeg/libavcodec/wmv2dec.c', 'ffmpeg/libavcodec/wmv2dsp.c', 'ffmpeg/libavcodec/wmv2enc.c', 'ffmpeg/libavcodec/wnv1.c', 'ffmpeg/libavcodec/wrapped_avframe.c', 'ffmpeg/libavcodec/ws-snd1.c', 'ffmpeg/libavcodec/xan.c', 'ffmpeg/libavcodec/xbmdec.c', 'ffmpeg/libavcodec/xbmenc.c', 'ffmpeg/libavcodec/xface.c', 'ffmpeg/libavcodec/xfacedec.c', 'ffmpeg/libavcodec/xfaceenc.c', 'ffmpeg/libavcodec/xiph.c', 'ffmpeg/libavcodec/xl.c', 'ffmpeg/libavcodec/xsubdec.c', 'ffmpeg/libavcodec/xsubenc.c', 'ffmpeg/libavcodec/xvididct.c', 'ffmpeg/libavcodec/xwddec.c', 'ffmpeg/libavcodec/xwdenc.c', 'ffmpeg/libavcodec/xxan.c', 'ffmpeg/libavcodec/y41pdec.c', 'ffmpeg/libavcodec/y41penc.c', 'ffmpeg/libavcodec/ylc.c', 'ffmpeg/libavcodec/yop.c', 'ffmpeg/libavcodec/yuv4dec.c', 'ffmpeg/libavcodec/yuv4enc.c', 'ffmpeg/libavcodec/zerocodec.c', 'ffmpeg/libavcodec/zmbv.c', 'ffmpeg/libavcodec/zmbvenc.c', ]) if target.get_arch() == "x86": my_module.add_src_file([ 'ffmpeg/libavcodec/x86/aacpsdsp_init.c', 'ffmpeg/libavcodec/x86/ac3dsp_init.c', 'ffmpeg/libavcodec/x86/alacdsp_init.c', 'ffmpeg/libavcodec/x86/audiodsp_init.c', 'ffmpeg/libavcodec/x86/blockdsp_init.c', 'ffmpeg/libavcodec/x86/bswapdsp_init.c', 'ffmpeg/libavcodec/x86/cavsdsp.c', 'ffmpeg/libavcodec/x86/constants.c', 'ffmpeg/libavcodec/x86/dcadsp_init.c', 'ffmpeg/libavcodec/x86/dct_init.c', 'ffmpeg/libavcodec/x86/dirac_dwt_init.c', 'ffmpeg/libavcodec/x86/diracdsp_init.c', 'ffmpeg/libavcodec/x86/dnxhdenc_init.c', 'ffmpeg/libavcodec/x86/fdct.c', 'ffmpeg/libavcodec/x86/fdctdsp_init.c', 'ffmpeg/libavcodec/x86/fft_init.c', 'ffmpeg/libavcodec/x86/flacdsp_init.c', 'ffmpeg/libavcodec/x86/fmtconvert_init.c', 'ffmpeg/libavcodec/x86/g722dsp_init.c', 'ffmpeg/libavcodec/x86/h263dsp_init.c', 'ffmpeg/libavcodec/x86/h264_intrapred_init.c', 'ffmpeg/libavcodec/x86/h264_qpel.c', 'ffmpeg/libavcodec/x86/h264chroma_init.c', 'ffmpeg/libavcodec/x86/h264dsp_init.c', 'ffmpeg/libavcodec/x86/hevcdsp_init.c', 'ffmpeg/libavcodec/x86/hpeldsp_init.c', 'ffmpeg/libavcodec/x86/huffyuvdsp_init.c', 'ffmpeg/libavcodec/x86/huffyuvencdsp_mmx.c', 'ffmpeg/libavcodec/x86/idctdsp_init.c', 'ffmpeg/libavcodec/x86/jpeg2000dsp_init.c', 'ffmpeg/libavcodec/x86/lossless_audiodsp_init.c', 'ffmpeg/libavcodec/x86/lossless_videodsp_init.c', 'ffmpeg/libavcodec/x86/lpc.c', 'ffmpeg/libavcodec/x86/me_cmp_init.c', 'ffmpeg/libavcodec/x86/mlpdsp_init.c', 'ffmpeg/libavcodec/x86/mpegaudiodsp.c', 'ffmpeg/libavcodec/x86/mpegvideo.c', 'ffmpeg/libavcodec/x86/mpegvideodsp.c', 'ffmpeg/libavcodec/x86/mpegvideoenc.c', 'ffmpeg/libavcodec/x86/mpegvideoencdsp_init.c', 'ffmpeg/libavcodec/x86/pixblockdsp_init.c', 'ffmpeg/libavcodec/x86/pngdsp_init.c', 'ffmpeg/libavcodec/x86/proresdsp_init.c', 'ffmpeg/libavcodec/x86/qpeldsp_init.c', 'ffmpeg/libavcodec/x86/rv34dsp_init.c', 'ffmpeg/libavcodec/x86/rv40dsp_init.c', 'ffmpeg/libavcodec/x86/sbrdsp_init.c', 'ffmpeg/libavcodec/x86/simple_idct.c', 'ffmpeg/libavcodec/x86/snowdsp.c', 'ffmpeg/libavcodec/x86/svq1enc_init.c', 'ffmpeg/libavcodec/x86/synth_filter_init.c', 'ffmpeg/libavcodec/x86/takdsp_init.c', 'ffmpeg/libavcodec/x86/ttadsp_init.c', 'ffmpeg/libavcodec/x86/v210-init.c', 'ffmpeg/libavcodec/x86/v210enc_init.c', 'ffmpeg/libavcodec/x86/vc1dsp_init.c', 'ffmpeg/libavcodec/x86/vc1dsp_mmx.c', 'ffmpeg/libavcodec/x86/videodsp_init.c', 'ffmpeg/libavcodec/x86/vorbisdsp_init.c', 'ffmpeg/libavcodec/x86/vp3dsp_init.c', 'ffmpeg/libavcodec/x86/vp6dsp_init.c', 'ffmpeg/libavcodec/x86/vp8dsp_init.c', 'ffmpeg/libavcodec/x86/vp9dsp_init.c', 'ffmpeg/libavcodec/x86/vp9dsp_init_10bpp.c', 'ffmpeg/libavcodec/x86/vp9dsp_init_12bpp.c', 'ffmpeg/libavcodec/x86/vp9dsp_init_16bpp.c', 'ffmpeg/libavcodec/x86/xvididct_init.c', ]) elif target.get_arch() == "arm" \ and target.get_bus_size() == "32": my_module.add_src_file([ 'ffmpeg/libavcodec/arm/aacpsdsp_init_arm.c', 'ffmpeg/libavcodec/arm/aacpsdsp_neon.S', 'ffmpeg/libavcodec/arm/ac3dsp_arm.S', 'ffmpeg/libavcodec/arm/ac3dsp_armv6.S', 'ffmpeg/libavcodec/arm/ac3dsp_init_arm.c', 'ffmpeg/libavcodec/arm/ac3dsp_neon.S', 'ffmpeg/libavcodec/arm/audiodsp_init_arm.c', 'ffmpeg/libavcodec/arm/audiodsp_init_neon.c', 'ffmpeg/libavcodec/arm/audiodsp_neon.S', 'ffmpeg/libavcodec/arm/blockdsp_init_arm.c', 'ffmpeg/libavcodec/arm/blockdsp_init_neon.c', 'ffmpeg/libavcodec/arm/blockdsp_neon.S', 'ffmpeg/libavcodec/arm/fft_fixed_init_arm.c', 'ffmpeg/libavcodec/arm/fft_fixed_neon.S', 'ffmpeg/libavcodec/arm/fft_init_arm.c', 'ffmpeg/libavcodec/arm/fft_neon.S', 'ffmpeg/libavcodec/arm/fft_vfp.S', 'ffmpeg/libavcodec/arm/flacdsp_arm.S', 'ffmpeg/libavcodec/arm/flacdsp_init_arm.c', 'ffmpeg/libavcodec/arm/fmtconvert_init_arm.c', 'ffmpeg/libavcodec/arm/fmtconvert_neon.S', 'ffmpeg/libavcodec/arm/fmtconvert_vfp.S', 'ffmpeg/libavcodec/arm/g722dsp_init_arm.c', 'ffmpeg/libavcodec/arm/g722dsp_neon.S', 'ffmpeg/libavcodec/arm/h264chroma_init_arm.c', 'ffmpeg/libavcodec/arm/h264cmc_neon.S', 'ffmpeg/libavcodec/arm/h264dsp_init_arm.c', 'ffmpeg/libavcodec/arm/h264dsp_neon.S', 'ffmpeg/libavcodec/arm/h264idct_neon.S', 'ffmpeg/libavcodec/arm/h264pred_init_arm.c', 'ffmpeg/libavcodec/arm/h264pred_neon.S', 'ffmpeg/libavcodec/arm/h264qpel_init_arm.c', 'ffmpeg/libavcodec/arm/h264qpel_neon.S', 'ffmpeg/libavcodec/arm/hevcdsp_deblock_neon.S', 'ffmpeg/libavcodec/arm/hevcdsp_idct_neon.S', 'ffmpeg/libavcodec/arm/hevcdsp_init_arm.c', 'ffmpeg/libavcodec/arm/hevcdsp_init_neon.c', 'ffmpeg/libavcodec/arm/hevcdsp_qpel_neon.S', 'ffmpeg/libavcodec/arm/hpeldsp_arm.S', 'ffmpeg/libavcodec/arm/hpeldsp_armv6.S', 'ffmpeg/libavcodec/arm/hpeldsp_init_arm.c', 'ffmpeg/libavcodec/arm/hpeldsp_init_armv6.c', 'ffmpeg/libavcodec/arm/hpeldsp_init_neon.c', 'ffmpeg/libavcodec/arm/hpeldsp_neon.S', 'ffmpeg/libavcodec/arm/idctdsp_arm.S', 'ffmpeg/libavcodec/arm/idctdsp_armv6.S', 'ffmpeg/libavcodec/arm/idctdsp_init_arm.c', 'ffmpeg/libavcodec/arm/idctdsp_init_armv5te.c', 'ffmpeg/libavcodec/arm/idctdsp_init_armv6.c', 'ffmpeg/libavcodec/arm/idctdsp_init_neon.c', 'ffmpeg/libavcodec/arm/idctdsp_neon.S', 'ffmpeg/libavcodec/arm/int_neon.S', 'ffmpeg/libavcodec/arm/jrevdct_arm.S', 'ffmpeg/libavcodec/arm/lossless_audiodsp_init_arm.c', 'ffmpeg/libavcodec/arm/lossless_audiodsp_neon.S', 'ffmpeg/libavcodec/arm/mdct_fixed_neon.S', 'ffmpeg/libavcodec/arm/mdct_neon.S', 'ffmpeg/libavcodec/arm/mdct_vfp.S', 'ffmpeg/libavcodec/arm/me_cmp_armv6.S', 'ffmpeg/libavcodec/arm/me_cmp_init_arm.c', 'ffmpeg/libavcodec/arm/mlpdsp_armv5te.S', 'ffmpeg/libavcodec/arm/mlpdsp_armv6.S', 'ffmpeg/libavcodec/arm/mlpdsp_init_arm.c', 'ffmpeg/libavcodec/arm/mpegaudiodsp_fixed_armv6.S', 'ffmpeg/libavcodec/arm/mpegaudiodsp_init_arm.c', 'ffmpeg/libavcodec/arm/mpegvideo_arm.c', 'ffmpeg/libavcodec/arm/mpegvideo_armv5te.c', 'ffmpeg/libavcodec/arm/mpegvideo_armv5te_s.S', 'ffmpeg/libavcodec/arm/mpegvideo_neon.S', 'ffmpeg/libavcodec/arm/mpegvideoencdsp_armv6.S', 'ffmpeg/libavcodec/arm/mpegvideoencdsp_init_arm.c', 'ffmpeg/libavcodec/arm/pixblockdsp_armv6.S', 'ffmpeg/libavcodec/arm/pixblockdsp_init_arm.c', 'ffmpeg/libavcodec/arm/rdft_init_arm.c', 'ffmpeg/libavcodec/arm/rdft_neon.S', 'ffmpeg/libavcodec/arm/rv34dsp_init_arm.c', 'ffmpeg/libavcodec/arm/rv34dsp_neon.S', 'ffmpeg/libavcodec/arm/rv40dsp_init_arm.c', 'ffmpeg/libavcodec/arm/rv40dsp_neon.S', 'ffmpeg/libavcodec/arm/sbrdsp_init_arm.c', 'ffmpeg/libavcodec/arm/sbrdsp_neon.S', 'ffmpeg/libavcodec/arm/simple_idct_arm.S', 'ffmpeg/libavcodec/arm/simple_idct_armv5te.S', 'ffmpeg/libavcodec/arm/simple_idct_armv6.S', 'ffmpeg/libavcodec/arm/simple_idct_neon.S', 'ffmpeg/libavcodec/arm/startcode_armv6.S', 'ffmpeg/libavcodec/arm/vc1dsp_init_arm.c', 'ffmpeg/libavcodec/arm/vc1dsp_init_neon.c', 'ffmpeg/libavcodec/arm/vc1dsp_neon.S', 'ffmpeg/libavcodec/arm/videodsp_armv5te.S', 'ffmpeg/libavcodec/arm/videodsp_init_arm.c', 'ffmpeg/libavcodec/arm/videodsp_init_armv5te.c', 'ffmpeg/libavcodec/arm/vorbisdsp_init_arm.c', 'ffmpeg/libavcodec/arm/vorbisdsp_neon.S', 'ffmpeg/libavcodec/arm/vp3dsp_init_arm.c', 'ffmpeg/libavcodec/arm/vp3dsp_neon.S', 'ffmpeg/libavcodec/arm/vp6dsp_init_arm.c', 'ffmpeg/libavcodec/arm/vp6dsp_neon.S', 'ffmpeg/libavcodec/arm/vp8_armv6.S', 'ffmpeg/libavcodec/arm/vp8dsp_armv6.S', 'ffmpeg/libavcodec/arm/vp8dsp_init_arm.c', 'ffmpeg/libavcodec/arm/vp8dsp_init_armv6.c', 'ffmpeg/libavcodec/arm/vp8dsp_init_neon.c', 'ffmpeg/libavcodec/arm/vp8dsp_neon.S', 'ffmpeg/libavcodec/neon/mpegvideo.c', ]) elif target.get_arch() == "arm" \ and target.get_bus_size() == "64": my_module.add_src_file([ 'ffmpeg/libavcodec/aarch64/fft_init_aarch64.c', 'ffmpeg/libavcodec/aarch64/fft_neon.S', 'ffmpeg/libavcodec/aarch64/fmtconvert_init.c', 'ffmpeg/libavcodec/aarch64/fmtconvert_neon.S', 'ffmpeg/libavcodec/aarch64/h264chroma_init_aarch64.c', 'ffmpeg/libavcodec/aarch64/h264cmc_neon.S', 'ffmpeg/libavcodec/aarch64/h264dsp_init_aarch64.c', 'ffmpeg/libavcodec/aarch64/h264dsp_neon.S', 'ffmpeg/libavcodec/aarch64/h264idct_neon.S', 'ffmpeg/libavcodec/aarch64/h264pred_init.c', 'ffmpeg/libavcodec/aarch64/h264pred_neon.S', 'ffmpeg/libavcodec/aarch64/h264qpel_init_aarch64.c', 'ffmpeg/libavcodec/aarch64/h264qpel_neon.S', 'ffmpeg/libavcodec/aarch64/hpeldsp_init_aarch64.c', 'ffmpeg/libavcodec/aarch64/hpeldsp_neon.S', 'ffmpeg/libavcodec/aarch64/imdct15_init.c', 'ffmpeg/libavcodec/aarch64/imdct15_neon.S', 'ffmpeg/libavcodec/aarch64/mdct_neon.S', 'ffmpeg/libavcodec/aarch64/mpegaudiodsp_init.c', 'ffmpeg/libavcodec/aarch64/mpegaudiodsp_neon.S', 'ffmpeg/libavcodec/aarch64/rv40dsp_init_aarch64.c', 'ffmpeg/libavcodec/aarch64/synth_filter_init.c', 'ffmpeg/libavcodec/aarch64/synth_filter_neon.S', 'ffmpeg/libavcodec/aarch64/vc1dsp_init_aarch64.c', 'ffmpeg/libavcodec/aarch64/videodsp.S', 'ffmpeg/libavcodec/aarch64/videodsp_init.c', 'ffmpeg/libavcodec/aarch64/vorbisdsp_init.c', 'ffmpeg/libavcodec/aarch64/vorbisdsp_neon.S', 'ffmpeg/libavcodec/neon/mpegvideo.c', ]) else: debug.warning("unknow architecture ...") my_module.add_optionnal_depend('fdk-aac', compilation_flags=[ "c", [ "-DCONFIG_LIBFDK_AAC=1", "-DCONFIG_LIBFDK_AAC_DECODER=1", "-DCONFIG_LIBFDK_AAC_ENCODER=1" ] ], compilation_flags_not_found=[ "c", [ "-DCONFIG_LIBFDK_AAC=0", "-DCONFIG_LIBFDK_AAC_DECODER=0", "-DCONFIG_LIBFDK_AAC_ENCODER=0" ] ], src_file=[ 'ffmpeg/libavcodec/libfdk-aacenc.c', 'ffmpeg/libavcodec/libfdk-aacdec.c' ]) #TODO : this is bad ... my_module.add_header_file( [ #'ffmpeg/libavcodec/bsf_list.c', 'generated/bsf_list.c', ], destination_path="libavcodec") """ my_module.add_optionnal_depend('vdpau', src_file=[ 'ffmpeg/libavcodec/vdpau.c', ]) """ my_module.compile_version("c", 1999) lutinLib_ffmpegCommon.add_common_property(target, my_module) # add dependency of libraries: my_module.add_depend('c') my_module.add_depend('m') my_module.add_depend('z') my_module.add_depend('pthread') my_module.add_depend([ 'ffmpeg-avswresample', 'ffmpeg-avutil', 'ffmpeg-headers', ]) return True
def tool_generate_main_java_class(target, module, package_name): if "ADMOD_ID" not in module.package_prop: debug.warning("Missing parameter ADMOD_ID wen you resuested dependency of ADMOD") return module.package_prop["RIGHT"].append("INTERNET") module.package_prop["RIGHT"].append("ACCESS_NETWORK_STATE") module.pkg_add("GENERATE_SECTION__IMPORT", [ "import com.google.android.gms.ads.AdRequest;", "import com.google.android.gms.ads.AdSize;", "import com.google.android.gms.ads.AdView;", "import android.widget.LinearLayout;", "import android.widget.Button;" ]) module.pkg_add("GENERATE_SECTION__DECLARE", [ "/** The view to show the ad. */", "private AdView adView;", "private LinearLayout mLayout = null;" ]) list_create = [ "mLayout = new LinearLayout(this);" "mLayout.setOrientation(android.widget.LinearLayout.VERTICAL);", "LinearLayout.LayoutParams paramsWindows = new LinearLayout.LayoutParams(", " LinearLayout.LayoutParams.FILL_PARENT,", " LinearLayout.LayoutParams.FILL_PARENT);", "", "setContentView(mLayout, paramsWindows);", "", "LinearLayout.LayoutParams paramsAdds = new LinearLayout.LayoutParams(", " LinearLayout.LayoutParams.FILL_PARENT,", " LinearLayout.LayoutParams.WRAP_CONTENT);", "paramsAdds.weight = 0;", "", "LinearLayout.LayoutParams paramsGLView = new LinearLayout.LayoutParams(", " LinearLayout.LayoutParams.FILL_PARENT,", " LinearLayout.LayoutParams.FILL_PARENT);", "paramsGLView.weight = 1;", "paramsGLView.height = 0;", "", "mLayout.setGravity(android.view.Gravity.TOP);", "", "// Create an adds.", "adView = new AdView(this);", "adView.setAdSize(AdSize.SMART_BANNER);", "adView.setAdUnitId(\"" + module.package_prop["ADMOD_ID"] + "\");", "", "// Create an ad request. Check logcat output for the hashed device ID to get test ads on a physical device.", "AdRequest adRequest = new AdRequest.Builder()", " .addTestDevice(AdRequest.DEVICE_ID_EMULATOR)", " .build();", "", "// Add the AdView to the view hierarchy. The view will have no size until the ad is loaded."] if "ADMOD_POSITION" in module.package_prop \ and module.package_prop["ADMOD_POSITION"] == "top": list_create.append("mLayout.addView(adView, paramsAdds);") list_create.append("mLayout.addView(mGLView, paramsGLView);") else: list_create.append("mLayout.addView(mGLView, paramsGLView);") list_create.append("mLayout.addView(adView, paramsAdds);") list_create.append("") list_create.append("// Start loading the ad in the background.") list_create.append("adView.loadAd(adRequest);")
def run_command(cmd_line, store_cmd_line="", build_id=-1, file="", store_output_file="", depend_data=None): global error_occured global exit_flag global current_id_execution global error_execution # prepare command line: args = shlex.split(cmd_line) debug.verbose("cmd = " + str(args)) try: # create the subprocess p = subprocess.Popen(args, stdout=subprocess.PIPE, stderr=subprocess.PIPE) except subprocess.CalledProcessError as e: debug.error("subprocess.CalledProcessError : TODO ...") except: debug.error("Exception on : " + str(args)) # launch the subprocess: output, err = p.communicate() if sys.version_info >= (3, 0): output = output.decode("utf-8") err = err.decode("utf-8") # store error if needed: tools.store_warning(store_output_file, output, err) # Check error : if p.returncode == 0: debug.debug(env.print_pretty(cmd_line)) queue_lock.acquire() if depend_data != None: depend.create_dependency_file(depend_data['file'], depend_data['data']) # TODO : Print the output all the time .... ==> to show warnings ... if build_id >= 0 and (output != "" or err != ""): debug.warning("output in subprocess compiling: '" + file + "'") if output != "": debug.print_compilator(output) if err != "": debug.print_compilator(err) queue_lock.release() else: error_occured = True exit_flag = True # if No ID : Not in a multiprocess mode ==> just stop here if build_id < 0: debug.debug(env.print_pretty(cmd_line), force=True) debug.print_compilator(output) debug.print_compilator(err) if p.returncode == 2: debug.error("can not compile file ... [keyboard interrrupt]") else: debug.error("can not compile file ... ret : " + str(p.returncode)) else: # in multiprocess interface queue_lock.acquire() # if an other write an error before, check if the current process is started before ==> then is the first error if error_execution["id"] >= build_id: # nothing to do ... queue_lock.release() return; error_execution["id"] = build_id error_execution["cmd"] = cmd_line error_execution["return"] = p.returncode error_execution["err"] = err, error_execution["out"] = output, queue_lock.release() # not write the command file... return debug.verbose("done 3") # write cmd line only after to prevent errors ... tools.store_command(cmd_line, store_cmd_line)
def import_path_local(path, limit_sub_folder, exclude_path = [], base_name = ""): out = [] debug.verbose("lutin files: " + str(path) + " [START]") if limit_sub_folder == 0: debug.debug("Subparsing limitation append ...") return [] try: list_files = os.listdir(path) except: # an error occure, maybe read error ... debug.warning("error when getting subdirectory of '" + str(path) + "'") return [] if path in exclude_path: debug.debug("find '" + str(path) + "' in exclude_path=" + str(exclude_path)) return [] # filter elements: tmp_list_lutin_file = filter_name_and_file(path, list_files, base_name + "*.py") debug.verbose("lutin files: " + str(path) + " : " + str(tmp_list_lutin_file)) # Import the module: for filename in tmp_list_lutin_file: out.append(os.path.join(path, filename)) debug.extreme_verbose(" Find a file : '" + str(out[-1]) + "'") need_parse_sub_folder = True rm_value = -1 # check if we need to parse sub_folder if len(tmp_list_lutin_file) != 0: need_parse_sub_folder = False # check if the file "lutin_parse_sub.py" is present ==> parse SubFolder (force and add +1 in the resursing if base_name + "ParseSubFolders.txt" in list_files: debug.debug("find SubParser ... " + str(base_name + "ParseSubFolders.txt") + " " + path) data_file_sub = tools.file_read_data(os.path.join(path, base_name + "ParseSubFolders.txt")) if data_file_sub == "": debug.debug(" Empty file Load all subfolder in the worktree in '" + str(path) + "'") need_parse_sub_folder = True rm_value = 0 else: list_sub = data_file_sub.split("\n") debug.debug(" Parse selected folders " + str(list_sub) + " no parse local folder directory") need_parse_sub_folder = False for folder in list_sub: if folder == "" \ or folder == "/": continue; tmp_out = import_path_local(os.path.join(path, folder), 1, exclude_path, base_name) # add all the elements: for elem in tmp_out: out.append(elem) if need_parse_sub_folder == True: list_folders = filter_path(path, list_files) for folder in list_folders: tmp_out = import_path_local(os.path.join(path, folder), limit_sub_folder - rm_value, exclude_path, base_name) # add all the elements: for elem in tmp_out: out.append(elem) return out
def build(self, name, optionnal=False, actions=[], package_name=None): if len(name.split("?")) != 1\ or len(name.split("@")) != 1: debug.error("need update") if actions == "": actions = ["build"] if actions == []: actions = ["build"] if type(actions) == str: actions = [actions] if name == "gcov": debug.info("gcov all") debug.error("must set the gcov parsing on a specific library or binary ==> not supported now for all") if name == "dump": debug.info("dump all") self.load_all() for mod in self.module_list: mod.display() return if name[:10] == "dependency": if len(name) > 10: rules = name.split(":")[1] else: rules = "LBDPK" # L for library # B for binary # D for Data # P for prebuild # K for package debug.print_element("dot", "", "---", "dependency.dot") self.load_all() tmp_file = open("dependency.dot", 'w') tmp_file.write('digraph G {\n') tmp_file.write(' rankdir=\"LR\";\n') for mod in self.module_list: mod.dependency_generate(self, tmp_file, 1, rules) # TODO : do it better ==> system library hook (do a oad of all avillable system library) tmp_file.write(' node [\n'); tmp_file.write(' shape=square;\n'); tmp_file.write(' style=filled;\n'); tmp_file.write(' color=gray;\n'); tmp_file.write(' ];\n'); # TODO : End hook for mod in self.module_list: mod.dependency_generate(self, tmp_file, 2, rules) tmp_file.write('}\n') tmp_file.flush() tmp_file.close() debug.print_element("dot", "", "---", "dependency.dot") return if name == "all": debug.info("build all") self.load_all() for mod in self.module_list: if self._name == "Android": if mod.get_type() == "PACKAGE": mod.build(self, package_name) else: if mod.get_type() == "BINARY" \ or mod.get_type() == "PACKAGE": mod.build(self, package_name) elif name == "clean": debug.info("clean all") self.load_all() for mod in self.module_list: mod.clean(self) else: module_name = name action_list = actions for action_name in action_list: debug.verbose("requested : " + module_name + "?" + action_name + " [START]") ret = None; if action_name == "install": try: self.install_package(module_name) except AttributeError: debug.error("target have no 'install_package' instruction") elif action_name == "uninstall": try: self.un_install_package(module_name) except AttributeError: debug.error("target have no 'un_install_package' instruction") elif action_name[:3] == "run": """ if mod.get_type() != "BINARY" \ and mod.get_type() != "PACKAGE": debug.error("Can not run other than 'BINARY' ... pakage='" + mod.get_type() + "' for module='" + module_name + "'") """ bin_name = None if len(action_name) > 3: if action_name[3] == '%': bin_name = "" for elem in action_name[4:]: if elem == ":": break; bin_name += elem # we have option: action_name2 = action_name.replace("\:", "1234COLUMN4321") option_list = action_name2.split(":") if len(option_list) == 0: if bin_name != None: debug.warning("action 'run' wrong options options ... : '" + action_name + "' might be separate with ':'") option_list = [] else: option_list_tmp = option_list[1:] option_list = [] for elem in option_list_tmp: option_list.append(elem.replace("1234COLUMN4321", ":")) else: option_list = [] #try: self.run(module_name, option_list, bin_name) #except AttributeError: # debug.error("target have no 'run' instruction") elif action_name == "log": try: self.show_log(module_name) except AttributeError: debug.error("target have no 'show_log' instruction") else: present = self.load_if_needed(module_name, optionnal=optionnal) if present == False \ and optionnal == True: ret = [heritage.HeritageList(), False] else: for mod in self.module_list: debug.verbose("compare " + mod.get_name() + " == " + module_name) if mod.get_name() == module_name: if action_name[:4] == "dump": debug.info("dump module '" + module_name + "'") if len(action_name) > 4: debug.warning("action 'dump' does not support options ... : '" + action_name + "'") ret = mod.display() break elif action_name[:5] == "clean": debug.info("clean module '" + module_name + "'") if len(action_name) > 5: debug.warning("action 'clean' does not support options ... : '" + action_name + "'") ret = mod.clean(self) break elif action_name[:4] == "gcov": debug.debug("gcov on module '" + module_name + "'") if len(action_name) > 4: # we have option: option_list = action_name.split(":") if len(option_list) == 0: debug.warning("action 'gcov' wrong options options ... : '" + action_name + "' might be separate with ':'") option_list = [] else: option_list = option_list[1:] else: option_list = [] if "output" in option_list: ret = mod.gcov(self, generate_output=True) else: ret = mod.gcov(self, generate_output=False) break elif action_name[:5] == "build": if len(action_name) > 5: debug.warning("action 'build' does not support options ... : '" + action_name + "'") debug.debug("build module '" + module_name + "'") if optionnal == True: ret = [mod.build(self, package_name), True] else: ret = mod.build(self, package_name) break if optionnal == True \ and ret == None: ret = [heritage.HeritageList(), False] break if ret == None: debug.error("not know module name : '" + module_name + "' to '" + action_name + "' it") debug.verbose("requested : " + module_name + "?" + action_name + " [STOP]") if len(action_list) == 1: return ret
import os # Local import from realog import debug from . import tools from . import multiprocess from . import depend enable_resize_image = True try: if platform.system() == "Darwin": import CoreGraphics else: from PIL import Image except: enable_resize_image = False debug.warning("Missing python tools : CoreGraphics (MacOs) or PIL") ## ## @brief Generate the upper pow 2 of the size in parameter ## @param[in] size (int) Size that might heve the upper pow(2) ## @return the new size in pow(2) ## def get_pow_2_multiple(size): base = 2 while size>base: base = base * 2 return base ## ## @brief Resize an image ## @param[in] src_file (string) Path of the source image file
def configure(target, my_module): # add the file to compile: my_module.add_src_file([ 'ffmpeg/libswscale/alphablend.c', 'ffmpeg/libswscale/gamma.c', 'ffmpeg/libswscale/hscale.c', 'ffmpeg/libswscale/hscale_fast_bilinear.c', 'ffmpeg/libswscale/input.c', 'ffmpeg/libswscale/options.c', 'ffmpeg/libswscale/output.c', 'ffmpeg/libswscale/rgb2rgb.c', 'ffmpeg/libswscale/slice.c', 'ffmpeg/libswscale/swscale.c', 'ffmpeg/libswscale/swscale_unscaled.c', 'ffmpeg/libswscale/utils.c', 'ffmpeg/libswscale/vscale.c', 'ffmpeg/libswscale/yuv2rgb.c', ]) if target.get_arch() == "x86": my_module.add_src_file([ 'ffmpeg/libswscale/x86/hscale_fast_bilinear_simd.c', 'ffmpeg/libswscale/x86/rgb2rgb.c', 'ffmpeg/libswscale/x86/swscale.c', 'ffmpeg/libswscale/x86/yuv2rgb.c', ]) elif target.get_arch() == "arm" \ and target.get_bus_size() == "32": my_module.add_src_file([ 'ffmpeg/libswscale/arm/hscale.S', 'ffmpeg/libswscale/arm/output.S', 'ffmpeg/libswscale/arm/rgb2yuv_neon_16.S', 'ffmpeg/libswscale/arm/rgb2yuv_neon_32.S', 'ffmpeg/libswscale/arm/swscale.c', 'ffmpeg/libswscale/arm/swscale_unscaled.c', 'ffmpeg/libswscale/arm/yuv2rgb_neon.S', ]) elif target.get_arch() == "arm" \ and target.get_bus_size() == "64": my_module.add_src_file([ 'ffmpeg/libswscale/aarch64/hscale.S', 'ffmpeg/libswscale/aarch64/output.S', 'ffmpeg/libswscale/aarch64/swscale.c', 'ffmpeg/libswscale/aarch64/swscale_unscaled.c', 'ffmpeg/libswscale/aarch64/yuv2rgb_neon.S', ]) else: debug.warning("unknow architecture ...") my_module.compile_version("c", 1999) lutinLib_ffmpegCommon.add_common_property(target, my_module) # add dependency of libraries: my_module.add_depend('c') my_module.add_depend('m') my_module.add_depend('z') my_module.add_depend('pthread') my_module.add_depend([ 'ffmpeg-avutil', 'ffmpeg-headers', ]) return True
def need_re_build(dst, src, depend_file=None, file_cmd="", cmd_line="", force_identical=False): debug.extreme_verbose("Request check of dependency of :") debug.extreme_verbose(" dst='" + str(dst) + "'") debug.extreme_verbose(" src='" + str(src) + "'") debug.extreme_verbose(" dept='" + str(depend_file) + "'") debug.extreme_verbose(" cmd='" + str(file_cmd) + "'") debug.extreme_verbose(" force_identical='" + str(force_identical) + "'") # if force mode selected ==> just force rebuild ... if env.get_force_mode(): debug.extreme_verbose(" ==> must rebuild (force mode)") return True # check if the destination existed: if dst != "" \ and dst != None \ and os.path.exists(dst) == False: debug.extreme_verbose(" ==> must rebuild (dst does not exist)") return True if src != "" \ and src != None \ and os.path.exists(src) == False: debug.warning(" ==> unexistant file :'" + src + "'") return True # Check the basic date if the 2 files if dst != "" \ and dst != None \ and src != "" \ and src != None \ and os.path.getmtime(src) > os.path.getmtime(dst): debug.extreme_verbose(" ==> must rebuild (source time greater)") return True if depend_file != "" \ and depend_file != None \ and os.path.exists(depend_file) == False: debug.extreme_verbose(" ==> must rebuild (no depending file)") return True if file_cmd != "" \ and file_cmd != None: if os.path.exists(file_cmd) == False: debug.extreme_verbose(" ==> must rebuild (no commandLine file)") return True # check if the 2 cmd_line are similar : file2 = open(file_cmd, "r") first_and_unique_line = file2.read() if first_and_unique_line != cmd_line: debug.extreme_verbose(" ==> must rebuild (cmd_lines are not identical)") debug.extreme_verbose(" ==> '" + cmd_line + "'") debug.extreme_verbose(" ==> '" + first_and_unique_line + "'") file2.close() return True # the cmdfile is correct ... file2.close() if depend_file != "" \ and depend_file != None: debug.extreme_verbose(" start parsing dependency file : '" + depend_file + "'") file = open(depend_file, "r") for cur_line in file.readlines(): # normal file : end with : ": \\n" cur_line = cur_line[:len(cur_line)-1] # removing last \ ... if cur_line[len(cur_line)-1:] == '\\' : cur_line = cur_line[:len(cur_line)-1] # remove white space : #debug.verbose(" Line (read) : '" + cur_line + "'"); cur_line = cur_line.strip() #debug.verbose(" Line (strip) : '" + cur_line + "'"); test_file="" if cur_line[len(cur_line)-1:] == ':': debug.extreme_verbose(" Line (no check (already done) : '" + cur_line + "'"); elif len(cur_line) == 0 \ or cur_line == '\\': debug.extreme_verbose(" Line (Not parsed) : '" + cur_line + "'"); else: test_file = cur_line debug.extreme_verbose(" Line (might check) : '" + test_file + "'"); # really check files: if test_file != "": debug.extreme_verbose(" ==> test"); if False==os.path.exists(test_file): debug.extreme_verbose(" ==> must rebuild (a dependency file does not exist)") file.close() return True if os.path.getmtime(test_file) > os.path.getmtime(dst): debug.extreme_verbose(" ==> must rebuild (a dependency file time is newer)") file.close() return True # close the current file : file.close() # check the 2 files are identical: if force_identical == True: # check if the 2 cmd_line are similar: size_src = _file_size(src) size_dst = _file_size(dst) if size_src != size_dst: debug.extreme_verbose(" Force Rewrite not the same size size_src=" + str(size_src) + " != size_dest=" + str(size_dst)) return True data_src = _file_read_data(src, binary=True) data_dst = _file_read_data(dst, binary=True) if data_src != data_dst: debug.extreme_verbose(" Force Rewrite not the same data") return True debug.extreme_verbose(" ==> Not rebuild (all dependency is OK)") return False
def parse(self, start_position_parsing=1): list_argument = [] # composed of list element not_parse_next_element = False for iii in range(start_position_parsing, len(sys.argv)): self._last_element_parsed = iii # special case of parameter in some elements if not_parse_next_element == True: not_parse_next_element = False continue debug.verbose("parse [" + str(iii) + "]=" + sys.argv[iii]) argument = sys.argv[iii] # check if we get a stop parsing element: if argument in self._list_element_stop: debug.warning("stop at position: " + str(iii)) list_argument.append(ArgElement("", argument)) break optionList = argument.split("=") debug.verbose(str(optionList)) if type(optionList) == type(str()): option = optionList else: option = optionList[0] optionParam = argument[len(option) + 1:] debug.verbose(option) argument_found = False if option[:2] == "--": # big argument for prop in self.list_properties: if prop.is_parsable() == False: continue if prop.get_option_big() == "": continue if prop.get_option_big() == option[2:]: # find it debug.verbose("find argument 2 : " + option[2:]) if prop.need_parameters() == True: internalSub = option[2 + len(prop.get_option_big()):] if len(internalSub) != 0: if len(optionParam) != 0: # wrong argument ... debug.warning( "maybe wrong argument for : '" + prop.get_option_big() + "' cmdLine='" + argument + "'") prop.display() continue optionParam = internalSub if len(optionParam) == 0: #Get the next parameters if len(sys.argv) > iii + 1: optionParam = sys.argv[iii + 1] not_parse_next_element = True else: # missing arguments debug.warning( "parsing argument error : '" + prop.get_option_big() + "' Missing : subParameters ... cmdLine='" + argument + "'") prop.display() exit(-1) if prop.check_availlable(optionParam) == False: debug.warning( "argument error : '" + prop.get_option_big() + "' SubParameters not availlable ... cmdLine='" + argument + "' option='" + optionParam + "'") prop.display() exit(-1) list_argument.append( ArgElement(prop.get_option_big(), optionParam)) argument_found = True else: if len(optionParam) != 0: debug.warning("parsing argument error : '" + prop.get_option_big() + "' need no subParameters : '" + optionParam + "' cmdLine='" + argument + "'") prop.display() list_argument.append( ArgElement(prop.get_option_big())) argument_found = True break if argument_found == False: debug.error("UNKNOW argument : '" + argument + "'") elif option[:1] == "-": # small argument for prop in self.list_properties: if prop.is_parsable() == False: continue if prop.get_option_small() == "": continue if prop.get_option_small( ) == option[1:1 + len(prop.get_option_small())]: # find it debug.verbose("find argument 1 : " + option[1:1 + len(prop.get_option_small())]) if prop.need_parameters() == True: internalSub = option[1 + len(prop.get_option_small()):] if len(internalSub) != 0: if len(optionParam) != 0: # wrong argument ... debug.warning( "maybe wrong argument for : '" + prop.get_option_big() + "' cmdLine='" + argument + "'") prop.display() continue optionParam = internalSub if len(optionParam) == 0: #Get the next parameters if len(sys.argv) > iii + 1: optionParam = sys.argv[iii + 1] not_parse_next_element = True else: # missing arguments debug.warning( "parsing argument error : '" + prop.get_option_big() + "' Missing : subParameters cmdLine='" + argument + "'") prop.display() exit(-1) if prop.check_availlable(optionParam) == False: debug.warning( "argument error : '" + prop.get_option_big() + "' SubParameters not availlable ... cmdLine='" + argument + "' option='" + optionParam + "'") prop.display() exit(-1) list_argument.append( ArgElement(prop.get_option_big(), optionParam)) argument_found = True else: if len(optionParam) != 0: debug.warning("parsing argument error : '" + prop.get_option_big() + "' need no subParameters : '" + optionParam + "' cmdLine='" + argument + "'") prop.display() list_argument.append( ArgElement(prop.get_option_big())) argument_found = True break if argument_found == False: # small argument for prop in self.list_properties: if prop.is_parsable() == True \ or prop.get_option_big() == "": continue if prop.need_parameters() == True: list_argument.append( ArgElement(prop.get_option_big(), argument)) argument_found = True break if argument_found == False: #unknow element ... ==> just add in the list ... debug.verbose("unknow argument : " + argument) list_argument.append(ArgElement("", argument)) for prop in self.list_properties: if prop.is_parsable() == True \ or prop.get_option_big() == "": continue if prop.need_parameters() == True \ and prop.optionnal == False: debug.error("Missing argument:" + prop.get_option_big()) #for argument in list_argument: # argument.display() #exit(0) return list_argument
zeus::FutureGroup groupWait; for (auto& it : list: debug.info("remove ELEMENT : " + it); groupWait.add(remoteServiceVideo.remove(it)); groupWait.waitFor(echrono::seconds(2000)); """ debug.info("============================================") debug.info("== DONE ==") debug.info("============================================") elif requestAction == "list": debug.info("============================================") debug.info("== list files: ") debug.info("============================================") list_types = requests.get("http://127.0.0.1:15080/type") if list_types.status_code != 200: debug.warning(" !! ca, ot get type list ... " + str(list_types.status_code) + "") for elem in list_types.json(): debug.info(" get type id: " + str(elem["id"])) debug.info(" name: " + str(elem["name"])) # get the count of video in this type result_count = requests.get("http://127.0.0.1:15080/type/" + str(elem["id"]) + "/count") if result_count.status_code == 200: debug.info(" count: " + str(result_count.json()["count"])) else: debug.warning(" count: !!!!!! " + str(result_count.status_code) + "") # get all the video list result_video = requests.get("http://127.0.0.1:15080/type/" + str(elem["id"]) + "/video") if result_video.status_code == 200:
debug.info("======================================================") list_of_library = [] missing_dependency = [] for elem in tmp_out: name = get_element_name(elem) if name not in list_of_library: list_of_library.append(name) for elem in tmp_out: dependency = get_element_depend(elem) name = get_element_name(elem) for dep in dependency: if dep not in list_of_library: if dep not in missing_dependency: missing_dependency.append(dep) debug.info("Element: '" + name + "'") debug.warning(" depends: " + str(dependency)) debug.warning(" missing: " + str(dep)) if len(missing_dependency) != 0: debug.error("missing dependency: " + str(missing_dependency)) debug.info("======================================================") debug.info("== Ordering elements") debug.info("======================================================") project_elements_ordered = [] max_loop = len(project_elements) * 10 while len(project_elements) != 0: max_loop -= 1 if max_loop <= 0: debug.error("ERROR: Detect dependency loop...")
def import_path_local(path, limit_sub_folder, exclude_path=[], base_name=""): out = [] debug.verbose("qworktree files: " + str(path) + " [START]") if limit_sub_folder == 0: debug.debug("Subparsing limitation append ...") return [] list_files = os.listdir(path) try: list_files = os.listdir(path) except: # an error occure, maybe read error ... debug.warning("error when getting subdirectory of '" + str(path) + "'") return [] if path in exclude_path: debug.debug("find '" + str(path) + "' in exclude_path=" + str(exclude_path)) return [] # filter elements: tmp_list_qworktree_file = filter_name_and_file(path, list_files, base_name + "*.py") debug.verbose("qworktree files: " + str(path) + " : " + str(tmp_list_qworktree_file)) # Import the module: for filename in tmp_list_qworktree_file: out.append(os.path.join(path, filename)) debug.extreme_verbose(" Find a file : '" + str(out[-1]) + "'") need_parse_sub_folder = True rm_value = -1 # check if the file "qworktree_parse_sub.py" is present ==> parse SubFolder (force and add +1 in the resursing if base_name + "ParseSubFolders.txt" in list_files: debug.debug("find SubParser ... " + str(base_name + "ParseSubFolders.txt") + " " + path) data_file_sub = tools.file_read_data( os.path.join(path, base_name + "ParseSubFolders.txt")) if data_file_sub == "": debug.debug( " Empty file Load all subfolder in the worktree in '" + str(path) + "'") need_parse_sub_folder = True rm_value = 0 else: list_sub = data_file_sub.split("\n") debug.debug(" Parse selected folders " + str(list_sub) + " no parse local folder directory") need_parse_sub_folder = False for folder in list_sub: if folder == "" \ or folder == "/": continue tmp_out = import_path_local(os.path.join(path, folder), 1, exclude_path, base_name) # add all the elements: for elem in tmp_out: out.append(elem) if need_parse_sub_folder == True: list_folders = filter_path(path, list_files) for folder in list_folders: tmp_out = import_path_local(os.path.join(path, folder), limit_sub_folder - rm_value, exclude_path, base_name) # add all the elements: for elem in tmp_out: out.append(elem) return out
def configure(target, my_module): # add the file to compile: my_module.add_src_file([ 'ffmpeg/libavfilter/aeval.c', 'ffmpeg/libavfilter/af_adelay.c', 'ffmpeg/libavfilter/af_aecho.c', 'ffmpeg/libavfilter/af_aemphasis.c', 'ffmpeg/libavfilter/af_afade.c', 'ffmpeg/libavfilter/af_afftfilt.c', 'ffmpeg/libavfilter/af_aformat.c', 'ffmpeg/libavfilter/af_agate.c', 'ffmpeg/libavfilter/af_alimiter.c', 'ffmpeg/libavfilter/af_amerge.c', 'ffmpeg/libavfilter/af_amix.c', 'ffmpeg/libavfilter/af_anequalizer.c', 'ffmpeg/libavfilter/af_anull.c', 'ffmpeg/libavfilter/af_apad.c', 'ffmpeg/libavfilter/af_aphaser.c', 'ffmpeg/libavfilter/af_apulsator.c', 'ffmpeg/libavfilter/af_aresample.c', 'ffmpeg/libavfilter/af_asetnsamples.c', 'ffmpeg/libavfilter/af_asetrate.c', 'ffmpeg/libavfilter/af_ashowinfo.c', 'ffmpeg/libavfilter/af_astats.c', 'ffmpeg/libavfilter/af_atempo.c', 'ffmpeg/libavfilter/af_biquads.c', 'ffmpeg/libavfilter/af_channelmap.c', 'ffmpeg/libavfilter/af_channelsplit.c', 'ffmpeg/libavfilter/af_chorus.c', 'ffmpeg/libavfilter/af_compand.c', 'ffmpeg/libavfilter/af_compensationdelay.c', 'ffmpeg/libavfilter/af_dcshift.c', 'ffmpeg/libavfilter/af_dynaudnorm.c', 'ffmpeg/libavfilter/af_earwax.c', 'ffmpeg/libavfilter/af_extrastereo.c', 'ffmpeg/libavfilter/af_firequalizer.c', 'ffmpeg/libavfilter/af_flanger.c', 'ffmpeg/libavfilter/af_hdcd.c', 'ffmpeg/libavfilter/af_join.c', 'ffmpeg/libavfilter/af_pan.c', 'ffmpeg/libavfilter/af_replaygain.c', 'ffmpeg/libavfilter/af_sidechaincompress.c', 'ffmpeg/libavfilter/af_silencedetect.c', 'ffmpeg/libavfilter/af_silenceremove.c', 'ffmpeg/libavfilter/af_stereotools.c', 'ffmpeg/libavfilter/af_stereowiden.c', 'ffmpeg/libavfilter/af_tremolo.c', 'ffmpeg/libavfilter/af_vibrato.c', 'ffmpeg/libavfilter/af_volume.c', 'ffmpeg/libavfilter/af_volumedetect.c', 'ffmpeg/libavfilter/allfilters.c', 'ffmpeg/libavfilter/asink_anullsink.c', 'ffmpeg/libavfilter/asrc_anoisesrc.c', 'ffmpeg/libavfilter/asrc_anullsrc.c', 'ffmpeg/libavfilter/asrc_sine.c', 'ffmpeg/libavfilter/audio.c', 'ffmpeg/libavfilter/avf_ahistogram.c', 'ffmpeg/libavfilter/avf_aphasemeter.c', 'ffmpeg/libavfilter/avf_avectorscope.c', 'ffmpeg/libavfilter/avf_concat.c', 'ffmpeg/libavfilter/avf_showcqt.c', 'ffmpeg/libavfilter/avf_showfreqs.c', 'ffmpeg/libavfilter/avf_showspectrum.c', 'ffmpeg/libavfilter/avf_showvolume.c', 'ffmpeg/libavfilter/avf_showwaves.c', 'ffmpeg/libavfilter/avfilter.c', 'ffmpeg/libavfilter/avfiltergraph.c', 'ffmpeg/libavfilter/bbox.c', 'ffmpeg/libavfilter/buffersink.c', 'ffmpeg/libavfilter/buffersrc.c', 'ffmpeg/libavfilter/colorspacedsp.c', 'ffmpeg/libavfilter/drawutils.c', 'ffmpeg/libavfilter/dualinput.c', 'ffmpeg/libavfilter/f_bench.c', 'ffmpeg/libavfilter/f_drawgraph.c', 'ffmpeg/libavfilter/f_interleave.c', 'ffmpeg/libavfilter/f_loop.c', 'ffmpeg/libavfilter/f_metadata.c', 'ffmpeg/libavfilter/f_perms.c', 'ffmpeg/libavfilter/f_realtime.c', 'ffmpeg/libavfilter/f_reverse.c', 'ffmpeg/libavfilter/f_select.c', 'ffmpeg/libavfilter/f_sendcmd.c', 'ffmpeg/libavfilter/f_streamselect.c', 'ffmpeg/libavfilter/fifo.c', 'ffmpeg/libavfilter/formats.c', 'ffmpeg/libavfilter/framepool.c', 'ffmpeg/libavfilter/framesync.c', 'ffmpeg/libavfilter/generate_wave_table.c', 'ffmpeg/libavfilter/graphdump.c', 'ffmpeg/libavfilter/graphparser.c', 'ffmpeg/libavfilter/lavfutils.c', 'ffmpeg/libavfilter/lswsutils.c', 'ffmpeg/libavfilter/opencl_allkernels.c', 'ffmpeg/libavfilter/pthread.c', 'ffmpeg/libavfilter/setpts.c', 'ffmpeg/libavfilter/settb.c', 'ffmpeg/libavfilter/split.c', 'ffmpeg/libavfilter/src_movie.c', 'ffmpeg/libavfilter/transform.c', 'ffmpeg/libavfilter/trim.c', 'ffmpeg/libavfilter/vaf_spectrumsynth.c', 'ffmpeg/libavfilter/vf_alphamerge.c', 'ffmpeg/libavfilter/vf_aspect.c', 'ffmpeg/libavfilter/vf_atadenoise.c', 'ffmpeg/libavfilter/vf_bbox.c', 'ffmpeg/libavfilter/vf_blackdetect.c', 'ffmpeg/libavfilter/vf_blend.c', 'ffmpeg/libavfilter/vf_bwdif.c', 'ffmpeg/libavfilter/vf_chromakey.c', 'ffmpeg/libavfilter/vf_ciescope.c', 'ffmpeg/libavfilter/vf_codecview.c', 'ffmpeg/libavfilter/vf_colorbalance.c', 'ffmpeg/libavfilter/vf_colorchannelmixer.c', 'ffmpeg/libavfilter/vf_colorkey.c', 'ffmpeg/libavfilter/vf_colorlevels.c', 'ffmpeg/libavfilter/vf_colorspace.c', 'ffmpeg/libavfilter/vf_convolution.c', 'ffmpeg/libavfilter/vf_copy.c', 'ffmpeg/libavfilter/vf_crop.c', 'ffmpeg/libavfilter/vf_curves.c', 'ffmpeg/libavfilter/vf_datascope.c', 'ffmpeg/libavfilter/vf_dctdnoiz.c', 'ffmpeg/libavfilter/vf_deband.c', 'ffmpeg/libavfilter/vf_decimate.c', 'ffmpeg/libavfilter/vf_dejudder.c', 'ffmpeg/libavfilter/vf_deshake.c', 'ffmpeg/libavfilter/vf_detelecine.c', 'ffmpeg/libavfilter/vf_displace.c', 'ffmpeg/libavfilter/vf_drawbox.c', 'ffmpeg/libavfilter/vf_edgedetect.c', 'ffmpeg/libavfilter/vf_elbg.c', 'ffmpeg/libavfilter/vf_extractplanes.c', 'ffmpeg/libavfilter/vf_fade.c', 'ffmpeg/libavfilter/vf_fftfilt.c', 'ffmpeg/libavfilter/vf_field.c', 'ffmpeg/libavfilter/vf_fieldhint.c', 'ffmpeg/libavfilter/vf_fieldmatch.c', 'ffmpeg/libavfilter/vf_fieldorder.c', 'ffmpeg/libavfilter/vf_format.c', 'ffmpeg/libavfilter/vf_fps.c', 'ffmpeg/libavfilter/vf_framepack.c', 'ffmpeg/libavfilter/vf_framerate.c', 'ffmpeg/libavfilter/vf_framestep.c', 'ffmpeg/libavfilter/vf_gradfun.c', 'ffmpeg/libavfilter/vf_hflip.c', 'ffmpeg/libavfilter/vf_histogram.c', 'ffmpeg/libavfilter/vf_hqx.c', 'ffmpeg/libavfilter/vf_hue.c', 'ffmpeg/libavfilter/vf_hwdownload.c', 'ffmpeg/libavfilter/vf_hwupload.c', 'ffmpeg/libavfilter/vf_idet.c', 'ffmpeg/libavfilter/vf_il.c', 'ffmpeg/libavfilter/vf_lenscorrection.c', 'ffmpeg/libavfilter/vf_lut.c', 'ffmpeg/libavfilter/vf_lut3d.c', 'ffmpeg/libavfilter/vf_maskedmerge.c', 'ffmpeg/libavfilter/vf_mergeplanes.c', 'ffmpeg/libavfilter/vf_neighbor.c', 'ffmpeg/libavfilter/vf_noise.c', 'ffmpeg/libavfilter/vf_null.c', 'ffmpeg/libavfilter/vf_overlay.c', 'ffmpeg/libavfilter/vf_pad.c', 'ffmpeg/libavfilter/vf_palettegen.c', 'ffmpeg/libavfilter/vf_paletteuse.c', 'ffmpeg/libavfilter/vf_pixdesctest.c', 'ffmpeg/libavfilter/vf_psnr.c', 'ffmpeg/libavfilter/vf_qp.c', 'ffmpeg/libavfilter/vf_random.c', 'ffmpeg/libavfilter/vf_readvitc.c', 'ffmpeg/libavfilter/vf_remap.c', 'ffmpeg/libavfilter/vf_removegrain.c', 'ffmpeg/libavfilter/vf_removelogo.c', 'ffmpeg/libavfilter/vf_rotate.c', 'ffmpeg/libavfilter/vf_scale.c', 'ffmpeg/libavfilter/vf_selectivecolor.c', 'ffmpeg/libavfilter/vf_separatefields.c', 'ffmpeg/libavfilter/vf_setfield.c', 'ffmpeg/libavfilter/vf_showinfo.c', 'ffmpeg/libavfilter/vf_showpalette.c', 'ffmpeg/libavfilter/vf_shuffleframes.c', 'ffmpeg/libavfilter/vf_shuffleplanes.c', 'ffmpeg/libavfilter/vf_signalstats.c', 'ffmpeg/libavfilter/vf_ssim.c', 'ffmpeg/libavfilter/vf_stack.c', 'ffmpeg/libavfilter/vf_swaprect.c', 'ffmpeg/libavfilter/vf_swapuv.c', 'ffmpeg/libavfilter/vf_telecine.c', 'ffmpeg/libavfilter/vf_thumbnail.c', 'ffmpeg/libavfilter/vf_tile.c', 'ffmpeg/libavfilter/vf_transpose.c', 'ffmpeg/libavfilter/vf_unsharp.c', 'ffmpeg/libavfilter/vf_vectorscope.c', 'ffmpeg/libavfilter/vf_vflip.c', 'ffmpeg/libavfilter/vf_vignette.c', 'ffmpeg/libavfilter/vf_w3fdif.c', 'ffmpeg/libavfilter/vf_waveform.c', 'ffmpeg/libavfilter/vf_xbr.c', 'ffmpeg/libavfilter/vf_yadif.c', 'ffmpeg/libavfilter/vf_zoompan.c', 'ffmpeg/libavfilter/video.c', 'ffmpeg/libavfilter/vsink_nullsink.c', 'ffmpeg/libavfilter/vsrc_cellauto.c', 'ffmpeg/libavfilter/vsrc_life.c', 'ffmpeg/libavfilter/vsrc_mandelbrot.c', 'ffmpeg/libavfilter/vsrc_testsrc.c', 'ffmpeg/libavfilter/window_func.c', ]) if target.get_arch() == "x86": my_module.add_src_file([ 'ffmpeg/libavfilter/x86/af_volume_init.c', 'ffmpeg/libavfilter/x86/avf_showcqt_init.c', 'ffmpeg/libavfilter/x86/colorspacedsp_init.c', 'ffmpeg/libavfilter/x86/vf_blend_init.c', 'ffmpeg/libavfilter/x86/vf_bwdif_init.c', 'ffmpeg/libavfilter/x86/vf_gradfun_init.c', 'ffmpeg/libavfilter/x86/vf_idet_init.c', 'ffmpeg/libavfilter/x86/vf_maskedmerge_init.c', 'ffmpeg/libavfilter/x86/vf_noise.c', 'ffmpeg/libavfilter/x86/vf_psnr_init.c', 'ffmpeg/libavfilter/x86/vf_removegrain_init.c', 'ffmpeg/libavfilter/x86/vf_ssim_init.c', 'ffmpeg/libavfilter/x86/vf_w3fdif_init.c', 'ffmpeg/libavfilter/x86/vf_yadif_init.c', ]) elif target.get_arch() == "arm": # no specific files pass else: debug.warning("unknow architecture ..."); if "MacOs" in target.get_type(): my_module.add_src_file([ 'ffmpeg/libavfilter/vf_coreimage.m', ]) my_module.compile_version("c", 1999) lutinLib_ffmpegCommon.add_common_property(target, my_module); # add dependency of libraries: my_module.add_depend('c') my_module.add_depend('m') my_module.add_depend('z') my_module.add_depend('pthread') my_module.add_depend([ 'ffmpeg-avcodec', 'ffmpeg-avutil', 'ffmpeg-avformat', 'ffmpeg-avswscale', 'ffmpeg-headers', ]) return True
def configure(target, my_module): # add the file to compile: my_module.add_src_file([ 'ffmpeg/libavutil/adler32.c', 'ffmpeg/libavutil/aes.c', 'ffmpeg/libavutil/aes_ctr.c', 'ffmpeg/libavutil/audio_fifo.c', 'ffmpeg/libavutil/avstring.c', 'ffmpeg/libavutil/base64.c', 'ffmpeg/libavutil/blowfish.c', 'ffmpeg/libavutil/bprint.c', 'ffmpeg/libavutil/buffer.c', 'ffmpeg/libavutil/camellia.c', 'ffmpeg/libavutil/cast5.c', 'ffmpeg/libavutil/channel_layout.c', 'ffmpeg/libavutil/color_utils.c', 'ffmpeg/libavutil/cpu.c', 'ffmpeg/libavutil/crc.c', 'ffmpeg/libavutil/des.c', 'ffmpeg/libavutil/dict.c', 'ffmpeg/libavutil/display.c', 'ffmpeg/libavutil/downmix_info.c', 'ffmpeg/libavutil/error.c', 'ffmpeg/libavutil/eval.c', 'ffmpeg/libavutil/fifo.c', 'ffmpeg/libavutil/file.c', 'ffmpeg/libavutil/file_open.c', 'ffmpeg/libavutil/fixed_dsp.c', 'ffmpeg/libavutil/float_dsp.c', 'ffmpeg/libavutil/frame.c', 'ffmpeg/libavutil/hash.c', 'ffmpeg/libavutil/hmac.c', 'ffmpeg/libavutil/hwcontext.c', 'ffmpeg/libavutil/imgutils.c', 'ffmpeg/libavutil/integer.c', 'ffmpeg/libavutil/intmath.c', 'ffmpeg/libavutil/lfg.c', 'ffmpeg/libavutil/lls.c', 'ffmpeg/libavutil/log.c', 'ffmpeg/libavutil/log2_tab.c', 'ffmpeg/libavutil/lzo.c', 'ffmpeg/libavutil/mastering_display_metadata.c', 'ffmpeg/libavutil/mathematics.c', 'ffmpeg/libavutil/md5.c', 'ffmpeg/libavutil/mem.c', 'ffmpeg/libavutil/murmur3.c', 'ffmpeg/libavutil/opt.c', 'ffmpeg/libavutil/parseutils.c', 'ffmpeg/libavutil/pixdesc.c', 'ffmpeg/libavutil/pixelutils.c', 'ffmpeg/libavutil/random_seed.c', 'ffmpeg/libavutil/rational.c', 'ffmpeg/libavutil/rc4.c', 'ffmpeg/libavutil/reverse.c', 'ffmpeg/libavutil/ripemd.c', 'ffmpeg/libavutil/samplefmt.c', 'ffmpeg/libavutil/sha.c', 'ffmpeg/libavutil/sha512.c', 'ffmpeg/libavutil/stereo3d.c', 'ffmpeg/libavutil/tea.c', 'ffmpeg/libavutil/threadmessage.c', 'ffmpeg/libavutil/time.c', 'ffmpeg/libavutil/timecode.c', 'ffmpeg/libavutil/tree.c', 'ffmpeg/libavutil/twofish.c', 'ffmpeg/libavutil/utils.c', 'ffmpeg/libavutil/xga_font_data.c', 'ffmpeg/libavutil/xtea.c', ]) if target.get_arch() == "x86": my_module.add_src_file([ 'ffmpeg/libavutil/x86/cpu.c', 'ffmpeg/libavutil/x86/fixed_dsp_init.c', 'ffmpeg/libavutil/x86/float_dsp_init.c', 'ffmpeg/libavutil/x86/lls_init.c', 'ffmpeg/libavutil/x86/pixelutils_init.c', ]) elif target.get_arch() == "arm" \ and target.get_bus_size() == "32": my_module.add_src_file([ 'ffmpeg/libavutil/arm/float_dsp_init_arm.c', 'ffmpeg/libavutil/arm/float_dsp_init_neon.c', 'ffmpeg/libavutil/arm/float_dsp_init_vfp.c', 'ffmpeg/libavutil/arm/float_dsp_neon.S', 'ffmpeg/libavutil/arm/float_dsp_vfp.S', 'ffmpeg/libavutil/arm/cpu.c', ]) my_module.add_header_file([ 'ffmpeg/libavutil/arm/asm.S', ], destination_path="libavutil/arm") elif target.get_arch() == "arm" \ and target.get_bus_size() == "64": my_module.add_src_file([ 'ffmpeg/libavutil/aarch64/cpu.c', 'ffmpeg/libavutil/aarch64/float_dsp_init.c', 'ffmpeg/libavutil/aarch64/float_dsp_neon.S', 'ffmpeg/libavutil/arm/cpu.c', ]) my_module.add_header_file([ 'ffmpeg/libavutil/aarch64/asm.S', ], destination_path="libavutil/aarch64") else: debug.warning("unknow architecture ...") my_module.compile_version("c", 1999) lutinLib_ffmpegCommon.add_common_property(target, my_module) # add dependency of libraries: my_module.add_depend('c') my_module.add_depend('m') my_module.add_depend('z') my_module.add_depend('pthread') my_module.add_depend('ffmpeg-headers') return True
def __init__(self, target): system.System.__init__(self) # create some HELP: self.set_help("PULSE : The Linux PulseAudio\n Can be install with the package:\n - libpulse-dev") # check if the library exist: if not os.path.isfile("/usr/include/pulse/pulseaudio.h"): # we did not find the library reqiested (just return) (automaticly set at false) return; dst_data = tools.file_read_data("/usr/include/pulse/version.h") lines = dst_data.split("\n") patern = "#define pa_get_headers_version() (\"" # " #corect edn error parsing version = None for line in lines: if line[:len(patern)] == patern: #Find the version line offset = len(patern) version = "" while offset < len(line) \ and line[offset] != '.': version += line[offset] offset += 1 offset += 1 version2 = "" while offset < len(line) \ and line[offset] != '.': version2 += line[offset] offset += 1 debug.verbose("detect version '" + version + "'") break; if version == None: debug.warning("Can not det version of Pulseaudio ... ==> remove it") return self.set_version([int(version),int(version2)]) self.set_valid(True) self.add_depend([ 'c' ]) if env.get_isolate_system() == False: self.add_flag("link-lib", [ "pulse-simple", "pulse" ]) else: # todo : create a searcher of the presence of the library: """ self.add_flag("link-lib", [ "-l/lib/pulseaudio/libpulsecommon-" + version + ".0.so" ]) """ self.add_flag("link-lib", [ "pulsecommon-" + version + ".0", "pulse-mainloop-glib", "pulse-simple", "pulse" ]) self.add_flag("link", "-L/usr/lib/pulseaudio") self.add_flag("link", "-Wl,-R/usr/lib/pulseaudio") self.add_header_file([ "/usr/include/pulse/*", ], destination_path="pulse", recursive=True)