Lines Matching refs:xwindow

62     GstXWindow * xwindow);
1028 video_width = gst_util_uint64_scale_int (self->xwindow->height, dar_n, dar_d); in xwindow_calculate_display_ratio()
1029 video_height = gst_util_uint64_scale_int (self->xwindow->width, dar_d, dar_n); in xwindow_calculate_display_ratio()
1031 *x += (self->xwindow->width - video_width) / 2; in xwindow_calculate_display_ratio()
1033 *window_height = self->xwindow->height; in xwindow_calculate_display_ratio()
1035 *y += (self->xwindow->height - video_height) / 2; in xwindow_calculate_display_ratio()
1037 *window_width = self->xwindow->width; in xwindow_calculate_display_ratio()
1062 ximagesink->xwindow->win, &attr); in xwindow_get_window_position()
1064 XTranslateCoordinates (ximagesink->xcontext->disp, ximagesink->xwindow->win, in xwindow_get_window_position()
1091 GstXWindow * xwindow, guint32 color) in gst_x_image_sink_xwindow_fill_key() argument
1093 XSetForeground (ximagesink->xcontext->disp, xwindow->gc, color); in gst_x_image_sink_xwindow_fill_key()
1094 XFillRectangle (ximagesink->xcontext->disp, xwindow->win, xwindow->gc, in gst_x_image_sink_xwindow_fill_key()
1103 GstXWindow * xwindow, GstVideoRectangle rect) in gst_x_image_sink_xwindow_draw_borders() argument
1106 g_return_if_fail (xwindow != NULL); in gst_x_image_sink_xwindow_draw_borders()
1108 XSetForeground (ximagesink->xcontext->disp, xwindow->gc, in gst_x_image_sink_xwindow_draw_borders()
1113 XFillRectangle (ximagesink->xcontext->disp, xwindow->win, xwindow->gc, in gst_x_image_sink_xwindow_draw_borders()
1114 0, 0, rect.x, xwindow->height); in gst_x_image_sink_xwindow_draw_borders()
1118 if ((rect.x + rect.w) < xwindow->width) { in gst_x_image_sink_xwindow_draw_borders()
1119 XFillRectangle (ximagesink->xcontext->disp, xwindow->win, xwindow->gc, in gst_x_image_sink_xwindow_draw_borders()
1120 rect.x + rect.w, 0, xwindow->width, xwindow->height); in gst_x_image_sink_xwindow_draw_borders()
1125 XFillRectangle (ximagesink->xcontext->disp, xwindow->win, xwindow->gc, in gst_x_image_sink_xwindow_draw_borders()
1126 0, 0, xwindow->width, rect.y); in gst_x_image_sink_xwindow_draw_borders()
1130 if ((rect.y + rect.h) < xwindow->height) { in gst_x_image_sink_xwindow_draw_borders()
1131 XFillRectangle (ximagesink->xcontext->disp, xwindow->win, xwindow->gc, in gst_x_image_sink_xwindow_draw_borders()
1132 0, rect.y + rect.h, xwindow->width, xwindow->height); in gst_x_image_sink_xwindow_draw_borders()
1154 if (G_UNLIKELY (ximagesink->xwindow == NULL)) { in gst_x_image_sink_ximage_put()
1192 result.w = ximagesink->xwindow->width; in gst_x_image_sink_ximage_put()
1193 result.h = ximagesink->xwindow->height; in gst_x_image_sink_ximage_put()
1201 ximagesink->xwindow, RKXIMAGE_COLOR_KEY); in gst_x_image_sink_ximage_put()
1209 gst_x_image_sink_xwindow_draw_borders (ximagesink, ximagesink->xwindow, in gst_x_image_sink_ximage_put()
1259 gst_x_image_sink_xwindow_clear (ximagesink, ximagesink->xwindow); in gst_x_image_sink_ximage_put()
1306 GstXWindow * xwindow, const gchar * media_title) in gst_x_image_sink_xwindow_set_title() argument
1312 if (xwindow) { in gst_x_image_sink_xwindow_set_title()
1314 if (xwindow->internal) { in gst_x_image_sink_xwindow_set_title()
1336 XSetWMName (ximagesink->xcontext->disp, xwindow->win, &xproperty); in gst_x_image_sink_xwindow_set_title()
1346 XSetClassHint (ximagesink->xcontext->disp, xwindow->win, hint); in gst_x_image_sink_xwindow_set_title()
1358 GstXWindow *xwindow = NULL; in gst_x_image_sink_xwindow_new() local
1363 xwindow = g_new0 (GstXWindow, 1); in gst_x_image_sink_xwindow_new()
1365 xwindow->width = width; in gst_x_image_sink_xwindow_new()
1366 xwindow->height = height; in gst_x_image_sink_xwindow_new()
1367 xwindow->internal = TRUE; in gst_x_image_sink_xwindow_new()
1371 xwindow->win = XCreateSimpleWindow (ximagesink->xcontext->disp, in gst_x_image_sink_xwindow_new()
1377 XSetWindowBackgroundPixmap (ximagesink->xcontext->disp, xwindow->win, None); in gst_x_image_sink_xwindow_new()
1380 gst_x_image_sink_xwindow_set_title (ximagesink, xwindow, NULL); in gst_x_image_sink_xwindow_new()
1385 XSelectInput (ximagesink->xcontext->disp, xwindow->win, ExposureMask | in gst_x_image_sink_xwindow_new()
1393 (void) XSetWMProtocols (ximagesink->xcontext->disp, xwindow->win, in gst_x_image_sink_xwindow_new()
1397 xwindow->gc = XCreateGC (ximagesink->xcontext->disp, xwindow->win, in gst_x_image_sink_xwindow_new()
1400 XMapRaised (ximagesink->xcontext->disp, xwindow->win); in gst_x_image_sink_xwindow_new()
1406 gst_x_image_sink_xwindow_decorate (ximagesink, xwindow); in gst_x_image_sink_xwindow_new()
1409 xwindow->win); in gst_x_image_sink_xwindow_new()
1411 return xwindow; in gst_x_image_sink_xwindow_new()
1417 GstXWindow * xwindow) in gst_x_image_sink_xwindow_destroy() argument
1419 g_return_if_fail (xwindow != NULL); in gst_x_image_sink_xwindow_destroy()
1431 if (xwindow->internal) in gst_x_image_sink_xwindow_destroy()
1432 XDestroyWindow (ximagesink->xcontext->disp, xwindow->win); in gst_x_image_sink_xwindow_destroy()
1434 XSelectInput (ximagesink->xcontext->disp, xwindow->win, 0); in gst_x_image_sink_xwindow_destroy()
1436 XFreeGC (ximagesink->xcontext->disp, xwindow->gc); in gst_x_image_sink_xwindow_destroy()
1442 g_free (xwindow); in gst_x_image_sink_xwindow_destroy()
1455 if (G_UNLIKELY (ximagesink->xwindow == NULL)) { in gst_x_image_sink_xwindow_update_geometry()
1461 ximagesink->xwindow->win, &attr); in gst_x_image_sink_xwindow_update_geometry()
1464 reconfigure = (ximagesink->xwindow->width != attr.width) in gst_x_image_sink_xwindow_update_geometry()
1465 || (ximagesink->xwindow->height != attr.height); in gst_x_image_sink_xwindow_update_geometry()
1466 ximagesink->xwindow->width = attr.width; in gst_x_image_sink_xwindow_update_geometry()
1467 ximagesink->xwindow->height = attr.height; in gst_x_image_sink_xwindow_update_geometry()
1478 GstXWindow * xwindow) in gst_x_image_sink_xwindow_clear() argument
1480 g_return_if_fail (xwindow != NULL); in gst_x_image_sink_xwindow_clear()
1485 XSetForeground (ximagesink->xcontext->disp, xwindow->gc, in gst_x_image_sink_xwindow_clear()
1488 XFillRectangle (ximagesink->xcontext->disp, xwindow->win, xwindow->gc, in gst_x_image_sink_xwindow_clear()
1489 0, 0, xwindow->width, xwindow->height); in gst_x_image_sink_xwindow_clear()
1518 ximagesink->xwindow->win, PointerMotionMask, &e)) { in gst_x_image_sink_handle_xevents()
1550 ximagesink->xwindow->win, in gst_x_image_sink_handle_xevents()
1604 ximagesink->xwindow->win, ExposureMask | StructureNotifyMask, &e)) { in gst_x_image_sink_handle_xevents()
1647 gst_x_image_sink_xwindow_destroy (ximagesink, ximagesink->xwindow); in gst_x_image_sink_handle_xevents()
1648 ximagesink->xwindow = NULL; in gst_x_image_sink_handle_xevents()
1683 if (ximagesink->xwindow) { in gst_x_image_sink_event_thread()
1934 if (!ximagesink->xwindow) { in gst_x_image_sink_setcaps()
1962 if (!ximagesink->xwindow) { in gst_x_image_sink_setcaps()
1963 ximagesink->xwindow = gst_x_image_sink_xwindow_new (ximagesink, in gst_x_image_sink_setcaps()
2030 if (ximagesink->xwindow) in gst_x_image_sink_change_state()
2031 gst_x_image_sink_xwindow_clear (ximagesink, ximagesink->xwindow); in gst_x_image_sink_change_state()
2119 gst_x_image_sink_xwindow_set_title (ximagesink, ximagesink->xwindow, in gst_x_image_sink_event()
2153 if (!ximagesink->xwindow) { in gst_x_image_sink_navigation_send_event()
2159 x_offset = ximagesink->xwindow->width - GST_VIDEO_SINK_WIDTH (ximagesink); in gst_x_image_sink_navigation_send_event()
2160 y_offset = ximagesink->xwindow->height - GST_VIDEO_SINK_HEIGHT (ximagesink); in gst_x_image_sink_navigation_send_event()
2198 GstXWindow *xwindow = NULL; in gst_x_image_sink_set_window_handle() local
2206 if (ximagesink->xwindow && (xwindow_id == ximagesink->xwindow->win)) { in gst_x_image_sink_set_window_handle()
2220 if (ximagesink->xwindow) { in gst_x_image_sink_set_window_handle()
2221 gst_x_image_sink_xwindow_destroy (ximagesink, ximagesink->xwindow); in gst_x_image_sink_set_window_handle()
2222 ximagesink->xwindow = NULL; in gst_x_image_sink_set_window_handle()
2230 xwindow = gst_x_image_sink_xwindow_new (ximagesink, in gst_x_image_sink_set_window_handle()
2235 xwindow = g_new0 (GstXWindow, 1); in gst_x_image_sink_set_window_handle()
2237 xwindow->win = xwindow_id; in gst_x_image_sink_set_window_handle()
2241 xwindow->internal = FALSE; in gst_x_image_sink_set_window_handle()
2243 XSelectInput (ximagesink->xcontext->disp, xwindow->win, ExposureMask | in gst_x_image_sink_set_window_handle()
2248 xwindow->gc = XCreateGC (ximagesink->xcontext->disp, xwindow->win, 0, NULL); in gst_x_image_sink_set_window_handle()
2252 if (xwindow) { in gst_x_image_sink_set_window_handle()
2253 ximagesink->xwindow = xwindow; in gst_x_image_sink_set_window_handle()
2280 if (G_UNLIKELY (!ximagesink->xwindow)) { in gst_x_image_sink_set_event_handling()
2288 if (ximagesink->xwindow->internal) { in gst_x_image_sink_set_event_handling()
2289 XSelectInput (ximagesink->xcontext->disp, ximagesink->xwindow->win, in gst_x_image_sink_set_event_handling()
2293 XSelectInput (ximagesink->xcontext->disp, ximagesink->xwindow->win, in gst_x_image_sink_set_event_handling()
2298 XSelectInput (ximagesink->xcontext->disp, ximagesink->xwindow->win, 0); in gst_x_image_sink_set_event_handling()
2417 if (ximagesink->xwindow) in gst_x_image_sink_get_property()
2418 g_value_set_uint64 (value, ximagesink->xwindow->width); in gst_x_image_sink_get_property()
2423 if (ximagesink->xwindow) in gst_x_image_sink_get_property()
2424 g_value_set_uint64 (value, ximagesink->xwindow->height); in gst_x_image_sink_get_property()
2469 if (ximagesink->xwindow) { in gst_x_image_sink_reset()
2470 gst_x_image_sink_xwindow_clear (ximagesink, ximagesink->xwindow); in gst_x_image_sink_reset()
2471 gst_x_image_sink_xwindow_destroy (ximagesink, ximagesink->xwindow); in gst_x_image_sink_reset()
2472 ximagesink->xwindow = NULL; in gst_x_image_sink_reset()
2510 ximagesink->xwindow = NULL; in gst_x_image_sink_init()
2715 gst_x_image_sink_xwindow_fill_key (self, self->xwindow, 0); in gst_x_image_sink_stop()