-
Notifications
You must be signed in to change notification settings - Fork 4.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
C# and Unity wrappers #2559
C# and Unity wrappers #2559
Conversation
* Object pooling for frames and profiles * Fixed a bug where PlaybackDevice disposed the underlying device * Removed custom FrameSet marshaler * Add ICompositeDisposable interface to FrameReleaser and FrameSet * Processing blocks callbacks are marshalled through native user-data pointers, avoiding closure allocation * Added missing Format.Disparity32 * Added Option interfaces (IOption, IOptions, IOptionsContainer) * Added IEnumerable<Frame> to Pipeline
* Downgrade project version to 2017.4 LTS * VideoFrame to Texture2D uses FrameQueue and uploads data straight to GPU * Fixed stream configuration being reset when recording * Multi device support (via RsFrameProvider) * Processing blocks are now asset based, their options are persistent and they have a dedicated inspector UI.
@@ -77,8 +77,8 @@ public override void OnInspectorGUI() | |||
|
|||
EditorGUILayout.Space(); | |||
EditorGUILayout.PropertyField(config.FindPropertyRelative("Profiles"), true); | |||
EditorGUILayout.Space(); | |||
EditorGUILayout.PropertyField(serializedObject.FindProperty("_processingPipe"), false); | |||
// EditorGUILayout.Space(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove comments
} | ||
|
||
public override List<Stream> Requirments() | ||
void Update() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why don't you use setters instead of Update?
{ | ||
if (a == this) | ||
continue; | ||
// Debug.Log(a, a); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove
|
||
private Colorizer _pb; | ||
|
||
public VisualPreset visualPreset = VisualPreset.Dynamic; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
missing tooltips
[ProcessingBlockData(typeof(DepthCutoff))] | ||
public class DepthCutoff : RsProcessingBlock | ||
{ | ||
public ushort Distance = 1000; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
missing tooltips
@@ -31,40 +35,57 @@ public class RsTemporalFilter : RsProcessingBlock | |||
[Range(0, 8)] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
missing tooltips
/// </summary> | ||
public enum ProcessMode | ||
{ | ||
Multithread, | ||
UnityThread, | ||
} | ||
|
||
public static RsDevice Instance { get; private set; } | ||
// public static RsDevice Instance { get; private set; } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove
} | ||
} | ||
|
||
// using (var p = frame.Profile) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove
{ | ||
object error; | ||
m_instance = new HandleRef(this, NativeMethods.rs2_create_frame_queue(capacity, out error)); | ||
} | ||
|
||
public bool PollForFrame(out Frame frame, FramesReleaser releaser = null) | ||
public bool PollForFrame(out Frame frame) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
add Obsolete overload
@@ -98,6 +98,10 @@ internal static class NativeMethods | |||
[DllImport(dllName, CallingConvention = CallingConvention.Cdecl)] | |||
internal static extern IntPtr rs2_create_processing_block_fptr([MarshalAs(UnmanagedType.FunctionPtr)] frame_processor_callback on_frame, IntPtr user, [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof(Helpers.ErrorMarshaler))] out object error); | |||
|
|||
internal static void rs2_get_video_stream_resolution(IntPtr ptr, out object width, out object height, out object error) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what is this for?
I think that we can merge this one together with #2561 which fix a crash in the SW device example, update the documentation and fix few issues in the processing blocks in the unity project |
C#
Object pooling for frames and profiles
Fixed a bug where PlaybackDevice disposed the underlying device
Removed custom FrameSet marshaler
Add ICompositeDisposable interface to FrameReleaser and FrameSet
Processing blocks callbacks are marshalled through native user-data pointers, avoiding closure allocation
Added missing Format.Disparity32
Added Option interfaces (IOption, IOptions, IOptionsContainer)
Added IEnumerable to Pipeline
UNITY
Downgrade project version to 2017.4 LTS
VideoFrame to Texture2D uses FrameQueue and uploads data straight to GPU
Fixed stream configuration being reset when recording
Multi device support (via RsFrameProvider)
Processing blocks are now asset based, their options are persistent and they have a dedicated inspector UI.