Commit 5d6e60c3 authored by Holger Kaelberer's avatar Holger Kaelberer Committed by Gwenole Beauchesne

vaapisink: don't resize a 'foreign' X-window.

Don't forcibly resize foreign X windows. The user is responsible for
their size and vaapisink shall not change this.
Signed-off-by: default avatarGwenole Beauchesne <gwenole.beauchesne@intel.com>
parent 15f13a56
......@@ -3,6 +3,7 @@ Copyright (C) 2010-2011 Splitted-Desktop Systems
Copyright (C) 2011-2012 Intel Corporation
Version 0.2.12 - DD.Apr.2012
* Don't forcibly resize user provided X windows (Holger Kaelberer)
* Recalculate render rect only if caps are negotiated (Holger Kaelberer)
Version 0.2.11 - 07.Feb.2012
......
......@@ -491,8 +491,12 @@ gst_vaapisink_set_caps(GstBaseSink *base_sink, GstCaps *caps)
gst_caps_replace(&sink->caps, caps);
gst_vaapi_display_get_size(sink->display, &display_width, &display_height);
if (sink->fullscreen ||
video_width > display_width || video_height > display_height) {
if (sink->foreign_window) {
win_width = sink->window_width;
win_height = sink->window_height;
}
else if (sink->fullscreen ||
video_width > display_width || video_height > display_height) {
win_width = display_width;
win_height = display_height;
}
......@@ -501,8 +505,10 @@ gst_vaapisink_set_caps(GstBaseSink *base_sink, GstCaps *caps)
win_height = video_height;
}
if (sink->window)
gst_vaapi_window_set_size(sink->window, win_width, win_height);
if (sink->window) {
if (!sink->foreign_window || sink->fullscreen)
gst_vaapi_window_set_size(sink->window, win_width, win_height);
}
else {
gst_vaapi_display_lock(sink->display);
gst_x_overlay_prepare_xwindow_id(GST_X_OVERLAY(sink));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment