(env: JNIEnv, _class: JClass, info: JString)
| 185 | |
| 186 | #[no_mangle] |
| 187 | pub 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 | |
| 197 | pub fn get_codec_info() -> Option<MediaCodecInfos> { |
| 198 | MEDIA_CODEC_INFOS.read().unwrap().as_ref().cloned() |
nothing calls this directly
no test coverage detected