-
Notifications
You must be signed in to change notification settings - Fork 209
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Android native call #31
Conversation
c709d6f
to
6da76f2
Compare
For getting rid of the black borders, assuming this is with glimagesink you only need to set force-aspect-ratio to false... and then ideally make sure that your video area has the correct aspect ratio. What do you mean with reregistering a surface? When e.g. the orientation of the app changes, or it is brought to the foreground again? What are you doing then and what happens? |
Setting force-aspect-ratio to false just stretches the image instead, which doesn't really solve the problem. A possible solution would be to be able to get the dimensions of the video, or to make it possible to render with a transparent background, and/or be able to set a property similar to this. I'll have a look at how this works on iOS It's when the orientation changes, for now I just shut everything down when the app is stopped. |
It turns out that the registration works fine when there is a call going, although there's a ~1s delay before it starts rendering in the new view. |
This now also depends on EricssonResearch/openwebrtc#104 |
c4ed975
to
4e6a10a
Compare
Update:
|
30ebae5
to
622b75c
Compare
…ession description is updated
…rprint Change-Id: I980cf41af1ab20edccf4b8ae68eca95c0ed524b0
622b75c
to
556ca93
Compare
e500b3d
to
0e3cd75
Compare
Change-Id: I7d672efa297a5a12974ac3d38ed2d2c59964ca47
Seems to work fine, I guess we could land this. |
Hope Android example could work with http://demo.openwebrtc.io too. |
I was running the app last week towards demo.openwebrtc.io with audio/video working both ways. Is that not the case for you? I'll let someone else answer about HW acceleration on Android. We have it working on iOS 8 at least. |
From what @sdroege tells me, we can use MediaCodec for hardware decoding but for encoding the API is very under-specified with respect to what video format the encoder wants and how frames are stored in memory which makes it not possible to support any device generically. We don't understand why the MediaCodec API is defined so that it can't be used for hardware encoding without device specific guesswork. |
Someone will have to check if anything has changed there, last time I looked was about a year ago. But if something changed that would of course only mean that it will work on even newer devices. It seems like some more encoder related API was added in API level 21 (Lollipop!) |
Doesn't look like something obvious has changed, a lot of encoder related new API but nothing to query which color format with which strides/plane offsets the encoder actually wants. |
@stefanalund I could only saw local preview of camera in Android native example, there is no session id could connect with demo site. |
You put in the same session ID yourself in the app and for example on the web. When two clients has connected to the same session ID the call button should get enabled. |
d64cb08
to
22a264c
Compare
Merged. |
@Rugvip Thanks for building this and getting it merged. I'm trying to get this to run correctly on my Nexus 5 running Android 5.0 against demo.openwebrtc.io:38080 and then I will re-write the signaling piece to get it working with my Janus gateway. But I'm having trouble getting it to work as-is. I built the openwebrtc.jar per the non-cerbero instructions, dropped it into the NativeCall example, and the app built and deployed without trouble. I'm able to input the session ID in the Android app and also in the browser and click "join", and the call buttons become available, but when I click "Call" from either client, video never makes it from one client to the other. If I click call on the Android client, I see this error:
If I click call from the browser(Firefox), I see the Android device gathering remote candidates, but it never seems to close the loop.
The Android device and desktop machine are on the same WiFi network. Do any of these errors look familiar? Do you have any suggestions for what to look for to identify this issue, or how to set up my test for a greater chance of success? |
hmm, there seems to be something wrong with demo.openwebrtc.io, I also have problems connecting two devices myself. We will look at it and get back to you! |
I'm able to use demo.openwebrtc.io just fine with Bowser on iOS. I'm digging into the Android app, and it seems to never generate local candidates - MediaSessionEventListener.onNewCandidate is never called. I'll keep digging and let you know if I make progress. |
After a bit more testing I find that the NativeCall app will generate local candidates and get two-way video set up, but I typically have to let the app sit and wait for about 20 minutes after pressing the Call button before the local candidates are generated and the two-way video starts. @Rugvip have you experienced this? Do you have any suggestions for how to speed up the generation of local candidates? |
It sounds like you've run into this: EricssonResearch/openwebrtc#126. Try applying the workaround mentioned in the issue and see if that helps. I'm building OpenWebRTC for Android using cerbero atm, I'll report back with the result. |
Ah, thanks for bringing this to my attention. I'll give the workaround a try, and also try the cerbero build for Android per the instructions. |
The workaround you provided worked perfectly, thanks. I tried the Android cerbero build but encountered the error below. How the did the cerbero build go for you?
|
Got the same error, haven't had time to do any thorough investigation yet. The issue is that icu needs to be built for the host platform before being cross compiled, and at least the OS X build fails pretty much instantly. |
This requires the following PR to openwebrtc: android-log-filter device-listing-fixes jni-fixes sdp-candidate, and and a server that uses the patch in this PR
sdp.js is currently linked from openwebrtc, which is assumed to have the same parent directory as openwebrtc-examples.
I've found the following issues so far:
Other than that this works for both incoming and outgoing calls to both Firefox, Chrome and OpenWebRTC