diff --git a/Assets/NHVD.cs b/Assets/NHVD.cs index 3cb4454..31acf26 100644 --- a/Assets/NHVD.cs +++ b/Assets/NHVD.cs @@ -88,7 +88,7 @@ public struct nhvd_point_cloud #else [DllImport ("nhvd")] #endif - public static extern System.IntPtr nhvd_init(ref nhvd_net_config net_config, ref nhvd_hw_config hw_config, ref nhvd_depth_config depth_config) ; + public static extern System.IntPtr nhvd_init(ref nhvd_net_config net_config, [In]nhvd_hw_config[] hw_configs, int hw_size, ref nhvd_depth_config depth_config); ///Return Type: nhvd* ///net_config: nhvd_net_config* @@ -99,11 +99,11 @@ public struct nhvd_point_cloud #else [DllImport ("nhvd")] #endif - private static extern System.IntPtr nhvd_init(ref nhvd_net_config net_config, ref nhvd_hw_config hw_config, System. IntPtr depth_config) ; + private static extern System.IntPtr nhvd_init(ref nhvd_net_config net_config, ref nhvd_hw_config hw_config, int hw_size, System.IntPtr depth_config) ; public static System.IntPtr nhvd_init(ref nhvd_net_config net_config, ref nhvd_hw_config hw_config) { - return nhvd_init(ref net_config, ref hw_config, System.IntPtr.Zero); + return nhvd_init(ref net_config, ref hw_config, 1, System.IntPtr.Zero); } /// Return Type: void diff --git a/Assets/PointCloudRenderer.cs b/Assets/PointCloudRenderer.cs index 83fbfa6..24ea427 100644 --- a/Assets/PointCloudRenderer.cs +++ b/Assets/PointCloudRenderer.cs @@ -30,11 +30,14 @@ public class PointCloudRenderer : MonoBehaviour void Awake() { NHVD.nhvd_net_config net_config = new NHVD.nhvd_net_config{ip=this.ip, port=this.port, timeout_ms=500 }; - NHVD.nhvd_hw_config hw_config = new NHVD.nhvd_hw_config{hardware="vaapi", codec="hevc", device=this.device, pixel_format="p010le", width=848, height=480, profile=2}; - NHVD.nhvd_depth_config depth_config = new NHVD.nhvd_depth_config{ppx = 421.353f, ppy=240.93f, fx=426.768f, fy=426.768f, depth_unit = 0.0001f}; - //NHVD.nhvd_depth_config depth_config = new NHVD.nhvd_depth_config{ppx = 421.353f, ppy=240.93f, fx=426.768f, fy=426.768f, depth_unit = 0.00003125f}; - - nhvd=NHVD.nhvd_init (ref net_config, ref hw_config, ref depth_config); + NHVD.nhvd_hw_config[] hw_config = new NHVD.nhvd_hw_config[]{ + new NHVD.nhvd_hw_config{hardware="vaapi", codec="hevc", device=this.device, pixel_format="p010le", width=848, height=480, profile=2}, + new NHVD.nhvd_hw_config{hardware="vaapi", codec="hevc", device=this.device, pixel_format="rgb0", width=848, height=480, profile=1} + }; + //NHVD.nhvd_depth_config depth_config = new NHVD.nhvd_depth_config{ppx = 421.353f, ppy=240.93f, fx=426.768f, fy=426.768f, depth_unit = 0.0001f}; + NHVD.nhvd_depth_config depth_config = new NHVD.nhvd_depth_config{ppx = 421.353f, ppy=240.93f, fx=426.768f, fy=426.768f, depth_unit = 0.00003125f}; + + nhvd=NHVD.nhvd_init (ref net_config, hw_config, hw_config.Length, ref depth_config); if (nhvd == IntPtr.Zero) { diff --git a/Assets/Scenes/SampleScene.unity b/Assets/Scenes/SampleScene.unity index 35acd27..9ab1816 100644 --- a/Assets/Scenes/SampleScene.unity +++ b/Assets/Scenes/SampleScene.unity @@ -650,7 +650,7 @@ GameObject: m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 - m_IsActive: 1 + m_IsActive: 0 --- !u!224 &785509538 RectTransform: m_ObjectHideFlags: 0 @@ -715,7 +715,7 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 12effc58cbb744b51ba7e080578fcc88, type: 3} m_Name: m_EditorClassIdentifier: - device: /dev/dri/renderD129 + device: /dev/dri/renderD128 ip: port: 9767 --- !u!1 &1469442498 @@ -733,7 +733,7 @@ GameObject: m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 - m_IsActive: 0 + m_IsActive: 1 --- !u!224 &1469442499 RectTransform: m_ObjectHideFlags: 0 diff --git a/PluginsSource/network-hardware-video-decoder b/PluginsSource/network-hardware-video-decoder index cefa9d7..e388dde 160000 --- a/PluginsSource/network-hardware-video-decoder +++ b/PluginsSource/network-hardware-video-decoder @@ -1 +1 @@ -Subproject commit cefa9d78258f128a214bca24b8fa3566cf63dacb +Subproject commit e388dde3385e225732bd2c1e850f975756ea304f