From 2942b53cf6b8ab6ad90896445dfd9dd46065f76e Mon Sep 17 00:00:00 2001 From: =?utf8?q?Tim-Philipp=20M=C3=BCller?= Date: Fri, 13 Dec 2013 10:06:25 +0000 Subject: [PATCH] tools: play: allow parse-launch strings for audio and video sink --- tools/gst-play.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/tools/gst-play.c b/tools/gst-play.c index 7371ace..7f78e30 100644 --- a/tools/gst-play.c +++ b/tools/gst-play.c @@ -82,14 +82,22 @@ play_new (gchar ** uris, const gchar * audio_sink, const gchar * video_sink, play->playbin = gst_element_factory_make ("playbin", "playbin"); if (audio_sink != NULL) { - sink = gst_element_factory_make (audio_sink, NULL); + if (strchr (audio_sink, ' ') != NULL) + sink = gst_parse_bin_from_description (audio_sink, TRUE, NULL); + else + sink = gst_element_factory_make (audio_sink, NULL); + if (sink != NULL) g_object_set (play->playbin, "audio-sink", sink, NULL); else g_warning ("Couldn't create specified audio sink '%s'", audio_sink); } if (video_sink != NULL) { - sink = gst_element_factory_make (video_sink, NULL); + if (strchr (video_sink, ' ') != NULL) + sink = gst_parse_bin_from_description (video_sink, TRUE, NULL); + else + sink = gst_element_factory_make (video_sink, NULL); + if (sink != NULL) g_object_set (play->playbin, "video-sink", sink, NULL); else -- 2.7.4