jni-android-sys 0.0.10

Autogenerated glue code for access Android JVM APIs from Rust
// WARNING:  This file was autogenerated by jni-bindgen.  Any changes to this file may be lost!!!


#[cfg(any(feature = "all", feature = "android-media-MediaFormat"))]
__jni_bindgen! {
    /// public final class [MediaFormat](https://developer.android.com/reference/android/media/MediaFormat.html)
    ///
    /// Required feature: "android-media-MediaFormat"
    public final class MediaFormat ("android/media/MediaFormat") extends crate::java::lang::Object {

        /// [MediaFormat](https://developer.android.com/reference/android/media/MediaFormat.html#MediaFormat())
        pub fn new<'env>(__jni_env: &'env __jni_bindgen::Env) -> __jni_bindgen::std::result::Result<__jni_bindgen::Local<'env, crate::android::media::MediaFormat>, __jni_bindgen::Local<'env, crate::java::lang::Throwable>> {
            // class.path == "android/media/MediaFormat", java.flags == PUBLIC, .name == "<init>", .descriptor == "()V"
            unsafe {
                let __jni_args = [];
                let (__jni_class, __jni_method) = __jni_env.require_class_method("android/media/MediaFormat\0", "<init>\0", "()V\0");
                __jni_env.new_object_a(__jni_class, __jni_method, __jni_args.as_ptr())
            }
        }

        /// [containsKey](https://developer.android.com/reference/android/media/MediaFormat.html#containsKey(java.lang.String))
        ///
        /// Required features: "java-lang-String"
        #[cfg(any(feature = "all", all(feature = "java-lang-String")))]
        pub fn containsKey<'env>(&'env self, arg0: impl __jni_bindgen::std::convert::Into<__jni_bindgen::std::option::Option<&'env crate::java::lang::String>>) -> __jni_bindgen::std::result::Result<bool, __jni_bindgen::Local<'env, crate::java::lang::Throwable>> {
            // class.path == "android/media/MediaFormat", java.flags == PUBLIC | FINAL, .name == "containsKey", .descriptor == "(Ljava/lang/String;)Z"
            unsafe {
                let __jni_args = [__jni_bindgen::AsJValue::as_jvalue(&arg0.into())];
                let __jni_env = __jni_bindgen::Env::from_ptr(self.0.env);
                let (__jni_class, __jni_method) = __jni_env.require_class_method("android/media/MediaFormat\0", "containsKey\0", "(Ljava/lang/String;)Z\0");
                __jni_env.call_boolean_method_a(self.0.object, __jni_method, __jni_args.as_ptr())
            }
        }

        /// [getInteger](https://developer.android.com/reference/android/media/MediaFormat.html#getInteger(java.lang.String))
        ///
        /// Required features: "java-lang-String"
        #[cfg(any(feature = "all", all(feature = "java-lang-String")))]
        pub fn getInteger<'env>(&'env self, arg0: impl __jni_bindgen::std::convert::Into<__jni_bindgen::std::option::Option<&'env crate::java::lang::String>>) -> __jni_bindgen::std::result::Result<i32, __jni_bindgen::Local<'env, crate::java::lang::Throwable>> {
            // class.path == "android/media/MediaFormat", java.flags == PUBLIC | FINAL, .name == "getInteger", .descriptor == "(Ljava/lang/String;)I"
            unsafe {
                let __jni_args = [__jni_bindgen::AsJValue::as_jvalue(&arg0.into())];
                let __jni_env = __jni_bindgen::Env::from_ptr(self.0.env);
                let (__jni_class, __jni_method) = __jni_env.require_class_method("android/media/MediaFormat\0", "getInteger\0", "(Ljava/lang/String;)I\0");
                __jni_env.call_int_method_a(self.0.object, __jni_method, __jni_args.as_ptr())
            }
        }

        /// [getLong](https://developer.android.com/reference/android/media/MediaFormat.html#getLong(java.lang.String))
        ///
        /// Required features: "java-lang-String"
        #[cfg(any(feature = "all", all(feature = "java-lang-String")))]
        pub fn getLong<'env>(&'env self, arg0: impl __jni_bindgen::std::convert::Into<__jni_bindgen::std::option::Option<&'env crate::java::lang::String>>) -> __jni_bindgen::std::result::Result<i64, __jni_bindgen::Local<'env, crate::java::lang::Throwable>> {
            // class.path == "android/media/MediaFormat", java.flags == PUBLIC | FINAL, .name == "getLong", .descriptor == "(Ljava/lang/String;)J"
            unsafe {
                let __jni_args = [__jni_bindgen::AsJValue::as_jvalue(&arg0.into())];
                let __jni_env = __jni_bindgen::Env::from_ptr(self.0.env);
                let (__jni_class, __jni_method) = __jni_env.require_class_method("android/media/MediaFormat\0", "getLong\0", "(Ljava/lang/String;)J\0");
                __jni_env.call_long_method_a(self.0.object, __jni_method, __jni_args.as_ptr())
            }
        }

        /// [getFloat](https://developer.android.com/reference/android/media/MediaFormat.html#getFloat(java.lang.String))
        ///
        /// Required features: "java-lang-String"
        #[cfg(any(feature = "all", all(feature = "java-lang-String")))]
        pub fn getFloat<'env>(&'env self, arg0: impl __jni_bindgen::std::convert::Into<__jni_bindgen::std::option::Option<&'env crate::java::lang::String>>) -> __jni_bindgen::std::result::Result<f32, __jni_bindgen::Local<'env, crate::java::lang::Throwable>> {
            // class.path == "android/media/MediaFormat", java.flags == PUBLIC | FINAL, .name == "getFloat", .descriptor == "(Ljava/lang/String;)F"
            unsafe {
                let __jni_args = [__jni_bindgen::AsJValue::as_jvalue(&arg0.into())];
                let __jni_env = __jni_bindgen::Env::from_ptr(self.0.env);
                let (__jni_class, __jni_method) = __jni_env.require_class_method("android/media/MediaFormat\0", "getFloat\0", "(Ljava/lang/String;)F\0");
                __jni_env.call_float_method_a(self.0.object, __jni_method, __jni_args.as_ptr())
            }
        }

        /// [getString](https://developer.android.com/reference/android/media/MediaFormat.html#getString(java.lang.String))
        ///
        /// Required features: "java-lang-String"
        #[cfg(any(feature = "all", all(feature = "java-lang-String")))]
        pub fn getString<'env>(&'env self, arg0: impl __jni_bindgen::std::convert::Into<__jni_bindgen::std::option::Option<&'env crate::java::lang::String>>) -> __jni_bindgen::std::result::Result<__jni_bindgen::std::option::Option<__jni_bindgen::Local<'env, crate::java::lang::String>>, __jni_bindgen::Local<'env, crate::java::lang::Throwable>> {
            // class.path == "android/media/MediaFormat", java.flags == PUBLIC | FINAL, .name == "getString", .descriptor == "(Ljava/lang/String;)Ljava/lang/String;"
            unsafe {
                let __jni_args = [__jni_bindgen::AsJValue::as_jvalue(&arg0.into())];
                let __jni_env = __jni_bindgen::Env::from_ptr(self.0.env);
                let (__jni_class, __jni_method) = __jni_env.require_class_method("android/media/MediaFormat\0", "getString\0", "(Ljava/lang/String;)Ljava/lang/String;\0");
                __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr())
            }
        }

        /// [getByteBuffer](https://developer.android.com/reference/android/media/MediaFormat.html#getByteBuffer(java.lang.String))
        ///
        /// Required features: "java-lang-String", "java-nio-ByteBuffer"
        #[cfg(any(feature = "all", all(feature = "java-lang-String", feature = "java-nio-ByteBuffer")))]
        pub fn getByteBuffer<'env>(&'env self, arg0: impl __jni_bindgen::std::convert::Into<__jni_bindgen::std::option::Option<&'env crate::java::lang::String>>) -> __jni_bindgen::std::result::Result<__jni_bindgen::std::option::Option<__jni_bindgen::Local<'env, crate::java::nio::ByteBuffer>>, __jni_bindgen::Local<'env, crate::java::lang::Throwable>> {
            // class.path == "android/media/MediaFormat", java.flags == PUBLIC | FINAL, .name == "getByteBuffer", .descriptor == "(Ljava/lang/String;)Ljava/nio/ByteBuffer;"
            unsafe {
                let __jni_args = [__jni_bindgen::AsJValue::as_jvalue(&arg0.into())];
                let __jni_env = __jni_bindgen::Env::from_ptr(self.0.env);
                let (__jni_class, __jni_method) = __jni_env.require_class_method("android/media/MediaFormat\0", "getByteBuffer\0", "(Ljava/lang/String;)Ljava/nio/ByteBuffer;\0");
                __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr())
            }
        }

        /// [setInteger](https://developer.android.com/reference/android/media/MediaFormat.html#setInteger(java.lang.String,%20int))
        ///
        /// Required features: "java-lang-String"
        #[cfg(any(feature = "all", all(feature = "java-lang-String")))]
        pub fn setInteger<'env>(&'env self, arg0: impl __jni_bindgen::std::convert::Into<__jni_bindgen::std::option::Option<&'env crate::java::lang::String>>, arg1: i32) -> __jni_bindgen::std::result::Result<(), __jni_bindgen::Local<'env, crate::java::lang::Throwable>> {
            // class.path == "android/media/MediaFormat", java.flags == PUBLIC | FINAL, .name == "setInteger", .descriptor == "(Ljava/lang/String;I)V"
            unsafe {
                let __jni_args = [__jni_bindgen::AsJValue::as_jvalue(&arg0.into()), __jni_bindgen::AsJValue::as_jvalue(&arg1)];
                let __jni_env = __jni_bindgen::Env::from_ptr(self.0.env);
                let (__jni_class, __jni_method) = __jni_env.require_class_method("android/media/MediaFormat\0", "setInteger\0", "(Ljava/lang/String;I)V\0");
                __jni_env.call_void_method_a(self.0.object, __jni_method, __jni_args.as_ptr())
            }
        }

        /// [setLong](https://developer.android.com/reference/android/media/MediaFormat.html#setLong(java.lang.String,%20long))
        ///
        /// Required features: "java-lang-String"
        #[cfg(any(feature = "all", all(feature = "java-lang-String")))]
        pub fn setLong<'env>(&'env self, arg0: impl __jni_bindgen::std::convert::Into<__jni_bindgen::std::option::Option<&'env crate::java::lang::String>>, arg1: i64) -> __jni_bindgen::std::result::Result<(), __jni_bindgen::Local<'env, crate::java::lang::Throwable>> {
            // class.path == "android/media/MediaFormat", java.flags == PUBLIC | FINAL, .name == "setLong", .descriptor == "(Ljava/lang/String;J)V"
            unsafe {
                let __jni_args = [__jni_bindgen::AsJValue::as_jvalue(&arg0.into()), __jni_bindgen::AsJValue::as_jvalue(&arg1)];
                let __jni_env = __jni_bindgen::Env::from_ptr(self.0.env);
                let (__jni_class, __jni_method) = __jni_env.require_class_method("android/media/MediaFormat\0", "setLong\0", "(Ljava/lang/String;J)V\0");
                __jni_env.call_void_method_a(self.0.object, __jni_method, __jni_args.as_ptr())
            }
        }

        /// [setFloat](https://developer.android.com/reference/android/media/MediaFormat.html#setFloat(java.lang.String,%20float))
        ///
        /// Required features: "java-lang-String"
        #[cfg(any(feature = "all", all(feature = "java-lang-String")))]
        pub fn setFloat<'env>(&'env self, arg0: impl __jni_bindgen::std::convert::Into<__jni_bindgen::std::option::Option<&'env crate::java::lang::String>>, arg1: f32) -> __jni_bindgen::std::result::Result<(), __jni_bindgen::Local<'env, crate::java::lang::Throwable>> {
            // class.path == "android/media/MediaFormat", java.flags == PUBLIC | FINAL, .name == "setFloat", .descriptor == "(Ljava/lang/String;F)V"
            unsafe {
                let __jni_args = [__jni_bindgen::AsJValue::as_jvalue(&arg0.into()), __jni_bindgen::AsJValue::as_jvalue(&arg1)];
                let __jni_env = __jni_bindgen::Env::from_ptr(self.0.env);
                let (__jni_class, __jni_method) = __jni_env.require_class_method("android/media/MediaFormat\0", "setFloat\0", "(Ljava/lang/String;F)V\0");
                __jni_env.call_void_method_a(self.0.object, __jni_method, __jni_args.as_ptr())
            }
        }

        /// [setString](https://developer.android.com/reference/android/media/MediaFormat.html#setString(java.lang.String,%20java.lang.String))
        ///
        /// Required features: "java-lang-String"
        #[cfg(any(feature = "all", all(feature = "java-lang-String")))]
        pub fn setString<'env>(&'env self, arg0: impl __jni_bindgen::std::convert::Into<__jni_bindgen::std::option::Option<&'env crate::java::lang::String>>, arg1: impl __jni_bindgen::std::convert::Into<__jni_bindgen::std::option::Option<&'env crate::java::lang::String>>) -> __jni_bindgen::std::result::Result<(), __jni_bindgen::Local<'env, crate::java::lang::Throwable>> {
            // class.path == "android/media/MediaFormat", java.flags == PUBLIC | FINAL, .name == "setString", .descriptor == "(Ljava/lang/String;Ljava/lang/String;)V"
            unsafe {
                let __jni_args = [__jni_bindgen::AsJValue::as_jvalue(&arg0.into()), __jni_bindgen::AsJValue::as_jvalue(&arg1.into())];
                let __jni_env = __jni_bindgen::Env::from_ptr(self.0.env);
                let (__jni_class, __jni_method) = __jni_env.require_class_method("android/media/MediaFormat\0", "setString\0", "(Ljava/lang/String;Ljava/lang/String;)V\0");
                __jni_env.call_void_method_a(self.0.object, __jni_method, __jni_args.as_ptr())
            }
        }

        /// [setByteBuffer](https://developer.android.com/reference/android/media/MediaFormat.html#setByteBuffer(java.lang.String,%20java.nio.ByteBuffer))
        ///
        /// Required features: "java-lang-String", "java-nio-ByteBuffer"
        #[cfg(any(feature = "all", all(feature = "java-lang-String", feature = "java-nio-ByteBuffer")))]
        pub fn setByteBuffer<'env>(&'env self, arg0: impl __jni_bindgen::std::convert::Into<__jni_bindgen::std::option::Option<&'env crate::java::lang::String>>, arg1: impl __jni_bindgen::std::convert::Into<__jni_bindgen::std::option::Option<&'env crate::java::nio::ByteBuffer>>) -> __jni_bindgen::std::result::Result<(), __jni_bindgen::Local<'env, crate::java::lang::Throwable>> {
            // class.path == "android/media/MediaFormat", java.flags == PUBLIC | FINAL, .name == "setByteBuffer", .descriptor == "(Ljava/lang/String;Ljava/nio/ByteBuffer;)V"
            unsafe {
                let __jni_args = [__jni_bindgen::AsJValue::as_jvalue(&arg0.into()), __jni_bindgen::AsJValue::as_jvalue(&arg1.into())];
                let __jni_env = __jni_bindgen::Env::from_ptr(self.0.env);
                let (__jni_class, __jni_method) = __jni_env.require_class_method("android/media/MediaFormat\0", "setByteBuffer\0", "(Ljava/lang/String;Ljava/nio/ByteBuffer;)V\0");
                __jni_env.call_void_method_a(self.0.object, __jni_method, __jni_args.as_ptr())
            }
        }

        /// [createAudioFormat](https://developer.android.com/reference/android/media/MediaFormat.html#createAudioFormat(java.lang.String,%20int,%20int))
        ///
        /// Required features: "android-media-MediaFormat", "java-lang-String"
        #[cfg(any(feature = "all", all(feature = "android-media-MediaFormat", feature = "java-lang-String")))]
        pub fn createAudioFormat<'env>(__jni_env: &'env __jni_bindgen::Env, arg0: impl __jni_bindgen::std::convert::Into<__jni_bindgen::std::option::Option<&'env crate::java::lang::String>>, arg1: i32, arg2: i32) -> __jni_bindgen::std::result::Result<__jni_bindgen::std::option::Option<__jni_bindgen::Local<'env, crate::android::media::MediaFormat>>, __jni_bindgen::Local<'env, crate::java::lang::Throwable>> {
            // class.path == "android/media/MediaFormat", java.flags == PUBLIC | STATIC | FINAL, .name == "createAudioFormat", .descriptor == "(Ljava/lang/String;II)Landroid/media/MediaFormat;"
            unsafe {
                let __jni_args = [__jni_bindgen::AsJValue::as_jvalue(&arg0.into()), __jni_bindgen::AsJValue::as_jvalue(&arg1), __jni_bindgen::AsJValue::as_jvalue(&arg2)];
                let (__jni_class, __jni_method) = __jni_env.require_class_static_method("android/media/MediaFormat\0", "createAudioFormat\0", "(Ljava/lang/String;II)Landroid/media/MediaFormat;\0");
                __jni_env.call_static_object_method_a(__jni_class, __jni_method, __jni_args.as_ptr())
            }
        }

        /// [createVideoFormat](https://developer.android.com/reference/android/media/MediaFormat.html#createVideoFormat(java.lang.String,%20int,%20int))
        ///
        /// Required features: "android-media-MediaFormat", "java-lang-String"
        #[cfg(any(feature = "all", all(feature = "android-media-MediaFormat", feature = "java-lang-String")))]
        pub fn createVideoFormat<'env>(__jni_env: &'env __jni_bindgen::Env, arg0: impl __jni_bindgen::std::convert::Into<__jni_bindgen::std::option::Option<&'env crate::java::lang::String>>, arg1: i32, arg2: i32) -> __jni_bindgen::std::result::Result<__jni_bindgen::std::option::Option<__jni_bindgen::Local<'env, crate::android::media::MediaFormat>>, __jni_bindgen::Local<'env, crate::java::lang::Throwable>> {
            // class.path == "android/media/MediaFormat", java.flags == PUBLIC | STATIC | FINAL, .name == "createVideoFormat", .descriptor == "(Ljava/lang/String;II)Landroid/media/MediaFormat;"
            unsafe {
                let __jni_args = [__jni_bindgen::AsJValue::as_jvalue(&arg0.into()), __jni_bindgen::AsJValue::as_jvalue(&arg1), __jni_bindgen::AsJValue::as_jvalue(&arg2)];
                let (__jni_class, __jni_method) = __jni_env.require_class_static_method("android/media/MediaFormat\0", "createVideoFormat\0", "(Ljava/lang/String;II)Landroid/media/MediaFormat;\0");
                __jni_env.call_static_object_method_a(__jni_class, __jni_method, __jni_args.as_ptr())
            }
        }

        /// [toString](https://developer.android.com/reference/android/media/MediaFormat.html#toString())
        ///
        /// Required features: "java-lang-String"
        #[cfg(any(feature = "all", all(feature = "java-lang-String")))]
        pub fn toString<'env>(&'env self) -> __jni_bindgen::std::result::Result<__jni_bindgen::std::option::Option<__jni_bindgen::Local<'env, crate::java::lang::String>>, __jni_bindgen::Local<'env, crate::java::lang::Throwable>> {
            // class.path == "android/media/MediaFormat", java.flags == PUBLIC, .name == "toString", .descriptor == "()Ljava/lang/String;"
            unsafe {
                let __jni_args = [];
                let __jni_env = __jni_bindgen::Env::from_ptr(self.0.env);
                let (__jni_class, __jni_method) = __jni_env.require_class_method("android/media/MediaFormat\0", "toString\0", "()Ljava/lang/String;\0");
                __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr())
            }
        }

        /// public static final [KEY_MIME](https://developer.android.com/reference/android/media/MediaFormat.html#KEY_MIME)
        pub const KEY_MIME : &'static str = "mime";

        /// public static final [KEY_SAMPLE_RATE](https://developer.android.com/reference/android/media/MediaFormat.html#KEY_SAMPLE_RATE)
        pub const KEY_SAMPLE_RATE : &'static str = "sample-rate";

        /// public static final [KEY_CHANNEL_COUNT](https://developer.android.com/reference/android/media/MediaFormat.html#KEY_CHANNEL_COUNT)
        pub const KEY_CHANNEL_COUNT : &'static str = "channel-count";

        /// public static final [KEY_WIDTH](https://developer.android.com/reference/android/media/MediaFormat.html#KEY_WIDTH)
        pub const KEY_WIDTH : &'static str = "width";

        /// public static final [KEY_HEIGHT](https://developer.android.com/reference/android/media/MediaFormat.html#KEY_HEIGHT)
        pub const KEY_HEIGHT : &'static str = "height";

        /// public static final [KEY_MAX_INPUT_SIZE](https://developer.android.com/reference/android/media/MediaFormat.html#KEY_MAX_INPUT_SIZE)
        pub const KEY_MAX_INPUT_SIZE : &'static str = "max-input-size";

        /// public static final [KEY_BIT_RATE](https://developer.android.com/reference/android/media/MediaFormat.html#KEY_BIT_RATE)
        pub const KEY_BIT_RATE : &'static str = "bitrate";

        /// public static final [KEY_COLOR_FORMAT](https://developer.android.com/reference/android/media/MediaFormat.html#KEY_COLOR_FORMAT)
        pub const KEY_COLOR_FORMAT : &'static str = "color-format";

        /// public static final [KEY_FRAME_RATE](https://developer.android.com/reference/android/media/MediaFormat.html#KEY_FRAME_RATE)
        pub const KEY_FRAME_RATE : &'static str = "frame-rate";

        /// public static final [KEY_I_FRAME_INTERVAL](https://developer.android.com/reference/android/media/MediaFormat.html#KEY_I_FRAME_INTERVAL)
        pub const KEY_I_FRAME_INTERVAL : &'static str = "i-frame-interval";

        /// public static final [KEY_DURATION](https://developer.android.com/reference/android/media/MediaFormat.html#KEY_DURATION)
        pub const KEY_DURATION : &'static str = "durationUs";

        /// public static final [KEY_IS_ADTS](https://developer.android.com/reference/android/media/MediaFormat.html#KEY_IS_ADTS)
        pub const KEY_IS_ADTS : &'static str = "is-adts";

        /// public static final [KEY_CHANNEL_MASK](https://developer.android.com/reference/android/media/MediaFormat.html#KEY_CHANNEL_MASK)
        pub const KEY_CHANNEL_MASK : &'static str = "channel-mask";

        /// public static final [KEY_AAC_PROFILE](https://developer.android.com/reference/android/media/MediaFormat.html#KEY_AAC_PROFILE)
        pub const KEY_AAC_PROFILE : &'static str = "aac-profile";

        /// public static final [KEY_FLAC_COMPRESSION_LEVEL](https://developer.android.com/reference/android/media/MediaFormat.html#KEY_FLAC_COMPRESSION_LEVEL)
        pub const KEY_FLAC_COMPRESSION_LEVEL : &'static str = "flac-compression-level";
    }
}