mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-24 02:31:03 +00:00
playsink: Force the aspect ratio if the sink has such a property
This commit is contained in:
parent
55aaec3102
commit
b8343b4a14
1 changed files with 14 additions and 0 deletions
|
@ -1376,6 +1376,13 @@ gen_video_chain (GstPlaySink * playsink, gboolean raw, gboolean async)
|
|||
chain->async = TRUE;
|
||||
}
|
||||
|
||||
/* Make sure the aspect ratio is kept */
|
||||
elem =
|
||||
gst_play_sink_find_property_sinks (playsink, chain->sink,
|
||||
"force-aspect-ratio", G_TYPE_BOOLEAN);
|
||||
if (elem)
|
||||
g_object_set (elem, "force-aspect-ratio", TRUE, NULL);
|
||||
|
||||
/* find ts-offset element */
|
||||
gst_object_replace ((GstObject **) & chain->ts_offset, (GstObject *)
|
||||
gst_play_sink_find_property_sinks (playsink, chain->sink, "ts-offset",
|
||||
|
@ -1529,6 +1536,13 @@ setup_video_chain (GstPlaySink * playsink, gboolean raw, gboolean async)
|
|||
chain->async = TRUE;
|
||||
}
|
||||
|
||||
/* Make sure the aspect ratio is kept */
|
||||
elem =
|
||||
gst_play_sink_find_property_sinks (playsink, chain->sink,
|
||||
"force-aspect-ratio", G_TYPE_BOOLEAN);
|
||||
if (elem)
|
||||
g_object_set (elem, "force-aspect-ratio", TRUE, NULL);
|
||||
|
||||
if (chain->conv)
|
||||
g_object_set (chain->conv, "use-balance",
|
||||
!has_color_balance_element (chain->sink)
|
||||
|
|
Loading…
Reference in a new issue