4 ms·
I'm currently integrating the WebRTC interface into a browser-like project by directly calling into their C++ code (when Java is the preferred interface). Most
by Hydraulix989 11y ago
I'm currently integrating the WebRTC interface into a browser-like project by directly calling into their C++ code (when Java is the preferred interface). Most of the process so far has been trial-and-error (especially with hooking up their JNI calls back to Android from C++ land in order to access Android audio device info and state that can't be reached from C++). The code base is quite large and so gaining familiarity with it has been challenging.
I can see how a single engineer's time is necessary for this project, as I've already sunk over a week of work into my own integration, and I've only gotten the peering to work so far (audio is just about there).
Supposedly many years ago, there used to be an example inside the code base of what I am currently trying to pull off, but nevermore.
It is quite challenging to just integrate WebRTC -- one does not simply integrate WebRTC.
- pjmlp 11y ago> especially with hooking up their JNI calls back to Android from C++ land in order to access Android audio device info and state that can't be reached from C++ Good luck with that part. <rant mode="on"> I have been using C++ for hobby coding between Android and WP, and the "friendliness" of the NDK has made be look for solutions that can target Java and .NET instead. Some of those APIs that one needs JNI wrappers, are actually written in C++, just not exposed to the NDK. </rant>
- Hydraulix989 11y agoCurrently working through that now, the issue du jour is that the class loader apparently does not find classes in the APK unless it is called from JNI_OnLoad from the application thread so I am going to have to cache references to the three or so WebRTC Java audio classes that it needs. http://developer.android.com/training/articles/perf-jni.html#faq_FindClass http://developer.android.com/training/articles/perf-jni.html... Because I'm sure everybody on here cares haha.
- Hydraulix989 11y agoWhich means we can call them if we get their memory addresses. Someone with more time than me should write a wrapper to do that.