diff options
author | Jan Schmidt <thaytan@mad.scientist.com> | 2005-11-22 20:07:47 +0000 |
---|---|---|
committer | Jan Schmidt <thaytan@mad.scientist.com> | 2005-11-22 20:07:47 +0000 |
commit | dad9986cb4646c0090a9c8408c1a1d9e00869ae2 (patch) | |
tree | 6ebc973d0760c05eadf9fff29898938f1c54d831 /gst/debug | |
parent | 842a43f80230c65d024a5859c6b67dc601e7de64 (diff) |
Convert to fractional framerates.
Original commit message from CVS:
* ext/aalib/gstaasink.c: (gst_aasink_fixate):
* gst/debug/gstnavigationtest.c:
(gst_navigationtest_handle_src_event):
* gst/videofilter/gstvideofilter.c:
(gst_videofilter_format_get_structure), (gst_videofilter_setcaps),
(gst_videofilter_init):
* gst/videofilter/gstvideofilter.h:
Convert to fractional framerates.
Diffstat (limited to 'gst/debug')
-rw-r--r-- | gst/debug/gstnavigationtest.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/gst/debug/gstnavigationtest.c b/gst/debug/gstnavigationtest.c index 9b40fc1e..220947a8 100644 --- a/gst/debug/gstnavigationtest.c +++ b/gst/debug/gstnavigationtest.c @@ -147,6 +147,12 @@ gst_navigationtest_handle_src_event (GstPad * pad, GstEvent * event) case GST_EVENT_NAVIGATION: { const GstStructure *s = gst_event_get_structure (event); + gint fps_n, fps_d; + + fps_n = gst_value_get_fraction_numerator ( + (&GST_VIDEOFILTER (navtest)->framerate)); + fps_d = gst_value_get_fraction_denominator ( + (&GST_VIDEOFILTER (navtest)->framerate)); type = gst_structure_get_string (s, "event"); if (g_str_equal (type, "mouse-move")) { @@ -157,7 +163,7 @@ gst_navigationtest_handle_src_event (GstPad * pad, GstEvent * event) gst_structure_get_double (s, "pointer_x", &click->x); gst_structure_get_double (s, "pointer_y", &click->y); - click->images_left = ceil (GST_VIDEOFILTER (navtest)->framerate); + click->images_left = (fps_n + fps_d - 1) / fps_d; /* green */ click->cy = 150; click->cu = 46; @@ -168,7 +174,7 @@ gst_navigationtest_handle_src_event (GstPad * pad, GstEvent * event) gst_structure_get_double (s, "pointer_x", &click->x); gst_structure_get_double (s, "pointer_y", &click->y); - click->images_left = ceil (GST_VIDEOFILTER (navtest)->framerate); + click->images_left = (fps_n + fps_d - 1) / fps_d; /* red */ click->cy = 76; click->cu = 85; |