mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-22 14:06:23 +00:00
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: Gwenole Beauchesne <gwenole.beauchesne@intel.com>
This commit is contained in:
parent
c37c9ca6cf
commit
bd08610e07
2 changed files with 11 additions and 4 deletions
1
NEWS
1
NEWS
|
@ -4,6 +4,7 @@ Copyright (C) 2011-2012 Intel Corporation
|
|||
Copyright (C) 2011 Collabora
|
||||
|
||||
Version 0.3.7 - 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.3.6 - 02.Apr.2012
|
||||
|
|
|
@ -471,8 +471,12 @@ gst_vaapisink_set_caps(GstBaseSink *base_sink, GstCaps *caps)
|
|||
return FALSE;
|
||||
|
||||
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;
|
||||
}
|
||||
|
@ -481,8 +485,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));
|
||||
|
|
Loading…
Reference in a new issue