izivkov / RemoteVideoCam

MIT License
129 stars 15 forks source link

jcenter shutdown #28

Open linsui opened 3 months ago

linsui commented 3 months ago

https://jfrog.com/blog/jcenter-sunset/

izivkov commented 3 months ago

I created a branch WebRTC to handle this issue. Since org.webrtc:google-webrtc:1.0.32006 is only available from JCenter, the options are to replace this library with something like org.jitsi:webrtc:124.0.0, or include a JAR of google-webrtc in the project. Using org.jitsi:webrtc caused some problems with unresolved functions, so I think I will build the JAR next.

licaon-kter commented 3 months ago

Using org.jitsi:webrtc caused some problems with unresolved functions,

why?

include a JAR of google-webrtc in the project

please don't include binaries

try to use webrtc from Maven, eg. https://central.sonatype.com/artifact/im.conversations.webrtc/webrtc-android/versions

izivkov commented 3 months ago

@licaon-kter @toliuweijing

Thanks for the suggestion.

// implementation 'org.webrtc:google-webrtc:1.0.32006'
implementation "im.conversations.webrtc:webrtc-android:119.0.1"

This builds the project, but I get an error at runtime:

java.lang.UnsatisfiedLinkError: No implementation found for long org.webrtc.SoftwareVideoEncoderFactory.nativeCreateFactory() (tried Java_org_webrtc_SoftwareVideoEncoderFactory_nativeCreateFactory and Java_org_webrtc_SoftwareVideoEncoderFactory_nativeCreateFactory__)
                                                                                                        at org.webrtc.SoftwareVideoEncoderFactory.nativeCreateFactory(Native Method)
                                                                                                        at org.webrtc.SoftwareVideoEncoderFactory.<init>(SoftwareVideoEncoderFactory.java:23)
                                                                                                        at org.webrtc.DefaultVideoEncoderFactory.<init>(DefaultVideoEncoderFactory.java:20)
                                                                                                        at org.avmedia.remotevideocam.display.customcomponents.VideoViewWebRTC.initializePeerConnectionFactory(VideoViewWebRTC.kt:150)

How can Iclude these native libraries? Thanks for your help.

licaon-kter commented 3 months ago

Unfortunately I can't help with the rest of the implementation.

Note that your old webrtc was from Aug 2020 and full of vulnerabilities, that aside, newer versions changed some stuff indeed. Hope you find a way to use it for this app.

izivkov commented 3 months ago

@licaon-kter

Are you OK if we use this library:

org.webrtc:google-webrtc:1.0.30039

from here:

maven {
            url 'https://raw.githubusercontent.com/alexgreench/google-webrtc/master'
        }

Maybe replace it in the future.

licaon-kter commented 3 months ago

No, not really, the list of accepted repos is here (jcenter will be removed soon): https://gitlab.com/fdroid/fdroidserver/-/blob/8cf4503a00f6e0ccb93f5a9089cf660f20b0045b/fdroidserver/scanner.py#L456-L475

also, using a 4 years old webrtc will get you a Knownvuln flag :( , ref: https://gitlab.com/fdroid/fdroiddata/-/merge_requests/11496

toliuweijing commented 3 months ago

This reording can fix the UnsatisfiedLinkError exception, because PeerConnectionFactory.initialize loads the native library into memory.

image image

However, the PR still doesn't work due to native crash. Need to investigate more. cc @izivkov if you have more insight.

izivkov commented 3 months ago

@toliuweijing Yes, I got that far in branch WebRTC.

I'm wondering if the OpenCV has something to do with requiring hardware support.

toliuweijing commented 3 months ago

@toliuweijing Yes, I got that far in branch WebRTC.

I'm wondering if the OpenCV has something to do with requiring hardware support.

I don't think so. I didn't use any fancy CV stuff but of course you can verify by reverting the commit.

izivkov commented 2 months ago

@toliuweijing

Any luck with the WebRTC library replacement?

toliuweijing commented 2 months ago

@izivkov appologize for late reply. I didn't have enough time to investigate this. My plan is to debug it by building a sample webRTC app using the new dependency "im.conversations.webrtc:webrtc-android:119.0.1".

Will see if I get some time late this month or next month.

izivkov commented 2 months ago

No worries, thanks for the update!

On Mon, Sep 16, 2024 at 5:05 AM Jim Liu @.***> wrote:

@izivkov https://github.com/izivkov appologize for late reply. I didn't have enough time to investigate this. My plan is to debug it by building a sample webRTC app using the new dependency "im.conversations.webrtc:webrtc-android:119.0.1".

Will see if I get some time late this month or next month.

— Reply to this email directly, view it on GitHub https://github.com/izivkov/RemoteVideoCam/issues/28#issuecomment-2352367915, or unsubscribe https://github.com/notifications/unsubscribe-auth/AA7M37SIMTEFETNS4JY7NNDZW2NMNAVCNFSM6AAAAABMWGTUV6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGNJSGM3DOOJRGU . You are receiving this because you were mentioned.Message ID: @.***>