Lines Matching refs:playbin
311 static GSequence *avelements_create (GstPlayBin3 * playbin,
337 GstPlayBin3 *playbin; member
531 void (*about_to_finish) (GstPlayBin3 * playbin);
534 GstSample *(*convert_sample) (GstPlayBin3 * playbin, GstCaps * caps);
619 static void gst_play_bin3_deep_element_added (GstBin * playbin,
624 static GstSample *gst_play_bin3_convert_sample (GstPlayBin3 * playbin,
627 static GstStateChangeReturn setup_next_source (GstPlayBin3 * playbin);
629 static void gst_play_bin3_check_group_status (GstPlayBin3 * playbin);
630 static void emit_about_to_finish (GstPlayBin3 * playbin);
631 static void reconfigure_output (GstPlayBin3 * playbin);
639 static void do_stream_selection (GstPlayBin3 * playbin, GstSourceGroup * group);
1066 do_async_start (GstPlayBin3 * playbin) in do_async_start() argument
1070 playbin->async_pending = TRUE; in do_async_start()
1072 message = gst_message_new_async_start (GST_OBJECT_CAST (playbin)); in do_async_start()
1073 GST_BIN_CLASS (parent_class)->handle_message (GST_BIN_CAST (playbin), in do_async_start()
1078 do_async_done (GstPlayBin3 * playbin) in do_async_done() argument
1082 if (playbin->async_pending) { in do_async_done()
1083 GST_DEBUG_OBJECT (playbin, "posting ASYNC_DONE"); in do_async_done()
1085 gst_message_new_async_done (GST_OBJECT_CAST (playbin), in do_async_done()
1087 GST_BIN_CLASS (parent_class)->handle_message (GST_BIN_CAST (playbin), in do_async_done()
1090 playbin->async_pending = FALSE; in do_async_done()
1097 init_combiners (GstPlayBin3 * playbin) in init_combiners() argument
1103 playbin->channels[i] = g_ptr_array_new (); in init_combiners()
1105 playbin->combiner[PLAYBIN_STREAM_AUDIO].media_type = "audio"; in init_combiners()
1106 playbin->combiner[PLAYBIN_STREAM_AUDIO].type = GST_PLAY_SINK_TYPE_AUDIO; in init_combiners()
1107 playbin->combiner[PLAYBIN_STREAM_AUDIO].stream_type = GST_STREAM_TYPE_AUDIO; in init_combiners()
1108 playbin->combiner[PLAYBIN_STREAM_AUDIO].channels = playbin->channels[0]; in init_combiners()
1109 playbin->combiner[PLAYBIN_STREAM_AUDIO].streams = in init_combiners()
1112 playbin->combiner[PLAYBIN_STREAM_VIDEO].media_type = "video"; in init_combiners()
1113 playbin->combiner[PLAYBIN_STREAM_VIDEO].type = GST_PLAY_SINK_TYPE_VIDEO; in init_combiners()
1114 playbin->combiner[PLAYBIN_STREAM_VIDEO].stream_type = GST_STREAM_TYPE_VIDEO; in init_combiners()
1115 playbin->combiner[PLAYBIN_STREAM_VIDEO].channels = playbin->channels[1]; in init_combiners()
1116 playbin->combiner[PLAYBIN_STREAM_VIDEO].streams = in init_combiners()
1119 playbin->combiner[PLAYBIN_STREAM_TEXT].media_type = "text"; in init_combiners()
1120 playbin->combiner[PLAYBIN_STREAM_TEXT].get_media_caps = in init_combiners()
1122 playbin->combiner[PLAYBIN_STREAM_TEXT].type = GST_PLAY_SINK_TYPE_TEXT; in init_combiners()
1123 playbin->combiner[PLAYBIN_STREAM_TEXT].stream_type = GST_STREAM_TYPE_TEXT; in init_combiners()
1124 playbin->combiner[PLAYBIN_STREAM_TEXT].channels = playbin->channels[2]; in init_combiners()
1125 playbin->combiner[PLAYBIN_STREAM_TEXT].streams = in init_combiners()
1134 update_combiner_info (GstPlayBin3 * playbin, GstStreamCollection * collection) in update_combiner_info() argument
1141 GST_DEBUG_OBJECT (playbin, "Updating combiner info"); in update_combiner_info()
1144 g_ptr_array_free (playbin->combiner[PLAYBIN_STREAM_AUDIO].streams, TRUE); in update_combiner_info()
1145 g_ptr_array_free (playbin->combiner[PLAYBIN_STREAM_VIDEO].streams, TRUE); in update_combiner_info()
1146 g_ptr_array_free (playbin->combiner[PLAYBIN_STREAM_TEXT].streams, TRUE); in update_combiner_info()
1147 playbin->combiner[PLAYBIN_STREAM_AUDIO].streams = in update_combiner_info()
1149 playbin->combiner[PLAYBIN_STREAM_VIDEO].streams = in update_combiner_info()
1151 playbin->combiner[PLAYBIN_STREAM_TEXT].streams = in update_combiner_info()
1160 g_ptr_array_add (playbin->combiner[PLAYBIN_STREAM_AUDIO].streams, in update_combiner_info()
1163 g_ptr_array_add (playbin->combiner[PLAYBIN_STREAM_VIDEO].streams, in update_combiner_info()
1166 g_ptr_array_add (playbin->combiner[PLAYBIN_STREAM_TEXT].streams, in update_combiner_info()
1171 GST_DEBUG_OBJECT (playbin, "There are %d audio streams", in update_combiner_info()
1172 playbin->combiner[PLAYBIN_STREAM_AUDIO].streams->len); in update_combiner_info()
1173 GST_DEBUG_OBJECT (playbin, "There are %d video streams", in update_combiner_info()
1174 playbin->combiner[PLAYBIN_STREAM_VIDEO].streams->len); in update_combiner_info()
1175 GST_DEBUG_OBJECT (playbin, "There are %d text streams", in update_combiner_info()
1176 playbin->combiner[PLAYBIN_STREAM_TEXT].streams->len); in update_combiner_info()
1180 #define debug_groups(playbin) G_STMT_START { \ argument
1184 GstSourceGroup *group = &playbin->groups[i]; \
1186 …ST_DEBUG ("GstSourceGroup #%d (%s)", i, (group == playbin->curr_group) ? "current" : (group == pla…
1199 init_group (GstPlayBin3 * playbin, GstSourceGroup * group) in init_group() argument
1206 group->playbin = playbin; in init_group()
1210 free_group (GstPlayBin3 * playbin, GstSourceGroup * group) in free_group() argument
1230 notify_volume_cb (GObject * combiner, GParamSpec * pspec, GstPlayBin3 * playbin) in notify_volume_cb() argument
1232 g_object_notify (G_OBJECT (playbin), "volume"); in notify_volume_cb()
1236 notify_mute_cb (GObject * combiner, GParamSpec * pspec, GstPlayBin3 * playbin) in notify_mute_cb() argument
1238 g_object_notify (G_OBJECT (playbin), "mute"); in notify_mute_cb()
1243 GstColorBalanceChannel * channel, gint value, GstPlayBin3 * playbin) in colorbalance_value_changed_cb() argument
1245 gst_color_balance_value_changed (GST_COLOR_BALANCE (playbin), channel, value); in colorbalance_value_changed_cb()
1289 gst_play_bin3_update_elements_list (GstPlayBin3 * playbin)
1296 if (!playbin->elements || playbin->elements_cookie != cookie) {
1297 if (playbin->elements)
1298 gst_plugin_feature_list_free (playbin->elements);
1305 playbin->elements = g_list_concat (res, tmp);
1306 playbin->elements = g_list_sort (playbin->elements, compare_factories_func);
1309 if (!playbin->aelements || playbin->elements_cookie != cookie) {
1310 if (playbin->aelements)
1311 g_sequence_free (playbin->aelements);
1312 playbin->aelements = avelements_create (playbin, TRUE);
1315 if (!playbin->velements || playbin->elements_cookie != cookie) {
1316 if (playbin->velements)
1317 g_sequence_free (playbin->velements);
1318 playbin->velements = avelements_create (playbin, FALSE);
1321 playbin->elements_cookie = cookie;
1326 gst_play_bin3_init (GstPlayBin3 * playbin) in gst_play_bin3_init() argument
1328 g_rec_mutex_init (&playbin->lock); in gst_play_bin3_init()
1329 g_mutex_init (&playbin->dyn_lock); in gst_play_bin3_init()
1331 g_mutex_init (&playbin->buffering_post_lock); in gst_play_bin3_init()
1334 playbin->have_selector = TRUE; in gst_play_bin3_init()
1336 init_combiners (playbin); in gst_play_bin3_init()
1339 playbin->curr_group = &playbin->groups[0]; in gst_play_bin3_init()
1340 playbin->next_group = &playbin->groups[1]; in gst_play_bin3_init()
1341 init_group (playbin, &playbin->groups[0]); in gst_play_bin3_init()
1342 init_group (playbin, &playbin->groups[1]); in gst_play_bin3_init()
1345 g_mutex_init (&playbin->elements_lock); in gst_play_bin3_init()
1347 g_rec_mutex_init (&playbin->activation_lock); in gst_play_bin3_init()
1350 playbin->playsink = in gst_play_bin3_init()
1353 gst_bin_add (GST_BIN_CAST (playbin), GST_ELEMENT_CAST (playbin->playsink)); in gst_play_bin3_init()
1354 gst_play_sink_set_flags (playbin->playsink, DEFAULT_FLAGS); in gst_play_bin3_init()
1356 g_signal_connect (playbin->playsink, "notify::volume", in gst_play_bin3_init()
1357 G_CALLBACK (notify_volume_cb), playbin); in gst_play_bin3_init()
1358 g_signal_connect (playbin->playsink, "notify::mute", in gst_play_bin3_init()
1359 G_CALLBACK (notify_mute_cb), playbin); in gst_play_bin3_init()
1360 g_signal_connect (playbin->playsink, "value-changed", in gst_play_bin3_init()
1361 G_CALLBACK (colorbalance_value_changed_cb), playbin); in gst_play_bin3_init()
1363 playbin->current_video = DEFAULT_CURRENT_VIDEO; in gst_play_bin3_init()
1364 playbin->current_audio = DEFAULT_CURRENT_AUDIO; in gst_play_bin3_init()
1365 playbin->current_text = DEFAULT_CURRENT_TEXT; in gst_play_bin3_init()
1367 playbin->buffer_duration = DEFAULT_BUFFER_DURATION; in gst_play_bin3_init()
1368 playbin->buffer_size = DEFAULT_BUFFER_SIZE; in gst_play_bin3_init()
1369 playbin->ring_buffer_max_size = DEFAULT_RING_BUFFER_MAX_SIZE; in gst_play_bin3_init()
1371 playbin->force_aspect_ratio = TRUE; in gst_play_bin3_init()
1373 playbin->multiview_mode = GST_VIDEO_MULTIVIEW_FRAME_PACKING_NONE; in gst_play_bin3_init()
1374 playbin->multiview_flags = GST_VIDEO_MULTIVIEW_FLAGS_NONE; in gst_play_bin3_init()
1376 playbin->is_live = FALSE; in gst_play_bin3_init()
1382 GstPlayBin3 *playbin; in gst_play_bin3_finalize() local
1385 playbin = GST_PLAY_BIN3 (object); in gst_play_bin3_finalize()
1387 free_group (playbin, &playbin->groups[0]); in gst_play_bin3_finalize()
1388 free_group (playbin, &playbin->groups[1]); in gst_play_bin3_finalize()
1391 g_ptr_array_free (playbin->channels[i], TRUE); in gst_play_bin3_finalize()
1397 if (playbin->video_sink) { in gst_play_bin3_finalize()
1398 gst_element_set_state (playbin->video_sink, GST_STATE_NULL); in gst_play_bin3_finalize()
1399 gst_object_unref (playbin->video_sink); in gst_play_bin3_finalize()
1401 if (playbin->audio_sink) { in gst_play_bin3_finalize()
1402 gst_element_set_state (playbin->audio_sink, GST_STATE_NULL); in gst_play_bin3_finalize()
1403 gst_object_unref (playbin->audio_sink); in gst_play_bin3_finalize()
1405 if (playbin->text_sink) { in gst_play_bin3_finalize()
1406 gst_element_set_state (playbin->text_sink, GST_STATE_NULL); in gst_play_bin3_finalize()
1407 gst_object_unref (playbin->text_sink); in gst_play_bin3_finalize()
1410 if (playbin->video_stream_combiner) { in gst_play_bin3_finalize()
1411 gst_element_set_state (playbin->video_stream_combiner, GST_STATE_NULL); in gst_play_bin3_finalize()
1412 gst_object_unref (playbin->video_stream_combiner); in gst_play_bin3_finalize()
1414 if (playbin->audio_stream_combiner) { in gst_play_bin3_finalize()
1415 gst_element_set_state (playbin->audio_stream_combiner, GST_STATE_NULL); in gst_play_bin3_finalize()
1416 gst_object_unref (playbin->audio_stream_combiner); in gst_play_bin3_finalize()
1418 if (playbin->text_stream_combiner) { in gst_play_bin3_finalize()
1419 gst_element_set_state (playbin->text_stream_combiner, GST_STATE_NULL); in gst_play_bin3_finalize()
1420 gst_object_unref (playbin->text_stream_combiner); in gst_play_bin3_finalize()
1423 g_ptr_array_free (playbin->combiner[PLAYBIN_STREAM_AUDIO].streams, TRUE); in gst_play_bin3_finalize()
1424 g_ptr_array_free (playbin->combiner[PLAYBIN_STREAM_VIDEO].streams, TRUE); in gst_play_bin3_finalize()
1425 g_ptr_array_free (playbin->combiner[PLAYBIN_STREAM_TEXT].streams, TRUE); in gst_play_bin3_finalize()
1427 if (playbin->elements) in gst_play_bin3_finalize()
1428 gst_plugin_feature_list_free (playbin->elements); in gst_play_bin3_finalize()
1430 if (playbin->aelements) in gst_play_bin3_finalize()
1431 g_sequence_free (playbin->aelements); in gst_play_bin3_finalize()
1433 if (playbin->velements) in gst_play_bin3_finalize()
1434 g_sequence_free (playbin->velements); in gst_play_bin3_finalize()
1436 g_rec_mutex_clear (&playbin->activation_lock); in gst_play_bin3_finalize()
1437 g_rec_mutex_clear (&playbin->lock); in gst_play_bin3_finalize()
1439 g_mutex_clear (&playbin->buffering_post_lock); in gst_play_bin3_finalize()
1440 g_mutex_clear (&playbin->dyn_lock); in gst_play_bin3_finalize()
1441 g_mutex_clear (&playbin->elements_lock); in gst_play_bin3_finalize()
1447 gst_playbin_uri_is_valid (GstPlayBin3 * playbin, const gchar * uri) in gst_playbin_uri_is_valid() argument
1451 GST_LOG_OBJECT (playbin, "checking uri '%s'", uri); in gst_playbin_uri_is_valid()
1468 GST_WARNING_OBJECT (playbin, "uri '%s' not valid, character #%u", in gst_playbin_uri_is_valid()
1475 gst_play_bin3_set_uri (GstPlayBin3 * playbin, const gchar * uri) in gst_play_bin3_set_uri() argument
1479 if (uri && !gst_playbin_uri_is_valid (playbin, uri)) { in gst_play_bin3_set_uri()
1481 GST_WARNING_OBJECT (playbin, "not entirely correct file URI '%s' - make " in gst_play_bin3_set_uri()
1490 GST_PLAY_BIN3_LOCK (playbin); in gst_play_bin3_set_uri()
1491 group = playbin->next_group; in gst_play_bin3_set_uri()
1506 GST_PLAY_BIN3_UNLOCK (playbin); in gst_play_bin3_set_uri()
1510 gst_play_bin3_set_suburi (GstPlayBin3 * playbin, const gchar * suburi) in gst_play_bin3_set_suburi() argument
1514 GST_PLAY_BIN3_LOCK (playbin); in gst_play_bin3_set_suburi()
1515 group = playbin->next_group; in gst_play_bin3_set_suburi()
1524 GST_PLAY_BIN3_UNLOCK (playbin); in gst_play_bin3_set_suburi()
1528 gst_play_bin3_set_flags (GstPlayBin3 * playbin, GstPlayFlags flags) in gst_play_bin3_set_flags() argument
1531 old_flags = gst_play_sink_get_flags (playbin->playsink); in gst_play_bin3_set_flags()
1534 gst_play_sink_set_flags (playbin->playsink, flags); in gst_play_bin3_set_flags()
1535 gst_play_sink_reconfigure (playbin->playsink); in gst_play_bin3_set_flags()
1540 gst_play_bin3_get_flags (GstPlayBin3 * playbin) in gst_play_bin3_get_flags() argument
1544 flags = gst_play_sink_get_flags (playbin->playsink); in gst_play_bin3_get_flags()
1552 get_group (GstPlayBin3 * playbin) in get_group() argument
1556 if (!(result = playbin->curr_group)) in get_group()
1557 result = playbin->next_group; in get_group()
1564 gst_play_bin3_convert_sample (GstPlayBin3 * playbin, GstCaps * caps) in gst_play_bin3_convert_sample() argument
1566 return gst_play_sink_convert_sample (playbin->playsink, caps); in gst_play_bin3_convert_sample()
1592 gst_play_bin3_set_current_stream (GstPlayBin3 * playbin, in gst_play_bin3_set_current_stream() argument
1600 GST_PLAY_BIN3_LOCK (playbin); in gst_play_bin3_set_current_stream()
1604 playbin->do_stream_selections = TRUE; in gst_play_bin3_set_current_stream()
1606 combine = playbin->combiner + stream_type; in gst_play_bin3_set_current_stream()
1607 channels = playbin->channels[stream_type]; in gst_play_bin3_set_current_stream()
1609 GST_DEBUG_OBJECT (playbin, "Changing current %s stream %d -> %d", in gst_play_bin3_set_current_stream()
1615 do_stream_selection (playbin, playbin->curr_group); in gst_play_bin3_set_current_stream()
1616 GST_PLAY_BIN3_UNLOCK (playbin); in gst_play_bin3_set_current_stream()
1620 GST_DEBUG_OBJECT (playbin, "Using old style combiner"); in gst_play_bin3_set_current_stream()
1636 GST_PLAY_BIN3_UNLOCK (playbin); in gst_play_bin3_set_current_stream()
1670 GST_PLAY_BIN3_UNLOCK (playbin); in gst_play_bin3_set_current_stream()
1671 GST_WARNING_OBJECT (playbin, in gst_play_bin3_set_current_stream()
1678 GST_PLAY_BIN3_UNLOCK (playbin); in gst_play_bin3_set_current_stream()
1679 GST_DEBUG_OBJECT (playbin, "can't switch video, we have no channels"); in gst_play_bin3_set_current_stream()
1685 gst_play_bin3_set_current_video_stream (GstPlayBin3 * playbin, gint stream) in gst_play_bin3_set_current_video_stream() argument
1687 return gst_play_bin3_set_current_stream (playbin, PLAYBIN_STREAM_VIDEO, in gst_play_bin3_set_current_video_stream()
1688 &playbin->current_video, stream, &playbin->video_pending_flush_finish); in gst_play_bin3_set_current_video_stream()
1692 gst_play_bin3_set_current_audio_stream (GstPlayBin3 * playbin, gint stream) in gst_play_bin3_set_current_audio_stream() argument
1694 return gst_play_bin3_set_current_stream (playbin, PLAYBIN_STREAM_AUDIO, in gst_play_bin3_set_current_audio_stream()
1695 &playbin->current_audio, stream, &playbin->audio_pending_flush_finish); in gst_play_bin3_set_current_audio_stream()
1699 gst_play_bin3_set_current_text_stream (GstPlayBin3 * playbin, gint stream) in gst_play_bin3_set_current_text_stream() argument
1701 return gst_play_bin3_set_current_stream (playbin, PLAYBIN_STREAM_TEXT, in gst_play_bin3_set_current_text_stream()
1702 &playbin->current_text, stream, &playbin->text_pending_flush_finish); in gst_play_bin3_set_current_text_stream()
1707 gst_play_bin3_set_sink (GstPlayBin3 * playbin, GstPlaySinkType type, in gst_play_bin3_set_sink() argument
1710 GST_INFO_OBJECT (playbin, "Setting %s sink to %" GST_PTR_FORMAT, dbg, sink); in gst_play_bin3_set_sink()
1712 gst_play_sink_set_sink (playbin->playsink, type, sink); in gst_play_bin3_set_sink()
1720 gst_play_bin3_set_stream_combiner (GstPlayBin3 * playbin, GstElement ** elem, in gst_play_bin3_set_stream_combiner() argument
1723 GST_INFO_OBJECT (playbin, "Setting %s stream combiner to %" GST_PTR_FORMAT, in gst_play_bin3_set_stream_combiner()
1726 GST_PLAY_BIN3_LOCK (playbin); in gst_play_bin3_set_stream_combiner()
1738 GST_LOG_OBJECT (playbin, "%s stream combiner now %" GST_PTR_FORMAT, dbg, in gst_play_bin3_set_stream_combiner()
1740 GST_PLAY_BIN3_UNLOCK (playbin); in gst_play_bin3_set_stream_combiner()
1744 gst_play_bin3_set_encoding (GstPlayBin3 * playbin, const gchar * encoding) in gst_play_bin3_set_encoding() argument
1746 GST_PLAY_BIN3_LOCK (playbin); in gst_play_bin3_set_encoding()
1747 gst_play_sink_set_subtitle_encoding (playbin->playsink, encoding); in gst_play_bin3_set_encoding()
1748 GST_PLAY_BIN3_UNLOCK (playbin); in gst_play_bin3_set_encoding()
1755 GstPlayBin3 *playbin = GST_PLAY_BIN3 (object); in gst_play_bin3_set_property() local
1759 gst_play_bin3_set_uri (playbin, g_value_get_string (value)); in gst_play_bin3_set_property()
1762 gst_play_bin3_set_suburi (playbin, g_value_get_string (value)); in gst_play_bin3_set_property()
1765 gst_play_bin3_set_flags (playbin, g_value_get_flags (value)); in gst_play_bin3_set_property()
1766 if (playbin->curr_group) { in gst_play_bin3_set_property()
1767 GST_SOURCE_GROUP_LOCK (playbin->curr_group); in gst_play_bin3_set_property()
1768 if (playbin->curr_group->uridecodebin) { in gst_play_bin3_set_property()
1769 g_object_set (playbin->curr_group->uridecodebin, "download", in gst_play_bin3_set_property()
1772 GST_SOURCE_GROUP_UNLOCK (playbin->curr_group); in gst_play_bin3_set_property()
1776 gst_play_bin3_set_encoding (playbin, g_value_get_string (value)); in gst_play_bin3_set_property()
1779 gst_play_sink_set_filter (playbin->playsink, GST_PLAY_SINK_TYPE_VIDEO, in gst_play_bin3_set_property()
1783 gst_play_sink_set_filter (playbin->playsink, GST_PLAY_SINK_TYPE_AUDIO, in gst_play_bin3_set_property()
1787 gst_play_bin3_set_sink (playbin, GST_PLAY_SINK_TYPE_VIDEO, "video", in gst_play_bin3_set_property()
1788 &playbin->video_sink, g_value_get_object (value)); in gst_play_bin3_set_property()
1791 gst_play_bin3_set_sink (playbin, GST_PLAY_SINK_TYPE_AUDIO, "audio", in gst_play_bin3_set_property()
1792 &playbin->audio_sink, g_value_get_object (value)); in gst_play_bin3_set_property()
1795 gst_play_sink_set_vis_plugin (playbin->playsink, in gst_play_bin3_set_property()
1799 gst_play_bin3_set_sink (playbin, GST_PLAY_SINK_TYPE_TEXT, "text", in gst_play_bin3_set_property()
1800 &playbin->text_sink, g_value_get_object (value)); in gst_play_bin3_set_property()
1803 gst_play_bin3_set_stream_combiner (playbin, in gst_play_bin3_set_property()
1804 &playbin->video_stream_combiner, "video", g_value_get_object (value)); in gst_play_bin3_set_property()
1807 gst_play_bin3_set_stream_combiner (playbin, in gst_play_bin3_set_property()
1808 &playbin->audio_stream_combiner, "audio", g_value_get_object (value)); in gst_play_bin3_set_property()
1811 gst_play_bin3_set_stream_combiner (playbin, in gst_play_bin3_set_property()
1812 &playbin->text_stream_combiner, "text", g_value_get_object (value)); in gst_play_bin3_set_property()
1815 gst_play_sink_set_volume (playbin->playsink, g_value_get_double (value)); in gst_play_bin3_set_property()
1818 gst_play_sink_set_mute (playbin->playsink, g_value_get_boolean (value)); in gst_play_bin3_set_property()
1821 gst_play_sink_set_font_desc (playbin->playsink, in gst_play_bin3_set_property()
1825 GST_PLAY_BIN3_LOCK (playbin); in gst_play_bin3_set_property()
1826 playbin->connection_speed = g_value_get_uint64 (value) * 1000; in gst_play_bin3_set_property()
1827 GST_PLAY_BIN3_UNLOCK (playbin); in gst_play_bin3_set_property()
1830 playbin->buffer_size = g_value_get_int (value); in gst_play_bin3_set_property()
1833 playbin->buffer_duration = g_value_get_int64 (value); in gst_play_bin3_set_property()
1836 gst_play_sink_set_av_offset (playbin->playsink, in gst_play_bin3_set_property()
1840 gst_play_sink_set_text_offset (playbin->playsink, in gst_play_bin3_set_property()
1844 playbin->ring_buffer_max_size = g_value_get_uint64 (value); in gst_play_bin3_set_property()
1845 if (playbin->curr_group) { in gst_play_bin3_set_property()
1846 GST_SOURCE_GROUP_LOCK (playbin->curr_group); in gst_play_bin3_set_property()
1847 if (playbin->curr_group->uridecodebin) { in gst_play_bin3_set_property()
1848 g_object_set (playbin->curr_group->uridecodebin, in gst_play_bin3_set_property()
1849 "ring-buffer-max-size", playbin->ring_buffer_max_size, NULL); in gst_play_bin3_set_property()
1851 GST_SOURCE_GROUP_UNLOCK (playbin->curr_group); in gst_play_bin3_set_property()
1855 g_object_set (playbin->playsink, "force-aspect-ratio", in gst_play_bin3_set_property()
1859 GST_PLAY_BIN3_LOCK (playbin); in gst_play_bin3_set_property()
1860 playbin->multiview_mode = g_value_get_enum (value); in gst_play_bin3_set_property()
1861 GST_PLAY_BIN3_UNLOCK (playbin); in gst_play_bin3_set_property()
1864 GST_PLAY_BIN3_LOCK (playbin); in gst_play_bin3_set_property()
1865 playbin->multiview_flags = g_value_get_flags (value); in gst_play_bin3_set_property()
1866 GST_PLAY_BIN3_UNLOCK (playbin); in gst_play_bin3_set_property()
1875 gst_play_bin3_get_current_sink (GstPlayBin3 * playbin, GstElement ** elem, in gst_play_bin3_get_current_sink() argument
1878 GstElement *sink = gst_play_sink_get_sink (playbin->playsink, type); in gst_play_bin3_get_current_sink()
1880 GST_LOG_OBJECT (playbin, "play_sink_get_sink() returned %s sink %" in gst_play_bin3_get_current_sink()
1885 GST_PLAY_BIN3_LOCK (playbin); in gst_play_bin3_get_current_sink()
1888 GST_PLAY_BIN3_UNLOCK (playbin); in gst_play_bin3_get_current_sink()
1895 gst_play_bin3_get_current_stream_combiner (GstPlayBin3 * playbin, in gst_play_bin3_get_current_stream_combiner() argument
1900 GST_PLAY_BIN3_LOCK (playbin); in gst_play_bin3_get_current_stream_combiner()
1902 if (playbin->combiner[stream_type].is_concat) in gst_play_bin3_get_current_stream_combiner()
1904 else if ((combiner = playbin->combiner[stream_type].combiner)) in gst_play_bin3_get_current_stream_combiner()
1908 GST_PLAY_BIN3_UNLOCK (playbin); in gst_play_bin3_get_current_stream_combiner()
1917 GstPlayBin3 *playbin = GST_PLAY_BIN3 (object); in gst_play_bin3_get_property() local
1924 GST_PLAY_BIN3_LOCK (playbin); in gst_play_bin3_get_property()
1925 group = playbin->next_group; in gst_play_bin3_get_property()
1927 GST_PLAY_BIN3_UNLOCK (playbin); in gst_play_bin3_get_property()
1934 GST_PLAY_BIN3_LOCK (playbin); in gst_play_bin3_get_property()
1935 group = get_group (playbin); in gst_play_bin3_get_property()
1937 GST_PLAY_BIN3_UNLOCK (playbin); in gst_play_bin3_get_property()
1944 GST_PLAY_BIN3_LOCK (playbin); in gst_play_bin3_get_property()
1945 group = playbin->next_group; in gst_play_bin3_get_property()
1947 GST_PLAY_BIN3_UNLOCK (playbin); in gst_play_bin3_get_property()
1954 GST_PLAY_BIN3_LOCK (playbin); in gst_play_bin3_get_property()
1955 group = get_group (playbin); in gst_play_bin3_get_property()
1957 GST_PLAY_BIN3_UNLOCK (playbin); in gst_play_bin3_get_property()
1961 g_value_set_flags (value, gst_play_bin3_get_flags (playbin)); in gst_play_bin3_get_property()
1964 GST_PLAY_BIN3_LOCK (playbin); in gst_play_bin3_get_property()
1966 gst_play_sink_get_subtitle_encoding (playbin->playsink)); in gst_play_bin3_get_property()
1967 GST_PLAY_BIN3_UNLOCK (playbin); in gst_play_bin3_get_property()
1971 gst_play_sink_get_filter (playbin->playsink, in gst_play_bin3_get_property()
1976 gst_play_sink_get_filter (playbin->playsink, in gst_play_bin3_get_property()
1981 gst_play_bin3_get_current_sink (playbin, &playbin->video_sink, in gst_play_bin3_get_property()
1986 gst_play_bin3_get_current_sink (playbin, &playbin->audio_sink, in gst_play_bin3_get_property()
1991 gst_play_sink_get_vis_plugin (playbin->playsink)); in gst_play_bin3_get_property()
1995 gst_play_bin3_get_current_sink (playbin, &playbin->text_sink, in gst_play_bin3_get_property()
2000 gst_play_bin3_get_current_stream_combiner (playbin, in gst_play_bin3_get_property()
2001 &playbin->video_stream_combiner, "video", PLAYBIN_STREAM_VIDEO)); in gst_play_bin3_get_property()
2005 gst_play_bin3_get_current_stream_combiner (playbin, in gst_play_bin3_get_property()
2006 &playbin->audio_stream_combiner, "audio", PLAYBIN_STREAM_AUDIO)); in gst_play_bin3_get_property()
2010 gst_play_bin3_get_current_stream_combiner (playbin, in gst_play_bin3_get_property()
2011 &playbin->text_stream_combiner, "text", PLAYBIN_STREAM_TEXT)); in gst_play_bin3_get_property()
2014 g_value_set_double (value, gst_play_sink_get_volume (playbin->playsink)); in gst_play_bin3_get_property()
2017 g_value_set_boolean (value, gst_play_sink_get_mute (playbin->playsink)); in gst_play_bin3_get_property()
2021 gst_play_sink_get_last_sample (playbin->playsink)); in gst_play_bin3_get_property()
2025 gst_play_sink_get_font_desc (playbin->playsink)); in gst_play_bin3_get_property()
2028 GST_PLAY_BIN3_LOCK (playbin); in gst_play_bin3_get_property()
2029 g_value_set_uint64 (value, playbin->connection_speed / 1000); in gst_play_bin3_get_property()
2030 GST_PLAY_BIN3_UNLOCK (playbin); in gst_play_bin3_get_property()
2033 GST_OBJECT_LOCK (playbin); in gst_play_bin3_get_property()
2034 g_value_set_int (value, playbin->buffer_size); in gst_play_bin3_get_property()
2035 GST_OBJECT_UNLOCK (playbin); in gst_play_bin3_get_property()
2038 GST_OBJECT_LOCK (playbin); in gst_play_bin3_get_property()
2039 g_value_set_int64 (value, playbin->buffer_duration); in gst_play_bin3_get_property()
2040 GST_OBJECT_UNLOCK (playbin); in gst_play_bin3_get_property()
2044 gst_play_sink_get_av_offset (playbin->playsink)); in gst_play_bin3_get_property()
2048 gst_play_sink_get_text_offset (playbin->playsink)); in gst_play_bin3_get_property()
2051 g_value_set_uint64 (value, playbin->ring_buffer_max_size); in gst_play_bin3_get_property()
2056 g_object_get (playbin->playsink, "force-aspect-ratio", &v, NULL); in gst_play_bin3_get_property()
2061 GST_OBJECT_LOCK (playbin); in gst_play_bin3_get_property()
2062 g_value_set_enum (value, playbin->multiview_mode); in gst_play_bin3_get_property()
2063 GST_OBJECT_UNLOCK (playbin); in gst_play_bin3_get_property()
2066 GST_OBJECT_LOCK (playbin); in gst_play_bin3_get_property()
2067 g_value_set_flags (value, playbin->multiview_flags); in gst_play_bin3_get_property()
2068 GST_OBJECT_UNLOCK (playbin); in gst_play_bin3_get_property()
2077 get_combiner_stream_id (GstPlayBin3 * playbin, GstSourceCombine * combine, in get_combiner_stream_id() argument
2098 extend_list_of_streams (GstPlayBin3 * playbin, GstStreamType stype, in extend_list_of_streams() argument
2121 GST_DEBUG_OBJECT (playbin, "Adding stream %s", sid); in extend_list_of_streams()
2131 update_select_streams_event (GstPlayBin3 * playbin, GstEvent * event, in update_select_streams_event() argument
2138 if (!playbin->audio_stream_combiner && !playbin->video_stream_combiner && in update_select_streams_event()
2139 !playbin->text_stream_combiner) { in update_select_streams_event()
2141 GST_DEBUG_OBJECT (playbin, in update_select_streams_event()
2147 GST_DEBUG_OBJECT (playbin, in update_select_streams_event()
2157 if (playbin->audio_stream_combiner) { in update_select_streams_event()
2159 extend_list_of_streams (playbin, GST_STREAM_TYPE_AUDIO, to_use, in update_select_streams_event()
2162 get_combiner_stream_id (playbin, in update_select_streams_event()
2163 &playbin->combiner[PLAYBIN_STREAM_AUDIO], streams); in update_select_streams_event()
2165 gst_play_bin3_set_current_audio_stream (playbin, combine_id); in update_select_streams_event()
2167 if (playbin->video_stream_combiner) { in update_select_streams_event()
2169 extend_list_of_streams (playbin, GST_STREAM_TYPE_VIDEO, to_use, in update_select_streams_event()
2172 get_combiner_stream_id (playbin, in update_select_streams_event()
2173 &playbin->combiner[PLAYBIN_STREAM_VIDEO], streams); in update_select_streams_event()
2175 gst_play_bin3_set_current_video_stream (playbin, combine_id); in update_select_streams_event()
2177 if (playbin->text_stream_combiner) { in update_select_streams_event()
2179 extend_list_of_streams (playbin, GST_STREAM_TYPE_TEXT, to_use, in update_select_streams_event()
2182 get_combiner_stream_id (playbin, in update_select_streams_event()
2183 &playbin->combiner[PLAYBIN_STREAM_TEXT], streams); in update_select_streams_event()
2185 gst_play_bin3_set_current_text_stream (playbin, combine_id); in update_select_streams_event()
2231 get_source_group_for_streams (GstPlayBin3 * playbin, GstEvent * event) in get_source_group_for_streams() argument
2237 if (playbin->curr_group->collection && in get_source_group_for_streams()
2239 playbin->curr_group->collection)) in get_source_group_for_streams()
2240 res = playbin->curr_group; in get_source_group_for_streams()
2241 else if (playbin->next_group->collection && in get_source_group_for_streams()
2243 playbin->next_group->collection)) in get_source_group_for_streams()
2244 res = playbin->next_group; in get_source_group_for_streams()
2253 GstPlayBin3 *playbin = GST_PLAY_BIN3 (element); in gst_play_bin3_send_event() local
2259 GST_PLAY_BIN3_LOCK (playbin); in gst_play_bin3_send_event()
2260 GST_LOG_OBJECT (playbin, in gst_play_bin3_send_event()
2263 playbin->do_stream_selections = FALSE; in gst_play_bin3_send_event()
2265 group = get_source_group_for_streams (playbin, event); in gst_play_bin3_send_event()
2267 GST_WARNING_OBJECT (playbin, in gst_play_bin3_send_event()
2269 GST_PLAY_BIN3_UNLOCK (playbin); in gst_play_bin3_send_event()
2276 event = update_select_streams_event (playbin, event, group); in gst_play_bin3_send_event()
2284 GST_PLAY_BIN3_UNLOCK (playbin); in gst_play_bin3_send_event()
2299 return gst_element_send_event (GST_ELEMENT_CAST (playbin->playsink), event); in gst_play_bin3_send_event()
2307 do_stream_selection (GstPlayBin3 * playbin, GstSourceGroup * group) in do_stream_selection() argument
2320 GST_LOG_OBJECT (playbin, "No stream collection. Not doing stream-select"); in do_stream_selection()
2326 GST_INFO_OBJECT (playbin, "Empty collection received! Ignoring"); in do_stream_selection()
2329 GST_DEBUG_OBJECT (playbin, "Doing selection on collection with %d streams", in do_stream_selection()
2342 GST_LOG_OBJECT (playbin, "Looking at stream #%d : %s", i, stream_id); in do_stream_selection()
2348 (nb_audio == playbin->current_audio || in do_stream_selection()
2349 (playbin->current_audio == -1 && nb_audio == 0) || in do_stream_selection()
2350 playbin->audio_stream_combiner != NULL); in do_stream_selection()
2355 (nb_video == playbin->current_video || in do_stream_selection()
2356 (playbin->current_video == -1 && nb_video == 0) || in do_stream_selection()
2357 playbin->video_stream_combiner != NULL); in do_stream_selection()
2362 (nb_text == playbin->current_text || in do_stream_selection()
2363 (playbin->current_text == -1 && nb_text == 0) || in do_stream_selection()
2364 playbin->text_stream_combiner != NULL); in do_stream_selection()
2368 GST_DEBUG_OBJECT (playbin, in do_stream_selection()
2374 GST_DEBUG_OBJECT (playbin, "Selecting stream %s of type %s", in do_stream_selection()
2377 if (playbin->do_stream_selections) in do_stream_selection()
2393 playbin->selected_stream_types = in do_stream_selection()
2394 playbin->groups[0].selected_stream_types | playbin->groups[1]. in do_stream_selection()
2396 if (playbin->active_stream_types != playbin->selected_stream_types) in do_stream_selection()
2397 reconfigure_output (playbin); in do_stream_selection()
2403 find_source_group_owner (GstPlayBin3 * playbin, GstObject * element) in find_source_group_owner() argument
2405 if (playbin->curr_group->uridecodebin in find_source_group_owner()
2407 GST_OBJECT_CAST (playbin->curr_group->uridecodebin))) in find_source_group_owner()
2408 return playbin->curr_group; in find_source_group_owner()
2409 if (playbin->next_group->uridecodebin in find_source_group_owner()
2411 GST_OBJECT_CAST (playbin->next_group->uridecodebin))) in find_source_group_owner()
2412 return playbin->next_group; in find_source_group_owner()
2419 GstPlayBin3 *playbin = GST_PLAY_BIN3 (bin); in gst_play_bin3_handle_message() local
2436 GST_PLAY_BIN3_LOCK (playbin); in gst_play_bin3_handle_message()
2437 if (playbin->groups[0].group_id == group_id) { in gst_play_bin3_handle_message()
2438 group = &playbin->groups[0]; in gst_play_bin3_handle_message()
2439 other_group = &playbin->groups[1]; in gst_play_bin3_handle_message()
2440 } else if (playbin->groups[1].group_id == group_id) { in gst_play_bin3_handle_message()
2441 group = &playbin->groups[1]; in gst_play_bin3_handle_message()
2442 other_group = &playbin->groups[0]; in gst_play_bin3_handle_message()
2447 GST_PLAY_BIN3_UNLOCK (playbin); in gst_play_bin3_handle_message()
2451 debug_groups (playbin); in gst_play_bin3_handle_message()
2454 playbin->curr_group = group; in gst_play_bin3_handle_message()
2455 playbin->next_group = other_group; in gst_play_bin3_handle_message()
2461 g_mutex_lock (&playbin->buffering_post_lock); in gst_play_bin3_handle_message()
2477 debug_groups (playbin); in gst_play_bin3_handle_message()
2478 GST_PLAY_BIN3_UNLOCK (playbin); in gst_play_bin3_handle_message()
2480 gst_play_bin3_check_group_status (playbin); in gst_play_bin3_handle_message()
2488 g_mutex_unlock (&playbin->buffering_post_lock); in gst_play_bin3_handle_message()
2494 GST_PLAY_BIN3_LOCK (playbin); in gst_play_bin3_handle_message()
2495 group = find_source_group_owner (playbin, msg->src); in gst_play_bin3_handle_message()
2497 g_mutex_lock (&playbin->buffering_post_lock); in gst_play_bin3_handle_message()
2500 GST_PLAY_BIN3_UNLOCK (playbin); in gst_play_bin3_handle_message()
2503 GST_DEBUG_OBJECT (playbin, in gst_play_bin3_handle_message()
2519 g_mutex_unlock (&playbin->buffering_post_lock); in gst_play_bin3_handle_message()
2521 GST_PLAY_BIN3_UNLOCK (playbin); in gst_play_bin3_handle_message()
2529 gboolean pstate = playbin->do_stream_selections; in gst_play_bin3_handle_message()
2532 GST_PLAY_BIN3_LOCK (playbin); in gst_play_bin3_handle_message()
2533 GST_DEBUG_OBJECT (playbin, in gst_play_bin3_handle_message()
2536 target_group = find_source_group_owner (playbin, msg->src); in gst_play_bin3_handle_message()
2541 if (target_group == playbin->curr_group) in gst_play_bin3_handle_message()
2542 update_combiner_info (playbin, target_group->collection); in gst_play_bin3_handle_message()
2544 playbin->do_stream_selections = FALSE; in gst_play_bin3_handle_message()
2545 do_stream_selection (playbin, target_group); in gst_play_bin3_handle_message()
2547 playbin->do_stream_selections = TRUE; in gst_play_bin3_handle_message()
2548 GST_PLAY_BIN3_UNLOCK (playbin); in gst_play_bin3_handle_message()
2553 if (playbin->is_live && GST_STATE_TARGET (playbin) == GST_STATE_PLAYING) { in gst_play_bin3_handle_message()
2559 GST_PLAY_BIN3_LOCK (playbin); in gst_play_bin3_handle_message()
2561 target_group = find_source_group_owner (playbin, msg->src); in gst_play_bin3_handle_message()
2572 playbin->selected_stream_types = in gst_play_bin3_handle_message()
2573 playbin->groups[0].selected_stream_types | playbin->groups[1]. in gst_play_bin3_handle_message()
2575 if (playbin->active_stream_types != playbin->selected_stream_types) { in gst_play_bin3_handle_message()
2576 GST_DEBUG_OBJECT (playbin, in gst_play_bin3_handle_message()
2578 reconfigure_output (playbin); in gst_play_bin3_handle_message()
2581 GST_PLAY_BIN3_UNLOCK (playbin); in gst_play_bin3_handle_message()
2590 gst_element_change_state (GST_ELEMENT (playbin), in gst_play_bin3_handle_message()
2596 gst_play_bin3_deep_element_added (GstBin * playbin, GstBin * sub_bin, in gst_play_bin3_deep_element_added() argument
2599 GST_LOG_OBJECT (playbin, "element %" GST_PTR_FORMAT " was added to " in gst_play_bin3_deep_element_added()
2602 g_signal_emit (playbin, gst_play_bin3_signals[SIGNAL_ELEMENT_SETUP], 0, in gst_play_bin3_deep_element_added()
2605 GST_BIN_CLASS (parent_class)->deep_element_added (playbin, sub_bin, child); in gst_play_bin3_deep_element_added()
2610 get_current_stream_number (GstPlayBin3 * playbin, GstSourceCombine * combine, in get_current_stream_number() argument
2620 GST_WARNING_OBJECT (playbin, in get_current_stream_number()
2647 GstPlayBin3 * playbin) in combiner_active_pad_changed() argument
2653 GST_PLAY_BIN3_LOCK (playbin); in combiner_active_pad_changed()
2656 if (combiner == G_OBJECT (playbin->combiner[i].combiner)) { in combiner_active_pad_changed()
2657 combine = &playbin->combiner[i]; in combiner_active_pad_changed()
2658 channels = playbin->channels[i]; in combiner_active_pad_changed()
2664 GST_PLAY_BIN3_UNLOCK (playbin); in combiner_active_pad_changed()
2670 playbin->current_video = get_current_stream_number (playbin, in combiner_active_pad_changed()
2673 if (playbin->video_pending_flush_finish) { in combiner_active_pad_changed()
2674 playbin->video_pending_flush_finish = FALSE; in combiner_active_pad_changed()
2675 GST_PLAY_BIN3_UNLOCK (playbin); in combiner_active_pad_changed()
2681 playbin->current_audio = get_current_stream_number (playbin, in combiner_active_pad_changed()
2684 if (playbin->audio_pending_flush_finish) { in combiner_active_pad_changed()
2685 playbin->audio_pending_flush_finish = FALSE; in combiner_active_pad_changed()
2686 GST_PLAY_BIN3_UNLOCK (playbin); in combiner_active_pad_changed()
2692 playbin->current_text = get_current_stream_number (playbin, in combiner_active_pad_changed()
2695 if (playbin->text_pending_flush_finish) { in combiner_active_pad_changed()
2696 playbin->text_pending_flush_finish = FALSE; in combiner_active_pad_changed()
2697 GST_PLAY_BIN3_UNLOCK (playbin); in combiner_active_pad_changed()
2705 GST_PLAY_BIN3_UNLOCK (playbin); in combiner_active_pad_changed()
2709 update_video_multiview_caps (GstPlayBin3 * playbin, GstCaps * caps) in update_video_multiview_caps() argument
2718 GST_OBJECT_LOCK (playbin); in update_video_multiview_caps()
2719 mv_mode = (GstVideoMultiviewMode) playbin->multiview_mode; in update_video_multiview_caps()
2720 mv_flags = playbin->multiview_flags; in update_video_multiview_caps()
2721 GST_OBJECT_UNLOCK (playbin); in update_video_multiview_caps()
2738 GST_INFO_OBJECT (playbin, "Cannot override existing multiview mode"); in update_video_multiview_caps()
2755 emit_about_to_finish (GstPlayBin3 * playbin) in emit_about_to_finish() argument
2757 GST_DEBUG_OBJECT (playbin, "Emitting about-to-finish"); in emit_about_to_finish()
2760 g_signal_emit (G_OBJECT (playbin), in emit_about_to_finish()
2763 debug_groups (playbin); in emit_about_to_finish()
2767 setup_next_source (playbin); in emit_about_to_finish()
2788 GstPlayBin3 *playbin = group->playbin; in _decodebin_event_probe() local
2802 caps = update_video_multiview_caps (playbin, caps); in _decodebin_event_probe()
2849 remove_combiner (GstPlayBin3 * playbin, GstSourceCombine * combine) in remove_combiner() argument
2854 GST_DEBUG_OBJECT (playbin, "No combiner element to remove"); in remove_combiner()
2868 gst_bin_remove (GST_BIN_CAST (playbin), combine->combiner); in remove_combiner()
2875 create_combiner (GstPlayBin3 * playbin, GstSourceCombine * combine) in create_combiner() argument
2880 GST_WARNING_OBJECT (playbin, "Combiner element already exists!"); in create_combiner()
2885 custom_combiner = playbin->video_stream_combiner; in create_combiner()
2887 custom_combiner = playbin->audio_stream_combiner; in create_combiner()
2889 custom_combiner = playbin->text_stream_combiner; in create_combiner()
2895 GST_DEBUG_OBJECT (playbin, in create_combiner()
2916 G_CALLBACK (combiner_active_pad_changed), playbin); in create_combiner()
2919 GST_DEBUG_OBJECT (playbin, "adding new stream combiner %" GST_PTR_FORMAT, in create_combiner()
2921 gst_bin_add (GST_BIN_CAST (playbin), combine->combiner); in create_combiner()
2926 combiner_control_pad (GstPlayBin3 * playbin, GstSourceCombine * combine, in combiner_control_pad() argument
2931 GST_DEBUG_OBJECT (playbin, "srcpad %" GST_PTR_FORMAT, srcpad); in combiner_control_pad()
2940 GST_DEBUG_OBJECT (playbin, "Got new combiner pad %" GST_PTR_FORMAT, in combiner_control_pad()
2944 GST_DEBUG_OBJECT (playbin, "pad %" GST_PTR_FORMAT " added to array", in combiner_control_pad()
2952 GST_DEBUG_OBJECT (playbin, in combiner_control_pad()
2957 GST_LOG_OBJECT (playbin, "combine->sinkpad:%" GST_PTR_FORMAT, in combiner_control_pad()
2964 GST_DEBUG_OBJECT (playbin, "Linking new pad straight to playsink"); in combiner_control_pad()
2975 GST_ELEMENT_ERROR (playbin, CORE, PAD, in combiner_control_pad()
2982 GST_ELEMENT_ERROR (playbin, CORE, PAD, in combiner_control_pad()
2987 GST_ELEMENT_ERROR (playbin, CORE, PAD, in combiner_control_pad()
2993 GST_ELEMENT_ERROR (playbin, CORE, PAD, in combiner_control_pad()
3000 combiner_release_pad (GstPlayBin3 * playbin, GstSourceCombine * combine, in combiner_release_pad() argument
3007 GST_DEBUG_OBJECT (playbin, "Removing combiner pad %" GST_PTR_FORMAT, in combiner_release_pad()
3017 GST_DEBUG_OBJECT (playbin, "Unlinking pad from playsink sinkpad"); in combiner_release_pad()
3025 release_source_pad (GstPlayBin3 * playbin, GstSourceGroup * group, GstPad * pad) in release_source_pad() argument
3033 GST_DEBUG_OBJECT (playbin, "Not a pad controlled by us ?"); in release_source_pad()
3063 GstPlayBin3 *playbin = group->playbin; in pad_added_cb() local
3066 GST_PLAY_BIN3_SHUTDOWN_LOCK (playbin, shutdown); in pad_added_cb()
3070 GST_DEBUG_OBJECT (playbin, "decoded pad %s:%s added", in pad_added_cb()
3091 GST_PLAY_BIN3_SHUTDOWN_UNLOCK (playbin); in pad_added_cb()
3095 GST_PLAY_BIN3_LOCK (playbin); in pad_added_cb()
3096 combine = &playbin->combiner[pb_stream_type]; in pad_added_cb()
3103 selected = playbin->selected_stream_types | cur; in pad_added_cb()
3104 active = playbin->active_stream_types; in pad_added_cb()
3107 GST_DEBUG_OBJECT (playbin, in pad_added_cb()
3110 playbin->selected_stream_types = selected; in pad_added_cb()
3111 reconfigure_output (playbin); in pad_added_cb()
3115 if (g_atomic_int_get (&playbin->shutdown)) { in pad_added_cb()
3116 GST_PLAY_BIN3_UNLOCK (playbin); in pad_added_cb()
3117 GST_PLAY_BIN3_SHUTDOWN_UNLOCK (playbin); in pad_added_cb()
3122 combiner_control_pad (playbin, combine, pad); in pad_added_cb()
3132 emit_about_to_finish (playbin); in pad_added_cb()
3134 GST_PLAY_BIN3_UNLOCK (playbin); in pad_added_cb()
3136 GST_PLAY_BIN3_SHUTDOWN_UNLOCK (playbin); in pad_added_cb()
3142 GST_DEBUG_OBJECT (playbin, "Ignoring pad with unknown type"); in pad_added_cb()
3159 GstPlayBin3 *playbin = group->playbin; in pad_removed_cb() local
3161 GST_DEBUG_OBJECT (playbin, in pad_removed_cb()
3164 GST_PLAY_BIN3_LOCK (playbin); in pad_removed_cb()
3168 combine = &playbin->combiner[PLAYBIN_STREAM_VIDEO]; in pad_removed_cb()
3170 combine = &playbin->combiner[PLAYBIN_STREAM_AUDIO]; in pad_removed_cb()
3172 combine = &playbin->combiner[PLAYBIN_STREAM_TEXT]; in pad_removed_cb()
3176 combiner_release_pad (playbin, combine, pad); in pad_removed_cb()
3177 release_source_pad (playbin, group, pad); in pad_removed_cb()
3180 GST_PLAY_BIN3_UNLOCK (playbin); in pad_removed_cb()
3190 GstPlayBin3 *playbin = group->playbin; in select_stream_cb() local
3193 combiner = playbin->audio_stream_combiner; in select_stream_cb()
3195 combiner = playbin->video_stream_combiner; in select_stream_cb()
3197 combiner = playbin->text_stream_combiner; in select_stream_cb()
3200 GST_DEBUG_OBJECT (playbin, "Got a combiner, requesting stream activation"); in select_stream_cb()
3213 reconfigure_output (GstPlayBin3 * playbin) in reconfigure_output() argument
3218 g_assert (playbin->selected_stream_types != playbin->active_stream_types); in reconfigure_output()
3220 GST_DEBUG_OBJECT (playbin, "selected_stream_types : %" STREAM_TYPES_FORMAT, in reconfigure_output()
3221 STREAM_TYPES_ARGS (playbin->selected_stream_types)); in reconfigure_output()
3222 GST_DEBUG_OBJECT (playbin, "active_stream_types : %" STREAM_TYPES_FORMAT, in reconfigure_output()
3223 STREAM_TYPES_ARGS (playbin->active_stream_types)); in reconfigure_output()
3225 GST_PLAY_BIN3_LOCK (playbin); in reconfigure_output()
3229 GstSourceCombine *combine = &playbin->combiner[i]; in reconfigure_output()
3231 (combine->stream_type & playbin->selected_stream_types) == in reconfigure_output()
3234 (combine->stream_type & playbin->active_stream_types) == in reconfigure_output()
3237 GST_DEBUG_OBJECT (playbin, "Stream type status: '%s' %s %s", in reconfigure_output()
3243 GST_DEBUG_OBJECT (playbin, "Stream type '%s' already active", in reconfigure_output()
3246 GST_DEBUG_OBJECT (playbin, "Stream type '%s' is no longer requested", in reconfigure_output()
3251 GST_LOG_OBJECT (playbin, "Unlinking from sink"); in reconfigure_output()
3260 GST_LOG_OBJECT (playbin, "Releasing playsink pad"); in reconfigure_output()
3261 gst_play_sink_release_pad (playbin->playsink, combine->sinkpad); in reconfigure_output()
3267 GST_FIXME_OBJECT (playbin, "Release combiner"); in reconfigure_output()
3268 remove_combiner (playbin, combine); in reconfigure_output()
3270 GST_DEBUG_OBJECT (playbin, "Stream type '%s' is now requested", in reconfigure_output()
3274 if (g_atomic_int_get (&playbin->shutdown)) in reconfigure_output()
3281 gst_play_sink_request_pad (playbin->playsink, combine->type); in reconfigure_output()
3284 create_combiner (playbin, combine); in reconfigure_output()
3287 GST_DEBUG_OBJECT (playbin, "linked type %s, result: %d", in reconfigure_output()
3290 GST_ELEMENT_ERROR (playbin, CORE, PAD, in reconfigure_output()
3299 playbin->active_stream_types = playbin->selected_stream_types; in reconfigure_output()
3301 GST_PLAY_BIN3_UNLOCK (playbin); in reconfigure_output()
3303 gst_play_sink_reconfigure (playbin->playsink); in reconfigure_output()
3305 do_async_done (playbin); in reconfigure_output()
3307 GST_DEBUG_OBJECT (playbin, "selected_stream_types : %" STREAM_TYPES_FORMAT, in reconfigure_output()
3308 STREAM_TYPES_ARGS (playbin->selected_stream_types)); in reconfigure_output()
3309 GST_DEBUG_OBJECT (playbin, "active_stream_types : %" STREAM_TYPES_FORMAT, in reconfigure_output()
3310 STREAM_TYPES_ARGS (playbin->active_stream_types)); in reconfigure_output()
3318 GstPlayBin3 *playbin = group->playbin; in about_to_finish_cb() local
3319 GST_DEBUG_OBJECT (playbin, "about to finish in group %p", group); in about_to_finish_cb()
3321 GST_LOG_OBJECT (playbin, "selected_stream_types:%" STREAM_TYPES_FORMAT, in about_to_finish_cb()
3323 GST_LOG_OBJECT (playbin, "present_stream_types:%" STREAM_TYPES_FORMAT, in about_to_finish_cb()
3328 GST_LOG_OBJECT (playbin, in about_to_finish_cb()
3332 emit_about_to_finish (playbin); in about_to_finish_cb()
3452 avelements_create (GstPlayBin3 * playbin, gboolean isaudioelement)
3495 gst_play_bin3_get_flags (playbin), isaudioelement);
3623 GstPlayBin3 *playbin;
3635 playbin = group->playbin;
3637 GST_DEBUG_OBJECT (playbin, "factories group %p for %s:%s, %" GST_PTR_FORMAT,
3641 g_mutex_lock (&playbin->elements_lock);
3642 gst_play_bin3_update_elements_list (playbin);
3644 gst_element_factory_list_filter (playbin->elements, caps, GST_PAD_SINK,
3646 g_mutex_unlock (&playbin->elements_lock);
3648 GST_DEBUG_OBJECT (playbin, "found factories %p", factory_list);
3673 ave_list = &playbin->aelements;
3675 ave_list = &playbin->velements;
3677 g_mutex_lock (&playbin->elements_lock);
3680 g_mutex_unlock (&playbin->elements_lock);
3745 GstPlayBin3 * playbin) in activate_sink_bus_handler() argument
3750 if (playbin->audio_sink in activate_sink_bus_handler()
3752 GST_OBJECT_CAST (playbin->audio_sink))) in activate_sink_bus_handler()
3753 gst_element_post_message (GST_ELEMENT_CAST (playbin), msg); in activate_sink_bus_handler()
3754 else if (playbin->video_sink in activate_sink_bus_handler()
3756 GST_OBJECT_CAST (playbin->video_sink))) in activate_sink_bus_handler()
3757 gst_element_post_message (GST_ELEMENT_CAST (playbin), msg); in activate_sink_bus_handler()
3758 else if (playbin->text_sink in activate_sink_bus_handler()
3760 GST_OBJECT_CAST (playbin->text_sink))) in activate_sink_bus_handler()
3761 gst_element_post_message (GST_ELEMENT_CAST (playbin), msg); in activate_sink_bus_handler()
3768 gst_element_set_context (GST_ELEMENT_CAST (playbin), context); in activate_sink_bus_handler()
3770 gst_element_post_message (GST_ELEMENT_CAST (playbin), msg); in activate_sink_bus_handler()
3772 gst_element_post_message (GST_ELEMENT_CAST (playbin), msg); in activate_sink_bus_handler()
3780 activate_sink (GstPlayBin3 * playbin, GstElement * sink, gboolean * activated) in activate_sink() argument
3801 (GstBusSyncHandler) activate_sink_bus_handler, playbin, NULL); in activate_sink()
3841 activate_sink (group->playbin, group->text_sink, &activated_sink)) {
3864 activate_sink (group->playbin, group->audio_sink, &activated_sink)) {
3883 && activate_sink (group->playbin, group->video_sink, &activated_sink)) {
3901 GST_DEBUG_OBJECT (group->playbin,
3909 sink_accepts_caps (GstPlayBin3 * playbin, GstElement * sink, GstCaps * caps)
3934 GstPlayBin3 *playbin;
3944 playbin = group->playbin;
3946 GST_DEBUG_OBJECT (playbin, "select group %p for %s:%s, %" GST_PTR_FORMAT,
3949 GST_DEBUG_OBJECT (playbin, "checking factory %s", GST_OBJECT_NAME (factory));
3967 g_mutex_lock (&playbin->elements_lock);
3970 ave_seq = playbin->aelements;
3973 ave_seq = playbin->velements;
4015 GST_DEBUG_OBJECT (playbin,
4020 GST_WARNING_OBJECT (playbin,
4025 if (!activate_sink (playbin, *sinkp, NULL)) {
4028 GST_WARNING_OBJECT (playbin,
4051 GstPlayFlags flags = gst_play_bin3_get_flags (playbin);
4088 GST_DEBUG_OBJECT (playbin, "%s not compatible with the fixed sink",
4098 g_mutex_unlock (&playbin->elements_lock);
4105 g_mutex_unlock (&playbin->elements_lock);
4111 GST_DEBUG_OBJECT (playbin, "we found a sink '%s'", GST_OBJECT_NAME (factory));
4118 GST_DEBUG_OBJECT (playbin, "we found an audio sink");
4122 GST_DEBUG_OBJECT (playbin, "we found a video sink");
4127 GST_WARNING_OBJECT (playbin, "unknown sink klass %s found", klass);
4133 if (gst_play_sink_get_flags (playbin->playsink) & GST_PLAY_FLAG_VIS) {
4135 GST_DEBUG_OBJECT (playbin, "skip audio sink because of vis");
4145 if (sink_accepts_caps (playbin, sink, caps)) {
4146 GST_DEBUG_OBJECT (playbin,
4153 GST_DEBUG_OBJECT (playbin,
4161 GST_DEBUG_OBJECT (playbin, "we have no pending sink, try to create '%s'",
4165 GST_WARNING_OBJECT (playbin, "Could not create an element from %s",
4173 if (!activate_sink (playbin, element, NULL)) {
4174 GST_WARNING_OBJECT (playbin, "Could not activate sink %s",
4184 if (!sink_accepts_caps (playbin, element, caps)) {
4197 GST_DEBUG_OBJECT (playbin, "remember sink");
4203 GST_DEBUG_OBJECT (playbin, "we found a working sink, expose pad");
4286 if ((sink = group->playbin->text_sink)) {
4416 if ((sink = group->playbin->text_sink)) {
4451 group_set_locked_state_unlocked (GstPlayBin3 * playbin, GstSourceGroup * group, in group_set_locked_state_unlocked() argument
4454 GST_DEBUG_OBJECT (playbin, "locked_state %d on group %p", locked, group); in group_set_locked_state_unlocked()
4463 make_or_reuse_element (GstPlayBin3 * playbin, const gchar * name, in make_or_reuse_element() argument
4467 GST_DEBUG_OBJECT (playbin, "reusing existing %s", name); in make_or_reuse_element()
4475 GST_DEBUG_OBJECT (playbin, "making new %s", name); in make_or_reuse_element()
4482 if (GST_OBJECT_PARENT (*elem) != GST_OBJECT_CAST (playbin)) in make_or_reuse_element()
4483 gst_bin_add (GST_BIN_CAST (playbin), *elem); in make_or_reuse_element()
4492 g_signal_emit (group->playbin, gst_play_bin3_signals[SIGNAL_SOURCE_SETUP], 0, in source_setup_cb()
4498 activate_group (GstPlayBin3 * playbin, GstSourceGroup * group) in activate_group() argument
4510 GST_DEBUG_OBJECT (playbin, "activating group %p", group); in activate_group()
4515 if (playbin->audio_sink) in activate_group()
4516 group->audio_sink = gst_object_ref (playbin->audio_sink); in activate_group()
4519 gst_play_sink_get_sink (playbin->playsink, GST_PLAY_SINK_TYPE_AUDIO); in activate_group()
4522 if (!activate_sink (playbin, group->audio_sink, &audio_sink_activated)) { in activate_group()
4523 if (group->audio_sink == playbin->audio_sink) { in activate_group()
4532 if (playbin->video_sink) in activate_group()
4533 group->video_sink = gst_object_ref (playbin->video_sink); in activate_group()
4536 gst_play_sink_get_sink (playbin->playsink, GST_PLAY_SINK_TYPE_VIDEO); in activate_group()
4539 if (!activate_sink (playbin, group->video_sink, &video_sink_activated)) { in activate_group()
4540 if (group->video_sink == playbin->video_sink) { in activate_group()
4549 if (playbin->text_sink) in activate_group()
4550 group->text_sink = gst_object_ref (playbin->text_sink); in activate_group()
4553 gst_play_sink_get_sink (playbin->playsink, GST_PLAY_SINK_TYPE_TEXT); in activate_group()
4556 if (!activate_sink (playbin, group->text_sink, &text_sink_activated)) { in activate_group()
4557 if (group->text_sink == playbin->text_sink) { in activate_group()
4567 if (!make_or_reuse_element (playbin, "uridecodebin3", &group->uridecodebin)) in activate_group()
4571 flags = gst_play_sink_get_flags (playbin->playsink); in activate_group()
4575 "connection-speed", playbin->connection_speed / 1000, in activate_group()
4583 "buffer-duration", playbin->buffer_duration, in activate_group()
4584 "buffer-size", playbin->buffer_size, in activate_group()
4585 "ring-buffer-max-size", playbin->ring_buffer_max_size, NULL); in activate_group()
4614 group_set_locked_state_unlocked (playbin, group, FALSE); in activate_group()
4627 gst_missing_element_message_new (GST_ELEMENT_CAST (playbin), in activate_group()
4629 gst_element_post_message (GST_ELEMENT_CAST (playbin), msg); in activate_group()
4631 GST_ELEMENT_ERROR (playbin, CORE, MISSING_PLUGIN, in activate_group()
4640 GST_DEBUG_OBJECT (playbin, "failed state change of uridecodebin"); in activate_group()
4646 GST_ERROR_OBJECT (playbin, "failed to activate sinks"); in activate_group()
4693 gst_bin_remove (GST_BIN_CAST (playbin), uridecodebin); in activate_group()
4705 deactivate_group (GstPlayBin3 * playbin, GstSourceGroup * group) in deactivate_group() argument
4710 GST_DEBUG_OBJECT (playbin, "unlinking group %p", group); in deactivate_group()
4719 playbin->selected_stream_types = in deactivate_group()
4720 playbin->groups[0].selected_stream_types | playbin->groups[1]. in deactivate_group()
4722 if (playbin->active_stream_types != playbin->selected_stream_types) in deactivate_group()
4723 reconfigure_output (playbin); in deactivate_group()
4730 GST_OBJECT_CAST (playbin->playsink))) { in deactivate_group()
4738 GST_OBJECT_CAST (playbin->playsink))) { in deactivate_group()
4746 GST_OBJECT_CAST (playbin->playsink))) { in deactivate_group()
4759 GST_PLAY_BIN3_UNLOCK (playbin); in deactivate_group()
4761 gst_bin_remove (GST_BIN_CAST (playbin), group->uridecodebin); in deactivate_group()
4762 GST_PLAY_BIN3_LOCK (playbin); in deactivate_group()
4776 GST_DEBUG_OBJECT (playbin, "Done"); in deactivate_group()
4785 setup_next_source (GstPlayBin3 * playbin) in setup_next_source() argument
4790 GST_DEBUG_OBJECT (playbin, "setup next source"); in setup_next_source()
4792 debug_groups (playbin); in setup_next_source()
4795 GST_PLAY_BIN3_LOCK (playbin); in setup_next_source()
4796 new_group = playbin->next_group; in setup_next_source()
4801 state_ret = activate_group (playbin, new_group); in setup_next_source()
4805 GST_PLAY_BIN3_UNLOCK (playbin); in setup_next_source()
4807 debug_groups (playbin); in setup_next_source()
4814 GST_DEBUG_OBJECT (playbin, "no next group"); in setup_next_source()
4815 GST_PLAY_BIN3_UNLOCK (playbin); in setup_next_source()
4821 GST_DEBUG_OBJECT (playbin, "activate failed"); in setup_next_source()
4823 GST_PLAY_BIN3_UNLOCK (playbin); in setup_next_source()
4832 save_current_group (GstPlayBin3 * playbin) in save_current_group() argument
4837 GST_DEBUG_OBJECT (playbin, "save current group"); in save_current_group()
4840 GST_PLAY_BIN3_LOCK (playbin); in save_current_group()
4841 curr_group = playbin->curr_group; in save_current_group()
4846 playbin->curr_group = playbin->next_group; in save_current_group()
4847 playbin->next_group = curr_group; in save_current_group()
4851 deactivate_group (playbin, curr_group); in save_current_group()
4853 GST_PLAY_BIN3_UNLOCK (playbin); in save_current_group()
4861 groups_set_locked_state (GstPlayBin3 * playbin, gboolean locked) in groups_set_locked_state() argument
4863 GST_DEBUG_OBJECT (playbin, "setting locked state to %d on all groups", in groups_set_locked_state()
4866 GST_PLAY_BIN3_LOCK (playbin); in groups_set_locked_state()
4867 GST_SOURCE_GROUP_LOCK (playbin->curr_group); in groups_set_locked_state()
4868 group_set_locked_state_unlocked (playbin, playbin->curr_group, locked); in groups_set_locked_state()
4869 GST_SOURCE_GROUP_UNLOCK (playbin->curr_group); in groups_set_locked_state()
4870 GST_SOURCE_GROUP_LOCK (playbin->next_group); in groups_set_locked_state()
4871 group_set_locked_state_unlocked (playbin, playbin->next_group, locked); in groups_set_locked_state()
4872 GST_SOURCE_GROUP_UNLOCK (playbin->next_group); in groups_set_locked_state()
4873 GST_PLAY_BIN3_UNLOCK (playbin); in groups_set_locked_state()
4879 gst_play_bin3_check_group_status (GstPlayBin3 * playbin) in gst_play_bin3_check_group_status() argument
4881 if (playbin->activation_task) in gst_play_bin3_check_group_status()
4882 gst_task_start (playbin->activation_task); in gst_play_bin3_check_group_status()
4886 gst_play_bin3_activation_thread (GstPlayBin3 * playbin) in gst_play_bin3_activation_thread() argument
4888 GST_DEBUG_OBJECT (playbin, "starting"); in gst_play_bin3_activation_thread()
4890 debug_groups (playbin); in gst_play_bin3_activation_thread()
4893 GST_PLAY_BIN3_LOCK (playbin); in gst_play_bin3_activation_thread()
4894 if (playbin->next_group->active) { in gst_play_bin3_activation_thread()
4895 deactivate_group (playbin, playbin->next_group); in gst_play_bin3_activation_thread()
4896 playbin->next_group->valid = FALSE; in gst_play_bin3_activation_thread()
4900 GST_SOURCE_GROUP_LOCK (playbin->curr_group); in gst_play_bin3_activation_thread()
4901 if (playbin->curr_group->pending_about_to_finish) { in gst_play_bin3_activation_thread()
4902 GST_LOG_OBJECT (playbin, "Propagating about-to-finish"); in gst_play_bin3_activation_thread()
4903 playbin->curr_group->pending_about_to_finish = FALSE; in gst_play_bin3_activation_thread()
4904 GST_SOURCE_GROUP_UNLOCK (playbin->curr_group); in gst_play_bin3_activation_thread()
4906 emit_about_to_finish (playbin); in gst_play_bin3_activation_thread()
4908 GST_SOURCE_GROUP_UNLOCK (playbin->curr_group); in gst_play_bin3_activation_thread()
4910 GST_LOG_OBJECT (playbin, "Pausing task"); in gst_play_bin3_activation_thread()
4911 if (playbin->activation_task) in gst_play_bin3_activation_thread()
4912 gst_task_pause (playbin->activation_task); in gst_play_bin3_activation_thread()
4913 GST_PLAY_BIN3_UNLOCK (playbin); in gst_play_bin3_activation_thread()
4915 GST_DEBUG_OBJECT (playbin, "done"); in gst_play_bin3_activation_thread()
4920 gst_play_bin3_start (GstPlayBin3 * playbin) in gst_play_bin3_start() argument
4922 GST_DEBUG_OBJECT (playbin, "starting"); in gst_play_bin3_start()
4924 GST_PLAY_BIN3_LOCK (playbin); in gst_play_bin3_start()
4926 if (playbin->activation_task == NULL) { in gst_play_bin3_start()
4927 playbin->activation_task = in gst_play_bin3_start()
4929 playbin, NULL); in gst_play_bin3_start()
4930 if (playbin->activation_task == NULL) in gst_play_bin3_start()
4932 gst_task_set_lock (playbin->activation_task, &playbin->activation_lock); in gst_play_bin3_start()
4934 GST_LOG_OBJECT (playbin, "clearing shutdown flag"); in gst_play_bin3_start()
4935 g_atomic_int_set (&playbin->shutdown, 0); in gst_play_bin3_start()
4936 do_async_start (playbin); in gst_play_bin3_start()
4938 GST_PLAY_BIN3_UNLOCK (playbin); in gst_play_bin3_start()
4944 GST_PLAY_BIN3_UNLOCK (playbin); in gst_play_bin3_start()
4945 GST_ERROR_OBJECT (playbin, "Failed to create task"); in gst_play_bin3_start()
4951 gst_play_bin3_stop (GstPlayBin3 * playbin) in gst_play_bin3_stop() argument
4955 GST_DEBUG_OBJECT (playbin, "stopping"); in gst_play_bin3_stop()
4958 GST_LOG_OBJECT (playbin, "setting shutdown flag"); in gst_play_bin3_stop()
4959 g_atomic_int_set (&playbin->shutdown, 1); in gst_play_bin3_stop()
4964 GST_PLAY_BIN3_DYN_LOCK (playbin); in gst_play_bin3_stop()
4965 GST_LOG_OBJECT (playbin, "dynamic lock taken, we can continue shutdown"); in gst_play_bin3_stop()
4966 GST_PLAY_BIN3_DYN_UNLOCK (playbin); in gst_play_bin3_stop()
4969 GST_PLAY_BIN3_LOCK (playbin); in gst_play_bin3_stop()
4970 if ((task = playbin->activation_task)) { in gst_play_bin3_stop()
4971 playbin->activation_task = NULL; in gst_play_bin3_stop()
4972 GST_PLAY_BIN3_UNLOCK (playbin); in gst_play_bin3_stop()
4977 g_rec_mutex_lock (&playbin->activation_lock); in gst_play_bin3_stop()
4978 g_rec_mutex_unlock (&playbin->activation_lock); in gst_play_bin3_stop()
4984 GST_PLAY_BIN3_LOCK (playbin); in gst_play_bin3_stop()
4986 GST_PLAY_BIN3_UNLOCK (playbin); in gst_play_bin3_stop()
4993 GstPlayBin3 *playbin; in gst_play_bin3_change_state() local
4996 playbin = GST_PLAY_BIN3 (element); in gst_play_bin3_change_state()
5000 if (!gst_play_bin3_start (playbin)) in gst_play_bin3_change_state()
5005 gst_play_bin3_stop (playbin); in gst_play_bin3_change_state()
5013 if (!g_atomic_int_get (&playbin->shutdown)) { in gst_play_bin3_change_state()
5019 groups_set_locked_state (playbin, FALSE); in gst_play_bin3_change_state()
5031 if ((ret = setup_next_source (playbin)) == GST_STATE_CHANGE_FAILURE) in gst_play_bin3_change_state()
5038 do_async_done (playbin); in gst_play_bin3_change_state()
5042 playbin->is_live = FALSE; in gst_play_bin3_change_state()
5043 save_current_group (playbin); in gst_play_bin3_change_state()
5051 save_current_group (playbin); in gst_play_bin3_change_state()
5053 GST_PLAY_BIN3_LOCK (playbin); in gst_play_bin3_change_state()
5055 if (playbin->groups[i].active && playbin->groups[i].valid) { in gst_play_bin3_change_state()
5056 deactivate_group (playbin, &playbin->groups[i]); in gst_play_bin3_change_state()
5057 playbin->groups[i].valid = FALSE; in gst_play_bin3_change_state()
5060 if (playbin->groups[i].uridecodebin) { in gst_play_bin3_change_state()
5061 gst_element_set_state (playbin->groups[i].uridecodebin, in gst_play_bin3_change_state()
5063 gst_object_unref (playbin->groups[i].uridecodebin); in gst_play_bin3_change_state()
5064 playbin->groups[i].uridecodebin = NULL; in gst_play_bin3_change_state()
5068 GST_PLAY_BIN3_UNLOCK (playbin); in gst_play_bin3_change_state()
5071 if (playbin->audio_sink) in gst_play_bin3_change_state()
5072 gst_element_set_state (playbin->audio_sink, GST_STATE_NULL); in gst_play_bin3_change_state()
5073 if (playbin->video_sink) in gst_play_bin3_change_state()
5074 gst_element_set_state (playbin->video_sink, GST_STATE_NULL); in gst_play_bin3_change_state()
5075 if (playbin->text_sink) in gst_play_bin3_change_state()
5076 gst_element_set_state (playbin->text_sink, GST_STATE_NULL); in gst_play_bin3_change_state()
5078 if (playbin->video_stream_combiner) in gst_play_bin3_change_state()
5079 gst_element_set_state (playbin->video_stream_combiner, GST_STATE_NULL); in gst_play_bin3_change_state()
5080 if (playbin->audio_stream_combiner) in gst_play_bin3_change_state()
5081 gst_element_set_state (playbin->audio_stream_combiner, GST_STATE_NULL); in gst_play_bin3_change_state()
5082 if (playbin->text_stream_combiner) in gst_play_bin3_change_state()
5083 gst_element_set_state (playbin->text_stream_combiner, GST_STATE_NULL); in gst_play_bin3_change_state()
5087 groups_set_locked_state (playbin, TRUE); in gst_play_bin3_change_state()
5095 playbin->is_live = ret == GST_STATE_CHANGE_NO_PREROLL; in gst_play_bin3_change_state()
5098 do_async_done (playbin); in gst_play_bin3_change_state()
5105 do_async_done (playbin); in gst_play_bin3_change_state()
5110 GST_PLAY_BIN3_LOCK (playbin); in gst_play_bin3_change_state()
5112 curr_group = playbin->curr_group; in gst_play_bin3_change_state()
5116 deactivate_group (playbin, curr_group); in gst_play_bin3_change_state()
5122 playbin->curr_group = playbin->next_group; in gst_play_bin3_change_state()
5123 playbin->next_group = curr_group; in gst_play_bin3_change_state()
5125 GST_PLAY_BIN3_UNLOCK (playbin); in gst_play_bin3_change_state()
5134 GstPlayBin3 *playbin = GST_PLAY_BIN3 (overlay); in gst_play_bin3_overlay_expose() local
5136 gst_video_overlay_expose (GST_VIDEO_OVERLAY (playbin->playsink)); in gst_play_bin3_overlay_expose()
5143 GstPlayBin3 *playbin = GST_PLAY_BIN3 (overlay); in gst_play_bin3_overlay_handle_events() local
5145 gst_video_overlay_handle_events (GST_VIDEO_OVERLAY (playbin->playsink), in gst_play_bin3_overlay_handle_events()
5153 GstPlayBin3 *playbin = GST_PLAY_BIN3 (overlay); in gst_play_bin3_overlay_set_render_rectangle() local
5155 gst_video_overlay_set_render_rectangle (GST_VIDEO_OVERLAY (playbin->playsink), in gst_play_bin3_overlay_set_render_rectangle()
5163 GstPlayBin3 *playbin = GST_PLAY_BIN3 (overlay); in gst_play_bin3_overlay_set_window_handle() local
5165 gst_video_overlay_set_window_handle (GST_VIDEO_OVERLAY (playbin->playsink), in gst_play_bin3_overlay_set_window_handle()
5183 GstPlayBin3 *playbin = GST_PLAY_BIN3 (navigation); in gst_play_bin3_navigation_send_event() local
5185 gst_navigation_send_event (GST_NAVIGATION (playbin->playsink), structure); in gst_play_bin3_navigation_send_event()
5199 GstPlayBin3 *playbin = GST_PLAY_BIN3 (balance); in gst_play_bin3_colorbalance_list_channels() local
5202 gst_color_balance_list_channels (GST_COLOR_BALANCE (playbin->playsink)); in gst_play_bin3_colorbalance_list_channels()
5209 GstPlayBin3 *playbin = GST_PLAY_BIN3 (balance); in gst_play_bin3_colorbalance_set_value() local
5211 gst_color_balance_set_value (GST_COLOR_BALANCE (playbin->playsink), channel, in gst_play_bin3_colorbalance_set_value()
5219 GstPlayBin3 *playbin = GST_PLAY_BIN3 (balance); in gst_play_bin3_colorbalance_get_value() local
5221 return gst_color_balance_get_value (GST_COLOR_BALANCE (playbin->playsink), in gst_play_bin3_colorbalance_get_value()
5228 GstPlayBin3 *playbin = GST_PLAY_BIN3 (balance); in gst_play_bin3_colorbalance_get_balance_type() local
5232 (playbin->playsink)); in gst_play_bin3_colorbalance_get_balance_type()