/* render text */
GST_DEBUG ("rendering '%*s'", (gint) size, data);
- pango_layout_set_markup (render->layout, (gchar *) data, size);
+ if (render->have_pango_markup)
+ pango_layout_set_markup (render->layout, (gchar *) data, size);
+ else
+ pango_layout_set_text (render->layout, (gchar *) data, size);
gst_text_render_render_pangocairo (render);
gst_buffer_unmap (inbuf, &map);
}
break;
}
+ case GST_EVENT_CAPS:
+ {
+ GstCaps *caps;
+ GstStructure *structure;
+ const gchar *format;
+
+ gst_event_parse_caps (event, &caps);
+
+ structure = gst_caps_get_structure (caps, 0);
+ format = gst_structure_get_string (structure, "format");
+ render->have_pango_markup = (strcmp (format, "pango-markup") == 0);
+
+ gst_event_unref (event);
+ ret = TRUE;
+
+ break;
+ }
default:
ret = gst_pad_event_default (pad, parent, event);
break;