playbin: Store a/v/t sinks locally too, not just in playsink

This commit is contained in:
Sebastian Dröge 2013-07-10 13:22:04 +02:00
parent 4c1fc76407
commit d7f1d9954f

View file

@ -2158,11 +2158,15 @@ no_channels:
static void static void
gst_play_bin_set_sink (GstPlayBin * playbin, GstPlaySinkType type, gst_play_bin_set_sink (GstPlayBin * playbin, GstPlaySinkType type,
const gchar * dbg, GstElement * sink) const gchar * dbg, GstElement ** elem, GstElement * sink)
{ {
GST_INFO_OBJECT (playbin, "Setting %s sink to %" GST_PTR_FORMAT, dbg, sink); GST_INFO_OBJECT (playbin, "Setting %s sink to %" GST_PTR_FORMAT, dbg, sink);
gst_play_sink_set_sink (playbin->playsink, type, sink); gst_play_sink_set_sink (playbin->playsink, type, sink);
if (*elem)
gst_object_unref (*elem);
*elem = gst_object_ref (sink);
} }
static void static void
@ -2240,11 +2244,11 @@ gst_play_bin_set_property (GObject * object, guint prop_id,
break; break;
case PROP_VIDEO_SINK: case PROP_VIDEO_SINK:
gst_play_bin_set_sink (playbin, GST_PLAY_SINK_TYPE_VIDEO, "video", gst_play_bin_set_sink (playbin, GST_PLAY_SINK_TYPE_VIDEO, "video",
g_value_get_object (value)); &playbin->video_sink, g_value_get_object (value));
break; break;
case PROP_AUDIO_SINK: case PROP_AUDIO_SINK:
gst_play_bin_set_sink (playbin, GST_PLAY_SINK_TYPE_AUDIO, "audio", gst_play_bin_set_sink (playbin, GST_PLAY_SINK_TYPE_AUDIO, "audio",
g_value_get_object (value)); &playbin->audio_sink, g_value_get_object (value));
break; break;
case PROP_VIS_PLUGIN: case PROP_VIS_PLUGIN:
gst_play_sink_set_vis_plugin (playbin->playsink, gst_play_sink_set_vis_plugin (playbin->playsink,
@ -2252,7 +2256,7 @@ gst_play_bin_set_property (GObject * object, guint prop_id,
break; break;
case PROP_TEXT_SINK: case PROP_TEXT_SINK:
gst_play_bin_set_sink (playbin, GST_PLAY_SINK_TYPE_TEXT, "text", gst_play_bin_set_sink (playbin, GST_PLAY_SINK_TYPE_TEXT, "text",
g_value_get_object (value)); &playbin->text_sink, g_value_get_object (value));
break; break;
case PROP_VIDEO_STREAM_COMBINER: case PROP_VIDEO_STREAM_COMBINER:
gst_play_bin_set_stream_combiner (playbin, gst_play_bin_set_stream_combiner (playbin,