summaryrefslogtreecommitdiff
path: root/gr-video-sdl
diff options
context:
space:
mode:
authorHåkon Vågsether <haakonsv@gmail.com>2017-09-24 12:16:22 +0200
committerHåkon Vågsether <haakonsv@gmail.com>2017-10-10 10:49:36 +0200
commitbaf7eaf8f29d5a490f2580917362cf5b3db47281 (patch)
tree7afab4ee2dfa6439ecf95d47aa68996020ea04c5 /gr-video-sdl
parent6fa9d33246251f44a0e78682e50e9a1cb0b03171 (diff)
Added auto-generated YAML blocks
Diffstat (limited to 'gr-video-sdl')
-rw-r--r--gr-video-sdl/grc/CMakeLists.txt4
-rw-r--r--gr-video-sdl/grc/video.tree.yml3
-rw-r--r--gr-video-sdl/grc/video_block_tree.xml13
-rw-r--r--gr-video-sdl/grc/video_sdl_sink.block.yml61
-rw-r--r--gr-video-sdl/grc/video_sdl_sink.xml86
5 files changed, 66 insertions, 101 deletions
diff --git a/gr-video-sdl/grc/CMakeLists.txt b/gr-video-sdl/grc/CMakeLists.txt
index f62d41b6db..f72c9e3576 100644
--- a/gr-video-sdl/grc/CMakeLists.txt
+++ b/gr-video-sdl/grc/CMakeLists.txt
@@ -18,8 +18,8 @@
# Boston, MA 02110-1301, USA.
install(FILES
- video_sdl_sink.xml
- video_block_tree.xml
+ video_sdl_sink.block.yml
+ video.tree.yml
DESTINATION share/gnuradio/grc/blocks
)
diff --git a/gr-video-sdl/grc/video.tree.yml b/gr-video-sdl/grc/video.tree.yml
new file mode 100644
index 0000000000..566de33ecc
--- /dev/null
+++ b/gr-video-sdl/grc/video.tree.yml
@@ -0,0 +1,3 @@
+'[Core]':
+- Video:
+ - video_sdl_sink
diff --git a/gr-video-sdl/grc/video_block_tree.xml b/gr-video-sdl/grc/video_block_tree.xml
deleted file mode 100644
index f4f3e4199c..0000000000
--- a/gr-video-sdl/grc/video_block_tree.xml
+++ /dev/null
@@ -1,13 +0,0 @@
-<?xml version="1.0"?>
-<!--
-###################################################
-##Block Tree for video blocks.
-###################################################
- -->
-<cat>
- <name>[Core]</name>
- <cat>
- <name>Video</name>
- <block>video_sdl_sink</block>
- </cat>
-</cat>
diff --git a/gr-video-sdl/grc/video_sdl_sink.block.yml b/gr-video-sdl/grc/video_sdl_sink.block.yml
new file mode 100644
index 0000000000..cc3b9949b0
--- /dev/null
+++ b/gr-video-sdl/grc/video_sdl_sink.block.yml
@@ -0,0 +1,61 @@
+id: video_sdl_sink
+label: Video SDL Sink
+
+parameters:
+- id: type
+ label: Input Type
+ dtype: enum
+ options: [byte, short]
+ option_attributes:
+ fcn: [uc, s]
+ hide: part
+- id: width
+ label: Input Width
+ dtype: int
+ default: '640'
+- id: height
+ label: Input Height
+ dtype: int
+ default: '480'
+- id: display_width
+ label: Display Width
+ dtype: int
+ default: '640'
+- id: display_height
+ label: Display Height
+ dtype: int
+ default: '480'
+- id: fps
+ label: Framerate
+ dtype: float
+ default: '0'
+- id: num_channels
+ label: Channels
+ dtype: enum
+ options: ['1', '2', '3']
+ option_labels: [1 (Grayscale), '2 (Y, alternating pixels U and V)', 3 (YUV)]
+ hide: part
+
+inputs:
+- domain: stream
+ dtype: ${ type }
+ vlen: 1
+ multiplicity: ${ num_channels }
+
+templates:
+ imports: from gnuradio import video_sdl
+ make: video_sdl.sink_${type.fcn}(${fps}, ${width}, ${height}, 0, ${display_width},
+ ${display_height})
+
+documentation: |-
+ Provides a rudimentary on-screen video display using libsdl.
+
+ A framerate of zero means video will be displayed as quickly as possible.
+
+ In 1-channel mode, input data is assumed to be grayscale, with each input item mapping to a single pixel.
+
+ In 2-channel mode, the first channel is Y for every pixel while the second channel alternates between pixels values for U and V.
+
+ In 3-channel mode, input channels are assumed to be matching triples of YUV values, one byte per pixel, per channel.
+
+file_format: 1
diff --git a/gr-video-sdl/grc/video_sdl_sink.xml b/gr-video-sdl/grc/video_sdl_sink.xml
deleted file mode 100644
index 02ad089aff..0000000000
--- a/gr-video-sdl/grc/video_sdl_sink.xml
+++ /dev/null
@@ -1,86 +0,0 @@
-<?xml version='1.0'?>
-<block>
- <name>Video SDL Sink</name>
- <key>video_sdl_sink</key>
- <import>from gnuradio import video_sdl</import>
- <make>video_sdl.sink_$(type.fcn)($fps, $width, $height, 0, $display_width, $display_height)</make>
- <param>
- <name>Input Type</name>
- <key>type</key>
- <type>enum</type>
- <option>
- <name>Byte</name>
- <key>byte</key>
- <opt>fcn:uc</opt>
- </option>
- <option>
- <name>Short</name>
- <key>short</key>
- <opt>fcn:s</opt>
- </option>
- </param>
- <param>
- <name>Input Width</name>
- <key>width</key>
- <value>640</value>
- <type>int</type>
- </param>
- <param>
- <name>Input Height</name>
- <key>height</key>
- <value>480</value>
- <type>int</type>
- </param>
- <param>
- <name>Display Width</name>
- <key>display_width</key>
- <value>640</value>
- <type>int</type>
- </param>
- <param>
- <name>Display Height</name>
- <key>display_height</key>
- <value>480</value>
- <type>int</type>
- </param>
- <param>
- <name>Framerate</name>
- <key>fps</key>
- <value>0</value>
- <type>float</type>
- </param>
- <param>
- <name>Channels</name>
- <key>num_channels</key>
- <type>enum</type>
- <option>
- <name>1 (Grayscale)</name>
- <key>1</key>
- </option>
- <option>
- <name>2 (Y, alternating pixels U and V)</name>
- <key>2</key>
- </option>
- <option>
- <name>3 (YUV)</name>
- <key>3</key>
- </option>
- </param>
- <sink>
- <name>in</name>
- <type>$type</type>
- <vlen>1</vlen>
- <nports>$num_channels</nports>
- </sink>
- <doc>
-Provides a rudimentary on-screen video display using libsdl.
-
-A framerate of zero means video will be displayed as quickly as possible.
-
-In 1-channel mode, input data is assumed to be grayscale, with each input item mapping to a single pixel.
-
-In 2-channel mode, the first channel is Y for every pixel while the second channel alternates between pixels values for U and V.
-
-In 3-channel mode, input channels are assumed to be matching triples of YUV values, one byte per pixel, per channel.
- </doc>
-</block>