[Bug 740557] videotestsrc: add ball motion based on system clock
GStreamer (bugzilla.gnome.org)
bugzilla at gnome.org
Fri Nov 28 02:10:23 PST 2014
https://bugzilla.gnome.org/show_bug.cgi?id=740557
GStreamer | gst-plugins-base | git
Sebastian Dröge (slomo) <slomo> changed:
What |Removed |Added
----------------------------------------------------------------------------
Attachment #291692|none |needs-work
status| |
--- Comment #7 from Sebastian Dröge (slomo) <slomo at coaxion.net> 2014-11-28 10:10:20 UTC ---
Review of attachment 291692:
--> (https://bugzilla.gnome.org/review?bug=740557&attachment=291692)
Looks good, good work :)
::: gst/videotestsrc/videotestsrc.c
@@ +1077,3 @@
+ x = radius + (0.5 + 0.5 * sin (2 * G_PI * t / 200)) * (w - 2 * radius);
+ y = radius + (0.5 + 0.5 * sin (2 * G_PI * sqrt (2) * t / 200)) * (h -
+ 2 * radius);
Shouldn't there be a mode for doing this based on real time instead of frames
too?
@@ +1089,3 @@
+ radius = MIN (h, w) / 4 - 0;
+
+ ts = gst_util_get_timestamp ();
And one for doing this based on frames?
@@ +1096,3 @@
+ rad = 2 * G_PI * ts / 1000000000;
+ } else { /* motion_type GST_VIDEO_TEST_SRC_HSWEEP */
+ rad = G_PI * ts / 1000000000;
Use GST_SECOND here instead of the large literals :)
--
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