From baf7eaf8f29d5a490f2580917362cf5b3db47281 Mon Sep 17 00:00:00 2001
From: Håkon Vågsether <haakonsv@gmail.com>
Date: Sun, 24 Sep 2017 12:16:22 +0200
Subject: Added auto-generated YAML blocks

---
 gr-video-sdl/grc/CMakeLists.txt           |  4 +-
 gr-video-sdl/grc/video.tree.yml           |  3 ++
 gr-video-sdl/grc/video_block_tree.xml     | 13 -----
 gr-video-sdl/grc/video_sdl_sink.block.yml | 61 ++++++++++++++++++++++
 gr-video-sdl/grc/video_sdl_sink.xml       | 86 -------------------------------
 5 files changed, 66 insertions(+), 101 deletions(-)
 create mode 100644 gr-video-sdl/grc/video.tree.yml
 delete mode 100644 gr-video-sdl/grc/video_block_tree.xml
 create mode 100644 gr-video-sdl/grc/video_sdl_sink.block.yml
 delete mode 100644 gr-video-sdl/grc/video_sdl_sink.xml

(limited to 'gr-video-sdl')

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>
-- 
cgit v1.2.3