[Bug 743629] validate: add an extra test suite for checking elements

GStreamer (bugzilla.gnome.org) bugzilla at gnome.org
Fri Jan 30 02:25:44 PST 2015


https://bugzilla.gnome.org/show_bug.cgi?id=743629
  GStreamer | gst-devtools | unspecified

Thibault Saunier <tsaunier> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
 Attachment #295766|none                        |needs-work
             status|                            |

--- Comment #8 from Thibault Saunier <tsaunier at gnome.org> 2015-01-30 10:25:43 UTC ---
Review of attachment 295766:
 --> (https://bugzilla.gnome.org/review?bug=743629&attachment=295766)

::: testsuites/validateelements.py
@@ +33,3 @@
+BLACKLIST = []
+
+pipelines_descriptions = []

Should not be global but returned by the following function

@@ +39,3 @@
+    loop = 0
+    prop_value = Gst.ElementFactory.make(fname, None).get_property(prop.name)
+    bool_value = "True"

Why do you work with strings here instead of actual booleans? (conversion to
string will be done automatically in Python)

@@ +44,3 @@
+    if prop.value_type == GObject.TYPE_BOOLEAN:
+        loop = 2
+    elif prop.value_type == GObject.TYPE_INT or prop.value_type ==
GObject.TYPE_INT64 or \

You chould rather do:

    elif prop.value_type in [GObject.TYPE_INT, GObject.TYPE_INT64,
GObject.TYPE_UINT...]

And actually add a pspec_is_numeric function or something

@@ +62,3 @@
+                prop.value_type == GObject.TYPE_UINT or prop.value_type ==
GObject.TYPE_UINT64 or \
+                prop.value_type == GObject.TYPE_LONG or prop.value_type ==
GObject.TYPE_ULONG or \
+                prop.value_type == GObject.TYPE_DOUBLE:

And use the func here too

@@ +79,3 @@
+        elif "Video" in klass:
+            cpipe = "videotestsrc num-buffers=20 ! %s " % (cname)
+            sink = "! videoconvert ! autovideosink"

You should simply use "! videoconvert ! %(videosink)s" -- The base
PipelineGenerator class will handle the templating

-- 
Configure bugmail: https://bugzilla.gnome.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.


More information about the gstreamer-bugs mailing list