Skip to content

Conversation

@gujjwal00
Copy link
Contributor

@gujjwal00 gujjwal00 commented Mar 5, 2020

This PR adds more support for native LibVNCClient.

There are some issues but I was so excited about this and couldn't wait (sorry 🤠).
Also, I wanted to get your feedback about it.

PR Summary

  • Created a NativeRfbClient which is a wrapper around native rfbClient.
  • Use NativeRfbClient for VNC connection instead of current RFBProto
  • Added support for rendering native frame buffer.

What works:

  • Frame rendering with OpenGL
  • Mouse events
  • Keyboard events (Only tested with 'Send Key Combo' dialog, should work with hardware keyboard)
  • Authentication
    1. VncAuth
    2. Few others should work but I need to test them.
  • Clipboard Copy/Paste

Notes:

  • I have tried to not modify existing native methods created by you. I wanted to get your feedback before that.
  • I am testing with Vino server on Ubuntu.
  • This PR targets android-native-libvncclient-4 which is currently behind master.
  • A lot of error handling is missing.

@gujjwal00 gujjwal00 changed the title Android: Integrate native LibVNCClient [WIP] Android: Integrate native LibVNCClient Mar 7, 2020
@gujjwal00
Copy link
Contributor Author

Marking it as WIP.

@bk138
Copy link
Owner

bk138 commented Mar 7, 2020

Yeah you definitely took over the fun part ;-). Anyway, will review ASAP, time permitting.

@gujjwal00
Copy link
Contributor Author

@bk138 Should I implement support for different pixel formats? Currently 24 bit color is supported.

@bk138
Copy link
Owner

bk138 commented Mar 9, 2020

@bk138 Should I implement support for different pixel formats? Currently 24 bit color is supported.

I deem LibVNC/libvncserver#347 more important as it renders viewers useless for users in certain cases (vino + gnutls >= 3.6 I suspect).

@gujjwal00
Copy link
Contributor Author

I was only asking about allowing user to choose different pixel formats with native rfbClient like we currently do. Your comment in vncconn.c made me think that we will only support 4 byte-per-pixel with LibVNCClient.

I will pause work on this PR untill your initial review and focus on the TLS issue for now.

This was referenced Mar 13, 2020
@gujjwal00 gujjwal00 force-pushed the native-libvncclient branch from cf95690 to 339c159 Compare March 14, 2020 09:41
1. Now we make only one JNI call to retrieve info.
2. It is more scalable. Adding new fields to 'ConnectionInfo' is much easier.
@gujjwal00 gujjwal00 force-pushed the native-libvncclient branch from 339c159 to 81c31c5 Compare March 14, 2020 10:08
@gujjwal00 gujjwal00 changed the title [WIP] Android: Integrate native LibVNCClient Android: Integrate native LibVNCClient Mar 15, 2020
@gujjwal00
Copy link
Contributor Author

This is ready for now. Further work will depend on the feedback.

This constructor is only invoked from native code. Hence compiler
thinks this is redundant and removes it.
bk138 added a commit that referenced this pull request Jul 11, 2020
@bk138
Copy link
Owner

bk138 commented Jul 11, 2020

I've now taken a different approach with 62c2cc6, the work in here was nevertheless very helpful, thanks a lot @gujjwal00 !

@bk138 bk138 closed this Jul 11, 2020
@gujjwal00
Copy link
Contributor Author

No problem! Happy to see it land.

One suggestion I have is to initialize rfbClient pointer in constructor of VNCConn. That way you can drop many null pointer checks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants