用外部工具链国科微(goke)arm-gcc6.3-linux-uclibceabi编译GitHub - hi35xx/live-streamer: RTP/RTSP stream server问题:
问题1:
./configure --target=arm-buildroot-linux-uclibcgnueabi --host=arm-buildroot-linux-uclibcgnueabi --build=x86_64-pc-linux-gnu --prefix=/usr --exec-prefix=/usr --sysconfdir=/etc --localstatedir=/var --program-prefix="" --disable-gtk-doc --disable-gtk-doc-html --disable-doc --disable-docs --disable-documentation --with-xmlto=no --with-fop=no --disable-dependency-tracking --enable-ipv6 --disable-nls --disable-static --enable-shared --disable-examples --disable-tests --disable-doxygen-docs --with-build-libdbus-cxx=/home/a/of/project/hi3518/hi35xx/hi35xx-buildroot/output/build/host-dbus-cpp-0.9.0/ --disable-ecore --disable-glib
checking expat.h usability... no
checking expat.h presence... no
checking for expat.h... no
出错。
cd dbus-cpp-0.9.0
vi config.log
发现没有文件c++config.h导致,到hi35xx-buildroot目录复制bits/缺少的文件放到arm-gcc6.3-linux-uclibceabi头文件对应位置,后面问题同理,缺什么头文件就同样操作。编译过关。
arm-gcc6.3-linux-uclibceabi/arm-linux-uclibceabi/include/c++/6.3.0/bits/c++config.h
问题2:
error: '::acoshl' has not been declared
把对应没定义的注释掉即可。
// functions
using ::acosh;
using ::acoshf;
//hui using ::acoshl;
live-streamer程序如何运行:
cd /mnt/project/hi3518/hi35xx/live-streamer/live-streamer-hi35xx-buildroot/src
./live-streamer -pipe "isp0:sensor=imx335|videv0|vichnxx0|vpgrp0|vpchnxx0|vechn0:encoding=H264,resolution=720P,framerate=25,enable" -vsrc isp0 -venc vechn0 -stream 2:vechn0
播放地址与-stream N:vechn0的N对应,例如-stream 2:vechn0的播放地址是rtsp://192.168.2.96/2
live-streamer程序分析,
问题1,执行到这里后,停了?上述命令行加上,enable即可。
_sysctl.enable();
问题2,sensor_register产生Segmentation fault,调用库sensor驱动库造成
问题3,mainloop.run();怎样循环? 继承:class EvTaskScheduler: public TaskScheduler
问题4,DBUS_WATCH_READABLE与出流的关系?
void LiveH265StreamSource::streamData(StreamBuffer* buffer)出流是否会调用到这里?
H264_VIDEO_STREAM_SOURCE
问题4,vlc播放url,在这个函数被中断了// Start reading the file:
fDummyRTPSink->startPlaying(*inputSource, H264AfterPlayingDummy, this);
原因: _io.set(HI_MPI_VENC_GetFd(channelId()), ev::READ);里面的HI_MPI_VENC_GetFd(channelId())返回<0负数
问题5,播放器播放地址?播放地址与-stream N:vechn0的N对应,例如-stream 2:vechn0的播放地址是rtsp://192.168.2.96/2
问题6,添加goke头文件目录编译会出错?原因是goke与hisi有很多结构体,成员变量类似,需要去掉hisi头文件目录,修改代码以适应goke的定义。
DEFAULT_INCLUDES = -I. -I$(top_builddir) 加上这句后编译不过?-I../gk7605v100/sample/common -I../gk7605v100/include -I../gk7605v100/gmp/include/
问题7,Makefile里面,all-am: Makefile $(LTLIBRARIES) sample_comm_venc.o,为什么没编译到:%.o: $(GOKE_COMMON_SOURCE_DIR)/%.c 。原因:GOKE_COMMON_SOURCE_DIR = ../gk7605v100/sample/common最后多了个空格,去掉即可。
问题8,Makefile一旦加上goke库am__append_9 = $(GK7605V100_LDFLAGS)编译后,运行程序马上断错误。
问题9,Makefile一旦加上goke库,提示undefined reference to `AUDIO_UPVQE_Destroy'。原因是hi35xx-buildroot里面有海思的同名库冲突了,删掉海思的即可。
rm /home/a/of/project/hi3518/hi35xx/hi35xx-buildroot_goke_arm-gcc6.3-linux-uclibceabi/output/host/bin/../arm-buildroot-linux-uclibcgnueabi/sysroot/usr/lib/libupvqe.*
rm /home/a/of/project/hi3518/hi35xx/hi35xx-buildroot_goke_arm-gcc6.3-linux-uclibceabi/output/host/bin/../arm-buildroot-linux-uclibcgnueabi/sysroot/usr/lib/libdnvqe.*