8000 Enable Android simulcast by hiroshihorie · Pull Request #731 · flutter-webrtc/flutter-webrtc · GitHub
[go: up one dir, main page]

Skip to content

Enable Android simulcast #731

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

Merged
merged 3 commits into from
Oct 20, 2021

Conversation

hiroshihorie
Copy link
Member
@hiroshihorie hiroshihorie commented Oct 19, 2021

Credits to Shiguredo, Inc. Thank you very much @voluntas for the great work. Flutter users will appreciate and benefit from this.
https://github.com/shiguredo/sora-android-sdk/blob/develop/sora-android-sdk/src/main/kotlin/jp/shiguredo/sora/sdk/codec/SimulcastVideoEncoderFactoryWrapper.kt

This PR will turn on Kotlin used by SimulcastVideoEncoderFactoryWrapper.kt. I'm not sure if there are any side-effects @cloudwebrtc pls let me know. @davidzhao @davidliu

@hiroshihorie hiroshihorie marked this pull request as draft October 19, 2021 17:39
@hiroshihorie hiroshihorie marked this pull request as ready for review October 19, 2021 18:15
@hiroshihorie hiroshihorie marked this pull request as draft October 19, 2021 18:26
@hiroshihorie hiroshihorie marked this pull request as ready for review October 19, 2021 20:01
@hiroshihorie
Copy link
Member Author

Confirmed this works.
SimulcastEncoderAdapter (HWEncoder, HWEncoder, HWEncoder), googFrameWidthInput: 720...
appears in the logs.

Copy link
Member
@davidzhao davidzhao left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

great work!

@cloudwebrtc
Copy link
Member

This PR is great, but I want to confirm whether the size of the compiled app will be smaller if the plug-in compiled with java is used. If the size is improved, I will consider rewriting to the java version later, but I will still merge this PR first, Thank you for your contribution.

@cloudwebrtc cloudwebrtc merged commit dcf3b7c into flutter-webrtc:master Oct 20, 2021
@hiroshihorie
Copy link
Member Author
hiroshihorie commented Oct 20, 2021

Is the size increase huge? I was even thinking we can slowly start to migrate Java to Kotlin. Which I think long term will have more contributors. Even Objc to Swift for long term I think will have more contributors interested. What do you think? @cloudwebrtc @davidzhao No need to rush at all tho.

@hiroshihorie
Copy link
Member Author
hiroshihorie commented Oct 20, 2021

But since that piece of code is small, it also makes sense to re-write in Java for now (If there are benefits). And we can think about Kotlin/Swift migration another time. Your call @cloudwebrtc

@cloudwebrtc
Copy link
Member

Migrating to Kotlin/Swift is a general trend, which will require a complete rewrite of the native code of the plugin.
I think we can put it in 2.0. Recently I will implement the Linux Desktop so that 1.0 can be released, and then we can do code refactoring.

@cloudwebrtc
Copy link
Member

BTW, I also tried Simulcast on Samsung S20, it works, @hiroshihorie work is really great.

@hiroshihorie
Copy link
Member Author
hiroshihorie commented Oct 20, 2021

Yes Simulcast works on both iOS and Android now. Many thanks to Shiguredo, Inc. @cloudwebrtc, and of course LiveKit team, Flutter users can now benefit from a more powerful WebRTC package.

@cloudwebrtc
Copy link
Member
cloudwebrtc commented Oct 20, 2021

Yes, the honor belongs to Shiguredo, Inc, and LiveKit team, thanks again.

@hiroshihorie
Copy link
Member Author

Thanks for your great work too @cloudwebrtc !!
Btw, can you document how to modify the macOS framework ? So my next build will be good.
I still find it weird Xcode produced framework is "malformed" or is it just Flutter/Cocoapods side issue?

@cloudwebrtc
Copy link
Member
cloudwebrtc commented Oct 20, 2021

I added in this document how to correctly create the framework for macOS,
webrtc-sdk/webrtc-build@f358361

The important part is to move the merged (arm64/x64) WebRTC binary file to Versions/Current/WebRTC, and use a software symbolic link to Versions/Current/WebRTC in the original location.

In addition, the compressed file must use the following command to ensure that the symbolic links in the compressed file remain intact.
zip --symlinks -9 -r WebRTC.xcframework.zip WebRTC.xcframework

@hiroshihorie
Copy link
Member Author

@cloudwebrtc ah ok thanks!

@davidzhao
Copy link
Member

Really great to have this! Now we have simulcast on all platforms. 🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants
0