MCPcopy Index your code
hub / github.com/Recordscript/recordscript / Java_ffi_FFI_init

Function Java_ffi_FFI_init

libs/scrap/src/android/ffi.rs:148–157  ·  view source on GitHub ↗
(env: JNIEnv, _class: JClass, ctx: JObject)

Source from the content-addressed store, hash-verified

146
147#[no_mangle]
148pub extern "system" fn Java_ffi_FFI_init(env: JNIEnv, _class: JClass, ctx: JObject) {
149 log::debug!("MainService init from java");
150 if let Ok(jvm) = env.get_java_vm() {
151 *JVM.write().unwrap() = Some(jvm);
152 if let Ok(context) = env.new_global_ref(ctx) {
153 *MAIN_SERVICE_CTX.write().unwrap() = Some(context);
154 init_ndk_context().ok();
155 }
156 }
157}
158
159#[derive(Debug, Deserialize, Clone)]
160pub struct MediaCodecInfo {

Callers

nothing calls this directly

Calls 2

init_ndk_contextFunction · 0.85
writeMethod · 0.80

Tested by

no test coverage detected