Problems with text_overlay

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Problems with text_overlay

jhanksv
I'm trying to overlay text on video.  I have successfully added static
text but I need the text to change over time. I'm using an app_src to
generate the text.

It looks like I have an incompatibility between my app_src and text_overlay.

I've coded this to flow as follows:

app_src -> queue -> text_overlay

I've tried to create a caps for this and using the caps in the link (it
has worked me with KLV data):

textsrccaps =gst_caps_new_simple("text/x-raw", "format", G_TYPE_STRING,
"pango-markup, utf8", NULL);
text_link_ok=gst_element_link_filtered(data.tqueue,data.text_overlay,textsrccaps);


When I run with DEBUG, my output is showing this:

GST_CAPS gstutils.c:3065:gst_pad_query_caps: query returned text/x-raw,
format=(string)"pango-markup\,\ utf8"

and text_overlay is showing this:

GST_CAPS gstutils.c:3065:gst_pad_query_caps: query returned text/x-raw,
format=(string){ pango-markup, utf8 }

How do I set the caps so it is compatible?  I've tried "...
G_TYPE_STRING, "{ pango-markup, utf8 }"..." but that did not help.

Thanks in advance,

John

_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: Problems with text_overlay

Tim Müller
Hi John,

> I've tried to create a caps for this and using the caps in the link
> (it has worked me with KLV data):
>
> textsrccaps =gst_caps_new_simple("text/x-raw", "format",
> G_TYPE_STRING, "pango-markup, utf8", NULL);
> ...
>
> How do I set the caps so it is compatible?  I've tried "...
> G_TYPE_STRING, "{ pango-markup, utf8 }"..." but that did not help.

{ a, b } describes a list of possible values/choices. The actual caps
for the data must be just one of those values, so either

  text/x-raw, format=utf8

or

  text/x-raw, format=pango-markup

Cheers
 Tim
--
Tim Müller, Centricular Ltd - http://www.centricular.com

_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel