bate2000的个人空间 https://blog.eetop.cn/bate [收藏] [复制] [分享] [RSS]

空间首页 动态 记录 日志 相册 主题 分享 留言板 个人资料

日志

VOD视频点播系统(七)

已有 1333 次阅读| 2008-3-25 22:28 |个人分类:VOD

5)利用上面制作的交叉工具链移植QTE

   

GUI程序

1 移植Qtopia-2.2.0

2 vod客户端程序

 

1 移植Qtopia-2.2.0

环境:操作系统: red hat as4

      交叉工具链:my-3.3.2.tar.bz2,这里所使用的工具链是GUN交叉工具链实验中制作出来的工具链。

 

建立工作目录:

mkdir /root/build_qtopia

cd /root/build_qtopia

 

下载源码:

wgetc http://www.qtopia.org.cn/ftp/mirror/ftp.trolltech.com/qtopia/source/qtopia-free-src-2.2.0.tar.gz

 

解压源码:

tar zxvf qtopia-free-src-2.2.0.tar.gz

cd qtopia-free-2.2.0

 

修改源码

1 chmod /qtopia/mkspecs/qws/linux-arm-g++/qmake.conf

vi qtopia/mkspecs/qws/linux-arm-g++/qmake.conf

    将此行

    QMAKE_LIBS_QT = -lqte P

    修改为 =9

    QMAKE_LIBS_QT = -lqte -lpng -lz -luuid ljpeg

2 vi qtopia/src/qt/qconfig-qpe.h

加上

#define QT_QWS_IPAQ

#define QT_QWS_IPAQ_RAW

 

3 cp qtopia/src/qt/qconfig-qpe.h qt2/src/tools/qconfig-local.h !

  cd qtopia/src/libraries/qtopia

 cp custom-linux-ipaq-g++.cpp custom-linux-arm-g++.cpp

 cp custom-linux-ipaq-g++.h custom-linux-arm-g++.h

 

配置编译:

cd /root/build_qtopia/

./configure -qte "-embedded \

       -no-xft \

       -qconfig local \

       -depths 4,8,16,32 \

       -no-qvfb \

       -system-jpeg \

       -gif -release \

       -platform. 'linux-g++' \

       -xplatform. 'linux-arm-g++'" \

    -qpe " -edition pda \

       -displaysize 240x320 \

       -no-qtopiadesktop -release -platform. 'linux-g++' \

       -xplatform. 'linux-arm-g++'"

export PATH=/usr/local/arm/my-3.3.2/bin:$PATH

make

make install

编译安装完之后,在qtopia/image/opt/Qtopia目录就是移植到开发板的目录;

6vod界面的编写和移植

vod客户端程序主要用Qsocketdevice从服务器端取得影片名称和影片地址,关键代码如下:

刷新列表部分:

 

而点击播放按钮调用mplayer播放关键代码如以下:

 

主要是通过fork出一个子进程用execl调用mplayer播放。Mplayerframebuffer模式下的播放请用mplayer help察看相关参数。最后将vod客户端通过qte库交叉编译,放入文件系统中去。

举例来说:客户想点播位于192.168.0.1上的matrix.mpeg文件(这个文件应该位于IIS所指定的目录下,如C:\Downloads)先在服务器上执行c:\>server.exe C:\Downloads,而后再目标及上打开vod客户端。与目录服务器进行连接取得该电影的影片信息以及地址

(http:// 192.168.0.1:80/matrix.mpeg),此时客户点击播放vod客户端立即调用mplayer播放器进行播放(即执行mplayer http:// 192.168.0.1:80/matrix.mpeg).此时出现视频画面。

客户端程序的移植参考qtopia移植文档的《Qtopia1.7.0移植到s3c2410过程》,《移植qtopia-2.2.0经过》两篇文档。

7)编写启动脚本

     启动教本和配置文件存放在构建根文件系统的”/etc”目录下,内核启动的最后要启动根文件系统的/sbin/init程序,init程序会读取/etc/inittab文件,根据inittab文件的内容,决定启动软件的流程;

l         /etc/inittab文件:

#my inittab file

#first: run the system script. file

::sysinit:/etc/init.d/rcS

#second:run the local script. file

::once:/etc/rc.local

#third run the bash shell prosecc

::respawn:/bin/bash

#restart init process

::restart:/sbin/init

#umount all file system

::shutdown:/bin/umount -a -r

 

VOD视频点播系统(八)

 


点赞

评论 (0 个评论)

facelist

您需要登录后才可以评论 登录 | 注册

  • 关注TA
  • 加好友
  • 联系TA
  • 0

    周排名
  • 0

    月排名
  • 0

    总排名
  • 0

    关注
  • 1

    粉丝
  • 0

    好友
  • 0

    获赞
  • 6

    评论
  • 104

    访问数
关闭

站长推荐 上一条 /1 下一条

小黑屋| 关于我们| 联系我们| 在线咨询| 隐私声明| EETOP 创芯网
( 京ICP备:10050787号 京公网安备:11010502037710 )

GMT+8, 2024-5-29 07:13 , Processed in 0.028827 second(s), 15 queries , Gzip On, Redis On.

eetop公众号 创芯大讲堂 创芯人才网
返回顶部