EricssonResearch / openwebrtc

A cross-platform WebRTC client framework based on GStreamer
http://www.openwebrtc.org
BSD 2-Clause "Simplified" License
1.8k stars 537 forks source link

ios / build for armv7s and arm64 #48

Closed iamyellow closed 9 years ago

iamyellow commented 10 years ago

hey! thanks for this great effort! is there any chance to compile for architectures > armv7 for iOS?

sdroege commented 10 years ago

armv7s should be no problem at least from the GStreamer side (but also not too useful). arm64 will need some more changes. Known so far is libffi but there's probably more

stefanalund commented 10 years ago

As Apple is soon requiring 64-bit apps this becomes more important: https://developer.apple.com/news/?id=10202014a

sdroege commented 10 years ago

I'm doing a testbuild with arm64 now to see what kind of fallout there is

stefanalund commented 10 years ago

:+1:

sdroege commented 10 years ago

Fixed all build failures in cerbero, was fairly straightforward to support ARM64. Just some assembly optimizations need to be ported, e.g. in libvpx.

stefanalund commented 10 years ago

Where are we on this?

sdroege commented 10 years ago

It builds but I have no idea if it works. @superdump was going to test that

superdump commented 10 years ago

I tested a build with cerbero git master and everything compiled. Where everything is GStreamer. We still need to get all the OpenWebRTC extra bits building on all platforms and then also test ARM64 with that.

sdroege commented 10 years ago

Did you test if it also worked for something?

superdump commented 10 years ago

Nope. Didn't get to that as I didn't have anything ready to test. :)

sdroege commented 10 years ago

Oh I give you something later :)

superdump commented 10 years ago

If that something were avfvideosrc ! vtenc_h264 ! vtdec ! glimagesink that would be bonus points. ;)

sdroege commented 10 years ago

Or just use gst-launch-remote. Then you can test everything :)

https://coaxion.net/blog/2014/10/gstreamer-remote-controlled-testing-application-for-android-ios-and-more/

sdroege commented 10 years ago

Any luck with that? Otherwise you can also just use any of the tutorials from here: http://cgit.freedesktop.org/~slomo/gst-sdk-tutorials/tree/gst-sdk/tutorials/xcode%20iOS

All this just needs arm64 to be added to the architectures in the project file.

superdump commented 10 years ago

Haven't had time to sit at the computer yet. Perhaps tomorrow.

superdump commented 10 years ago

I am trying the gst-launch-remote iOS app. I changed the architectures from armv7 to arm64, just to be sure that it was only using arm64. videotestsrc ! autovideosink works. I'm now going to play around some more. :smiley:

sdroege commented 10 years ago

Perfect, I assume it basically works then... and that we have no weird linking errors hidden in some plugins (as gst-launch-remote links in basically every single plugin).

If you find any problems with vtdec/vtenc_h264 or something please collect them, but they are probably unrelated to arm64 :)

superdump commented 10 years ago

Is there a way to nuke all existing pipelines and start over without killing the app?

sdroege commented 10 years ago

When you set a new pipeline it will set the current one to NULL state and unref it immediately

superdump commented 10 years ago

Ah, nice!

superdump commented 10 years ago

vtenc_h264/vtdec looks like it needs some tweaks for low-latency real-time use, but otherwise works fine. :grinning:

stefanalund commented 10 years ago

👍

stefanalund commented 10 years ago

Any progress on the 64-bit?

superdump commented 10 years ago

Not more than a bit more testing and some changes to vtenc_h264 to reduce the encoding latency. GStreamer works fine though.

Tonku commented 10 years ago

Great work guys..waiting for 64bit :)

stefanalund commented 10 years ago

Me to @Tonku, cannot move to WKWebView in Bowser since it is unstable on 32 bit: https://github.com/EricssonResearch/bowser/issues/1

mlakkadshaw commented 9 years ago

is 64bit working now?

Thanks

superdump commented 9 years ago

I believe so. I am literally building everything from current cerbero as I write in order to test all the example apps. That will include testing apps using 64-bit on an iPhone 6 Plus. We have identified some bits and pieces that will still need further assembly optimisation specifically for ARM64 but there should be C fallback code if absolutely necessary but we're also working to avoid unnecessary software processing.

stefanalund commented 9 years ago

There are still problems for apps that want to use the JavaScript bridge, such as Bowser and other hybrid apps: https://github.com/EricssonResearch/openwebrtc/issues/177

mlakkadshaw commented 9 years ago

Thanks for the update, sadly my app is a hybrid app which uses javascript bridge, so it will not work in 64bit right?

stefanalund commented 9 years ago

Not yet but it will! We are working on it. Watch the other issue I linked to for progress. In the meantime you can develop using 32-bit only. Look at the sample apps if you're unsure of how the build settings should be set up.

sdroege commented 9 years ago

Most likely not, you can try though, maybe you're lucky and don't run into that specific problem. We're looking into that problem.

mlakkadshaw commented 9 years ago

Thanks. Will try building using Cerebro, hopefully it will build. :)

superdump commented 9 years ago

There was a crash bug in JavaScriptCore on 64-bit that is fixed by updating libffi. However, updating libffi breaks the libffi build for 32-bit arm, at least for iOS. See https://github.com/atgreen/libffi/issues/181

superdump commented 9 years ago

libffi now works with JavaScriptCore on both 32-bit and 64-bit. Use cerbero and it works.