openrtmfp+action script +flash builder搭建P2p视频服务器
先推荐个手机客户端,《爱秀宝宝》,分享您宝宝的照片http://www.ishowbb.net? 吹裙游戏web版,http://www.chuiqun.com 1,首先须参考adobe网站搭建起官方flash模型 http://labs.adobe.com/technologies/cirrus/samples/ 上面有源码和开发文章, 注意,有些xp系统不支持摄像头,需要注释掉以下代码 2,根据官方文章搭建cgi服务器 apache 虚拟机配置如下 ?
<VirtualHost *:80>
? ? ?ServerAdmin lvhl@dsp.ac.cn
? ? ?DocumentRoot "/var/www/html/python"
? ? ?ServerName py.eyooworld.com.cn
? ? ?ServerAlias py.eyooworld.com.cn
? ? ?ScriptAlias /cgi-bin/ /var/www/html/python/cgi-bin/
? ? ?ErrorLog "/var/log/httpd/py-error_log"
? ? ?CustomLog "/var/log/httpd/py-access_log" common
? ? ?RewriteEngine ? ? ? On
? ? ?RewriteLogLevel ?4
? ? <Location />
? ? ? ? ?DirectoryIndex ?index.py
? ? ? ? ?Order allow,deny
? ? ? ? ?Allow from all
? ? ?</Location>
</VirtualHost>
文件目录如下:
[wisetrip@wisetrip06 python]$ find
.
./cgi-bin
./cgi-bin/reg.cgi
./cgi-bin/crossdomain.xml
./cgi-bin/registrations.db
./crossdomain.xml
安装python,sqlite-3.3.6-5.x86_64.rpm等软件包
?
[wisetrip@wisetrip06 python]$ vi crossdomain.xml?
?
<cross-domain-policy>
<allow-access-from domain="*" />
</cross-domain-policy>
修改reg.cgi
?
? sqlite3命令创建registrations.db 3,在本地安装flash builder4.5, 修改菜单“项目“》属性》flex编译器,版本为10.3.0 ? 修改develop key和url地址 ? 测试应该可以实现视频 4,按照https://github.com/OpenRTMFP/Cumulus?编译安装openRtmfp ? Linux下编译OpenRTMFPOpenRTMFP是一个开源的Flash P2P服务器。废话少说,咱们一步一步来编译。 ? 5,编写main.lua如下,放到CumulusServer/www/main.lua ? function onConnection(client,response,...) ? ? function relay(targetId,...) ? ? ? ? identi,action = unpack(arg) ? ? ? ? target = cumulus.clients(identi) ? ? ? ? if not target then ? ? ? ? ? ? error("client '"..targetId.."' not found") ? ? ? ? return ? ? ? ? end? ? ? ? ? target.writer:writeAMFMessage("onRelay",client.id,action,"kk") ? ? ? ? target.writer:flush(true) ? ? end? end ? 即可运行 (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |