icles: Only accept plain subtitles in the playbin-text icles test

This commit is contained in:
Sebastian Dröge 2010-06-10 08:46:50 +02:00
parent 1d21ce0da2
commit ac0f387add

View file

@ -126,6 +126,7 @@ main (int argc, char *argv[])
{ {
App *app = &s_app; App *app = &s_app;
GstBus *bus; GstBus *bus;
GstCaps *subcaps;
gst_init (&argc, &argv); gst_init (&argc, &argv);
@ -146,6 +147,9 @@ main (int argc, char *argv[])
g_object_set (G_OBJECT (app->textsink), "ts-offset", 0 * GST_SECOND, NULL); g_object_set (G_OBJECT (app->textsink), "ts-offset", 0 * GST_SECOND, NULL);
g_signal_connect (app->textsink, "new-buffer", G_CALLBACK (have_subtitle), g_signal_connect (app->textsink, "new-buffer", G_CALLBACK (have_subtitle),
app); app);
subcaps = gst_caps_from_string ("text/x-pango-markup; text/plain");
g_object_set (G_OBJECT (app->textsink), "caps", subcaps, NULL);
gst_caps_unref (subcaps);
g_object_set (G_OBJECT (app->playbin), "text-sink", app->textsink, NULL); g_object_set (G_OBJECT (app->playbin), "text-sink", app->textsink, NULL);