Compiling WebRTC native client API for RTCDataChannel file sharing - c++

I am trying to build a command-line native application that supports:
native - native
native - browser
browser - browser
file sharing using the WebRTC data channel. However I cannot seem to figure out how to use the native WebRTC c++ API (http://www.webrtc.org/reference/getting-started - successfully got to the end).
I have successfully built the example peerconnection_client & peerconnection_client (on Linux), however the client crashes when trying to share video (I'm not worried, as I only need the data transfer to work, not audio or video). However I have been unable to compile my own app which links into the WebRTC library.

Related

Qt with webRTC how to implement

I need to transfer live desktop screen data(like remote desktop) to a client application a browser, and user can view remote desktop in browser, I am thinking of implementing it with webRTC and Qt. the webRTC data channel I can use to transfer the desktop data. Only problem is how to interface it with QT. When I look in internet I have few methods.
Implement with native c++ webRTC and communicate with the browser. I searched lot to get a working c++ webRTC application but couldn't successfully run.
Implement with Qt webengine and java script. I read documentation about Qt webkit bridge, I hope I can pass data between Qt C++ part and Javascript part without much delay.
And I am not sure is there any good method exist. Please suggest me the right method.

WebRTC native c++ app as win10 service cannot access video source

I have an webRTC (native c++ -> node.js) app which allows screensharing. I've tried to make a windows service from it for easy permissions elevation as well as simple auto-start. I've managed to rewrite it as service but to simplify my example I'll skip that. Let's just say I've used nssm service wrapper to run my app as service.
Whether I run service as local system or my own user, when it gets to the point where I request system for video sources, webRTC return nullptr.
SourceList* sources;
captureScreen = webrtc::DesktopCapturer::CreateScreenCapturer(options);
captureScreen->GetSourceList(&sources); //Return nullptr!
Exception thrown: read access violation.
sources._Mypair._Myval2._Myfirst was nullptr. occurred
When capturing camera instead of screen everything works fine according to this guy and only relevant thread in whole internet I found.
Is there a bug in webRTC/win10? Is there some kind of workaround I can use in order for this to work?
If you are making web based WebRTC app then i think everthing should work fine.
I don't thing there is bug in either WebRTC and Windows while screen sharing.
Make sure you are using Google Chrome for development. (Just an advice)
Your webapp app has permission for capturing windows.
If your are using Google Chrome then make sure you are running the chrome with command line flag "--enable-usermedia-screen-capturing" e.g. on Windows "Chrome.exe --enable-usermedia-screen-capturing"
Screensharing web app using WebRTC - https://www.webrtc-experiment.com/Pluginfree-Screen-Sharing/
Checkout WebRTC projects on GitHub - https://github.com/muaz-khan/WebRTC-Experiment
:)

Access files on client with qml using WebGL

I have written a qml based application on a linux machine which is started with
"-platform webgl" for using on a remote client in the browser with webgl. With the qml FileDialog class I can only access the files from the linux machine, not from the remote client.
How can I archive this?
Maybe I have to write a separate part in the application to handle these remote network access or do I have to use javascript or html5?
Access is controlled by the browser. It's like trying to access local files from the JavaScript code of the webpage.

How can I call an UWP API from a C++ desktop application

I would like to access Bluetooth LE devices using the corresponding UWP APIs. However, my application is a "classic" C++ application (3D game) that can't run as a UWP app. Is there a way to do that? Accorind to enter link description here these APIs are published, but I don't know the steps to access them I have only found some posts for Windows 8/8.1 apps that include the Windows.winmd and Platform.winmd metadata files and set the /ZW compilation flag, but this doesn't seem to apply to Windows 10.
You should be able to do this, as the Bluetooth classes (e.g., BluetoothLEAdvertisement) are marked up with DualApiPartitionAttribute (callable from desktop and UWP apps).
Using one of the older Win8.1 desktop samples should give you a good starting point for calling the APIs without requiring /ZW or referencing the winmd files. A good example is the desktop toast API sample.
If you go that route, you can use classic COM to create the UWP/WinRT classes via WRL helpers.
You can use the web that you make a web server and the C++ application use the same server and if UWP send the info to server then it will send the info to C++ application.
To safe,the UWP can't use the desktop app.

C++ lib for FTP upload over FTP proxy

I'm trying to write a C++ component to upload a file on a FTP server through a FTP proxy (specified by host/port/user/password).
In a first time I tried using Qt (QNetworkAccessManager/QNetworkProxy) but for an unknown reason it does not work (when I try to upload the same file with FileZilla using the same connection parameters, it works). My code also works when I have no proxy.
In a second time, I tried with libcurl but it seems this lib does not support FTP proxy.
Any suggestion of another C++ lib I could try? or a Win32 (winsock) example?
If you're targeting Windows, you can try using the Windows Internet APIs to implement the FTP client. I'd imagine you'll have an easier time using them rather than manually implement an FTP client atop sockets.
I haven't looked at them, but there seem to be a few samples here.