zoukankan      html  css  js  c++  java
  • 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:

     
    • patch against the WebRTC source tree (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
       
    • tarball containing a qmake project file to build everything.
       
      1. Make sure you've got WebRTC 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 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

  • 相关阅读:
    BZOJ 2743: [HEOI2012]采花( 离线 + BIT )
    BZOJ 1031: [JSOI2007]字符加密Cipher( 后缀数组 )
    BZOJ 1717: [Usaco2006 Dec]Milk Patterns 产奶的模式( 二分答案 + 后缀数组 )
    HDU 2602 Find a way BFS搜索
    HDU 1495 非常可乐 BFS搜索
    UVA 11624 Fire! BFS搜索
    FZU2150 Fire Game BFS搜索
    POJ3414 Pots BFS搜素
    POJ3087 Shuffle'm Up 简单模拟
    POJ 3126 Prime Path BFS搜索
  • 原文地址:https://www.cnblogs.com/lidabo/p/8649473.html
Copyright © 2011-2022 走看看