+2005-01-06 Benjamin Otte <otte@gnome.org>
+
+ * gst/games/gstpuzzle.c: (gst_puzzle_base_init):
+ make RGB endianness work correctly
+ (gst_puzzle_show), (gst_puzzle_swap), (gst_puzzle_move):
+ refactor and fix race with initial shuffling
+ (nav_event_handler):
+ allow using the mouse to puzzle
+ (draw_puzzle):
+ insist on tiles having width and height as multiples of 4 to get
+ clean YUV image handling
+ * sys/xvimage/xvimagesink.c: (gst_xvimagesink_xvimage_new),
+ (gst_xvimagesink_handle_xevents), (gst_xvimagesink_buffer_alloc):
+ s/DEBUG/LOG/ for common messages
+ (gst_xvimagesink_navigation_send_event):
+ fix mouse event translation to not include screen PAR
+ * sys/ximage/ximagesink.c: (gst_ximagesink_navigation_send_event):
+ fix mouse event translation to actually work
+
2005-01-06 Stephane LOEUILLET <stephane.loeuillet@tiscali.fr>
* gst/asfdemux/gstasfdemux.c:
y_offset = ximagesink->xwindow->height - GST_VIDEOSINK_HEIGHT (ximagesink);
if (gst_structure_get_double (structure, "pointer_x", &x)) {
- x += x_offset;
+ x -= x_offset / 2;
gst_structure_set (structure, "pointer_x", G_TYPE_DOUBLE, x, NULL);
}
if (gst_structure_get_double (structure, "pointer_y", &y)) {
- y += y_offset;
+ y -= y_offset / 2;
gst_structure_set (structure, "pointer_y", G_TYPE_DOUBLE, y, NULL);
}
gboolean succeeded = FALSE;
g_return_val_if_fail (GST_IS_XVIMAGESINK (xvimagesink), NULL);
- GST_DEBUG_OBJECT (xvimagesink, "creating %dx%d", width, height);
+ GST_LOG_OBJECT (xvimagesink, "creating %dx%d", width, height);
xvimage = g_new0 (GstXvImage, 1);
/* we have to use the returned data_size for our shm size */
xvimage->size = xvimage->xvimage->data_size;
- GST_DEBUG_OBJECT (xvimagesink, "XShm image size is %d", xvimage->size);
+ GST_LOG_OBJECT (xvimagesink, "XShm image size is %d", xvimage->size);
xvimage->SHMInfo.shmid = shmget (IPC_PRIVATE, xvimage->size,
IPC_CREAT | 0777);
GST_DEBUG ("xvimagesink pointer moved over window at %d,%d",
pointer_x, pointer_y);
gst_navigation_send_mouse_event (GST_NAVIGATION (xvimagesink),
- "mouse-move", 0, pointer_x, pointer_y);
+ "mouse-move", 0, e.xbutton.x, e.xbutton.y);
}
/* We get all events on our window to throw them upstream */
if (!xvimage) {
/* We found no suitable image in the pool. Creating... */
- GST_DEBUG_OBJECT (xvimagesink, "no usable image in pool, creating xvimage");
+ GST_LOG_OBJECT (xvimagesink, "no usable image in pool, creating xvimage");
xvimage = gst_xvimagesink_xvimage_new (xvimagesink,
xvimagesink->video_width, xvimagesink->video_height);
}
/* Converting pointer coordinates to the non scaled geometry */
if (gst_structure_get_double (structure, "pointer_x", &x)) {
- x *= GST_VIDEOSINK_WIDTH (xvimagesink);
+ x *= xvimagesink->video_width;
x /= xvimagesink->xwindow->width;
gst_structure_set (structure, "pointer_x", G_TYPE_DOUBLE, x, NULL);
}
if (gst_structure_get_double (structure, "pointer_y", &y)) {
- y *= GST_VIDEOSINK_HEIGHT (xvimagesink);
+ y *= xvimagesink->video_height;
y /= xvimagesink->xwindow->height;
gst_structure_set (structure, "pointer_y", G_TYPE_DOUBLE, y, NULL);
}