mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-03 04:52:28 +00:00
seek: set selected/default audio/video sinks on playbin and playbin2
https://bugzilla.gnome.org/show_bug.cgi?id=630322
This commit is contained in:
parent
2b12546e02
commit
4c8fd85e8e
1 changed files with 9 additions and 0 deletions
|
@ -930,6 +930,7 @@ static GstElement *
|
|||
construct_playerbin (const gchar * name, const gchar * location)
|
||||
{
|
||||
GstElement *player;
|
||||
GstElement *avsink;
|
||||
|
||||
player = gst_element_factory_make (name, "player");
|
||||
g_assert (player);
|
||||
|
@ -941,6 +942,14 @@ construct_playerbin (const gchar * name, const gchar * location)
|
|||
/* force element seeking on this pipeline */
|
||||
elem_seek = TRUE;
|
||||
|
||||
avsink = gst_element_factory_make_or_warn (opt_audiosink_str, "a_sink");
|
||||
if (avsink)
|
||||
g_object_set (player, "audio-sink", avsink, NULL);
|
||||
|
||||
avsink = gst_element_factory_make_or_warn (opt_videosink_str, "v_sink");
|
||||
if (avsink)
|
||||
g_object_set (player, "video-sink", avsink, NULL);
|
||||
|
||||
return player;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue