• ffmpeg android移植


    CMake语法简介(androidstudio中利用CMake开发NDK): http://blog.csdn.net/u013718120/article/details/62883711
    FFmpeg之一编译ForAndroid: http://blog.csdn.net/xiaoru5127/article/details/51524795

    参考:

     [总结]FFMPEG视音频编解码零基础学习方法

     Android学习之 在surface上显示YUV 笔记

     Android用surface直接显示yuv数据(一)

    Android Studio FFMpeg CMakeList.txt, Static Library

    # For more information about using CMake with Android Studio, read the
    # documentation: https://d.android.com/studio/projects/add-native-code.html
    
    
    cmake_minimum_required(VERSION 3.4.1)
    
    include_directories(src/main/cpp/include)
    
    add_library(avutil-lib STATIC IMPORTED)
    set_target_properties(avutil-lib PROPERTIES IMPORTED_LOCATION
    ${CMAKE_CURRENT_SOURCE_DIR}/src/main/cpp/lib/libavutil.a)
    
    add_library(avcodec-lib STATIC IMPORTED)
    set_target_properties(avcodec-lib PROPERTIES IMPORTED_LOCATION
    ${CMAKE_CURRENT_SOURCE_DIR}/src/main/cpp/lib/libavcodec.a)
    
    add_library(avformat-lib STATIC IMPORTED)
    set_target_properties(avformat-lib PROPERTIES IMPORTED_LOCATION
    ${CMAKE_CURRENT_SOURCE_DIR}/src/main/cpp/lib/libavformat.a)
    
    add_library(x264-lib STATIC IMPORTED)
    set_target_properties(x264-lib PROPERTIES IMPORTED_LOCATION
    ${CMAKE_CURRENT_SOURCE_DIR}/src/main/cpp/lib/libx264.a)
    
    add_library(swresample-lib STATIC IMPORTED)
    set_target_properties(swresample-lib PROPERTIES IMPORTED_LOCATION
    ${CMAKE_CURRENT_SOURCE_DIR}/src/main/cpp/lib/libswresample.a)
    
    add_library(swscale-lib STATIC IMPORTED)
    set_target_properties(swscale-lib PROPERTIES IMPORTED_LOCATION
    ${CMAKE_CURRENT_SOURCE_DIR}/src/main/cpp/lib/libswscale.a)
    
    add_library(mp3lame-lib STATIC IMPORTED)
    set_target_properties(mp3lame-lib PROPERTIES IMPORTED_LOCATION
    ${CMAKE_CURRENT_SOURCE_DIR}/src/main/cpp/lib/libmp3lame.a)
    
    add_library(yuv_static-lib STATIC IMPORTED)
    set_target_properties(yuv_static-lib PROPERTIES IMPORTED_LOCATION
    ${CMAKE_CURRENT_SOURCE_DIR}/src/main/cpp/lib/libyuv_static.a)
    
    find_library(log-lib log)
    find_library(m-lib m)
    find_library(z-lib z)
    find_library(dl-lib dl)
    find_library(stdc++-lib stdc++)
    find_library(jnigraphics-lib jnigraphics)
    
    add_library(net_camera SHARED src/main/cpp/net_camera.cpp)
    
    target_link_libraries(net_camera avformat-lib avcodec-lib avutil-lib x264-lib mp3lame-lib
    swscale-lib swresample-lib yuv_static-lib ${log-lib} ${m-lib} ${z-lib} ${dl-lib} ${stdc++-lib}
    ${jnigraphics-lib})
  • 相关阅读:
    线段树&&线段树的创建线段树的查询&&单节点更新&&区间更新
    树&二叉树&&满二叉树&&完全二叉树&&完满二叉树
    Git学习记录 力做全网最强入门教程
    Markdown测试
    [转载] c++对结构体数组排序
    c/c++ 中#ifndef和#endif的作用及使用
    交互题(apio2016Gap)
    linux下对拍
    CTSC2017密钥、吉夫特
    省队十连测
  • 原文地址:https://www.cnblogs.com/alanfang/p/6626377.html
Copyright © 2020-2023  润新知