#define DEFAULT_ROTATION GST_VAAPI_ROTATION_0
/* GstImplementsInterface interface */
+/**
+ * gst_vaapisink_prepare_xid:
+ * @overlay: a #GstXOverlay which does not yet have an XWindow or XPixmap.
+ *
+ * This will post a "prepare-xid" element message with video size and display size on the bus
+ * to give applications an opportunity to call
+ * gst_x_overlay_set_xwindow_id() before a plugin creates its own
+ * window or pixmap.
+ *
+ * This function should only be used by video overlay plugin developers.
+ */
+static void
+gst_vaapisink_prepare_xid (GstXOverlay * overlay)
+{
+ GstStructure *s;
+ GstMessage *msg;
+ guint display_width, display_height;
+
+ g_return_if_fail (overlay != NULL);
+ g_return_if_fail (GST_IS_X_OVERLAY (overlay));
+
+ GstVaapiSink *sink;
+ sink = GST_VAAPISINK (GST_OBJECT (overlay));
+
+ gst_vaapi_display_get_size(sink->display, &display_width, &display_height);
+
+ GST_DEBUG ("post \"prepare-xid\" element message with video-width(%d), video-height(%d), display-width(%d), display-height(%d)",
+ sink->video_width, sink->video_height, display_width, display_height);
+
+ GST_LOG_OBJECT (GST_OBJECT (overlay), "prepare xid");
+ s = gst_structure_new ("prepare-xid",
+ "video-width", G_TYPE_INT, sink->video_width,
+ "video-height", G_TYPE_INT, sink->video_height,
+ "display-width", G_TYPE_INT, display_width,
+ "display-height", G_TYPE_INT, display_height,
+ NULL);
+ msg = gst_message_new_element (GST_OBJECT (overlay), s);
+ gst_element_post_message (GST_ELEMENT (overlay), msg);
+}
static gboolean
gst_vaapisink_implements_interface_supported(
else {
gst_vaapi_display_lock(sink->display);
gst_x_overlay_prepare_xwindow_id(GST_X_OVERLAY(sink));
+ if (!sink->window)
+ gst_vaapisink_prepare_xid(GST_X_OVERLAY(sink)); // tizen customized interface/message for webkit-efl
gst_vaapi_display_unlock(sink->display);
if (sink->window)
return TRUE;