diff --git a/ChangeLog b/ChangeLog index 5752de747f..acb2531184 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2005-11-28 Julien MOUTTE + + * sys/xvimage/xvimagesink.c: + (gst_xvimagesink_navigation_send_event): Fix navigation events + coordinates translation with pixel aspect ratios. + 2005-11-28 Julien MOUTTE * sys/xvimage/xvimagesink.c: (gst_xvimagesink_xvimage_put): diff --git a/common b/common index c04ad83a0c..b0b08bcd66 160000 --- a/common +++ b/common @@ -1 +1 @@ -Subproject commit c04ad83a0c184fcd311de39371570b9e773a60d0 +Subproject commit b0b08bcd66ca385364b6f90663585b09693aec67 diff --git a/sys/xvimage/xvimagesink.c b/sys/xvimage/xvimagesink.c index 5178586df8..0d00da4221 100644 --- a/sys/xvimage/xvimagesink.c +++ b/sys/xvimage/xvimagesink.c @@ -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)) {