private MediaCodecTypes GetCodecType(int mimeType, bool isEncoder) { int codecType = mimeType & CodecTypeMask; Native.GetSupportedType(_handle, codecType, isEncoder, out int value). ThrowIfFailed("Failed to get supported media codec type."); return((MediaCodecTypes)value); }
private MediaCodecTypes GetCodecType <T>(T mimeType, Type type, bool isEncoder) { dynamic changedType = Convert.ChangeType(mimeType, type); int codecType = TypeConverter.ToNative(changedType); Native.GetSupportedType(_handle, codecType, isEncoder, out int value). ThrowIfFailed("Failed to get supported media codec type."); return((MediaCodecTypes)value); }