mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-04-26 23:14:46 +00:00
Fix upscaling in foreign window (Totem).
This commit is contained in:
parent
6b8f76b2ce
commit
643d35e87a
2 changed files with 4 additions and 1 deletions
|
@ -136,6 +136,7 @@ gst_vaapisink_xoverlay_set_xid(GstXOverlay *overlay, XID xid)
|
|||
window. It's pretty much useless */
|
||||
sink->use_glx = FALSE;
|
||||
|
||||
sink->foreign_window = TRUE;
|
||||
gst_vaapisink_ensure_window_xid(sink, xid);
|
||||
}
|
||||
|
||||
|
@ -303,7 +304,7 @@ gst_vaapisink_ensure_render_rect(GstVaapiSink *sink, guint width, guint height)
|
|||
display_ratio = (gdouble)display_rect->width / display_rect->height;
|
||||
GST_DEBUG("scaling to %ux%u", display_rect->width, display_rect->height);
|
||||
|
||||
if (sink->fullscreen ||
|
||||
if (sink->fullscreen || sink->foreign_window ||
|
||||
display_rect->width > width || display_rect->height > height) {
|
||||
if (sink->video_width > sink->video_height) {
|
||||
display_rect->width = width;
|
||||
|
@ -883,6 +884,7 @@ gst_vaapisink_init(GstVaapiSink *sink, GstVaapiSinkClass *klass)
|
|||
sink->video_height = 0;
|
||||
sink->video_par_n = 1;
|
||||
sink->video_par_d = 1;
|
||||
sink->foreign_window = FALSE;
|
||||
sink->fullscreen = FALSE;
|
||||
sink->synchronous = FALSE;
|
||||
sink->use_glx = USE_VAAPISINK_GLX;
|
||||
|
|
|
@ -77,6 +77,7 @@ struct _GstVaapiSink {
|
|||
gint video_par_n;
|
||||
gint video_par_d;
|
||||
GstVaapiRectangle display_rect;
|
||||
guint foreign_window : 1;
|
||||
guint fullscreen : 1;
|
||||
guint synchronous : 1;
|
||||
guint use_glx : 1;
|
||||
|
|
Loading…
Reference in a new issue