Lines Matching refs:ximagesink
136 static void gst_x_image_sink_reset (GstXImageSink * ximagesink);
138 ximagesink);
188 GST_ELEMENT_REGISTER_DEFINE_WITH_CODE (ximagesink, "ximagesink",
201 gst_x_image_sink_xwindow_draw_borders (GstXImageSink * ximagesink, in gst_x_image_sink_xwindow_draw_borders() argument
204 g_return_if_fail (GST_IS_X_IMAGE_SINK (ximagesink)); in gst_x_image_sink_xwindow_draw_borders()
207 XSetForeground (ximagesink->xcontext->disp, xwindow->gc, in gst_x_image_sink_xwindow_draw_borders()
208 ximagesink->xcontext->black); in gst_x_image_sink_xwindow_draw_borders()
212 XFillRectangle (ximagesink->xcontext->disp, xwindow->win, xwindow->gc, in gst_x_image_sink_xwindow_draw_borders()
218 XFillRectangle (ximagesink->xcontext->disp, xwindow->win, xwindow->gc, in gst_x_image_sink_xwindow_draw_borders()
224 XFillRectangle (ximagesink->xcontext->disp, xwindow->win, xwindow->gc, in gst_x_image_sink_xwindow_draw_borders()
230 XFillRectangle (ximagesink->xcontext->disp, xwindow->win, xwindow->gc, in gst_x_image_sink_xwindow_draw_borders()
237 gst_x_image_sink_ximage_put (GstXImageSink * ximagesink, GstBuffer * ximage) in gst_x_image_sink_ximage_put() argument
248 g_mutex_lock (&ximagesink->flow_lock); in gst_x_image_sink_ximage_put()
250 if (G_UNLIKELY (ximagesink->xwindow == NULL)) { in gst_x_image_sink_ximage_put()
251 g_mutex_unlock (&ximagesink->flow_lock); in gst_x_image_sink_ximage_put()
257 if (!ximagesink->cur_image || ximagesink->draw_border) { in gst_x_image_sink_ximage_put()
262 if (ximage && ximagesink->cur_image != ximage) { in gst_x_image_sink_ximage_put()
263 if (ximagesink->cur_image) { in gst_x_image_sink_ximage_put()
264 GST_LOG_OBJECT (ximagesink, "unreffing %p", ximagesink->cur_image); in gst_x_image_sink_ximage_put()
265 gst_buffer_unref (ximagesink->cur_image); in gst_x_image_sink_ximage_put()
267 GST_LOG_OBJECT (ximagesink, "reffing %p as our current image", ximage); in gst_x_image_sink_ximage_put()
268 ximagesink->cur_image = gst_buffer_ref (ximage); in gst_x_image_sink_ximage_put()
274 if (ximagesink->cur_image) { in gst_x_image_sink_ximage_put()
275 ximage = ximagesink->cur_image; in gst_x_image_sink_ximage_put()
277 g_mutex_unlock (&ximagesink->flow_lock); in gst_x_image_sink_ximage_put()
290 GST_LOG_OBJECT (ximagesink, in gst_x_image_sink_ximage_put()
298 dst.w = ximagesink->xwindow->width; in gst_x_image_sink_ximage_put()
299 dst.h = ximagesink->xwindow->height; in gst_x_image_sink_ximage_put()
303 g_mutex_lock (&ximagesink->x_lock); in gst_x_image_sink_ximage_put()
306 gst_x_image_sink_xwindow_draw_borders (ximagesink, ximagesink->xwindow, in gst_x_image_sink_ximage_put()
308 ximagesink->draw_border = FALSE; in gst_x_image_sink_ximage_put()
311 if (ximagesink->xcontext->use_xshm) { in gst_x_image_sink_ximage_put()
312 GST_LOG_OBJECT (ximagesink, in gst_x_image_sink_ximage_put()
315 ximagesink->xwindow->width, ximagesink->xwindow->height); in gst_x_image_sink_ximage_put()
316 XShmPutImage (ximagesink->xcontext->disp, ximagesink->xwindow->win, in gst_x_image_sink_ximage_put()
317 ximagesink->xwindow->gc, mem->ximage, src.x, src.y, result.x, result.y, in gst_x_image_sink_ximage_put()
322 GST_LOG_OBJECT (ximagesink, in gst_x_image_sink_ximage_put()
325 ximagesink->xwindow->width, ximagesink->xwindow->height); in gst_x_image_sink_ximage_put()
326 XPutImage (ximagesink->xcontext->disp, ximagesink->xwindow->win, in gst_x_image_sink_ximage_put()
327 ximagesink->xwindow->gc, mem->ximage, src.x, src.y, result.x, result.y, in gst_x_image_sink_ximage_put()
331 XSync (ximagesink->xcontext->disp, FALSE); in gst_x_image_sink_ximage_put()
333 g_mutex_unlock (&ximagesink->x_lock); in gst_x_image_sink_ximage_put()
335 g_mutex_unlock (&ximagesink->flow_lock); in gst_x_image_sink_ximage_put()
341 gst_x_image_sink_xwindow_decorate (GstXImageSink * ximagesink, in gst_x_image_sink_xwindow_decorate() argument
347 g_return_val_if_fail (GST_IS_X_IMAGE_SINK (ximagesink), FALSE); in gst_x_image_sink_xwindow_decorate()
350 g_mutex_lock (&ximagesink->x_lock); in gst_x_image_sink_xwindow_decorate()
352 hints_atom = XInternAtom (ximagesink->xcontext->disp, "_MOTIF_WM_HINTS", in gst_x_image_sink_xwindow_decorate()
355 g_mutex_unlock (&ximagesink->x_lock); in gst_x_image_sink_xwindow_decorate()
364 XChangeProperty (ximagesink->xcontext->disp, window->win, in gst_x_image_sink_xwindow_decorate()
368 XSync (ximagesink->xcontext->disp, FALSE); in gst_x_image_sink_xwindow_decorate()
370 g_mutex_unlock (&ximagesink->x_lock); in gst_x_image_sink_xwindow_decorate()
378 gst_x_image_sink_xwindow_set_title (GstXImageSink * ximagesink, in gst_x_image_sink_xwindow_set_title() argument
382 g_free (ximagesink->media_title); in gst_x_image_sink_xwindow_set_title()
383 ximagesink->media_title = g_strdup (media_title); in gst_x_image_sink_xwindow_set_title()
397 if (app_name && ximagesink->media_title) { in gst_x_image_sink_xwindow_set_title()
398 title = title_mem = g_strconcat (ximagesink->media_title, " : ", in gst_x_image_sink_xwindow_set_title()
402 } else if (ximagesink->media_title) { in gst_x_image_sink_xwindow_set_title()
403 title = ximagesink->media_title; in gst_x_image_sink_xwindow_set_title()
410 XInternAtom (ximagesink->xcontext->disp, "_NET_WM_NAME", 0); in gst_x_image_sink_xwindow_set_title()
412 XInternAtom (ximagesink->xcontext->disp, "UTF8_STRING", 0); in gst_x_image_sink_xwindow_set_title()
413 XChangeProperty (ximagesink->xcontext->disp, xwindow->win, in gst_x_image_sink_xwindow_set_title()
416 XSync (ximagesink->xcontext->disp, False); in gst_x_image_sink_xwindow_set_title()
418 XSetWMName (ximagesink->xcontext->disp, xwindow->win, &xproperty); in gst_x_image_sink_xwindow_set_title()
428 XSetClassHint (ximagesink->xcontext->disp, xwindow->win, hint); in gst_x_image_sink_xwindow_set_title()
437 gst_x_image_sink_xwindow_new (GstXImageSink * ximagesink, gint width, in gst_x_image_sink_xwindow_new() argument
443 g_return_val_if_fail (GST_IS_X_IMAGE_SINK (ximagesink), NULL); in gst_x_image_sink_xwindow_new()
451 g_mutex_lock (&ximagesink->x_lock); in gst_x_image_sink_xwindow_new()
453 xwindow->win = XCreateSimpleWindow (ximagesink->xcontext->disp, in gst_x_image_sink_xwindow_new()
454 ximagesink->xcontext->root, in gst_x_image_sink_xwindow_new()
455 0, 0, width, height, 0, 0, ximagesink->xcontext->black); in gst_x_image_sink_xwindow_new()
459 XSetWindowBackgroundPixmap (ximagesink->xcontext->disp, xwindow->win, None); in gst_x_image_sink_xwindow_new()
462 gst_x_image_sink_xwindow_set_title (ximagesink, xwindow, NULL); in gst_x_image_sink_xwindow_new()
464 if (ximagesink->handle_events) { in gst_x_image_sink_xwindow_new()
467 XSelectInput (ximagesink->xcontext->disp, xwindow->win, ExposureMask | in gst_x_image_sink_xwindow_new()
473 wm_delete = XInternAtom (ximagesink->xcontext->disp, in gst_x_image_sink_xwindow_new()
475 (void) XSetWMProtocols (ximagesink->xcontext->disp, xwindow->win, in gst_x_image_sink_xwindow_new()
479 xwindow->gc = XCreateGC (ximagesink->xcontext->disp, xwindow->win, in gst_x_image_sink_xwindow_new()
482 XMapRaised (ximagesink->xcontext->disp, xwindow->win); in gst_x_image_sink_xwindow_new()
484 XSync (ximagesink->xcontext->disp, FALSE); in gst_x_image_sink_xwindow_new()
486 g_mutex_unlock (&ximagesink->x_lock); in gst_x_image_sink_xwindow_new()
488 gst_x_image_sink_xwindow_decorate (ximagesink, xwindow); in gst_x_image_sink_xwindow_new()
490 gst_video_overlay_got_window_handle (GST_VIDEO_OVERLAY (ximagesink), in gst_x_image_sink_xwindow_new()
498 gst_x_image_sink_xwindow_destroy (GstXImageSink * ximagesink, in gst_x_image_sink_xwindow_destroy() argument
502 g_return_if_fail (GST_IS_X_IMAGE_SINK (ximagesink)); in gst_x_image_sink_xwindow_destroy()
504 g_mutex_lock (&ximagesink->x_lock); in gst_x_image_sink_xwindow_destroy()
508 XDestroyWindow (ximagesink->xcontext->disp, xwindow->win); in gst_x_image_sink_xwindow_destroy()
510 XSelectInput (ximagesink->xcontext->disp, xwindow->win, 0); in gst_x_image_sink_xwindow_destroy()
512 XFreeGC (ximagesink->xcontext->disp, xwindow->gc); in gst_x_image_sink_xwindow_destroy()
514 XSync (ximagesink->xcontext->disp, FALSE); in gst_x_image_sink_xwindow_destroy()
516 g_mutex_unlock (&ximagesink->x_lock); in gst_x_image_sink_xwindow_destroy()
522 gst_x_image_sink_xwindow_update_geometry (GstXImageSink * ximagesink) in gst_x_image_sink_xwindow_update_geometry() argument
527 g_return_if_fail (GST_IS_X_IMAGE_SINK (ximagesink)); in gst_x_image_sink_xwindow_update_geometry()
530 g_mutex_lock (&ximagesink->x_lock); in gst_x_image_sink_xwindow_update_geometry()
531 if (G_UNLIKELY (ximagesink->xwindow == NULL)) { in gst_x_image_sink_xwindow_update_geometry()
532 g_mutex_unlock (&ximagesink->x_lock); in gst_x_image_sink_xwindow_update_geometry()
536 XGetWindowAttributes (ximagesink->xcontext->disp, in gst_x_image_sink_xwindow_update_geometry()
537 ximagesink->xwindow->win, &attr); in gst_x_image_sink_xwindow_update_geometry()
540 reconfigure = (ximagesink->xwindow->width != attr.width) in gst_x_image_sink_xwindow_update_geometry()
541 || (ximagesink->xwindow->height != attr.height); in gst_x_image_sink_xwindow_update_geometry()
542 ximagesink->xwindow->width = attr.width; in gst_x_image_sink_xwindow_update_geometry()
543 ximagesink->xwindow->height = attr.height; in gst_x_image_sink_xwindow_update_geometry()
545 g_mutex_unlock (&ximagesink->x_lock); in gst_x_image_sink_xwindow_update_geometry()
548 gst_pad_push_event (GST_BASE_SINK (ximagesink)->sinkpad, in gst_x_image_sink_xwindow_update_geometry()
553 gst_x_image_sink_xwindow_clear (GstXImageSink * ximagesink, in gst_x_image_sink_xwindow_clear() argument
557 g_return_if_fail (GST_IS_X_IMAGE_SINK (ximagesink)); in gst_x_image_sink_xwindow_clear()
559 g_mutex_lock (&ximagesink->x_lock); in gst_x_image_sink_xwindow_clear()
561 XSetForeground (ximagesink->xcontext->disp, xwindow->gc, in gst_x_image_sink_xwindow_clear()
562 ximagesink->xcontext->black); in gst_x_image_sink_xwindow_clear()
564 XFillRectangle (ximagesink->xcontext->disp, xwindow->win, xwindow->gc, in gst_x_image_sink_xwindow_clear()
567 XSync (ximagesink->xcontext->disp, FALSE); in gst_x_image_sink_xwindow_clear()
569 g_mutex_unlock (&ximagesink->x_lock); in gst_x_image_sink_xwindow_clear()
576 gst_x_image_sink_handle_xevents (GstXImageSink * ximagesink) in gst_x_image_sink_handle_xevents() argument
583 g_return_if_fail (GST_IS_X_IMAGE_SINK (ximagesink)); in gst_x_image_sink_handle_xevents()
587 g_mutex_lock (&ximagesink->flow_lock); in gst_x_image_sink_handle_xevents()
588 g_mutex_lock (&ximagesink->x_lock); in gst_x_image_sink_handle_xevents()
589 while (XCheckWindowEvent (ximagesink->xcontext->disp, in gst_x_image_sink_handle_xevents()
590 ximagesink->xwindow->win, PointerMotionMask, &e)) { in gst_x_image_sink_handle_xevents()
591 g_mutex_unlock (&ximagesink->x_lock); in gst_x_image_sink_handle_xevents()
592 g_mutex_unlock (&ximagesink->flow_lock); in gst_x_image_sink_handle_xevents()
603 g_mutex_lock (&ximagesink->flow_lock); in gst_x_image_sink_handle_xevents()
604 g_mutex_lock (&ximagesink->x_lock); in gst_x_image_sink_handle_xevents()
608 g_mutex_unlock (&ximagesink->x_lock); in gst_x_image_sink_handle_xevents()
609 g_mutex_unlock (&ximagesink->flow_lock); in gst_x_image_sink_handle_xevents()
613 gst_navigation_send_mouse_event (GST_NAVIGATION (ximagesink), in gst_x_image_sink_handle_xevents()
616 g_mutex_lock (&ximagesink->flow_lock); in gst_x_image_sink_handle_xevents()
617 g_mutex_lock (&ximagesink->x_lock); in gst_x_image_sink_handle_xevents()
621 while (XCheckWindowEvent (ximagesink->xcontext->disp, in gst_x_image_sink_handle_xevents()
622 ximagesink->xwindow->win, in gst_x_image_sink_handle_xevents()
629 g_mutex_unlock (&ximagesink->x_lock); in gst_x_image_sink_handle_xevents()
630 g_mutex_unlock (&ximagesink->flow_lock); in gst_x_image_sink_handle_xevents()
638 gst_navigation_send_mouse_event (GST_NAVIGATION (ximagesink), in gst_x_image_sink_handle_xevents()
644 gst_navigation_send_mouse_event (GST_NAVIGATION (ximagesink), in gst_x_image_sink_handle_xevents()
651 g_mutex_lock (&ximagesink->x_lock); in gst_x_image_sink_handle_xevents()
652 if (ximagesink->xcontext->use_xkb) { in gst_x_image_sink_handle_xevents()
653 keysym = XkbKeycodeToKeysym (ximagesink->xcontext->disp, in gst_x_image_sink_handle_xevents()
656 keysym = XKeycodeToKeysym (ximagesink->xcontext->disp, in gst_x_image_sink_handle_xevents()
664 g_mutex_unlock (&ximagesink->x_lock); in gst_x_image_sink_handle_xevents()
665 GST_DEBUG_OBJECT (ximagesink, in gst_x_image_sink_handle_xevents()
668 gst_navigation_send_key_event (GST_NAVIGATION (ximagesink), in gst_x_image_sink_handle_xevents()
672 GST_DEBUG_OBJECT (ximagesink, "ximagesink unhandled X event (%d)", in gst_x_image_sink_handle_xevents()
675 g_mutex_lock (&ximagesink->flow_lock); in gst_x_image_sink_handle_xevents()
676 g_mutex_lock (&ximagesink->x_lock); in gst_x_image_sink_handle_xevents()
680 while (XCheckWindowEvent (ximagesink->xcontext->disp, in gst_x_image_sink_handle_xevents()
681 ximagesink->xwindow->win, ExposureMask | StructureNotifyMask, &e)) { in gst_x_image_sink_handle_xevents()
687 g_mutex_unlock (&ximagesink->x_lock); in gst_x_image_sink_handle_xevents()
688 gst_x_image_sink_xwindow_update_geometry (ximagesink); in gst_x_image_sink_handle_xevents()
689 g_mutex_lock (&ximagesink->x_lock); in gst_x_image_sink_handle_xevents()
697 if (ximagesink->handle_expose && (exposed || configured)) { in gst_x_image_sink_handle_xevents()
698 g_mutex_unlock (&ximagesink->x_lock); in gst_x_image_sink_handle_xevents()
699 g_mutex_unlock (&ximagesink->flow_lock); in gst_x_image_sink_handle_xevents()
701 gst_x_image_sink_expose (GST_VIDEO_OVERLAY (ximagesink)); in gst_x_image_sink_handle_xevents()
703 g_mutex_lock (&ximagesink->flow_lock); in gst_x_image_sink_handle_xevents()
704 g_mutex_lock (&ximagesink->x_lock); in gst_x_image_sink_handle_xevents()
708 while (XPending (ximagesink->xcontext->disp)) { in gst_x_image_sink_handle_xevents()
709 XNextEvent (ximagesink->xcontext->disp, &e); in gst_x_image_sink_handle_xevents()
715 wm_delete = XInternAtom (ximagesink->xcontext->disp, in gst_x_image_sink_handle_xevents()
719 GST_ELEMENT_ERROR (ximagesink, RESOURCE, NOT_FOUND, in gst_x_image_sink_handle_xevents()
722 g_mutex_unlock (&ximagesink->x_lock); in gst_x_image_sink_handle_xevents()
723 gst_x_image_sink_xwindow_destroy (ximagesink, ximagesink->xwindow); in gst_x_image_sink_handle_xevents()
724 ximagesink->xwindow = NULL; in gst_x_image_sink_handle_xevents()
725 g_mutex_lock (&ximagesink->x_lock); in gst_x_image_sink_handle_xevents()
734 g_mutex_unlock (&ximagesink->x_lock); in gst_x_image_sink_handle_xevents()
735 g_mutex_unlock (&ximagesink->flow_lock); in gst_x_image_sink_handle_xevents()
739 gst_x_image_sink_event_thread (GstXImageSink * ximagesink) in gst_x_image_sink_event_thread() argument
741 g_return_val_if_fail (GST_IS_X_IMAGE_SINK (ximagesink), NULL); in gst_x_image_sink_event_thread()
743 GST_OBJECT_LOCK (ximagesink); in gst_x_image_sink_event_thread()
744 while (ximagesink->running) { in gst_x_image_sink_event_thread()
745 GST_OBJECT_UNLOCK (ximagesink); in gst_x_image_sink_event_thread()
747 if (ximagesink->xwindow) { in gst_x_image_sink_event_thread()
748 gst_x_image_sink_handle_xevents (ximagesink); in gst_x_image_sink_event_thread()
753 GST_OBJECT_LOCK (ximagesink); in gst_x_image_sink_event_thread()
755 GST_OBJECT_UNLOCK (ximagesink); in gst_x_image_sink_event_thread()
761 gst_x_image_sink_manage_event_thread (GstXImageSink * ximagesink) in gst_x_image_sink_manage_event_thread() argument
766 if (ximagesink->xcontext == NULL) { in gst_x_image_sink_manage_event_thread()
770 GST_OBJECT_LOCK (ximagesink); in gst_x_image_sink_manage_event_thread()
771 if (ximagesink->handle_expose || ximagesink->handle_events) { in gst_x_image_sink_manage_event_thread()
772 if (!ximagesink->event_thread) { in gst_x_image_sink_manage_event_thread()
774 GST_DEBUG_OBJECT (ximagesink, "run xevent thread, expose %d, events %d", in gst_x_image_sink_manage_event_thread()
775 ximagesink->handle_expose, ximagesink->handle_events); in gst_x_image_sink_manage_event_thread()
776 ximagesink->running = TRUE; in gst_x_image_sink_manage_event_thread()
777 ximagesink->event_thread = g_thread_try_new ("ximagesink-events", in gst_x_image_sink_manage_event_thread()
778 (GThreadFunc) gst_x_image_sink_event_thread, ximagesink, NULL); in gst_x_image_sink_manage_event_thread()
781 if (ximagesink->event_thread) { in gst_x_image_sink_manage_event_thread()
782 GST_DEBUG_OBJECT (ximagesink, "stop xevent thread, expose %d, events %d", in gst_x_image_sink_manage_event_thread()
783 ximagesink->handle_expose, ximagesink->handle_events); in gst_x_image_sink_manage_event_thread()
784 ximagesink->running = FALSE; in gst_x_image_sink_manage_event_thread()
786 thread = ximagesink->event_thread; in gst_x_image_sink_manage_event_thread()
787 ximagesink->event_thread = NULL; in gst_x_image_sink_manage_event_thread()
790 GST_OBJECT_UNLOCK (ximagesink); in gst_x_image_sink_manage_event_thread()
862 gst_x_image_sink_xcontext_get (GstXImageSink * ximagesink) in gst_x_image_sink_xcontext_get() argument
874 g_return_val_if_fail (GST_IS_X_IMAGE_SINK (ximagesink), NULL); in gst_x_image_sink_xcontext_get()
878 g_mutex_lock (&ximagesink->x_lock); in gst_x_image_sink_xcontext_get()
880 xcontext->disp = XOpenDisplay (ximagesink->display_name); in gst_x_image_sink_xcontext_get()
883 g_mutex_unlock (&ximagesink->x_lock); in gst_x_image_sink_xcontext_get()
885 GST_ELEMENT_ERROR (ximagesink, RESOURCE, WRITE, in gst_x_image_sink_xcontext_get()
903 GST_DEBUG_OBJECT (ximagesink, "X reports %dx%d pixels and %d mm x %d mm", in gst_x_image_sink_xcontext_get()
913 g_mutex_unlock (&ximagesink->x_lock); in gst_x_image_sink_xcontext_get()
916 GST_ELEMENT_ERROR (ximagesink, RESOURCE, SETTINGS, in gst_x_image_sink_xcontext_get()
935 gst_x_image_sink_check_xshm_calls (ximagesink, xcontext)) { in gst_x_image_sink_xcontext_get()
969 if (!ximagesink->par) { in gst_x_image_sink_xcontext_get()
970 ximagesink->par = g_new0 (GValue, 1); in gst_x_image_sink_xcontext_get()
971 gst_value_init_and_copy (ximagesink->par, xcontext->par); in gst_x_image_sink_xcontext_get()
972 GST_DEBUG_OBJECT (ximagesink, "set calculated PAR on object's PAR"); in gst_x_image_sink_xcontext_get()
979 if (ximagesink->par) { in gst_x_image_sink_xcontext_get()
982 nom = gst_value_get_fraction_numerator (ximagesink->par); in gst_x_image_sink_xcontext_get()
983 den = gst_value_get_fraction_denominator (ximagesink->par); in gst_x_image_sink_xcontext_get()
988 g_mutex_unlock (&ximagesink->x_lock); in gst_x_image_sink_xcontext_get()
995 GST_ERROR_OBJECT (ximagesink, "unknown format"); in gst_x_image_sink_xcontext_get()
1003 gst_x_image_sink_xcontext_clear (GstXImageSink * ximagesink) in gst_x_image_sink_xcontext_clear() argument
1007 g_return_if_fail (GST_IS_X_IMAGE_SINK (ximagesink)); in gst_x_image_sink_xcontext_clear()
1009 GST_OBJECT_LOCK (ximagesink); in gst_x_image_sink_xcontext_clear()
1010 if (ximagesink->xcontext == NULL) { in gst_x_image_sink_xcontext_clear()
1011 GST_OBJECT_UNLOCK (ximagesink); in gst_x_image_sink_xcontext_clear()
1018 xcontext = ximagesink->xcontext; in gst_x_image_sink_xcontext_clear()
1019 ximagesink->xcontext = NULL; in gst_x_image_sink_xcontext_clear()
1021 GST_OBJECT_UNLOCK (ximagesink); in gst_x_image_sink_xcontext_clear()
1025 g_free (ximagesink->par); in gst_x_image_sink_xcontext_clear()
1026 ximagesink->par = NULL; in gst_x_image_sink_xcontext_clear()
1031 g_mutex_lock (&ximagesink->x_lock); in gst_x_image_sink_xcontext_clear()
1035 g_mutex_unlock (&ximagesink->x_lock); in gst_x_image_sink_xcontext_clear()
1045 GstXImageSink *ximagesink; in gst_x_image_sink_getcaps() local
1049 ximagesink = GST_X_IMAGE_SINK (bsink); in gst_x_image_sink_getcaps()
1051 g_mutex_lock (&ximagesink->x_lock); in gst_x_image_sink_getcaps()
1052 if (ximagesink->xcontext) { in gst_x_image_sink_getcaps()
1055 caps = gst_caps_ref (ximagesink->xcontext->caps); in gst_x_image_sink_getcaps()
1067 g_mutex_unlock (&ximagesink->x_lock); in gst_x_image_sink_getcaps()
1071 if (ximagesink->xwindow && ximagesink->xwindow->width) { in gst_x_image_sink_getcaps()
1081 gst_structure_set (s0, "width", G_TYPE_INT, ximagesink->xwindow->width, in gst_x_image_sink_getcaps()
1082 "height", G_TYPE_INT, ximagesink->xwindow->height, NULL); in gst_x_image_sink_getcaps()
1098 g_mutex_unlock (&ximagesink->x_lock); in gst_x_image_sink_getcaps()
1101 g_mutex_unlock (&ximagesink->x_lock); in gst_x_image_sink_getcaps()
1104 caps = gst_pad_get_pad_template_caps (GST_BASE_SINK (ximagesink)->sinkpad); in gst_x_image_sink_getcaps()
1105 if (ximagesink->par) { in gst_x_image_sink_getcaps()
1111 nom = gst_value_get_fraction_numerator (ximagesink->par); in gst_x_image_sink_getcaps()
1112 den = gst_value_get_fraction_denominator (ximagesink->par); in gst_x_image_sink_getcaps()
1131 gst_x_image_sink_create_pool (GstXImageSink * ximagesink, GstCaps * caps, in gst_x_image_sink_create_pool() argument
1139 pool = gst_ximage_buffer_pool_new (ximagesink); in gst_x_image_sink_create_pool()
1152 GST_WARNING_OBJECT (ximagesink, "failed setting config"); in gst_x_image_sink_create_pool()
1161 GstXImageSink *ximagesink; in gst_x_image_sink_setcaps() local
1167 ximagesink = GST_X_IMAGE_SINK (bsink); in gst_x_image_sink_setcaps()
1169 if (!ximagesink->xcontext) in gst_x_image_sink_setcaps()
1172 GST_DEBUG_OBJECT (ximagesink, in gst_x_image_sink_setcaps()
1174 GST_PTR_FORMAT, ximagesink->xcontext->caps, caps); in gst_x_image_sink_setcaps()
1177 if (!gst_caps_can_intersect (ximagesink->xcontext->caps, caps)) in gst_x_image_sink_setcaps()
1188 if (ximagesink->par) { in gst_x_image_sink_setcaps()
1189 if (gst_value_compare (par, ximagesink->par) != GST_VALUE_EQUAL) { in gst_x_image_sink_setcaps()
1192 } else if (ximagesink->xcontext->par) { in gst_x_image_sink_setcaps()
1193 if (gst_value_compare (par, ximagesink->xcontext->par) != GST_VALUE_EQUAL) { in gst_x_image_sink_setcaps()
1199 GST_VIDEO_SINK_WIDTH (ximagesink) = info.width; in gst_x_image_sink_setcaps()
1200 GST_VIDEO_SINK_HEIGHT (ximagesink) = info.height; in gst_x_image_sink_setcaps()
1201 ximagesink->fps_n = info.fps_n; in gst_x_image_sink_setcaps()
1202 ximagesink->fps_d = info.fps_d; in gst_x_image_sink_setcaps()
1205 g_mutex_lock (&ximagesink->flow_lock); in gst_x_image_sink_setcaps()
1206 if (!ximagesink->xwindow) { in gst_x_image_sink_setcaps()
1207 g_mutex_unlock (&ximagesink->flow_lock); in gst_x_image_sink_setcaps()
1208 gst_video_overlay_prepare_window_handle (GST_VIDEO_OVERLAY (ximagesink)); in gst_x_image_sink_setcaps()
1210 g_mutex_unlock (&ximagesink->flow_lock); in gst_x_image_sink_setcaps()
1214 if (GST_VIDEO_SINK_WIDTH (ximagesink) <= 0 || in gst_x_image_sink_setcaps()
1215 GST_VIDEO_SINK_HEIGHT (ximagesink) <= 0) in gst_x_image_sink_setcaps()
1218 g_mutex_lock (&ximagesink->flow_lock); in gst_x_image_sink_setcaps()
1219 if (!ximagesink->xwindow) { in gst_x_image_sink_setcaps()
1220 ximagesink->xwindow = gst_x_image_sink_xwindow_new (ximagesink, in gst_x_image_sink_setcaps()
1221 GST_VIDEO_SINK_WIDTH (ximagesink), GST_VIDEO_SINK_HEIGHT (ximagesink)); in gst_x_image_sink_setcaps()
1224 ximagesink->info = info; in gst_x_image_sink_setcaps()
1227 ximagesink->draw_border = TRUE; in gst_x_image_sink_setcaps()
1230 newpool = gst_x_image_sink_create_pool (ximagesink, caps, info.size, 2); in gst_x_image_sink_setcaps()
1233 oldpool = ximagesink->pool; in gst_x_image_sink_setcaps()
1234 ximagesink->pool = newpool; in gst_x_image_sink_setcaps()
1235 g_mutex_unlock (&ximagesink->flow_lock); in gst_x_image_sink_setcaps()
1248 GST_ERROR_OBJECT (ximagesink, "caps incompatible"); in gst_x_image_sink_setcaps()
1253 GST_ERROR_OBJECT (ximagesink, "caps invalid"); in gst_x_image_sink_setcaps()
1258 GST_INFO_OBJECT (ximagesink, "pixel aspect ratio does not match"); in gst_x_image_sink_setcaps()
1263 GST_ELEMENT_ERROR (ximagesink, CORE, NEGOTIATION, (NULL), in gst_x_image_sink_setcaps()
1273 GstXImageSink *ximagesink; in gst_x_image_sink_change_state() local
1276 ximagesink = GST_X_IMAGE_SINK (element); in gst_x_image_sink_change_state()
1281 if (ximagesink->xcontext == NULL) { in gst_x_image_sink_change_state()
1282 xcontext = gst_x_image_sink_xcontext_get (ximagesink); in gst_x_image_sink_change_state()
1287 GST_OBJECT_LOCK (ximagesink); in gst_x_image_sink_change_state()
1289 ximagesink->xcontext = xcontext; in gst_x_image_sink_change_state()
1290 GST_OBJECT_UNLOCK (ximagesink); in gst_x_image_sink_change_state()
1294 GST_DEBUG_OBJECT (ximagesink, "XSynchronize called with %s", in gst_x_image_sink_change_state()
1295 ximagesink->synchronous ? "TRUE" : "FALSE"); in gst_x_image_sink_change_state()
1296 g_mutex_lock (&ximagesink->x_lock); in gst_x_image_sink_change_state()
1297 XSynchronize (ximagesink->xcontext->disp, ximagesink->synchronous); in gst_x_image_sink_change_state()
1298 g_mutex_unlock (&ximagesink->x_lock); in gst_x_image_sink_change_state()
1299 gst_x_image_sink_manage_event_thread (ximagesink); in gst_x_image_sink_change_state()
1302 g_mutex_lock (&ximagesink->flow_lock); in gst_x_image_sink_change_state()
1303 if (ximagesink->xwindow) in gst_x_image_sink_change_state()
1304 gst_x_image_sink_xwindow_clear (ximagesink, ximagesink->xwindow); in gst_x_image_sink_change_state()
1305 g_mutex_unlock (&ximagesink->flow_lock); in gst_x_image_sink_change_state()
1319 ximagesink->fps_n = 0; in gst_x_image_sink_change_state()
1320 ximagesink->fps_d = 1; in gst_x_image_sink_change_state()
1321 GST_VIDEO_SINK_WIDTH (ximagesink) = 0; in gst_x_image_sink_change_state()
1322 GST_VIDEO_SINK_HEIGHT (ximagesink) = 0; in gst_x_image_sink_change_state()
1323 g_mutex_lock (&ximagesink->flow_lock); in gst_x_image_sink_change_state()
1324 if (ximagesink->pool) in gst_x_image_sink_change_state()
1325 gst_buffer_pool_set_active (ximagesink->pool, FALSE); in gst_x_image_sink_change_state()
1326 g_mutex_unlock (&ximagesink->flow_lock); in gst_x_image_sink_change_state()
1329 gst_x_image_sink_reset (ximagesink); in gst_x_image_sink_change_state()
1343 GstXImageSink *ximagesink; in gst_x_image_sink_get_times() local
1345 ximagesink = GST_X_IMAGE_SINK (bsink); in gst_x_image_sink_get_times()
1352 if (ximagesink->fps_n > 0) { in gst_x_image_sink_get_times()
1354 gst_util_uint64_scale_int (GST_SECOND, ximagesink->fps_d, in gst_x_image_sink_get_times()
1355 ximagesink->fps_n); in gst_x_image_sink_get_times()
1365 GstXImageSink *ximagesink; in gst_x_image_sink_show_frame() local
1369 ximagesink = GST_X_IMAGE_SINK (vsink); in gst_x_image_sink_show_frame()
1374 && mem->sink == ximagesink) { in gst_x_image_sink_show_frame()
1377 GST_LOG_OBJECT (ximagesink, "buffer from our pool, writing directly"); in gst_x_image_sink_show_frame()
1386 GST_LOG_OBJECT (ximagesink, "buffer not from our pool, copying"); in gst_x_image_sink_show_frame()
1389 if (G_UNLIKELY (ximagesink->pool == NULL)) in gst_x_image_sink_show_frame()
1392 if (!gst_buffer_pool_set_active (ximagesink->pool, TRUE)) in gst_x_image_sink_show_frame()
1399 res = gst_buffer_pool_acquire_buffer (ximagesink->pool, &to_put, ¶ms); in gst_x_image_sink_show_frame()
1403 GST_CAT_LOG_OBJECT (CAT_PERFORMANCE, ximagesink, in gst_x_image_sink_show_frame()
1406 if (!gst_video_frame_map (&src, &ximagesink->info, buf, GST_MAP_READ)) in gst_x_image_sink_show_frame()
1409 if (!gst_video_frame_map (&dest, &ximagesink->info, to_put, GST_MAP_WRITE)) { in gst_x_image_sink_show_frame()
1420 if (!gst_x_image_sink_ximage_put (ximagesink, to_put)) in gst_x_image_sink_show_frame()
1432 GST_ELEMENT_ERROR (ximagesink, RESOURCE, WRITE, in gst_x_image_sink_show_frame()
1440 GST_WARNING_OBJECT (ximagesink, "could not create image"); in gst_x_image_sink_show_frame()
1446 GST_WARNING_OBJECT (ximagesink, "could not map image"); in gst_x_image_sink_show_frame()
1453 GST_WARNING_OBJECT (ximagesink, "could not output image - no window"); in gst_x_image_sink_show_frame()
1459 GST_ERROR_OBJECT (ximagesink, "failed to activate bufferpool."); in gst_x_image_sink_show_frame()
1468 GstXImageSink *ximagesink = GST_X_IMAGE_SINK (sink); in gst_x_image_sink_event() local
1479 GST_DEBUG_OBJECT (ximagesink, "got tags, title='%s'", title); in gst_x_image_sink_event()
1480 gst_x_image_sink_xwindow_set_title (ximagesink, ximagesink->xwindow, in gst_x_image_sink_event()
1496 GstXImageSink *ximagesink = GST_X_IMAGE_SINK (bsink); in gst_x_image_sink_propose_allocation() local
1515 pool = gst_x_image_sink_create_pool (ximagesink, caps, info.size, 0); in gst_x_image_sink_propose_allocation()
1555 GstXImageSink *ximagesink = GST_X_IMAGE_SINK (navigation); in gst_x_image_sink_navigation_send_event() local
1568 g_mutex_lock (&ximagesink->flow_lock); in gst_x_image_sink_navigation_send_event()
1570 if (!ximagesink->xwindow) { in gst_x_image_sink_navigation_send_event()
1571 g_mutex_unlock (&ximagesink->flow_lock); in gst_x_image_sink_navigation_send_event()
1576 x_offset = ximagesink->xwindow->width - GST_VIDEO_SINK_WIDTH (ximagesink); in gst_x_image_sink_navigation_send_event()
1577 y_offset = ximagesink->xwindow->height - GST_VIDEO_SINK_HEIGHT (ximagesink); in gst_x_image_sink_navigation_send_event()
1579 g_mutex_unlock (&ximagesink->flow_lock); in gst_x_image_sink_navigation_send_event()
1593 handled = gst_pad_push_event (GST_VIDEO_SINK_PAD (ximagesink), event); in gst_x_image_sink_navigation_send_event()
1596 gst_element_post_message (GST_ELEMENT_CAST (ximagesink), in gst_x_image_sink_navigation_send_event()
1597 gst_navigation_message_new_event (GST_OBJECT_CAST (ximagesink), in gst_x_image_sink_navigation_send_event()
1614 GstXImageSink *ximagesink = GST_X_IMAGE_SINK (overlay); in gst_x_image_sink_set_window_handle() local
1620 g_mutex_lock (&ximagesink->flow_lock); in gst_x_image_sink_set_window_handle()
1623 if (ximagesink->xwindow && (xwindow_id == ximagesink->xwindow->win)) { in gst_x_image_sink_set_window_handle()
1624 g_mutex_unlock (&ximagesink->flow_lock); in gst_x_image_sink_set_window_handle()
1629 if (!ximagesink->xcontext && in gst_x_image_sink_set_window_handle()
1630 !(ximagesink->xcontext = gst_x_image_sink_xcontext_get (ximagesink))) { in gst_x_image_sink_set_window_handle()
1631 g_mutex_unlock (&ximagesink->flow_lock); in gst_x_image_sink_set_window_handle()
1637 if (ximagesink->xwindow) { in gst_x_image_sink_set_window_handle()
1638 gst_x_image_sink_xwindow_destroy (ximagesink, ximagesink->xwindow); in gst_x_image_sink_set_window_handle()
1639 ximagesink->xwindow = NULL; in gst_x_image_sink_set_window_handle()
1646 if (GST_VIDEO_SINK_WIDTH (ximagesink) && GST_VIDEO_SINK_HEIGHT (ximagesink)) { in gst_x_image_sink_set_window_handle()
1647 xwindow = gst_x_image_sink_xwindow_new (ximagesink, in gst_x_image_sink_set_window_handle()
1648 GST_VIDEO_SINK_WIDTH (ximagesink), in gst_x_image_sink_set_window_handle()
1649 GST_VIDEO_SINK_HEIGHT (ximagesink)); in gst_x_image_sink_set_window_handle()
1657 g_mutex_lock (&ximagesink->x_lock); in gst_x_image_sink_set_window_handle()
1659 if (ximagesink->handle_events) { in gst_x_image_sink_set_window_handle()
1660 XSelectInput (ximagesink->xcontext->disp, xwindow->win, ExposureMask | in gst_x_image_sink_set_window_handle()
1665 xwindow->gc = XCreateGC (ximagesink->xcontext->disp, xwindow->win, 0, NULL); in gst_x_image_sink_set_window_handle()
1666 g_mutex_unlock (&ximagesink->x_lock); in gst_x_image_sink_set_window_handle()
1670 ximagesink->xwindow = xwindow; in gst_x_image_sink_set_window_handle()
1672 gst_x_image_sink_xwindow_update_geometry (ximagesink); in gst_x_image_sink_set_window_handle()
1675 g_mutex_unlock (&ximagesink->flow_lock); in gst_x_image_sink_set_window_handle()
1681 GstXImageSink *ximagesink = GST_X_IMAGE_SINK (overlay); in gst_x_image_sink_expose() local
1683 gst_x_image_sink_xwindow_update_geometry (ximagesink); in gst_x_image_sink_expose()
1684 gst_x_image_sink_ximage_put (ximagesink, NULL); in gst_x_image_sink_expose()
1691 GstXImageSink *ximagesink = GST_X_IMAGE_SINK (overlay); in gst_x_image_sink_set_event_handling() local
1693 ximagesink->handle_events = handle_events; in gst_x_image_sink_set_event_handling()
1695 g_mutex_lock (&ximagesink->flow_lock); in gst_x_image_sink_set_event_handling()
1697 if (G_UNLIKELY (!ximagesink->xwindow)) { in gst_x_image_sink_set_event_handling()
1698 g_mutex_unlock (&ximagesink->flow_lock); in gst_x_image_sink_set_event_handling()
1702 g_mutex_lock (&ximagesink->x_lock); in gst_x_image_sink_set_event_handling()
1705 if (ximagesink->xwindow->internal) { in gst_x_image_sink_set_event_handling()
1706 XSelectInput (ximagesink->xcontext->disp, ximagesink->xwindow->win, in gst_x_image_sink_set_event_handling()
1710 XSelectInput (ximagesink->xcontext->disp, ximagesink->xwindow->win, in gst_x_image_sink_set_event_handling()
1715 XSelectInput (ximagesink->xcontext->disp, ximagesink->xwindow->win, 0); in gst_x_image_sink_set_event_handling()
1718 g_mutex_unlock (&ximagesink->x_lock); in gst_x_image_sink_set_event_handling()
1720 g_mutex_unlock (&ximagesink->flow_lock); in gst_x_image_sink_set_event_handling()
1741 GstXImageSink *ximagesink; in gst_x_image_sink_set_property() local
1745 ximagesink = GST_X_IMAGE_SINK (object); in gst_x_image_sink_set_property()
1749 ximagesink->display_name = g_strdup (g_value_get_string (value)); in gst_x_image_sink_set_property()
1752 ximagesink->synchronous = g_value_get_boolean (value); in gst_x_image_sink_set_property()
1753 if (ximagesink->xcontext) { in gst_x_image_sink_set_property()
1754 GST_DEBUG_OBJECT (ximagesink, "XSynchronize called with %s", in gst_x_image_sink_set_property()
1755 ximagesink->synchronous ? "TRUE" : "FALSE"); in gst_x_image_sink_set_property()
1756 g_mutex_lock (&ximagesink->x_lock); in gst_x_image_sink_set_property()
1757 XSynchronize (ximagesink->xcontext->disp, ximagesink->synchronous); in gst_x_image_sink_set_property()
1758 g_mutex_unlock (&ximagesink->x_lock); in gst_x_image_sink_set_property()
1762 ximagesink->keep_aspect = g_value_get_boolean (value); in gst_x_image_sink_set_property()
1772 GST_WARNING_OBJECT (ximagesink, in gst_x_image_sink_set_property()
1776 GST_DEBUG_OBJECT (ximagesink, "set PAR to %d/%d", in gst_x_image_sink_set_property()
1779 g_free (ximagesink->par); in gst_x_image_sink_set_property()
1780 ximagesink->par = tmp; in gst_x_image_sink_set_property()
1785 gst_x_image_sink_set_event_handling (GST_VIDEO_OVERLAY (ximagesink), in gst_x_image_sink_set_property()
1787 gst_x_image_sink_manage_event_thread (ximagesink); in gst_x_image_sink_set_property()
1790 ximagesink->handle_expose = g_value_get_boolean (value); in gst_x_image_sink_set_property()
1791 gst_x_image_sink_manage_event_thread (ximagesink); in gst_x_image_sink_set_property()
1803 GstXImageSink *ximagesink; in gst_x_image_sink_get_property() local
1807 ximagesink = GST_X_IMAGE_SINK (object); in gst_x_image_sink_get_property()
1811 g_value_set_string (value, ximagesink->display_name); in gst_x_image_sink_get_property()
1814 g_value_set_boolean (value, ximagesink->synchronous); in gst_x_image_sink_get_property()
1817 g_value_set_boolean (value, ximagesink->keep_aspect); in gst_x_image_sink_get_property()
1820 if (ximagesink->par) in gst_x_image_sink_get_property()
1821 g_value_transform (ximagesink->par, value); in gst_x_image_sink_get_property()
1824 g_value_set_boolean (value, ximagesink->handle_events); in gst_x_image_sink_get_property()
1827 g_value_set_boolean (value, ximagesink->handle_expose); in gst_x_image_sink_get_property()
1830 if (ximagesink->xwindow) in gst_x_image_sink_get_property()
1831 g_value_set_uint64 (value, ximagesink->xwindow->width); in gst_x_image_sink_get_property()
1836 if (ximagesink->xwindow) in gst_x_image_sink_get_property()
1837 g_value_set_uint64 (value, ximagesink->xwindow->height); in gst_x_image_sink_get_property()
1848 gst_x_image_sink_reset (GstXImageSink * ximagesink) in gst_x_image_sink_reset() argument
1852 GST_OBJECT_LOCK (ximagesink); in gst_x_image_sink_reset()
1853 ximagesink->running = FALSE; in gst_x_image_sink_reset()
1855 thread = ximagesink->event_thread; in gst_x_image_sink_reset()
1856 ximagesink->event_thread = NULL; in gst_x_image_sink_reset()
1857 GST_OBJECT_UNLOCK (ximagesink); in gst_x_image_sink_reset()
1863 if (ximagesink->cur_image) { in gst_x_image_sink_reset()
1864 gst_buffer_unref (ximagesink->cur_image); in gst_x_image_sink_reset()
1865 ximagesink->cur_image = NULL; in gst_x_image_sink_reset()
1868 g_mutex_lock (&ximagesink->flow_lock); in gst_x_image_sink_reset()
1870 if (ximagesink->pool) { in gst_x_image_sink_reset()
1871 gst_object_unref (ximagesink->pool); in gst_x_image_sink_reset()
1872 ximagesink->pool = NULL; in gst_x_image_sink_reset()
1875 if (ximagesink->xwindow) { in gst_x_image_sink_reset()
1876 gst_x_image_sink_xwindow_clear (ximagesink, ximagesink->xwindow); in gst_x_image_sink_reset()
1877 gst_x_image_sink_xwindow_destroy (ximagesink, ximagesink->xwindow); in gst_x_image_sink_reset()
1878 ximagesink->xwindow = NULL; in gst_x_image_sink_reset()
1880 g_mutex_unlock (&ximagesink->flow_lock); in gst_x_image_sink_reset()
1882 gst_x_image_sink_xcontext_clear (ximagesink); in gst_x_image_sink_reset()
1888 GstXImageSink *ximagesink; in gst_x_image_sink_finalize() local
1890 ximagesink = GST_X_IMAGE_SINK (object); in gst_x_image_sink_finalize()
1892 gst_x_image_sink_reset (ximagesink); in gst_x_image_sink_finalize()
1894 if (ximagesink->display_name) { in gst_x_image_sink_finalize()
1895 g_free (ximagesink->display_name); in gst_x_image_sink_finalize()
1896 ximagesink->display_name = NULL; in gst_x_image_sink_finalize()
1898 if (ximagesink->par) { in gst_x_image_sink_finalize()
1899 g_free (ximagesink->par); in gst_x_image_sink_finalize()
1900 ximagesink->par = NULL; in gst_x_image_sink_finalize()
1902 g_mutex_clear (&ximagesink->x_lock); in gst_x_image_sink_finalize()
1903 g_mutex_clear (&ximagesink->flow_lock); in gst_x_image_sink_finalize()
1905 g_free (ximagesink->media_title); in gst_x_image_sink_finalize()
1911 gst_x_image_sink_init (GstXImageSink * ximagesink) in gst_x_image_sink_init() argument
1913 ximagesink->display_name = NULL; in gst_x_image_sink_init()
1914 ximagesink->xcontext = NULL; in gst_x_image_sink_init()
1915 ximagesink->xwindow = NULL; in gst_x_image_sink_init()
1916 ximagesink->cur_image = NULL; in gst_x_image_sink_init()
1918 ximagesink->event_thread = NULL; in gst_x_image_sink_init()
1919 ximagesink->running = FALSE; in gst_x_image_sink_init()
1921 ximagesink->fps_n = 0; in gst_x_image_sink_init()
1922 ximagesink->fps_d = 1; in gst_x_image_sink_init()
1924 g_mutex_init (&ximagesink->x_lock); in gst_x_image_sink_init()
1925 g_mutex_init (&ximagesink->flow_lock); in gst_x_image_sink_init()
1927 ximagesink->par = NULL; in gst_x_image_sink_init()
1929 ximagesink->pool = NULL; in gst_x_image_sink_init()
1931 ximagesink->synchronous = FALSE; in gst_x_image_sink_init()
1932 ximagesink->keep_aspect = TRUE; in gst_x_image_sink_init()
1933 ximagesink->handle_events = TRUE; in gst_x_image_sink_init()
1934 ximagesink->handle_expose = TRUE; in gst_x_image_sink_init()