zoukankan      html  css  js  c++  java
  • How to build PJSIP with WebRTC

    How to build WebRTC?
    Mac

    Refer to WebRTC development guide ​here(http://www.webrtc.org/native-code/development).

    Then configure PJSIP with:

    ./configure --with-webrtc=/Users/me/webrtc-mac

    iOS (ARM)

    Refer to WebRTC development guide ​here.

    PJSIP's auto configuration will look for the library in out_ios/Release folder, so make sure you set the output dir properly when building !WebRTC

    export GYP_GENERATOR_FLAGS="output_dir=out_ios"
    ninja -C out_ios/Release

    Then configure PJSIP with:

    ./configure --with-webrtc=/Users/me/webrtc-iphone

    Android

    Android development is only supported on Linux (reference ​here), so if you use other platforms, you need to set up a Linux virtual machine.

    Alternatively, you can build the stripped down version of WebRTC instead, which will only build the required AEC module and its required dependencies. These steps below are tested on a Mac machine:

        Create a working directory, for example: webrtc-android.
        Go to the work dir and unzip webrtc-android-jni.zip (provided in the ticket attachment below).
        Go to jni folder and run ndk-build.
        Copy the resulting .so files from ../libs/[target_architecture] into your Android application project directory, for example:

        cp ../libs/armeabi/*.so /Users/me/pjproject/pjsip-apps/src/swig/java/android/libs/armeabi

        Add this in PJSIP's user.mak, located inside PJSIP's work dir:

        export CFLAGS += -I"/Users/me/webrtc-android/src" -DPJMEDIA_HAS_WEBRTC_AEC=1 -DPJMEDIA_WEBRTC_AEC_USE_MOBILE=1
        export LDFLAGS += -L"/Users/me/webrtc-android/libs/armeabi" -lwebrtc

        Rebuild PJSIP.

    For other architectures

    (or custom WebRTC installation undetected by configure script)

    You can customize PJSIP's user.mak file, located inside PJSIP's work dir:

    export CFLAGS += -I"/Users/me/webrtc/src" -DPJMEDIA_HAS_WEBRTC_AEC=1
    # Uncomment below if you want to use the lighter, mobile-optimized version
    # export CFLAGS += -DPJMEDIA_WEBRTC_AEC_USE_MOBILE=1
    export LDFLAGS += -L/Users/me/webrtc/[WebRTC_lib_path] -laudio_processing -lcommon_audio -lsystem_wrappers
    # If you build for ARM architecture, uncomment below
    # export LDFLAGS += -laudio_processing_neon -lcommon_audio_neon
    # Or else, if you build for MIPS architecture, uncomment below
    # export LDFLAGS += -laudio_processing_neon -lcommon_audio_neon
    # Or else, if your machine supports SSE2, uncomment below
    # export LDFLAGS += -laudio_processing_sse2

    Then rebuild PJSIP.
    Compatibility issue

    There is a known compatibility issue with recent WebRTC version, so we'd recommend to use an older WebRTC version, e.g: about October 2015 version.


    Copyright
    https://trac.pjsip.org/repos/ticket/1888#Forotherarchitectures

  • 相关阅读:
    java学习--基础知识进阶第十一天--笔记
    java学习--基础知识进阶第十天--笔记
    java学习--基础知识进阶第十天--标准输入流 & 转换流 & 打印流、对象操作流 、Properties集合
    java学习--基础知识进阶第九天--笔记
    java学习--基础知识进阶第九天-- File类、字符流与字节流
    java学习--基础知识进阶第八天--笔记
    java学习--基础知识进阶第八天--异常体系&异常处理、Throwable常用方法&自定义异常、递归
    java学习--基础知识进阶第七天--笔记
    java学习--基础知识进阶第七天--HashSet集合、HashMap集合(集合遍历)
    java学习--基础知识进阶第六天--笔记
  • 原文地址:https://www.cnblogs.com/dong1/p/14040166.html
Copyright © 2011-2022 走看看