Lines Matching refs:playbin
279 static GSequence *avelements_create (GstPlayBin * playbin,
296 GstPlayBin *playbin; member
513 void (*about_to_finish) (GstPlayBin * playbin);
516 void (*video_changed) (GstPlayBin * playbin);
517 void (*audio_changed) (GstPlayBin * playbin);
518 void (*text_changed) (GstPlayBin * playbin);
521 void (*video_tags_changed) (GstPlayBin * playbin, gint stream);
522 void (*audio_tags_changed) (GstPlayBin * playbin, gint stream);
523 void (*text_tags_changed) (GstPlayBin * playbin, gint stream);
526 GstTagList *(*get_video_tags) (GstPlayBin * playbin, gint stream);
527 GstTagList *(*get_audio_tags) (GstPlayBin * playbin, gint stream);
528 GstTagList *(*get_text_tags) (GstPlayBin * playbin, gint stream);
531 GstSample *(*convert_sample) (GstPlayBin * playbin, GstCaps * caps);
534 GstPad *(*get_video_pad) (GstPlayBin * playbin, gint stream);
535 GstPad *(*get_audio_pad) (GstPlayBin * playbin, gint stream);
536 GstPad *(*get_text_pad) (GstPlayBin * playbin, gint stream);
682 static void gst_play_bin_deep_element_added (GstBin * playbin, GstBin * sub_bin,
690 static GstTagList *gst_play_bin_get_video_tags (GstPlayBin * playbin,
692 static GstTagList *gst_play_bin_get_audio_tags (GstPlayBin * playbin,
694 static GstTagList *gst_play_bin_get_text_tags (GstPlayBin * playbin,
697 static GstSample *gst_play_bin_convert_sample (GstPlayBin * playbin,
700 static GstPad *gst_play_bin_get_video_pad (GstPlayBin * playbin, gint stream);
701 static GstPad *gst_play_bin_get_audio_pad (GstPlayBin * playbin, gint stream);
702 static GstPad *gst_play_bin_get_text_pad (GstPlayBin * playbin, gint stream);
704 static GstStateChangeReturn setup_next_source (GstPlayBin * playbin,
718 gst_play_bin_update_context (GstPlayBin * playbin, GstContext * context);
722 static GstSourceGroup *get_group (GstPlayBin * playbin);
778 GST_ELEMENT_REGISTER_DEFINE_WITH_CODE (playbin, "playbin", GST_RANK_NONE,
1511 do_async_start (GstPlayBin * playbin) in do_async_start() argument
1515 playbin->async_pending = TRUE; in do_async_start()
1517 message = gst_message_new_async_start (GST_OBJECT_CAST (playbin)); in do_async_start()
1518 GST_BIN_CLASS (parent_class)->handle_message (GST_BIN_CAST (playbin), in do_async_start()
1523 do_async_done (GstPlayBin * playbin) in do_async_done() argument
1527 if (playbin->async_pending) { in do_async_done()
1528 GST_DEBUG_OBJECT (playbin, "posting ASYNC_DONE"); in do_async_done()
1530 gst_message_new_async_done (GST_OBJECT_CAST (playbin), in do_async_done()
1532 GST_BIN_CLASS (parent_class)->handle_message (GST_BIN_CAST (playbin), in do_async_done()
1535 playbin->async_pending = FALSE; in do_async_done()
1540 init_group (GstPlayBin * playbin, GstSourceGroup * group) in init_group() argument
1553 group->playbin = playbin; in init_group()
1582 free_group (GstPlayBin * playbin, GstSourceGroup * group) in free_group() argument
1625 notify_volume_cb (GObject * combiner, GParamSpec * pspec, GstPlayBin * playbin) in notify_volume_cb() argument
1627 g_object_notify (G_OBJECT (playbin), "volume"); in notify_volume_cb()
1631 notify_mute_cb (GObject * combiner, GParamSpec * pspec, GstPlayBin * playbin) in notify_mute_cb() argument
1633 g_object_notify (G_OBJECT (playbin), "mute"); in notify_mute_cb()
1638 GstColorBalanceChannel * channel, gint value, GstPlayBin * playbin) in colorbalance_value_changed_cb() argument
1640 gst_color_balance_value_changed (GST_COLOR_BALANCE (playbin), channel, value); in colorbalance_value_changed_cb()
1683 gst_play_bin_update_elements_list (GstPlayBin * playbin) in gst_play_bin_update_elements_list() argument
1690 if (!playbin->elements || playbin->elements_cookie != cookie) { in gst_play_bin_update_elements_list()
1691 if (playbin->elements) in gst_play_bin_update_elements_list()
1692 gst_plugin_feature_list_free (playbin->elements); in gst_play_bin_update_elements_list()
1699 playbin->elements = g_list_concat (res, tmp); in gst_play_bin_update_elements_list()
1700 playbin->elements = g_list_sort (playbin->elements, compare_factories_func); in gst_play_bin_update_elements_list()
1703 if (!playbin->aelements || playbin->elements_cookie != cookie) { in gst_play_bin_update_elements_list()
1704 if (playbin->aelements) in gst_play_bin_update_elements_list()
1705 g_sequence_free (playbin->aelements); in gst_play_bin_update_elements_list()
1706 playbin->aelements = avelements_create (playbin, TRUE); in gst_play_bin_update_elements_list()
1709 if (!playbin->velements || playbin->elements_cookie != cookie) { in gst_play_bin_update_elements_list()
1710 if (playbin->velements) in gst_play_bin_update_elements_list()
1711 g_sequence_free (playbin->velements); in gst_play_bin_update_elements_list()
1712 playbin->velements = avelements_create (playbin, FALSE); in gst_play_bin_update_elements_list()
1715 playbin->elements_cookie = cookie; in gst_play_bin_update_elements_list()
1719 gst_play_bin_init (GstPlayBin * playbin) in gst_play_bin_init() argument
1721 g_rec_mutex_init (&playbin->lock); in gst_play_bin_init()
1722 g_mutex_init (&playbin->dyn_lock); in gst_play_bin_init()
1725 playbin->have_selector = TRUE; in gst_play_bin_init()
1728 playbin->curr_group = &playbin->groups[0]; in gst_play_bin_init()
1729 playbin->next_group = &playbin->groups[1]; in gst_play_bin_init()
1730 init_group (playbin, &playbin->groups[0]); in gst_play_bin_init()
1731 init_group (playbin, &playbin->groups[1]); in gst_play_bin_init()
1734 g_mutex_init (&playbin->elements_lock); in gst_play_bin_init()
1737 playbin->playsink = in gst_play_bin_init()
1740 gst_bin_add (GST_BIN_CAST (playbin), GST_ELEMENT_CAST (playbin->playsink)); in gst_play_bin_init()
1741 gst_play_sink_set_flags (playbin->playsink, DEFAULT_FLAGS); in gst_play_bin_init()
1743 g_signal_connect (playbin->playsink, "notify::volume", in gst_play_bin_init()
1744 G_CALLBACK (notify_volume_cb), playbin); in gst_play_bin_init()
1745 g_signal_connect (playbin->playsink, "notify::mute", in gst_play_bin_init()
1746 G_CALLBACK (notify_mute_cb), playbin); in gst_play_bin_init()
1747 g_signal_connect (playbin->playsink, "value-changed", in gst_play_bin_init()
1748 G_CALLBACK (colorbalance_value_changed_cb), playbin); in gst_play_bin_init()
1750 playbin->current_video = DEFAULT_CURRENT_VIDEO; in gst_play_bin_init()
1751 playbin->current_audio = DEFAULT_CURRENT_AUDIO; in gst_play_bin_init()
1752 playbin->current_text = DEFAULT_CURRENT_TEXT; in gst_play_bin_init()
1754 playbin->buffer_duration = DEFAULT_BUFFER_DURATION; in gst_play_bin_init()
1755 playbin->buffer_size = DEFAULT_BUFFER_SIZE; in gst_play_bin_init()
1756 playbin->ring_buffer_max_size = DEFAULT_RING_BUFFER_MAX_SIZE; in gst_play_bin_init()
1758 playbin->force_aspect_ratio = TRUE; in gst_play_bin_init()
1760 playbin->multiview_mode = GST_VIDEO_MULTIVIEW_FRAME_PACKING_NONE; in gst_play_bin_init()
1761 playbin->multiview_flags = GST_VIDEO_MULTIVIEW_FLAGS_NONE; in gst_play_bin_init()
1765 playbin->low_percent = DEFAULT_LOW_PERCENT; in gst_play_bin_init()
1766 playbin->high_percent = DEFAULT_HIGH_PERCENT; in gst_play_bin_init()
1771 playbin->currentAudio = -1; in gst_play_bin_init()
1778 GstPlayBin *playbin; in gst_play_bin_finalize() local
1780 playbin = GST_PLAY_BIN (object); in gst_play_bin_finalize()
1782 free_group (playbin, &playbin->groups[0]); in gst_play_bin_finalize()
1783 free_group (playbin, &playbin->groups[1]); in gst_play_bin_finalize()
1785 if (playbin->source) in gst_play_bin_finalize()
1786 gst_object_unref (playbin->source); in gst_play_bin_finalize()
1792 if (playbin->video_sink) { in gst_play_bin_finalize()
1793 gst_element_set_state (playbin->video_sink, GST_STATE_NULL); in gst_play_bin_finalize()
1794 gst_object_unref (playbin->video_sink); in gst_play_bin_finalize()
1796 if (playbin->audio_sink) { in gst_play_bin_finalize()
1797 gst_element_set_state (playbin->audio_sink, GST_STATE_NULL); in gst_play_bin_finalize()
1798 gst_object_unref (playbin->audio_sink); in gst_play_bin_finalize()
1800 if (playbin->text_sink) { in gst_play_bin_finalize()
1801 gst_element_set_state (playbin->text_sink, GST_STATE_NULL); in gst_play_bin_finalize()
1802 gst_object_unref (playbin->text_sink); in gst_play_bin_finalize()
1805 if (playbin->video_stream_combiner) { in gst_play_bin_finalize()
1806 gst_element_set_state (playbin->video_stream_combiner, GST_STATE_NULL); in gst_play_bin_finalize()
1807 gst_object_unref (playbin->video_stream_combiner); in gst_play_bin_finalize()
1809 if (playbin->audio_stream_combiner) { in gst_play_bin_finalize()
1810 gst_element_set_state (playbin->audio_stream_combiner, GST_STATE_NULL); in gst_play_bin_finalize()
1811 gst_object_unref (playbin->audio_stream_combiner); in gst_play_bin_finalize()
1813 if (playbin->text_stream_combiner) { in gst_play_bin_finalize()
1814 gst_element_set_state (playbin->text_stream_combiner, GST_STATE_NULL); in gst_play_bin_finalize()
1815 gst_object_unref (playbin->text_stream_combiner); in gst_play_bin_finalize()
1818 if (playbin->elements) in gst_play_bin_finalize()
1819 gst_plugin_feature_list_free (playbin->elements); in gst_play_bin_finalize()
1821 if (playbin->aelements) in gst_play_bin_finalize()
1822 g_sequence_free (playbin->aelements); in gst_play_bin_finalize()
1824 if (playbin->velements) in gst_play_bin_finalize()
1825 g_sequence_free (playbin->velements); in gst_play_bin_finalize()
1827 g_list_free_full (playbin->contexts, (GDestroyNotify) gst_context_unref); in gst_play_bin_finalize()
1829 g_rec_mutex_clear (&playbin->lock); in gst_play_bin_finalize()
1830 g_mutex_clear (&playbin->dyn_lock); in gst_play_bin_finalize()
1831 g_mutex_clear (&playbin->elements_lock); in gst_play_bin_finalize()
1833 playbin->is_live = FALSE; in gst_play_bin_finalize()
1839 gst_playbin_uri_is_valid (GstPlayBin * playbin, const gchar * uri) in gst_playbin_uri_is_valid() argument
1843 GST_LOG_OBJECT (playbin, "checking uri '%s'", uri); in gst_playbin_uri_is_valid()
1860 GST_WARNING_OBJECT (playbin, "uri '%s' not valid, character #%u", in gst_playbin_uri_is_valid()
1867 gst_play_bin_set_uri (GstPlayBin * playbin, const gchar * uri) in gst_play_bin_set_uri() argument
1871 if (uri && !gst_playbin_uri_is_valid (playbin, uri)) { in gst_play_bin_set_uri()
1873 GST_WARNING_OBJECT (playbin, "not entirely correct file URI '%s' - make " in gst_play_bin_set_uri()
1882 GST_PLAY_BIN_LOCK (playbin); in gst_play_bin_set_uri()
1883 group = playbin->next_group; in gst_play_bin_set_uri()
1898 GST_PLAY_BIN_UNLOCK (playbin); in gst_play_bin_set_uri()
1902 gst_play_bin_set_suburi (GstPlayBin * playbin, const gchar * suburi) in gst_play_bin_set_suburi() argument
1906 GST_PLAY_BIN_LOCK (playbin); in gst_play_bin_set_suburi()
1907 group = playbin->next_group; in gst_play_bin_set_suburi()
1916 GST_PLAY_BIN_UNLOCK (playbin); in gst_play_bin_set_suburi()
1929 GstPlayBin *playbin = group->playbin; in delete_suburidecodebin() local
1930 g_return_if_fail (group != NULL && suburidecodeinfo != NULL && playbin != NULL); in delete_suburidecodebin()
1952 if (GST_OBJECT_PARENT (suburidecodeinfo->suburidecodebin) == GST_OBJECT_CAST (playbin)) { in delete_suburidecodebin()
1953 (void) gst_bin_remove (GST_BIN_CAST (playbin), suburidecodeinfo->suburidecodebin); in delete_suburidecodebin()
2015 gst_play_bin_create_suburidecodebin (GstPlayBin * playbin, const gchar * suburi) in gst_play_bin_create_suburidecodebin() argument
2020 GST_DEBUG_OBJECT (playbin, "making new suburidecodebin, suburi %s", suburi); in gst_play_bin_create_suburidecodebin()
2022 (void) gst_bin_add (GST_BIN_CAST (playbin), suburidecodebin); in gst_play_bin_create_suburidecodebin()
2024 group = get_group (playbin); in gst_play_bin_create_suburidecodebin()
2026 g_object_set (suburidecodebin, "connection-speed", playbin->connection_speed, in gst_play_bin_create_suburidecodebin()
2043 gst_play_bin_add_suburi (GstPlayBin * playbin, const gchar * suburi) in gst_play_bin_add_suburi() argument
2051 GST_PLAY_BIN_LOCK (playbin); in gst_play_bin_add_suburi()
2052 if (!gst_play_bin_create_suburidecodebin (playbin, suburi)) { in gst_play_bin_add_suburi()
2055 GST_PLAY_BIN_UNLOCK (playbin); in gst_play_bin_add_suburi()
2060 gst_play_bin_set_flags (GstPlayBin * playbin, GstPlayFlags flags) in gst_play_bin_set_flags() argument
2063 old_flags = gst_play_sink_get_flags (playbin->playsink); in gst_play_bin_set_flags()
2066 gst_play_sink_set_flags (playbin->playsink, flags); in gst_play_bin_set_flags()
2067 gst_play_sink_reconfigure (playbin->playsink); in gst_play_bin_set_flags()
2072 gst_play_bin_get_flags (GstPlayBin * playbin) in gst_play_bin_get_flags() argument
2076 flags = gst_play_sink_get_flags (playbin->playsink); in gst_play_bin_get_flags()
2084 get_group (GstPlayBin * playbin) in get_group() argument
2088 if (!(result = playbin->curr_group)) in get_group()
2089 result = playbin->next_group; in get_group()
2095 gst_play_bin_get_video_pad (GstPlayBin * playbin, gint stream) in gst_play_bin_get_video_pad() argument
2100 GST_PLAY_BIN_LOCK (playbin); in gst_play_bin_get_video_pad()
2101 group = get_group (playbin); in gst_play_bin_get_video_pad()
2106 GST_PLAY_BIN_UNLOCK (playbin); in gst_play_bin_get_video_pad()
2112 gst_play_bin_get_audio_pad (GstPlayBin * playbin, gint stream) in gst_play_bin_get_audio_pad() argument
2117 GST_PLAY_BIN_LOCK (playbin); in gst_play_bin_get_audio_pad()
2118 group = get_group (playbin); in gst_play_bin_get_audio_pad()
2123 GST_PLAY_BIN_UNLOCK (playbin); in gst_play_bin_get_audio_pad()
2129 gst_play_bin_get_text_pad (GstPlayBin * playbin, gint stream) in gst_play_bin_get_text_pad() argument
2134 GST_PLAY_BIN_LOCK (playbin); in gst_play_bin_get_text_pad()
2135 group = get_group (playbin); in gst_play_bin_get_text_pad()
2140 GST_PLAY_BIN_UNLOCK (playbin); in gst_play_bin_get_text_pad()
2147 get_tags (GstPlayBin * playbin, GstSourceGroup * group, gint type, gint stream) in get_tags() argument
2178 gst_play_bin_get_video_tags (GstPlayBin * playbin, gint stream) in gst_play_bin_get_video_tags() argument
2183 GST_PLAY_BIN_LOCK (playbin); in gst_play_bin_get_video_tags()
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()
2186 GST_PLAY_BIN_UNLOCK (playbin); in gst_play_bin_get_video_tags()
2192 gst_play_bin_get_audio_tags (GstPlayBin * playbin, gint stream) in gst_play_bin_get_audio_tags() argument
2197 GST_PLAY_BIN_LOCK (playbin); in gst_play_bin_get_audio_tags()
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()
2200 GST_PLAY_BIN_UNLOCK (playbin); in gst_play_bin_get_audio_tags()
2206 gst_play_bin_get_text_tags (GstPlayBin * playbin, gint stream) in gst_play_bin_get_text_tags() argument
2211 GST_PLAY_BIN_LOCK (playbin); in gst_play_bin_get_text_tags()
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()
2214 GST_PLAY_BIN_UNLOCK (playbin); in gst_play_bin_get_text_tags()
2220 gst_play_bin_convert_sample (GstPlayBin * playbin, GstCaps * caps) in gst_play_bin_convert_sample() argument
2222 return gst_play_sink_convert_sample (playbin->playsink, caps); in gst_play_bin_convert_sample()
2227 get_current_stream_number (GstPlayBin * playbin, GstSourceCombine * combine, in get_current_stream_number() argument
2237 GST_WARNING_OBJECT (playbin, in get_current_stream_number()
2285 gst_play_bin_set_current_video_stream (GstPlayBin * playbin, gint stream) in gst_play_bin_set_current_video_stream() argument
2291 GST_PLAY_BIN_LOCK (playbin); in gst_play_bin_set_current_video_stream()
2293 GST_DEBUG_OBJECT (playbin, "Changing current video stream %d -> %d", in gst_play_bin_set_current_video_stream()
2294 playbin->current_video, stream); in gst_play_bin_set_current_video_stream()
2296 group = get_group (playbin); in gst_play_bin_set_current_video_stream()
2311 GST_PLAY_BIN_UNLOCK (playbin); in gst_play_bin_set_current_video_stream()
2324 playbin->video_pending_flush_finish = TRUE; in gst_play_bin_set_current_video_stream()
2341 GST_PLAY_BIN_UNLOCK (playbin); in gst_play_bin_set_current_video_stream()
2342 GST_WARNING_OBJECT (playbin, in gst_play_bin_set_current_video_stream()
2348 GST_PLAY_BIN_UNLOCK (playbin); in gst_play_bin_set_current_video_stream()
2349 GST_DEBUG_OBJECT (playbin, "can't switch video, we have no channels"); in gst_play_bin_set_current_video_stream()
2355 gst_play_bin_set_current_audio_stream (GstPlayBin * playbin, gint stream) in gst_play_bin_set_current_audio_stream() argument
2361 GST_PLAY_BIN_LOCK (playbin); in gst_play_bin_set_current_audio_stream()
2363 GST_DEBUG_OBJECT (playbin, "Changing current audio stream %d -> %d", in gst_play_bin_set_current_audio_stream()
2364 playbin->current_audio, stream); in gst_play_bin_set_current_audio_stream()
2366 group = get_group (playbin); in gst_play_bin_set_current_audio_stream()
2381 GST_PLAY_BIN_UNLOCK (playbin); in gst_play_bin_set_current_audio_stream()
2394 playbin->audio_pending_flush_finish = TRUE; in gst_play_bin_set_current_audio_stream()
2411 GST_PLAY_BIN_UNLOCK (playbin); in gst_play_bin_set_current_audio_stream()
2412 GST_WARNING_OBJECT (playbin, in gst_play_bin_set_current_audio_stream()
2418 GST_PLAY_BIN_UNLOCK (playbin); in gst_play_bin_set_current_audio_stream()
2419 GST_DEBUG_OBJECT (playbin, "can't switch audio, we have no channels"); in gst_play_bin_set_current_audio_stream()
2476 source_combine_remove_pads (GstPlayBin * playbin, GstSourceCombine * combine) in source_combine_remove_pads() argument
2479 GST_LOG_OBJECT (playbin, "unlinking from sink"); in source_combine_remove_pads()
2483 GST_LOG_OBJECT (playbin, "release sink pad"); in source_combine_remove_pads()
2484 gst_play_sink_release_pad (playbin->playsink, combine->sinkpad); in source_combine_remove_pads()
2580 gst_play_bin_substream_is_internal (GstPlayBin * playbin, gint stream) in gst_play_bin_substream_is_internal() argument
2582 g_return_val_if_fail (playbin != NULL, FALSE); in gst_play_bin_substream_is_internal()
2588 tag_list = gst_play_bin_get_text_tags (playbin, stream); in gst_play_bin_substream_is_internal()
2596 GST_WARNING_OBJECT (playbin, "get text tags failed"); in gst_play_bin_substream_is_internal()
2627 gst_play_bin_get_current_position (GstPlayBin * playbin) in gst_play_bin_get_current_position() argument
2633 GST_DEBUG_OBJECT (playbin, "query position failed"); in gst_play_bin_get_current_position()
2636 gboolean ret = gst_element_query (GST_ELEMENT_CAST(playbin), query); in gst_play_bin_get_current_position()
2648 gst_play_bin_suburidecodebin_seek_to_current_pos (GstPlayBin * playbin, GstPad * srcpad) in gst_play_bin_suburidecodebin_seek_to_current_pos() argument
2650 g_return_if_fail ((playbin != NULL) && (srcpad != NULL)); in gst_play_bin_suburidecodebin_seek_to_current_pos()
2655 position = gst_play_bin_get_current_position (playbin); in gst_play_bin_suburidecodebin_seek_to_current_pos()
2657 … GST_INFO_OBJECT (playbin, "get the current position %" GST_TIME_FORMAT, GST_TIME_ARGS (position)); in gst_play_bin_suburidecodebin_seek_to_current_pos()
2659 GST_WARNING_OBJECT (playbin, "get the current position failed"); in gst_play_bin_suburidecodebin_seek_to_current_pos()
2669 check_seek_suburidecodebin (GstPlayBin * playbin, GstObject * combiner, GstPad * sinkpad, gboolean … in check_seek_suburidecodebin() argument
2674 GstSourceGroup *group = get_group (playbin); in check_seek_suburidecodebin()
2686 playbin->text_pending_flush_finish = TRUE; in check_seek_suburidecodebin()
2691 gst_play_bin_suburidecodebin_seek_to_current_pos (playbin, peer); in check_seek_suburidecodebin()
2697 gst_play_bin_set_current_text_stream (GstPlayBin * playbin, gint stream) in gst_play_bin_set_current_text_stream() argument
2699 g_return_val_if_fail (playbin != NULL, FALSE); in gst_play_bin_set_current_text_stream()
2706 GST_PLAY_BIN_LOCK (playbin); in gst_play_bin_set_current_text_stream()
2707 …GST_DEBUG_OBJECT (playbin, "Changing current text stream %d -> %d", playbin->current_text, stream); in gst_play_bin_set_current_text_stream()
2708 group = get_group (playbin); in gst_play_bin_set_current_text_stream()
2720 internal = gst_play_bin_substream_is_internal (playbin, stream); in gst_play_bin_set_current_text_stream()
2722 GST_PLAY_BIN_UNLOCK (playbin); in gst_play_bin_set_current_text_stream()
2726 check_seek_suburidecodebin (playbin, combiner, sinkpad, internal); in gst_play_bin_set_current_text_stream()
2733 GST_PLAY_BIN_UNLOCK (playbin); in gst_play_bin_set_current_text_stream()
2734 GST_WARNING_OBJECT (playbin, in gst_play_bin_set_current_text_stream()
2738 GST_PLAY_BIN_UNLOCK (playbin); in gst_play_bin_set_current_text_stream()
2744 get_active_text_stream_index (GstPlayBin * playbin) in get_active_text_stream_index() argument
2746 g_return_val_if_fail (playbin != NULL, -1); in get_active_text_stream_index()
2750 GstSourceGroup *group = get_group (playbin); in get_active_text_stream_index()
2754 taglist = gst_play_bin_get_text_tags (playbin, index); in get_active_text_stream_index()
2764 set_current_text_stream_without_seek (GstPlayBin * playbin, gint index) in set_current_text_stream_without_seek() argument
2766 g_return_if_fail (playbin != NULL); in set_current_text_stream_without_seek()
2771 GstSourceGroup *group = get_group (playbin); in set_current_text_stream_without_seek()
2776 GST_WARNING_OBJECT (playbin, "index %d is out of array range", index); in set_current_text_stream_without_seek()
2781 GST_WARNING_OBJECT (playbin, "can get sinkpad index %d from text_channels", index); in set_current_text_stream_without_seek()
2787 GST_DEBUG_OBJECT (playbin, "set current text stream %d", index); in set_current_text_stream_without_seek()
2794 gst_play_bin_set_current_text_stream (GstPlayBin * playbin, gint stream) in gst_play_bin_set_current_text_stream() argument
2800 GST_PLAY_BIN_LOCK (playbin); in gst_play_bin_set_current_text_stream()
2802 GST_DEBUG_OBJECT (playbin, "Changing current text stream %d -> %d", in gst_play_bin_set_current_text_stream()
2803 playbin->current_text, stream); in gst_play_bin_set_current_text_stream()
2805 group = get_group (playbin); in gst_play_bin_set_current_text_stream()
2820 GST_PLAY_BIN_UNLOCK (playbin); in gst_play_bin_set_current_text_stream()
2871 playbin->text_pending_flush_finish = TRUE; in gst_play_bin_set_current_text_stream()
2896 GST_PLAY_BIN_UNLOCK (playbin); in gst_play_bin_set_current_text_stream()
2897 GST_WARNING_OBJECT (playbin, in gst_play_bin_set_current_text_stream()
2903 GST_PLAY_BIN_UNLOCK (playbin); in gst_play_bin_set_current_text_stream()
2910 gst_play_bin_set_sink (GstPlayBin * playbin, GstPlaySinkType type, in gst_play_bin_set_sink() argument
2913 GST_INFO_OBJECT (playbin, "Setting %s sink to %" GST_PTR_FORMAT, dbg, sink); in gst_play_bin_set_sink()
2915 gst_play_sink_set_sink (playbin->playsink, type, sink); in gst_play_bin_set_sink()
2923 gst_play_bin_set_stream_combiner (GstPlayBin * playbin, GstElement ** elem, in gst_play_bin_set_stream_combiner() argument
2926 GST_INFO_OBJECT (playbin, "Setting %s stream combiner to %" GST_PTR_FORMAT, in gst_play_bin_set_stream_combiner()
2929 GST_PLAY_BIN_LOCK (playbin); in gst_play_bin_set_stream_combiner()
2941 GST_LOG_OBJECT (playbin, "%s stream combiner now %" GST_PTR_FORMAT, dbg, in gst_play_bin_set_stream_combiner()
2943 GST_PLAY_BIN_UNLOCK (playbin); in gst_play_bin_set_stream_combiner()
2947 gst_play_bin_set_encoding (GstPlayBin * playbin, const gchar * encoding) in gst_play_bin_set_encoding() argument
2951 GST_PLAY_BIN_LOCK (playbin); in gst_play_bin_set_encoding()
2954 if ((elem = playbin->groups[0].uridecodebin)) in gst_play_bin_set_encoding()
2956 if ((elem = playbin->groups[0].suburidecodebin)) in gst_play_bin_set_encoding()
2958 if ((elem = playbin->groups[1].uridecodebin)) in gst_play_bin_set_encoding()
2960 if ((elem = playbin->groups[1].suburidecodebin)) in gst_play_bin_set_encoding()
2963 gst_play_sink_set_subtitle_encoding (playbin->playsink, encoding); in gst_play_bin_set_encoding()
2964 GST_PLAY_BIN_UNLOCK (playbin); in gst_play_bin_set_encoding()
2971 GstPlayBin *playbin = GST_PLAY_BIN (object); in gst_play_bin_set_property() local
2975 gst_play_bin_set_uri (playbin, g_value_get_string (value)); in gst_play_bin_set_property()
2978 gst_play_bin_set_suburi (playbin, g_value_get_string (value)); in gst_play_bin_set_property()
2981 gst_play_bin_set_flags (playbin, g_value_get_flags (value)); in gst_play_bin_set_property()
2982 if (playbin->curr_group) { in gst_play_bin_set_property()
2983 GST_SOURCE_GROUP_LOCK (playbin->curr_group); in gst_play_bin_set_property()
2984 if (playbin->curr_group->uridecodebin) { in gst_play_bin_set_property()
2986 g_object_set (playbin->curr_group->uridecodebin, in gst_play_bin_set_property()
2991 GST_SOURCE_GROUP_UNLOCK (playbin->curr_group); in gst_play_bin_set_property()
2995 gst_play_bin_set_current_video_stream (playbin, g_value_get_int (value)); in gst_play_bin_set_property()
3000 if (gst_play_bin_set_current_audio_stream (playbin, g_value_get_int (value))) { in gst_play_bin_set_property()
3001 playbin->currentAudio = g_value_get_int (value); in gst_play_bin_set_property()
3004 gst_play_bin_set_current_audio_stream (playbin, g_value_get_int (value)); in gst_play_bin_set_property()
3008 gst_play_bin_set_current_text_stream (playbin, g_value_get_int (value)); in gst_play_bin_set_property()
3011 gst_play_bin_set_encoding (playbin, g_value_get_string (value)); in gst_play_bin_set_property()
3014 gst_play_sink_set_filter (playbin->playsink, GST_PLAY_SINK_TYPE_VIDEO, in gst_play_bin_set_property()
3018 gst_play_sink_set_filter (playbin->playsink, GST_PLAY_SINK_TYPE_AUDIO, in gst_play_bin_set_property()
3022 gst_play_bin_set_sink (playbin, GST_PLAY_SINK_TYPE_VIDEO, "video", in gst_play_bin_set_property()
3023 &playbin->video_sink, g_value_get_object (value)); in gst_play_bin_set_property()
3026 gst_play_bin_set_sink (playbin, GST_PLAY_SINK_TYPE_AUDIO, "audio", in gst_play_bin_set_property()
3027 &playbin->audio_sink, g_value_get_object (value)); in gst_play_bin_set_property()
3030 gst_play_sink_set_vis_plugin (playbin->playsink, in gst_play_bin_set_property()
3034 gst_play_bin_set_sink (playbin, GST_PLAY_SINK_TYPE_TEXT, "text", in gst_play_bin_set_property()
3035 &playbin->text_sink, g_value_get_object (value)); in gst_play_bin_set_property()
3038 gst_play_bin_set_stream_combiner (playbin, in gst_play_bin_set_property()
3039 &playbin->video_stream_combiner, "video", g_value_get_object (value)); in gst_play_bin_set_property()
3042 gst_play_bin_set_stream_combiner (playbin, in gst_play_bin_set_property()
3043 &playbin->audio_stream_combiner, "audio", g_value_get_object (value)); in gst_play_bin_set_property()
3046 gst_play_bin_set_stream_combiner (playbin, in gst_play_bin_set_property()
3047 &playbin->text_stream_combiner, "text", g_value_get_object (value)); in gst_play_bin_set_property()
3050 gst_play_sink_set_volume (playbin->playsink, g_value_get_double (value)); in gst_play_bin_set_property()
3053 gst_play_sink_set_mute (playbin->playsink, g_value_get_boolean (value)); in gst_play_bin_set_property()
3056 gst_play_sink_set_font_desc (playbin->playsink, in gst_play_bin_set_property()
3060 GST_PLAY_BIN_LOCK (playbin); in gst_play_bin_set_property()
3061 playbin->connection_speed = g_value_get_uint64 (value) * 1000; in gst_play_bin_set_property()
3062 GST_PLAY_BIN_UNLOCK (playbin); in gst_play_bin_set_property()
3065 if (playbin->curr_group && playbin->curr_group->uridecodebin) { in gst_play_bin_set_property()
3066 …g_object_set (playbin->curr_group->uridecodebin, "connection-speed", g_value_get_uint64 (value), N… in gst_play_bin_set_property()
3071 playbin->buffer_size = g_value_get_int (value); in gst_play_bin_set_property()
3076 playbin->buffer_duration = g_value_get_uint64 (value); in gst_play_bin_set_property()
3078 playbin->buffer_duration = g_value_get_int64 (value); in gst_play_bin_set_property()
3082 gst_play_sink_set_av_offset (playbin->playsink, in gst_play_bin_set_property()
3086 gst_play_sink_set_text_offset (playbin->playsink, in gst_play_bin_set_property()
3090 playbin->ring_buffer_max_size = g_value_get_uint64 (value); in gst_play_bin_set_property()
3091 if (playbin->curr_group) { in gst_play_bin_set_property()
3092 GST_SOURCE_GROUP_LOCK (playbin->curr_group); in gst_play_bin_set_property()
3093 if (playbin->curr_group->uridecodebin) { in gst_play_bin_set_property()
3094 g_object_set (playbin->curr_group->uridecodebin, in gst_play_bin_set_property()
3095 "ring-buffer-max-size", playbin->ring_buffer_max_size, NULL); in gst_play_bin_set_property()
3097 GST_SOURCE_GROUP_UNLOCK (playbin->curr_group); in gst_play_bin_set_property()
3101 g_object_set (playbin->playsink, "force-aspect-ratio", in gst_play_bin_set_property()
3105 GST_PLAY_BIN_LOCK (playbin); in gst_play_bin_set_property()
3106 playbin->multiview_mode = g_value_get_enum (value); in gst_play_bin_set_property()
3107 GST_PLAY_BIN_UNLOCK (playbin); in gst_play_bin_set_property()
3110 GST_PLAY_BIN_LOCK (playbin); in gst_play_bin_set_property()
3111 playbin->multiview_flags = g_value_get_flags (value); in gst_play_bin_set_property()
3112 GST_PLAY_BIN_UNLOCK (playbin); in gst_play_bin_set_property()
3117 if (playbin->curr_group) { in gst_play_bin_set_property()
3118 GST_SOURCE_GROUP_LOCK (playbin->curr_group); in gst_play_bin_set_property()
3119 if (playbin->curr_group->uridecodebin) { in gst_play_bin_set_property()
3120 … g_object_set (playbin->curr_group->uridecodebin, "state-change", g_value_get_int (value), NULL); in gst_play_bin_set_property()
3122 GST_SOURCE_GROUP_UNLOCK (playbin->curr_group); in gst_play_bin_set_property()
3126 if (playbin->curr_group != NULL) { in gst_play_bin_set_property()
3127 GST_SOURCE_GROUP_LOCK (playbin->curr_group); in gst_play_bin_set_property()
3128 if (playbin->curr_group->uridecodebin) { in gst_play_bin_set_property()
3129 … g_object_set (playbin->curr_group->uridecodebin, "exit-block", g_value_get_int (value), NULL); in gst_play_bin_set_property()
3131 GST_SOURCE_GROUP_UNLOCK (playbin->curr_group); in gst_play_bin_set_property()
3135 playbin->low_percent = g_value_get_int (value); in gst_play_bin_set_property()
3138 playbin->high_percent = g_value_get_int (value); in gst_play_bin_set_property()
3142 GstPlayFlags flags = gst_play_bin_get_flags (playbin); in gst_play_bin_set_property()
3144 gst_play_bin_set_flags (playbin, flags); in gst_play_bin_set_property()
3151 if (playbin->curr_group != NULL) { in gst_play_bin_set_property()
3152 GST_SOURCE_GROUP_LOCK (playbin->curr_group); in gst_play_bin_set_property()
3153 if (playbin->curr_group->uridecodebin) { in gst_play_bin_set_property()
3154 …g_object_set (playbin->curr_group->uridecodebin, "reconnection-timeout", g_value_get_uint (value),… in gst_play_bin_set_property()
3156 GST_SOURCE_GROUP_UNLOCK (playbin->curr_group); in gst_play_bin_set_property()
3164 gst_play_bin_add_suburi (playbin, g_value_get_string (value)); in gst_play_bin_set_property()
3175 gst_play_bin_get_current_sink (GstPlayBin * playbin, GstElement ** elem, in gst_play_bin_get_current_sink() argument
3178 GstElement *sink = gst_play_sink_get_sink (playbin->playsink, type); in gst_play_bin_get_current_sink()
3180 GST_LOG_OBJECT (playbin, "play_sink_get_sink() returned %s sink %" in gst_play_bin_get_current_sink()
3185 GST_PLAY_BIN_LOCK (playbin); in gst_play_bin_get_current_sink()
3188 GST_PLAY_BIN_UNLOCK (playbin); in gst_play_bin_get_current_sink()
3195 gst_play_bin_get_current_stream_combiner (GstPlayBin * playbin, in gst_play_bin_get_current_stream_combiner() argument
3200 GST_PLAY_BIN_LOCK (playbin); in gst_play_bin_get_current_stream_combiner()
3201 if ((combiner = playbin->curr_group->combiner[stream_type].combiner)) in gst_play_bin_get_current_stream_combiner()
3205 GST_PLAY_BIN_UNLOCK (playbin); in gst_play_bin_get_current_stream_combiner()
3236 GstPlayBin *playbin = GST_PLAY_BIN (object); in gst_play_bin_get_property() local
3243 GST_PLAY_BIN_LOCK (playbin); in gst_play_bin_get_property()
3244 group = playbin->next_group; in gst_play_bin_get_property()
3246 GST_PLAY_BIN_UNLOCK (playbin); in gst_play_bin_get_property()
3253 GST_PLAY_BIN_LOCK (playbin); in gst_play_bin_get_property()
3254 group = get_group (playbin); in gst_play_bin_get_property()
3256 GST_PLAY_BIN_UNLOCK (playbin); in gst_play_bin_get_property()
3263 GST_PLAY_BIN_LOCK (playbin); in gst_play_bin_get_property()
3264 group = playbin->next_group; in gst_play_bin_get_property()
3266 GST_PLAY_BIN_UNLOCK (playbin); in gst_play_bin_get_property()
3273 GST_PLAY_BIN_LOCK (playbin); in gst_play_bin_get_property()
3274 group = get_group (playbin); in gst_play_bin_get_property()
3276 GST_PLAY_BIN_UNLOCK (playbin); in gst_play_bin_get_property()
3281 GST_OBJECT_LOCK (playbin); in gst_play_bin_get_property()
3282 g_value_set_object (value, playbin->source); in gst_play_bin_get_property()
3283 GST_OBJECT_UNLOCK (playbin); in gst_play_bin_get_property()
3287 g_value_set_flags (value, gst_play_bin_get_flags (playbin)); in gst_play_bin_get_property()
3294 GST_PLAY_BIN_LOCK (playbin); in gst_play_bin_get_property()
3295 group = get_group (playbin); in gst_play_bin_get_property()
3298 GST_PLAY_BIN_UNLOCK (playbin); in gst_play_bin_get_property()
3302 GST_PLAY_BIN_LOCK (playbin); in gst_play_bin_get_property()
3303 g_value_set_int (value, playbin->current_video); in gst_play_bin_get_property()
3304 GST_PLAY_BIN_UNLOCK (playbin); in gst_play_bin_get_property()
3311 GST_PLAY_BIN_LOCK (playbin); in gst_play_bin_get_property()
3312 group = get_group (playbin); in gst_play_bin_get_property()
3315 GST_PLAY_BIN_UNLOCK (playbin); in gst_play_bin_get_property()
3319 GST_PLAY_BIN_LOCK (playbin); in gst_play_bin_get_property()
3320 g_value_set_int (value, playbin->current_audio); in gst_play_bin_get_property()
3321 GST_PLAY_BIN_UNLOCK (playbin); in gst_play_bin_get_property()
3328 GST_PLAY_BIN_LOCK (playbin); in gst_play_bin_get_property()
3329 group = get_group (playbin); in gst_play_bin_get_property()
3332 GST_PLAY_BIN_UNLOCK (playbin); in gst_play_bin_get_property()
3336 GST_PLAY_BIN_LOCK (playbin); in gst_play_bin_get_property()
3337 g_value_set_int (value, playbin->current_text); in gst_play_bin_get_property()
3338 GST_PLAY_BIN_UNLOCK (playbin); in gst_play_bin_get_property()
3341 GST_PLAY_BIN_LOCK (playbin); in gst_play_bin_get_property()
3343 gst_play_sink_get_subtitle_encoding (playbin->playsink)); in gst_play_bin_get_property()
3344 GST_PLAY_BIN_UNLOCK (playbin); in gst_play_bin_get_property()
3348 gst_play_sink_get_filter (playbin->playsink, in gst_play_bin_get_property()
3353 gst_play_sink_get_filter (playbin->playsink, in gst_play_bin_get_property()
3358 gst_play_bin_get_current_sink (playbin, &playbin->video_sink, in gst_play_bin_get_property()
3363 gst_play_bin_get_current_sink (playbin, &playbin->audio_sink, in gst_play_bin_get_property()
3368 gst_play_sink_get_vis_plugin (playbin->playsink)); in gst_play_bin_get_property()
3372 gst_play_bin_get_current_sink (playbin, &playbin->text_sink, in gst_play_bin_get_property()
3377 gst_play_bin_get_current_stream_combiner (playbin, in gst_play_bin_get_property()
3378 &playbin->video_stream_combiner, "video", PLAYBIN_STREAM_VIDEO)); in gst_play_bin_get_property()
3382 gst_play_bin_get_current_stream_combiner (playbin, in gst_play_bin_get_property()
3383 &playbin->audio_stream_combiner, "audio", PLAYBIN_STREAM_AUDIO)); in gst_play_bin_get_property()
3387 gst_play_bin_get_current_stream_combiner (playbin, in gst_play_bin_get_property()
3388 &playbin->text_stream_combiner, "text", PLAYBIN_STREAM_TEXT)); in gst_play_bin_get_property()
3391 g_value_set_double (value, gst_play_sink_get_volume (playbin->playsink)); in gst_play_bin_get_property()
3394 g_value_set_boolean (value, gst_play_sink_get_mute (playbin->playsink)); in gst_play_bin_get_property()
3398 gst_play_sink_get_last_sample (playbin->playsink)); in gst_play_bin_get_property()
3402 gst_play_sink_get_font_desc (playbin->playsink)); in gst_play_bin_get_property()
3405 GST_PLAY_BIN_LOCK (playbin); in gst_play_bin_get_property()
3406 g_value_set_uint64 (value, playbin->connection_speed / 1000); in gst_play_bin_get_property()
3407 GST_PLAY_BIN_UNLOCK (playbin); in gst_play_bin_get_property()
3410 GST_OBJECT_LOCK (playbin); in gst_play_bin_get_property()
3411 g_value_set_int (value, playbin->buffer_size); in gst_play_bin_get_property()
3412 GST_OBJECT_UNLOCK (playbin); in gst_play_bin_get_property()
3415 GST_OBJECT_LOCK (playbin); in gst_play_bin_get_property()
3418 g_value_set_uint64 (value, playbin->buffer_duration); in gst_play_bin_get_property()
3420 g_value_set_int64 (value, playbin->buffer_duration); in gst_play_bin_get_property()
3422 GST_OBJECT_UNLOCK (playbin); in gst_play_bin_get_property()
3426 gst_play_sink_get_av_offset (playbin->playsink)); in gst_play_bin_get_property()
3430 gst_play_sink_get_text_offset (playbin->playsink)); in gst_play_bin_get_property()
3433 g_value_set_uint64 (value, playbin->ring_buffer_max_size); in gst_play_bin_get_property()
3438 g_object_get (playbin->playsink, "force-aspect-ratio", &v, NULL); in gst_play_bin_get_property()
3443 GST_OBJECT_LOCK (playbin); in gst_play_bin_get_property()
3444 g_value_set_enum (value, playbin->multiview_mode); in gst_play_bin_get_property()
3445 GST_OBJECT_UNLOCK (playbin); in gst_play_bin_get_property()
3448 GST_OBJECT_LOCK (playbin); in gst_play_bin_get_property()
3449 g_value_set_flags (value, playbin->multiview_flags); in gst_play_bin_get_property()
3450 GST_OBJECT_UNLOCK (playbin); in gst_play_bin_get_property()
3455 g_value_set_int (value, playbin->low_percent); in gst_play_bin_get_property()
3458 g_value_set_int (value, playbin->high_percent); in gst_play_bin_get_property()
3466 group = get_group (playbin); in gst_play_bin_get_property()
3481 gst_play_bin_update_cached_duration_from_query (GstPlayBin * playbin, in gst_play_bin_update_cached_duration_from_query() argument
3488 GST_DEBUG_OBJECT (playbin, "Updating cached duration from query"); in gst_play_bin_update_cached_duration_from_query()
3491 for (i = 0; i < G_N_ELEMENTS (playbin->duration); i++) { in gst_play_bin_update_cached_duration_from_query()
3492 if (playbin->duration[i].format == 0 || fmt == playbin->duration[i].format) { in gst_play_bin_update_cached_duration_from_query()
3493 playbin->duration[i].valid = valid; in gst_play_bin_update_cached_duration_from_query()
3494 playbin->duration[i].format = fmt; in gst_play_bin_update_cached_duration_from_query()
3495 playbin->duration[i].duration = valid ? duration : -1; in gst_play_bin_update_cached_duration_from_query()
3502 gst_play_bin_update_cached_duration (GstPlayBin * playbin) in gst_play_bin_update_cached_duration() argument
3510 GST_DEBUG_OBJECT (playbin, "Updating cached durations before group switch"); in gst_play_bin_update_cached_duration()
3514 GST_ELEMENT_CLASS (parent_class)->query (GST_ELEMENT_CAST (playbin), in gst_play_bin_update_cached_duration()
3516 gst_play_bin_update_cached_duration_from_query (playbin, ret, query); in gst_play_bin_update_cached_duration()
3524 GstPlayBin *playbin = GST_PLAY_BIN (element); in gst_play_bin_query() local
3536 GST_PLAY_BIN_LOCK (playbin); in gst_play_bin_query()
3539 GstSourceGroup *group = playbin->curr_group; in gst_play_bin_query()
3552 for (i = 0; i < G_N_ELEMENTS (playbin->duration); i++) { in gst_play_bin_query()
3553 if (fmt == playbin->duration[i].format) { in gst_play_bin_query()
3554 ret = playbin->duration[i].valid; in gst_play_bin_query()
3556 (ret ? playbin->duration[i].duration : -1)); in gst_play_bin_query()
3563 GST_DEBUG_OBJECT (playbin, in gst_play_bin_query()
3566 GST_PLAY_BIN_UNLOCK (playbin); in gst_play_bin_query()
3576 gst_play_bin_update_cached_duration_from_query (playbin, ret, query); in gst_play_bin_query()
3577 GST_PLAY_BIN_UNLOCK (playbin); in gst_play_bin_query()
3612 post_add_substream_message (GstPlayBin * playbin, const gchar * uri) in post_add_substream_message() argument
3623 message = gst_message_new_element (GST_OBJECT_CAST (playbin), structure); in post_add_substream_message()
3625 gst_element_post_message (GST_ELEMENT_CAST (playbin), message); in post_add_substream_message()
3662 handle_message_error (GstPlayBin * playbin, GstBin * bin, GstMessage * msg) in handle_message_error() argument
3666 GstSourceGroup *group = playbin->curr_group; in handle_message_error()
3669 …if ((GST_STATE (playbin) == GST_STATE_PAUSED) && (GST_STATE_PENDING (playbin) == GST_STATE_READY) … in handle_message_error()
3671 …GST_WARNING_OBJECT (playbin, "receive an GST_STREAM_ERROR in GST_STATE_PAUSED or GST_STATE_READY s… in handle_message_error()
3689 post_add_substream_message (playbin, suburidecodebin_info->uri); in handle_message_error()
3730 GstPlayBin *playbin = GST_PLAY_BIN (bin); local
3754 group = playbin->curr_group;
3767 GST_DEBUG_OBJECT (playbin,
3774 GstSourceGroup *new_group = playbin->curr_group;
3785 GST_DEBUG_OBJECT (playbin, "Stream start from new group %p", new_group);
3788 GST_DEBUG_OBJECT (playbin, "Posting pending buffering message: %"
3794 GstSourceGroup *group = playbin->curr_group;
3805 GST_DEBUG_OBJECT (playbin, "Storing buffering message from pending group "
3817 msg = handle_message_error (playbin, bin, msg);
3819 group = playbin->curr_group;
3905 GST_PLAY_BIN_LOCK (playbin);
3906 if (playbin->next_group && playbin->next_group->valid) {
3907 GST_DEBUG_OBJECT (playbin,
3909 playbin->next_group->uri);
3911 GST_DEBUG_OBJECT (playbin,
3913 gst_play_bin_set_uri (playbin, uri);
3915 GST_PLAY_BIN_UNLOCK (playbin);
3917 setup_next_source (playbin, GST_STATE_PAUSED);
3931 GST_OBJECT_LOCK (playbin);
3932 for (iter = playbin->contexts; iter; iter = g_list_next (iter)) {
3941 GST_OBJECT_UNLOCK (playbin);
3952 gst_play_bin_update_context (playbin, context);
3955 if (playbin->is_live && GST_STATE_TARGET (playbin) == GST_STATE_PLAYING) {
3965 gst_element_change_state (GST_ELEMENT (playbin),
3971 gst_play_bin_deep_element_added (GstBin * playbin, GstBin * sub_bin, argument
3974 GST_LOG_OBJECT (playbin, "element %" GST_PTR_FORMAT " was added to "
3977 g_signal_emit (playbin, gst_play_bin_signals[SIGNAL_ELEMENT_SETUP], 0, child);
3979 GST_BIN_CLASS (parent_class)->deep_element_added (playbin, sub_bin, child);
3984 GstPlayBin * playbin) argument
3991 GST_PLAY_BIN_LOCK (playbin);
3992 group = get_group (playbin);
4002 GST_PLAY_BIN_UNLOCK (playbin);
4009 playbin->current_video = get_current_stream_number (playbin,
4012 if (playbin->video_pending_flush_finish) {
4013 playbin->video_pending_flush_finish = FALSE;
4014 GST_PLAY_BIN_UNLOCK (playbin);
4022 playbin->current_audio = get_current_stream_number (playbin,
4027 g_signal_emit (G_OBJECT (playbin), gst_play_bin_signals[SIGNAL_AUDIO_CHANGED], 0, NULL);
4028 GST_DEBUG_OBJECT (playbin, "audio active pad changed %d", playbin->current_audio);
4031 if (playbin->audio_pending_flush_finish) {
4032 playbin->audio_pending_flush_finish = FALSE;
4033 GST_PLAY_BIN_UNLOCK (playbin);
4041 playbin->current_text = get_current_stream_number (playbin,
4045 g_signal_emit (G_OBJECT (playbin), gst_play_bin_signals[SIGNAL_TEXT_CHANGED], 0, NULL);
4046 GST_DEBUG_OBJECT (playbin, "text active pad changed %d", playbin->current_text);
4049 if (playbin->text_pending_flush_finish) {
4050 playbin->text_pending_flush_finish = FALSE;
4051 GST_PLAY_BIN_UNLOCK (playbin);
4060 GST_PLAY_BIN_UNLOCK (playbin);
4064 g_object_notify (G_OBJECT (playbin), property);
4068 update_video_multiview_caps (GstPlayBin * playbin, GstCaps * caps) argument
4077 GST_OBJECT_LOCK (playbin);
4078 mv_mode = (GstVideoMultiviewMode) playbin->multiview_mode;
4079 mv_flags = playbin->multiview_flags;
4080 GST_OBJECT_UNLOCK (playbin);
4097 GST_INFO_OBJECT (playbin, "Cannot override existing multiview mode");
4191 caps = update_video_multiview_caps (group->playbin, caps);
4225 GstPlayBin *playbin; member
4236 GST_DEBUG_OBJECT (ntdata->playbin, "Tags on pad %" GST_PTR_FORMAT
4256 g_signal_emit (G_OBJECT (ntdata->playbin), gst_play_bin_signals[signal], 0,
4266 GstPlayBin *playbin; local
4278 playbin = group->playbin;
4280 GST_PLAY_BIN_SHUTDOWN_LOCK (playbin, shutdown);
4288 GST_DEBUG_OBJECT (playbin,
4313 custom_combiner = playbin->audio_stream_combiner;
4315 custom_combiner = playbin->text_stream_combiner;
4317 custom_combiner = playbin->video_stream_combiner;
4324 GST_PLAY_BIN_SHUTDOWN_UNLOCK (playbin);
4329 if (combine->combiner == NULL && playbin->have_selector) {
4331 GST_DEBUG_OBJECT (playbin, "creating new input selector");
4339 playbin->have_selector = FALSE;
4340 gst_element_post_message (GST_ELEMENT_CAST (playbin),
4341 gst_missing_element_message_new (GST_ELEMENT_CAST (playbin),
4343 GST_ELEMENT_WARNING (playbin, CORE, MISSING_PLUGIN,
4369 G_CALLBACK (combiner_active_pad_changed), playbin);
4371 GST_DEBUG_OBJECT (playbin, "adding new stream combiner %p",
4374 gst_bin_add (GST_BIN_CAST (playbin), combine->combiner);
4378 GST_PLAY_BIN_SHUTDOWN_UNLOCK (playbin);
4393 GST_DEBUG_OBJECT (playbin, "blocking %" GST_PTR_FORMAT, combine->srcpad);
4404 GST_DEBUG_OBJECT (playbin, "got pad %s:%s from combiner",
4426 ntdata->playbin = playbin;
4439 GST_DEBUG_OBJECT (playbin, "pad %p added to array", sinkpad);
4450 GST_DEBUG_OBJECT (playbin, "linked pad %s:%s to combiner %p",
4504 g_signal_emit (G_OBJECT (playbin), gst_play_bin_signals[signal], 0, NULL);
4515 GST_ERROR_OBJECT (playbin, "unknown type %s for pad %s:%s",
4521 GST_ERROR_OBJECT (playbin,
4528 GST_ELEMENT_ERROR (playbin, CORE, PAD,
4546 GstPlayBin *playbin; local
4553 playbin = group->playbin;
4555 GST_DEBUG_OBJECT (playbin,
4570 source_combine_remove_pads (playbin, combine);
4599 GST_DEBUG_OBJECT (playbin, "pad %p removed from array", peer);
4617 GST_DEBUG_OBJECT (playbin, "all combiner sinkpads removed");
4618 GST_DEBUG_OBJECT (playbin, "removing combiner %p", combine->combiner);
4619 source_combine_remove_pads (playbin, combine);
4621 gst_bin_remove (GST_BIN_CAST (playbin), combine->combiner);
4636 g_signal_emit (G_OBJECT (playbin), gst_play_bin_signals[signal], 0, NULL);
4643 GST_DEBUG_OBJECT (playbin, "pad not linked");
4660 GstPlayBin *playbin; local
4669 playbin = group->playbin;
4671 GST_DEBUG_OBJECT (playbin, "no more pads in group %p", group);
4673 GST_PLAY_BIN_SHUTDOWN_LOCK (playbin, shutdown);
4684 GST_DEBUG_OBJECT (playbin, "requesting new sink pad %d", combine->type);
4686 gst_play_sink_request_pad (playbin->playsink, combine->type);
4689 GST_DEBUG_OBJECT (playbin, "refreshing new sink pad %d", combine->type);
4693 gst_play_sink_refresh_pad (playbin->playsink, combine->sinkpad,
4697 gst_play_sink_refresh_pad (playbin->playsink, combine->sinkpad,
4701 GST_DEBUG_OBJECT (playbin, "releasing sink pad %d", combine->type);
4702 gst_play_sink_release_pad (playbin->playsink, combine->sinkpad);
4709 GST_DEBUG_OBJECT (playbin, "linked type %s, result: %d",
4712 GST_ELEMENT_ERROR (playbin, CORE, PAD,
4720 if ((i == PLAYBIN_STREAM_AUDIO) && (playbin->currentAudio >= 0)) {
4721 GST_DEBUG_OBJECT (playbin, "Audio track configuration recovery %d", playbin->currentAudio);
4722 gst_play_bin_set_current_audio_stream (playbin, playbin->currentAudio);
4727 GST_DEBUG_OBJECT (playbin, "pending %d > %d", group->pending,
4744 GST_LOG_OBJECT (playbin, "last group complete");
4747 GST_LOG_OBJECT (playbin, "have more pending groups");
4758 gint index = get_active_text_stream_index (playbin);
4759 set_current_text_stream_without_seek (playbin, index);
4768 GST_INFO_OBJECT (playbin, "setting custom audio sink %" GST_PTR_FORMAT,
4770 gst_play_sink_set_sink (playbin->playsink, GST_PLAY_SINK_TYPE_AUDIO,
4775 GST_INFO_OBJECT (playbin, "setting custom video sink %" GST_PTR_FORMAT,
4777 gst_play_sink_set_sink (playbin->playsink, GST_PLAY_SINK_TYPE_VIDEO,
4782 GST_INFO_OBJECT (playbin, "setting custom text sink %" GST_PTR_FORMAT,
4784 gst_play_sink_set_sink (playbin->playsink, GST_PLAY_SINK_TYPE_TEXT,
4797 GST_DEBUG_OBJECT (playbin, "unblocking %" GST_PTR_FORMAT,
4812 GST_DEBUG_OBJECT (playbin, "adding new subtitle for playsink pipeline");
4813 g_object_set (playbin->playsink, "add-new-subtitle", TRUE, NULL);
4816 gst_play_sink_reconfigure (playbin->playsink);
4819 GST_PLAY_BIN_SHUTDOWN_UNLOCK (playbin);
4822 do_async_done (playbin);
4840 GST_DEBUG_OBJECT (playbin, "requesting new flushing sink pad");
4842 gst_play_sink_request_pad (playbin->playsink,
4846 GST_DEBUG_OBJECT (playbin, "linked flushing, result: %d", res);
4848 GST_DEBUG_OBJECT (playbin, "unblocking %" GST_PTR_FORMAT,
4864 GstPlayBin *playbin; local
4866 playbin = group->playbin;
4868 GST_DEBUG_OBJECT (playbin, "about to finish in group %p", group);
4871 g_signal_emit (G_OBJECT (playbin),
4876 setup_next_source (playbin, GST_STATE_PAUSED);
4995 avelements_create (GstPlayBin * playbin, gboolean isaudioelement) argument
5038 gst_play_bin_get_flags (playbin), isaudioelement);
5169 GstPlayBin *playbin; local
5181 playbin = group->playbin;
5183 GST_DEBUG_OBJECT (playbin, "factories group %p for %s:%s, %" GST_PTR_FORMAT,
5187 g_mutex_lock (&playbin->elements_lock);
5188 gst_play_bin_update_elements_list (playbin);
5190 gst_element_factory_list_filter (playbin->elements, caps, GST_PAD_SINK,
5192 g_mutex_unlock (&playbin->elements_lock);
5194 GST_DEBUG_OBJECT (playbin, "found factories %p", factory_list);
5221 ave_list = &playbin->aelements;
5223 ave_list = &playbin->velements;
5225 flags = gst_play_bin_get_flags (playbin);
5227 g_mutex_lock (&playbin->elements_lock);
5230 g_mutex_unlock (&playbin->elements_lock);
5295 GstPlayBin *playbin = GST_PLAY_BIN (element); local
5307 return gst_element_send_event (GST_ELEMENT_CAST (playbin->playsink), event);
5316 GstPlayBin *playbin = GST_PLAY_BIN (element); local
5319 GST_PLAY_BIN_LOCK (playbin);
5320 if (playbin->audio_sink)
5321 gst_element_set_context (playbin->audio_sink, context);
5322 if (playbin->video_sink)
5323 gst_element_set_context (playbin->video_sink, context);
5324 if (playbin->text_sink)
5325 gst_element_set_context (playbin->text_sink, context);
5327 GST_SOURCE_GROUP_LOCK (playbin->curr_group);
5329 if (playbin->curr_group->audio_sink)
5330 gst_element_set_context (playbin->curr_group->audio_sink, context);
5331 if (playbin->curr_group->video_sink)
5332 gst_element_set_context (playbin->curr_group->video_sink, context);
5333 if (playbin->curr_group->text_sink)
5334 gst_element_set_context (playbin->curr_group->text_sink, context);
5336 GST_SOURCE_GROUP_UNLOCK (playbin->curr_group);
5337 GST_PLAY_BIN_UNLOCK (playbin);
5344 gst_play_bin_update_context (GstPlayBin * playbin, GstContext * context) argument
5349 GST_OBJECT_LOCK (playbin);
5351 for (l = playbin->contexts; l; l = l->next) {
5366 playbin->contexts =
5367 g_list_prepend (playbin->contexts, gst_context_ref (context));
5368 GST_OBJECT_UNLOCK (playbin);
5372 activate_sink_bus_handler (GstBus * bus, GstMessage * msg, GstPlayBin * playbin) argument
5377 if (playbin->audio_sink
5379 GST_OBJECT_CAST (playbin->audio_sink)))
5380 gst_element_post_message (GST_ELEMENT_CAST (playbin), msg);
5381 else if (playbin->video_sink
5383 GST_OBJECT_CAST (playbin->video_sink)))
5384 gst_element_post_message (GST_ELEMENT_CAST (playbin), msg);
5385 else if (playbin->text_sink
5387 GST_OBJECT_CAST (playbin->text_sink)))
5388 gst_element_post_message (GST_ELEMENT_CAST (playbin), msg);
5396 GST_OBJECT_LOCK (playbin);
5397 for (l = playbin->contexts; l; l = l->next) {
5406 GST_OBJECT_UNLOCK (playbin);
5410 gst_element_post_message (GST_ELEMENT_CAST (playbin), msg);
5418 gst_play_bin_update_context (playbin, context);
5421 gst_element_post_message (GST_ELEMENT_CAST (playbin), msg);
5423 gst_element_post_message (GST_ELEMENT_CAST (playbin), msg);
5431 activate_sink (GstPlayBin * playbin, GstElement * sink, gboolean * activated) argument
5452 (GstBusSyncHandler) activate_sink_bus_handler, playbin, NULL);
5516 GstPlayBin *playbin = group->playbin; local
5522 activate_sink (group->playbin, group->text_sink, &activated_sink)) {
5540 g_signal_emit (playbin, gst_play_bin_signals[SIGNAL_FIND_TEXT_PAD], 0, &ret);
5569 activate_sink (group->playbin, group->audio_sink, &activated_sink)) {
5588 && activate_sink (group->playbin, group->video_sink, &activated_sink)) {
5606 GST_DEBUG_OBJECT (group->playbin,
5614 sink_accepts_caps (GstPlayBin * playbin, GstElement * sink, GstCaps * caps) argument
5641 GstPlayBin *playbin; local
5652 playbin = group->playbin;
5654 GST_DEBUG_OBJECT (playbin, "select group %p for %s:%s, %" GST_PTR_FORMAT,
5657 GST_DEBUG_OBJECT (playbin, "checking factory %s", GST_OBJECT_NAME (factory));
5675 g_mutex_lock (&playbin->elements_lock);
5678 ave_seq = playbin->aelements;
5681 ave_seq = playbin->velements;
5721 GST_DEBUG_OBJECT (playbin,
5726 GST_WARNING_OBJECT (playbin,
5735 if (!activate_sink (playbin, *sinkp, NULL)) {
5738 GST_WARNING_OBJECT (playbin,
5760 GstPlayFlags flags = gst_play_bin_get_flags (playbin);
5807 GST_DEBUG_OBJECT (playbin, "%s not compatible with the fixed sink",
5821 g_mutex_unlock (&playbin->elements_lock);
5828 g_mutex_unlock (&playbin->elements_lock);
5834 GST_DEBUG_OBJECT (playbin, "we found a sink '%s'", GST_OBJECT_NAME (factory));
5841 GST_DEBUG_OBJECT (playbin, "we found an audio sink");
5845 GST_DEBUG_OBJECT (playbin, "we found a video sink");
5850 GST_WARNING_OBJECT (playbin, "unknown sink klass %s found", klass);
5856 if (gst_play_sink_get_flags (playbin->playsink) & GST_PLAY_FLAG_VIS) {
5858 GST_DEBUG_OBJECT (playbin, "skip audio sink because of vis");
5868 if (sink_accepts_caps (playbin, sink, caps)) {
5869 GST_DEBUG_OBJECT (playbin,
5876 GST_DEBUG_OBJECT (playbin,
5884 GST_DEBUG_OBJECT (playbin, "we have no pending sink, try to create '%s'",
5888 GST_WARNING_OBJECT (playbin, "Could not create an element from %s",
5902 if (!activate_sink (playbin, element, NULL)) {
5903 GST_WARNING_OBJECT (playbin, "Could not activate sink %s",
5913 if (!sink_accepts_caps (playbin, element, caps)) {
5925 GST_DEBUG_OBJECT (playbin, "remember sink");
5930 GST_DEBUG_OBJECT (playbin, "we found a working sink, expose pad");
6029 if ((sink = group->playbin->text_sink)) {
6199 if ((sink = group->playbin->text_sink)) {
6235 GstPlayBin *playbin; local
6238 playbin = group->playbin;
6242 GST_OBJECT_LOCK (playbin);
6243 if (playbin->source)
6244 gst_object_unref (playbin->source);
6245 playbin->source = source;
6246 GST_OBJECT_UNLOCK (playbin);
6248 g_object_notify (G_OBJECT (playbin), "source");
6255 GstPlayBin *playbin; local
6257 playbin = group->playbin;
6259 g_signal_emit (playbin, gst_play_bin_signals[SIGNAL_SOURCE_SETUP], 0, source);
6264 group_set_locked_state_unlocked (GstPlayBin * playbin, GstSourceGroup * group, argument
6267 GST_DEBUG_OBJECT (playbin, "locked_state %d on group %p", locked, group);
6282 if ((group == NULL) || (group->playbin == NULL)) {
6285 GstPlayBin *playbin = group->playbin; local
6286 GST_INFO_OBJECT (playbin, "in manifest parse complete");
6287 g_signal_emit (playbin, gst_play_bin_signals[SIGNAL_BITRATE_PARSE_COMPLETE], 0, input, num);
6288 GST_INFO_OBJECT (playbin, "out manifest parse complete");
6300 GstPlayBin *playbin = group->playbin; local
6301 g_return_if_fail (group != NULL && playbin != NULL);
6309 (void) gst_bin_add (GST_BIN_CAST (playbin), suburidecodebin);
6333 GstPlayBin *playbin = group->playbin; local
6334 g_return_if_fail (group != NULL && playbin != NULL);
6347 if (GST_OBJECT_PARENT (suburidecodeinfo->suburidecodebin) == GST_OBJECT_CAST (playbin)) {
6348 (void) gst_bin_remove (GST_BIN_CAST (playbin), suburidecodeinfo->suburidecodebin);
6380 get_suburidecodebin (GstPlayBin * playbin, GstSourceGroup * group) argument
6384 GST_DEBUG_OBJECT (playbin, "reusing existing suburidecodebin");
6391 (void) gst_bin_add (GST_BIN_CAST (playbin), suburidecodebin);
6394 GST_DEBUG_OBJECT (playbin, "making new suburidecodebin");
6399 (void) gst_bin_add (GST_BIN_CAST (playbin), suburidecodebin);
6403 "connection-speed", playbin->connection_speed,
6427 GST_WARNING_OBJECT (playbin, "append list fail");
6430 GST_INFO_OBJECT (playbin, "add suburidecodeInfo to suburidecodebin_list");
6438 activate_group (GstPlayBin * playbin, GstSourceGroup * group, GstState target) argument
6451 GST_DEBUG_OBJECT (playbin, "activating group %p", group);
6456 if (playbin->audio_sink)
6457 group->audio_sink = gst_object_ref (playbin->audio_sink);
6460 gst_play_sink_get_sink (playbin->playsink, GST_PLAY_SINK_TYPE_AUDIO);
6463 if (!activate_sink (playbin, group->audio_sink, &audio_sink_activated)) {
6464 if (group->audio_sink == playbin->audio_sink) {
6473 if (playbin->video_sink)
6474 group->video_sink = gst_object_ref (playbin->video_sink);
6477 gst_play_sink_get_sink (playbin->playsink, GST_PLAY_SINK_TYPE_VIDEO);
6480 if (!activate_sink (playbin, group->video_sink, &video_sink_activated)) {
6481 if (group->video_sink == playbin->video_sink) {
6490 if (playbin->text_sink)
6491 group->text_sink = gst_object_ref (playbin->text_sink);
6494 gst_play_sink_get_sink (playbin->playsink, GST_PLAY_SINK_TYPE_TEXT);
6497 if (!activate_sink (playbin, group->text_sink, &text_sink_activated)) {
6498 if (group->text_sink == playbin->text_sink) {
6513 GST_DEBUG_OBJECT (playbin, "reusing existing uridecodebin");
6519 gst_bin_add (GST_BIN_CAST (playbin), uridecodebin);
6521 GST_DEBUG_OBJECT (playbin, "making new uridecodebin");
6525 gst_bin_add (GST_BIN_CAST (playbin), uridecodebin);
6532 "low-percent", playbin->low_percent,
6533 "high-percent", playbin->high_percent, NULL);
6539 flags = gst_play_sink_get_flags (playbin->playsink);
6543 "connection-speed", playbin->connection_speed / 1000,
6553 "buffer-duration", playbin->buffer_duration,
6554 "buffer-size", playbin->buffer_size,
6555 "ring-buffer-max-size", playbin->ring_buffer_max_size, NULL);
6601 suburidecodebin = get_suburidecodebin (playbin, group);
6607 GST_DEBUG_OBJECT (playbin, "reusing existing suburidecodebin");
6613 gst_bin_add (GST_BIN_CAST (playbin), suburidecodebin);
6615 GST_DEBUG_OBJECT (playbin, "making new suburidecodebin");
6620 gst_bin_add (GST_BIN_CAST (playbin), suburidecodebin);
6627 "connection-speed", playbin->connection_speed,
6662 GST_DEBUG_OBJECT (playbin,
6682 if (GST_OBJECT_PARENT (suburidecodebin) == GST_OBJECT_CAST (playbin))
6683 gst_bin_remove (GST_BIN_CAST (playbin), suburidecodebin);
6701 group_set_locked_state_unlocked (playbin, group, FALSE);
6714 gst_missing_element_message_new (GST_ELEMENT_CAST (playbin),
6716 gst_element_post_message (GST_ELEMENT_CAST (playbin), msg);
6718 GST_ELEMENT_ERROR (playbin, CORE, MISSING_PLUGIN,
6727 GST_DEBUG_OBJECT (playbin, "failed state change of uridecodebin");
6733 GST_ERROR_OBJECT (playbin, "failed to activate sinks");
6781 gst_bin_remove (GST_BIN_CAST (playbin), uridecodebin);
6793 deactivate_group (GstPlayBin * playbin, GstSourceGroup * group) argument
6800 GST_DEBUG_OBJECT (playbin, "unlinking group %p", group);
6807 GST_DEBUG_OBJECT (playbin, "unlinking combiner %s", combine->media_list[0]);
6810 source_combine_remove_pads (playbin, combine);
6826 gst_bin_remove (GST_BIN_CAST (playbin), combine->combiner);
6834 GST_OBJECT_CAST (playbin->playsink))) {
6842 GST_OBJECT_CAST (playbin->playsink))) {
6850 GST_OBJECT_CAST (playbin->playsink))) {
6872 gst_bin_remove (GST_BIN_CAST (playbin), group->uridecodebin);
6887 if (GST_OBJECT_PARENT (group->suburidecodebin) == GST_OBJECT_CAST (playbin))
6888 gst_bin_remove (GST_BIN_CAST (playbin), group->suburidecodebin);
6903 setup_next_source (GstPlayBin * playbin, GstState target) argument
6908 GST_DEBUG_OBJECT (playbin, "setup sources");
6911 GST_PLAY_BIN_LOCK (playbin);
6912 new_group = playbin->next_group;
6917 old_group = playbin->curr_group;
6921 gst_play_bin_update_cached_duration (playbin);
6923 deactivate_group (playbin, old_group);
6928 playbin->curr_group = new_group;
6929 playbin->next_group = old_group;
6933 activate_group (playbin, new_group,
6937 GST_PLAY_BIN_UNLOCK (playbin);
6944 GST_DEBUG_OBJECT (playbin, "no next group");
6946 GST_ELEMENT_ERROR (playbin, RESOURCE, NOT_FOUND, ("No URI set"), (NULL));
6947 GST_PLAY_BIN_UNLOCK (playbin);
6953 GST_DEBUG_OBJECT (playbin, "activate failed");
6955 GST_PLAY_BIN_UNLOCK (playbin);
6964 save_current_group (GstPlayBin * playbin) argument
6968 GST_DEBUG_OBJECT (playbin, "save current group");
6971 GST_PLAY_BIN_LOCK (playbin);
6972 curr_group = playbin->curr_group;
6975 deactivate_group (playbin, curr_group);
6978 playbin->curr_group = playbin->next_group;
6979 playbin->next_group = curr_group;
6980 GST_PLAY_BIN_UNLOCK (playbin);
6988 groups_set_locked_state (GstPlayBin * playbin, gboolean locked) argument
6990 GST_DEBUG_OBJECT (playbin, "setting locked state to %d on all groups",
6993 GST_PLAY_BIN_LOCK (playbin);
6994 GST_SOURCE_GROUP_LOCK (playbin->curr_group);
6995 group_set_locked_state_unlocked (playbin, playbin->curr_group, locked);
6996 GST_SOURCE_GROUP_UNLOCK (playbin->curr_group);
6997 GST_SOURCE_GROUP_LOCK (playbin->next_group);
6998 group_set_locked_state_unlocked (playbin, playbin->next_group, locked);
6999 GST_SOURCE_GROUP_UNLOCK (playbin->next_group);
7000 GST_PLAY_BIN_UNLOCK (playbin);
7009 GstPlayBin *playbin; local
7012 playbin = GST_PLAY_BIN (element);
7016 memset (&playbin->duration, 0, sizeof (playbin->duration));
7019 GST_LOG_OBJECT (playbin, "clearing shutdown flag");
7020 memset (&playbin->duration, 0, sizeof (playbin->duration));
7021 g_atomic_int_set (&playbin->shutdown, 0);
7022 do_async_start (playbin);
7027 GST_LOG_OBJECT (playbin, "setting shutdown flag");
7028 g_atomic_int_set (&playbin->shutdown, 1);
7029 memset (&playbin->duration, 0, sizeof (playbin->duration));
7034 GST_PLAY_BIN_DYN_LOCK (playbin);
7035 GST_LOG_OBJECT (playbin, "dynamic lock taken, we can continue shutdown");
7036 GST_PLAY_BIN_DYN_UNLOCK (playbin);
7043 if (!g_atomic_int_get (&playbin->shutdown)) {
7047 memset (&playbin->duration, 0, sizeof (playbin->duration));
7050 groups_set_locked_state (playbin, FALSE);
7063 setup_next_source (playbin,
7071 do_async_done (playbin);
7075 playbin->is_live = FALSE;
7076 save_current_group (playbin);
7090 save_current_group (playbin);
7095 if (playbin->groups[i].active && playbin->groups[i].valid) {
7096 deactivate_group (playbin, &playbin->groups[i]);
7097 playbin->groups[i].valid = FALSE;
7100 if (playbin->groups[i].uridecodebin) {
7101 gst_element_set_state (playbin->groups[i].uridecodebin,
7103 gst_object_unref (playbin->groups[i].uridecodebin);
7104 playbin->groups[i].uridecodebin = NULL;
7109 if (playbin->groups[i].suburidecodebin_list) {
7110 suburidecodebin_list = playbin->groups[i].suburidecodebin_list;
7129 if (playbin->groups[i].suburidecodebin) {
7130 gst_element_set_state (playbin->groups[i].suburidecodebin,
7132 gst_object_unref (playbin->groups[i].suburidecodebin);
7133 playbin->groups[i].suburidecodebin = NULL;
7139 if (playbin->audio_sink)
7140 gst_element_set_state (playbin->audio_sink, GST_STATE_NULL);
7141 if (playbin->video_sink)
7142 gst_element_set_state (playbin->video_sink, GST_STATE_NULL);
7143 if (playbin->text_sink)
7144 gst_element_set_state (playbin->text_sink, GST_STATE_NULL);
7146 if (playbin->video_stream_combiner)
7147 gst_element_set_state (playbin->video_stream_combiner, GST_STATE_NULL);
7148 if (playbin->audio_stream_combiner)
7149 gst_element_set_state (playbin->audio_stream_combiner, GST_STATE_NULL);
7150 if (playbin->text_stream_combiner)
7151 gst_element_set_state (playbin->text_stream_combiner, GST_STATE_NULL);
7155 groups_set_locked_state (playbin, TRUE);
7158 GST_OBJECT_LOCK (playbin);
7159 for (l = playbin->contexts; l;) {
7168 playbin->contexts = g_list_delete_link (playbin->contexts, l);
7175 if (playbin->source) {
7176 gst_object_unref (playbin->source);
7177 playbin->source = NULL;
7180 GST_OBJECT_UNLOCK (playbin);
7188 playbin->is_live = ret == GST_STATE_CHANGE_NO_PREROLL;
7191 do_async_done (playbin);
7198 do_async_done (playbin);
7203 curr_group = playbin->curr_group;
7207 deactivate_group (playbin, curr_group);
7213 playbin->curr_group = playbin->next_group;
7214 playbin->next_group = curr_group;
7223 GstPlayBin *playbin = GST_PLAY_BIN (overlay); local
7225 gst_video_overlay_expose (GST_VIDEO_OVERLAY (playbin->playsink));
7232 GstPlayBin *playbin = GST_PLAY_BIN (overlay); local
7234 gst_video_overlay_handle_events (GST_VIDEO_OVERLAY (playbin->playsink),
7242 GstPlayBin *playbin = GST_PLAY_BIN (overlay); local
7244 gst_video_overlay_set_render_rectangle (GST_VIDEO_OVERLAY (playbin->playsink),
7252 GstPlayBin *playbin = GST_PLAY_BIN (overlay); local
7254 gst_video_overlay_set_window_handle (GST_VIDEO_OVERLAY (playbin->playsink),
7272 GstPlayBin *playbin = GST_PLAY_BIN (navigation); local
7274 gst_navigation_send_event (GST_NAVIGATION (playbin->playsink), structure);
7288 GstPlayBin *playbin = GST_PLAY_BIN (balance); local
7291 gst_color_balance_list_channels (GST_COLOR_BALANCE (playbin->playsink));
7298 GstPlayBin *playbin = GST_PLAY_BIN (balance); local
7300 gst_color_balance_set_value (GST_COLOR_BALANCE (playbin->playsink), channel,
7308 GstPlayBin *playbin = GST_PLAY_BIN (balance); local
7310 return gst_color_balance_get_value (GST_COLOR_BALANCE (playbin->playsink),
7317 GstPlayBin *playbin = GST_PLAY_BIN (balance); local
7321 (playbin->playsink));