From e3401c3fd0fff044b6f1910cff9d03afd521323f Mon Sep 17 00:00:00 2001 From: Zhao Halley Date: Fri, 22 Mar 2013 17:30:14 +0800 Subject: add display-width, display-height support in gst_vaapisink_prepare_xid it give app better choice on how big a Pixmap should be created. Change-Id: I518c21f09f0bafb3725ca4f5a9ada5f69257486c --- gst/vaapi/gstvaapisink.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) mode change 100644 => 100755 gst/vaapi/gstvaapisink.c diff --git a/gst/vaapi/gstvaapisink.c b/gst/vaapi/gstvaapisink.c old mode 100644 new mode 100755 index d3711d3..8d8cdc3 --- a/gst/vaapi/gstvaapisink.c +++ b/gst/vaapi/gstvaapisink.c @@ -141,6 +141,7 @@ 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)); @@ -148,15 +149,17 @@ gst_vaapisink_prepare_xid (GstXOverlay * 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, sink->window_width, sink->window_height); + 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, sink->window_width, - "display-height", G_TYPE_INT, sink->window_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); -- cgit v1.2.3