mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-17 12:55:53 +00:00
basetextoverlay: Append our rectangle to the upstream composition, not the other way around
Upstream is supposed to be painted first, and only then our rectangle.
This commit is contained in:
parent
e9579466a3
commit
1d271f9a15
1 changed files with 8 additions and 16 deletions
|
@ -1668,24 +1668,16 @@ gst_base_text_overlay_set_composition (GstBaseTextOverlay * overlay)
|
||||||
if (overlay->composition)
|
if (overlay->composition)
|
||||||
gst_video_overlay_composition_unref (overlay->composition);
|
gst_video_overlay_composition_unref (overlay->composition);
|
||||||
|
|
||||||
overlay->composition = gst_video_overlay_composition_new (rectangle);
|
|
||||||
gst_video_overlay_rectangle_unref (rectangle);
|
|
||||||
|
|
||||||
if (overlay->upstream_composition) {
|
if (overlay->upstream_composition) {
|
||||||
guint num_overlays =
|
overlay->composition =
|
||||||
gst_video_overlay_composition_n_rectangles
|
gst_video_overlay_composition_copy (overlay->upstream_composition);
|
||||||
(overlay->upstream_composition);
|
|
||||||
guint i;
|
|
||||||
|
|
||||||
for (i = 0; i < num_overlays; i++) {
|
|
||||||
GstVideoOverlayRectangle *rectangle;
|
|
||||||
rectangle =
|
|
||||||
gst_video_overlay_composition_get_rectangle
|
|
||||||
(overlay->upstream_composition, i);
|
|
||||||
gst_video_overlay_composition_add_rectangle (overlay->composition,
|
gst_video_overlay_composition_add_rectangle (overlay->composition,
|
||||||
rectangle);
|
rectangle);
|
||||||
|
} else {
|
||||||
|
overlay->composition = gst_video_overlay_composition_new (rectangle);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
gst_video_overlay_rectangle_unref (rectangle);
|
||||||
|
|
||||||
} else if (overlay->composition) {
|
} else if (overlay->composition) {
|
||||||
gst_video_overlay_composition_unref (overlay->composition);
|
gst_video_overlay_composition_unref (overlay->composition);
|
||||||
|
|
Loading…
Reference in a new issue