AgoraIO-Community/Agora-RTC-SDK-for-Xamarin

Screen Sharing - EglCore, EglThreadContext etc.

Closed this issue · 5 comments

Hello, I would like to ask - I am trying to implementing Screen Sharing to our Xamarin.Forms app. In the Agora Android samples they are heavily using EglCore, EglThreadContext and other Java classes that are not part of the nuget package. I wonder, are these part of the Agora original packages - something that should be also served as a nuget package?

Screenshot 2020-05-19 at 09 50 31

Screenshot 2020-05-19 at 09 48 18

Screenshot 2020-05-19 at 09 48 05

@JakubHolovsky Hey!
I guess the classes you need are accessible in the latest 3.0.0.2 package

image

This sample you probably mentioned (https://github.com/AgoraIO/Advanced-Video/blob/master/Android/sample-switch-external-video/src/main/java/io/agora/advancedvideo/switchvideoinput/SwitchVideoInputActivity.java) is using both Agora SDK classes as well as custom (in the sample) classes in the advancedvideo namespace

EglCore is the sample-level custom class that uses only system libraries
https://github.com/AgoraIO/Advanced-Video/blob/master/Android/lib-component/src/main/java/io/agora/advancedvideo/gles/core/EglCore.java

image

In other words, what exactly is missing from the Agora Android SDK?

Regarding "should they be a part of a Xamarin android package" - good question.

Hello Alex, yep, I am wondering if maybe EglCore should be part of the Android package.

Hello Alex, I had a call today with Casey Niemann, the updates of the upcoming Android binding looks good. However we are wondering if this:

image

could be maybe a part of the nuget package as well, it would make the Screen Sharing so much easier, especially since this is part of the Agora examples. What do you think?

However this would still mean putting there the EglCore etc.

image

Just to keep the thread updated, after discussing this issue we agreed that these classes/libraries won't make into Xamarin Android Agora SDK.

TLDR, there are pros and cons and it looks like there are more disadvantages to including these classes for now.

Pros:

  • less hassle for SDK users when updating to a new version (an update for Xamarin SDK will require 2 more steps - get the jar out, compile that extra java lib into jar, pack it back into Xamarin binding)
  • easier for new Agora users to add screen sharing to an Android app.

Cons:

  • even though the code is rather standard it is still custom and relies on having RtcEngine accessible somewhere. So it forces you to build an app in a specific way. What if you have 2 RtcEngine instances (that happens rather often)?
  • an unclear path on how to customize that code once it is in the Xamarin Android Agora SDK. Basically you go back to square 1.