diff --git a/Assets/Klak/NDI/Internal.meta b/Assets/Klak/NDI/Plugin.meta similarity index 100% rename from Assets/Klak/NDI/Internal.meta rename to Assets/Klak/NDI/Plugin.meta diff --git a/Assets/Klak/NDI/Internal/PluginEntry.cs b/Assets/Klak/NDI/Plugin/PluginEntry.cs similarity index 100% rename from Assets/Klak/NDI/Internal/PluginEntry.cs rename to Assets/Klak/NDI/Plugin/PluginEntry.cs diff --git a/Assets/Klak/NDI/Internal/PluginEntry.cs.meta b/Assets/Klak/NDI/Plugin/PluginEntry.cs.meta similarity index 100% rename from Assets/Klak/NDI/Internal/PluginEntry.cs.meta rename to Assets/Klak/NDI/Plugin/PluginEntry.cs.meta diff --git a/Assets/Klak/NDI/Internal/x64.meta b/Assets/Klak/NDI/Plugin/x64.meta similarity index 100% rename from Assets/Klak/NDI/Internal/x64.meta rename to Assets/Klak/NDI/Plugin/x64.meta diff --git a/Assets/Klak/NDI/Internal/x64/KlakNDI.dll b/Assets/Klak/NDI/Plugin/x64/KlakNDI.dll similarity index 85% rename from Assets/Klak/NDI/Internal/x64/KlakNDI.dll rename to Assets/Klak/NDI/Plugin/x64/KlakNDI.dll index fc1b32ae..e7ba6842 100644 Binary files a/Assets/Klak/NDI/Internal/x64/KlakNDI.dll and b/Assets/Klak/NDI/Plugin/x64/KlakNDI.dll differ diff --git a/Assets/Klak/NDI/Internal/x64/KlakNDI.dll.meta b/Assets/Klak/NDI/Plugin/x64/KlakNDI.dll.meta similarity index 100% rename from Assets/Klak/NDI/Internal/x64/KlakNDI.dll.meta rename to Assets/Klak/NDI/Plugin/x64/KlakNDI.dll.meta diff --git a/Assets/Klak/NDI/Internal/x64/Processing.NDI.Lib.x64.dll b/Assets/Klak/NDI/Plugin/x64/Processing.NDI.Lib.x64.dll similarity index 100% rename from Assets/Klak/NDI/Internal/x64/Processing.NDI.Lib.x64.dll rename to Assets/Klak/NDI/Plugin/x64/Processing.NDI.Lib.x64.dll diff --git a/Assets/Klak/NDI/Internal/x64/Processing.NDI.Lib.x64.dll.meta b/Assets/Klak/NDI/Plugin/x64/Processing.NDI.Lib.x64.dll.meta similarity index 100% rename from Assets/Klak/NDI/Internal/x64/Processing.NDI.Lib.x64.dll.meta rename to Assets/Klak/NDI/Plugin/x64/Processing.NDI.Lib.x64.dll.meta diff --git a/Assets/Klak/NDI/Resources.meta b/Assets/Klak/NDI/Resources.meta new file mode 100644 index 00000000..912e1549 --- /dev/null +++ b/Assets/Klak/NDI/Resources.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 107befe48faaee941814eb11b2e56ae0 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Klak/NDI/Internal/Receiver.shader b/Assets/Klak/NDI/Resources/Receiver.shader similarity index 100% rename from Assets/Klak/NDI/Internal/Receiver.shader rename to Assets/Klak/NDI/Resources/Receiver.shader diff --git a/Assets/Klak/NDI/Internal/Receiver.shader.meta b/Assets/Klak/NDI/Resources/Receiver.shader.meta similarity index 100% rename from Assets/Klak/NDI/Internal/Receiver.shader.meta rename to Assets/Klak/NDI/Resources/Receiver.shader.meta diff --git a/Assets/Klak/NDI/Internal/Sender.shader b/Assets/Klak/NDI/Resources/Sender.shader similarity index 100% rename from Assets/Klak/NDI/Internal/Sender.shader rename to Assets/Klak/NDI/Resources/Sender.shader diff --git a/Assets/Klak/NDI/Internal/Sender.shader.meta b/Assets/Klak/NDI/Resources/Sender.shader.meta similarity index 100% rename from Assets/Klak/NDI/Internal/Sender.shader.meta rename to Assets/Klak/NDI/Resources/Sender.shader.meta diff --git a/Assets/Klak/NDI/Runtime.meta b/Assets/Klak/NDI/Runtime.meta new file mode 100644 index 00000000..5447b85a --- /dev/null +++ b/Assets/Klak/NDI/Runtime.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 1660cc626986dbe44b3257a88181a838 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Klak/NDI/NdiReceiver.cs b/Assets/Klak/NDI/Runtime/NdiReceiver.cs similarity index 94% rename from Assets/Klak/NDI/NdiReceiver.cs rename to Assets/Klak/NDI/Runtime/NdiReceiver.cs index 2d3ed5c8..08dc19fa 100644 --- a/Assets/Klak/NDI/NdiReceiver.cs +++ b/Assets/Klak/NDI/Runtime/NdiReceiver.cs @@ -63,6 +63,8 @@ public Texture receivedTexture { #region Private members + static IntPtr _callback = PluginEntry.NDI_GetTextureUpdateCallback(); + CommandBuffer _commandBuffer; Texture2D _sourceTexture; MaterialPropertyBlock _propertyBlock; @@ -100,11 +102,10 @@ void Update() // Invoke the texture update callback in the plugin. _commandBuffer.IssuePluginCustomTextureUpdate( - PluginEntry.NDI_GetTextureUpdateCallback(), - _sourceTexture, - PluginEntry.NDI_GetReceiverID(_plugin) + _callback, _sourceTexture, PluginEntry.NDI_GetReceiverID(_plugin) ); Graphics.ExecuteCommandBuffer(_commandBuffer); + _sourceTexture.IncrementUpdateCount(); _commandBuffer.Clear(); // Check the frame dimensions. @@ -131,6 +132,7 @@ void Update() if (_targetTexture != null) { Graphics.Blit(_sourceTexture, _targetTexture, _material, alpha ? 1 : 0); + _targetTexture.IncrementUpdateCount(); } else { diff --git a/Assets/Klak/NDI/NdiReceiver.cs.meta b/Assets/Klak/NDI/Runtime/NdiReceiver.cs.meta similarity index 100% rename from Assets/Klak/NDI/NdiReceiver.cs.meta rename to Assets/Klak/NDI/Runtime/NdiReceiver.cs.meta diff --git a/Assets/Klak/NDI/NdiSender.cs b/Assets/Klak/NDI/Runtime/NdiSender.cs similarity index 100% rename from Assets/Klak/NDI/NdiSender.cs rename to Assets/Klak/NDI/Runtime/NdiSender.cs diff --git a/Assets/Klak/NDI/NdiSender.cs.meta b/Assets/Klak/NDI/Runtime/NdiSender.cs.meta similarity index 100% rename from Assets/Klak/NDI/NdiSender.cs.meta rename to Assets/Klak/NDI/Runtime/NdiSender.cs.meta diff --git a/Plugin/Windows/Sender.h b/Plugin/Windows/Sender.h index e4745d92..ba608c4e 100644 --- a/Plugin/Windows/Sender.h +++ b/Plugin/Windows/Sender.h @@ -26,7 +26,7 @@ namespace KlakNDI frame.xres = width; frame.yres = height; frame.FourCC = static_cast(fourCC); - frame.frame_format_type = NDIlib_frame_format_type_interleaved; + frame.frame_format_type = NDIlib_frame_format_type_progressive; frame.p_data = static_cast(data); frame.line_stride_in_bytes = width * 2; diff --git a/ProjectSettings/ProjectVersion.txt b/ProjectSettings/ProjectVersion.txt index 1fcecb0b..9788b3ac 100644 --- a/ProjectSettings/ProjectVersion.txt +++ b/ProjectSettings/ProjectVersion.txt @@ -1 +1 @@ -m_EditorVersion: 2018.1.0b13 +m_EditorVersion: 2018.1.1f1