GithubHelp home page GithubHelp logo

webrtc-universal-samples's Introduction

Web Real-Time Communications (WebRTC) samples for the Universal Windows Platform

This repo contains several example which demonstrate the use of WebRTC in Universal Windows Platform apps. The samples utilize the Microsoft WebRTC for UWP Nuget package and run on Desktop, Xbox & HoloLens devices.

Full WebRTC for UWP Source & Samples

The samples in this repository are a mirror of the full WebRTC UWP source which can be found below. For the most up to date samples, and the complete source for the WebRTC UWP port, please visit: https://github.com/webrtc-uwp

Samples

  • PeerConnection Client This is the recommended sample for getting started with WebRTC on UWP. It's a port of the WebRTC.org PeerConnection sample and is compatible with the same sample on iOS, Android, running in Chrome, etc. It also now includes Unity and Mixed-Reality Capture support for HoloLens.
  • ChatterBox Deprecated: This sample remains as a reference for a full VoIP implementation on UWP but is not actively maintained.

Universal Windows Platform development

These samples require Visual Studio 2015 and the Windows Software Development Kit (SDK) for Windows 10 to build, test, and deploy your Universal Windows Platform apps.

Get a free copy of Visual Studio 2015 Community Edition with support for building Universal Windows Platform apps

Additionally, to stay on top of the latest updates to Windows and the development tools, become a Windows Insider by joining the Windows Insider Program.

Become a Windows Insider

Using the samples

The easiest way to use these samples without using Git is to download the zip file containing the current version (using the following link or by clicking the "Download ZIP" button on the repo page). You can then unzip the entire archive and use the samples in Visual Studio 2015.

Download the samples ZIP

Notes:

  • Before you unzip the archive, right-click it, select Properties, and then select Unblock.
  • Be sure to unzip the entire archive, and not just individual samples. The samples all depend on the SharedContent folder in the archive.
  • In Visual Studio 2015, the platform target defaults to ARM, so be sure to change that to x64 or x86 if you want to test on a non-ARM device.

The samples use Linked files in Visual Studio to reduce duplication of common files, including sample template files and image assets. These common files are stored in the SharedContent folder at the root of the repository, and are referred to in the project files using links.

Reminder: If you unzip individual samples, they will not build due to references to other portions of the ZIP file that were not unzipped. You must unzip the entire archive if you intend to build the samples.

Contributions

We're interested to work with the community to make this repository as useful as possible. Please contact us about any contributions and we'll work with you to make them available here.

webrtc-universal-samples's People

Contributors

jamescadd avatar microsoft-github-policy-service[bot] avatar robin-raymond avatar samuelmarks avatar toxel avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

webrtc-universal-samples's Issues

Extracting Primitive Pose Data

Hi all!
I am wondering how the CameraProjectionTransform and CameraViewTransform can be extracted from the IMFSample* I have access to after following the necessary steps.
Help would be appreciated.

Question: Supporting selectable audio/video devices

The readme indicates that the current webrtc api does not support selecting the audio device (microphone/speaker).

Do you know when this is expected to be selectable? I would like to try creating a test app that uses an audio file to mimic the microphone (party a calls party b, party b answers automatically and plays back and audio file).

Thank you.

Cannot build WebRtcUnityD3D

Hi,

I'm unable to build the D3D Solution. After the build, the following is shown.
========== Rebuild All: 8 succeeded, 1 failed, 0 skipped ==========

I deployed the Unity D3D app to the Hololens. Using the PeerCC-sample on my desktop, I was able to see MRC content from the Hololens on the PeerCC desktop client, but was not able to see remote and local video in the Hololens Unity app. I'm assuming it's because of the incomplete D3D build. Any guidance would be helpful.

Here is the Output log when I build WebRtcUnityD3D using Release in x86 mode.

1>------ Rebuild All started: Project: WebRtc.Stats.Observer, Configuration: Release Win32 ------
2>------ Rebuild All started: Project: WebRtc.UWP.Native.Builder, Configuration: Release Win32 ------
3>------ Rebuild All started: Project: MediaEngineUWP, Configuration: Release Win32 ------
4>------ Rebuild All started: Project: WebRtcScheme, Configuration: Release Win32 ------
1>Running message compiler on ......\org\webrtc\stats\etw_providers.man
2>
2>�[92mRunning prepare script ...�[0m
2>
2>�[93mRunning script parameters:�[0m
2>�[93mTarget: webrtc�[0m
2>�[93mPlatform: x86�[0m
2>�[93mLog level: 4�[0m
2>�[93mPreparing webrtc development environment ...�[0m
2>�[93mPreparing development environment for x86 platform...�[0m
1>webrtc_stats_network_sender.cpp
1>webrtc_stats_observer.cpp
2>depotToolsPathCheck entered...
2>Python is present.
2>
2>�[92mRunning WebRTC prepare script ...�[0m
2>�[92m=================================�[0m
2>�[93mPreparing WebRTC development environment for x86 platform ...�[0m
2>Executing prepareWebRTC function
2>Pushed webrtc\xplatform\webrtc path
2>Executing generateChromiumFolders function
2>chromium\src folder already exists
2>chromium\src\tools folder already exists
3>MediaEngine.cpp
2>chromium\src\third_party folder already exists
2>chromium\src\third_party\winsdk_samples folder already exists
2>chromium\src\third_party\libjingle\source\talk\media\testdata\ folder already exists
2>third_party folder already exists
2>tools folder already exists
2>Executing makeJunctionLinks function
2>Path "buildtools" already exists
2>Path "build" already exists
4>SchemeHandler.cpp
2>Path "chromium\src\third_party\jsoncpp" already exists
2>Path "chromium\src\third_party\jsoncpp\source" already exists
2>Path "chromium\src\tools\protoc_wrapper" already exists
2>Path "chromium\src\third_party\protobuf" already exists
2>Path "chromium\src\third_party\yasm" already exists
2>Path "chromium\src\third_party\opus" already exists
2>Path "chromium\src\third_party\boringssl" already exists
2>Path "chromium\src\third_party\usrsctp" already exists
2>Path "chromium\src\third_party\libvpx" already exists
2>Path "chromium\src\third_party\libvpx\source\libvpx" already exists
2>Path "chromium\src\testing" already exists
2>Path "testing" already exists
2>Path "tools\protoc_wrapper" already exists
2>Path "third_party\yasm" already exists
2>Path "third_party\yasm\binaries" already exists
2>Path "third_party\yasm\source\patched-yasm" already exists
2>Path "third_party\opus" already exists
2>Path "third_party\opus\src" already exists
2>Path "third_party\boringssl" already exists
2>Path "third_party\boringssl\src" already exists
2>Path "third_party\usrsctp" already exists
2>Path "third_party\usrsctp\usrsctplib" already exists
2>Path "third_party\protobuf" already exists
2>Path "chromium\src\third_party\expat" already exists
2>Path "third_party\expat" already exists
2>Path "chromium\src\third_party\googletest" already exists
2>Path "third_party\googletest" already exists
2>Path "third_party\googletest\src" already exists
2>Path "third_party\libsrtp" already exists
2>Path "third_party\libvpx" already exists
2>Path "third_party\libyuv" already exists
2>Path "third_party\openmax_dl" already exists
2>Path "third_party\libjpeg_turbo" already exists
2>Path "third_party\jsoncpp" already exists
2>Path "third_party\winuwp_compat" already exists
2>Path "third_party\winuwp_h264" already exists
2>Path "third_party\gflags" already exists
2>Path "third_party\gflags\src" already exists
2>Path "third_party\winsdk_samples" already exists
2>Path "tools\gyp" already exists
2>Path "tools\clang" already exists
2> 1 file(s) copied.
2> 1 file(s) copied.
2> 1 file(s) copied.
2> 1 file(s) copied.
4> Creating library C:\ortclib\webrtc\windows\solutions\Build\Output\x86\Release\WebRtcScheme\WebRtcScheme.lib and object C:\ortclib\webrtc\windows\solutions\Build\Output\x86\Release\WebRtcScheme\WebRtcScheme.exp
4>Generating code
2>0> File buildtools\win\gn.exe exists and SHA1 matches. Skipping.
2>Success!
2>Downloading 1 files took 0.020000 second(s)
2>0> File buildtools\win\clang-format.exe exists and SHA1 matches. Skipping.
2>Success!
2>Downloading 1 files took 0.103000 second(s)
2>Executing generateProjects function
2>�[93mGenerating WebRTC projects for x86 platform ...�[0m
4>All 394 functions were compiled because no usable IPDB/IOBJ from previous compilation was found.
4>Finished generating code
2>out\winuwp_10_x86_debug folder already exists
2>Copied
3>C:\ortclib\common\windows\samples\PeerCC\MediaEnginePlayerPlugin\MediaEngineUWP\Shared\MediaEngine.cpp(15): warning C5043: 'SafeString::SafeString': exception specification does not match previous declaration
3>c:\ortclib\common\windows\samples\peercc\mediaengineplayerplugin\mediaengineuwp\shared\MediaEngine.h(192): note: see declaration of 'SafeString::SafeString'
3>MediaHelpers.cpp
3>MediaEnginePlayer.cpp
3>dllmain.cpp
4>WebRtcScheme.vcxproj -> C:\ortclib\webrtc\windows\solutions\Build\Output\x86\Release\WebRtcScheme\WebRtcScheme.dll
4>Target Plugin Path is C:\ortclib\common\windows\samples\PeerCC\MediaEnginePlayerPlugin\WebRtcScheme....\ClientUnity\Unity\PeerCCUnity\Assets
4>A subdirectory or file C:\ortclib\common\windows\samples\PeerCC\MediaEnginePlayerPlugin\WebRtcScheme....\ClientUnity\Unity\PeerCCUnity\Assets\Plugins already exists.
4>A subdirectory or file C:\ortclib\common\windows\samples\PeerCC\MediaEnginePlayerPlugin\WebRtcScheme....\ClientUnity\Unity\PeerCCUnity\Assets\Plugins\WSA already exists.
4>A subdirectory or file C:\ortclib\common\windows\samples\PeerCC\MediaEnginePlayerPlugin\WebRtcScheme....\ClientUnity\Unity\PeerCCUnity\Assets\Plugins\WSA\x86 already exists.
4> 1 file(s) copied.
4> 1 file(s) copied.
4> 1 file(s) copied.
5>------ Rebuild All started: Project: peerconnection_server, Configuration: Release Win32 ------
3>C:\ortclib\common\windows\samples\PeerCC\MediaEnginePlayerPlugin\MediaEngineUWP\Shared\dllmain.cpp(65): warning C4447: 'main' signature found without threading model. Consider using 'int main(Platform::ArrayPlatform::String^^ args)'.
3>C:\ortclib\common\windows\samples\PeerCC\MediaEnginePlayerPlugin\MediaEngineUWP\Shared\MediaEnginePlayer.cpp(324): warning C4244: '=': conversion from 'float' to 'LONG', possible loss of data
3>C:\ortclib\common\windows\samples\PeerCC\MediaEnginePlayerPlugin\MediaEngineUWP\Shared\MediaEnginePlayer.cpp(325): warning C4244: '=': conversion from 'float' to 'LONG', possible loss of data
3>C:\ortclib\common\windows\samples\PeerCC\MediaEnginePlayerPlugin\MediaEngineUWP\Shared\MediaEnginePlayer.cpp(472): warning C4244: 'argument': conversion from 'UINT32' to 'float', possible loss of data
3>C:\ortclib\common\windows\samples\PeerCC\MediaEnginePlayerPlugin\MediaEngineUWP\Shared\MediaEnginePlayer.cpp(487): warning C4244: 'argument': conversion from 'UINT32' to 'float', possible loss of data
3>C:\ortclib\common\windows\samples\PeerCC\MediaEnginePlayerPlugin\MediaEngineUWP\Shared\MediaEnginePlayer.cpp(769): warning C4244: '=': conversion from 'float' to 'LONG', possible loss of data
3>C:\ortclib\common\windows\samples\PeerCC\MediaEnginePlayerPlugin\MediaEngineUWP\Shared\MediaEnginePlayer.cpp(770): warning C4244: '=': conversion from 'float' to 'LONG', possible loss of data
3>C:\ortclib\common\windows\samples\PeerCC\MediaEnginePlayerPlugin\MediaEngineUWP\Shared\MediaEnginePlayer.cpp(771): warning C4244: '=': conversion from 'float' to 'LONG', possible loss of data
3>C:\ortclib\common\windows\samples\PeerCC\MediaEnginePlayerPlugin\MediaEngineUWP\Shared\MediaEnginePlayer.cpp(772): warning C4244: '=': conversion from 'float' to 'LONG', possible loss of data
5>ninja : error : unknown target './peerconnection_server.exe'
5>Cleaning... 0 files.
5>C:\ortclib\webrtc\windows\projects\msvc\PeerConectionServer\peerconnection_server.vcxproj(98,5): error MSB3073: The command "call C:\ortclib\webrtc\windows\projects\msvc\PeerConectionServer........\xplatform\depot_tools\ninja.exe -C C:\ortclib\webrtc\windows\projects\msvc\PeerConectionServer........\xplatform\webrtc\out\win_x86_Release\ -tclean ./peerconnection_server.exe" exited with code 1.
5>Done building project "peerconnection_server.vcxproj" -- FAILED.

3> Creating library C:\ortclib\webrtc\windows\solutions\Build\Output\x86\Release\MediaEngineUWP\MediaEngineUWP.lib and object C:\ortclib\webrtc\windows\solutions\Build\Output\x86\Release\MediaEngineUWP\MediaEngineUWP.exp
3>Generating code
3>All 1400 functions were compiled because no usable IPDB/IOBJ from previous compilation was found.
3>Finished generating code
3>MediaEngineUWP.vcxproj -> C:\ortclib\webrtc\windows\solutions\Build\Output\x86\Release\MediaEngineUWP\MediaEngineUWP.dll
3>Target Plugin Path is C:\ortclib\common\windows\samples\PeerCC\MediaEnginePlayerPlugin\MediaEngineUWP\UWP......\Client\Unity\UnityVideoControl\Assets
3>A subdirectory or file C:\ortclib\common\windows\samples\PeerCC\MediaEnginePlayerPlugin\MediaEngineUWP\UWP......\Client\Unity\UnityVideoControl\Assets\Plugins already exists.
3>A subdirectory or file C:\ortclib\common\windows\samples\PeerCC\MediaEnginePlayerPlugin\MediaEngineUWP\UWP......\Client\Unity\UnityVideoControl\Assets\Plugins\WSA already exists.
3>A subdirectory or file C:\ortclib\common\windows\samples\PeerCC\MediaEnginePlayerPlugin\MediaEngineUWP\UWP......\Client\Unity\UnityVideoControl\Assets\Plugins\WSA\x86 already exists.
3> 1 file(s) copied.
3> 1 file(s) copied.
3>Target Plugin Path is C:\ortclib\common\windows\samples\PeerCC\MediaEnginePlayerPlugin\MediaEngineUWP\UWP......\ClientUnity\Unity\PeerCCUnity\Assets
3>A subdirectory or file C:\ortclib\common\windows\samples\PeerCC\MediaEnginePlayerPlugin\MediaEngineUWP\UWP......\ClientUnity\Unity\PeerCCUnity\Assets\Plugins already exists.
3>A subdirectory or file C:\ortclib\common\windows\samples\PeerCC\MediaEnginePlayerPlugin\MediaEngineUWP\UWP......\ClientUnity\Unity\PeerCCUnity\Assets\Plugins\WSA already exists.
3>A subdirectory or file C:\ortclib\common\windows\samples\PeerCC\MediaEnginePlayerPlugin\MediaEngineUWP\UWP......\ClientUnity\Unity\PeerCCUnity\Assets\Plugins\WSA\x86 already exists.
3> 1 file(s) copied.
3> 1 file(s) copied.
3>Done building project "MediaEngineUWP.vcxproj".
1>RC : warning RC4005: '_HAS_EXCEPTIONS' : redefinition
1>
1>WebRtc.Stats.Observer.vcxproj -> C:\ortclib\webrtc\windows\solutions\Build\Output\WebRtc.Stats.Observer\Release\x86\lib\WebRtc.Stats.Observer.lib
1>Done building project "WebRtc.Stats.Observer.vcxproj".
2>Generating Visual Studio projects took 2069ms
2>Done. Made 465 targets from 117 files in 55987ms
2>Copied
2>out\winuwp_10_x86_release folder already exists
2>Copied
2>Generating Visual Studio projects took 2498ms
2>Done. Made 465 targets from 117 files in 56798ms
2>Copied
2>Popped webrtc\xplatform\webrtc path
2>
2>�[92mSuccess: WebRTC development environment is prepared.�[0m
2>======= WebRTC prepare script summary =======
2>======= platform ========= result =======
2>�[93m arm not run�[0m
2>�[93m x64 not run�[0m
2>�[92m x86 prepared�[0m
2>�[93m win32 not run�[0m
2>=================================================
2>
2>
2>�[92mSuccess: Development environment is set.�[0m
2>restorePathEnv entered...
2>Number of paths temporarily removed from environment PATH: 0
2>�[93mTotal execution time: 00:02:36 (156s total)�[0m
2>
2>
2>�[92mRunning prepare script ...�[0m
2>
2>�[93mRunning script parameters:�[0m
2>�[93mTarget: webrtc�[0m
2>�[93mPlatform: win32�[0m
2>�[93mLog level: 4�[0m
2>�[93mPreparing webrtc development environment ...�[0m
2>�[93mPreparing development environment for win32 platform...�[0m
2>depotToolsPathCheck entered...
2>Python is present.
2>
2>�[92mRunning WebRTC prepare script ...�[0m
2>�[92m=================================�[0m
2>�[93mPreparing WebRTC development environment for win32 platform ...�[0m
2>Executing prepareWebRTC function
2>Pushed webrtc\xplatform\webrtc path
2>Executing generateChromiumFolders function
2>chromium\src folder already exists
2>chromium\src\tools folder already exists
2>chromium\src\third_party folder already exists
2>chromium\src\third_party\winsdk_samples folder already exists
2>chromium\src\third_party\libjingle\source\talk\media\testdata\ folder already exists
2>third_party folder already exists
2>tools folder already exists
2>Executing makeJunctionLinks function
2>Path "buildtools" already exists
2>Path "build" already exists
2>Path "chromium\src\third_party\jsoncpp" already exists
2>Path "chromium\src\third_party\jsoncpp\source" already exists
2>Path "chromium\src\tools\protoc_wrapper" already exists
2>Path "chromium\src\third_party\protobuf" already exists
2>Path "chromium\src\third_party\yasm" already exists
2>Path "chromium\src\third_party\opus" already exists
2>Path "chromium\src\third_party\boringssl" already exists
2>Path "chromium\src\third_party\usrsctp" already exists
2>Path "chromium\src\third_party\libvpx" already exists
2>Path "chromium\src\third_party\libvpx\source\libvpx" already exists
2>Path "chromium\src\testing" already exists
2>Path "testing" already exists
2>Path "tools\protoc_wrapper" already exists
2>Path "third_party\yasm" already exists
2>Path "third_party\yasm\binaries" already exists
2>Path "third_party\yasm\source\patched-yasm" already exists
2>Path "third_party\opus" already exists
2>Path "third_party\opus\src" already exists
2>Path "third_party\boringssl" already exists
2>Path "third_party\boringssl\src" already exists
2>Path "third_party\usrsctp" already exists
2>Path "third_party\usrsctp\usrsctplib" already exists
2>Path "third_party\protobuf" already exists
2>Path "chromium\src\third_party\expat" already exists
2>Path "third_party\expat" already exists
2>Path "chromium\src\third_party\googletest" already exists
2>Path "third_party\googletest" already exists
2>Path "third_party\googletest\src" already exists
2>Path "third_party\libsrtp" already exists
2>Path "third_party\libvpx" already exists
2>Path "third_party\libyuv" already exists
2>Path "third_party\openmax_dl" already exists
2>Path "third_party\libjpeg_turbo" already exists
2>Path "third_party\jsoncpp" already exists
2>Path "third_party\winuwp_compat" already exists
2>Path "third_party\winuwp_h264" already exists
2>Path "third_party\gflags" already exists
2>Path "third_party\gflags\src" already exists
2>Path "third_party\winsdk_samples" already exists
2>Path "tools\gyp" already exists
2>Path "tools\clang" already exists
2> 1 file(s) copied.
2> 1 file(s) copied.
2> 1 file(s) copied.
2> 1 file(s) copied.
2>0> File buildtools\win\gn.exe exists and SHA1 matches. Skipping.
2>Success!
2>Downloading 1 files took 0.015000 second(s)
2>0> File buildtools\win\clang-format.exe exists and SHA1 matches. Skipping.
2>Success!
2>Downloading 1 files took 0.009000 second(s)
2>Executing generateProjects function
2>�[93mGenerating WebRTC projects for win32 platform ...�[0m
2>out\win_x86_debug folder already exists
2>Copied
2>Generating Visual Studio projects took 2185ms
2>Done. Made 479 targets from 120 files in 32447ms
2>Copied
2>out\win_x86_release folder already exists
2>Copied
2>Generating Visual Studio projects took 2235ms
2>Done. Made 479 targets from 120 files in 28950ms
2>Copied
2>Popped webrtc\xplatform\webrtc path
2>
2>�[92mSuccess: WebRTC development environment is prepared.�[0m
2>======= WebRTC prepare script summary =======
2>======= platform ========= result =======
2>�[93m arm not run�[0m
2>�[93m x64 not run�[0m
2>�[93m x86 not run�[0m
2>�[92m win32 prepared�[0m
2>=================================================
2>
2>
2>�[92mSuccess: Development environment is set.�[0m
2>restorePathEnv entered...
2>Number of paths temporarily removed from environment PATH: 0
2>�[93mTotal execution time: 00:01:30 (90s total)�[0m
2>
2>�[92mWebrtc build is started. It will take couple of minutes.�[0m
2>�[92mWorking ...�[0m
2>�[92mx86�[0m
2>�[92mPlatform x86�[0m
2>Visual Studio path is "C:\Program
2>Visual Studio 2017 Tools MSVC Version is 14.12.25827
2>Determining compiler options ...
2>CPU arhitecture is x64
2>Selected compiler option is amd64_x86
2>�[93mBuilding webrtc native libs�[0m
2>ninja: no work to do.
2>�[93mBuilding webrtc/rtc_base:rtc_json native lib�[0m
2>ninja: no work to do.
2>Source path is "C:\ortclib\webrtc\xplatform\webrtc\out\winuwp_10_x86_release"
2>Destination path is C:\ortclib\webrtc\xplatform\webrtc\out\winuwp_10_x86_release....\WEBRTC_BUILD\webrtc\Release\x86
2>**********************************************************************
2>** Visual Studio 2017 Developer Command Prompt v15.5.7
2>** Copyright (c) 2017 Microsoft Corporation
2>**********************************************************************
2>[vcvarsall.bat] Environment initialized for: 'x64_x86'
2>Microsoft (R) Library Manager Version 14.12.25835.0
2>Copyright (C) Microsoft Corporation. All rights reserved.
2>
2>Copying dlls from C:\ortclib\webrtc\xplatform\webrtc\out\winuwp_10_x86_release\ to C:\ortclib\webrtc\xplatform\webrtc\out\winuwp_10_x86_release....\WEBRTC_BUILD\webrtc\Release\x86
2>Copying pdbs from C:\ortclib\webrtc\xplatform\webrtc\out\winuwp_10_x86_release\ to C:\ortclib\webrtc\xplatform\webrtc\out\winuwp_10_x86_release....\WEBRTC_BUILD\webrtc\Release\x86
2>
2>�[92mSuccess: WebRtc library is built successfully.�[0m
2>
2>�[93mTotal execution time: 00:00:27 (27s total)�[0m
6>------ Rebuild All started: Project: Org.WebRtc.Uwp, Configuration: Release Win32 ------
6>DataChannel.cc
6>GlobalObserver.cc
6>Marshalling.cc
6>Media.cc
6>MediaSourceHelper.cc
6>PeerConnectionInterface.cc
6>RTMediaStreamSource.cc
6>WinUWPDeviceManager.cc
6> Creating library C:\ortclib\webrtc\windows\solutions\Build\Output\Org.WebRtc.Uwp\Release\x86\Org.WebRtc.lib and object C:\ortclib\webrtc\windows\solutions\Build\Output\Org.WebRtc.Uwp\Release\x86\Org.WebRtc.exp
6>Org.WebRtc.Uwp.vcxproj -> C:\ortclib\webrtc\windows\solutions\Build\Output\Org.WebRtc.Uwp\Release\x86\Org.WebRtc.dll
6>Target Plugin Path is C:\ortclib\webrtc\windows\projects\msvc\Org.WebRtc.Uwp..........\common\windows\samples\PeerCC\Client\Unity\UnityVideoControl\Assets
6>A subdirectory or file C:\ortclib\webrtc\windows\projects\msvc\Org.WebRtc.Uwp..........\common\windows\samples\PeerCC\Client\Unity\UnityVideoControl\Assets\Plugins already exists.
6>A subdirectory or file C:\ortclib\webrtc\windows\projects\msvc\Org.WebRtc.Uwp..........\common\windows\samples\PeerCC\Client\Unity\UnityVideoControl\Assets\Plugins\WSA already exists.
6>A subdirectory or file C:\ortclib\webrtc\windows\projects\msvc\Org.WebRtc.Uwp..........\common\windows\samples\PeerCC\Client\Unity\UnityVideoControl\Assets\Plugins\WSA\x86 already exists.
6> 1 file(s) copied.
6> 1 file(s) copied.
6> 1 file(s) copied.
6>Target Plugin Path is C:\ortclib\webrtc\windows\projects\msvc\Org.WebRtc.Uwp..........\common\windows\samples\PeerCC\ClientUnity\Unity\PeerCCUnity\Assets
6>A subdirectory or file C:\ortclib\webrtc\windows\projects\msvc\Org.WebRtc.Uwp..........\common\windows\samples\PeerCC\ClientUnity\Unity\PeerCCUnity\Assets\Plugins already exists.
6>A subdirectory or file C:\ortclib\webrtc\windows\projects\msvc\Org.WebRtc.Uwp..........\common\windows\samples\PeerCC\ClientUnity\Unity\PeerCCUnity\Assets\Plugins\WSA already exists.
6>A subdirectory or file C:\ortclib\webrtc\windows\projects\msvc\Org.WebRtc.Uwp..........\common\windows\samples\PeerCC\ClientUnity\Unity\PeerCCUnity\Assets\Plugins\WSA\x86 already exists.
6> 1 file(s) copied.
6> 1 file(s) copied.
6> 1 file(s) copied.
7>------ Rebuild All started: Project: PeerConnectionClientUnityD3DCore, Configuration: Release x86 ------
7> PeerConnectionClientUnityD3DCore -> C:\ortclib\common\windows\samples\PeerCC\Output\PeerCC.CoreUnityD3D\WebRtc\bin\x86\Release\PeerConnectionClientCore.dll
7> Target Plugin Path is C:\ortclib\common\windows\samples\PeerCC\ClientCore..\ClientUnity\Unity\PeerCCUnity\Assets
7> A subdirectory or file C:\ortclib\common\windows\samples\PeerCC\ClientCore..\ClientUnity\Unity\PeerCCUnity\Assets\Plugins already exists.
7> A subdirectory or file C:\ortclib\common\windows\samples\PeerCC\ClientCore..\ClientUnity\Unity\PeerCCUnity\Assets\Plugins\WSA already exists.
7> 1 file(s) copied.
7> The system cannot find the file specified.
7> 1 file(s) copied.
8>------ Rebuild All started: Project: Assembly-CSharp, Configuration: Release x86 ------
8> Running SerializationWeaver...
8> Symbols will be read from ......\Unity\Unprocessed\UnityEngine.CoreModule.pdb
8> Symbols will be read from C:\ortclib\common\windows\samples\PeerCC\Output\PeerCC.ClientUnityD3D.Assembly-CSharp\WebRtc\bin\x86\Release\Unprocessed\Assembly-CSharp.pdb
8> Symbols will be read from C:\ortclib\common\windows\samples\PeerCC\Output\PeerCC.ClientUnityD3D.Assembly-CSharp\WebRtc\bin\x86\Release\Unprocessed\Assembly-CSharp.pdb
8> Script Module: Assembly-CSharp.dll
8> Pass: 0 took 6 milliseconds
8> Pass: 1 took 28 milliseconds
8> Symbols will be read from C:\ortclib\common\windows\samples\PeerCC\Output\PeerCC.ClientUnityD3D.Assembly-CSharp\WebRtc\bin\x86\Release\Unprocessed\Assembly-CSharp.pdb
8> Weaving assembly C:\ortclib\common\windows\samples\PeerCC\Output\PeerCC.ClientUnityD3D.Assembly-CSharp\WebRtc\bin\x86\Release\Unprocessed\Assembly-CSharp.dll
8> + ControlScript
8> + GazeGestureManager
8> + WorldCursor
8> Will export symbols of pdb format
8> SerializationWeaver done.
8> Assembly-CSharp -> C:\ortclib\common\windows\samples\PeerCC\Output\PeerCC.ClientUnityD3D.Assembly-CSharp\WebRtc\bin\x86\Release\Assembly-CSharp.dll
9>------ Rebuild All started: Project: PeerConnectionClientUnity, Configuration: Release x86 ------
9>C:\ortclib\common\windows\samples\PeerCC\ClientUnity\App.cs(56,13,56,71): warning CS0618: 'ApplicationView.SuppressSystemOverlays.set' is obsolete: 'Use the TryEnterFullScreen method and IsFullScreenMode property instead of SuppressSystemOverlays. For more info, see MSDN.'
9> PeerConnectionClientUnity -> C:\ortclib\common\windows\samples\PeerCC\Output\PeerCC.ClientUnityD3D\WebRtc\bin\x86\Release\PeerConnectionClientUnity.exe
9> UnityWSAPlayerDir "C:\Program Files\Unity\Editor\Data\PlaybackEngines\MetroSupport".
9> UnityProjectDir "".
9> Copying unprocessed assemblies...
9> Running AssemblyConverter...
9> AssemblyConverter done.
9> Modifying AppxPackagePayload
========== Rebuild All: 8 succeeded, 1 failed, 0 skipped ==========

The error list is as below.

Error MSB3073 The command "call C:\ortclib\webrtc\windows\projects\msvc\PeerConectionServer........\xplatform\depot_tools\ninja.exe -C C:\ortclib\webrtc\windows\projects\msvc\PeerConectionServer........\xplatform\webrtc\out\win_x86_Release\ -tclean ./peerconnection_server.exe" exited with code 1.

How to use WebRTC in my own new/existing project?

I have build the PeerCC for Unity with the help from issue #40

  1. Now I want to use WebRTC in my Hololens project, how can I do that? To build PeerCC first a few .dlls need to be generated. How can I do that for my own project?

  2. I cannot build PeerCC(for Unity) for Android or Desktop platform. From this line in the repo readme I thought it would be possible. In my project I want to make video calls between different platforms. Is it not doable with this project? Or do I have to create separate projects for that?

PeerConnection Client This is the recommended sample for getting started with WebRTC on UWP. It's a port of the WebRTC.org PeerConnection sample and is compatible with the same sample on iOS, Android, running in Chrome, etc. It also now includes Unity and Mixed-Reality Capture support for HoloLens.

As you can see, I am a beginner, you patience and help is greatly appreciated.

PS: I cannot assign the question label to this issue.

PeerCCUnity Hololens app crashes after 2-4 seconds of video-call

I've finally managed to set the environment needed to test the PeerConnectionClient:

  • PeerConnectionClient.WebRtc running on desktop
  • PeerCCUnity app running on hololens
  • peerconnection_server.exe running on a Windows 10 Azure VM

I'm able to connect both the desktop and hololens clients to the signaling server, but when I start a video-call, after 2-4 seconds of receiving only audio, the debugger stops at line 68 of App.cs:

public void Run() { m_AppCallbacks.Run(); }

With the following error:

An unhandled exception of type 'System.AccessViolationException' occurred in PeerCCUnity.exe Attempted to read or write protected memory. This is often an indication that other memory is corrupt.

I'm about to start trying to fix this bug, any help would be appreciated.

Thanks in advance.

Cannot build Unity PeerCC-sample

I tried to build the Unity PeerCCScene in unity (version 2017.4.0), but the build fails because of missing classes. The errors I have on building are:
"Assets\Scripts\ControlScript.cs(14,7): error CS0246: The type or namespace name 'PeerConnectionClient' could not be found (are you missing a using directive or an assembly reference?)"
"Assets\Scripts\ControlScript.cs(62,16): error CS0246: The type or namespace name 'Conductor' could not be found (are you missing a using directive or an assembly reference?)"

I also noticed that the meta files were excluded from the project, which caused a lot of missing links in the scene (which I was able to fix manually). Could the missing metas be the cause of my issue? Or does anyone know how I can solve this problem?

Thank you in advance!

Gaël Vanhalst

new RTCPeerConnection() hangs

Every time i try to instantiate RTCPeerConnection my application hangs indefinitely

var config = new RTCConfiguration
                         {
                             BundlePolicy = RTCBundlePolicy.Balanced,
                             IceTransportPolicy = RTCIceTransportPolicy.All,
                             IceServers = _iceServers
                         };

_peerConnection = new RTCPeerConnection(config);

The tasks list shows it's running a task that never completes

162 Active Agent_Universal.WebRTC.WebRtcManaged.InitializePeerConnection Task: <ProcessOffer>b__0

compiling under x86 with latest stable version 6.1.9 and 1.62.0.7

Program crashing when re-initiating call.

When a call is initiated from the hololens, hung up and then re-initiated the program crashes. With mixed debugging enabled I get a large amount of output. I've included from the hololens first connecting to the server to the end. But I have omitted many repeated D3D warnings and thread exit messages. One instance of the D3D warning, on the off chance that is relevant is:

D3D11 WARNING: ID3D11DeviceContext::Draw: Input vertex slot 0 has stride 12 which is less than the minimum stride logically expected from the current Input Layout (40 bytes). This is OK, as hardware is perfectly capable of reading overlapping data. However the developer probably did not intend to make use of this behavior.  [ EXECUTION WARNING #355: DEVICE_DRAW_VERTEX_BUFFER_STRIDE_TOO_SMALL]
D3D11 WARNING: ID3D11DeviceContext::Draw: Vertex Buffer at the input vertex slot 0 is not big enough for what the Draw*() call expects to traverse. This is OK, as reading off the end of the Buffer is defined to return 0. However the developer probably did not intend to make use of this behavior.  [ EXECUTION WARNING #356: DEVICE_DRAW_VERTEX_BUFFER_TOO_SMALL]
D3D11 WARNING: ID3D11DeviceContext::Draw: Input vertex slot 0 has stride 12 which is less than the minimum stride logically expected from the current Input Layout (40 bytes). This is OK, as hardware is perfectly capable of reading overlapping data. However the developer probably did not intend to make use of this behavior.  [ EXECUTION WARNING #355: DEVICE_DRAW_VERTEX_BUFFER_STRIDE_TOO_SMALL]
D3D11 WARNING: ID3D11DeviceContext::Draw: Vertex Buffer at the input vertex slot 0 is not big enough for what the Draw*() call expects to traverse. This is OK, as reading off the end of the Buffer is defined to return 0. However the developer probably did not intend to make use of this behavior.  [ EXECUTION WARNING #356: DEVICE_DRAW_VERTEX_BUFFER_TOO_SMALL]
D3D11 WARNING: ID3D11DeviceContext::Draw: Input vertex slot 0 has stride 12 which is less than the minimum stride logically expected from the current Input Layout (40 bytes). This is OK, as hardware is perfectly capable of reading overlapping data. However the developer probably did not intend to make use of this behavior.  [ EXECUTION WARNING #355: DEVICE_DRAW_VERTEX_BUFFER_STRIDE_TOO_SMALL]
D3D11 WARNING: ID3D11DeviceContext::Draw: Vertex Buffer at the input vertex slot 0 is not big enough for what the Draw*() call expects to traverse. This is OK, as reading off the end of the Buffer is defined to return 0. However the developer probably did not intend to make use of this behavior.  [ EXECUTION WARNING #356: DEVICE_DRAW_VERTEX_BUFFER_TOO_SMALL]
D3D11 WARNING: ID3D11DeviceContext::Draw: Input vertex slot 0 has stride 12 which is less than the minimum stride logically expected from the current Input Layout (40 bytes). This is OK, as hardware is perfectly capable of reading overlapping data. However the developer probably did not intend to make use of this behavior.  [ EXECUTION WARNING #355: DEVICE_DRAW_VERTEX_BUFFER_STRIDE_TOO_SMALL]
D3D11 WARNING: ID3D11DeviceContext::Draw: Vertex Buffer at the input vertex slot 0 is not big enough for what the Draw*() call expects to traverse. This is OK, as reading off the end of the Buffer is defined to return 0. However the developer probably did not intend to make use of this behavior.  [ EXECUTION WARNING #356: DEVICE_DRAW_VERTEX_BUFFER_TOO_SMALL]
Exception thrown at 0x77C9C7D2 in AR_Maintenance.exe: Microsoft C++ exception: _com_error at memory location 0x0FBF9AE0.

Partial log begins here.

Signaling: Headers received [i=424 data(471)]
The thread 0x5c4 has exited with code 0 (0x0).
onecoreuap\shell\windows.storage\dataaccess.cpp(2863)\windows.storage.dll!72D679B2: (caller: 72D65927) LogHr(115) tid(c50) 8007029C An assertion failure has occurred.
onecoreuap\shell\windows.storage\dataaccess.cpp(2863)\windows.storage.dll!72D679B2: (caller: 72D65927) LogHr(116) tid(c50) 8007029C An assertion failure has occurred.
The thread 0x1440 has exited with code 0 (0x0).
The thread 0xd94 has exited with code 0 (0x0).
Conductor: Creating peer connection.
Conductor: Getting user media.
The thread 0x1158 has exited with code 0 (0x0).
'AR_Maintenance.exe' (Win32): Loaded 'C:\Windows\System32\Windows.Media.MixedRealityCapture.dll'. Cannot find or open the PDB file.
The thread 0x750 has exited with code 0 (0x0).
The thread 0x868 has exited with code 0 (0x0).
VideoEffect Added
'AR_Maintenance.exe' (Win32): Loaded 'C:\Windows\System32\deviceaccess.dll'. Symbols loaded.
Conductor: Adding local media stream.
Data Channel state in initialistion: Connecting
'AR_Maintenance.exe' (Win32): Loaded 'C:\Windows\System32\Windows.Mirage.Internal.Capture.Pipeline.ProxyStub.dll'. Cannot find or open the PDB file.
Conductor: Sending offer.
'AR_Maintenance.exe' (Win32): Loaded 'C:\Windows\System32\Windows.Shell.ServiceHostBuilder.dll'. Symbols loaded.
'AR_Maintenance.exe' (Win32): Loaded 'C:\Windows\System32\Windows.Web.dll'. Symbols loaded.
'AR_Maintenance.exe' (Win32): Unloaded 'C:\Windows\System32\RTMediaFrame.dll'
Exception thrown: 'System.TimeoutException' in PeerConnectionClientCore.dll
Timed out long polling, re-trying.
Conductor: Sending ice candidate.
{"sdpMid":"audio","sdpMLineIndex":0,"candidate":"candidate:3581966237 1 udp 2122260223 172.16.100.228 58566 typ host generation 0 ufrag GQlT network-id 1 network-cost 50"}
Signaling: Headers received [i=409 data(413)]
Conductor: Sending ice candidate.
{"sdpMid":"video","sdpMLineIndex":1,"candidate":"candidate:3581966237 1 udp 2122260223 172.16.100.228 58567 typ host generation 0 ufrag GQlT network-id 1 network-cost 50"}
Signaling: Headers received [i=423 data(3772)]
Conductor: Sending ice candidate.
{"sdpMid":"data","sdpMLineIndex":2,"candidate":"candidate:3581966237 1 udp 2122260223 172.16.100.228 58568 typ host generation 0 ufrag GQlT network-id 1 network-cost 50"}
Conductor: Sending ice candidate.
{"sdpMid":"audio","sdpMLineIndex":0,"candidate":"candidate:2600700781 1 tcp 1518280447 172.16.100.228 49935 typ host tcptype passive generation 0 ufrag GQlT network-id 1 network-cost 50"}
Conductor: Received session description: {"type":"answer","sdp":"v=0\r\no=- 1758150563495385465 2 IN IP4 127.0.0.1\r\ns=-\r\nt=0 0\r\na=group:BUNDLE audio video data\r\na=msid-semantic: WMS stream_label_f22a70757163fb02\r\nm=audio 9 UDP/TLS/RTP/SAVPF 111 103 104 9 102 0 8 106 105 13 110 112 113 126\r\nc=IN IP4 0.0.0.0\r\na=rtcp:9 IN IP4 0.0.0.0\r\na=ice-ufrag:0wiE\r\na=ice-pwd:M5Q8jN2soyvQMce/AA5dUS1V\r\na=ice-options:trickle\r\na=fingerprint:sha-256 B0:99:60:05:EA:88:56:D2:5E:74:9C:47:76:61:27:13:A6:15:BE:67:89:BD:D8:5A:AD:63:F0:08:9E:C2:79:F2\r\na=setup:active\r\na=mid:audio\r\na=extmap:1 urn:ietf:params:rtp-hdrext:ssrc-audio-level\r\na=sendrecv\r\na=rtcp-mux\r\na=rtpmap:111 opus/48000/2\r\na=rtcp-fb:111 transport-cc\r\na=fmtp:111 minptime=10;useinbandfec=1\r\na=rtpmap:103 ISAC/16000\r\na=rtpmap:104 ISAC/32000\r\na=rtpmap:9 G722/8000\r\na=rtpmap:102 ILBC/8000\r\na=rtpmap:0 PCMU/8000\r\na=rtpmap:8 PCMA/8000\r\na=rtpmap:106 CN/32000\r\na=rtpmap:105 CN/16000\r\na=rtpmap:13 CN/8000\r\na=rtpmap:110 telephone-event/48000\r\na=rtpmap:112 telephone-event/32000\r\na=rtpmap:113 telephone-event/16000\r\na=rtpmap:126 telephone-event/8000\r\na=ssrc:1504669606 cname:qLzAky2BD0J6pW3Z\r\na=ssrc:1504669606 msid:stream_label_f22a70757163fb02 audio_label_9267b376cd37afa6\r\na=ssrc:1504669606 mslabel:stream_label_f22a70757163fb02\r\na=ssrc:1504669606 label:audio_label_9267b376cd37afa6\r\nm=video 9 UDP/TLS/RTP/SAVPF 100 96 97 98 99 101 127 124 125\r\nc=IN IP4 0.0.0.0\r\na=rtcp:9 IN IP4 0.0.0.0\r\na=ice-ufrag:0wiE\r\na=ice-pwd:M5Q8jN2soyvQMce/AA5dUS1V\r\na=ice-options:trickle\r\na=fingerprint:sha-256 B0:99:60:05:EA:88:56:D2:5E:74:9C:47:76:61:27:13:A6:15:BE:67:89:BD:D8:5A:AD:63:F0:08:9E:C2:79:F2\r\na=setup:active\r\na=mid:video\r\na=extmap:2 urn:ietf:params:rtp-hdrext:toffset\r\na=extmap:3 http://www.webrtc.org/experiments/rtp-hdrext/abs-send-time\r\na=extmap:4 urn:3gpp:video-orientation\r\na=extmap:5 http://www.ietf.org/id/draft-holmer-rmcat-transport-wide-cc-extensions-01\r\na=extmap:6 http://www.webrtc.org/experiments/rtp-hdrext/playout-delay\r\na=extmap:7 http://www.webrtc.org/experiments/rtp-hdrext/video-content-type\r\na=extmap:8 http://www.webrtc.org/experiments/rtp-hdrext/video-timing\r\na=recvonly\r\na=rtcp-mux\r\na=rtcp-rsize\r\na=rtpmap:100 H264/90000\r\na=rtcp-fb:100 ccm fir\r\na=rtcp-fb:100 nack\r\na=rtcp-fb:100 nack pli\r\na=rtcp-fb:100 goog-remb\r\na=rtcp-fb:100 transport-cc\r\na=fmtp:100 level-asymmetry-allowed=1;packetization-mode=1;profile-level-id=42e01f\r\na=rtpmap:96 VP8/90000\r\na=rtcp-fb:96 ccm fir\r\na=rtcp-fb:96 nack\r\na=rtcp-fb:96 nack pli\r\na=rtcp-fb:96 goog-remb\r\na=rtcp-fb:96 transport-cc\r\na=rtpmap:97 rtx/90000\r\na=fmtp:97 apt=96\r\na=rtpmap:98 VP9/90000\r\na=rtcp-fb:98 ccm fir\r\na=rtcp-fb:98 nack\r\na=rtcp-fb:98 nack pli\r\na=rtcp-fb:98 goog-remb\r\na=rtcp-fb:98 transport-cc\r\na=rtpmap:99 rtx/90000\r\na=fmtp:99 apt=98\r\na=rtpmap:101 rtx/90000\r\na=fmtp:101 apt=100\r\na=rtpmap:127 red/90000\r\na=rtpmap:124 rtx/90000\r\na=fmtp:124 apt=127\r\na=rtpmap:125 ulpfec/90000\r\nm=application 9 DTLS/SCTP 5000\r\nc=IN IP4 0.0.0.0\r\nb=AS:30\r\na=ice-ufrag:0wiE\r\na=ice-pwd:M5Q8jN2soyvQMce/AA5dUS1V\r\na=ice-options:trickle\r\na=fingerprint:sha-256 B0:99:60:05:EA:88:56:D2:5E:74:9C:47:76:61:27:13:A6:15:BE:67:89:BD:D8:5A:AD:63:F0:08:9E:C2:79:F2\r\na=setup:active\r\na=mid:data\r\na=sctpmap:5000 webrtc-datachannel 1024\r\n"}
Signaling: Headers received [i=409 data(413)]
Conductor: Sending ice candidate.
{"sdpMid":"video","sdpMLineIndex":1,"candidate":"candidate:2600700781 1 tcp 1518280447 172.16.100.228 49936 typ host tcptype passive generation 0 ufrag GQlT network-id 1 network-cost 50"}
Conductor: Sending ice candidate.
{"sdpMid":"data","sdpMLineIndex":2,"candidate":"candidate:2600700781 1 tcp 1518280447 172.16.100.228 49937 typ host tcptype passive generation 0 ufrag GQlT network-id 1 network-cost 50"}
Conductor: Sending ice candidate.
{"sdpMid":"video","sdpMLineIndex":1,"candidate":"candidate:420300814 1 udp 1686052607 210.55.3.198 42702 typ srflx raddr 172.16.100.228 rport 58567 generation 0 ufrag GQlT network-id 1 network-cost 50"}
Conductor: Sending ice candidate.
{"sdpMid":"data","sdpMLineIndex":2,"candidate":"candidate:420300814 1 udp 1686052607 210.55.3.198 34884 typ srflx raddr 172.16.100.228 rport 58568 generation 0 ufrag GQlT network-id 1 network-cost 50"}
Conductor: Sending ice candidate.
{"sdpMid":"audio","sdpMLineIndex":0,"candidate":"candidate:420300814 1 udp 1686052607 210.55.3.198 9795 typ srflx raddr 172.16.100.228 rport 58566 generation 0 ufrag GQlT network-id 1 network-cost 50"}
Signaling: Headers received [i=409 data(413)]
Signaling: Headers received [i=409 data(413)]
Signaling: Headers received [i=422 data(594)]
Conductor: Received candidate : {"sdpMid":"audio","sdpMLineIndex":0,"candidate":"candidate:1951815848 1 udp 2122260223 10.20.30.37 64907 typ host generation 0 ufrag 0wiE network-id 1 network-cost 50"}
Signaling: Headers received [i=409 data(413)]
'AR_Maintenance.exe' (Win32): Loaded 'C:\Windows\System32\Windows.StateRepositoryPS.dll'. Symbols loaded.
Signaling: Headers received [i=422 data(609)]
'AR_Maintenance.exe' (Win32): Loaded 'C:\Windows\System32\capauthz.dll'. Symbols loaded.
Signaling: Headers received [i=409 data(413)]
Conductor: Received candidate : {"sdpMid":"audio","sdpMLineIndex":0,"candidate":"candidate:987079768 1 tcp 1518280447 10.20.30.37 65036 typ host tcptype passive generation 0 ufrag 0wiE network-id 1 network-cost 50"}
The thread 0x155c has exited with code 0 (0x0).
Signaling: Headers received [i=409 data(413)]
Signaling: Headers received [i=409 data(413)]
Signaling: Headers received [i=422 data(627)]
Signaling: Headers received [i=409 data(413)]
'AR_Maintenance.exe' (Win32): Loaded 'C:\Program Files\Intel\Media SDK\mfx_mft_h264ve_32.dll'. Cannot find or open the PDB file.
Conductor: Received candidate : {"sdpMid":"audio","sdpMLineIndex":0,"candidate":"candidate:3708409725 1 udp 1686052607 122.61.107.85 64907 typ srflx raddr 10.20.30.37 rport 64907 generation 0 ufrag 0wiE network-id 1 network-cost 50"}
Signaling: Headers received [i=409 data(413)]
'AR_Maintenance.exe' (Win32): Loaded 'C:\Program Files\Intel\Media SDK\libmfxhw32.dll'. Cannot find or open the PDB file.
The thread 0x1570 has exited with code 0 (0x0).
Channel Open!
DataChannel state in OnOpen: Open
Message Received!
Nice to meet you!
'AR_Maintenance.exe' (Win32): Unloaded 'C:\Program Files\Intel\Media SDK\libmfxhw32.dll'
'AR_Maintenance.exe' (Win32): Loaded 'C:\Program Files\Intel\Media SDK\libmfxhw32.dll'. Cannot find or open the PDB file.
The thread 0xd04 has exited with code 0 (0x0).
The thread 0x108c has exited with code 0 (0x0).
'AR_Maintenance.exe' (Win32): Unloaded 'C:\Program Files\Intel\Media SDK\libmfxhw32.dll'
H264StreamSink::~H264StreamSink()
H264MediaSink::~H264MediaSink()
'AR_Maintenance.exe' (Win32): Loaded 'C:\Program Files\Intel\Media SDK\libmfxhw32.dll'. Cannot find or open the PDB file.
'AR_Maintenance.exe' (Win32): Unloaded 'C:\Program Files\Intel\Media SDK\libmfxhw32.dll'
'AR_Maintenance.exe' (Win32): Loaded 'C:\Program Files\Intel\Media SDK\libmfxhw32.dll'. Cannot find or open the PDB file.
Exception thrown: 'System.TimeoutException' in PeerConnectionClientCore.dll
Timed out long polling, re-trying.
Signaling: Headers received [i=409 data(413)]
The thread 0xc64 has exited with code 0 (0x0).
The thread 0x15ac has exited with code 0 (0x0).
The thread 0x1738 has exited with code 0 (0x0).
Data channel close called and returned
'AR_Maintenance.exe' (Win32): Unloaded 'C:\Program Files\Intel\Media SDK\libmfxhw32.dll'
H264StreamSink::~H264StreamSink()
H264MediaSink::~H264MediaSink()
The thread 0xd60 has exited with code 0 (0x0).
The thread 0xbbc has exited with code 0 (0x0).
The thread 0xeb0 has exited with code 1 (0x1).
The thread 0x620 has exited with code 1 (0x1).
The thread 0x404 has exited with code 0 (0x0).
The thread 0x920 has exited with code 0 (0x0).
The thread 0x6b8 has exited with code 0 (0x0).
The thread 0xf48 has exited with code 0 (0x0).
PeerConnection.Close called and returned
OnReadyToConnect invoked and returned
Garbage collector collects and returns. This is the end of the ClosePeerConnection method
The thread 0x470 has exited with code 0 (0x0).
The thread 0x16a8 has exited with code 0 (0x0).
The thread 0x10e8 has exited with code 0 (0x0).
The thread 0x1668 has exited with code 0 (0x0).
Exception thrown: 'System.TimeoutException' in PeerConnectionClientCore.dll
Timed out long polling, re-trying.
Conductor: Creating peer connection.
Conductor: Getting user media.
The thread 0x6b0 has exited with code 0 (0x0).
VideoEffect Added
Exception thrown at 0x77C9C7D2 (KernelBase.dll) in AR_Maintenance.exe: WinRT originate error - 0xC00DABE4 : 'RecordState'.
Exception thrown at 0x77C9C7D2 in AR_Maintenance.exe: Microsoft C++ exception: Platform::COMException ^ at memory location 0x1F4FFB20. HRESULT:0xC00DABE4 The op is invalid.
WinRT information: RecordState
Stack trace:
 >combase.dll!RoOriginateErrorW(HRESULT error, unsigned int cchMax, const wchar_t * message) Line 563
 >[Inline Frame] Windows.Media.dll!Windows::Media::Report(HRESULT) Line 33
 >Windows.Media.dll!CaptureSharedState::_ValidateRecordStateTransition(RecordState newState) Line 698
 >Windows.Media.dll!CaptureSharedState::TransitionToRecordState(RecordState state) Line 518
 >Windows.Media.dll!Windows::Media::Capture::MediaCaptureServer::StartRecordToCustomSinkAsync(Windows::Media::MediaProperties::IMediaEncodingProfile * encodingProfile, Windows::Media::IMediaExtension * customMediaSink, Windows::Foundation::IAsyncAction * * asyncInfo) Line 4757
 >Org.WebRtc.dll!Windows::Media::Capture::IMediaCapture::StartRecordToCustomSinkAsync(Windows::Media::MediaProperties::MediaEncodingProfile ^ __param0, Windows::Media::IMediaExtension ^ __param1)
 >Org.WebRtc.dll!webrtc::videocapturemodule::CaptureDevice::StartCapture::__l2::Concurrency::task<void> <lambda>(Windows::Media::IMediaExtension ^)::__l2::<lambda>() Line 441
 >[Inline Frame] Org.WebRtc.dll!std::_Invoker_functor::_Call(webrtc::videocapturemodule::CaptureDevice::StartCapture::__l2::Concurrency::task<void> <lambda>(Windows::Media::IMediaExtension ^)::__l2::Concurrency::task<void> <lambda>(void) &)
 >[Inline Frame] Org.WebRtc.dll!std::invoke(webrtc::videocapturemodule::CaptureDevice::StartCapture::__l2::Concurrency::task<void> <lambda>(Windows::Media::IMediaExtension ^)::__l2::Concurrency::task<void> <lambda>(void) &)
 >[Inline Frame] Org.WebRtc.dll!std::_Invoker_ret<Concurrency::task<void>,0>::_Call(webrtc::videocapturemodule::CaptureDevice::StartCapture::__l2::Concurrency::task<void> <lambda>(Windows::Media::IMediaExtension ^)::__l2::Concurrency::task<void> <lambda>(void) &)
 >Org.WebRtc.dll!std::_Func_impl_no_alloc<Concurrency::task<void> <lambda>(void),Concurrency::task<void> >::_Do_call()
 >Org.WebRtc.dll!std::_Func_class<Concurrency::task<void> >::operator()()
 >[Inline Frame] Org.WebRtc.dll!Concurrency::details::_MakeUnitToTFunc::__l2::<lambda_2a153568759a1fa2a7e8447d0218ef52>::operator()(unsigned char) Line 2354
 >[Inline Frame] Org.WebRtc.dll!std::_Invoker_functor::_Call(Concurrency::details::_MakeUnitToTFunc::__l2::<lambda_2a153568759a1fa2a7e8447d0218ef52> &)
 >[Inline Frame] Org.WebRtc.dll!std::invoke(Concurrency::details::_MakeUnitToTFunc::__l2::<lambda_2a153568759a1fa2a7e8447d0218ef52> &)
 >[Inline Frame] Org.WebRtc.dll!std::_Invoker_ret<Concurrency::task<void>,0>::_Call(Concurrency::details::_MakeUnitToTFunc::__l2::<lambda_2a153568759a1fa2a7e8447d0218ef52> &)
 >Org.WebRtc.dll!std::_Func_impl_no_alloc<<lambda_2a153568759a1fa2a7e8447d0218ef52>,Concurrency::task<void>,unsigned char>::_Do_call(unsigned char && <_Args_0>)
 >Org.WebRtc.dll!std::_Func_class<Concurrency::task<void>,unsigned char>::operator()(unsigned char <_Args_0>)
 >Org.WebRtc.dll!Concurrency::task<unsigned char>::_ContinuationTaskHandle<void,void,std::function<Concurrency::task<void> __cdecl(void)>,std::integral_constant<bool,0>,Concurrency::details::_TypeSelectorAsyncTask>::_LogWorkItemAndInvokeUserLambda<std::function<Concurrency::task<void> __cdecl(unsigned char)>,unsigned char>(std::function<Concurrency::task<void> __cdecl(unsigned char)> && _func, unsigned char && _value) Line 3627
 >Org.WebRtc.dll!Concurrency::task<unsigned char>::_ContinuationTaskHandle<void,void,std::function<Concurrency::task<void> __cdecl(void)>,std::integral_constant<bool,0>,Concurrency::details::_TypeSelectorAsyncTask>::_Continue(std::integral_constant<bool,0> __formal, Concurrency::details::_TypeSelectorAsyncOperationOrTask __formal) Line 3674
 >[Inline Frame] Org.WebRtc.dll!Concurrency::task<unsigned char>::_ContinuationTaskHandle<void,void,std::function<Concurrency::task<void> __cdecl(void)>,std::integral_constant<bool,0>,Concurrency::details::_TypeSelectorAsyncTask>::_Perform() Line 3632
 >Org.WebRtc.dll!Concurrency::details::_PPLTaskHandle<unsigned char,Concurrency::task<unsigned char>::_ContinuationTaskHandle<void,void,std::function<Concurrency::task<void> __cdecl(void)>,std::integral_constant<bool,0>,Concurrency::details::_TypeSelectorAsyncTask>,Concurrency::details::_ContinuationTaskHandleBase>::invoke() Line 1473
 >Org.WebRtc.dll!Concurrency::details::_TaskProcHandle::_RunChoreBridge(void * _Parameter) Line 160
 >Org.WebRtc.dll!Concurrency::details::_DefaultPPLTaskScheduler::_PPLTaskChore::_Callback(void * _Args) Line 52
 >msvcp140_app.dll!Concurrency::details::`anonymous namespace'::_Task_scheduler_callback(_TP_CALLBACK_INSTANCE * _Pci, void * _Args, _TP_WORK * __formal) Line 158
 >ntdll.dll!TppWorkpExecuteCallback()
 >ntdll.dll!TppWorkerThread()
 >ntdll.dll!__RtlUserThreadStart()
 >ntdll.dll!__RtlUserThreadStart@8�()
'AR_Maintenance.exe' (Win32): Unloaded 'C:\Windows\System32\deviceaccess.dll'
Unhandled exception at 0x774A273B (ucrtbase.dll) in AR_Maintenance.exe: Fatal program exit requested.

Performance really bad on HoloLens

Hi, I try the WebRtcUnityXaml.sln and I can get the video connection between PC and HoloLens. However, the performance is really bad. The video stream from holoLens got delay on PC (only 1-4 fps ). I test on PC to PC but seldom delay happens. Could anyone tell me why? and how to improve the performance.

Thanks!

AppRTC doesn't run in the background

There are currently no examples or documentation on how to get WebRTC to work in the background in JS. Without this, audio is interrupted when the user switches away from the app or turns off the screen. Ideally, this would be done transparently by the library, with little or no changes to the app, allowing existing web apps like AppRTC to provide a good voice chat experience on platforms missing native WebRTC support.

PushNotifications

Could you please explain the purpose of PushNotification in this app? All activity is done through SocketActivityTrigger. It would be fine, if you provide some explanation how to simulate push notifications.
Thank you

Can I use desktop_capture module ?

Hi @jamescadd @robin-raymond ,
Is there a way to use desktop_capture module for capturing the screen and stream it instead of sharing camera and file ?

If there is .. Is there a code sample for sharing screen ?

The implementation for screen capture already there for windows :
https://chromium.googlesource.com/external/webrtc.git/+/3e4faae0edeb2b30e899712f92217d2aa5cd6ff2/webrtc/modules/desktop_capture/

and Here is a code sample use the desktop_capture module for sharing desktop and it works for WPF and Windows 7 :
https://github.com/radioman/WebRtc.NET/tree/staging

Thanks,
Ebram

About PeerCC

Your readme tells me a lot of mistakes, but what I care most about is how to make the Peer Connection Client. WebRtc. UnityD3D solution work successfully. I downloaded 17134 and told me that I couldn't find 16299, and that my VS couldn't find many parts of my SDK on Assembly-CSharp, which made me feel very sad.

Multipeer

Hi,

I rewrote your conductor to support multi peer connections, but I have an issue with audio stream.
As soon as hololens has two outgoing webrtc audio channels the outgoing audio is 20sec or more delayed. Is this issue known or an error on my side?

Regards
Starbax

Can't Build UnityD3D

Hello, when trying to build UnityD3D I am getting following errors. I can see that unity IS referenced properly. I also managed to solve all problems in #40

Severity	Code	Description	Project	File	Line	Suppression State
Error	CS0246	The type or namespace name 'UnityPlayer' could not be found (are you missing a using directive or an assembly reference?)	PeerConnectionClientUnity	C:\WebRTC1\WebRTC-universal-samples-master\Samples\PeerCC-Sample\ClientUnity\App.cs	7	Active
Error	CS0246	The type or namespace name 'WinRTBridge' could not be found (are you missing a using directive or an assembly reference?)	PeerConnectionClientUnity	C:\WebRTC1\WebRTC-universal-samples-master\Samples\PeerCC-Sample\ClientUnity\App.cs	13	Active
Error	CS0246	The type or namespace name 'AppCallbacks' could not be found (are you missing a using directive or an assembly reference?)	PeerConnectionClientUnity	C:\WebRTC1\WebRTC-universal-samples-master\Samples\PeerCC-Sample\ClientUnity\App.cs	14	Active

App Package generation fails: missing Assets\Wide310x150Logo.png

2>F:\git\github\WebRTC-universal-samples\Samples\PeerCC-Sample\Client\Package.WebRtc.appxmanifest(19,26): error APPX0703: Manifest references file 'Assets\Wide310x150Logo.png' which is not part of the payload. ========== Build: 1 succeeded, 1 failed, 0 up-to-date, 0 skipped ========== ========== Package: 0 succeeded, 2 failed ===========

About the video resolution.

I found that the lowest resolution on HoloLens is 895*504.

Could anyone give me some advice on how to downscale this resolution?

Many thanks!

How to close HololensCamera

Hi,sir;
I had a successful video call with the PC client using HoloLens‘
when I disconnected the Called, PC client's camera turn off,ButHololens'external camera wouldn't shut down.I had eproduce it in a Debug build running on HL,Here is the VS output.When I disconnected the Called,
1539142164 1
Here are some others VS output:
OutPut.txt
Thanks

WinRT originate error on accessing skeleton data

In the CameraStreamCorrelation sample, as soon as you enable skeleton overlay, the log gets spammed with WinRT originate error:

Exception thrown at 0x00007FFE05C29E08 (KernelBase.dll) in CameraStreamCorrelation.exe: 0x40080201: WinRT originate error (parameters: 0x0000000080000013, 0x000000000000001D, 0x0000009BFDAFEE80).

It doesn't cause any real issues, but it's still annoying for logging and diagnosing purposes. Is there any proper way to prevent this? I've noticed that the error happens when accessing the byte buffer of the skeleton frame.

Running Windows 10 Creator's Update, VS2017 latest, Kinect V2 for WIndows

Program with data channel crashing after hang up.

Hi,

I've adapted parts of the PeerCC sample and integrated them into my own project. A large part of the adaptation was to get a Data Channel connection up and running. I've managed to do this but the program crashes consistently when hanging up the call when the data channel has been in use. I'm getting error 0xc0000374, which means a corrupted heap. I've been unable to diagnose the problem further. I have debug logs in the likely event that more information be required.

Org.WebRtc miss in PeerCCUnity

Hi all,

I tried to build in Unity PeerCCUnity project to UWP platform but I have the follow error:

ArgumentException: The Assembly Org.WebRtc is referenced by PeerConnectionClientCore ('Assets/Plugins/WSA/PeerConnectionClientCore.dll'). But the dll is not allowed to be included or could not be found.

So I copied the dll from the path "PeerCC-Sample\Output\PeerCC.ClientUnityD3D\WebRtc\bin\x86\Debug" into the path "PeerCCUnity\Assets\Plugins\WSA" but I have another error when I build:

UnityException: Failed to run reference rewriter with command --target="Temp\StagingArea\PeerConnectionClientCore.dll"

Do you know how to solve?

Crash when no microphone is attached

Hi all!
The desktop UWP app crashes when it starts without a microphone connected. Does someone know what causes this? Help is much appreciated.

Missing namespace: UnityPlayer, WinRTBridge, AppCallBacks.

hi, I'm interested in WebRTC with Hololens. I tried to build WebRTC.UnityD3D on Visual Studio 2017 ( Release / x86 build mode) following the instruction but I failed and received errors telling that: UnityPlayer, WinRTBridge, AppCallBacks namespaces were missing. Do you have any suggestion? I look forward for your response.
Thanks.

Now I have a question about the number of video frames.

When I used hololens to communicate with PC, I found that the pictures received by PC were very cartoon and the number of frames was very low, but I found that if the resolution was reduced, the number of frames would be higher, but the pictures received would be very unclear. Is there any good way?

Mixed Reality Capture for HoloLens

Hi, thank you for examples.

I made a call between laptop and hololens and noticed that hololens sends plain video without holograms.
Will you enable mixed reality capture on hololens?

Missing Prefabs in PeerCCUnity project

@jamescadd Are there docs explaining the script components necessary to rebuild the PeerCCScene prefabs? RemoteVideoSurface and LocalVideoSurface are both broken with missing prefabs, and there's a Missing Prefab child object of Cursor, and I don't know what it should be or how to recreate it. Am I missing a .unitypackage from another repo like HoloToolkit?

cheers!

System.AccessViolationException

Hi all!

I am trying to use the PeerCC sample on two hololenses. They can both connect to the server and see each other in the list. However, when I press call they both crash. When debugging I get this error:

An unhandled exception of type 'System.AccessViolationException' occurred in PeerCC.
Attempted to read or write protected memory. This is often an indication that other memory is corrupt.

I am unsure what could cause this, maybe someone has an idea.

Thank you in advance!

Cannot streaming video

Hello! I tried to video-chat between two different machine.

They get the ip from same ip router and have different ip address.

Running server using peerconnect-server.exe file and connecting each other is OK. But I cannot see any Available Peers on ListView.

What did I do wrong? Anything missing?


I confused about server and client. Sorry for not good ask.

Capturing not stopping after ending call - PeerCC

Hi all!
I'm facing a strange problem where when a call is ended the camera does not turn off on the hololens, and the recording icon in the top left corner is still blinking. This causes the next initiated call to crash the app. But this problem only happens after I integrated it into my own app, in the PeerCC sample it works just fine. However I didn't change anything about the dll's or anything in the control script that would affect this.
Has anyone had a similar problem?

Stuttering every few seconds causing more latency

Hi all!
What has been happening to me is that the video stream from the hololens on PC will stutter every few seconds, causing a 1-2 second freeze in the video (audio is fine), which then causes the stream after to be delayed by that many more seconds. So every time a stutter happens latency gets even worse.
Do you know what could be causing this?

Cleaned up code in DataChannelOrtc (not doing pull because no responses from anyone here).

For anyone interested in the data channel sample, here is the cleaned up code. I didn't bother with a pull request because I've noticed Microsoft isn't devoting much attention to this project.

using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.ComponentModel;
using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Runtime.InteropServices.WindowsRuntime;
using System.Threading.Tasks;
using Org.Ortc;
using Windows.Foundation;
using Windows.Foundation.Collections;
using Windows.Networking;
using Windows.Networking.Connectivity;
using Windows.UI.Xaml;
using Windows.UI.Xaml.Controls;
using Windows.UI.Xaml.Controls.Primitives;
using Windows.UI.Xaml.Data;
using Windows.UI.Xaml.Input;
using Windows.UI.Xaml.Media;
using Windows.UI.Xaml.Navigation;
using DataChannelOrtc.Signalling;

// The Blank Page item template is documented at http://go.microsoft.com/fwlink/?LinkId=402352&clcid=0x409

namespace DataChannelOrtc
{
///


/// An empty page that can be used on its own or navigated to within a Frame.
///

public sealed partial class MainPage : Page, INotifyPropertyChanged
{
RTCIceGatherer _gatherer;
RTCIceTransport _ice; // Ice transport for the currently selected peer.
RTCDtlsTransport _dtls;
RTCSctpTransport _sctp;
RTCDataChannel _dataChannel; // Data channel for the currently selected peer.
bool _isInitiator = false; // True for the client that started the connection.

    RTCDataChannelParameters _dataChannelParams = new RTCDataChannelParameters
    {
        Label = "channel1",
        Negotiated = false,
        Ordered = true,
        Protocol = "ship"
    };

    Signaler _signaler;

    public ObservableCollection<Peer> Peers = new ObservableCollection<Peer>();

    public event PropertyChangedEventHandler PropertyChanged;

    private Peer _selectedPeer;
    public Peer SelectedPeer
    {
        get { return _selectedPeer; }
        set
        {
            if (_selectedPeer == value)
                return;

            var oldValue = _selectedPeer;
            _selectedPeer = value;
            OnPropertyChanged(nameof(SelectedPeer));

            SelectedPeerChanged(oldValue, value);
        }
    }

    private string _message = string.Empty;
    public string Message
    {
        get { return _message; }
        set
        {
            if (_message == value)
                return;

            _message = value;
            OnPropertyChanged(nameof(Message));
        }
    }

    private string _conversation = string.Empty;
    public string Conversation
    {
        get { return _conversation; }
        set
        {
            if (_conversation == value)
                return;

            _conversation = value;
            OnPropertyChanged(nameof(Conversation));
        }
    }

    private bool _isSendEnabled = false;
    public bool IsSendEnabled
    {
        get { return _isSendEnabled; }
        set
        {
            if (_isSendEnabled == value)
                return;

            _isSendEnabled = value;
            OnPropertyChanged(nameof(IsSendEnabled));
        }
    }

    public MainPage()
    {
        this.InitializeComponent();

        this.Loaded += MainPage_Loaded;
    }

    private async void MainPage_Loaded(object sender, RoutedEventArgs e)
    {
        Ortc.Setup();
        Settings.ApplyDefaults();

        var name = GetLocalPeerName();
        Debug.WriteLine($"Connecting to server from local peer: {name}");

        // MP! server connection:
        _signaler = new TcpSignaler("my.signaling.server.ip", "8888", name);

        _signaler.Connected += Signaler_Connected;
        _signaler.ConnectionFailed += Signaler_ConnectionFailed;
        _signaler.PeerConnected += Signaler_PeerConnected;
        _signaler.PeerMessage += Signaler_MessageFromPeer;

        // It's important to run the below asynchronously for now as it blocks the current thread while waiting for socket data.
        await _signaler.Connect();

        //Task.Run(() =>
        //{
        //    _signaler.Connect();
        //});

    }

    private void Signaler_Connected(object sender, EventArgs e)
    {
        Debug.WriteLine("Signaler connected to server.");
    }

    private void Signaler_ConnectionFailed(object sender, EventArgs e)
    {
        Debug.WriteLine("Server connection failure.");
    }

    private async void SelectedPeerChanged(Peer oldPeer, Peer peer)
    {
        // When the selected peer changes tear down the old datachannel and prepare for a new connection.
        if (_dataChannel != null)
        {
            _dataChannel.Close();
            _sctp.Stop();
            _dtls.Stop();
            _ice.Stop();
        }


        Conversation = string.Empty;
        Message = string.Empty;
        IsSendEnabled = false;

        await InitializeORTC();
    }

    private async Task InitializeORTC()
    {
        var gatherOptions = new RTCIceGatherOptions()
        {
            IceServers = new List<RTCIceServer>()
            {
                new RTCIceServer { Urls = new string[] { "stun.l.google.com:19302" }  },
                new RTCIceServer { Username = "redmond", Credential = "redmond123", CredentialType = RTCIceGathererCredentialType.Password, Urls = new string[] { "turn:turn-testdrive.cloudapp.net:3478?transport=udp" } }
            }
        };

        _gatherer = new RTCIceGatherer(gatherOptions);
        _gatherer.OnStateChange += IceGatherer_OnStateChange;

        _gatherer.OnLocalCandidate += async (candidate) =>
        {
            await _signaler.SendToPeer(SelectedPeer.Id, candidate.Candidate.ToJsonString());
        };

        var cert = await RTCCertificate.GenerateCertificate();

        _ice = new RTCIceTransport(_gatherer);
        _ice.OnStateChange += IceTransport_OnStateChange;

        _dtls = new RTCDtlsTransport(_ice, new RTCCertificate[] { cert });
        _dtls.OnStateChange += Dtls_OnStateChange;

        _sctp = new RTCSctpTransport(_dtls);
    }

    private async void Signaler_PeerConnected(object sender, Peer peer)
    {
        Debug.WriteLine($"Peer connected {peer.Name}");

        await Dispatcher.RunAsync(Windows.UI.Core.CoreDispatcherPriority.Normal, () =>
        {
            Peers.Add(peer);
            if (SelectedPeer == null)
                SelectedPeer = peer;
        });
    }

    private async void Signaler_MessageFromPeer(object sender, Peer peer)
    {
        var message = peer.Message;

        if (message.Contains("OpenDataChannel"))
        {
            // A peer has let us know that they have begun initiating a data channel.  In this scenario,
            // we are the "remote" peer so make sure _isInitiator is false.  Begin gathering ice candidates.
            _isInitiator = false;
            await OpenDataChannel(peer);    // TODO: This is incorrect - message is definitely not the peer's name.
            return;
        }

        if (message.Contains("IceCandidate"))
        {
            var remoteCandidate = RTCIceCandidate.FromJsonString(message);
            _ice.AddRemoteCandidate(remoteCandidate);

            // TODO: Notify the ice transport when gathering is complete via the line below so it can change state.
            //_ice.AddRemoteCandidate(new RTCIceCandidateComplete());
            return;
        }

        if (message.Contains("IceParameters"))
        {
            var iceParameters = RTCIceParameters.FromJsonString(message);
            // Start the ice transport with the appropriate role based on whether this is the initiator of the call.
            var role = _isInitiator ? RTCIceRole.Controlling : RTCIceRole.Controlled;
            _ice.Start(_gatherer, iceParameters, role);
            return;
        }

        if (message.Contains("DtlsParameters"))
        {
            var dtlsParameters = RTCDtlsParameters.FromJsonString(message);
            _dtls.Start(dtlsParameters);
            return;
        }

        // this order guarantees: 
        if (message.Contains("SctpCapabilities"))
        {
            // Message ordering: alice -> bob; bob.start(); bob -> alice; alice.start(); alice -> datachannel -> bob
            var sctpCaps = RTCSctpCapabilities.FromJsonString(message);

            if (!_isInitiator)
            {
                Debug.WriteLine("Receiver: Waiting for OnDataChannel event and starting sctp.");

                // The remote side will receive notification when the data channel is opened.
                _sctp.OnDataChannel += Sctp_OnDataChannel;

                _sctp.Start(sctpCaps);

                var caps = RTCSctpTransport.GetCapabilities();
                await _signaler.SendToPeer(peer.Id, caps.ToJsonString());
            }
            else
            {
                // The initiator has received sctp caps back from the remote peer, which means the remote peer
                // has already called sctp.start().  It's now safe to open a data channel, which will fire the
                // Sctp_OnDataChannel event on the remote side.
                Debug.WriteLine("Initiator: Creating the data channel and starting sctp.");

                _sctp.Start(sctpCaps);
                _dataChannel = new RTCDataChannel(_sctp, _dataChannelParams);
                _dataChannel.OnMessage += DataChannel_OnMessage;
                _dataChannel.OnError += DataChannel_OnError;

                await Dispatcher.RunAsync(Windows.UI.Core.CoreDispatcherPriority.Normal, () =>
                {
                    IsSendEnabled = true;
                });
            }
        }
    }

    private void DataChannel_OnError(ErrorEvent evt)
    {
        Debug.WriteLine("DataChannel error: " + evt.Error);
    }

    private void DataChannel_OnMessage(RTCMessageEvent evt)
    {
        Debug.WriteLine("DataChannel message: " + evt.Data.Text);

        AppendConversation(evt.Data.Text, false);
    }

    private async void AppendConversation(string text, bool isLocal)
    {
        await Dispatcher.RunAsync(Windows.UI.Core.CoreDispatcherPriority.Normal, () =>
        {
            Conversation += Environment.NewLine + (isLocal ? "Local " : "Remote ") + DateTime.Now.ToString() + ": " + text;
        });
    }

    /// <summary>
    /// Estabilishes a DataChannel with the parameter peer.
    /// </summary>
    private async Task OpenDataChannel(Peer peer)
    {
        Debug.WriteLine($"Opening data channel to peer: {peer.Name}");

        Conversation = string.Empty;

        Debug.WriteLine("Ice: Gathering candidates.");
        _gatherer.Gather(null);

        var iceParams = _gatherer.GetLocalParameters();
        await _signaler.SendToPeer(SelectedPeer.Id, iceParams.ToJsonString());

        var dtlsParams = _dtls.GetLocalParameters();
        await _signaler.SendToPeer(SelectedPeer.Id, dtlsParams.ToJsonString());

        // this order guarantees: alice -> bob; bob.start(); bob -> alice; alice.start(); alice -> datachannel -> bob
        if (_isInitiator)
        {
            var sctpCaps = RTCSctpTransport.GetCapabilities();
            await _signaler.SendToPeer(SelectedPeer.Id, sctpCaps.ToJsonString());
        }
    }

    private void Dtls_OnStateChange(RTCDtlsTransportStateChangedEvent evt)
    {
        Debug.WriteLine("Dtls State Change: " + evt.State);
    }

    private void IceTransport_OnStateChange(RTCIceTransportStateChangedEvent evt)
    {
        Debug.WriteLine("IceTransport State Change: " + evt.State);
    }

    private void IceGatherer_OnStateChange(RTCIceGathererStateChangedEvent evt)
    {
        Debug.WriteLine("IceGatherer State Change: " + evt.State);
    }

    private async void Sctp_OnDataChannel(RTCDataChannelEvent evt)
    {
        Debug.WriteLine("Sctp OnDataChannel");
        _dataChannel = evt.DataChannel;
        _dataChannel.OnMessage += DataChannel_OnMessage;
        _dataChannel.OnError += DataChannel_OnError;

        // Data channel is now open and ready for use.  This will fire on the receiver side of the call; send
        // a message back to the initiator.
        //_dataChannel.Send("Hello data channel!");

        await Dispatcher.RunAsync(Windows.UI.Core.CoreDispatcherPriority.Normal, () =>
        {
            IsSendEnabled = true;
        });
    }

    private void uxSend_Click(object sender, RoutedEventArgs e)
    {
        if (string.IsNullOrEmpty(Message))
            return;

        AppendConversation(Message, true);
        _dataChannel.Send(Message);
        Message = string.Empty;
    }

    void OnPropertyChanged(string propertyName)
    {
        if (PropertyChanged != null)
            PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
    }

    /// <summary>
    /// Constructs and returns the local peer name.
    /// </summary>
    /// <returns>The local peer name.</returns>
    private string GetLocalPeerName()
    {
        var hostname = NetworkInformation.GetHostNames().FirstOrDefault(h => h.Type == HostNameType.DomainName);
        string ret = hostname?.CanonicalName ?? "<unknown host>";
        ret = ret + "-dual";
        return ret;
    }

    private async void uxConnectToPeer_Click(object sender, RoutedEventArgs e)
    {
        if (SelectedPeer == null)
            return;

        _isInitiator = true;

        // Signal to the peer that we're going to open a connection.  This gives the peer the opportunity to
        // begin gathering ice candidates immediately.  On the remote peer side, _isInitiator will remain false.

        await _signaler.SendToPeer(SelectedPeer.Id, "OpenDataChannel");

        await OpenDataChannel(SelectedPeer);
    }
}

}

Access to peerconnection_server source code?

Hi!

I'm wondering if there is any way to get access to the source code of the peerconnection_server instead of just a built version, as I'm interested in some of its functionalities.

Thanks in advance!

Any documentation?

Hi, I want to use this library in an Hololens-Application to implement Voice-Chat, but I can't find any documentation on how to use it.
The Chatter-Box example is very complicated to get behind in my opinion, especially when you don't know where to start to have a look at.
So do you have any pointers/ am I failing to find the docs?

docs/ instructions

I'm adding code to the WrapperGlue project and want to expose it via the Org.WebRtc dll but i'm struggling to figure out how to do this. All the files under the wrapper directory have

//Generated by zsLibEventingTool

.. at the top but I can't find any instructions on how to run this to generate the files in the wrapper - rebuilding the project (which is what it says to do in the readme.txt file) isn't generating new wrapper code. Are there any docs for this? The docs in the solution folder are just empty templates.

releases/m71 not building

The m71 branch isn't building the native project. Is it supposed to be building or is it a work in progress?

1>FAILED: obj/modules/audio_device/audio_device_impl/audio_device_impl.obj 1>../../third_party/llvm-build/Release+Asserts/bin/clang-cl.exe /nologo /showIncludes @obj/modules/audio_device/audio_device_impl/audio_device_impl.obj.rsp /c ../../modules/audio_device/audio_device_impl.cc /Foobj/modules/audio_device/audio_device_impl/audio_device_impl.obj /Fd"obj/modules/audio_device/audio_device_impl_cc.pdb" 1>../../modules/audio_device/audio_device_impl.cc(22,10): fatal error : 'audio_device_wasapi_win.h' file not found 1>#include "audio_device_wasapi_win.h" 1> ^~~~~~~~~~~~~~~~~~~~~~~~~~~ 1>1 error generated. 1>[404/3009] CXX obj/modules/audio_device/audio_device_impl/audio_device_dummy.obj 1>[405/3009] CXX obj/modules/audio_mixer/audio_frame_manipulator/audio_frame_manipulator.obj 1>[406/3009] CXX obj/modules/audio_mixer/audio_mixer_impl/default_output_rate_calculator.obj 1>[407/3009] CXX obj/modules/audio_device/audio_device_impl/file_audio_device_factory.obj 1>[408/3009] CXX obj/modules/audio_device/audio_device_impl/test_audio_device.obj 1>[409/3009] CXX obj/modules/audio_mixer/audio_mixer_impl/frame_combiner.obj 1>[410/3009] CXX obj/modules/audio_device/audio_device_impl/audio_device_wasapi_win.obj 1>FAILED: obj/modules/audio_device/audio_device_impl/audio_device_wasapi_win.obj 1>../../third_party/llvm-build/Release+Asserts/bin/clang-cl.exe /nologo /showIncludes @obj/modules/audio_device/audio_device_impl/audio_device_wasapi_win.obj.rsp /c ../../modules/audio_device/win/audio_device_wasapi_win.cc /Foobj/modules/audio_device/audio_device_impl/audio_device_wasapi_win.obj /Fd"obj/modules/audio_device/audio_device_impl_cc.pdb" 1>In file included from ../../modules/audio_device/win/audio_device_wasapi_win.cc:27: 1>../..\modules/audio_device/win/audio_device_wasapi_win.h(34,16): error : no member named 'Devices' in namespace 'Windows' 1>using Windows::Devices::Enumeration::DeviceClass; 1> ~~~~~~~~~^ 1>../..\modules/audio_device/win/audio_device_wasapi_win.h(35,16): error : no member named 'Devices' in namespace 'Windows' 1>using Windows::Devices::Enumeration::DeviceInformation; 1> ~~~~~~~~~^ 1>../..\modules/audio_device/win/audio_device_wasapi_win.h(36,16): error : no member named 'Devices' in namespace 'Windows' 1>using Windows::Devices::Enumeration::DeviceInformationCollection; 1> ~~~~~~~~~^ 1>../..\modules/audio_device/win/audio_device_wasapi_win.h(37,16): error : no member named 'Media' in namespace 'Windows' 1>using Windows::Media::Devices::DefaultAudioRenderDeviceChangedEventArgs; 1> ~~~~~~~~~^ 1>../..\modules/audio_device/win/audio_device_wasapi_win.h(38,16): error : no member named 'Media' in namespace 'Windows' 1>using Windows::Media::Devices::DefaultAudioCaptureDeviceChangedEventArgs; 1> ~~~~~~~~~^ 1>../..\modules/audio_device/win/audio_device_wasapi_win.h(39,16): error : no member named 'Media' in namespace 'Windows' 1>using Windows::Media::Devices::AudioDeviceRole; 1> ~~~~~~~~~^ 1>../..\modules/audio_device/win/audio_device_wasapi_win.h(40,16): error : no member named 'Media' in namespace 'Windows' 1>using Windows::Media::Devices::MediaDevice; 1> ~~~~~~~~~^ 1>../..\modules/audio_device/win/audio_device_wasapi_win.h(102,1): error : unknown type name 'ref' 1>ref class DefaultAudioDeviceWatcher; 1>^ 1>../..\modules/audio_device/win/audio_device_wasapi_win.h(102,5): error : expected unqualified-id 1>ref class DefaultAudioDeviceWatcher; 1> ^ 1>../..\modules/audio_device/win/audio_device_wasapi_win.h(121,25): error : extra qualification on member '~ScopedCOMInitializer' [-Werror,-Wmicrosoft-extra-qualification] 1> ScopedCOMInitializer::~ScopedCOMInitializer() { 1> ~~~~~~~~~~~~~~~~~~~~~~^ 1>../..\modules/audio_device/win/audio_device_wasapi_win.h(160,30): error : extra qualification on member 'ActivateAudioClientAsync' [-Werror,-Wmicrosoft-extra-qualification] 1> AudioInterfaceActivator::ActivateAudioClientAsync(LPCWCHAR deviceId, 1> ~~~~~~~~~~~~~~~~~~~~~~~~~^ 1>../..\modules/audio_device/win/audio_device_wasapi_win.h(171,12): error : unknown type name 'ref' 1> friend ref class DefaultAudioDeviceWatcher; 1> ^ 1>../..\modules/audio_device/win/audio_device_wasapi_win.h(171,16): error : expected member name or ';' after declaration specifiers 1> friend ref class DefaultAudioDeviceWatcher; 1> ~~~~~~~~~~ ^ 1>../..\modules/audio_device/win/audio_device_wasapi_win.h(325,5): error : unknown type name 'int32' 1> int32 StartObserverThread(); 1> ^ 1>../..\modules/audio_device/win/audio_device_wasapi_win.h(326,5): error : unknown type name 'int32' 1> int32 StopObserverThread(); 1> ^ 1>../..\modules/audio_device/win/audio_device_wasapi_win.h(330,49): error : no member named 'Media' in namespace 'Windows' 1> bool CheckBuiltInCaptureCapability(Windows::Media::Effects::AudioEffectType) const; 1> ~~~~~~~~~^ 1>../..\modules/audio_device/win/audio_device_wasapi_win.h(331,48): error : no member named 'Media' in namespace 'Windows' 1> bool CheckBuiltInRenderCapability(Windows::Media::Effects::AudioEffectType) const; 1> ~~~~~~~~~^ 1>../..\modules/audio_device/win/audio_device_wasapi_win.h(361,32): error : unknown type name 'DeviceClass' 1> int32_t _RefreshDeviceList(DeviceClass cls); 1> ^ 1>../..\modules/audio_device/win/audio_device_wasapi_win.h(362,30): error : unknown type name 'DeviceClass' 1> int16_t _DeviceListCount(DeviceClass cls); 1> ^ 1>EXEC : fatal error : too many errors emitted, stopping now [-ferror-limit=] 1>20 errors generated. 1>[411/3009] CXX obj/modules/audio_mixer/audio_mixer_impl/audio_mixer_impl.obj 1>[412/3009] CXX obj/modules/audio_processing/audio_processing/echo_control_mobile_impl.obj 1>ninja: build stopped: subcommand failed. 1> 1>EXEC : �[91mCRITICAL error : Building webrtc in D:\webrtcuwp\webrtc-uwp-sdk has failed"s�[0m 1> 1> 1>�[91mFAILURE: Building WebRtc library has failed�[0m 1>

Cannot build the project with SDK 17134, Cannot run with 16299

Hi, I have issues making this work.

First Try with SDK 17134

First, I could not build the "PeerConnectionClientUnity" project in Visual Studio 2017.
I have Unity 2017.4.1 installed with .NET Scripting Backend.
When I opened the solution I had to retarget everything to newer SDK 1713, which was recommended for this project.

The problem appears while building Assebly-CSharp project, where SerialisationWeaver exits with code 1. I used that same command and found out that it is missing project.lock.json file. This file does not exist at the desired location. I found out that the project.json disappears when retargeting the solution.

Second Try with SDK 16299

So, I installed the Windows SDK 16299 which is the original one for the downloaded project. This time, I could succesfully build and deploy project to the Hololens, but the application does not start properly. All I see is a blue window.

Any advice?

Error:System.Exception:No Such host is known (HRESULT: 0x80072AF9)

Hi, when I run the application in HoloLens I am receiveing the following error, written in big red letters:

Error:System.Exception:No Such host is known (HRESULT: 0x80072AF9)

I have Unity 2017.4.1f installed in C:\program files\Unity
The scripting backend is installed
Using VS 2017
No compilation errors

Alternative WebRTC server

Hi -

Thank you for this project. Trying to get it to run on Windows 10 IoT on a Raspberry Pi 3 - and that has gone well - I think. I cannot get two clients to connect to a room, only one.

I'm trying to use the sample as-is, and see that it use the demo of the apprtc server. I don't know if that is the reason why I cannot connect two clients/peers to the same room. (in fact, I cannot even do it directly on the app.tc website, with two different devices). Any clue as to why this is happening?

Thanks,
Anders

Heartbeat timer?

Hi,
many thanks for example. I would like to ask you, why you send some data from server every 10 seconds? What is the purpose of it?

Exception creating video track after Windows 10 update 10.0.17713

Not for the first time a Windows 10 update seems to have suddenly killed my C# WebRTC project. Specifically this time I'm now seeing a C++ exception in Media::GetUserMedia() while the video track is being created - WinRT originate error - 0xC00D36B3 : 'The stream number provided was invalid.'.

The last entries from the log are:

(Media.cc:545): Creating video track.
(video_capture_sink_winuwp.cc:503): webrtc::videocapturemodule::VideoCaptureStreamSinkWinUWP::IsMediaTypeSupported: Capture stream sink error: -1072875843
(video_capture_winuwp.cc:459): CaptureDevice::StartCapture: returning
(webrtcvideocapturer.cc:279): Camera '\\?\USB#VID_046D&PID_0825&MI_00#6&2deca984&3&0000#{e5323777-f976-4f5b-9b55-b94699c46e44}\{bbefb6c7-2fc4-4139-bb8b-a58bba724083}' started with format 24BG 176x144x30, elapsed time 880 ms
(messagequeue.cc:534): Message took 880ms to dispatch. Posted from: webrtc::PeerConnectionFactoryProxyWithInternal<class webrtc::PeerConnectionFactoryInterface>::CreateVideoSource@C:\WebRtc\Proj\default2\5\ortclib-sdk\webrtc\xplatform\webrtc\webrtc/api/peerconnectionfactoryproxy.h:57
(Media.cc:551): Adding video track to stream.
(video_capture_winuwp.cc:523): Video Capture - Media sample received - video frame length: 76032, capture time : 0
(webrtcvideocapturer.cc:336): Captured frame size 176x144. Expected format 24BG 176x144x30

I'm using v1.62.0.7 of Webrtc Lib.

The above happens for a Logitech C270. The last logging for an Advent Full HD1080p camera is:

(Media.cc:545): Creating video track.
(video_capture_winuwp.cc:459): CaptureDevice::StartCapture: returning
(webrtcvideocapturer.cc:279): Camera '\\?\USB#VID_0BDA&PID_58B0&MI_00#6&25249c4a&0&0000#{e5323777-f976-4f5b-9b55-b94699c46e44}\GLOBAL' started with format NV12 176x144x30, elapsed time 853 ms
(messagequeue.cc:534): Message took 854ms to dispatch. Posted from: webrtc::PeerConnectionFactoryProxyWithInternal<class webrtc::PeerConnectionFactoryInterface>::CreateVideoSource@C:\WebRtc\Proj\default2\5\ortclib-sdk\webrtc\xplatform\webrtc\webrtc/api/peerconnectionfactoryproxy.h:57
(Media.cc:551): Adding video track to stream.

Streaming a different video

Hi all!
Is it possible to stream a different video than the one automatically captured by webRTC? For example from a file or a different video that is being created live other than the webcam capture?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.