移植交叉编译过的phonon库
qt源码编译后,将对应的QT目标文件夹下lib文件夹中的
以libphonon开头的几个文件打包压缩,复制到arm板对应的QT文件夹中lib目录下
测试qt程序,让qt程序播放一个mp4文件
报错:
phonon backend plugin could not be loaded
原因是plugins文件夹缺少相应的phonon_backend
查找解决方案
安装播放插件有两种解决方案:
1.使用gstreamer
2.使用mplayer
看了大家的经验选择使用mplayer
下载phonon_mplayer
git clone git:///phonon-mplayer
之后进入文件夹
cmake . -DCMAKE_C_COMPILER=arm-linux-gcc -DCMAKE_CXX_COMPILER=arm-linux-g++
生成Makefile
并将得到phonon_mplayer.so文件,放到Qt安装路径的/plugins/phonon_backend/目录下
接下来, 再使进入到QT源文件夹下对应的phonon文件夹,编译Qt源文件下的phonon模块,这时会自动根据phonon_mplayer.so编译适合mplayer插件的phonon
将编译好的libphonon.la、libphonon.so、libphonon.so.4、libphonon.so.4.3 、 libphonon.so.4.3.1模块复制到目标板Qt安装路径的lib目录下
进入/phonon-mplayer/mplayer执行
qmake
make(如不是第一次make,执行make clean)
此时观察输出,如发现使用的编译器是gcc或g++,择编译器使用的不正确,一般会编译不成功,出现如下字样
/usr/bin/ld: skipping incompatible /usr/local/freescale/qt4.8.5/lib/libphonon.so when searching for -lphonon
/usr/bin/ld: skipping incompatible /usr/lib/gcc/i686-linux-gnu/4.6/…/…/…/…/lib/libphonon.so when searching for -lphonon
/usr/bin/ld: skipping incompatible /usr/lib/…/lib/libphonon.so when searching for -lphonon
/usr/bin/ld: skipping incompatible /usr/lib/gcc/i686-linux-gnu/4.6/…/…/…/libphonon.so when searching for -lphonon
/usr/bin/ld: skipping incompatible /usr/lib/libphonon.so when searching for -lphonon
/usr/bin/ld: cannot find -lphonon
/usr/bin/ld: skipping incompatible /usr/local/arm/tslib/lib/libts.so when searching for -lts
/usr/bin/ld: cannot find -lts
collect2: ld returned 1 exit status
make: *** [phonon_backend/libphonon_mplayer.so] Error 1
此时是makefile中编译器选项的问题 查看目录下的Makefile文件确实配置有问题
cc=gcc
cxx=g++
。。。
手动修改makefile(主要看开头)
如果说找不到QT的什么文件,可以修改对应的include路径和lib路径
############################################################################## Makefile for building: libphonon_mplayer.so# Generated by qmake (2.01a) (Qt 4.8.1) on: Wed Dec 26 16:41:35 # Project: phonon_mplayer.pro# Template: lib# Command: /usr/bin/qmake -o Makefile phonon_mplayer.pro#################################################################################### Compiler, tools and optionsCC = arm-none-linux-gnueabi-gccCXX = arm-none-linux-gnueabi-g++DEFINES = -DQT_WEBKIT -DPHONON_MAKE_QT_ONLY_BACKEND -DQT_NO_DEBUG -DQT_PLUGIN -DQT_PHONON_LIB -DQT_GUI_LIB -DQT_CORE_LIB -DQT_SHAREDCFLAGS = -pipe -O2 -D_REENTRANT -Wall -W -fPIC $(DEFINES)CXXFLAGS= -pipe -O2 -D_REENTRANT -Wall -W -fPIC $(DEFINES)INCPATH = -I/usr/share/qt4/mkspecs/linux-g++ -I. -I/usr/local/freescale/qt4.8.5/include -I/usr/include/qt4/QtCore -I/usr/include/qt4/QtGui -I/usr/include/qt4/phonon -I/usr/include/qt4-I/usr/include/qt4/phonon_compat -I.LINK= arm-none-linux-gnueabi-g++LFLAGS = -Wl,-O1 -sharedLIBS= $(SUBLIBS) -L/usr/local/freescale/qt4.8.5/lib -lphonon -L/usr/local/arm/tslib/lib -L/usr/lib/i386-linux-gnu -lQtNetwork -lts -lQtGui -lQtCore -lpthread AR = arm-none-linux-gnueabi-arRANLIB = QMAKE = /usr/local/freescale/qt4.8.5/binTAR = tar -cfCOMPRESS= gzip -9fCOPY= cp -fSED = sedCOPY_FILE= $(COPY)COPY_DIR= $(COPY) -rSTRIP = stripINSTALL_FILE = install -m 644 -pINSTALL_DIR = $(COPY_DIR)INSTALL_PROGRAM = install -m 755 -pDEL_FILE= rm -fSYMLINK = ln -f -sDEL_DIR = rmdirMOVE= mv -fCHK_DIR_EXISTS= test -dMKDIR = mkdir -p####### Output directoryOBJECTS_DIR = ./####### FilesSOURCES = libmplayer/MyProcess.cpp \libmplayer/MediaData.cpp \libmplayer/MediaSettings.cpp \libmplayer/MPlayerVersion.cpp \libmplayer/MPlayerProcess.cpp \libmplayer/MPlayerLoader.cpp \libmplayer/WidgetNoPaintEvent.cpp \libmplayer/MPlayerVideoWidget.cpp \libmplayer/MPlayerConfig.cpp \Backend.cpp \MediaObject.cpp \MediaController.cpp \VideoWidget.cpp \AudioOutput.cpp \EffectManager.cpp \Effect.cpp \SinkNode.cpp \SeekStack.cpp moc_MyProcess.cpp \moc_MPlayerProcess.cpp \moc_WidgetNoPaintEvent.cpp \moc_MPlayerVideoWidget.cpp \moc_Backend.cpp \moc_MediaObject.cpp \moc_MediaController.cpp \moc_VideoWidget.cpp \moc_AudioOutput.cpp \moc_EffectManager.cpp \moc_Effect.cpp \moc_SinkNode.cpp \moc_SeekStack.cppOBJECTS = MyProcess.o \MediaData.o \MediaSettings.o \MPlayerVersion.o \MPlayerProcess.o \MPlayerLoader.o \WidgetNoPaintEvent.o \MPlayerVideoWidget.o \MPlayerConfig.o \Backend.o \MediaObject.o \MediaController.o \VideoWidget.o \AudioOutput.o \EffectManager.o \Effect.o \SinkNode.o \SeekStack.o \moc_MyProcess.o \moc_MPlayerProcess.o \moc_WidgetNoPaintEvent.o \moc_MPlayerVideoWidget.o \moc_Backend.o \moc_MediaObject.o \moc_MediaController.o \moc_VideoWidget.o \moc_AudioOutput.o \moc_EffectManager.o \moc_Effect.o \moc_SinkNode.o \moc_SeekStack.oDIST= /usr/share/qt4/mkspecs/common/unix.conf \/usr/share/qt4/mkspecs/common/linux.conf \/usr/share/qt4/mkspecs/common/gcc-base.conf \/usr/share/qt4/mkspecs/common/gcc-base-unix.conf \/usr/share/qt4/mkspecs/common/g++-base.conf \/usr/share/qt4/mkspecs/common/g++-unix.conf \/usr/share/qt4/mkspecs/qconfig.pri \/usr/share/qt4/mkspecs/modules/qt_webkit_version.pri \/usr/share/qt4/mkspecs/features/qt_functions.prf \/usr/share/qt4/mkspecs/features/qt_config.prf \/usr/share/qt4/mkspecs/features/exclusive_builds.prf \/usr/share/qt4/mkspecs/features/default_pre.prf \/usr/share/qt4/mkspecs/features/release.prf \/usr/share/qt4/mkspecs/features/default_post.prf \/usr/share/qt4/mkspecs/features/qt.prf \/usr/share/qt4/mkspecs/features/unix/thread.prf \/usr/share/qt4/mkspecs/features/moc.prf \/usr/share/qt4/mkspecs/features/unix/gdb_dwarf_index.prf \/usr/share/qt4/mkspecs/features/warn_on.prf \/usr/share/qt4/mkspecs/features/resources.prf \/usr/share/qt4/mkspecs/features/uic.prf \/usr/share/qt4/mkspecs/features/yacc.prf \/usr/share/qt4/mkspecs/features/lex.prf \/usr/share/qt4/mkspecs/features/include_source_dir.prf \phonon_mplayer.proQMAKE_TARGET = phonon_mplayerDESTDIR = phonon_backend/TARGET = libphonon_mplayer.soTARGETD = libphonon_mplayer.sofirst: all####### Implicit rules.SUFFIXES: .o .c .cpp .cc .cxx .C.cpp.o:$(CXX) -c $(CXXFLAGS) $(INCPATH) -o "$@" "$<".cc.o:$(CXX) -c $(CXXFLAGS) $(INCPATH) -o "$@" "$<".cxx.o:$(CXX) -c $(CXXFLAGS) $(INCPATH) -o "$@" "$<".C.o:$(CXX) -c $(CXXFLAGS) $(INCPATH) -o "$@" "$<".c.o:$(CC) -c $(CFLAGS) $(INCPATH) -o "$@" "$<"####### Build rulesall: Makefile phonon_backend/$(TARGET)phonon_backend/$(TARGET): $(OBJECTS) $(SUBLIBS) $(OBJCOMP) @$(CHK_DIR_EXISTS) phonon_backend/ || $(MKDIR) phonon_backend/ -$(DEL_FILE) $(TARGET)$(LINK) $(LFLAGS) -o $(TARGET) $(OBJECTS) $(LIBS) $(OBJCOMP)-$(MOVE) $(TARGET) phonon_backend/Makefile: phonon_mplayer.pro /usr/share/qt4/mkspecs/linux-g++/qmake.conf /usr/share/qt4/mkspecs/common/unix.conf \/usr/share/qt4/mkspecs/common/linux.conf \/usr/share/qt4/mkspecs/common/gcc-base.conf \/usr/share/qt4/mkspecs/common/gcc-base-unix.conf \/usr/share/qt4/mkspecs/common/g++-base.conf \/usr/share/qt4/mkspecs/common/g++-unix.conf \/usr/share/qt4/mkspecs/qconfig.pri \/usr/share/qt4/mkspecs/modules/qt_webkit_version.pri \/usr/share/qt4/mkspecs/features/qt_functions.prf \/usr/share/qt4/mkspecs/features/qt_config.prf \/usr/share/qt4/mkspecs/features/exclusive_builds.prf \/usr/share/qt4/mkspecs/features/default_pre.prf \/usr/share/qt4/mkspecs/features/release.prf \/usr/share/qt4/mkspecs/features/default_post.prf \/usr/share/qt4/mkspecs/features/qt.prf \/usr/share/qt4/mkspecs/features/unix/thread.prf \/usr/share/qt4/mkspecs/features/moc.prf \/usr/share/qt4/mkspecs/features/unix/gdb_dwarf_index.prf \/usr/share/qt4/mkspecs/features/warn_on.prf \/usr/share/qt4/mkspecs/features/resources.prf \/usr/share/qt4/mkspecs/features/uic.prf \/usr/share/qt4/mkspecs/features/yacc.prf \/usr/share/qt4/mkspecs/features/lex.prf \/usr/share/qt4/mkspecs/features/include_source_dir.prf \/usr/local/freescale/qt4.8.5/lib/libphonon.prl \/usr/lib/i386-linux-gnu/libQtGui.prl \/usr/lib/i386-linux-gnu/libQtNetwork.prl \/usr/lib/i386-linux-gnu/libQtCore.prl$(QMAKE) -o Makefile phonon_mplayer.pro/usr/share/qt4/mkspecs/common/unix.conf:/usr/share/qt4/mkspecs/common/linux.conf:/usr/share/qt4/mkspecs/common/gcc-base.conf:/usr/share/qt4/mkspecs/common/gcc-base-unix.conf:/usr/share/qt4/mkspecs/common/g++-base.conf:/usr/share/qt4/mkspecs/common/g++-unix.conf:/usr/share/qt4/mkspecs/qconfig.pri:/usr/share/qt4/mkspecs/modules/qt_webkit_version.pri:/usr/share/qt4/mkspecs/features/qt_functions.prf:/usr/share/qt4/mkspecs/features/qt_config.prf:/usr/share/qt4/mkspecs/features/exclusive_builds.prf:/usr/share/qt4/mkspecs/features/default_pre.prf:/usr/share/qt4/mkspecs/features/release.prf:/usr/share/qt4/mkspecs/features/default_post.prf:/usr/share/qt4/mkspecs/features/qt.prf:/usr/share/qt4/mkspecs/features/unix/thread.prf:/usr/share/qt4/mkspecs/features/moc.prf:/usr/share/qt4/mkspecs/features/unix/gdb_dwarf_index.prf:/usr/share/qt4/mkspecs/features/warn_on.prf:/usr/share/qt4/mkspecs/features/resources.prf:/usr/share/qt4/mkspecs/features/uic.prf:/usr/share/qt4/mkspecs/features/yacc.prf:/usr/share/qt4/mkspecs/features/lex.prf:/usr/share/qt4/mkspecs/features/include_source_dir.prf:/usr/local/freescale/qt4.8.5/lib/libphonon.prl:/usr/lib/i386-linux-gnu/libQtGui.prl:/usr/lib/i386-linux-gnu/libQtNetwork.prl:/usr/lib/i386-linux-gnu/libQtCore.prl:qmake: FORCE@$(QMAKE) -o Makefile phonon_mplayer.prodist: @$(CHK_DIR_EXISTS) .tmp/phonon_mplayer1.0.0 || $(MKDIR) .tmp/phonon_mplayer1.0.0 $(COPY_FILE) --parents $(SOURCES) $(DIST) .tmp/phonon_mplayer1.0.0/ && $(COPY_FILE) --parents libmplayer/MyProcess.h libmplayer/MPlayerProcess.h libmplayer/WidgetNoPaintEvent.h libmplayer/MPlayerVideoWidget.h libmplayer/MPlayerConfig.h Backend.h MediaObject.h MediaController.h VideoWidget.h AudioOutput.h EffectManager.h Effect.h SinkNode.h SeekStack.h .tmp/phonon_mplayer1.0.0/ && $(COPY_FILE) --parents libmplayer/MyProcess.cpp libmplayer/MediaData.cpp libmplayer/MediaSettings.cpp libmplayer/MPlayerVersion.cpp libmplayer/MPlayerProcess.cpp libmplayer/MPlayerLoader.cpp libmplayer/WidgetNoPaintEvent.cpp libmplayer/MPlayerVideoWidget.cpp libmplayer/MPlayerConfig.cpp Backend.cpp MediaObject.cpp MediaController.cpp VideoWidget.cpp AudioOutput.cpp EffectManager.cpp Effect.cpp SinkNode.cpp SeekStack.cpp .tmp/phonon_mplayer1.0.0/ && (cd `dirname .tmp/phonon_mplayer1.0.0` && $(TAR) phonon_mplayer1.0.0.tar phonon_mplayer1.0.0 && $(COMPRESS) phonon_mplayer1.0.0.tar) && $(MOVE) `dirname .tmp/phonon_mplayer1.0.0`/phonon_mplayer1.0.0.tar.gz . && $(DEL_FILE) -r .tmp/phonon_mplayer1.0.0clean:compiler_clean -$(DEL_FILE) $(OBJECTS)-$(DEL_FILE) *~ core *.core####### Sub-librariesdistclean: clean-$(DEL_FILE) $(TARGET) -$(DEL_FILE) Makefilecheck: firstmocclean: compiler_moc_header_clean compiler_moc_source_cleanmocables: compiler_moc_header_make_all compiler_moc_source_make_allcompiler_moc_header_make_all: moc_MyProcess.cpp moc_MPlayerProcess.cpp moc_WidgetNoPaintEvent.cpp moc_MPlayerVideoWidget.cpp moc_Backend.cpp moc_MediaObject.cpp moc_MediaController.cpp moc_VideoWidget.cpp moc_AudioOutput.cpp moc_EffectManager.cpp moc_Effect.cpp moc_SinkNode.cpp moc_SeekStack.cppcompiler_moc_header_clean:-$(DEL_FILE) moc_MyProcess.cpp moc_MPlayerProcess.cpp moc_WidgetNoPaintEvent.cpp moc_MPlayerVideoWidget.cpp moc_Backend.cpp moc_MediaObject.cpp moc_MediaController.cpp moc_VideoWidget.cpp moc_AudioOutput.cpp moc_EffectManager.cpp moc_Effect.cpp moc_SinkNode.cpp moc_SeekStack.cppmoc_MyProcess.cpp: libmplayer/MyProcess.h/usr/bin/moc-qt4 $(DEFINES) $(INCPATH) libmplayer/MyProcess.h -o moc_MyProcess.cppmoc_MPlayerProcess.cpp: libmplayer/MyProcess.h \libmplayer/MediaData.h \libmplayer/MPlayerProcess.h/usr/bin/moc-qt4 $(DEFINES) $(INCPATH) libmplayer/MPlayerProcess.h -o moc_MPlayerProcess.cppmoc_WidgetNoPaintEvent.cpp: libmplayer/WidgetNoPaintEvent.h/usr/bin/moc-qt4 $(DEFINES) $(INCPATH) libmplayer/WidgetNoPaintEvent.h -o moc_WidgetNoPaintEvent.cppmoc_MPlayerVideoWidget.cpp: libmplayer/WidgetNoPaintEvent.h \libmplayer/MPlayerVideoWidget.h/usr/bin/moc-qt4 $(DEFINES) $(INCPATH) libmplayer/MPlayerVideoWidget.h -o moc_MPlayerVideoWidget.cppmoc_Backend.cpp: Backend.h/usr/bin/moc-qt4 $(DEFINES) $(INCPATH) Backend.h -o moc_Backend.cppmoc_MediaObject.cpp: MediaController.h \libmplayer/MPlayerProcess.h \libmplayer/MyProcess.h \libmplayer/MediaData.h \MediaObject.h/usr/bin/moc-qt4 $(DEFINES) $(INCPATH) MediaObject.h -o moc_MediaObject.cppmoc_MediaController.cpp: MediaController.h/usr/bin/moc-qt4 $(DEFINES) $(INCPATH) MediaController.h -o moc_MediaController.cppmoc_VideoWidget.cpp: SinkNode.h \VideoWidget.h/usr/bin/moc-qt4 $(DEFINES) $(INCPATH) VideoWidget.h -o moc_VideoWidget.cppmoc_AudioOutput.cpp: SinkNode.h \AudioOutput.h/usr/bin/moc-qt4 $(DEFINES) $(INCPATH) AudioOutput.h -o moc_AudioOutput.cppmoc_EffectManager.cpp: EffectManager.h/usr/bin/moc-qt4 $(DEFINES) $(INCPATH) EffectManager.h -o moc_EffectManager.cppmoc_Effect.cpp: SinkNode.h \EffectManager.h \Effect.h/usr/bin/moc-qt4 $(DEFINES) $(INCPATH) Effect.h -o moc_Effect.cppmoc_SinkNode.cpp: SinkNode.h/usr/bin/moc-qt4 $(DEFINES) $(INCPATH) SinkNode.h -o moc_SinkNode.cppmoc_SeekStack.cpp: MediaObject.h \MediaController.h \libmplayer/MPlayerProcess.h \libmplayer/MyProcess.h \libmplayer/MediaData.h \SeekStack.h/usr/bin/moc-qt4 $(DEFINES) $(INCPATH) SeekStack.h -o moc_SeekStack.cppcompiler_rcc_make_all:compiler_rcc_clean:compiler_image_collection_make_all: qmake_image_collection.cppcompiler_image_collection_clean:-$(DEL_FILE) qmake_image_collection.cppcompiler_moc_source_make_all:compiler_moc_source_clean:compiler_uic_make_all:compiler_uic_clean:compiler_yacc_decl_make_all:compiler_yacc_decl_clean:compiler_yacc_impl_make_all:compiler_yacc_impl_clean:compiler_lex_make_all:compiler_lex_clean:compiler_clean: compiler_moc_header_clean ####### CompileMyProcess.o: libmplayer/MyProcess.cpp libmplayer/MyProcess.h \libmplayer/LibMPlayerLogger.h$(CXX) -c $(CXXFLAGS) $(INCPATH) -o MyProcess.o libmplayer/MyProcess.cppMediaData.o: libmplayer/MediaData.cpp libmplayer/MediaData.h$(CXX) -c $(CXXFLAGS) $(INCPATH) -o MediaData.o libmplayer/MediaData.cppMediaSettings.o: libmplayer/MediaSettings.cpp libmplayer/MediaSettings.h$(CXX) -c $(CXXFLAGS) $(INCPATH) -o MediaSettings.o libmplayer/MediaSettings.cppMPlayerVersion.o: libmplayer/MPlayerVersion.cpp libmplayer/MPlayerVersion.h \libmplayer/MPlayerProcess.h \libmplayer/MyProcess.h \libmplayer/MediaData.h \libmplayer/LibMPlayerLogger.h$(CXX) -c $(CXXFLAGS) $(INCPATH) -o MPlayerVersion.o libmplayer/MPlayerVersion.cppMPlayerProcess.o: libmplayer/MPlayerProcess.cpp libmplayer/MPlayerProcess.h \libmplayer/MyProcess.h \libmplayer/MediaData.h \libmplayer/MPlayerVersion.h \libmplayer/MPlayerConfig.h \libmplayer/LibMPlayerLogger.h$(CXX) -c $(CXXFLAGS) $(INCPATH) -o MPlayerProcess.o libmplayer/MPlayerProcess.cppMPlayerLoader.o: libmplayer/MPlayerLoader.cpp libmplayer/MPlayerLoader.h \libmplayer/MPlayerProcess.h \libmplayer/MyProcess.h \libmplayer/MediaData.h \libmplayer/MediaSettings.h \libmplayer/MPlayerConfig.h \libmplayer/LibMPlayerLogger.h$(CXX) -c $(CXXFLAGS) $(INCPATH) -o MPlayerLoader.o libmplayer/MPlayerLoader.cppWidgetNoPaintEvent.o: libmplayer/WidgetNoPaintEvent.cpp libmplayer/WidgetNoPaintEvent.h \libmplayer/LibMPlayerLogger.h$(CXX) -c $(CXXFLAGS) $(INCPATH) -o WidgetNoPaintEvent.o libmplayer/WidgetNoPaintEvent.cppMPlayerVideoWidget.o: libmplayer/MPlayerVideoWidget.cpp libmplayer/MPlayerVideoWidget.h \libmplayer/WidgetNoPaintEvent.h \libmplayer/LibMPlayerLogger.h$(CXX) -c $(CXXFLAGS) $(INCPATH) -o MPlayerVideoWidget.o libmplayer/MPlayerVideoWidget.cppMPlayerConfig.o: libmplayer/MPlayerConfig.cpp libmplayer/MPlayerConfig.h \libmplayer/LibMPlayerLogger.h$(CXX) -c $(CXXFLAGS) $(INCPATH) -o MPlayerConfig.o libmplayer/MPlayerConfig.cppBackend.o: Backend.cpp Backend.h \MediaObject.h \MediaController.h \libmplayer/MPlayerProcess.h \libmplayer/MyProcess.h \libmplayer/MediaData.h \VideoWidget.h \SinkNode.h \AudioOutput.h \EffectManager.h \Effect.h \PhononMPlayerLogger.h$(CXX) -c $(CXXFLAGS) $(INCPATH) -o Backend.o Backend.cppMediaObject.o: MediaObject.cpp MediaObject.h \MediaController.h \libmplayer/MPlayerProcess.h \libmplayer/MyProcess.h \libmplayer/MediaData.h \SeekStack.h \PhononMPlayerLogger.h \libmplayer/MPlayerLoader.h \libmplayer/MediaSettings.h$(CXX) -c $(CXXFLAGS) $(INCPATH) -o MediaObject.o MediaObject.cppMediaController.o: MediaController.cpp MediaController.h \PhononMPlayerLogger.h \libmplayer/MPlayerLoader.h \libmplayer/MPlayerProcess.h \libmplayer/MyProcess.h \libmplayer/MediaData.h$(CXX) -c $(CXXFLAGS) $(INCPATH) -o MediaController.o MediaController.cppVideoWidget.o: VideoWidget.cpp VideoWidget.h \SinkNode.h \MediaObject.h \MediaController.h \libmplayer/MPlayerProcess.h \libmplayer/MyProcess.h \libmplayer/MediaData.h \PhononMPlayerLogger.h \libmplayer/MPlayerVideoWidget.h \libmplayer/WidgetNoPaintEvent.h$(CXX) -c $(CXXFLAGS) $(INCPATH) -o VideoWidget.o VideoWidget.cppAudioOutput.o: AudioOutput.cpp AudioOutput.h \SinkNode.h \MediaObject.h \MediaController.h \libmplayer/MPlayerProcess.h \libmplayer/MyProcess.h \libmplayer/MediaData.h \libmplayer/MPlayerLoader.h \libmplayer/MediaSettings.h$(CXX) -c $(CXXFLAGS) $(INCPATH) -o AudioOutput.o AudioOutput.cppEffectManager.o: EffectManager.cpp EffectManager.h$(CXX) -c $(CXXFLAGS) $(INCPATH) -o EffectManager.o EffectManager.cppEffect.o: Effect.cpp Effect.h \SinkNode.h \EffectManager.h \MediaObject.h \MediaController.h \libmplayer/MPlayerProcess.h \libmplayer/MyProcess.h \libmplayer/MediaData.h \libmplayer/MPlayerLoader.h \libmplayer/MediaSettings.h$(CXX) -c $(CXXFLAGS) $(INCPATH) -o Effect.o Effect.cppSinkNode.o: SinkNode.cpp SinkNode.h \MediaObject.h \MediaController.h \libmplayer/MPlayerProcess.h \libmplayer/MyProcess.h \libmplayer/MediaData.h \PhononMPlayerLogger.h$(CXX) -c $(CXXFLAGS) $(INCPATH) -o SinkNode.o SinkNode.cppSeekStack.o: SeekStack.cpp SeekStack.h \MediaObject.h \MediaController.h \libmplayer/MPlayerProcess.h \libmplayer/MyProcess.h \libmplayer/MediaData.h \PhononMPlayerLogger.h$(CXX) -c $(CXXFLAGS) $(INCPATH) -o SeekStack.o SeekStack.cppmoc_MyProcess.o: moc_MyProcess.cpp $(CXX) -c $(CXXFLAGS) $(INCPATH) -o moc_MyProcess.o moc_MyProcess.cppmoc_MPlayerProcess.o: moc_MPlayerProcess.cpp $(CXX) -c $(CXXFLAGS) $(INCPATH) -o moc_MPlayerProcess.o moc_MPlayerProcess.cppmoc_WidgetNoPaintEvent.o: moc_WidgetNoPaintEvent.cpp $(CXX) -c $(CXXFLAGS) $(INCPATH) -o moc_WidgetNoPaintEvent.o moc_WidgetNoPaintEvent.cppmoc_MPlayerVideoWidget.o: moc_MPlayerVideoWidget.cpp $(CXX) -c $(CXXFLAGS) $(INCPATH) -o moc_MPlayerVideoWidget.o moc_MPlayerVideoWidget.cppmoc_Backend.o: moc_Backend.cpp $(CXX) -c $(CXXFLAGS) $(INCPATH) -o moc_Backend.o moc_Backend.cppmoc_MediaObject.o: moc_MediaObject.cpp $(CXX) -c $(CXXFLAGS) $(INCPATH) -o moc_MediaObject.o moc_MediaObject.cppmoc_MediaController.o: moc_MediaController.cpp $(CXX) -c $(CXXFLAGS) $(INCPATH) -o moc_MediaController.o moc_MediaController.cppmoc_VideoWidget.o: moc_VideoWidget.cpp $(CXX) -c $(CXXFLAGS) $(INCPATH) -o moc_VideoWidget.o moc_VideoWidget.cppmoc_AudioOutput.o: moc_AudioOutput.cpp $(CXX) -c $(CXXFLAGS) $(INCPATH) -o moc_AudioOutput.o moc_AudioOutput.cppmoc_EffectManager.o: moc_EffectManager.cpp $(CXX) -c $(CXXFLAGS) $(INCPATH) -o moc_EffectManager.o moc_EffectManager.cppmoc_Effect.o: moc_Effect.cpp $(CXX) -c $(CXXFLAGS) $(INCPATH) -o moc_Effect.o moc_Effect.cppmoc_SinkNode.o: moc_SinkNode.cpp $(CXX) -c $(CXXFLAGS) $(INCPATH) -o moc_SinkNode.o moc_SinkNode.cppmoc_SeekStack.o: moc_SeekStack.cpp $(CXX) -c $(CXXFLAGS) $(INCPATH) -o moc_SeekStack.o moc_SeekStack.cpp####### Installinstall: FORCEuninstall: FORCEFORCE:
修改完成,编译通过
将生成的
libphonon_backend.so复制到目标板/plugins/phonon_backend中
运行示例程序,没有播放成功,但是界面上显示的播放器的黑框
P_LOGGER Backend.cpp 180 Phonon-MPlayer objectDescriptionIndexes
QP_LOGGER Backend.cpp 212 Phonon-MPlayer objectDescriptionProperties
QP_LOGGER Backend.cpp 180 Phonon-MPlayer objectDescriptionIndexes
QP_LOGGER Backend.cpp 212 Phonon-MPlayer objectDescriptionProperties
QP_LOGGER VideoWidget.cpp 70 Phonon-MPlayer setAspectRatio Aspect ratio: 0
QP_LOGGER MediaController.cpp 356 Phonon-MPlayer subtitleAdded
QP_LOGGER MediaController.cpp 396 Phonon-MPlayer subtitleChanged New current subtitle: “None”
QP_LOGGER Backend.cpp 256 Phonon-MPlayer startConnectionChange
QP_LOGGER Backend.cpp 258 Phonon-MPlayer startConnectionChange Node: Phonon::MPlayer::AudioOutput
QP_LOGGER Backend.cpp 258 Phonon-MPlayer startConnectionChange Node: Phonon::MPlayer::MediaObject
QP_LOGGER Backend.cpp 268 Phonon-MPlayer connectNodes Phonon::MPlayer::MediaObject Phonon::MPlayer::AudioOutput
QP_LOGGER Backend.cpp 329 Phonon-MPlayer endConnectionChange
QP_LOGGER Backend.cpp 331 Phonon-MPlayer endConnectionChange Node: Phonon::MPlayer::AudioOutput
QP_LOGGER Backend.cpp 331 Phonon-MPlayer endConnectionChange Node: Phonon::MPlayer::MediaObject
QP_LOGGER Backend.cpp 256 Phonon-MPlayer startConnectionChange
QP_LOGGER Backend.cpp 258 Phonon-MPlayer startConnectionChange Node: Phonon::MPlayer::VideoWidget
QP_LOGGER Backend.cpp 258 Phonon-MPlayer startConnectionChange Node: Phonon::MPlayer::MediaObject
QP_LOGGER Backend.cpp 268 Phonon-MPlayer connectNodes Phonon::MPlayer::MediaObject Phonon::MPlayer::VideoWidget
QP_LOGGER Backend.cpp 329 Phonon-MPlayer endConnectionChange
QP_LOGGER Backend.cpp 331 Phonon-MPlayer endConnectionChange Node: Phonon::MPlayer::VideoWidget
QP_LOGGER Backend.cpp 331 Phonon-MPlayer endConnectionChange Node: Phonon::MPlayer::MediaObject
Object::connect: No such signal UartCommunicationThread::ReceivedData(char* pDataBuf) in …/NexterController/mainwindow.cpp:61
Object::connect: (receiver name: ‘MainWindow’)
QP_LOGGER MediaObject.cpp 344 Phonon-MPlayer setSource Source: “/media/testVideo.mp4”
QP_LOGGER MediaObject.cpp 184 Phonon-MPlayer loadMedia “/media/testVideo.mp4”
QP_LOGGER libmplayer/MPlayerConfig.cpp 40 LibMPlayer MPlayerConfig Config file: “/Settings/phonon-mplayer/phonon-mplayer.conf”
QP_LOGGER libmplayer/MyProcess.cpp 69 LibMPlayer start Process started: “mplayer” “quarkplayerfakename”
QP_LOGGER libmplayer/MyProcess.cpp 155 LibMPlayer error QProcess::FailedToStart
QP_LOGGER libmplayer/MPlayerLoader.cpp 108 LibMPlayer startMPlayerVersion MPlayer process couldn’t start
QP_LOGGER MediaObject.cpp 105 Phonon-MPlayer play
QP_LOGGER MediaController.cpp 356 Phonon-MPlayer subtitleAdded
QP_LOGGER MediaController.cpp 396 Phonon-MPlayer subtitleChanged New current subtitle: “None”
QP_LOGGER libmplayer/MPlayerLoader.cpp 143 LibMPlayer readMediaSettings
QP_LOGGER libmplayer/MPlayerLoader.cpp 238 LibMPlayer readMediaSettings Could not use MPlayer volume command line, your MPlayer version is too old: -1
QP_LOGGER libmplayer/MPlayerLoader.cpp 304 LibMPlayer readMediaSettings Could not disable MPlayer key bindings (shortcuts), your MPlayer version is too old: -1
QP_LOGGER libmplayer/MyProcess.cpp 63 LibMPlayer start
QP_LOGGER libmplayer/MyProcess.cpp 64 LibMPlayer start
QP_LOGGER libmplayer/MyProcess.cpp 65 LibMPlayer start
QP_LOGGER libmplayer/MyProcess.cpp 69 LibMPlayer start Process started: “mplayer” “-noquiet -slave -identify -msglevel demux=6 -framedrop -nokeepaspect -zoom -colorkey 0x02 -monitorpixelaspect 1 -contrast 0 -brightness 0 -hue 0 -saturation 0 -prefer-ipv4 -ass -embeddedfonts -nomouseinput -sub-fuzziness 1 -include ~/.mplayer/config -wid 4294966284 /media/testVideo.mp4”
QP_LOGGER libmplayer/MyProcess.cpp 155 LibMPlayer error QProcess::FailedToStart
QP_LOGGER MediaObject.cpp 492 Phonon-MPlayer stateChangedInternal ErrorState
QP_LOGGER libmplayer/MPlayerLoader.cpp 70 LibMPlayer start MPlayer process couldn’t start
QP_LOGGER libmplayer/MPlayerVideoWidget.cpp 68 LibMPlayer resizeEvent Resize: QSize(641, 471)
继续查找原因,通过分析输出信息,感觉虽然phonon_backend建立了phonon和mplayer的连接,但是还缺一个最为重要的前端播放器。
先试验给板子安装一个Mplayer播放器上去,请关注后续文章。
参考
/laoyang1018/article/details/11664159
/openusb/p/3621646.html
/michaelsrc/article/details/6399333
/sankye/p/4638437.html
/yangxuan12580/article/details/51658714