a7499c2de8
* Check available when app start from kotlin via get codec info * For latency free, repeat encode 10 frame at most when capture return WouldBlock * For changing quality, kotlin support but jni doesn't support, rerun video service when quality is manualy changed * 3 or 6 times bitrate for mediacodec because its quality is poor Signed-off-by: 21pages <pages21@163.com>
22 lines
622 B
Kotlin
22 lines
622 B
Kotlin
// ffi.kt
|
|
|
|
package ffi
|
|
|
|
import android.content.Context
|
|
import java.nio.ByteBuffer
|
|
|
|
object FFI {
|
|
init {
|
|
System.loadLibrary("rustdesk")
|
|
}
|
|
|
|
external fun init(ctx: Context)
|
|
external fun startServer(app_dir: String, custom_client_config: String)
|
|
external fun startService()
|
|
external fun onVideoFrameUpdate(buf: ByteBuffer)
|
|
external fun onAudioFrameUpdate(buf: ByteBuffer)
|
|
external fun translateLocale(localeName: String, input: String): String
|
|
external fun refreshScreen()
|
|
external fun setFrameRawEnable(name: String, value: Boolean)
|
|
external fun setCodecInfo(info: String)
|
|
} |