当前位置: 首页 > news >正文

l网站建设免费发广告的平台

l网站建设,免费发广告的平台,wordpress描述插件,深圳知名室内设计公司1.ffmpeg默认使用gcc编译,在android上无法使用,否则各种报错,所以要用ndk的clang编译 2.下载ffmpeg源码 修改configure文件,增加命令 cross_prefix_clang 修改以下命令 cc_default"${cross_prefix}${cc_default}" cxx…

1.ffmpeg默认使用gcc编译,在android上无法使用,否则各种报错,所以要用ndk的clang编译

2.下载ffmpeg源码
修改configure文件,增加命令 cross_prefix_clang
修改以下命令

cc_default="${cross_prefix}${cc_default}"
cxx_default="${cross_prefix}${cxx_default}"

修改后

cc_default="${cross_prefix_clang}${cc_default}"
cxx_default="${cross_prefix_clang}${cxx_default}"

3.新建脚本文件,ffmpeg目录下执行脚本文件即可。
编译32位,则ARCH改为arm,CPU改为armv7-a,TARGET改为armv7a-linux-androideabi
注意,r25版本的ndk移除了交叉编译工具,改成了llvm,所以要把交叉编译工具路径指向llvm的路径
在这里插入图片描述

#!/bin/bash
set -x
# 目标Android版本
API=21
ARCH=arm64
CPU=armv8-a
TARGET=aarch64-linux-android
#so库输出目录
OUTPUT=/root/Desktop/compile/ffmpeg/build_$CPU
#NDK路径
NDK=/root/Desktop/compile/ndk/android-ndk-r25c
#NDK=/root/Desktop/compile/ndk/android-ndk-r20b
# 编译工具链路径
TOOLCHAIN=$NDK/toolchains/llvm/prebuilt/linux-x86_64
# 编译环境
SYSROOT=$TOOLCHAIN/sysroot#OPTIMIZE_CFLAGS="-mfloat-abi=softfp -mfpu=vfp -marm -march=$CPU -DBIONIC_IOCTL_NO_SIGNEDNESS_OVERLOAD"#point build to llvm 
ln -s $TOOLCHAIN/bin/llvm-ar $TOOLCHAIN/bin/$TARGET-ar
ln -s $TOOLCHAIN/bin/llvm-nm $TOOLCHAIN/bin/$TARGET-nm
ln -s $TOOLCHAIN/bin/llvm-ranlib $TOOLCHAIN/bin/$TARGET-ranlib
ln -s $TOOLCHAIN/bin/llvm-strip $TOOLCHAIN/bin/$TARGET-stripfunction build
{./configure \--prefix=$OUTPUT \--target-os=android \--arch=$ARCH \--cpu=$CPU \--enable-cross-compile \--enable-shared \--disable-static \--disable-vulkan \--sysroot=$SYSROOT \--cross-prefix=$TOOLCHAIN/bin/$TARGET- \--cross-prefix-clang=$TOOLCHAIN/bin/$TARGET$API- \make clean allmake install
}build

4.android studio 导入在这里插入图片描述
5.cmake配置

cmake_minimum_required(VERSION 3.22.1)# Declares and names the project.project("teskndk")# Creates and names a library, sets it as either STATIC
# or SHARED, and provides the relative paths to its source code.
# You can define multiple libraries, and CMake builds them for you.
# Gradle automatically packages shared libraries with your APK.#set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=gnu++11")
#include_directories(${CMAKE_CURRENT_SOURCE_DIR}/include)
#set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -L${CMAKE_CURRENT_SOURCE_DIR}/../../../libs/")add_library( # Sets the name of the library.teskndk# Sets the library as a shared library.SHARED# Provides a relative path to your source file(s).native-lib.cpp)add_library(avcodec SHARED IMPORTED)
set_target_properties(avcodec PROPERTIES IMPORTED_LOCATION ${CMAKE_CURRENT_SOURCE_DIR}/../../../libs/${ANDROID_ABI}/libavcodec.so)add_library(avdevice SHARED IMPORTED)
set_target_properties(avdevice PROPERTIES IMPORTED_LOCATION ${CMAKE_CURRENT_SOURCE_DIR}/../../../libs/${ANDROID_ABI}/libavdevice.so)add_library(avfilter SHARED IMPORTED)
set_target_properties(avfilter PROPERTIES IMPORTED_LOCATION ${CMAKE_CURRENT_SOURCE_DIR}/../../../libs/${ANDROID_ABI}/libavfilter.so)add_library(avformat SHARED IMPORTED)
set_target_properties(avformat PROPERTIES IMPORTED_LOCATION ${CMAKE_CURRENT_SOURCE_DIR}/../../../libs/${ANDROID_ABI}/libavformat.so)add_library(avutil SHARED IMPORTED)
set_target_properties(avutil PROPERTIES IMPORTED_LOCATION ${CMAKE_CURRENT_SOURCE_DIR}/../../../libs/${ANDROID_ABI}/libavutil.so)add_library(swresample SHARED IMPORTED)
set_target_properties(swresample PROPERTIES IMPORTED_LOCATION ${CMAKE_CURRENT_SOURCE_DIR}/../../../libs/${ANDROID_ABI}/libswresample.so)add_library(swscale SHARED IMPORTED)
set_target_properties(swscale PROPERTIES IMPORTED_LOCATION ${CMAKE_CURRENT_SOURCE_DIR}/../../../libs/${ANDROID_ABI}/libswscale.so)# Searches for a specified prebuilt library and stores the path as a
# variable. Because CMake includes system libraries in the search path by
# default, you only need to specify the name of the public NDK library
# you want to add. CMake verifies that the library exists before
# completing its build.find_library( # Sets the name of the path variable.log-lib# Specifies the name of the NDK library that# you want CMake to locate.log)# Specifies libraries CMake should link to your target library. You
# can link multiple libraries, such as libraries you define in this
# build script, prebuilt third-party libraries, or system libraries.target_link_libraries( # Specifies the target library.teskndkavcodecavdeviceavfilteravformatavutilswresampleswscale# Links the target library to the log library# included in the NDK.${log-lib})

成功运行

http://www.yidumall.com/news/20375.html

相关文章:

  • 什么网站可以做翻译兼职seo排名app
  • 学php到做网站要多久百度高级搜索技巧
  • 可以做淘宝联盟的免费网站电商网站平台搭建
  • wamp 做网站发布网站整站优化推广方案
  • 建公司的步骤百色seo关键词优化公司
  • 南京做网站优化的公司北京seo网站优化公司
  • 网站开发协助方案百度云盘搜索
  • 大型网站只做要多少钱百度指数1000搜索量有多少
  • 有哪些做动图的网站优化关键词怎么做
  • 做代购有哪些网站国际新闻头条最新消息
  • 做网站草图找素材最新小组排名
  • 张店专业网站优化哪家好青岛快速排名
  • 搭建企业网站宽带多大周口网站seo
  • 网站收录地址it教育培训机构
  • 常见服务器天津seo方案
  • 网站维护一般做什么国际新闻消息
  • 做网站开发的笔记本配置路由器优化大师
  • 广州市专业做网站网上的推广
  • 北京城乡建设部网站首页网络推广专员是干什么的
  • 彩票网站建设dadi163北京广告公司
  • 企业宣传网站建设常熟网站建设
  • 中山高端网站建设seo优化裤子关键词
  • 厦门网站到首页排名网络培训总结
  • 网站开发定制案例展示推广自己产品的文案
  • 惠州哪家做网站比较好关键词优化排名第一
  • 汕头微信推广平台太原百度快速优化排名
  • 漯河做网站的公司黄页88网官网
  • 建材网站的模板网站优化技术
  • 桂城网站建设制作一个新品牌如何推广
  • 网站头部怎样做有气势网站免费搭建平台