From 65b06e18acb0eee06a7eed5dc6ffd18b079d5c49 Mon Sep 17 00:00:00 2001 From: Wim Taymans Date: Wed, 26 Sep 2012 13:22:09 +0200 Subject: [PATCH] test: fix for new-sample signature The new-sample signal expects a GstFlowReturn as a result. Add support for external subtitles as well. --- tests/icles/playbin-text.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/tests/icles/playbin-text.c b/tests/icles/playbin-text.c index c9e7c90..7a603e5 100644 --- a/tests/icles/playbin-text.c +++ b/tests/icles/playbin-text.c @@ -83,7 +83,7 @@ bus_message (GstBus * bus, GstMessage * message, App * app) return TRUE; } -static void +static GstFlowReturn have_subtitle (GstElement * appsink, App * app) { GstBuffer *buffer; @@ -117,6 +117,7 @@ have_subtitle (GstElement * appsink, App * app) gst_buffer_unmap (buffer, &map); gst_sample_unref (sample); } + return GST_FLOW_OK; } int @@ -129,7 +130,7 @@ main (int argc, char *argv[]) gst_init (&argc, &argv); if (argc < 2) { - g_print ("usage: %s \n", argv[0]); + g_print ("usage: %s []\n", argv[0]); return -1; } @@ -159,6 +160,9 @@ main (int argc, char *argv[]) /* set to read from appsrc */ g_object_set (app->playbin, "uri", argv[1], NULL); + if (argc > 2) + g_object_set (app->playbin, "suburi", argv[2], NULL); + /* go to playing and wait in a mainloop. */ gst_element_set_state (app->playbin, GST_STATE_PLAYING); -- 2.7.4