sys/xvimage/xvimagesink.c: Fix navigation events coordinates translation with pixel aspect ratios.

Original commit message from CVS:
2005-11-28  Julien MOUTTE  <julien@moutte.net>

* sys/xvimage/xvimagesink.c:
(gst_xvimagesink_navigation_send_event): Fix navigation events
coordinates translation with pixel aspect ratios.
This commit is contained in:
Julien Moutte 2005-11-28 14:32:48 +00:00
parent 9e5ce652b2
commit 0767718887
3 changed files with 13 additions and 3 deletions

View file

@ -1,3 +1,9 @@
2005-11-28 Julien MOUTTE <julien@moutte.net>
* sys/xvimage/xvimagesink.c:
(gst_xvimagesink_navigation_send_event): Fix navigation events
coordinates translation with pixel aspect ratios.
2005-11-28 Julien MOUTTE <julien@moutte.net>
* sys/xvimage/xvimagesink.c: (gst_xvimagesink_xvimage_put):

2
common

@ -1 +1 @@
Subproject commit c04ad83a0c184fcd311de39371570b9e773a60d0
Subproject commit b0b08bcd66ca385364b6f90663585b09693aec67

View file

@ -1884,6 +1884,8 @@ gst_xvimagesink_navigation_send_event (GstNavigation * navigation,
return;
}
/* We get the frame position using the calculated geometry from _setcaps
that respect pixel aspect ratios */
src.w = GST_VIDEO_SINK_WIDTH (xvimagesink);
src.h = GST_VIDEO_SINK_HEIGHT (xvimagesink);
dst.w = xvimagesink->xwindow->width;
@ -1899,8 +1901,10 @@ gst_xvimagesink_navigation_send_event (GstNavigation * navigation,
result.h = dst.h;
}
xscale = (gdouble) GST_VIDEO_SINK_WIDTH (xvimagesink) / result.w;
yscale = (gdouble) GST_VIDEO_SINK_HEIGHT (xvimagesink) / result.h;
/* We calculate scaling using the original video frames geometry to include
pixel aspect ratio scaling. */
xscale = (gdouble) xvimagesink->video_width / result.w;
yscale = (gdouble) xvimagesink->video_height / result.h;
/* Converting pointer coordinates to the non scaled geometry */
if (gst_structure_get_double (structure, "pointer_x", &x)) {