mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-09 00:45:56 +00:00
tools: play: allow parse-launch strings for audio and video sink
This commit is contained in:
parent
71788c1432
commit
2942b53cf6
1 changed files with 10 additions and 2 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue