博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
Qt WebRTC demo
阅读量:6909 次
发布时间:2019-06-27

本文共 2177 字,大约阅读时间需要 7 分钟。

This is a very simple demonstration of how to stream from a native application to the browser using WebRTC.

But first, a small demonstration of how a call is set up in WebRTC. A call is established by exchanging SDP and ICE information using some unspecified method. In the movie below, I simply copy-paste the required information from a 'sender' web page to a 'receiver' web page. The sender is the one that captures the webcam and streams it to the receiver where it is displayed in a video tag.

(best viewed full screen)

If you'd like to try this yourself, these are the pages:

I've noticed that the copy-pasting needs to be done rather swiftly to get it to work.

Although my hand waving skills are undoubtedly very impressive, it would be great to be able to stream something else to the browser. The following video demonstrates a small native Qt application which streams the contents of a widget to a browser. The call set up is still done using the copy-paste technique, to keep the code in the application to a minimum.

The source of this application is available in two formats:

 
  • A  against the  (I used revision 5628).
     
    1. First, do the 'gclient config' and 'gclient sync' steps as described on that page.
    2. Apply the patch
    3. Go to the trunk/talk/examples/qtwebrtc_textedit directory and run the runme.sh script (runs the uic and moc commands, I didn't figure out how to do this in the gyp file)
    4. Run the ./webrtc/build/gyp_webrtc command to generate the ninja build files
    5. Run ninja to build everything
     
  • A  containing a qmake project file to build everything.
     
    1. Make sure you've got  compiled somewhere.
    2. Extract the tarball somewhere
    3. Run 'qmake WEBRTCTRUNK=/path/to/webrtc/trunk' and make

Although the source code itself probably also works in Windows, I've only tested it on Linux and the patch/qmake file are Linux specific. For the qmake project, you may need to remove some libraries or add some extra libraries, depending on the WebRTC build settings on your platform. The project file is for Qt 5.

Big thanks to Kam for making the  available, it really helped getting me started using the native WebRTC library.

 

from:http://research.edm.uhasselt.be/jori/page/Misc/QtWebRTC.html

转载地址:http://lyfcl.baihongyu.com/

你可能感兴趣的文章
【Linux系统编程】普通用户绑定(bind)特权端口
查看>>
代码编辑器Sublime_Text3的使用
查看>>
Docker Stack 部署web集群
查看>>
thinkphp源码分析(一)—开门篇
查看>>
猫叔产品读记 | 如何更好的玩转补贴、阿里入股B站商业化变现、儿童口腔市场怎么样?(3期)...
查看>>
Worse Is Better 思想的发展史
查看>>
力软移动框架 ionic cordova插件jpush-phonegap-plugin 极光推送配置方法 vs2017
查看>>
Will it finally: 关于 try/catch 的一些细节
查看>>
浅谈RPC
查看>>
翻译: Spring Cloud Feign使用文档
查看>>
vue-cli2 构建速度优化
查看>>
力扣(LeetCode)310
查看>>
Vue CLI 3 更改已经使用vue create 创建的项目的css pre-processor,添加stylus
查看>>
详解利用clear清除浮动的一些问题解决
查看>>
css浮动及其危害和解决方法
查看>>
【译】Go和WebAssembly:在浏览器中运行Go程序
查看>>
解决Linux下使用pm2运行nuxt2.0,IP+端口访问不了
查看>>
snabbdom源码解析(四) patch 方法
查看>>
Spring Boot项目使用maven-assembly-plugin根据不同环境打包成tar.gz或者zip
查看>>
《Redis入门指南(第2版)》摘要
查看>>