Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
74 changes: 74 additions & 0 deletions Plugins/nosReflect/Nodes/FrameRateConverter.nosnode
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
{
"nodes": [
{
"class_name": "FrameRateConverter",
"menu_info": {
"category": "Type",
"display_name": "Frame Rate Converter",
"name_aliases": [
"circular buffer",
"circular queue",
"ring buffer"
]
},
"node": {
"name": "FrameRateConverter",
"display_name": "Frame Rate Converter",
"description": "Features a ring buffer that outputs data at a different rate than input rate.",
"contents_type": "Job",
"pins": [
{
"name": "Thread",
"type_name": "nos.exe",
"show_as": "INPUT_PIN",
"can_show_as": "INPUT_PIN_ONLY"
},
{
"name": "Input",
"type_name": "nos.Generic",
"show_as": "INPUT_PIN",
"can_show_as": "INPUT_PIN_ONLY"
},
{
"name": "Capacity",
"type_name": "uint",
"show_as": "PROPERTY",
"can_show_as": "INPUT_PIN_OR_PROPERTY",
"description": "Number of frames to buffer. Will be larger if Ratio requires it.",
"data": 2,
"min": 1
},
{
"name": "Output",
"type_name": "nos.Generic",
"show_as": "OUTPUT_PIN",
"can_show_as": "OUTPUT_PIN_ONLY",
"live": true
},
{
"name": "Ratio",
"type_name": "nos.fb.vec2u",
"show_as": "PROPERTY",
"can_show_as": "INPUT_PIN_OR_PROPERTY",
"data": {
"x": 1,
"y": 1
},
"min": {
"x": 1,
"y": 1
}
},
{
"name": "Mode",
"type_name": "nos.reflect.RingBufferServeMode",
"show_as": "PROPERTY",
"can_show_as": "INPUT_PIN_OR_PROPERTY",
"data": "WaitUntilFull"
}
]
}
}
],
"schema_version": "1.4-v1"
}
13 changes: 11 additions & 2 deletions Plugins/nosReflect/Source/BoundedQueueNodes.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,17 @@
namespace nos::reflect
{

using CopyingBoundedQueueNode = RingBufferNodeBase<CopyingSlot, ServeMode::Immediate>;
using BoundedObjectQueueNode = RingBufferNodeBase<ObjectSlot, ServeMode::Immediate>;
struct CopyingBoundedQueueNode : RingBufferNodeBase<CopyingSlot>
{
CopyingBoundedQueueNode()
: RingBufferNodeBase(RingBufferServeMode::ServeImmediately) {}
};

struct BoundedObjectQueueNode : RingBufferNodeBase<ObjectSlot>
{
BoundedObjectQueueNode()
: RingBufferNodeBase(RingBufferServeMode::ServeImmediately) {}
};

nosResult RegisterCopyingBoundedQueue(nosNodeFunctions* funcs)
{
Expand Down
Loading