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):
Use calculated video geometry from _setcaps instead of buffer
caps to respect pixel aspect ratio. (fixes #322388)
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;
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)) {