Live555+Windows+MSys2 编译Androidso库和运行使用

下载
wget http://www.live555.com/liveMedia/public/live555-latest.tar.gz
tar -xzvf live555-latest.tar.gz
加入版本控制
git init
git add .
git commit -a -m "first init"
git log
修改config.android-arm64
cd live
vim config.android-arm64
./genMakefiles android-arm64
make -j16
或者
make V=1 -j$(nproc)
config.android-arm64
NDK=/g/SDK/ndk/21.4.7075529
TOOLCHAIN=$(NDK)/toolchains/llvm/prebuilt/windows-x86_64
API=21
SYSROOT=$(NDK)/toolchains/llvm/prebuilt/windows-x86_64/sysroot
CROSS_PREFIX=$(TOOLCHAIN)/bin/aarch64-linux-android-
DESTDIR=$(shell pwd)/../arm64-v8aCOMPILE_OPTS =         $(INCLUDES) -m64  -fPIC -fpic -I$(SYSROOT)/usr/local/include -I. -O2 -DSOCKLEN_T=socklen_t -D_LARGEFILE_SOURCE=1 -D_FILE_OFFSET_BITS=64 -DNO_OPENSSL=1 -DNO_GETIFADDRS=1 --sysroot=$(SYSROOT)
C =                     c
C_COMPILER =            $(TOOLCHAIN)/bin/aarch64-linux-android$(API)-clang
C_FLAGS =               $(COMPILE_OPTS)
CPP =                   cpp
CPLUSPLUS_COMPILER =    $(TOOLCHAIN)/bin/aarch64-linux-android$(API)-clang++
CPLUSPLUS_FLAGS =       $(COMPILE_OPTS) -Wall -DBSD=1
OBJ =                   o
LINK =                  $(CPLUSPLUS_COMPILER) -o 
LINK_OPTS =             -static-libstdc++
CONSOLE_LINK_OPTS =     $(LINK_OPTS)
LIBRARY_LINK =          $(CROSS_PREFIX)ar cr  
LIBRARY_LINK_OPTS =
LIB_SUFFIX =            a
LIBS_FOR_CONSOLE_APPLICATION =  
LIBS_FOR_GUI_APPLICATION =
EXE =
config.android-armv7
NDK=/g/SDK/ndk/21.4.7075529
TOOLCHAIN=$(NDK)/toolchains/llvm/prebuilt/windows-x86_64
API=24
SYSROOT=$(NDK)/toolchains/llvm/prebuilt/windows-x86_64/sysroot
CROSS_PREFIX=$(TOOLCHAIN)/bin/arm-linux-androideabi-
DESTDIR=$(shell pwd)/../armeabi-v7aCOMPILE_OPTS = $(INCLUDES) -march=armv7-a -mfloat-abi=softfp -mfpu=vfpv3-d16 -fPIC -I$(SYSROOT)/usr/local/include -I. -O2 -DSOCKLEN_T=socklen_t -D_LARGEFILE_SOURCE=1 -D_FILE_OFFSET_BITS=64 -DNO_OPENSSL=1 -DNO_GETIFADDRS=1 --sysroot=$(SYSROOT)  
C =                     c
C_COMPILER =            $(TOOLCHAIN)/bin/armv7a-linux-androideabi$(API)-clang 
C_FLAGS =               $(COMPILE_OPTS)
CPP =                   cpp
CPLUSPLUS_COMPILER =    $(TOOLCHAIN)/bin/armv7a-linux-androideabi$(API)-clang++ 
CPLUSPLUS_FLAGS =       $(COMPILE_OPTS) -Wall -DBSD=1
OBJ =                   o
LINK =                  $(CPLUSPLUS_COMPILER) -o 
LINK_OPTS =             -static-libstdc++
CONSOLE_LINK_OPTS =     $(LINK_OPTS)
LIBRARY_LINK =          $(CROSS_PREFIX)ar cr  
LIBRARY_LINK_OPTS =
LIB_SUFFIX =            a
LIBS_FOR_CONSOLE_APPLICATION =  
LIBS_FOR_GUI_APPLICATION =
EXE =
编译

在这里插入图片描述

make报错
$ make
bash: make: command not found
错误示范一

注意windows下的make名字叫mingw32-make

$ which mingw32-make
/e/msys64/mingw64/bin/mingw32-make
正确操作

注意这个是在MSys2环境下
或者将make加入环境变量

$ which make
/g/MSYS2/mingw64/bin/make
报错
testRTSPClient.cpp:64:24: error: copying variable of type 'EventLoopWatchVariable' (aka 'atomic<char>') invokes deleted constructor
EventLoopWatchVariable eventLoopWatchVariable = 0;^                        ~
G:/SDK/ndk/21.4.7075529/toolchains/llvm/prebuilt/windows-x86_64/sysroot/usr/include/c++/v1\atomic:1643:7: note: copy constructor of 'atomic<char>' is      implicitly deleted because base class '__atomic_base<char>' has a deleted copy constructor: public __atomic_base<_Tp>^
G:/SDK/ndk/21.4.7075529/toolchains/llvm/prebuilt/windows-x86_64/sysroot/usr/include/c++/v1\atomic:1562:7: note: copy constructor of'__atomic_base<char, true>' is implicitly deleted because base class '__atomic_base<char, false>' has a deleted copy constructor: public __atomic_base<_Tp, false>^
G:/SDK/ndk/21.4.7075529/toolchains/llvm/prebuilt/windows-x86_64/sysroot/usr/include/c++/v1\atomic:1542:5: note: '__atomic_base' has been explicitly  marked deleted here__atomic_base(const __atomic_base&) = delete;^
1 error generated.
make[1]: *** [Makefile:55: testRTSPClient.o] Error 1
make[1]: Leaving directory 'G:/Live555/live/testProgs'
make: *** [Makefile:45: all] Error 2

修改
在这里插入图片描述

报错

BasicTaskScheduler.cpp: In member function ‘virtual void BasicTaskScheduler::SingleStep(unsigned int)’: BasicTaskScheduler.cpp:191:40: error: ‘struct std::atomic_flag’ has no member named ‘test’ 191 | if (fTriggersAwaitingHandling[i].test()) { | ^~~~ make[1]: *** [Makefile:41: BasicTaskScheduler.o] Error 1 make[1]: Leaving directory '/e/Live555/live/BasicUsageEnvironment' make: *** [Makefile:38: all] Error 2
在这里插入图片描述
解决
在这里插入图片描述

windows编译成功

在这里插入图片描述

安装

make install

$ make install
cd liveMedia ; make install
make[1]: Entering directory '/e/Live555/live/liveMedia'
install -d /usr/local/include/liveMedia /usr/local/lib
install -m 644 include/*.hh /usr/local/include/liveMedia
install -m 644 libliveMedia.a /usr/local/lib
make[1]: Leaving directory '/e/Live555/live/liveMedia'
cd groupsock ; make install
make[1]: Entering directory '/e/Live555/live/groupsock'
install -d /usr/local/include/groupsock /usr/local/lib
install -m 644 include/*.hh include/*.h /usr/local/include/groupsock
install -m 644 libgroupsock.a /usr/local/lib
make[1]: Leaving directory '/e/Live555/live/groupsock'
cd UsageEnvironment ; make install
make[1]: Entering directory '/e/Live555/live/UsageEnvironment'
install -d /usr/local/include/UsageEnvironment /usr/local/lib
install -m 644 include/*.hh /usr/local/include/UsageEnvironment
install -m 644 libUsageEnvironment.a /usr/local/lib
make[1]: Leaving directory '/e/Live555/live/UsageEnvironment'
cd BasicUsageEnvironment ; make install
make[1]: Entering directory '/e/Live555/live/BasicUsageEnvironment'
install -d /usr/local/include/BasicUsageEnvironment /usr/local/lib
install -m 644 include/*.hh /usr/local/include/BasicUsageEnvironment
install -m 644 libBasicUsageEnvironment.a /usr/local/lib
make[1]: Leaving directory '/e/Live555/live/BasicUsageEnvironment'
cd testProgs ; make install
make[1]: Entering directory '/e/Live555/live/testProgs'
install -d /usr/local/bin
install -m 755 testMP3Streamer testMPEG1or2VideoStreamer testMPEG1or2AudioVideoStreamer testMPEG2TransportStreamer testMPEG4VideoStreamer testH264VideoStreamer testH265VideoStreamer testDVVideoStreamer testWAVAudioStreamer testAMRAudioStreamer testMKVStreamer testOggStreamer vobStreamer testMP3Receiver testMPEG1or2VideoReceiver testMPEG2TransportReceiver sapWatch testRelay testReplicator testOnDemandRTSPServer testRTSPClient openRTSP playSIP testH264VideoToHLSSegments testMPEG1or2Splitter testMPEG1or2ProgramToTransportStream testH264VideoToTransportStream testH265VideoToTransportStream MPEG2TransportStreamIndexer testMPEG2TransportStreamTrickPlay registerRTSPStream testMKVSplitter testMPEG2TransportStreamSplitter mikeyParse /usr/local/bin
make[1]: Leaving directory '/e/Live555/live/testProgs'
cd mediaServer ; make install
make[1]: Entering directory '/e/Live555/live/mediaServer'
install -d /usr/local/bin
install -m 755 live555MediaServer /usr/local/bin
make[1]: Leaving directory '/e/Live555/live/mediaServer'
cd proxyServer ; make install
make[1]: Entering directory '/e/Live555/live/proxyServer'
install -d /usr/local/bin
install -m 755 live555ProxyServer /usr/local/bin
make[1]: Leaving directory '/e/Live555/live/proxyServer'
cd hlsProxy ; make install
make[1]: Entering directory '/e/Live555/live/hlsProxy'
install -d /usr/local/bin
install -m 755 live555HLSProxy /usr/local/bin
make[1]: Leaving directory '/e/Live555/live/hlsProxy'
windows安装成功

在这里插入图片描述

arm64安装成功

armv7安装成功

在这里插入图片描述

如何使用?

https://pmishra0103.medium.com/live555-streaming-media-and-android-setup-bf6b7736c53b

命令行使用

live555MediaServer
在这里插入图片描述

另一种编译方式

Android项目源码
https://github.com/goodluckforme/Live555OnAndroid.git
这个是再Android工程内直接使用Android.mk完成编译,专属Android平台,实现简单
在这里插入图片描述

编译文件和修改部分源码

https://github.com/goodluckforme/live555_compile

http://www.live555.com/liveMedia/#3rd-party-apps
http://www.live555.com/mediaServer/
https://pmishra0103.medium.com/live555-streaming-media-and-android-setup-bf6b7736c53b

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.mzph.cn/bicheng/74080.shtml

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

实用工具-Stirling-PDF

windows桌面版参考这个文档 Getting Started | Stirling-PDF 安装包推荐使用迅雷下载&#xff0c;先转存到迅雷网盘在使用迅雷下载速度嘎嘎快。 github:https://github.com/Stirling-Tools/Stirling-PDF Stirling-PDF 是一个强大的、基于 Web 的开源 PDF 处理工具&#xff0c…

借助AI Agent实现数据分析

在当今数据驱动的世界中&#xff0c;数据分析已成为企业决策、科学研究和社会治理的核心工具。然而&#xff0c;随着数据量的爆炸式增长和复杂性的提升&#xff0c;传统的数据分析方法面临着效率低下、成本高昂和人力不足等挑战。AI技术的快速发展&#xff0c;尤其是AI Agent的…

JavaScript实现一个函数,将数组扁平化(flatten),即把多维数组转为一维数组。

大白话实现一个函数&#xff0c;将数组扁平化&#xff08;flatten&#xff09;&#xff0c;即把多维数组转为一维数组。 思路 实现数组扁平化的基本思路是遍历数组中的每个元素&#xff0c;如果元素是数组&#xff0c;就递归地将其扁平化并添加到结果数组中&#xff1b;如果元…

麒麟操作系统安装人大金仓数据库

如果你想拥有你从未拥有过的东西&#xff0c;那么你必须去做你从未做过的事情 在当前数字化转型和信息安全备受重视的背景下&#xff0c;众多公司积极推进国产化改造进程。在操作系统领域&#xff0c;统信、open 欧拉、中标麒麟、银河麒麟等国产操作系统崭露头角&#xff0c;逐…

开发SAPUI5 Fiori应用并部署到SAP系统

首先新建一个项目文件夹 在VScode中打开 打开SAP Fiori&#xff08;需要先下载安装&#xff0c;参考上上一篇文章&#xff09; ,选择已添加的SAP S4 ERP系统 ,点击创建Firoi应用。 如果没有添加系统的&#xff0c;点击添加按钮&#xff0c;添加即可&#xff0c;注意&#xff…

右键添加:新建HTML模板文件

使用注册表给Windows右键添加:新建HTML文档模板的功能_注册表右键新建-CSDN博客 新建文件有了&#xff0c;但是没有引用模板文件&#xff0c;是空文件。 默认改成 htmlfile 模板成功

[极客大挑战 2019]Knife——3.20BUUCTF练习day4(1)

[极客大挑战 2019]Knife——3.20BUUCTF练习day4(1) 很简单 蚁剑连接 根目录下有flag flag{f77e8444-dd87-48b3-8fe0-a735b5a5c708}

力扣22.括号生成

22. 括号生成 - 力扣&#xff08;LeetCode&#xff09; 代码区&#xff1a; class Solution {vector<string> ans; public:vector<string> generateParenthesis(int n) {dfs(0,0,n,"");return ans;}void dfs(int left,int right,int n,string str){if(l…

第37周:文献阅读

目录 摘要 Abstract 文献阅读 问题引入 研究背景 研究意义 研究目的 实验方法 TimeGAN 数据增强 预测模型的独立性 创新点 实验研究 数据准备 合成数据分析 模型比较 总结 摘要 该文献围绕利用 TimeGAN 提高供热变电站热负荷预测精度展开。结构上&#x…

NFS 安装与测试

NFS 安装与测试 服务器 # NFS 共享目录 mkdir -p ${HOME}/Share/nfs && sudo chown -R nobody:nogroup ${HOME}/Share/nfs# 安装 NFS Server sudo apt install nfs-kernel-server# 配置 NFS 目录 sudo cp -arf /etc/exports /etc/exports.bak sudo tee -a /etc/exports…

算法题(103):数独

审题&#xff1a; 本题需要我们找出数独的解&#xff0c;并打印出来 时间复杂度分析&#xff1a; 本题是9*9的数独格子&#xff0c;所以数据量小于25&#xff0c;可以使用2^n的算法 思路&#xff1a; 方法一&#xff1a;深度优先搜索 首先确定搜索及插入策略&#xff1a; 我们采…

snmp/mib采用子代理模式,编码,部署

0.环境 0.1 编译net-snmp cd net-snmp-5.7.2 ./configure --prefix/usr/local/snmp BEGIN failed--compilation aborted at Makefile.PL line 1. make: *** [perlmakefiles] Error 2 yum install cpan -y make && make install /…

# [RPA] 使用八爪鱼进行高效网页数据采集

在许多行业中&#xff0c;数据是核心资产。然而&#xff0c;虽然许多网站的文本内容可以免费访问&#xff0c;但手动一条一条采集&#xff0c;不仅耗时耗力&#xff0c;还容易出错。这种情况下&#xff0c;使用自动化工具来提高采集效率就显得尤为重要。本文将介绍 八爪鱼 这一…

IDI_APPLICATION 与 IDC_ARROW资源存放在工程的哪个路径?

书籍&#xff1a;《windows程序设计(第五版)》的开始 环境&#xff1a;visual studio 2022 内容&#xff1a;HELLOWIN程序 说明&#xff1a;以下内容大部分来自腾讯元宝。 IDI_APPLICATION 和 IDC_ARROW 是 ​Windows 系统预定义的资源标识符&#xff0c;它们并不以文件形式…

算法 | 优化算法比较

===================================================== github:https://github.com/MichaelBeechan CSDN:https://blog.csdn.net/u011344545 ===================================================== 优化算法 ‌一、主流优化算法分类‌1‌、传统梯度类算法‌2‌、启发式算…

腾讯云HAI1元体验:轻松调用DeepSeek-R1模型搭建网站

前言 随着云计算和人工智能技术的不断发展&#xff0c;构建和部署智能化的网页变得越来越简单。腾讯云提供的HAI&#xff08;人工智能平台&#xff09;和DeepSeek&#xff08;智能搜索引擎&#xff09;服务&#xff0c;能帮助开发者快速搭建智能化网页&#xff0c;提升用户体验…

AI Agent系列(七) -思维链(Chain of Thought,CoT)

AI Agent系列【七】 前言一、CoT技术详解1.1 CoT组成1.2 CoT的特点 二、CoT的作用三、CoT的好处四、CoT适用场景五、CoT的推理结构 前言 思维链(Chain of Thought,CoT)&#xff0c;思维链就是一系列中间的推理步骤(a series of intermediate reasoning steps)&#xff0c;通过…

【一起来学kubernetes】21、Secret使用详解

Secret 的详细介绍 Secret 是 Kubernetes 中用于存储和管理敏感信息&#xff08;如密码、令牌、密钥等&#xff09;的资源对象。Secret的设计目的是为了安全地存储和传输敏感信息&#xff0c;如密码、API密钥、证书等。这些信息通常不应该直接硬编码在配置文件或镜像中&#x…

opencv中stitch图像融合

openv版本: opencv249 vs &#xff1a;2010 qt : 4.85 #include "quanjing.h"#include <iostream> #include <opencv2/core/core.hpp> #include <opencv2/highgui/highgui.hpp> #include <opencv2/imgproc/imgproc.hpp> #include <open…

1201. 【高精度练习】蜜蜂路线

题目描述 一只蜜蜂在图5.1-2所示的数字蜂房上爬动&#xff0c;已知它只能从标号小的蜂房爬到标号大的相邻蜂房&#xff0c; 现在问你&#xff1a;蜜蜂从蜂房M开始爬到蜂房N&#xff0c;l≤M 输入 M&#xff0c;N的值。 输出 一个数表示爬行路线种数。 样例输入 1 14 样…