Minimal WebRTC for native application without audio and video - webrtc

I am interested in designing a WebRTC/libjingle that uses DataChannels but does not use the audio and video capability. The audio and video capability adds a lot of dependencies that are large and difficult to cross compile. Is there a minimal subset of the WebRTC build that will separate out just the code necessary for initializing DTLS DataChannels with all the sdp/stun/turn etc while remaining compatible with the browser implementations?

AFAIK there is not such minimal, scaled-down, data-channel only version of libjingle (or OpenWebRTC for that matter). IMHO such a version looks just too project-specific and not general enough for the libjingle developers to be interested in it and maintain it.
The audio/video capabilites do add quite a lot of dependencies. However cross-compiling them for android or iOS is relatively easy. After all one just needs to compile them. There is no need for them to actually work. If one just uses the data channel then the audio/video capabilities will never even be initialized.
Although the audio/video capabilities cannot be completely compiled-out, they can be "curbed". If you look at the the webrtc-source-code/build/common.gypi you will find a variable called build_vp9 that is 1 by default. If you set it to 0 then some video related dependencies will be remove. In the .gyp and .gypi files there are a lot of flags and I am sure that if you tweak them then you'll be able to remove even more unnecessary dependencies.
If you're interested in building webrtc for Raspberry PI or other embedded platforms not based on Android or iOS I would suggest you use OpenWebRTC because it has much better support for these environments and is somewhat easier to cross-compile (you wouldn't have to deal with gyp and ninja).

This is what you need
http://www.meshcommander.com/webrtc
A minimal datachannel WebRTC implementation in c, needs openssl for dtls.
pros
extremely lite.
straight forward cross compilation
cons
no ice trickle support as of now

Related

Protobuf vs binary plists for network trafficking in a iOS game

I'm developing experimental multiplayer roguelike for iOS. Players will be connected via GameKit API and they'll be put in one dungeon. There is various actions that players can perform, so I want to make one device be a host, and to implement some sort of RPC for sending/receiving of this actions (and pretty complicated state of dungeon when game starts)
I need some compact and fast serialization. I'm choosing between protobuf and binary plists. Binary plists looks pretty simple to use for objc objects serialization/deserialization (this is important point, cause its experimental non commercial project), but it looks inefficient. Protobuf looks efficient, but totally alien. Any alternatives?
Edit: just found http://msgpack.org/. Looks like a way to go
Protocol buffer serialization should be faster than binary plist.
Also, if you want to make the game again on android or any other platform then protocol buffers will be your friend. (platform independence)
Working with protocol buffers on ios can be a pain in the beginning. Just setting up the project with XCode takes up a lot of time.
Initially i tried to work with objective c version of protobuf, but i had to drop it completely because of some limitations in the library.
I have now added the google source code directly on Xcode, ands its working perfectly. check out this answer. Through this you'll be able to start working with protobufs in your project easily.

Bonjour communication wrapper for Objective-C?

I've been using MYNetwork by the venerable Jens Alfke for an app of mine that allows devices to connect and share info over the network, it's actually a mission-critical part of the app. I tried writing my own wrapper for all of the C-level stuff you have to do for Bonjour, but it didn't work out so well, so I moved to MYNetwork.
It's been great so far, but the fact it's essentially opaque to me is causing trouble, as is that I want to move over to ARC once we can submit apps with it (there's a lot of Objective-C object references in structs, which ARC hates).
Can anyone recommend a similar wrapper, ideally that allows easy message passing between a client and a server over Bonjour as well as service discovery?
Just a thought- Would using ZeroMQ advertised and discovered by the stock NSNetService suffice? Separating the service pub/sub from the actual communication would allow you to use other bonjour libraries like Avahi on linux too. ZeroMQ is sufficiently simple to make wrapping trivial, yet powerful enough to cope with complex network topologies, fast.
I have experience with both technologies in isolation but not together although I see no reason why it wouldn't work. The only caveat right now is the limited body of collective experience of ZeroMQ use on iOS but I'd expect that to change over time.
You know you can disable ARC for specific files? So, you can just disable ARC for the library, and keep it on for your other files.
Disable Automatic Reference Counting for Some Files

cmakeable version of protocol buffers

StackOverflow community!
I want to embed protocol buffers into some project that supports cmake.
As I undrestood, google doesn't provide this
Any suggestions? Who tried to create cmakeable protocol buffers library?
Are there lots of not cross-platform places at the source or there is no at all.
Where can I take it if it exists?
What else cmakeable is there instead of protocol buffers?
Pls, don't ask me why I don't install protocol buffers, and just use compiled libraries,
I need to embed it inside the project.
If it is really bad idea, then, please, explain why.
I created a set of CMakeLists.txt for protobufs for embedding into our build systems, and offered to contribute these to protobufs, but the people at Google weren't interested.
If you'd like, I can provide them "as-is". They work for 2.2.0, but you will probably have to do some hacking on your own to tweak them for your specific build system.

Supporting rotation sensors in Symbian across multiple devices in one executable

I'm puzzling my head as to how some application appear to support the couple of Rotational Sensor APIs for Symbian, specifically the Sensor API and the Sensor Framework (both the 5th ed. and the 3rd ed. FP2 backport).
For example, I believe that Gravity will support rotation in N95 and also newer models from the same binary (could be wrong there...).
If I use the Sensor Framework then my app will not install on an N95 (it gives me a System Error -1), whereas if I use the Sensor API (RRSensor) then it will only install on an N95 and no other phones. This is most likely due to the available libraries on those devices.
I am trying to find some way of abstracting things such that I can use exactly the same binary for all devices. The only alternative I can see is trying to use ECOM plugins and then installing the relevant library using conditionals in my PKG file.
Does anyone know of a better/easier way?
If you need to use different APIs, I suggest making multiple DLLs that implement the same interface and selectively install them to device depending on device ID. SIS files allow that.

MPSOC : Which OS do you use and why?

I'm working on MPSOC, specially STM ST40 (SH4 base) and ST231 and I'm wondering which OS i can use on these to port a parallel application, I already had a look at STLinux which is the STM distribution of a Linux platform for their MPSOC (which unfortunately doesn't work well for ST231 coprocessors) and I also had a look at OS21 which is a task based OS.
Any information about other RTOS are warmly welcome! (specially those with libc and pthreads :)
Those 4 came to my mind:
MicroC/OS-II: Its free and simple, but i think there are too few good resources available
LibeRTOS: I can recommend that. I used it several times for different projects. It's good it's fast and the dual kernel concept is really well done.
RTLinux: Can't tell you much about that one. Only used it once for a very small project and didn't get deep "behind the scenes" But it was fast and reliable. (and very expensive)
VxWorks: Awesome OS... From Wikipedia:
multitasking kernel with preemptive and round-robin scheduling and fast interrupt response
Memory protection to isolate user applications from the kernel
SMP support
Fast, flexible inter-process communication including TIPC
Error handling framework
Binary, counting, and mutual exclusion semaphores with priority inheritance
Local and distributed message queues
Full ANSI C compliance and enhanced C++ features for exception handling and template support
POSIX PSE52 certified conformance
File system.
IPv6 Networking stack
VxSim simulator
Supports: C/C++/JAVA
If money is no problem: Use VxWorks! You can do anything: Upgrade your fridge, built a war machine or fly to Mars ;-)
Otherwise check out LibeRTOS...
If you really want ot use an RTOS, be prepared to use a native API that is way more efficient and streamlined than pthreads...
I have used Micrium's µC/OS-II on several projects, on SH4 and a couple of different ColdFires. I continue to recommend it for new projects today.
Micrium has just announced a major upgrade to be called µC/OS-III that will add unlimited preemptively scheduled threads, as well as a round-robin scheduler for equal priority threads. It doesn't appear to be for sale yet, however.
If you need the capabilities, they also have a FAT file system, a PEG graphical UI library, USB device and host, and TCP/IP available for additional license fees.
Source code to everything is included in the price, and I've always found their support to be friendly and knowledgeable.
With the processors you mention you seem to be into set-top boxes.
You have the choice between the ST Linux distro, which is not very stable and the OSXX distro, which is proprietary for ST, but much more stable and with nice tools for debugging and the like (I'm not so sure about OSCC and libc/pthreads)
Barebones/AMP - because it allows 100% control and it allows the lowest latency.
Using Linux or FreeRTOS is very comfortable but it comes with a price tag.