Qt WebRTC demo
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 patch against the WebRTC source tree (I used revision 5628).
- First, do the 'gclient config' and 'gclient sync' steps as described on that page.
- Apply the patch
- Go to the
trunk/talk/examples/qtwebrtc_texteditdirectory and run therunme.shscript (runs theuicandmoccommands, I didn't figure out how to do this in the gyp file) - Run the
./webrtc/build/gyp_webrtccommand to generate the ninja build files - Run ninja to build everything
- A tarball containing a qmake project file to build everything.
- Make sure you've got WebRTC compiled somewhere.
- Extract the tarball somewhere
- 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 modified peerconnection code available, it really helped getting me started using the native WebRTC library.
from:http://research.edm.uhasselt.be/jori/page/Misc/QtWebRTC.html
Qt WebRTC demo的更多相关文章
- WebRTC Demo - getUserMedia()
WebRTC介绍 WebRTC提供三类API: MediaStream,即getUserMedia RTCPeerConnection RTCDataChannel getUserMedia已经由Ch ...
- am335x Qt SocketCAN Demo hacking
/*********************************************************************************** * am335x Qt Soc ...
- qt的demo中,经常可以看到emum
最近开始看QT的文档,发现了很多好东西,至少对于我来说 收获很多~~~ 当然很多东西自己还不能理解的很透彻,也是和朋友讨论以后才渐渐清晰的,可能对于QT中一些经典的用意我还是存在会有些认识上的偏差,欢 ...
- Qt: 时钟Demo
其实是一个很简单的Demo,可以编译了拿NSIS打包.最近在做富文本编辑器和补C++不记得的东西吧,项目遥遥无期. //clock.pro #----------------------------- ...
- QT Linux Demo程序编译
我手上的qt源码包为:qt-everywhere-opensource-src-4.7.0.tar.gz 在Linux下编译比较容易,解压后直接 ./configure,一般会报缺少什么库这些.自己遇 ...
- Qt+ECharts开发笔记(三):ECharts的柱状图介绍、基础使用和Qt封装Demo
前言 上一篇成功是EChart随着Qt窗口变化而变化,本篇将开始正式介绍柱状图介绍.基础使用,并将其封装一层Qt. 本篇的demo实现了隐藏js代码的方式,实现了一个条形图的基本交互方式,即Qt ...
- Qt+ECharts开发笔记(五):ECharts的动态排序柱状图介绍、基础使用和Qt封装Demo
前言 上一篇的demo使用隐藏js代码的方式,实现了一个饼图的基本交互方式,并预留了Qt模块对外的基础接口. 本篇的demo实现了自动排序的柱状图,实现了一个自动排序柱状图的基本交互方式,即Qt ...
- webRTC demo
准备: 信令服务 前端页面用于视频通话 demo github 地址. 前端页面 为了使 demo 尽量简单,功能页面如下,即包含登录.通过对方手机号拨打电话的功能.在实际生成过程中,未必使用的手机号 ...
- RPi:QT+wiringPi demo程序
一个项目里面要用到这玩意儿,网上查了几篇文章凑出来最后还是不行,自己灵机一动就成了. 今天再次搜索的时候,发现另一篇文章已经讲明白了,真是欲哭无泪 程序大部分参考的是之前学qt的摸索出来的,其实只要在 ...
随机推荐
- 在eclipse下使用maven的配置
1 2 3 4 5 6 7 8 public class Shifty { public static void main(String[] args) { int i = 0 ...
- 分享:JAVA各种对象
PO:持久对象 (persistent object),po(persistent object)就是在Object/Relation Mapping框架中的Entity,po的每个属性基本上都对应数 ...
- 判断浏览器是否支持某一个CSS3属性
判断浏览器是否支持某一个CSS3属性 function supportCss3(style) { var prefix = ['webkit', 'Moz', 'ms', 'o'], i, humpS ...
- Three.js基础:建立Cube并实现鼠标交互,动画旋转
index.html文件: <!DOCTYPE html> <html> <head> <meta charset="utf-8"> ...
- H5滑动穿透(TODO)
https://github.com/pod4g/tool/wiki/%E7%A7%BB%E5%8A%A8%E7%AB%AF%E6%BB%9A%E5%8A%A8%E7%A9%BF%E9%80%8F%E ...
- HyperV创建NAT网络
创建NAT内部网络,使用PowerShell完成. https://docs.microsoft.com/zh-cn/virtualization/hyper-v-on-windows/user-gu ...
- CSS3的transition和transform
CSS3中的transition和transform是制作HTML5动画一定要使用到的两个属性. 注:这篇文章不考虑兼容性,只讨论webkit核心的浏览器.所以本文的所有例子请用chrome,safa ...
- 【scala】迭代器
如何访问集合呢?我们首先想到的是使用for循环来访问,还有一种方法是通过迭代器来访问. 在Scala中,迭代器(Iterator)不是一个集合,但是,提供了访问集合的一种方法. 迭代器包含两个基本的操 ...
- oracle-12514 or 12520 监听程序无法为请求的服务器类型找到可用的处理程序
(转自:http://blog.csdn.net/wshl1234567/article/details/8003154) 在项目过程中,测试程序的时候数据库经常报错,经过几天的判断和分析,发现一个规 ...
- button出现投影
style="?android:attr/borderlessButtonStyle" xml中加上这属性