izivkov/RemoteVideoCam

jcenter shutdown

Opened this issue · 12 comments

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.

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

@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.

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.

@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.

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

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.

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

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

@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.

@toliuweijing

Any luck with the WebRTC library replacement?

@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.