技术控

    今日:0| 主题:63445
收藏本版 (1)
最新软件应用技术尽在掌握

[其他] WebRTC in WebKit/WPE

[复制链接]
臸仯鮟靜ら 发表于 2016-10-4 09:13:34
150 0
For some time I worked atIgalia to enable    WebRTCon    WebKitForWaylandor    WPEfor the    Raspberry Pi 2.  
  The goal was to have the    WebKit WebRTC testsworking for a demo. My fellow IgalianAlex was working on the platform itself in WebKit and assisting with some tuning for the Pi on WebKit but the main work needed to be done in    OpenWebRTC.  
  My other fellow IgalianPhilhad begun a branch to work on this that was half way with some workarounds. My first task was getting into combat/workaround mode and make OpenWebRTC work with compressed streams from    gst-rpicamsrc. OpenWebRTC supported only raw video streams and that Raspberry Pi Cam module GStreamer element provides only H264 encoded ones. I moved some encoders and parsers around, some caps modifications, removed some elements that didn’t work on the Pi and made it work eventually. You can see the result at:  
      To make this work by yourselves you needed a      custom branch of Buildrootwhere you could build with the proper plugins enabled also selected the appropriate branches in WPE and      OpenWebRTC.   
    Unfortunately the work was far from being finished so I continued the effort to try to make the arch changes in OpenWebRTC have production quality and that meant do some tasks step by step:
   
          
  •         Rework the video orientation code: The workaround deactivated it as so far it was being done in GStreamer. In the case of        rpicamsrcthat can be done by the hardware itself so I cooked a        GStreamer interfaceto enable rotation the same way it was done for the [gl]videoflip elements. The idea would be deprecate the original ones and use the new interface. These landed both in        videoflipand        glvideoflip. Of course I also implemented it on gst-rpicamsrc        hereand        hereand eventually in OpenWebRTC sources.      
  •         Rework video flip: Once OpenWebRTC sources got orientation support, I could rework the flip both for local and remote feeds.      
  •         Add gl{down|up}load elements back: There were some issues with the gl elements to upload and download textures, which we had removed. I readded them again.      
  •         Reworked bins linking: In OpenWebRTC there are some bins that are created to perform some tasks and depending on different circumstances you add or not some elements. I reworked the way those elements are linked so that we don’t have to take into account all the use cases to link them. Now this is easier as the elements are linked as they are the added to the bin.      
  •         Reworked the renderer_disabled: As in the case for orientation, some elements such as gst-rpicamsrc are able to change color and balance so I added support for that to avoid having that done by GStreamer elements if not necessary. In this case the proper interfaces were already there in GStreamer.      
  •         Moved the decoding/parsing from the source to the renderer: Before our changes the source was parsing/decoding the remote feeds, local sources were not decoded, just raw was supported. Our workarounds made the local sources decode too but this was not working for all cases. So why decoding at the sources when GStreamer has caps and you can just chain all that to the renderers? So I did eventually, I moved the parsing/decoding to the renderers. This took fixing all the caps negotiation from sources to renderers. Unfortunatelly I think I broke audio on the way, but surely nothing difficult to fix.   
    This is still a work in progress and now I am changing tasks and handing this over back to my fellow Igalians      Phil, who I am sure will do an awesome job together with      Alex.
我要投稿

推荐阅读


回页顶回复上一篇下一篇回列表
手机版/c.CoLaBug.com ( 粤ICP备05003221号 | 粤公网安备 44010402000842号 )

© 2001-2017 Comsenz Inc.

返回顶部 返回列表