Dear All,
We were getting the below error while converting Java binding (.jar) to Xamarin c#.
- Conversion failed for Mediainfo.type(enumeration type) to System.IntPtr.
While calling the MediaInfo constructor it shows 'constructor has some invalid arguments' because we are passing enum type to the constructor `
[Register (".ctor", "(Lcom/intertrust/wasabi/media/MediaInfo$Type;IIII)V", "")] protected MediaInfo (global::Com.Intertrust.Wasabi.Media.MediaInfo.Type p0, int p1, int p2, int p3, int p4) : base (IntPtr.Zero, JniHandleOwnership.DoNotTransfer) { if (!Handle.Equals(IntPtr.Zero)) return; if (!GetType().Equals(typeof(MediaInfo))) { // Conversion failed for 'Com.Intertrust.Wasabi.MediaInfo.Type' to System.IntPtr //Overload method match has some invalid arguments in 'Android.Runtime.JNIEnv.CreateInstance(System.Type, string, params Android.Runtime.JValue[])' SetHandle(global::Android.Runtime.JNIEnv.CreateInstance(GetType(), "(Lcom/intertrust/wasabi/media/MediaInfo$Type;IIII)V", new JValue(p0), new JValue(p1), new JValue(p2), new JValue(p3), new JValue(p4)), JniHandleOwnership.TransferLocalRef); return; } }
' Java Constructor for your reference: MediaInfo.Type is a enumeration type.
protected MediaInfo(MediaInfo.Type type,
int format,
int encMethod,
int duration,
int bitrate)
We were looking for this issue more than a week. Kindly suggest us to solve this issue.
Thanks in Advance.