MCPcopy Create free account
hub / github.com/Recordscript/recordscript / Java_ffi_FFI_setCodecInfo

Function Java_ffi_FFI_setCodecInfo

libs/scrap/src/android/ffi.rs:187–195  ·  view source on GitHub ↗
(env: JNIEnv, _class: JClass, info: JString)

Source from the content-addressed store, hash-verified

185
186#[no_mangle]
187pub extern "system" fn Java_ffi_FFI_setCodecInfo(env: JNIEnv, _class: JClass, info: JString) {
188 let mut env = env;
189 if let Ok(info) = env.get_string(&info) {
190 let info: String = info.into();
191 if let Ok(infos) = serde_json::from_str::<MediaCodecInfos>(&info) {
192 *MEDIA_CODEC_INFOS.write().unwrap() = Some(infos);
193 }
194 }
195}
196
197pub fn get_codec_info() -> Option<MediaCodecInfos> {
198 MEDIA_CODEC_INFOS.read().unwrap().as_ref().cloned()

Callers

nothing calls this directly

Calls 2

get_stringMethod · 0.80
writeMethod · 0.80

Tested by

no test coverage detected