使用PJSIP进行Openh264编译 [英] Openh264 compiling using PJSIP

查看:1041
本文介绍了使用PJSIP进行Openh264编译的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使用openh264 lib构建pjsip项目.一切正常,除了pjsip ./configure-android

I am trying to build pjsip project with openh264 lib. Everything works fine except openh264 is not being detected by pjsip ./configure-android

这是我的config_site.h

this is my config_site.h

/* Activate Android specific settings in the 'config_site_sample.h' */
#define PJ_CONFIG_ANDROID 1
#include <pj/config_site_sample.h>
#define PJMEDIA_HAS_VIDEO 1
#define PJMEDIA_HAS_OPENH264_CODEC 1

我正在关注日志

Using OpenH264 prefix... /home/user_name/PJSIPTOOLS/openh264-1.0.0/openlib/
checking OpenH264 usability... no

由于未通过./configure-android检测到,我的应用程序在运行时崩溃,并说找不到openh264的lib.

As it is not detected by ./configure-android my app is crashing at runtime saying lib not found for openh264.

我使用的是32位ubuntu 14.04.

I am on ubuntu 14.04 32 bit.

任何建议.

推荐答案

我刚刚遇到了类似的问题.在下面,我将目录下载为OpenC264,并将其提取为path-to-openh264.我在该文件夹中创建了子目录android,并通过设置PREFIX=android修改了OpenH264的Makefile.之后运行以下命令来构建OpenH264,为我解决了这个问题:

I just encountered a similar issue. In the following, I refer to the directory, I downloaded and extracted OpenH264 to, as path-to-openh264. I created a subdirectory android within that folder and modified OpenH264's Makefile by setting PREFIX=android. Afterwards running the following commands to build OpenH264 solved the issue for me:

make OS=android NDKROOT=<path-to-ndk> TARGET=android-14 APP_ABI=armeabi ARCH=arm
make OS=android NDKROOT=<path-to-ndk> TARGET=android-14 APP_ABI=armeabi ARCH=arm clean
make install OS=android NDKROOT=<path-to-ndk> TARGET=android-14 APP_ABI=armeabi ARCH=arm

生成的libopenh264.so文件应最终位于目录path-to-openh264/android/lib/中.为了配置pjsip,我使用了以下命令:

The resulting libopenh264.so file should end up in the directory path-to-openh264/android/lib/. In order to configure pjsip I used the following command:

APP_PLATFORM=android-14 ./configure-android --with-openh264=<path-to-openh264>/android

以下StackOverflow线程将我引向正确的方向:

The following StackOverflow thread lead me to the right direction:

在x86中为android平台构建openh264

此问题的原因是,我最初运行make install命令时没有命令行参数.这导致为错误的ABI(默认文件是armeabi-v7a)创建了本机库文件.在为armeabi ABI构建pjsip时,它无法识别该库,因为它是为其他ABI构建的.至少我是这样想的.

The reason for this issue was, that I ran the make install command without the command line parameters at first. This caused the native library file to be created for the wrong ABI (the default one, which is armeabi-v7a). When building pjsip for the armeabi ABI, it didn't recognize the library, because it was built for a different ABI. At least this is what I suppose.

这篇关于使用PJSIP进行Openh264编译的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆