diff --git a/docs/design/GUI.md b/docs/design/GUI.md index 7b9fa39e..f486a478 100644 --- a/docs/design/GUI.md +++ b/docs/design/GUI.md @@ -156,6 +156,8 @@ Unlike Web UI protocol, we don't need DSP controllers as it is basically a matte ### SurfaceControlViewHost: controller from Kotlin API +![Native UI boundary](../images/native-ui.drawio.svg) + The host will instantiate the plugin's View by sending an independent Message to an independent GUI controller (i.e. not `AudioPluginService`, not in the .aidl). It is due to current limitation on AIDL that cannot handle Message/Parcelables in .aidl that are being used in both Java and NDK. It is done in Kotlin land, as it requires couple of Java/Kotlin classes e.g. `Service`, `SurfaceView` and `SurfaceControlViewHost.SurfacePackage` instances. Here is these internal steps to use it: diff --git a/docs/images/native-ui.drawio.svg b/docs/images/native-ui.drawio.svg new file mode 100644 index 00000000..fae898d2 --- /dev/null +++ b/docs/images/native-ui.drawio.svg @@ -0,0 +1,226 @@ + + + + + + + + + + + +
+
+
+ Host +
+
+
+
+ + Host + +
+
+ + + + +
+
+
+ Plugin +
+
+
+
+ + Plugin + +
+
+ + + + + +
+
+
+ SurfaceControlViewHost +
+
+
+
+ + SurfaceControlViewHost + +
+
+ + + + + +
+
+
+ SurfaceView +
+
+ acquired by +
+ RemotePluginInstance:: +
+ getRemoteNativeView() +
+
+
+
+ + SurfaceView... + +
+
+ + + + +
+
+
+ AudioPluginSurfaceControlClient +
+
+
+
+ + AudioPluginSurfaceControlClient + +
+
+ + + + + +
+
+
+ bindService(), +
+ "CONNECT" +
+
+
+
+ + bindServic... + +
+
+ + + + + +
+
+
+ RemotePluginInstance:: +
+ prepareSurfaceControlForRemoteNativeUI() +
+
+
+
+ + RemotePlug... + +
+
+ + + + +
+
+
+ AudioPluginViewService +
+
+
+
+ + AudioPluginViewService + +
+
+ + + + +
+
+
+ AudioPluginViewFactory +
+ implementation +
+
+
+
+ + AudioPluginViewFactory... + +
+
+ + + + +
+
+
+ Plugin UI +
+ (android.view.View) +
+
+
+
+ + Plugin UI... + +
+
+ + + + + +
+
+
+ createView() +
+
+
+
+ + createView... + +
+
+ + +
+ + + + + Text is not SVG - cannot display + + + +
\ No newline at end of file