• Android 平台 metaRTC使用源码调试


    1.介绍

    metaRtc作为音视频开源项目,高质量代码结构,上手使用简单快捷方便,随着物联网发展,潜入式开发爆发式增长,更多应用场景会让metaRtc广泛使用起来。详情可以查看GitHub地址

    2.目的

    主要讲解Android上如何使用,按照GitHub得使用说明需要编译,libmetartc 和libmetartccore 动态库才能使用这样不方便我们Android调试dubug。如此便使用源码进行开发,修改源码得cmake文件即可。cmake文件修改如下

    1. cmake_minimum_required(VERSION 3.18.1)
    2. project("push")
    3. set(HOME_BASE_REL "./meta")
    4. get_filename_component(HOME_BASE ${HOME_BASE_REL} REALPATH)
    5. message(${HOME_BASE})
    6. set(Yang_3RD_DIR ${HOME_BASE}/thirdparty/lib/android/${CMAKE_ANDROID_ARCH_ABI})
    7. include_directories(${HOME_BASE}/include)
    8. add_subdirectory(${HOME_BASE}/libmetartc5)
    9. add_subdirectory(${HOME_BASE}/libmetartccore5)
    10. add_library( # Sets the name of the library.
    11. push
    12. # Sets the library as a shared library.
    13. SHARED
    14. # Provides a relative path to your source file(s).
    15. native-lib.cpp)
    16. find_library( # Sets the name of the path variable.
    17. log-lib
    18. # Specifies the name of the NDK library that
    19. # you want CMake to locate.
    20. log)
    21. target_link_libraries( # Specifies the target library.
    22. push
    23. metartc5 metartccore5
    24. # ${Yang_Lib_DIR}/libmetartc5.a ${Yang_Lib_DIR}/libmetartccore5.a
    25. ${Yang_3RD_DIR}/libsrtp2_mbed.a ${Yang_3RD_DIR}/libmbedtls.a ${Yang_3RD_DIR}/libmbedx509.a ${Yang_3RD_DIR}/libmbedcrypto.a
    26. # ${Yang_3RD_DIR}/libsrtp2.a ${Yang_3RD_DIR}/libssl.a ${Yang_3RD_DIR}/libcrypto.a
    27. ${Yang_3RD_DIR}/libspeexdsp.a ${Yang_3RD_DIR}/libyuv.a ${Yang_3RD_DIR}/libx264.a
    28. ${Yang_3RD_DIR}/libyangh264decoder.a ${Yang_3RD_DIR}/libopus.a ${Yang_3RD_DIR}/libopenh264.a
    29. ${Yang_3RD_DIR}/libusrsctp.a
    30. # Links the target library to the log library
    31. # included in the NDK.
    32. EGL OpenSLES android log camera2ndk mediandk)

    可以看到将两个a库直接使用源码开发即可,注意需要把相关得源码和头文件整体copy到cpp得meta目录下,新建meta目录即可

    3.调试效果如下

     

  • 相关阅读:
    qt和window抓包程序
    芥墨 | 设计需要平衡那些我们都会跳跃的创意
    Liunx/macOS:进程占用端口查询
    Linux嵌入式I2C协议笔记
    攻防千层饼
    java毕业设计在线课程教学大纲系统Mybatis+系统+数据库+调试部署
    循迹模式——红外循迹模块使用介绍
    Harmony系统更改手机IP
    2.【刷爆LeetCode】字符串相加(多方法、多思路)
    2021年全国职业院校技能大赛-ruijie网络模块-命令解析-脚本配置
  • 原文地址:https://blog.csdn.net/qq_33023933/article/details/127101384