Lines Matching refs:group
266 #define GST_SOURCE_GROUP_GET_LOCK(group) (&((GstSourceGroup*)(group))->lock) argument
267 #define GST_SOURCE_GROUP_LOCK(group) (g_mutex_lock (GST_SOURCE_GROUP_GET_LOCK(group))) argument
268 #define GST_SOURCE_GROUP_UNLOCK(group) (g_mutex_unlock (GST_SOURCE_GROUP_GET_LOCK(group))) argument
707 static void no_more_pads_cb (GstElement * decodebin, GstSourceGroup * group);
709 GstSourceGroup * group);
713 static void gst_play_bin_suburidecodebin_block (GstSourceGroup * group,
715 static void gst_play_bin_suburidecodebin_seek_to_start (GstSourceGroup * group);
723 static void pad_added_cb (GstElement * decodebin, GstPad * pad, GstSourceGroup * group);
724 … autoplug_continue_cb (GstElement * element, GstPad * pad, GstCaps * caps, GstSourceGroup * group);
726 GstElement * element, GstQuery * query, GstSourceGroup * group);
1540 init_group (GstPlayBin * playbin, GstSourceGroup * group) in init_group() argument
1543 group->video_channels = g_ptr_array_new (); in init_group()
1544 group->audio_channels = g_ptr_array_new (); in init_group()
1545 group->text_channels = g_ptr_array_new (); in init_group()
1546 g_mutex_init (&group->lock); in init_group()
1548 group->stream_changed_pending = FALSE; in init_group()
1549 g_mutex_init (&group->stream_changed_pending_lock); in init_group()
1553 group->playbin = playbin; in init_group()
1557 group->combiner[PLAYBIN_STREAM_AUDIO].media_list[0] = "audio/"; in init_group()
1558 group->combiner[PLAYBIN_STREAM_AUDIO].type = GST_PLAY_SINK_TYPE_AUDIO; in init_group()
1559 group->combiner[PLAYBIN_STREAM_AUDIO].channels = group->audio_channels; in init_group()
1560 group->combiner[PLAYBIN_STREAM_VIDEO].media_list[0] = "video/"; in init_group()
1561 group->combiner[PLAYBIN_STREAM_VIDEO].media_list[1] = "image/"; in init_group()
1562 group->combiner[PLAYBIN_STREAM_VIDEO].type = GST_PLAY_SINK_TYPE_VIDEO; in init_group()
1563 group->combiner[PLAYBIN_STREAM_VIDEO].channels = group->video_channels; in init_group()
1564 group->combiner[PLAYBIN_STREAM_TEXT].media_list[0] = "text/"; in init_group()
1565 group->combiner[PLAYBIN_STREAM_TEXT].media_list[1] = "application/x-subtitle"; in init_group()
1566 group->combiner[PLAYBIN_STREAM_TEXT].media_list[2] = "application/x-ssa"; in init_group()
1567 group->combiner[PLAYBIN_STREAM_TEXT].media_list[3] = "application/x-ass"; in init_group()
1568 group->combiner[PLAYBIN_STREAM_TEXT].media_list[4] = "subpicture/x-dvd"; in init_group()
1569 group->combiner[PLAYBIN_STREAM_TEXT].media_list[5] = "subpicture/"; in init_group()
1570 group->combiner[PLAYBIN_STREAM_TEXT].media_list[6] = "subtitle/"; in init_group()
1571 group->combiner[PLAYBIN_STREAM_TEXT].get_media_caps = in init_group()
1573 group->combiner[PLAYBIN_STREAM_TEXT].type = GST_PLAY_SINK_TYPE_TEXT; in init_group()
1574 group->combiner[PLAYBIN_STREAM_TEXT].channels = group->text_channels; in init_group()
1577 group->suburidecodebin_list = g_slist_alloc (); in init_group()
1582 free_group (GstPlayBin * playbin, GstSourceGroup * group) in free_group() argument
1584 g_free (group->uri); in free_group()
1585 g_free (group->suburi); in free_group()
1586 g_ptr_array_free (group->video_channels, TRUE); in free_group()
1587 g_ptr_array_free (group->audio_channels, TRUE); in free_group()
1588 g_ptr_array_free (group->text_channels, TRUE); in free_group()
1590 g_mutex_clear (&group->lock); in free_group()
1591 if (group->audio_sink) in free_group()
1592 gst_object_unref (group->audio_sink); in free_group()
1593 group->audio_sink = NULL; in free_group()
1594 if (group->video_sink) in free_group()
1595 gst_object_unref (group->video_sink); in free_group()
1596 group->video_sink = NULL; in free_group()
1597 if (group->text_sink) in free_group()
1598 gst_object_unref (group->text_sink); in free_group()
1599 group->text_sink = NULL; in free_group()
1601 group->stream_changed_pending = FALSE; in free_group()
1602 g_mutex_clear (&group->stream_changed_pending_lock); in free_group()
1604 g_slist_free (group->suburi_flushes_to_drop); in free_group()
1605 group->suburi_flushes_to_drop = NULL; in free_group()
1607 if (group->suburi_flushes_to_drop_lock.p) in free_group()
1608 g_mutex_clear (&group->suburi_flushes_to_drop_lock); in free_group()
1609 group->suburi_flushes_to_drop_lock.p = NULL; in free_group()
1611 if (group->pending_buffering_msg) in free_group()
1612 gst_message_unref (group->pending_buffering_msg); in free_group()
1613 group->pending_buffering_msg = NULL; in free_group()
1617 if (group->suburidecodebin_list != NULL) { in free_group()
1618 g_slist_free (group->suburidecodebin_list); in free_group()
1619 group->suburidecodebin_list = NULL; in free_group()
1869 GstSourceGroup *group; in gst_play_bin_set_uri() local
1883 group = playbin->next_group; in gst_play_bin_set_uri()
1885 GST_SOURCE_GROUP_LOCK (group); in gst_play_bin_set_uri()
1887 g_free (group->uri); in gst_play_bin_set_uri()
1889 group->uri = g_strdup (uri); in gst_play_bin_set_uri()
1890 group->valid = TRUE; in gst_play_bin_set_uri()
1892 group->uri = NULL; in gst_play_bin_set_uri()
1893 group->valid = FALSE; in gst_play_bin_set_uri()
1895 GST_SOURCE_GROUP_UNLOCK (group); in gst_play_bin_set_uri()
1904 GstSourceGroup *group; in gst_play_bin_set_suburi() local
1907 group = playbin->next_group; in gst_play_bin_set_suburi()
1909 GST_SOURCE_GROUP_LOCK (group); in gst_play_bin_set_suburi()
1910 g_free (group->suburi); in gst_play_bin_set_suburi()
1911 group->suburi = g_strdup (suburi); in gst_play_bin_set_suburi()
1912 GST_SOURCE_GROUP_UNLOCK (group); in gst_play_bin_set_suburi()
1925 delete_suburidecodebin (const GstSourceGroup * group, const GstElement * suburidecodebin) in delete_suburidecodebin() argument
1929 GstPlayBin *playbin = group->playbin; in delete_suburidecodebin()
1930 g_return_if_fail (group != NULL && suburidecodeinfo != NULL && playbin != NULL); in delete_suburidecodebin()
1932 if (group->suburidecodebin_list != NULL) { in delete_suburidecodebin()
1933 suburidecodebin_list = group->suburidecodebin_list; in delete_suburidecodebin()
1957 (void) g_slist_delete_link (group->suburidecodebin_list, suburidecodebin_list); in delete_suburidecodebin()
1965 gst_play_bin_new_suburidecodeinfo (const GstSourceGroup * group) in gst_play_bin_new_suburidecodeinfo() argument
1968 g_return_val_if_fail (group, NULL); in gst_play_bin_new_suburidecodeinfo()
1971 suburidecodeinfo->sub_pad_added_id = group->sub_pad_added_id; in gst_play_bin_new_suburidecodeinfo()
1972 suburidecodeinfo->sub_pad_removed_id = group->sub_pad_removed_id; in gst_play_bin_new_suburidecodeinfo()
1973 suburidecodeinfo->sub_no_more_pads_id = group->sub_no_more_pads_id; in gst_play_bin_new_suburidecodeinfo()
1974 suburidecodeinfo->sub_autoplug_continue_id = group->sub_autoplug_continue_id; in gst_play_bin_new_suburidecodeinfo()
1975 suburidecodeinfo->sub_autoplug_query_id = group->sub_autoplug_query_id; in gst_play_bin_new_suburidecodeinfo()
1984 gst_play_bin_init_suburidecodebin (GstSourceGroup * group, GstElement * suburidecodebin, const gcha… in gst_play_bin_init_suburidecodebin() argument
1987 group->pending = 1; in gst_play_bin_init_suburidecodebin()
1988 group->sub_pending = TRUE; in gst_play_bin_init_suburidecodebin()
1989 suburidecodeinfo = gst_play_bin_new_suburidecodeinfo (group); in gst_play_bin_init_suburidecodebin()
1993 group->suburidecodebin_list = g_slist_append (group->suburidecodebin_list, suburidecodeinfo); in gst_play_bin_init_suburidecodebin()
1994 if (group->suburidecodebin_list == NULL) { in gst_play_bin_init_suburidecodebin()
2004 if (group->sub_pending) { in gst_play_bin_init_suburidecodebin()
2005 group->pending--; in gst_play_bin_init_suburidecodebin()
2006 group->sub_pending = FALSE; in gst_play_bin_init_suburidecodebin()
2007 delete_suburidecodebin (group, suburidecodebin); in gst_play_bin_init_suburidecodebin()
2017 GstSourceGroup *group = NULL; in gst_play_bin_create_suburidecodebin() local
2024 group = get_group (playbin); in gst_play_bin_create_suburidecodebin()
2028 group->sub_pad_added_id = g_signal_connect (suburidecodebin, in gst_play_bin_create_suburidecodebin()
2029 "pad-added", G_CALLBACK (pad_added_cb), group); in gst_play_bin_create_suburidecodebin()
2030 group->sub_pad_removed_id = g_signal_connect (suburidecodebin, in gst_play_bin_create_suburidecodebin()
2031 "pad-removed", G_CALLBACK (pad_removed_cb), group); in gst_play_bin_create_suburidecodebin()
2032 group->sub_no_more_pads_id = g_signal_connect (suburidecodebin, in gst_play_bin_create_suburidecodebin()
2033 "no-more-pads", G_CALLBACK (no_more_pads_cb), group); in gst_play_bin_create_suburidecodebin()
2034 group->sub_autoplug_continue_id = g_signal_connect (suburidecodebin, in gst_play_bin_create_suburidecodebin()
2035 "autoplug-continue", G_CALLBACK (autoplug_continue_cb), group); in gst_play_bin_create_suburidecodebin()
2036 group->sub_autoplug_query_id = g_signal_connect (suburidecodebin, in gst_play_bin_create_suburidecodebin()
2037 "autoplug-query", G_CALLBACK (autoplug_query_cb), group); in gst_play_bin_create_suburidecodebin()
2039 return gst_play_bin_init_suburidecodebin (group, suburidecodebin, suburi); in gst_play_bin_create_suburidecodebin()
2098 GstSourceGroup *group; in gst_play_bin_get_video_pad() local
2101 group = get_group (playbin); in gst_play_bin_get_video_pad()
2102 if (stream < group->video_channels->len) { in gst_play_bin_get_video_pad()
2103 sinkpad = g_ptr_array_index (group->video_channels, stream); in gst_play_bin_get_video_pad()
2115 GstSourceGroup *group; in gst_play_bin_get_audio_pad() local
2118 group = get_group (playbin); in gst_play_bin_get_audio_pad()
2119 if (stream < group->audio_channels->len) { in gst_play_bin_get_audio_pad()
2120 sinkpad = g_ptr_array_index (group->audio_channels, stream); in gst_play_bin_get_audio_pad()
2132 GstSourceGroup *group; in gst_play_bin_get_text_pad() local
2135 group = get_group (playbin); in gst_play_bin_get_text_pad()
2136 if (stream < group->text_channels->len) { in gst_play_bin_get_text_pad()
2137 sinkpad = g_ptr_array_index (group->text_channels, stream); in gst_play_bin_get_text_pad()
2147 get_tags (GstPlayBin * playbin, GstSourceGroup * group, gint type, gint stream) in get_tags() argument
2155 channels = group->audio_channels; in get_tags()
2158 channels = group->video_channels; in get_tags()
2161 channels = group->text_channels; in get_tags()
2168 if (!channels || stream >= channels->len || !group->combiner[type].has_tags) in get_tags()
2181 GstSourceGroup *group; in gst_play_bin_get_video_tags() local
2184 group = get_group (playbin); in gst_play_bin_get_video_tags()
2185 result = get_tags (playbin, group, PLAYBIN_STREAM_VIDEO, stream); in gst_play_bin_get_video_tags()
2195 GstSourceGroup *group; in gst_play_bin_get_audio_tags() local
2198 group = get_group (playbin); in gst_play_bin_get_audio_tags()
2199 result = get_tags (playbin, group, PLAYBIN_STREAM_AUDIO, stream); in gst_play_bin_get_audio_tags()
2209 GstSourceGroup *group; in gst_play_bin_get_text_tags() local
2212 group = get_group (playbin); in gst_play_bin_get_text_tags()
2213 result = get_tags (playbin, group, PLAYBIN_STREAM_TEXT, stream); in gst_play_bin_get_text_tags()
2287 GstSourceGroup *group; in gst_play_bin_set_current_video_stream() local
2296 group = get_group (playbin); in gst_play_bin_set_current_video_stream()
2297 if (!group->combiner[PLAYBIN_STREAM_VIDEO].has_active_pad) in gst_play_bin_set_current_video_stream()
2299 if (!(channels = group->video_channels)) in gst_play_bin_set_current_video_stream()
2357 GstSourceGroup *group; in gst_play_bin_set_current_audio_stream() local
2366 group = get_group (playbin); in gst_play_bin_set_current_audio_stream()
2367 if (!group->combiner[PLAYBIN_STREAM_AUDIO].has_active_pad) in gst_play_bin_set_current_audio_stream()
2369 if (!(channels = group->audio_channels)) in gst_play_bin_set_current_audio_stream()
2427 gst_play_bin_suburidecodebin_seek_to_start (GstSourceGroup * group) in gst_play_bin_suburidecodebin_seek_to_start() argument
2429 GstElement *suburidecodebin = group->suburidecodebin; in gst_play_bin_suburidecodebin_seek_to_start()
2445 g_mutex_lock (&group->suburi_flushes_to_drop_lock); in gst_play_bin_suburidecodebin_seek_to_start()
2446 group->suburi_flushes_to_drop = in gst_play_bin_suburidecodebin_seek_to_start()
2447 g_slist_append (group->suburi_flushes_to_drop, in gst_play_bin_suburidecodebin_seek_to_start()
2449 g_mutex_unlock (&group->suburi_flushes_to_drop_lock); in gst_play_bin_suburidecodebin_seek_to_start()
2459 g_mutex_lock (&group->suburi_flushes_to_drop_lock); in gst_play_bin_suburidecodebin_seek_to_start()
2460 group->suburi_flushes_to_drop = in gst_play_bin_suburidecodebin_seek_to_start()
2461 g_slist_remove (group->suburi_flushes_to_drop, in gst_play_bin_suburidecodebin_seek_to_start()
2463 g_mutex_unlock (&group->suburi_flushes_to_drop_lock); in gst_play_bin_suburidecodebin_seek_to_start()
2508 gst_play_bin_suburidecodebin_block (GstSourceGroup * group, in gst_play_bin_suburidecodebin_block() argument
2526 group->block_id = in gst_play_bin_suburidecodebin_block()
2529 } else if (group->block_id) { in gst_play_bin_suburidecodebin_block()
2530 gst_pad_remove_probe (sinkpad, group->block_id); in gst_play_bin_suburidecodebin_block()
2531 group->block_id = 0; in gst_play_bin_suburidecodebin_block()
2554 is_subtitle_decodebin (const GstSourceGroup * group, const GstElement * decodebin) in is_subtitle_decodebin() argument
2556 g_return_val_if_fail ((group != NULL) && (decodebin != NULL), FALSE); in is_subtitle_decodebin()
2562 if (group->suburidecodebin_list != NULL) { in is_subtitle_decodebin()
2563 suburidecodebin_list = group->suburidecodebin_list; in is_subtitle_decodebin()
2674 GstSourceGroup *group = get_group (playbin); in check_seek_suburidecodebin() local
2683 need_seek = is_subtitle_decodebin (group, parent_element); in check_seek_suburidecodebin()
2701 GstSourceGroup *group = NULL; in gst_play_bin_set_current_text_stream() local
2708 group = get_group (playbin); in gst_play_bin_set_current_text_stream()
2709 if ((group == NULL) || (!group->combiner[PLAYBIN_STREAM_TEXT].has_active_pad)) { in gst_play_bin_set_current_text_stream()
2712 channels = group->text_channels; in gst_play_bin_set_current_text_stream()
2750 GstSourceGroup *group = get_group (playbin); in get_active_text_stream_index() local
2751 GPtrArray *channels = group->text_channels; in get_active_text_stream_index()
2771 GstSourceGroup *group = get_group (playbin); in set_current_text_stream_without_seek() local
2772 g_return_if_fail ((group != NULL) && (group->text_channels != NULL)); in set_current_text_stream_without_seek()
2774 channels = group->text_channels; in set_current_text_stream_without_seek()
2784 GstSourceCombine combiner = group->combiner[PLAYBIN_STREAM_TEXT]; in set_current_text_stream_without_seek()
2796 GstSourceGroup *group; in gst_play_bin_set_current_text_stream() local
2805 group = get_group (playbin); in gst_play_bin_set_current_text_stream()
2806 if (!group->combiner[PLAYBIN_STREAM_TEXT].has_active_pad) in gst_play_bin_set_current_text_stream()
2808 if (!(channels = group->text_channels)) in gst_play_bin_set_current_text_stream()
2849 need_block = (old_parent_element == group->suburidecodebin in gst_play_bin_set_current_text_stream()
2851 need_unblock = (parent_element == group->suburidecodebin in gst_play_bin_set_current_text_stream()
2853 need_seek = (parent_element == group->suburidecodebin); in gst_play_bin_set_current_text_stream()
2866 gst_play_bin_suburidecodebin_block (group, group->suburidecodebin, in gst_play_bin_set_current_text_stream()
2878 gst_play_bin_suburidecodebin_block (group, group->suburidecodebin, in gst_play_bin_set_current_text_stream()
2883 gst_play_bin_suburidecodebin_seek_to_start (group); in gst_play_bin_set_current_text_stream()
3241 GstSourceGroup *group; in gst_play_bin_get_property() local
3244 group = playbin->next_group; in gst_play_bin_get_property()
3245 g_value_set_string (value, group->uri); in gst_play_bin_get_property()
3251 GstSourceGroup *group; in gst_play_bin_get_property() local
3254 group = get_group (playbin); in gst_play_bin_get_property()
3255 g_value_set_string (value, group->uri); in gst_play_bin_get_property()
3261 GstSourceGroup *group; in gst_play_bin_get_property() local
3264 group = playbin->next_group; in gst_play_bin_get_property()
3265 g_value_set_string (value, group->suburi); in gst_play_bin_get_property()
3271 GstSourceGroup *group; in gst_play_bin_get_property() local
3274 group = get_group (playbin); in gst_play_bin_get_property()
3275 g_value_set_string (value, group->suburi); in gst_play_bin_get_property()
3291 GstSourceGroup *group; in gst_play_bin_get_property() local
3295 group = get_group (playbin); in gst_play_bin_get_property()
3296 n_video = (group->video_channels ? group->video_channels->len : 0); in gst_play_bin_get_property()
3308 GstSourceGroup *group; in gst_play_bin_get_property() local
3312 group = get_group (playbin); in gst_play_bin_get_property()
3313 n_audio = (group->audio_channels ? group->audio_channels->len : 0); in gst_play_bin_get_property()
3325 GstSourceGroup *group; in gst_play_bin_get_property() local
3329 group = get_group (playbin); in gst_play_bin_get_property()
3330 n_text = (group->text_channels ? group->text_channels->len : 0); in gst_play_bin_get_property()
3464 GstSourceGroup *group = NULL; in gst_play_bin_get_property() local
3466 group = get_group (playbin); in gst_play_bin_get_property()
3467 if ((group != NULL) && group->suburidecodebin_list) { in gst_play_bin_get_property()
3468 suburidecodebin_list = g_slist_last (group->suburidecodebin_list); in gst_play_bin_get_property()
3539 GstSourceGroup *group = playbin->curr_group; in gst_play_bin_query() local
3542 GST_SOURCE_GROUP_LOCK (group); in gst_play_bin_query()
3544 pending = group->pending || group->stream_changed_pending; in gst_play_bin_query()
3565 GST_SOURCE_GROUP_UNLOCK (group); in gst_play_bin_query()
3570 GST_SOURCE_GROUP_UNLOCK (group); in gst_play_bin_query()
3591 get_suburidecodebininfo_according_to_msg (const GstSourceGroup * group, const GstMessage * msg) in get_suburidecodebininfo_according_to_msg() argument
3593 g_return_val_if_fail (group != NULL, NULL); in get_suburidecodebininfo_according_to_msg()
3597 GSList *tmp_list = group->suburidecodebin_list; in get_suburidecodebininfo_according_to_msg()
3603 (void) g_slist_delete_link (group->suburidecodebin_list, tmp_list); in get_suburidecodebininfo_according_to_msg()
3634 iterator_process_pads (GstSourceGroup * group, GstIterator * it) in iterator_process_pads() argument
3647 pad_removed_cb (NULL, tmp_pad, group); in iterator_process_pads()
3666 GstSourceGroup *group = playbin->curr_group; in handle_message_error() local
3675 … GstSuburidecodeInfo *suburidecodebin_info = get_suburidecodebininfo_according_to_msg (group, msg); in handle_message_error()
3699 iterator_process_pads (group, it); in handle_message_error()
3706 GST_SOURCE_GROUP_LOCK (group); in handle_message_error()
3709 GST_SOURCE_GROUP_UNLOCK (group); in handle_message_error()
3715 if (group->sub_pending) { in handle_message_error()
3716 group->sub_pending = FALSE; in handle_message_error()
3717 no_more_pads_cb (NULL, group); in handle_message_error()
3731 GstSourceGroup *group; local
3754 group = playbin->curr_group;
3757 if (src && group &&
3758 …((is_subtitle_decodebin (group, GST_ELEMENT_CAST (src)) && src == GST_OBJECT_CAST (group->uridecod…
3759 || (group->suburidecodebin
3760 && src == GST_OBJECT_CAST (group->suburidecodebin)))) {
3762 if (src && group &&
3763 ((group->uridecodebin && src == GST_OBJECT_CAST (group->uridecodebin))
3764 || (group->suburidecodebin
3765 && src == GST_OBJECT_CAST (group->suburidecodebin)))) {
3794 GstSourceGroup *group = playbin->curr_group; local
3801 GST_SOURCE_GROUP_LOCK (group);
3802 pending = group->stream_changed_pending;
3806 "%p %" GST_PTR_FORMAT, group, msg);
3807 gst_message_replace (&group->pending_buffering_msg, msg);
3811 GST_SOURCE_GROUP_UNLOCK (group);
3819 group = playbin->curr_group;
3820 if (group && group->suburidecodebin) {
3822 (group->suburidecodebin)))) {
3838 REMOVE_SIGNAL (group->suburidecodebin, group->sub_pad_added_id);
3839 REMOVE_SIGNAL (group->suburidecodebin, group->sub_pad_removed_id);
3840 REMOVE_SIGNAL (group->suburidecodebin, group->sub_no_more_pads_id);
3841 REMOVE_SIGNAL (group->suburidecodebin, group->sub_autoplug_continue_id);
3842 REMOVE_SIGNAL (group->suburidecodebin, group->sub_autoplug_query_id);
3844 it = gst_element_iterate_src_pads (group->suburidecodebin);
3857 pad_removed_cb (NULL, p, group);
3873 gst_object_ref (group->suburidecodebin);
3874 gst_bin_remove (bin, group->suburidecodebin);
3875 gst_element_set_locked_state (group->suburidecodebin, FALSE);
3876 gst_object_unref (group->suburidecodebin);
3878 GST_SOURCE_GROUP_LOCK (group);
3879 g_free (group->suburi);
3880 group->suburi = NULL;
3881 GST_SOURCE_GROUP_UNLOCK (group);
3883 if (group->sub_pending) {
3884 group->sub_pending = FALSE;
3885 no_more_pads_cb (NULL, group);
3901 uri = gst_uri_join_strings (group->uri, location);
3904 if (g_strcmp0 (uri, group->uri)) {
3987 GstSourceGroup *group; local
3992 group = get_group (playbin);
3995 if (combiner == G_OBJECT (group->combiner[i].combiner)) {
3996 combine = &group->combiner[i];
4010 combine, group->video_channels);
4023 combine, group->audio_channels);
4042 combine, group->text_channels);
4117 GstSourceGroup *group = udata; local
4121 gboolean suburidecodebin = is_subtitle_decodebin (group, GST_PAD_PARENT (pad));
4123 gboolean suburidecodebin = (GST_PAD_PARENT (pad) == group->suburidecodebin);
4133 GSList *item = g_slist_find (group->suburi_flushes_to_drop,
4137 group->suburi_flushes_to_drop =
4138 g_slist_delete_link (group->suburi_flushes_to_drop, item);
4151 GST_SOURCE_GROUP_LOCK (group);
4153 if (group->have_group_id) {
4154 if (group->group_id != group_id) {
4156 gst_event_set_group_id (event, group->group_id);
4161 group->group_id = group_id;
4162 group->have_group_id = TRUE;
4168 if (!group->have_group_id) {
4169 group->group_id = gst_util_group_id_next ();
4170 group->have_group_id = TRUE;
4174 gst_event_set_group_id (event, group->group_id);
4178 GST_SOURCE_GROUP_UNLOCK (group);
4191 caps = update_video_multiview_caps (group->playbin, caps);
4264 pad_added_cb (GstElement * decodebin, GstPad * pad, GstSourceGroup * group) argument
4278 playbin = group->playbin;
4290 GST_DEBUG_PAD_NAME (pad), caps, group);
4296 if (array_has_value (group->combiner[i].media_list, name, pass == 0)) {
4297 combine = &group->combiner[i];
4299 } else if (group->combiner[i].get_media_caps) {
4300 GstCaps *media_caps = group->combiner[i].get_media_caps ();
4303 combine = &group->combiner[i];
4328 GST_SOURCE_GROUP_LOCK (group);
4464 GST_SOURCE_GROUP_UNLOCK (group);
4468 _uridecodebin_event_probe, group, NULL);
4498 gboolean always_ok = is_subtitle_decodebin (group, decodebin);
4500 gboolean always_ok = (decodebin == group->suburidecodebin);
4524 GST_SOURCE_GROUP_UNLOCK (group);
4531 GST_SOURCE_GROUP_UNLOCK (group);
4544 pad_removed_cb (GstElement * decodebin, GstPad * pad, GstSourceGroup * group) argument
4553 playbin = group->playbin;
4556 "pad %s:%s removed from group %p", GST_DEBUG_PAD_NAME (pad), group);
4558 GST_SOURCE_GROUP_LOCK (group);
4633 GST_SOURCE_GROUP_UNLOCK (group);
4658 no_more_pads_cb (GstElement * decodebin, GstSourceGroup * group) argument
4666 gboolean is_suburidecodebin = is_subtitle_decodebin (group, decodebin);
4669 playbin = group->playbin;
4671 GST_DEBUG_OBJECT (playbin, "no more pads in group %p", group);
4675 GST_SOURCE_GROUP_LOCK (group);
4677 GstSourceCombine *combine = &group->combiner[i];
4727 GST_DEBUG_OBJECT (playbin, "pending %d > %d", group->pending,
4728 group->pending - 1);
4730 if (group->pending > 0)
4731 group->pending--;
4737 if (group->suburidecodebin == decodebin)
4739 group->sub_pending = FALSE;
4741 if (group->pending == 0) {
4750 GST_SOURCE_GROUP_UNLOCK (group);
4765 GST_SOURCE_GROUP_LOCK (group);
4767 if (group->audio_sink) {
4769 group->audio_sink);
4771 group->audio_sink);
4774 if (group->video_sink) {
4776 group->video_sink);
4778 group->video_sink);
4781 if (group->text_sink) {
4783 group->text_sink);
4785 group->text_sink);
4788 GST_SOURCE_GROUP_UNLOCK (group);
4791 GST_SOURCE_GROUP_LOCK (group);
4794 GstSourceCombine *combine = &group->combiner[i];
4805 GST_SOURCE_GROUP_UNLOCK (group);
4834 GST_SOURCE_GROUP_LOCK (group);
4836 GstSourceCombine *combine = &group->combiner[i];
4856 GST_SOURCE_GROUP_UNLOCK (group);
4862 drained_cb (GstElement * decodebin, GstSourceGroup * group) argument
4866 playbin = group->playbin;
4868 GST_DEBUG_OBJECT (playbin, "about to finish in group %p", group);
5167 GstCaps * caps, GstSourceGroup * group) argument
5181 playbin = group->playbin;
5184 group, GST_DEBUG_PAD_NAME (pad), caps);
5238 if (group->audio_sink) {
5239 GstElementFactory *factory = gst_element_get_factory (group->audio_sink);
5251 if (group->video_sink) {
5252 GstElementFactory *factory = gst_element_get_factory (group->video_sink);
5268 if (group->audio_sink && gst_element_factory_list_is_type (factory,
5273 if (group->video_sink && gst_element_factory_list_is_type (factory,
5476 element_has_suburidecodebin_ancestor (const GstSourceGroup * group, GstElement * element) argument
5481 g_return_val_if_fail (group != NULL && element != NULL, FALSE);
5483 if (group->suburidecodebin_list != NULL) {
5484 suburidecodebin_list = group->suburidecodebin_list;
5508 GstSourceGroup * group) argument
5516 GstPlayBin *playbin = group->playbin;
5519 GST_SOURCE_GROUP_LOCK (group);
5521 if (group->text_sink &&
5522 activate_sink (group->playbin, group->text_sink, &activated_sink)) {
5523 sinkpad = gst_element_get_static_pad (group->text_sink, "sink");
5534 gst_element_set_state (group->text_sink, GST_STATE_NULL);
5560 if (element_has_suburidecodebin_ancestor (group, element))
5562 if (group->suburidecodebin
5564 GST_OBJECT_CAST (group->suburidecodebin)))
5568 if (group->audio_sink &&
5569 activate_sink (group->playbin, group->audio_sink, &activated_sink)) {
5571 sinkpad = gst_element_get_static_pad (group->audio_sink, "sink");
5582 gst_element_set_state (group->audio_sink, GST_STATE_NULL);
5587 if (group->video_sink
5588 && activate_sink (group->playbin, group->video_sink, &activated_sink)) {
5589 sinkpad = gst_element_get_static_pad (group->video_sink, "sink");
5600 gst_element_set_state (group->video_sink, GST_STATE_NULL);
5604 GST_SOURCE_GROUP_UNLOCK (group);
5606 GST_DEBUG_OBJECT (group->playbin,
5608 group, GST_DEBUG_PAD_NAME (pad), caps, ret);
5639 GstCaps * caps, GstElementFactory * factory, GstSourceGroup * group) argument
5652 playbin = group->playbin;
5655 group, GST_DEBUG_PAD_NAME (pad), caps);
5674 GST_SOURCE_GROUP_LOCK (group);
5679 sinkp = &group->audio_sink;
5682 sinkp = &group->video_sink;
5718 if (((isaudiodec && !group->audio_sink) ||
5719 (isvideodec && !group->video_sink))) {
5750 if ((isaudiodec && group->audio_sink) || (isvideodec
5751 && group->video_sink)) {
5822 GST_SOURCE_GROUP_UNLOCK (group);
5829 GST_SOURCE_GROUP_UNLOCK (group);
5843 sinkp = &group->audio_sink;
5847 sinkp = &group->video_sink;
5864 GST_SOURCE_GROUP_LOCK (group);
5873 GST_SOURCE_GROUP_UNLOCK (group);
5880 GST_SOURCE_GROUP_UNLOCK (group);
5890 GST_SOURCE_GROUP_UNLOCK (group);
5907 GST_SOURCE_GROUP_UNLOCK (group);
5917 GST_SOURCE_GROUP_UNLOCK (group);
5926 GST_SOURCE_GROUP_UNLOCK (group);
5946 GstElement * element, GstQuery * query, GstSourceGroup * group) argument
5955 GST_SOURCE_GROUP_LOCK (group);
5971 if (group->suburidecodebin
5973 GST_OBJECT_CAST (group->suburidecodebin))) {
5977 if ((sink = group->video_sink)) {
6001 if (group->suburidecodebin
6003 GST_OBJECT_CAST (group->suburidecodebin))) {
6007 if ((sink = group->audio_sink)) {
6029 if ((sink = group->playbin->text_sink)) {
6062 factories = autoplug_factories_cb (uridecodebin, pad, NULL, group);
6094 GST_SOURCE_GROUP_UNLOCK (group);
6149 GstElement * element, GstQuery * query, GstSourceGroup * group) argument
6156 GST_SOURCE_GROUP_LOCK (group);
6167 if (group->suburidecodebin
6169 GST_OBJECT_CAST (group->suburidecodebin))) {
6173 if ((sink = group->video_sink)) {
6184 if (group->suburidecodebin
6186 GST_OBJECT_CAST (group->suburidecodebin))) {
6190 if ((sink = group->audio_sink)) {
6199 if ((sink = group->playbin->text_sink)) {
6211 GST_SOURCE_GROUP_UNLOCK (group);
6218 GstElement * element, GstQuery * query, GstSourceGroup * group) argument
6223 return autoplug_query_caps (uridecodebin, pad, element, query, group);
6225 return autoplug_query_context (uridecodebin, pad, element, query, group);
6233 GstSourceGroup * group) argument
6238 playbin = group->playbin;
6240 g_object_get (group->uridecodebin, "source", &source, NULL);
6253 GstSourceGroup * group) argument
6257 playbin = group->playbin;
6264 group_set_locked_state_unlocked (GstPlayBin * playbin, GstSourceGroup * group, argument
6267 GST_DEBUG_OBJECT (playbin, "locked_state %d on group %p", locked, group);
6269 if (group->uridecodebin)
6270 gst_element_set_locked_state (group->uridecodebin, locked);
6271 if (group->suburidecodebin)
6272 gst_element_set_locked_state (group->suburidecodebin, locked);
6280 …te_parse_complete_cb (GstElement * uridecodebin, gpointer input, guint num, GstSourceGroup * group) argument
6282 if ((group == NULL) || (group->playbin == NULL)) {
6285 GstPlayBin *playbin = group->playbin;
6295 active_suburidecodebins (GstSourceGroup * group) argument
6300 GstPlayBin *playbin = group->playbin;
6301 g_return_if_fail (group != NULL && playbin != NULL);
6303 if (group->suburidecodebin_list != NULL) {
6304 suburidecodebin_list = group->suburidecodebin_list;
6311 "pad-added", G_CALLBACK (pad_added_cb), group);
6313 "pad-removed", G_CALLBACK (pad_removed_cb), group);
6315 "no-more-pads", G_CALLBACK (no_more_pads_cb), group);
6318 G_CALLBACK (autoplug_continue_cb), group);
6321 G_CALLBACK (autoplug_query_cb), group);
6329 deactive_suburidecodebins (const GstSourceGroup * group) argument
6333 GstPlayBin *playbin = group->playbin;
6334 g_return_if_fail (group != NULL && playbin != NULL);
6336 if ((suburidecodebin_list = group->suburidecodebin_list)) {
6357 get_suburidecodebin_by_uri (const GstSourceGroup * group, const gchar * uri) argument
6362 g_return_val_if_fail (group != NULL && uri != NULL, NULL);
6364 if (group->suburidecodebin_list != NULL) {
6365 suburidecodebin_list = group->suburidecodebin_list;
6380 get_suburidecodebin (GstPlayBin * playbin, GstSourceGroup * group) argument
6382 GstElement *suburidecodebin = get_suburidecodebin_by_uri (group, group->suburi);
6405 "uri", group->suburi, NULL);
6407 group->sub_pad_added_id = g_signal_connect (suburidecodebin,
6408 "pad-added", G_CALLBACK (pad_added_cb), group);
6409 group->sub_pad_removed_id = g_signal_connect (suburidecodebin,
6410 "pad-removed", G_CALLBACK (pad_removed_cb), group);
6411 group->sub_no_more_pads_id = g_signal_connect (suburidecodebin,
6412 "no-more-pads", G_CALLBACK (no_more_pads_cb), group);
6413 group->sub_autoplug_continue_id =
6415 G_CALLBACK (autoplug_continue_cb), group);
6416 group->sub_autoplug_query_id =
6418 G_CALLBACK (autoplug_query_cb), group);
6419 suburidecodeinfo = gst_play_bin_new_suburidecodeinfo (group);
6421 suburidecodeinfo->uri = g_strdup (group->suburi);
6423 group->suburidecodebin_list = g_slist_append (group->suburidecodebin_list, suburidecodeinfo);
6424 if (group->suburidecodebin_list == NULL) {
6438 activate_group (GstPlayBin * playbin, GstSourceGroup * group, GstState target) argument
6448 g_return_val_if_fail (group->valid, GST_STATE_CHANGE_FAILURE);
6449 g_return_val_if_fail (!group->active, GST_STATE_CHANGE_FAILURE);
6451 GST_DEBUG_OBJECT (playbin, "activating group %p", group);
6453 GST_SOURCE_GROUP_LOCK (group);
6457 group->audio_sink = gst_object_ref (playbin->audio_sink);
6459 group->audio_sink =
6462 if (group->audio_sink) {
6463 if (!activate_sink (playbin, group->audio_sink, &audio_sink_activated)) {
6464 if (group->audio_sink == playbin->audio_sink) {
6467 gst_object_unref (group->audio_sink);
6468 group->audio_sink = NULL;
6474 group->video_sink = gst_object_ref (playbin->video_sink);
6476 group->video_sink =
6479 if (group->video_sink) {
6480 if (!activate_sink (playbin, group->video_sink, &video_sink_activated)) {
6481 if (group->video_sink == playbin->video_sink) {
6484 gst_object_unref (group->video_sink);
6485 group->video_sink = NULL;
6491 group->text_sink = gst_object_ref (playbin->text_sink);
6493 group->text_sink =
6496 if (group->text_sink) {
6497 if (!activate_sink (playbin, group->text_sink, &text_sink_activated)) {
6498 if (group->text_sink == playbin->text_sink) {
6501 gst_object_unref (group->text_sink);
6502 group->text_sink = NULL;
6507 g_slist_free (group->suburi_flushes_to_drop);
6508 group->suburi_flushes_to_drop = NULL;
6509 if (!group->suburi_flushes_to_drop_lock.p)
6510 g_mutex_init (&group->suburi_flushes_to_drop_lock);
6512 if (group->uridecodebin) {
6514 uridecodebin = group->uridecodebin;
6526 group->uridecodebin = gst_object_ref (uridecodebin);
6536 group->bitrate_parse_complete_id =
6537 …al_connect (uridecodebin, "bitrate-parse-complete", G_CALLBACK (bitrate_parse_complete_cb), group);
6545 "uri", group->uri,
6558 group->pad_added_id = g_signal_connect (uridecodebin, "pad-added",
6559 G_CALLBACK (pad_added_cb), group);
6560 group->pad_removed_id = g_signal_connect (uridecodebin, "pad-removed",
6561 G_CALLBACK (pad_removed_cb), group);
6562 group->no_more_pads_id = g_signal_connect (uridecodebin, "no-more-pads",
6563 G_CALLBACK (no_more_pads_cb), group);
6564 group->notify_source_id = g_signal_connect (uridecodebin, "notify::source",
6565 G_CALLBACK (notify_source_cb), group);
6566 group->source_setup_id = g_signal_connect (uridecodebin, "source-setup",
6567 G_CALLBACK (source_setup_cb), group);
6570 group->pending = 1;
6574 group->drained_id =
6576 group);
6580 group->autoplug_factories_id =
6582 G_CALLBACK (autoplug_factories_cb), group);
6583 group->autoplug_select_id =
6585 G_CALLBACK (autoplug_select_cb), group);
6586 group->autoplug_continue_id =
6588 G_CALLBACK (autoplug_continue_cb), group);
6589 group->autoplug_query_id =
6591 G_CALLBACK (autoplug_query_cb), group);
6594 active_suburidecodebins (group);
6597 if (group->suburi) {
6601 suburidecodebin = get_suburidecodebin (playbin, group);
6606 if (group->suburidecodebin) {
6608 suburidecodebin = group->suburidecodebin;
6621 group->suburidecodebin = gst_object_ref (suburidecodebin);
6629 "uri", group->suburi, NULL);
6632 group->sub_pad_added_id = g_signal_connect (suburidecodebin, "pad-added",
6633 G_CALLBACK (pad_added_cb), group);
6634 group->sub_pad_removed_id = g_signal_connect (suburidecodebin,
6635 "pad-removed", G_CALLBACK (pad_removed_cb), group);
6636 group->sub_no_more_pads_id = g_signal_connect (suburidecodebin,
6637 "no-more-pads", G_CALLBACK (no_more_pads_cb), group);
6639 group->sub_autoplug_continue_id =
6641 G_CALLBACK (autoplug_continue_cb), group);
6643 group->sub_autoplug_query_id =
6645 G_CALLBACK (autoplug_query_cb), group);
6648 group->pending = 2;
6649 group->sub_pending = TRUE;
6651 group->sub_pending = FALSE;
6657 GST_SOURCE_GROUP_UNLOCK (group);
6664 GST_SOURCE_GROUP_LOCK (group);
6668 REMOVE_SIGNAL (suburidecodebin, group->sub_pad_added_id);
6669 REMOVE_SIGNAL (suburidecodebin, group->sub_pad_removed_id);
6670 REMOVE_SIGNAL (suburidecodebin, group->sub_no_more_pads_id);
6671 REMOVE_SIGNAL (suburidecodebin, group->sub_autoplug_continue_id);
6672 REMOVE_SIGNAL (suburidecodebin, group->sub_autoplug_query_id);
6674 REMOVE_SIGNAL (group->suburidecodebin, group->sub_pad_added_id);
6675 REMOVE_SIGNAL (group->suburidecodebin, group->sub_pad_removed_id);
6676 REMOVE_SIGNAL (group->suburidecodebin, group->sub_no_more_pads_id);
6677 REMOVE_SIGNAL (group->suburidecodebin, group->sub_autoplug_continue_id);
6678 REMOVE_SIGNAL (group->suburidecodebin, group->sub_autoplug_query_id);
6684 if (group->sub_pending) {
6685 group->pending--;
6686 group->sub_pending = FALSE;
6689 g_free (group->suburi);
6690 group->suburi = NULL;
6691 GST_SOURCE_GROUP_UNLOCK (group);
6699 GST_SOURCE_GROUP_LOCK (group);
6701 group_set_locked_state_unlocked (playbin, group, FALSE);
6702 group->active = TRUE;
6703 GST_SOURCE_GROUP_UNLOCK (group);
6712 GST_SOURCE_GROUP_UNLOCK (group);
6721 GST_SOURCE_GROUP_LOCK (group);
6728 GST_SOURCE_GROUP_LOCK (group);
6740 if (group->audio_sink) {
6743 gst_element_set_state (group->audio_sink, GST_STATE_NULL);
6744 gst_object_unref (group->audio_sink);
6746 group->audio_sink = NULL;
6748 if (group->video_sink) {
6751 gst_element_set_state (group->video_sink, GST_STATE_NULL);
6752 gst_object_unref (group->video_sink);
6754 group->video_sink = NULL;
6756 if (group->text_sink) {
6759 gst_element_set_state (group->text_sink, GST_STATE_NULL);
6760 gst_object_unref (group->text_sink);
6762 group->text_sink = NULL;
6765 REMOVE_SIGNAL (group->uridecodebin, group->pad_added_id);
6766 REMOVE_SIGNAL (group->uridecodebin, group->pad_removed_id);
6767 REMOVE_SIGNAL (group->uridecodebin, group->no_more_pads_id);
6768 REMOVE_SIGNAL (group->uridecodebin, group->notify_source_id);
6769 REMOVE_SIGNAL (group->uridecodebin, group->source_setup_id);
6770 REMOVE_SIGNAL (group->uridecodebin, group->drained_id);
6771 REMOVE_SIGNAL (group->uridecodebin, group->autoplug_factories_id);
6772 REMOVE_SIGNAL (group->uridecodebin, group->autoplug_select_id);
6773 REMOVE_SIGNAL (group->uridecodebin, group->autoplug_continue_id);
6774 REMOVE_SIGNAL (group->uridecodebin, group->autoplug_query_id);
6777 REMOVE_SIGNAL (group->uridecodebin, group->bitrate_parse_complete_id);
6784 GST_SOURCE_GROUP_UNLOCK (group);
6793 deactivate_group (GstPlayBin * playbin, GstSourceGroup * group) argument
6797 g_return_val_if_fail (group->active, FALSE);
6798 g_return_val_if_fail (group->valid, FALSE);
6800 GST_DEBUG_OBJECT (playbin, "unlinking group %p", group);
6802 GST_SOURCE_GROUP_LOCK (group);
6803 group->active = FALSE;
6805 GstSourceCombine *combine = &group->combiner[i];
6832 if (group->audio_sink) {
6833 if (!gst_object_has_as_ancestor (GST_OBJECT_CAST (group->audio_sink),
6835 gst_element_set_state (group->audio_sink, GST_STATE_NULL);
6837 gst_object_unref (group->audio_sink);
6839 group->audio_sink = NULL;
6840 if (group->video_sink) {
6841 if (!gst_object_has_as_ancestor (GST_OBJECT_CAST (group->video_sink),
6843 gst_element_set_state (group->video_sink, GST_STATE_NULL);
6845 gst_object_unref (group->video_sink);
6847 group->video_sink = NULL;
6848 if (group->text_sink) {
6849 if (!gst_object_has_as_ancestor (GST_OBJECT_CAST (group->text_sink),
6851 gst_element_set_state (group->text_sink, GST_STATE_NULL);
6853 gst_object_unref (group->text_sink);
6855 group->text_sink = NULL;
6857 if (group->uridecodebin) {
6858 REMOVE_SIGNAL (group->uridecodebin, group->pad_added_id);
6859 REMOVE_SIGNAL (group->uridecodebin, group->pad_removed_id);
6860 REMOVE_SIGNAL (group->uridecodebin, group->no_more_pads_id);
6861 REMOVE_SIGNAL (group->uridecodebin, group->notify_source_id);
6862 REMOVE_SIGNAL (group->uridecodebin, group->source_setup_id);
6863 REMOVE_SIGNAL (group->uridecodebin, group->drained_id);
6864 REMOVE_SIGNAL (group->uridecodebin, group->autoplug_factories_id);
6865 REMOVE_SIGNAL (group->uridecodebin, group->autoplug_select_id);
6866 REMOVE_SIGNAL (group->uridecodebin, group->autoplug_continue_id);
6867 REMOVE_SIGNAL (group->uridecodebin, group->autoplug_query_id);
6870 REMOVE_SIGNAL (group->uridecodebin, group->bitrate_parse_complete_id);
6872 gst_bin_remove (GST_BIN_CAST (playbin), group->uridecodebin);
6877 deactive_suburidecodebins (group);
6879 if (group->suburidecodebin) {
6880 REMOVE_SIGNAL (group->suburidecodebin, group->sub_pad_added_id);
6881 REMOVE_SIGNAL (group->suburidecodebin, group->sub_pad_removed_id);
6882 REMOVE_SIGNAL (group->suburidecodebin, group->sub_no_more_pads_id);
6883 REMOVE_SIGNAL (group->suburidecodebin, group->sub_autoplug_continue_id);
6884 REMOVE_SIGNAL (group->suburidecodebin, group->sub_autoplug_query_id);
6887 if (GST_OBJECT_PARENT (group->suburidecodebin) == GST_OBJECT_CAST (playbin))
6888 gst_bin_remove (GST_BIN_CAST (playbin), group->suburidecodebin);
6892 group->have_group_id = FALSE;
6894 GST_SOURCE_GROUP_UNLOCK (group);