diff --git a/ChangeLog b/ChangeLog index 5dd00a5648..6391b170d4 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,22 @@ +2005-01-06 Benjamin Otte + + * 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 * gst/asfdemux/gstasfdemux.c: diff --git a/sys/ximage/ximagesink.c b/sys/ximage/ximagesink.c index 5fbd7fffd8..d73d26af4a 100644 --- a/sys/ximage/ximagesink.c +++ b/sys/ximage/ximagesink.c @@ -1260,11 +1260,11 @@ gst_ximagesink_navigation_send_event (GstNavigation * navigation, 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); } diff --git a/sys/xvimage/xvimagesink.c b/sys/xvimage/xvimagesink.c index 56ee57d979..10aede9934 100644 --- a/sys/xvimage/xvimagesink.c +++ b/sys/xvimage/xvimagesink.c @@ -194,7 +194,7 @@ gst_xvimagesink_xvimage_new (GstXvImageSink * xvimagesink, 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); @@ -219,7 +219,7 @@ gst_xvimagesink_xvimage_new (GstXvImageSink * xvimagesink, /* 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); @@ -606,7 +606,7 @@ gst_xvimagesink_handle_xevents (GstXvImageSink * xvimagesink, GstPad * pad) 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 */ @@ -1510,7 +1510,7 @@ gst_xvimagesink_buffer_alloc (GstPad * pad, guint64 offset, guint size) 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); } @@ -1558,12 +1558,12 @@ gst_xvimagesink_navigation_send_event (GstNavigation * navigation, /* 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); }