summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorTim-Philipp Müller <tim@centricular.com>2013-12-13 10:06:25 +0000
committerTim-Philipp Müller <tim@centricular.com>2013-12-13 10:06:25 +0000
commit2942b53cf6b8ab6ad90896445dfd9dd46065f76e (patch)
tree70e71229841a1d1a1d01dcb5f1de5553d811cc3e /tools
parent71788c143296fc681dfdab95d138022b3fbb735b (diff)
tools: play: allow parse-launch strings for audio and video sink
Diffstat (limited to 'tools')
-rw-r--r--tools/gst-play.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/tools/gst-play.c b/tools/gst-play.c
index 7371ace88..7f78e300c 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