# For more information about using CMake with Android Studio, read the
# documentation: https://d.android.com/studio/projects/add-native-code.html
# Sets the minimum version of CMake required to build the native library.
cmake_minimum_required(VERSION 3.4.1)
#添加头文件路径(相对于本文件的路径)
include_directories(include)
#设置ffmpeg库所在路径的变量 AS3.2后, ${ANDROID_ABI} 改成 ${CMAKE_ANDROID_ARCH_ABI}
set(FF ${CMAKE_SOURCE_DIR}/libs/${CMAKE_ANDROID_ARCH_ABI})
add_library(avcodec SHARED IMPORTED)
set_target_properties(avcodec PROPERTIES IMPORTED_LOCATION ${FF}/libavcodec.so)
add_library(avformat SHARED IMPORTED)
set_target_properties(avformat PROPERTIES IMPORTED_LOCATION ${FF}/libavformat.so)
add_library(avutil SHARED IMPORTED)
set_target_properties(avutil PROPERTIES IMPORTED_LOCATION ${FF}/libavutil.so)
add_library(swscale SHARED IMPORTED)
set_target_properties(swscale PROPERTIES IMPORTED_LOCATION ${FF}/libswscale.so)
add_library(swresample SHARED IMPORTED)
set_target_properties(swresample PROPERTIES IMPORTED_LOCATION ${FF}/libswresample.so)
# 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.
add_library( # Sets the name of the library.
native-lib
# Sets the library as a shared library.
SHARED
# Provides a relative path to your source file(s).
native-lib.cpp
FFDemux.cpp
IDemux.cpp
XData.cpp
XThread.cpp
IObserver.cpp
IDecode.cpp
FFDecode.cpp
XParameter.cpp
IVideoView.cpp
GLVideoView.cpp
XTexture.cpp
XShader.cpp
XEGL.cpp
IResample.cpp
FFResample.cpp
IAudioPlay.cpp
SLAudioPlay.cpp
IPlayer.cpp
IPlayerBuilder.cpp
FFPlayerBuilder.cpp
IPlayerProxy.cpp)
# 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.
native-lib
#将avcodec链接到native-lib中
avcodec avformat avutil swscale swresample android
OpenSLES
GLESv2
EGL
android
# Links the target library to the log library
# included in the NDK.
${log-lib})
热爱技术。
- 粉丝: 2958
- 资源: 7864
最新资源
- 直流有刷电机模型+三闭环控制-SIMULINK
- MMC simulink 模块化多电平变流器 载波移相 双闭环仿真 输出谐波分析,线性自抗扰控制LADRC 有仿真文件
- Java毕设项目:基于spring+mybatis+maven+mysql实现的数学试卷自动生成系统【含源码+数据库】
- 基于simulink的永磁同步电机矢量控制FOC PMSM FOC
- 基于aiXcoder代码大模型的 企业智能化软件开发应用实践PPT(54页).pptx
- 深信服安全GPT:大模型时代下的网络安全建设思路——重新定义安全检测与安全运营PPT(37页).pptx
- 25页-人工智能+教育助力因材施教建设方案.pdf
- 光纤传输,多模光纤模式干涉,结构光场
- Java毕设项目:基于spring+mybatis+maven+mysql实现的大学学术交流论坛系统分前后台【含源码+数据库+答辩PPT+毕业论文】
- Comsol异常折射与折射角精确求解
- 基于双二阶广义积分器的软件锁相环仿真模型
- Java毕设项目:基于spring+mybatis+maven+mysql实现的高校社团管理系统【含源码+数据库+任务书+开题报告+毕业论文】
- 考虑用户舒适度的冷热电多能互补综合能源系统优化调度 关键词:用户舒适度 综合能源 PMV 优化调度 参考文档:《冷热电气多能互补的微能源网鲁棒优化调度》基础模型加舒适度部分模型; 仿真平台:MATL
- 考虑阶梯式碳交易机制与电制氢的综合能源系统热电优化 关键词:碳交易 电制氢 阶梯式碳交易 综合能源系统 热电优化 参考文档:《考虑阶梯式碳交易机制与电制氢的综合能源系统热电优化》基本复现 仿真平台
- 计及电转气协同的含碳捕集与垃圾焚烧电厂优化调度 关键词:碳捕集 电厂 需求响应 优化调度 电转气协同调度 参考文档:《计及电转气协同的含碳捕集与垃圾焚烧电厂优化调度》完全复现 仿真平台:MATL
- Java毕设项目:基于spring+mybatis+maven+mysql实现的国学文化网站【含源码+数据库+毕业论文】
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈