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-MediaCodec_Callback"))]
__jni_bindgen! {
    /// public class [MediaCodec.Callback](https://developer.android.com/reference/android/media/MediaCodec.Callback.html)
    ///
    /// Required feature: "android-media-MediaCodec_Callback"
    public class MediaCodec_Callback ("android/media/MediaCodec$Callback") extends crate::java::lang::Object {

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

        /// [onInputBufferAvailable](https://developer.android.com/reference/android/media/MediaCodec.Callback.html#onInputBufferAvailable(android.media.MediaCodec,%20int))
        ///
        /// Required features: "android-media-MediaCodec"
        #[cfg(any(feature = "all", all(feature = "android-media-MediaCodec")))]
        pub fn onInputBufferAvailable<'env>(&'env self, arg0: impl __jni_bindgen::std::convert::Into<__jni_bindgen::std::option::Option<&'env crate::android::media::MediaCodec>>, arg1: i32) -> __jni_bindgen::std::result::Result<(), __jni_bindgen::Local<'env, crate::java::lang::Throwable>> {
            // class.path == "android/media/MediaCodec$Callback", java.flags == PUBLIC | ABSTRACT, .name == "onInputBufferAvailable", .descriptor == "(Landroid/media/MediaCodec;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/MediaCodec$Callback\0", "onInputBufferAvailable\0", "(Landroid/media/MediaCodec;I)V\0");
                __jni_env.call_void_method_a(self.0.object, __jni_method, __jni_args.as_ptr())
            }
        }

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

        /// [onError](https://developer.android.com/reference/android/media/MediaCodec.Callback.html#onError(android.media.MediaCodec,%20android.media.MediaCodec.CodecException))
        ///
        /// Required features: "android-media-MediaCodec", "android-media-MediaCodec_CodecException"
        #[cfg(any(feature = "all", all(feature = "android-media-MediaCodec", feature = "android-media-MediaCodec_CodecException")))]
        pub fn onError<'env>(&'env self, arg0: impl __jni_bindgen::std::convert::Into<__jni_bindgen::std::option::Option<&'env crate::android::media::MediaCodec>>, arg1: impl __jni_bindgen::std::convert::Into<__jni_bindgen::std::option::Option<&'env crate::android::media::MediaCodec_CodecException>>) -> __jni_bindgen::std::result::Result<(), __jni_bindgen::Local<'env, crate::java::lang::Throwable>> {
            // class.path == "android/media/MediaCodec$Callback", java.flags == PUBLIC | ABSTRACT, .name == "onError", .descriptor == "(Landroid/media/MediaCodec;Landroid/media/MediaCodec$CodecException;)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/MediaCodec$Callback\0", "onError\0", "(Landroid/media/MediaCodec;Landroid/media/MediaCodec$CodecException;)V\0");
                __jni_env.call_void_method_a(self.0.object, __jni_method, __jni_args.as_ptr())
            }
        }

        /// [onOutputFormatChanged](https://developer.android.com/reference/android/media/MediaCodec.Callback.html#onOutputFormatChanged(android.media.MediaCodec,%20android.media.MediaFormat))
        ///
        /// Required features: "android-media-MediaCodec", "android-media-MediaFormat"
        #[cfg(any(feature = "all", all(feature = "android-media-MediaCodec", feature = "android-media-MediaFormat")))]
        pub fn onOutputFormatChanged<'env>(&'env self, arg0: impl __jni_bindgen::std::convert::Into<__jni_bindgen::std::option::Option<&'env crate::android::media::MediaCodec>>, arg1: impl __jni_bindgen::std::convert::Into<__jni_bindgen::std::option::Option<&'env crate::android::media::MediaFormat>>) -> __jni_bindgen::std::result::Result<(), __jni_bindgen::Local<'env, crate::java::lang::Throwable>> {
            // class.path == "android/media/MediaCodec$Callback", java.flags == PUBLIC | ABSTRACT, .name == "onOutputFormatChanged", .descriptor == "(Landroid/media/MediaCodec;Landroid/media/MediaFormat;)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/MediaCodec$Callback\0", "onOutputFormatChanged\0", "(Landroid/media/MediaCodec;Landroid/media/MediaFormat;)V\0");
                __jni_env.call_void_method_a(self.0.object, __jni_method, __jni_args.as_ptr())
            }
        }
    }
}