[Bug 740557] videotestsrc: add ball motion based on system clock

GStreamer (bugzilla.gnome.org) bugzilla at gnome.org
Thu Jan 8 04:55:18 PST 2015


https://bugzilla.gnome.org/show_bug.cgi?id=740557
  GStreamer | gst-plugins-base | git

Sebastian Dröge (slomo) <slomo> changed:

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

--- Comment #24 from Sebastian Dröge (slomo) <slomo at coaxion.net> 2015-01-08 12:55:14 UTC ---
Review of attachment 292023:
 --> (https://bugzilla.gnome.org/review?bug=740557&attachment=292023)

::: gst/videotestsrc/gstvideotestsrc.c
@@ +185,3 @@
+    {GST_VIDEO_TEST_SRC_WALL_TIME, "wall clock time", "wall-time"},
+    {GST_VIDEO_TEST_SRC_RUNING_TIME, "running time",
+        "running-time (Throws: NOT IMPLEMENTED)"},

This needs to be implemented first before merging, or be commented out

@@ +207,3 @@
+        "wavy"},
+    {GST_VIDEO_TEST_SRC_SWEEP, "1 revoltion per seccond", "sweep"},
+    {GST_VIDEO_TEST_SRC_HSWEEP, "1/2 revoltion per seccond, then reset to
top",

typo: second, not seccond

@@ +243,3 @@
+  g_object_class_install_property (gobject_class, PROP_ANIMATION_MODE,
+      g_param_spec_enum ("animation-mode", "Animation mode",
+          "For Pattern=Ball, what counter defines the position of the ball.",

pattern=ball (lowercase)

@@ +249,3 @@
+  g_object_class_install_property (gobject_class, PROP_MOTION_TYPE,
+      g_param_spec_enum ("motion", "Motion",
+          "For Pattern=Ball, what the ball does",

and here

@@ +255,3 @@
+  g_object_class_install_property (gobject_class, PROP_FLIP,
+      g_param_spec_boolean ("flip", "Flip",
+          "For Pattern=Ball, invert colors every second.",

and here

::: gst/videotestsrc/videotestsrc.c
@@ +1060,1 @@
 gst_video_test_src_ball (GstVideoTestSrc * v, GstVideoFrame * frame)

For getting the running time here, the trick would be to pass it as a parameter
to the rendering functions.

In non-live mode it would be the value that is set to GST_BUFFER_TIMESTAMP/PTS.
In live-mode it would be gst_clock_get_time(GST_ELEMENT_CLOCK(src)) -
gst_element_get_base_time(src). Nothing complicated really.

@@ +1088,3 @@
+      /* Not sure where to get parameters from. */
+      g_error_new (GST_CORE_ERROR, GST_CORE_ERROR_NOT_IMPLEMENTED,
+          "Running Time based animation not coded.");

This does not do what you think it does :) GError is just a object you can pass
around that contains error information, it does not do anything by itself.

You could use GST_ELEMENT_ERROR() here for example. But either comment out this
running time code or just implement it as above.

-- 
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