gst/playback/: New decodebin2 element.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstdecodebin2.c: (gst_decode_bin_get_type),
(_gst_boolean_accumulator), (gst_decode_bin_class_init),
(gst_decode_bin_factory_filter), (compare_ranks), (print_feature),
(gst_decode_bin_init), (gst_decode_bin_dispose),
(gst_decode_bin_finalize), (gst_decode_bin_set_property),
(gst_decode_bin_get_property), (gst_decode_bin_set_caps),
(gst_decode_bin_get_caps), (gst_decode_bin_autoplug_continue),
(gst_decode_bin_autoplug_sort), (analyze_new_pad), (connect_pad),
(connect_element), (expose_pad), (type_found),
(pad_added_group_cb), (pad_removed_group_cb),
(no_more_pads_group_cb), (pad_added_cb), (pad_removed_cb),
(no_more_pads_cb), (find_compatibles), (is_demuxer_element),
(are_raw_caps), (multi_queue_overrun_cb),
(multi_queue_underrun_cb), (gst_decode_group_new),
(get_current_group), (group_demuxer_event_probe),
(gst_decode_group_control_demuxer_pad),
(gst_decode_group_control_source_pad),
(gst_decode_group_check_if_blocked),
(gst_decode_group_check_if_drained), (gst_decode_group_expose),
(gst_decode_group_hide), (gst_decode_group_free),
(gst_decode_group_set_complete), (source_pad_blocked_cb),
(source_pad_event_probe), (gst_decode_pad_new), (add_fakesink),
(remove_fakesink), (find_sink_pad), (gst_decode_bin_change_state),
(plugin_init):
New decodebin2 element.
Closes #370092
* gst/playback/gstplay-marshal.list:
Added marshallers for new signals in decodebin2
* gst/playback/gstplaybasebin.c: (setup_subtitle), (make_decoder):
Use decodebin2 if *and only if* the USE_DECODEBIN2 environment variable
is set.
2006-11-28 14:40:39 +00:00
|
|
|
/* GStreamer
|
|
|
|
* Copyright (C) <2006> Edward Hervey <edward@fluendo.com>
|
2009-09-26 10:17:49 +00:00
|
|
|
* Copyright (C) <2009> Sebastian Dröge <sebastian.droege@collabora.co.uk>
|
2011-06-26 13:40:17 +00:00
|
|
|
* Copyright (C) <2011> Hewlett-Packard Development Company, L.P.
|
|
|
|
* Author: Sebastian Dröge <sebastian.droege@collabora.co.uk>, Collabora Ltd.
|
2013-03-29 17:27:03 +00:00
|
|
|
* Copyright (C) <2013> Collabora Ltd.
|
|
|
|
* Author: Sebastian Dröge <sebastian.droege@collabora.co.uk>
|
gst/playback/: New decodebin2 element.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstdecodebin2.c: (gst_decode_bin_get_type),
(_gst_boolean_accumulator), (gst_decode_bin_class_init),
(gst_decode_bin_factory_filter), (compare_ranks), (print_feature),
(gst_decode_bin_init), (gst_decode_bin_dispose),
(gst_decode_bin_finalize), (gst_decode_bin_set_property),
(gst_decode_bin_get_property), (gst_decode_bin_set_caps),
(gst_decode_bin_get_caps), (gst_decode_bin_autoplug_continue),
(gst_decode_bin_autoplug_sort), (analyze_new_pad), (connect_pad),
(connect_element), (expose_pad), (type_found),
(pad_added_group_cb), (pad_removed_group_cb),
(no_more_pads_group_cb), (pad_added_cb), (pad_removed_cb),
(no_more_pads_cb), (find_compatibles), (is_demuxer_element),
(are_raw_caps), (multi_queue_overrun_cb),
(multi_queue_underrun_cb), (gst_decode_group_new),
(get_current_group), (group_demuxer_event_probe),
(gst_decode_group_control_demuxer_pad),
(gst_decode_group_control_source_pad),
(gst_decode_group_check_if_blocked),
(gst_decode_group_check_if_drained), (gst_decode_group_expose),
(gst_decode_group_hide), (gst_decode_group_free),
(gst_decode_group_set_complete), (source_pad_blocked_cb),
(source_pad_event_probe), (gst_decode_pad_new), (add_fakesink),
(remove_fakesink), (find_sink_pad), (gst_decode_bin_change_state),
(plugin_init):
New decodebin2 element.
Closes #370092
* gst/playback/gstplay-marshal.list:
Added marshallers for new signals in decodebin2
* gst/playback/gstplaybasebin.c: (setup_subtitle), (make_decoder):
Use decodebin2 if *and only if* the USE_DECODEBIN2 environment variable
is set.
2006-11-28 14:40:39 +00:00
|
|
|
*
|
|
|
|
* This library is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU Library General Public
|
|
|
|
* License as published by the Free Software Foundation; either
|
|
|
|
* version 2 of the License, or (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This library is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
|
* Library General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU Library General Public
|
|
|
|
* License along with this library; if not, write to the
|
2012-11-03 23:05:09 +00:00
|
|
|
* Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
|
|
|
|
* Boston, MA 02110-1301, USA.
|
gst/playback/: New decodebin2 element.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstdecodebin2.c: (gst_decode_bin_get_type),
(_gst_boolean_accumulator), (gst_decode_bin_class_init),
(gst_decode_bin_factory_filter), (compare_ranks), (print_feature),
(gst_decode_bin_init), (gst_decode_bin_dispose),
(gst_decode_bin_finalize), (gst_decode_bin_set_property),
(gst_decode_bin_get_property), (gst_decode_bin_set_caps),
(gst_decode_bin_get_caps), (gst_decode_bin_autoplug_continue),
(gst_decode_bin_autoplug_sort), (analyze_new_pad), (connect_pad),
(connect_element), (expose_pad), (type_found),
(pad_added_group_cb), (pad_removed_group_cb),
(no_more_pads_group_cb), (pad_added_cb), (pad_removed_cb),
(no_more_pads_cb), (find_compatibles), (is_demuxer_element),
(are_raw_caps), (multi_queue_overrun_cb),
(multi_queue_underrun_cb), (gst_decode_group_new),
(get_current_group), (group_demuxer_event_probe),
(gst_decode_group_control_demuxer_pad),
(gst_decode_group_control_source_pad),
(gst_decode_group_check_if_blocked),
(gst_decode_group_check_if_drained), (gst_decode_group_expose),
(gst_decode_group_hide), (gst_decode_group_free),
(gst_decode_group_set_complete), (source_pad_blocked_cb),
(source_pad_event_probe), (gst_decode_pad_new), (add_fakesink),
(remove_fakesink), (find_sink_pad), (gst_decode_bin_change_state),
(plugin_init):
New decodebin2 element.
Closes #370092
* gst/playback/gstplay-marshal.list:
Added marshallers for new signals in decodebin2
* gst/playback/gstplaybasebin.c: (setup_subtitle), (make_decoder):
Use decodebin2 if *and only if* the USE_DECODEBIN2 environment variable
is set.
2006-11-28 14:40:39 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
/**
|
2011-06-14 22:51:29 +00:00
|
|
|
* SECTION:element-decodebin
|
2017-01-23 19:36:11 +00:00
|
|
|
* @title: decodebin
|
gst/playback/: New decodebin2 element.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstdecodebin2.c: (gst_decode_bin_get_type),
(_gst_boolean_accumulator), (gst_decode_bin_class_init),
(gst_decode_bin_factory_filter), (compare_ranks), (print_feature),
(gst_decode_bin_init), (gst_decode_bin_dispose),
(gst_decode_bin_finalize), (gst_decode_bin_set_property),
(gst_decode_bin_get_property), (gst_decode_bin_set_caps),
(gst_decode_bin_get_caps), (gst_decode_bin_autoplug_continue),
(gst_decode_bin_autoplug_sort), (analyze_new_pad), (connect_pad),
(connect_element), (expose_pad), (type_found),
(pad_added_group_cb), (pad_removed_group_cb),
(no_more_pads_group_cb), (pad_added_cb), (pad_removed_cb),
(no_more_pads_cb), (find_compatibles), (is_demuxer_element),
(are_raw_caps), (multi_queue_overrun_cb),
(multi_queue_underrun_cb), (gst_decode_group_new),
(get_current_group), (group_demuxer_event_probe),
(gst_decode_group_control_demuxer_pad),
(gst_decode_group_control_source_pad),
(gst_decode_group_check_if_blocked),
(gst_decode_group_check_if_drained), (gst_decode_group_expose),
(gst_decode_group_hide), (gst_decode_group_free),
(gst_decode_group_set_complete), (source_pad_blocked_cb),
(source_pad_event_probe), (gst_decode_pad_new), (add_fakesink),
(remove_fakesink), (find_sink_pad), (gst_decode_bin_change_state),
(plugin_init):
New decodebin2 element.
Closes #370092
* gst/playback/gstplay-marshal.list:
Added marshallers for new signals in decodebin2
* gst/playback/gstplaybasebin.c: (setup_subtitle), (make_decoder):
Use decodebin2 if *and only if* the USE_DECODEBIN2 environment variable
is set.
2006-11-28 14:40:39 +00:00
|
|
|
*
|
2007-03-02 12:59:15 +00:00
|
|
|
* #GstBin that auto-magically constructs a decoding pipeline using available
|
|
|
|
* decoders and demuxers via auto-plugging.
|
|
|
|
*
|
2011-06-14 22:51:29 +00:00
|
|
|
* decodebin is considered stable now and replaces the old #decodebin element.
|
|
|
|
* #uridecodebin uses decodebin internally and is often more convenient to
|
2010-10-13 12:05:12 +00:00
|
|
|
* use, as it creates a suitable source element as well.
|
gst/playback/: New decodebin2 element.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstdecodebin2.c: (gst_decode_bin_get_type),
(_gst_boolean_accumulator), (gst_decode_bin_class_init),
(gst_decode_bin_factory_filter), (compare_ranks), (print_feature),
(gst_decode_bin_init), (gst_decode_bin_dispose),
(gst_decode_bin_finalize), (gst_decode_bin_set_property),
(gst_decode_bin_get_property), (gst_decode_bin_set_caps),
(gst_decode_bin_get_caps), (gst_decode_bin_autoplug_continue),
(gst_decode_bin_autoplug_sort), (analyze_new_pad), (connect_pad),
(connect_element), (expose_pad), (type_found),
(pad_added_group_cb), (pad_removed_group_cb),
(no_more_pads_group_cb), (pad_added_cb), (pad_removed_cb),
(no_more_pads_cb), (find_compatibles), (is_demuxer_element),
(are_raw_caps), (multi_queue_overrun_cb),
(multi_queue_underrun_cb), (gst_decode_group_new),
(get_current_group), (group_demuxer_event_probe),
(gst_decode_group_control_demuxer_pad),
(gst_decode_group_control_source_pad),
(gst_decode_group_check_if_blocked),
(gst_decode_group_check_if_drained), (gst_decode_group_expose),
(gst_decode_group_hide), (gst_decode_group_free),
(gst_decode_group_set_complete), (source_pad_blocked_cb),
(source_pad_event_probe), (gst_decode_pad_new), (add_fakesink),
(remove_fakesink), (find_sink_pad), (gst_decode_bin_change_state),
(plugin_init):
New decodebin2 element.
Closes #370092
* gst/playback/gstplay-marshal.list:
Added marshallers for new signals in decodebin2
* gst/playback/gstplaybasebin.c: (setup_subtitle), (make_decoder):
Use decodebin2 if *and only if* the USE_DECODEBIN2 environment variable
is set.
2006-11-28 14:40:39 +00:00
|
|
|
*/
|
|
|
|
|
2009-09-26 10:17:49 +00:00
|
|
|
/* Implementation notes:
|
|
|
|
*
|
2011-06-14 22:51:29 +00:00
|
|
|
* The following section describes how decodebin works internally.
|
2009-09-26 10:17:49 +00:00
|
|
|
*
|
2011-06-14 22:51:29 +00:00
|
|
|
* The first part of decodebin is its typefind element, which tries
|
2010-11-22 00:54:35 +00:00
|
|
|
* to determine the media type of the input stream. If the type is found
|
|
|
|
* autoplugging starts.
|
2009-09-26 10:17:49 +00:00
|
|
|
*
|
2011-06-14 22:51:29 +00:00
|
|
|
* decodebin internally organizes the elements it autoplugged into GstDecodeChains
|
2009-09-26 10:17:49 +00:00
|
|
|
* and GstDecodeGroups. A decode chain is a single chain of decoding, this
|
2011-06-14 22:51:29 +00:00
|
|
|
* means that if decodebin every autoplugs an element with two+ srcpads
|
2009-09-26 10:17:49 +00:00
|
|
|
* (e.g. a demuxer) this will end the chain and everything following this
|
|
|
|
* demuxer will be put into decode groups below the chain. Otherwise,
|
|
|
|
* if an element has a single srcpad that outputs raw data the decode chain
|
|
|
|
* is ended too and a GstDecodePad is stored and blocked.
|
|
|
|
*
|
|
|
|
* A decode group combines a number of chains that are created by a
|
|
|
|
* demuxer element. All those chains are connected through a multiqueue to
|
|
|
|
* the demuxer. A new group for the same demuxer is only created if the
|
2010-11-22 00:54:35 +00:00
|
|
|
* demuxer has signaled no-more-pads, in which case all following pads
|
2009-09-26 10:17:49 +00:00
|
|
|
* create a new chain in the new group.
|
|
|
|
*
|
|
|
|
* This continues until the top-level decode chain is complete. A decode
|
|
|
|
* chain is complete if it either ends with a blocked endpad, if autoplugging
|
|
|
|
* stopped because no suitable plugins could be found or if the active group
|
2010-11-22 00:54:35 +00:00
|
|
|
* is complete. A decode group on the other hand is complete if all child
|
|
|
|
* chains are complete.
|
2009-09-26 10:17:49 +00:00
|
|
|
*
|
|
|
|
* If this happens at some point, all endpads of all active groups are exposed.
|
2011-06-14 22:51:29 +00:00
|
|
|
* For this decodebin adds the endpads, signals no-more-pads and then unblocks
|
2009-09-26 10:17:49 +00:00
|
|
|
* them. Now playback starts.
|
|
|
|
*
|
2011-06-14 22:51:29 +00:00
|
|
|
* If one of the chains that end on a endpad receives EOS decodebin checks
|
2010-11-22 00:54:35 +00:00
|
|
|
* if all chains and groups are drained. In that case everything goes into EOS.
|
|
|
|
* If there is a chain where the active group is drained but there exist next
|
|
|
|
* groups, the active group is hidden (endpads are removed) and the next group
|
|
|
|
* is exposed. This means that in some cases more pads may be created even
|
|
|
|
* after the initial no-more-pads signal. This happens for example with
|
|
|
|
* so-called "chained oggs", most commonly found among ogg/vorbis internet
|
|
|
|
* radio streams.
|
2009-09-26 10:17:49 +00:00
|
|
|
*
|
|
|
|
* Note 1: If we're talking about blocked endpads this really means that the
|
|
|
|
* *target* pads of the endpads are blocked. Pads that are exposed to the outside
|
|
|
|
* should never ever be blocked!
|
|
|
|
*
|
|
|
|
* Note 2: If a group is complete and the parent's chain demuxer adds new pads
|
|
|
|
* but never signaled no-more-pads this additional pads will be ignored!
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
2012-01-29 00:21:19 +00:00
|
|
|
/* FIXME 0.11: suppress warnings for deprecated API such as GValueArray
|
|
|
|
* with newer GLib versions (>= 2.31.0) */
|
|
|
|
#define GLIB_DISABLE_DEPRECATION_WARNINGS
|
|
|
|
|
gst/playback/: New decodebin2 element.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstdecodebin2.c: (gst_decode_bin_get_type),
(_gst_boolean_accumulator), (gst_decode_bin_class_init),
(gst_decode_bin_factory_filter), (compare_ranks), (print_feature),
(gst_decode_bin_init), (gst_decode_bin_dispose),
(gst_decode_bin_finalize), (gst_decode_bin_set_property),
(gst_decode_bin_get_property), (gst_decode_bin_set_caps),
(gst_decode_bin_get_caps), (gst_decode_bin_autoplug_continue),
(gst_decode_bin_autoplug_sort), (analyze_new_pad), (connect_pad),
(connect_element), (expose_pad), (type_found),
(pad_added_group_cb), (pad_removed_group_cb),
(no_more_pads_group_cb), (pad_added_cb), (pad_removed_cb),
(no_more_pads_cb), (find_compatibles), (is_demuxer_element),
(are_raw_caps), (multi_queue_overrun_cb),
(multi_queue_underrun_cb), (gst_decode_group_new),
(get_current_group), (group_demuxer_event_probe),
(gst_decode_group_control_demuxer_pad),
(gst_decode_group_control_source_pad),
(gst_decode_group_check_if_blocked),
(gst_decode_group_check_if_drained), (gst_decode_group_expose),
(gst_decode_group_hide), (gst_decode_group_free),
(gst_decode_group_set_complete), (source_pad_blocked_cb),
(source_pad_event_probe), (gst_decode_pad_new), (add_fakesink),
(remove_fakesink), (find_sink_pad), (gst_decode_bin_change_state),
(plugin_init):
New decodebin2 element.
Closes #370092
* gst/playback/gstplay-marshal.list:
Added marshallers for new signals in decodebin2
* gst/playback/gstplaybasebin.c: (setup_subtitle), (make_decoder):
Use decodebin2 if *and only if* the USE_DECODEBIN2 environment variable
is set.
2006-11-28 14:40:39 +00:00
|
|
|
#ifdef HAVE_CONFIG_H
|
|
|
|
#include "config.h"
|
|
|
|
#endif
|
|
|
|
|
2007-05-01 18:45:36 +00:00
|
|
|
#include <gst/gst-i18n-plugin.h>
|
|
|
|
|
gst/playback/: New decodebin2 element.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstdecodebin2.c: (gst_decode_bin_get_type),
(_gst_boolean_accumulator), (gst_decode_bin_class_init),
(gst_decode_bin_factory_filter), (compare_ranks), (print_feature),
(gst_decode_bin_init), (gst_decode_bin_dispose),
(gst_decode_bin_finalize), (gst_decode_bin_set_property),
(gst_decode_bin_get_property), (gst_decode_bin_set_caps),
(gst_decode_bin_get_caps), (gst_decode_bin_autoplug_continue),
(gst_decode_bin_autoplug_sort), (analyze_new_pad), (connect_pad),
(connect_element), (expose_pad), (type_found),
(pad_added_group_cb), (pad_removed_group_cb),
(no_more_pads_group_cb), (pad_added_cb), (pad_removed_cb),
(no_more_pads_cb), (find_compatibles), (is_demuxer_element),
(are_raw_caps), (multi_queue_overrun_cb),
(multi_queue_underrun_cb), (gst_decode_group_new),
(get_current_group), (group_demuxer_event_probe),
(gst_decode_group_control_demuxer_pad),
(gst_decode_group_control_source_pad),
(gst_decode_group_check_if_blocked),
(gst_decode_group_check_if_drained), (gst_decode_group_expose),
(gst_decode_group_hide), (gst_decode_group_free),
(gst_decode_group_set_complete), (source_pad_blocked_cb),
(source_pad_event_probe), (gst_decode_pad_new), (add_fakesink),
(remove_fakesink), (find_sink_pad), (gst_decode_bin_change_state),
(plugin_init):
New decodebin2 element.
Closes #370092
* gst/playback/gstplay-marshal.list:
Added marshallers for new signals in decodebin2
* gst/playback/gstplaybasebin.c: (setup_subtitle), (make_decoder):
Use decodebin2 if *and only if* the USE_DECODEBIN2 environment variable
is set.
2006-11-28 14:40:39 +00:00
|
|
|
#include <string.h>
|
|
|
|
#include <gst/gst.h>
|
rename utils to pbutils
Original commit message from CVS:
* configure.ac:
* docs/libs/gst-plugins-base-libs-docs.sgml:
* docs/libs/gst-plugins-base-libs-sections.txt:
* gst-libs/gst/Makefile.am:
* gst-libs/gst/interfaces/mixer.c:
* gst-libs/gst/pbutils/Makefile.am:
* gst-libs/gst/pbutils/descriptions.c:
(gst_pb_utils_get_source_description),
(gst_pb_utils_get_sink_description),
(gst_pb_utils_get_decoder_description),
(gst_pb_utils_get_encoder_description),
(gst_pb_utils_get_element_description),
(gst_pb_utils_add_codec_description_to_tag_list),
(gst_pb_utils_get_codec_description), (gst_pb_utils_list_all):
* gst-libs/gst/pbutils/descriptions.h:
* gst-libs/gst/pbutils/install-plugins.c:
* gst-libs/gst/pbutils/install-plugins.h:
* gst-libs/gst/pbutils/missing-plugins.c:
(gst_missing_uri_source_message_new),
(gst_missing_uri_sink_message_new),
(gst_missing_element_message_new),
(gst_missing_decoder_message_new),
(gst_missing_encoder_message_new),
(gst_missing_plugin_message_get_description):
* gst-libs/gst/pbutils/missing-plugins.h:
* gst-libs/gst/pbutils/pbutils.c: (gst_pb_utils_init):
* gst-libs/gst/pbutils/pbutils.h:
* gst-libs/gst/utils/Makefile.am:
* gst-libs/gst/utils/base-utils.c:
* gst-libs/gst/utils/base-utils.h:
* gst-libs/gst/utils/descriptions.c:
* gst-libs/gst/utils/descriptions.h:
* gst-libs/gst/utils/install-plugins.c:
* gst-libs/gst/utils/install-plugins.h:
* gst-libs/gst/utils/missing-plugins.c:
* gst-libs/gst/utils/missing-plugins.h:
* gst-plugins-base.spec.in:
* gst/playback/Makefile.am:
* gst/playback/gstdecodebin.c:
* gst/playback/gstdecodebin2.c:
* gst/playback/gstplaybasebin.c: (setup_subtitle),
(gen_source_element):
* gst/playback/gstplaybin.c: (plugin_init):
* tests/check/Makefile.am:
* tests/check/libs/pbutils.c: (GST_START_TEST),
(test_pb_utils_install_plugins_do_callout), (libgstpbutils_suite):
* tests/check/libs/utils.c:
rename utils to pbutils
2007-03-04 23:39:51 +00:00
|
|
|
#include <gst/pbutils/pbutils.h>
|
gst/playback/: New decodebin2 element.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstdecodebin2.c: (gst_decode_bin_get_type),
(_gst_boolean_accumulator), (gst_decode_bin_class_init),
(gst_decode_bin_factory_filter), (compare_ranks), (print_feature),
(gst_decode_bin_init), (gst_decode_bin_dispose),
(gst_decode_bin_finalize), (gst_decode_bin_set_property),
(gst_decode_bin_get_property), (gst_decode_bin_set_caps),
(gst_decode_bin_get_caps), (gst_decode_bin_autoplug_continue),
(gst_decode_bin_autoplug_sort), (analyze_new_pad), (connect_pad),
(connect_element), (expose_pad), (type_found),
(pad_added_group_cb), (pad_removed_group_cb),
(no_more_pads_group_cb), (pad_added_cb), (pad_removed_cb),
(no_more_pads_cb), (find_compatibles), (is_demuxer_element),
(are_raw_caps), (multi_queue_overrun_cb),
(multi_queue_underrun_cb), (gst_decode_group_new),
(get_current_group), (group_demuxer_event_probe),
(gst_decode_group_control_demuxer_pad),
(gst_decode_group_control_source_pad),
(gst_decode_group_check_if_blocked),
(gst_decode_group_check_if_drained), (gst_decode_group_expose),
(gst_decode_group_hide), (gst_decode_group_free),
(gst_decode_group_set_complete), (source_pad_blocked_cb),
(source_pad_event_probe), (gst_decode_pad_new), (add_fakesink),
(remove_fakesink), (find_sink_pad), (gst_decode_bin_change_state),
(plugin_init):
New decodebin2 element.
Closes #370092
* gst/playback/gstplay-marshal.list:
Added marshallers for new signals in decodebin2
* gst/playback/gstplaybasebin.c: (setup_subtitle), (make_decoder):
Use decodebin2 if *and only if* the USE_DECODEBIN2 environment variable
is set.
2006-11-28 14:40:39 +00:00
|
|
|
|
gst/playback/Makefile.am: Group decodebin2 and uridecodebin into the same plugin so that they can share the GEnumType.
Original commit message from CVS:
* gst/playback/Makefile.am:
Group decodebin2 and uridecodebin into the same plugin so that they
can share the GEnumType.
* gst/playback/gstdecodebin2.c: (_gst_array_accumulator),
(_gst_select_accumulator), (gst_decode_bin_class_init),
(gst_decode_bin_init), (gst_decode_bin_autoplug_sort),
(gst_decode_bin_autoplug_select), (gst_decode_bin_autoplug_add),
(analyze_new_pad), (connect_pad), (gst_decode_bin_plugin_init):
Add signal to sort factories instead of the more awkward autoplug-select
signal.
Modify autoplug_select so that we can try, skip or expose the
autopluggin of an element on a pad.
* gst/playback/gstfactorylists.c: (compare_ranks),
(decoders_filter), (sinks_filter), (gst_factory_list_is_type),
(element_filter), (gst_factory_list_get_elements),
(gst_factory_list_debug), (gst_factory_list_filter):
* gst/playback/gstfactorylists.h:
Simplify the API, allow getting elements based on mask.
* gst/playback/gstplay-marshal.list:
Add some more marshallers.
* gst/playback/gstplaybin2.c: (init_group), (gst_play_bin_init),
(gst_play_bin_finalize), (pad_removed_cb), (autoplug_factories_cb),
(autoplug_select_cb), (activate_group):
Add support for managing non-raw sinks by providing a custom element and
sink list to decodebin2.
Try to plug non-raw sinks when decodebin2 using autoplug-select of
decodebin2.
* gst/playback/gstplaysink.c: (gen_video_chain), (gen_audio_chain),
(gst_play_sink_set_mode), (gst_play_sink_request_pad):
* gst/playback/gstplaysink.h:
Add support for raw and non-raw sinks.
Add support to force sinks selected by playbin2.
Don't plug raw converters for non-raw sinks.
* gst/playback/gsturidecodebin.c: (_gst_array_accumulator),
(_gst_select_accumulator), (gst_uri_decode_bin_class_init),
(proxy_autoplug_select_signal), (gst_uri_decode_bin_plugin_init),
(plugin_init):
Use right accumulators.
Proxy new signal.
2007-12-05 17:11:48 +00:00
|
|
|
#include "gstplay-enum.h"
|
2010-03-11 12:32:14 +00:00
|
|
|
#include "gstplayback.h"
|
2009-11-03 10:48:40 +00:00
|
|
|
#include "gstrawcaps.h"
|
2016-09-01 05:47:02 +00:00
|
|
|
#include "gstplaybackutils.h"
|
2012-06-12 09:58:29 +00:00
|
|
|
|
gst/playback/: New decodebin2 element.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstdecodebin2.c: (gst_decode_bin_get_type),
(_gst_boolean_accumulator), (gst_decode_bin_class_init),
(gst_decode_bin_factory_filter), (compare_ranks), (print_feature),
(gst_decode_bin_init), (gst_decode_bin_dispose),
(gst_decode_bin_finalize), (gst_decode_bin_set_property),
(gst_decode_bin_get_property), (gst_decode_bin_set_caps),
(gst_decode_bin_get_caps), (gst_decode_bin_autoplug_continue),
(gst_decode_bin_autoplug_sort), (analyze_new_pad), (connect_pad),
(connect_element), (expose_pad), (type_found),
(pad_added_group_cb), (pad_removed_group_cb),
(no_more_pads_group_cb), (pad_added_cb), (pad_removed_cb),
(no_more_pads_cb), (find_compatibles), (is_demuxer_element),
(are_raw_caps), (multi_queue_overrun_cb),
(multi_queue_underrun_cb), (gst_decode_group_new),
(get_current_group), (group_demuxer_event_probe),
(gst_decode_group_control_demuxer_pad),
(gst_decode_group_control_source_pad),
(gst_decode_group_check_if_blocked),
(gst_decode_group_check_if_drained), (gst_decode_group_expose),
(gst_decode_group_hide), (gst_decode_group_free),
(gst_decode_group_set_complete), (source_pad_blocked_cb),
(source_pad_event_probe), (gst_decode_pad_new), (add_fakesink),
(remove_fakesink), (find_sink_pad), (gst_decode_bin_change_state),
(plugin_init):
New decodebin2 element.
Closes #370092
* gst/playback/gstplay-marshal.list:
Added marshallers for new signals in decodebin2
* gst/playback/gstplaybasebin.c: (setup_subtitle), (make_decoder):
Use decodebin2 if *and only if* the USE_DECODEBIN2 environment variable
is set.
2006-11-28 14:40:39 +00:00
|
|
|
/* generic templates */
|
|
|
|
static GstStaticPadTemplate decoder_bin_sink_template =
|
|
|
|
GST_STATIC_PAD_TEMPLATE ("sink",
|
|
|
|
GST_PAD_SINK,
|
|
|
|
GST_PAD_ALWAYS,
|
|
|
|
GST_STATIC_CAPS_ANY);
|
|
|
|
|
|
|
|
static GstStaticPadTemplate decoder_bin_src_template =
|
2011-11-04 09:48:50 +00:00
|
|
|
GST_STATIC_PAD_TEMPLATE ("src_%u",
|
gst/playback/: New decodebin2 element.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstdecodebin2.c: (gst_decode_bin_get_type),
(_gst_boolean_accumulator), (gst_decode_bin_class_init),
(gst_decode_bin_factory_filter), (compare_ranks), (print_feature),
(gst_decode_bin_init), (gst_decode_bin_dispose),
(gst_decode_bin_finalize), (gst_decode_bin_set_property),
(gst_decode_bin_get_property), (gst_decode_bin_set_caps),
(gst_decode_bin_get_caps), (gst_decode_bin_autoplug_continue),
(gst_decode_bin_autoplug_sort), (analyze_new_pad), (connect_pad),
(connect_element), (expose_pad), (type_found),
(pad_added_group_cb), (pad_removed_group_cb),
(no_more_pads_group_cb), (pad_added_cb), (pad_removed_cb),
(no_more_pads_cb), (find_compatibles), (is_demuxer_element),
(are_raw_caps), (multi_queue_overrun_cb),
(multi_queue_underrun_cb), (gst_decode_group_new),
(get_current_group), (group_demuxer_event_probe),
(gst_decode_group_control_demuxer_pad),
(gst_decode_group_control_source_pad),
(gst_decode_group_check_if_blocked),
(gst_decode_group_check_if_drained), (gst_decode_group_expose),
(gst_decode_group_hide), (gst_decode_group_free),
(gst_decode_group_set_complete), (source_pad_blocked_cb),
(source_pad_event_probe), (gst_decode_pad_new), (add_fakesink),
(remove_fakesink), (find_sink_pad), (gst_decode_bin_change_state),
(plugin_init):
New decodebin2 element.
Closes #370092
* gst/playback/gstplay-marshal.list:
Added marshallers for new signals in decodebin2
* gst/playback/gstplaybasebin.c: (setup_subtitle), (make_decoder):
Use decodebin2 if *and only if* the USE_DECODEBIN2 environment variable
is set.
2006-11-28 14:40:39 +00:00
|
|
|
GST_PAD_SRC,
|
|
|
|
GST_PAD_SOMETIMES,
|
|
|
|
GST_STATIC_CAPS_ANY);
|
|
|
|
|
|
|
|
GST_DEBUG_CATEGORY_STATIC (gst_decode_bin_debug);
|
|
|
|
#define GST_CAT_DEFAULT gst_decode_bin_debug
|
|
|
|
|
2009-11-19 17:51:33 +00:00
|
|
|
typedef struct _GstPendingPad GstPendingPad;
|
2011-06-26 13:40:17 +00:00
|
|
|
typedef struct _GstDecodeElement GstDecodeElement;
|
2009-09-26 10:17:49 +00:00
|
|
|
typedef struct _GstDecodeChain GstDecodeChain;
|
gst/playback/: New decodebin2 element.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstdecodebin2.c: (gst_decode_bin_get_type),
(_gst_boolean_accumulator), (gst_decode_bin_class_init),
(gst_decode_bin_factory_filter), (compare_ranks), (print_feature),
(gst_decode_bin_init), (gst_decode_bin_dispose),
(gst_decode_bin_finalize), (gst_decode_bin_set_property),
(gst_decode_bin_get_property), (gst_decode_bin_set_caps),
(gst_decode_bin_get_caps), (gst_decode_bin_autoplug_continue),
(gst_decode_bin_autoplug_sort), (analyze_new_pad), (connect_pad),
(connect_element), (expose_pad), (type_found),
(pad_added_group_cb), (pad_removed_group_cb),
(no_more_pads_group_cb), (pad_added_cb), (pad_removed_cb),
(no_more_pads_cb), (find_compatibles), (is_demuxer_element),
(are_raw_caps), (multi_queue_overrun_cb),
(multi_queue_underrun_cb), (gst_decode_group_new),
(get_current_group), (group_demuxer_event_probe),
(gst_decode_group_control_demuxer_pad),
(gst_decode_group_control_source_pad),
(gst_decode_group_check_if_blocked),
(gst_decode_group_check_if_drained), (gst_decode_group_expose),
(gst_decode_group_hide), (gst_decode_group_free),
(gst_decode_group_set_complete), (source_pad_blocked_cb),
(source_pad_event_probe), (gst_decode_pad_new), (add_fakesink),
(remove_fakesink), (find_sink_pad), (gst_decode_bin_change_state),
(plugin_init):
New decodebin2 element.
Closes #370092
* gst/playback/gstplay-marshal.list:
Added marshallers for new signals in decodebin2
* gst/playback/gstplaybasebin.c: (setup_subtitle), (make_decoder):
Use decodebin2 if *and only if* the USE_DECODEBIN2 environment variable
is set.
2006-11-28 14:40:39 +00:00
|
|
|
typedef struct _GstDecodeGroup GstDecodeGroup;
|
|
|
|
typedef struct _GstDecodePad GstDecodePad;
|
gst/playback/gstdecodebin2.c (struct _GstDecodePad): Change to be a subclass of GstGhostPad.
Original commit message from CVS:
2008-10-08 Andy Wingo <wingo@pobox.com>
* gst/playback/gstdecodebin2.c (struct _GstDecodePad): Change to
be a subclass of GstGhostPad.
(analyze_new_pad): So, when emitting the signals that determine
how we do autoplugging, already create the ghost pad and use it as
the pad in the signal arguments. This allows applications to make
a connection between the pad passed in e.g. autoplug-continue, and
the pad passed in new-decoded-pad.
(connect_pad, expose_pad): Update to receive the ghosted decode
pad in the args, retargetting it as necessary if we have to plug
the target pad through a multiqueue.
(gst_decode_group_control_source_pad): Adapt to receive an
already-ghosted pad that just needs activation, blocking, and
drain notification.
(sort_end_pads): Adapt for decode pads actually being pads.
(gst_decode_group_expose): Adapt for decode pads actually being
pads. Rewrite the decode pad names so they appear in order. Adds a
new error case if we couldn't set the name.
(gst_decode_group_free, gst_decode_group_hide): Adapt cleanup
logic.
(gst_decode_pad_set_blocked, gst_decode_pad_add_drained_check):
New API for the decode pad, needed because we shouldn't do these
things inside gst_decode_pad_new(), but after.
(gst_decode_pad_new): Change to actually make the real pad, and
delay the blocking/drainage bits.
2008-10-08 12:49:40 +00:00
|
|
|
typedef GstGhostPadClass GstDecodePadClass;
|
gst/playback/: New decodebin2 element.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstdecodebin2.c: (gst_decode_bin_get_type),
(_gst_boolean_accumulator), (gst_decode_bin_class_init),
(gst_decode_bin_factory_filter), (compare_ranks), (print_feature),
(gst_decode_bin_init), (gst_decode_bin_dispose),
(gst_decode_bin_finalize), (gst_decode_bin_set_property),
(gst_decode_bin_get_property), (gst_decode_bin_set_caps),
(gst_decode_bin_get_caps), (gst_decode_bin_autoplug_continue),
(gst_decode_bin_autoplug_sort), (analyze_new_pad), (connect_pad),
(connect_element), (expose_pad), (type_found),
(pad_added_group_cb), (pad_removed_group_cb),
(no_more_pads_group_cb), (pad_added_cb), (pad_removed_cb),
(no_more_pads_cb), (find_compatibles), (is_demuxer_element),
(are_raw_caps), (multi_queue_overrun_cb),
(multi_queue_underrun_cb), (gst_decode_group_new),
(get_current_group), (group_demuxer_event_probe),
(gst_decode_group_control_demuxer_pad),
(gst_decode_group_control_source_pad),
(gst_decode_group_check_if_blocked),
(gst_decode_group_check_if_drained), (gst_decode_group_expose),
(gst_decode_group_hide), (gst_decode_group_free),
(gst_decode_group_set_complete), (source_pad_blocked_cb),
(source_pad_event_probe), (gst_decode_pad_new), (add_fakesink),
(remove_fakesink), (find_sink_pad), (gst_decode_bin_change_state),
(plugin_init):
New decodebin2 element.
Closes #370092
* gst/playback/gstplay-marshal.list:
Added marshallers for new signals in decodebin2
* gst/playback/gstplaybasebin.c: (setup_subtitle), (make_decoder):
Use decodebin2 if *and only if* the USE_DECODEBIN2 environment variable
is set.
2006-11-28 14:40:39 +00:00
|
|
|
typedef struct _GstDecodeBin GstDecodeBin;
|
|
|
|
typedef struct _GstDecodeBinClass GstDecodeBinClass;
|
|
|
|
|
|
|
|
#define GST_TYPE_DECODE_BIN (gst_decode_bin_get_type())
|
2007-01-25 14:29:21 +00:00
|
|
|
#define GST_DECODE_BIN_CAST(obj) ((GstDecodeBin*)(obj))
|
gst/playback/: New decodebin2 element.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstdecodebin2.c: (gst_decode_bin_get_type),
(_gst_boolean_accumulator), (gst_decode_bin_class_init),
(gst_decode_bin_factory_filter), (compare_ranks), (print_feature),
(gst_decode_bin_init), (gst_decode_bin_dispose),
(gst_decode_bin_finalize), (gst_decode_bin_set_property),
(gst_decode_bin_get_property), (gst_decode_bin_set_caps),
(gst_decode_bin_get_caps), (gst_decode_bin_autoplug_continue),
(gst_decode_bin_autoplug_sort), (analyze_new_pad), (connect_pad),
(connect_element), (expose_pad), (type_found),
(pad_added_group_cb), (pad_removed_group_cb),
(no_more_pads_group_cb), (pad_added_cb), (pad_removed_cb),
(no_more_pads_cb), (find_compatibles), (is_demuxer_element),
(are_raw_caps), (multi_queue_overrun_cb),
(multi_queue_underrun_cb), (gst_decode_group_new),
(get_current_group), (group_demuxer_event_probe),
(gst_decode_group_control_demuxer_pad),
(gst_decode_group_control_source_pad),
(gst_decode_group_check_if_blocked),
(gst_decode_group_check_if_drained), (gst_decode_group_expose),
(gst_decode_group_hide), (gst_decode_group_free),
(gst_decode_group_set_complete), (source_pad_blocked_cb),
(source_pad_event_probe), (gst_decode_pad_new), (add_fakesink),
(remove_fakesink), (find_sink_pad), (gst_decode_bin_change_state),
(plugin_init):
New decodebin2 element.
Closes #370092
* gst/playback/gstplay-marshal.list:
Added marshallers for new signals in decodebin2
* gst/playback/gstplaybasebin.c: (setup_subtitle), (make_decoder):
Use decodebin2 if *and only if* the USE_DECODEBIN2 environment variable
is set.
2006-11-28 14:40:39 +00:00
|
|
|
#define GST_DECODE_BIN(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_DECODE_BIN,GstDecodeBin))
|
|
|
|
#define GST_DECODE_BIN_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_DECODE_BIN,GstDecodeBinClass))
|
|
|
|
#define GST_IS_DECODE_BIN(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_DECODE_BIN))
|
|
|
|
#define GST_IS_DECODE_BIN_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_DECODE_BIN))
|
|
|
|
|
2007-03-02 12:59:15 +00:00
|
|
|
/**
|
2011-06-14 22:51:29 +00:00
|
|
|
* GstDecodeBin:
|
2007-03-02 12:59:15 +00:00
|
|
|
*
|
2011-06-14 22:51:29 +00:00
|
|
|
* The opaque #GstDecodeBin data structure
|
2007-03-02 12:59:15 +00:00
|
|
|
*/
|
gst/playback/: New decodebin2 element.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstdecodebin2.c: (gst_decode_bin_get_type),
(_gst_boolean_accumulator), (gst_decode_bin_class_init),
(gst_decode_bin_factory_filter), (compare_ranks), (print_feature),
(gst_decode_bin_init), (gst_decode_bin_dispose),
(gst_decode_bin_finalize), (gst_decode_bin_set_property),
(gst_decode_bin_get_property), (gst_decode_bin_set_caps),
(gst_decode_bin_get_caps), (gst_decode_bin_autoplug_continue),
(gst_decode_bin_autoplug_sort), (analyze_new_pad), (connect_pad),
(connect_element), (expose_pad), (type_found),
(pad_added_group_cb), (pad_removed_group_cb),
(no_more_pads_group_cb), (pad_added_cb), (pad_removed_cb),
(no_more_pads_cb), (find_compatibles), (is_demuxer_element),
(are_raw_caps), (multi_queue_overrun_cb),
(multi_queue_underrun_cb), (gst_decode_group_new),
(get_current_group), (group_demuxer_event_probe),
(gst_decode_group_control_demuxer_pad),
(gst_decode_group_control_source_pad),
(gst_decode_group_check_if_blocked),
(gst_decode_group_check_if_drained), (gst_decode_group_expose),
(gst_decode_group_hide), (gst_decode_group_free),
(gst_decode_group_set_complete), (source_pad_blocked_cb),
(source_pad_event_probe), (gst_decode_pad_new), (add_fakesink),
(remove_fakesink), (find_sink_pad), (gst_decode_bin_change_state),
(plugin_init):
New decodebin2 element.
Closes #370092
* gst/playback/gstplay-marshal.list:
Added marshallers for new signals in decodebin2
* gst/playback/gstplaybasebin.c: (setup_subtitle), (make_decoder):
Use decodebin2 if *and only if* the USE_DECODEBIN2 environment variable
is set.
2006-11-28 14:40:39 +00:00
|
|
|
struct _GstDecodeBin
|
|
|
|
{
|
|
|
|
GstBin bin; /* we extend GstBin */
|
|
|
|
|
gst/playback/gstdecodebin2.c: Move subtitle encoding property to decodebin2 so that it can set the property value on ...
Original commit message from CVS:
* gst/playback/gstdecodebin2.c: (gst_decode_bin_class_init),
(gst_decode_bin_dispose), (gst_decode_bin_set_caps),
(gst_decode_bin_set_subs_encoding),
(gst_decode_bin_get_subs_encoding), (gst_decode_bin_set_property),
(gst_decode_bin_get_property), (analyze_new_pad):
Move subtitle encoding property to decodebin2 so that it can set the
property value on all elements that it autoplugs and that require it.
Make caps refcounting more consistent in get/set.
* gst/playback/gsturidecodebin.c: (_gst_boolean_accumulator),
(gst_uri_decode_bin_class_init), (gst_uri_decode_bin_init),
(gst_uri_decode_bin_finalize), (gst_uri_decode_bin_set_property),
(gst_uri_decode_bin_get_property), (proxy_unknown_type_signal),
(proxy_autoplug_continue_signal),
(proxy_autoplug_factories_signal), (proxy_autoplug_select_signal),
(make_decoder):
Proxy properties and relevant signals from the internal decodebin.
Make properties MT safe.
2007-10-25 17:36:49 +00:00
|
|
|
/* properties */
|
|
|
|
GstCaps *caps; /* caps on which to stop decoding */
|
|
|
|
gchar *encoding; /* encoding of subtitles */
|
2009-10-23 14:42:23 +00:00
|
|
|
gboolean use_buffering; /* configure buffering on multiqueues */
|
|
|
|
gint low_percent;
|
|
|
|
gint high_percent;
|
|
|
|
guint max_size_bytes;
|
|
|
|
guint max_size_buffers;
|
|
|
|
guint64 max_size_time;
|
2009-11-06 16:01:04 +00:00
|
|
|
gboolean post_stream_topology;
|
2012-05-10 17:11:47 +00:00
|
|
|
guint64 connection_speed;
|
gst/playback/gstdecodebin2.c: Move subtitle encoding property to decodebin2 so that it can set the property value on ...
Original commit message from CVS:
* gst/playback/gstdecodebin2.c: (gst_decode_bin_class_init),
(gst_decode_bin_dispose), (gst_decode_bin_set_caps),
(gst_decode_bin_set_subs_encoding),
(gst_decode_bin_get_subs_encoding), (gst_decode_bin_set_property),
(gst_decode_bin_get_property), (analyze_new_pad):
Move subtitle encoding property to decodebin2 so that it can set the
property value on all elements that it autoplugs and that require it.
Make caps refcounting more consistent in get/set.
* gst/playback/gsturidecodebin.c: (_gst_boolean_accumulator),
(gst_uri_decode_bin_class_init), (gst_uri_decode_bin_init),
(gst_uri_decode_bin_finalize), (gst_uri_decode_bin_set_property),
(gst_uri_decode_bin_get_property), (proxy_unknown_type_signal),
(proxy_autoplug_continue_signal),
(proxy_autoplug_factories_signal), (proxy_autoplug_select_signal),
(make_decoder):
Proxy properties and relevant signals from the internal decodebin.
Make properties MT safe.
2007-10-25 17:36:49 +00:00
|
|
|
|
gst/playback/: New decodebin2 element.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstdecodebin2.c: (gst_decode_bin_get_type),
(_gst_boolean_accumulator), (gst_decode_bin_class_init),
(gst_decode_bin_factory_filter), (compare_ranks), (print_feature),
(gst_decode_bin_init), (gst_decode_bin_dispose),
(gst_decode_bin_finalize), (gst_decode_bin_set_property),
(gst_decode_bin_get_property), (gst_decode_bin_set_caps),
(gst_decode_bin_get_caps), (gst_decode_bin_autoplug_continue),
(gst_decode_bin_autoplug_sort), (analyze_new_pad), (connect_pad),
(connect_element), (expose_pad), (type_found),
(pad_added_group_cb), (pad_removed_group_cb),
(no_more_pads_group_cb), (pad_added_cb), (pad_removed_cb),
(no_more_pads_cb), (find_compatibles), (is_demuxer_element),
(are_raw_caps), (multi_queue_overrun_cb),
(multi_queue_underrun_cb), (gst_decode_group_new),
(get_current_group), (group_demuxer_event_probe),
(gst_decode_group_control_demuxer_pad),
(gst_decode_group_control_source_pad),
(gst_decode_group_check_if_blocked),
(gst_decode_group_check_if_drained), (gst_decode_group_expose),
(gst_decode_group_hide), (gst_decode_group_free),
(gst_decode_group_set_complete), (source_pad_blocked_cb),
(source_pad_event_probe), (gst_decode_pad_new), (add_fakesink),
(remove_fakesink), (find_sink_pad), (gst_decode_bin_change_state),
(plugin_init):
New decodebin2 element.
Closes #370092
* gst/playback/gstplay-marshal.list:
Added marshallers for new signals in decodebin2
* gst/playback/gstplaybasebin.c: (setup_subtitle), (make_decoder):
Use decodebin2 if *and only if* the USE_DECODEBIN2 environment variable
is set.
2006-11-28 14:40:39 +00:00
|
|
|
GstElement *typefind; /* this holds the typefind object */
|
|
|
|
|
2013-02-07 09:49:33 +00:00
|
|
|
GMutex expose_lock; /* Protects exposal and removal of groups */
|
2009-09-26 10:17:49 +00:00
|
|
|
GstDecodeChain *decode_chain; /* Top level decode chain */
|
2011-11-04 09:48:50 +00:00
|
|
|
guint nbpads; /* unique identifier for source pads */
|
gst/playback/: New decodebin2 element.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstdecodebin2.c: (gst_decode_bin_get_type),
(_gst_boolean_accumulator), (gst_decode_bin_class_init),
(gst_decode_bin_factory_filter), (compare_ranks), (print_feature),
(gst_decode_bin_init), (gst_decode_bin_dispose),
(gst_decode_bin_finalize), (gst_decode_bin_set_property),
(gst_decode_bin_get_property), (gst_decode_bin_set_caps),
(gst_decode_bin_get_caps), (gst_decode_bin_autoplug_continue),
(gst_decode_bin_autoplug_sort), (analyze_new_pad), (connect_pad),
(connect_element), (expose_pad), (type_found),
(pad_added_group_cb), (pad_removed_group_cb),
(no_more_pads_group_cb), (pad_added_cb), (pad_removed_cb),
(no_more_pads_cb), (find_compatibles), (is_demuxer_element),
(are_raw_caps), (multi_queue_overrun_cb),
(multi_queue_underrun_cb), (gst_decode_group_new),
(get_current_group), (group_demuxer_event_probe),
(gst_decode_group_control_demuxer_pad),
(gst_decode_group_control_source_pad),
(gst_decode_group_check_if_blocked),
(gst_decode_group_check_if_drained), (gst_decode_group_expose),
(gst_decode_group_hide), (gst_decode_group_free),
(gst_decode_group_set_complete), (source_pad_blocked_cb),
(source_pad_event_probe), (gst_decode_pad_new), (add_fakesink),
(remove_fakesink), (find_sink_pad), (gst_decode_bin_change_state),
(plugin_init):
New decodebin2 element.
Closes #370092
* gst/playback/gstplay-marshal.list:
Added marshallers for new signals in decodebin2
* gst/playback/gstplaybasebin.c: (setup_subtitle), (make_decoder):
Use decodebin2 if *and only if* the USE_DECODEBIN2 environment variable
is set.
2006-11-28 14:40:39 +00:00
|
|
|
|
2013-02-07 09:49:33 +00:00
|
|
|
GMutex factories_lock;
|
2009-11-10 17:13:25 +00:00
|
|
|
guint32 factories_cookie; /* Cookie from last time when factories was updated */
|
2010-08-06 09:53:38 +00:00
|
|
|
GList *factories; /* factories we can use for selecting elements */
|
2009-09-26 10:17:49 +00:00
|
|
|
|
2013-02-07 09:49:33 +00:00
|
|
|
GMutex subtitle_lock; /* Protects changes to subtitles and encoding */
|
2009-09-26 10:17:49 +00:00
|
|
|
GList *subtitles; /* List of elements with subtitle-encoding,
|
2009-11-06 14:12:06 +00:00
|
|
|
* protected by above mutex! */
|
2007-10-08 10:47:26 +00:00
|
|
|
|
2007-10-08 17:12:32 +00:00
|
|
|
gboolean have_type; /* if we received the have_type signal */
|
2007-10-08 10:47:26 +00:00
|
|
|
guint have_type_id; /* signal id for have-type from typefind */
|
gst/playback/gstdecodebin2.c: Remove fakesink hack, we can now implement this more elegantly.
Original commit message from CVS:
* gst/playback/gstdecodebin2.c: (gst_decode_bin_class_init),
(gst_decode_bin_init), (gst_decode_bin_dispose),
(gst_decode_bin_set_sink_caps), (gst_decode_bin_get_sink_caps),
(gst_decode_bin_set_property), (gst_decode_bin_get_property),
(analyze_new_pad), (connect_pad), (expose_pad),
(gst_decode_group_new), (gst_decode_group_control_demuxer_pad),
(gst_decode_group_expose), (gst_decode_group_free),
(do_async_start), (do_async_done), (gst_decode_bin_change_state):
Remove fakesink hack, we can now implement this more elegantly.
Added property to bypass typefinding.
Removed underrun callback and demuxer pad probe, we now use the srcpad
probe to expose groups.
API::sink-caps property
* gst/playback/gstplaybin2.c: (no_more_pads_cb):
Guard against multiple emissions of the no_more_pads signal, which
happens when we are dealing with chained oggs.
* gst/playback/gsturidecodebin.c: (remove_decoders),
(make_decoder), (type_found), (setup_streaming), (source_new_pad),
(setup_source):
For streams, use our own typefind element and plug our queue after it.
We will need this to determine the type of buffering to use for the
queue soon.
2008-04-03 12:16:04 +00:00
|
|
|
|
2011-09-13 19:10:43 +00:00
|
|
|
gboolean async_pending; /* async-start has been emitted */
|
2009-03-06 18:28:37 +00:00
|
|
|
|
2013-02-07 09:49:33 +00:00
|
|
|
GMutex dyn_lock; /* lock protecting pad blocking */
|
2009-03-06 18:28:37 +00:00
|
|
|
gboolean shutdown; /* if we are shutting down */
|
|
|
|
GList *blocked_pads; /* pads that have set to block */
|
2010-05-06 16:50:51 +00:00
|
|
|
|
|
|
|
gboolean expose_allstreams; /* Whether to expose unknow type streams or not */
|
2011-05-09 20:20:23 +00:00
|
|
|
|
2011-10-13 15:34:49 +00:00
|
|
|
GList *filtered; /* elements for which error messages are filtered */
|
2014-08-25 17:59:40 +00:00
|
|
|
GList *filtered_errors; /* filtered error messages */
|
2014-03-16 17:27:30 +00:00
|
|
|
|
|
|
|
GList *buffering_status; /* element currently buffering messages */
|
2015-12-02 14:16:22 +00:00
|
|
|
GMutex buffering_lock;
|
2016-03-24 03:59:48 +00:00
|
|
|
GMutex buffering_post_lock;
|
2017-11-10 13:54:12 +00:00
|
|
|
|
|
|
|
GMutex cleanup_lock; /* Mutex used to protect the cleanup thread */
|
|
|
|
GThread *cleanup_thread; /* thread used to free chains asynchronously.
|
|
|
|
* We store it to make sure we end up joining it
|
|
|
|
* before stopping the element.
|
|
|
|
* Protected by the object lock */
|
2017-11-16 17:22:20 +00:00
|
|
|
GList *cleanup_groups; /* List of groups to free */
|
gst/playback/: New decodebin2 element.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstdecodebin2.c: (gst_decode_bin_get_type),
(_gst_boolean_accumulator), (gst_decode_bin_class_init),
(gst_decode_bin_factory_filter), (compare_ranks), (print_feature),
(gst_decode_bin_init), (gst_decode_bin_dispose),
(gst_decode_bin_finalize), (gst_decode_bin_set_property),
(gst_decode_bin_get_property), (gst_decode_bin_set_caps),
(gst_decode_bin_get_caps), (gst_decode_bin_autoplug_continue),
(gst_decode_bin_autoplug_sort), (analyze_new_pad), (connect_pad),
(connect_element), (expose_pad), (type_found),
(pad_added_group_cb), (pad_removed_group_cb),
(no_more_pads_group_cb), (pad_added_cb), (pad_removed_cb),
(no_more_pads_cb), (find_compatibles), (is_demuxer_element),
(are_raw_caps), (multi_queue_overrun_cb),
(multi_queue_underrun_cb), (gst_decode_group_new),
(get_current_group), (group_demuxer_event_probe),
(gst_decode_group_control_demuxer_pad),
(gst_decode_group_control_source_pad),
(gst_decode_group_check_if_blocked),
(gst_decode_group_check_if_drained), (gst_decode_group_expose),
(gst_decode_group_hide), (gst_decode_group_free),
(gst_decode_group_set_complete), (source_pad_blocked_cb),
(source_pad_event_probe), (gst_decode_pad_new), (add_fakesink),
(remove_fakesink), (find_sink_pad), (gst_decode_bin_change_state),
(plugin_init):
New decodebin2 element.
Closes #370092
* gst/playback/gstplay-marshal.list:
Added marshallers for new signals in decodebin2
* gst/playback/gstplaybasebin.c: (setup_subtitle), (make_decoder):
Use decodebin2 if *and only if* the USE_DECODEBIN2 environment variable
is set.
2006-11-28 14:40:39 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
struct _GstDecodeBinClass
|
|
|
|
{
|
|
|
|
GstBinClass parent_class;
|
|
|
|
|
|
|
|
/* signal fired when we found a pad that we cannot decode */
|
|
|
|
void (*unknown_type) (GstElement * element, GstPad * pad, GstCaps * caps);
|
2007-10-24 11:07:57 +00:00
|
|
|
|
gst/playback/: New decodebin2 element.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstdecodebin2.c: (gst_decode_bin_get_type),
(_gst_boolean_accumulator), (gst_decode_bin_class_init),
(gst_decode_bin_factory_filter), (compare_ranks), (print_feature),
(gst_decode_bin_init), (gst_decode_bin_dispose),
(gst_decode_bin_finalize), (gst_decode_bin_set_property),
(gst_decode_bin_get_property), (gst_decode_bin_set_caps),
(gst_decode_bin_get_caps), (gst_decode_bin_autoplug_continue),
(gst_decode_bin_autoplug_sort), (analyze_new_pad), (connect_pad),
(connect_element), (expose_pad), (type_found),
(pad_added_group_cb), (pad_removed_group_cb),
(no_more_pads_group_cb), (pad_added_cb), (pad_removed_cb),
(no_more_pads_cb), (find_compatibles), (is_demuxer_element),
(are_raw_caps), (multi_queue_overrun_cb),
(multi_queue_underrun_cb), (gst_decode_group_new),
(get_current_group), (group_demuxer_event_probe),
(gst_decode_group_control_demuxer_pad),
(gst_decode_group_control_source_pad),
(gst_decode_group_check_if_blocked),
(gst_decode_group_check_if_drained), (gst_decode_group_expose),
(gst_decode_group_hide), (gst_decode_group_free),
(gst_decode_group_set_complete), (source_pad_blocked_cb),
(source_pad_event_probe), (gst_decode_pad_new), (add_fakesink),
(remove_fakesink), (find_sink_pad), (gst_decode_bin_change_state),
(plugin_init):
New decodebin2 element.
Closes #370092
* gst/playback/gstplay-marshal.list:
Added marshallers for new signals in decodebin2
* gst/playback/gstplaybasebin.c: (setup_subtitle), (make_decoder):
Use decodebin2 if *and only if* the USE_DECODEBIN2 environment variable
is set.
2006-11-28 14:40:39 +00:00
|
|
|
/* signal fired to know if we continue trying to decode the given caps */
|
2007-10-24 11:07:57 +00:00
|
|
|
gboolean (*autoplug_continue) (GstElement * element, GstPad * pad,
|
|
|
|
GstCaps * caps);
|
|
|
|
/* signal fired to get a list of factories to try to autoplug */
|
|
|
|
GValueArray *(*autoplug_factories) (GstElement * element, GstPad * pad,
|
|
|
|
GstCaps * caps);
|
gst/playback/Makefile.am: Group decodebin2 and uridecodebin into the same plugin so that they can share the GEnumType.
Original commit message from CVS:
* gst/playback/Makefile.am:
Group decodebin2 and uridecodebin into the same plugin so that they
can share the GEnumType.
* gst/playback/gstdecodebin2.c: (_gst_array_accumulator),
(_gst_select_accumulator), (gst_decode_bin_class_init),
(gst_decode_bin_init), (gst_decode_bin_autoplug_sort),
(gst_decode_bin_autoplug_select), (gst_decode_bin_autoplug_add),
(analyze_new_pad), (connect_pad), (gst_decode_bin_plugin_init):
Add signal to sort factories instead of the more awkward autoplug-select
signal.
Modify autoplug_select so that we can try, skip or expose the
autopluggin of an element on a pad.
* gst/playback/gstfactorylists.c: (compare_ranks),
(decoders_filter), (sinks_filter), (gst_factory_list_is_type),
(element_filter), (gst_factory_list_get_elements),
(gst_factory_list_debug), (gst_factory_list_filter):
* gst/playback/gstfactorylists.h:
Simplify the API, allow getting elements based on mask.
* gst/playback/gstplay-marshal.list:
Add some more marshallers.
* gst/playback/gstplaybin2.c: (init_group), (gst_play_bin_init),
(gst_play_bin_finalize), (pad_removed_cb), (autoplug_factories_cb),
(autoplug_select_cb), (activate_group):
Add support for managing non-raw sinks by providing a custom element and
sink list to decodebin2.
Try to plug non-raw sinks when decodebin2 using autoplug-select of
decodebin2.
* gst/playback/gstplaysink.c: (gen_video_chain), (gen_audio_chain),
(gst_play_sink_set_mode), (gst_play_sink_request_pad):
* gst/playback/gstplaysink.h:
Add support for raw and non-raw sinks.
Add support to force sinks selected by playbin2.
Don't plug raw converters for non-raw sinks.
* gst/playback/gsturidecodebin.c: (_gst_array_accumulator),
(_gst_select_accumulator), (gst_uri_decode_bin_class_init),
(proxy_autoplug_select_signal), (gst_uri_decode_bin_plugin_init),
(plugin_init):
Use right accumulators.
Proxy new signal.
2007-12-05 17:11:48 +00:00
|
|
|
/* signal fired to sort the factories */
|
|
|
|
GValueArray *(*autoplug_sort) (GstElement * element, GstPad * pad,
|
|
|
|
GstCaps * caps, GValueArray * factories);
|
2007-10-24 11:07:57 +00:00
|
|
|
/* signal fired to select from the proposed list of factories */
|
gst/playback/Makefile.am: Group decodebin2 and uridecodebin into the same plugin so that they can share the GEnumType.
Original commit message from CVS:
* gst/playback/Makefile.am:
Group decodebin2 and uridecodebin into the same plugin so that they
can share the GEnumType.
* gst/playback/gstdecodebin2.c: (_gst_array_accumulator),
(_gst_select_accumulator), (gst_decode_bin_class_init),
(gst_decode_bin_init), (gst_decode_bin_autoplug_sort),
(gst_decode_bin_autoplug_select), (gst_decode_bin_autoplug_add),
(analyze_new_pad), (connect_pad), (gst_decode_bin_plugin_init):
Add signal to sort factories instead of the more awkward autoplug-select
signal.
Modify autoplug_select so that we can try, skip or expose the
autopluggin of an element on a pad.
* gst/playback/gstfactorylists.c: (compare_ranks),
(decoders_filter), (sinks_filter), (gst_factory_list_is_type),
(element_filter), (gst_factory_list_get_elements),
(gst_factory_list_debug), (gst_factory_list_filter):
* gst/playback/gstfactorylists.h:
Simplify the API, allow getting elements based on mask.
* gst/playback/gstplay-marshal.list:
Add some more marshallers.
* gst/playback/gstplaybin2.c: (init_group), (gst_play_bin_init),
(gst_play_bin_finalize), (pad_removed_cb), (autoplug_factories_cb),
(autoplug_select_cb), (activate_group):
Add support for managing non-raw sinks by providing a custom element and
sink list to decodebin2.
Try to plug non-raw sinks when decodebin2 using autoplug-select of
decodebin2.
* gst/playback/gstplaysink.c: (gen_video_chain), (gen_audio_chain),
(gst_play_sink_set_mode), (gst_play_sink_request_pad):
* gst/playback/gstplaysink.h:
Add support for raw and non-raw sinks.
Add support to force sinks selected by playbin2.
Don't plug raw converters for non-raw sinks.
* gst/playback/gsturidecodebin.c: (_gst_array_accumulator),
(_gst_select_accumulator), (gst_uri_decode_bin_class_init),
(proxy_autoplug_select_signal), (gst_uri_decode_bin_plugin_init),
(plugin_init):
Use right accumulators.
Proxy new signal.
2007-12-05 17:11:48 +00:00
|
|
|
GstAutoplugSelectResult (*autoplug_select) (GstElement * element,
|
|
|
|
GstPad * pad, GstCaps * caps, GstElementFactory * factory);
|
2013-03-29 17:27:03 +00:00
|
|
|
/* signal fired when a autoplugged element that is not linked downstream
|
|
|
|
* or exposed wants to query something */
|
|
|
|
gboolean (*autoplug_query) (GstElement * element, GstPad * pad,
|
|
|
|
GstQuery * query);
|
gst/playback/gstdecodebin2.c: Add drained signal fired when decodebin finishes decoding the data.
Original commit message from CVS:
* gst/playback/gstdecodebin2.c: (gst_decode_bin_class_init),
(gst_decode_group_check_if_drained), (source_pad_event_probe),
(remove_fakesink):
Add drained signal fired when decodebin finishes decoding the data.
Remove deprecated STATE_DIRTY message.
* gst/playback/gsturidecodebin.c: (gst_uri_decode_bin_class_init),
(unknown_type_cb), (new_decoded_pad_cb), (pad_removed_cb),
(analyse_source), (proxy_drained_signal), (make_decoder),
(source_new_pad), (value_list_append_structure_list),
(handle_redirect_message), (handle_message):
Proxy the new drained signal.
Handle pad removed from decodebin.
Handle redirect messages by sorting multiple redirections based on the
connection speed.
2007-11-16 12:51:44 +00:00
|
|
|
|
|
|
|
/* fired when the last group is drained */
|
|
|
|
void (*drained) (GstElement * element);
|
gst/playback/: New decodebin2 element.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstdecodebin2.c: (gst_decode_bin_get_type),
(_gst_boolean_accumulator), (gst_decode_bin_class_init),
(gst_decode_bin_factory_filter), (compare_ranks), (print_feature),
(gst_decode_bin_init), (gst_decode_bin_dispose),
(gst_decode_bin_finalize), (gst_decode_bin_set_property),
(gst_decode_bin_get_property), (gst_decode_bin_set_caps),
(gst_decode_bin_get_caps), (gst_decode_bin_autoplug_continue),
(gst_decode_bin_autoplug_sort), (analyze_new_pad), (connect_pad),
(connect_element), (expose_pad), (type_found),
(pad_added_group_cb), (pad_removed_group_cb),
(no_more_pads_group_cb), (pad_added_cb), (pad_removed_cb),
(no_more_pads_cb), (find_compatibles), (is_demuxer_element),
(are_raw_caps), (multi_queue_overrun_cb),
(multi_queue_underrun_cb), (gst_decode_group_new),
(get_current_group), (group_demuxer_event_probe),
(gst_decode_group_control_demuxer_pad),
(gst_decode_group_control_source_pad),
(gst_decode_group_check_if_blocked),
(gst_decode_group_check_if_drained), (gst_decode_group_expose),
(gst_decode_group_hide), (gst_decode_group_free),
(gst_decode_group_set_complete), (source_pad_blocked_cb),
(source_pad_event_probe), (gst_decode_pad_new), (add_fakesink),
(remove_fakesink), (find_sink_pad), (gst_decode_bin_change_state),
(plugin_init):
New decodebin2 element.
Closes #370092
* gst/playback/gstplay-marshal.list:
Added marshallers for new signals in decodebin2
* gst/playback/gstplaybasebin.c: (setup_subtitle), (make_decoder):
Use decodebin2 if *and only if* the USE_DECODEBIN2 environment variable
is set.
2006-11-28 14:40:39 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
/* signals */
|
|
|
|
enum
|
|
|
|
{
|
|
|
|
SIGNAL_UNKNOWN_TYPE,
|
|
|
|
SIGNAL_AUTOPLUG_CONTINUE,
|
2007-10-24 11:07:57 +00:00
|
|
|
SIGNAL_AUTOPLUG_FACTORIES,
|
|
|
|
SIGNAL_AUTOPLUG_SELECT,
|
gst/playback/Makefile.am: Group decodebin2 and uridecodebin into the same plugin so that they can share the GEnumType.
Original commit message from CVS:
* gst/playback/Makefile.am:
Group decodebin2 and uridecodebin into the same plugin so that they
can share the GEnumType.
* gst/playback/gstdecodebin2.c: (_gst_array_accumulator),
(_gst_select_accumulator), (gst_decode_bin_class_init),
(gst_decode_bin_init), (gst_decode_bin_autoplug_sort),
(gst_decode_bin_autoplug_select), (gst_decode_bin_autoplug_add),
(analyze_new_pad), (connect_pad), (gst_decode_bin_plugin_init):
Add signal to sort factories instead of the more awkward autoplug-select
signal.
Modify autoplug_select so that we can try, skip or expose the
autopluggin of an element on a pad.
* gst/playback/gstfactorylists.c: (compare_ranks),
(decoders_filter), (sinks_filter), (gst_factory_list_is_type),
(element_filter), (gst_factory_list_get_elements),
(gst_factory_list_debug), (gst_factory_list_filter):
* gst/playback/gstfactorylists.h:
Simplify the API, allow getting elements based on mask.
* gst/playback/gstplay-marshal.list:
Add some more marshallers.
* gst/playback/gstplaybin2.c: (init_group), (gst_play_bin_init),
(gst_play_bin_finalize), (pad_removed_cb), (autoplug_factories_cb),
(autoplug_select_cb), (activate_group):
Add support for managing non-raw sinks by providing a custom element and
sink list to decodebin2.
Try to plug non-raw sinks when decodebin2 using autoplug-select of
decodebin2.
* gst/playback/gstplaysink.c: (gen_video_chain), (gen_audio_chain),
(gst_play_sink_set_mode), (gst_play_sink_request_pad):
* gst/playback/gstplaysink.h:
Add support for raw and non-raw sinks.
Add support to force sinks selected by playbin2.
Don't plug raw converters for non-raw sinks.
* gst/playback/gsturidecodebin.c: (_gst_array_accumulator),
(_gst_select_accumulator), (gst_uri_decode_bin_class_init),
(proxy_autoplug_select_signal), (gst_uri_decode_bin_plugin_init),
(plugin_init):
Use right accumulators.
Proxy new signal.
2007-12-05 17:11:48 +00:00
|
|
|
SIGNAL_AUTOPLUG_SORT,
|
2013-03-29 17:27:03 +00:00
|
|
|
SIGNAL_AUTOPLUG_QUERY,
|
gst/playback/gstdecodebin2.c: Add drained signal fired when decodebin finishes decoding the data.
Original commit message from CVS:
* gst/playback/gstdecodebin2.c: (gst_decode_bin_class_init),
(gst_decode_group_check_if_drained), (source_pad_event_probe),
(remove_fakesink):
Add drained signal fired when decodebin finishes decoding the data.
Remove deprecated STATE_DIRTY message.
* gst/playback/gsturidecodebin.c: (gst_uri_decode_bin_class_init),
(unknown_type_cb), (new_decoded_pad_cb), (pad_removed_cb),
(analyse_source), (proxy_drained_signal), (make_decoder),
(source_new_pad), (value_list_append_structure_list),
(handle_redirect_message), (handle_message):
Proxy the new drained signal.
Handle pad removed from decodebin.
Handle redirect messages by sorting multiple redirections based on the
connection speed.
2007-11-16 12:51:44 +00:00
|
|
|
SIGNAL_DRAINED,
|
gst/playback/: New decodebin2 element.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstdecodebin2.c: (gst_decode_bin_get_type),
(_gst_boolean_accumulator), (gst_decode_bin_class_init),
(gst_decode_bin_factory_filter), (compare_ranks), (print_feature),
(gst_decode_bin_init), (gst_decode_bin_dispose),
(gst_decode_bin_finalize), (gst_decode_bin_set_property),
(gst_decode_bin_get_property), (gst_decode_bin_set_caps),
(gst_decode_bin_get_caps), (gst_decode_bin_autoplug_continue),
(gst_decode_bin_autoplug_sort), (analyze_new_pad), (connect_pad),
(connect_element), (expose_pad), (type_found),
(pad_added_group_cb), (pad_removed_group_cb),
(no_more_pads_group_cb), (pad_added_cb), (pad_removed_cb),
(no_more_pads_cb), (find_compatibles), (is_demuxer_element),
(are_raw_caps), (multi_queue_overrun_cb),
(multi_queue_underrun_cb), (gst_decode_group_new),
(get_current_group), (group_demuxer_event_probe),
(gst_decode_group_control_demuxer_pad),
(gst_decode_group_control_source_pad),
(gst_decode_group_check_if_blocked),
(gst_decode_group_check_if_drained), (gst_decode_group_expose),
(gst_decode_group_hide), (gst_decode_group_free),
(gst_decode_group_set_complete), (source_pad_blocked_cb),
(source_pad_event_probe), (gst_decode_pad_new), (add_fakesink),
(remove_fakesink), (find_sink_pad), (gst_decode_bin_change_state),
(plugin_init):
New decodebin2 element.
Closes #370092
* gst/playback/gstplay-marshal.list:
Added marshallers for new signals in decodebin2
* gst/playback/gstplaybasebin.c: (setup_subtitle), (make_decoder):
Use decodebin2 if *and only if* the USE_DECODEBIN2 environment variable
is set.
2006-11-28 14:40:39 +00:00
|
|
|
LAST_SIGNAL
|
|
|
|
};
|
|
|
|
|
2009-10-23 15:02:40 +00:00
|
|
|
/* automatic sizes, while prerolling we buffer up to 2MB, we ignore time
|
|
|
|
* and buffers in this case. */
|
2011-05-09 20:20:23 +00:00
|
|
|
#define AUTO_PREROLL_SIZE_BYTES 2 * 1024 * 1024
|
|
|
|
#define AUTO_PREROLL_SIZE_BUFFERS 0
|
2011-10-03 08:55:53 +00:00
|
|
|
#define AUTO_PREROLL_NOT_SEEKABLE_SIZE_TIME 10 * GST_SECOND
|
|
|
|
#define AUTO_PREROLL_SEEKABLE_SIZE_TIME 0
|
2009-10-23 15:02:40 +00:00
|
|
|
|
2014-03-06 21:37:44 +00:00
|
|
|
/* when playing, keep a max of 2MB of data but try to keep the number of buffers
|
2009-10-23 15:02:40 +00:00
|
|
|
* as low as possible (try to aim for 5 buffers) */
|
|
|
|
#define AUTO_PLAY_SIZE_BYTES 2 * 1024 * 1024
|
|
|
|
#define AUTO_PLAY_SIZE_BUFFERS 5
|
2017-05-31 09:30:40 +00:00
|
|
|
#define AUTO_PLAY_SIZE_TIME 0
|
2009-10-23 15:02:40 +00:00
|
|
|
|
2009-10-23 14:42:23 +00:00
|
|
|
#define DEFAULT_SUBTITLE_ENCODING NULL
|
|
|
|
#define DEFAULT_USE_BUFFERING FALSE
|
|
|
|
#define DEFAULT_LOW_PERCENT 10
|
|
|
|
#define DEFAULT_HIGH_PERCENT 99
|
2009-10-23 15:02:40 +00:00
|
|
|
/* by default we use the automatic values above */
|
|
|
|
#define DEFAULT_MAX_SIZE_BYTES 0
|
2009-10-23 14:42:23 +00:00
|
|
|
#define DEFAULT_MAX_SIZE_BUFFERS 0
|
|
|
|
#define DEFAULT_MAX_SIZE_TIME 0
|
2009-11-06 16:01:04 +00:00
|
|
|
#define DEFAULT_POST_STREAM_TOPOLOGY FALSE
|
2010-05-06 16:50:51 +00:00
|
|
|
#define DEFAULT_EXPOSE_ALL_STREAMS TRUE
|
2012-05-10 17:11:47 +00:00
|
|
|
#define DEFAULT_CONNECTION_SPEED 0
|
2009-10-23 14:42:23 +00:00
|
|
|
|
gst/playback/: New decodebin2 element.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstdecodebin2.c: (gst_decode_bin_get_type),
(_gst_boolean_accumulator), (gst_decode_bin_class_init),
(gst_decode_bin_factory_filter), (compare_ranks), (print_feature),
(gst_decode_bin_init), (gst_decode_bin_dispose),
(gst_decode_bin_finalize), (gst_decode_bin_set_property),
(gst_decode_bin_get_property), (gst_decode_bin_set_caps),
(gst_decode_bin_get_caps), (gst_decode_bin_autoplug_continue),
(gst_decode_bin_autoplug_sort), (analyze_new_pad), (connect_pad),
(connect_element), (expose_pad), (type_found),
(pad_added_group_cb), (pad_removed_group_cb),
(no_more_pads_group_cb), (pad_added_cb), (pad_removed_cb),
(no_more_pads_cb), (find_compatibles), (is_demuxer_element),
(are_raw_caps), (multi_queue_overrun_cb),
(multi_queue_underrun_cb), (gst_decode_group_new),
(get_current_group), (group_demuxer_event_probe),
(gst_decode_group_control_demuxer_pad),
(gst_decode_group_control_source_pad),
(gst_decode_group_check_if_blocked),
(gst_decode_group_check_if_drained), (gst_decode_group_expose),
(gst_decode_group_hide), (gst_decode_group_free),
(gst_decode_group_set_complete), (source_pad_blocked_cb),
(source_pad_event_probe), (gst_decode_pad_new), (add_fakesink),
(remove_fakesink), (find_sink_pad), (gst_decode_bin_change_state),
(plugin_init):
New decodebin2 element.
Closes #370092
* gst/playback/gstplay-marshal.list:
Added marshallers for new signals in decodebin2
* gst/playback/gstplaybasebin.c: (setup_subtitle), (make_decoder):
Use decodebin2 if *and only if* the USE_DECODEBIN2 environment variable
is set.
2006-11-28 14:40:39 +00:00
|
|
|
/* Properties */
|
|
|
|
enum
|
|
|
|
{
|
|
|
|
PROP_0,
|
|
|
|
PROP_CAPS,
|
gst/playback/gstdecodebin2.c: Remove fakesink hack, we can now implement this more elegantly.
Original commit message from CVS:
* gst/playback/gstdecodebin2.c: (gst_decode_bin_class_init),
(gst_decode_bin_init), (gst_decode_bin_dispose),
(gst_decode_bin_set_sink_caps), (gst_decode_bin_get_sink_caps),
(gst_decode_bin_set_property), (gst_decode_bin_get_property),
(analyze_new_pad), (connect_pad), (expose_pad),
(gst_decode_group_new), (gst_decode_group_control_demuxer_pad),
(gst_decode_group_expose), (gst_decode_group_free),
(do_async_start), (do_async_done), (gst_decode_bin_change_state):
Remove fakesink hack, we can now implement this more elegantly.
Added property to bypass typefinding.
Removed underrun callback and demuxer pad probe, we now use the srcpad
probe to expose groups.
API::sink-caps property
* gst/playback/gstplaybin2.c: (no_more_pads_cb):
Guard against multiple emissions of the no_more_pads signal, which
happens when we are dealing with chained oggs.
* gst/playback/gsturidecodebin.c: (remove_decoders),
(make_decoder), (type_found), (setup_streaming), (source_new_pad),
(setup_source):
For streams, use our own typefind element and plug our queue after it.
We will need this to determine the type of buffering to use for the
queue soon.
2008-04-03 12:16:04 +00:00
|
|
|
PROP_SUBTITLE_ENCODING,
|
|
|
|
PROP_SINK_CAPS,
|
2009-10-23 14:42:23 +00:00
|
|
|
PROP_USE_BUFFERING,
|
|
|
|
PROP_LOW_PERCENT,
|
|
|
|
PROP_HIGH_PERCENT,
|
|
|
|
PROP_MAX_SIZE_BYTES,
|
|
|
|
PROP_MAX_SIZE_BUFFERS,
|
|
|
|
PROP_MAX_SIZE_TIME,
|
2009-11-06 16:01:04 +00:00
|
|
|
PROP_POST_STREAM_TOPOLOGY,
|
2010-05-06 16:50:51 +00:00
|
|
|
PROP_EXPOSE_ALL_STREAMS,
|
2015-04-24 16:10:59 +00:00
|
|
|
PROP_CONNECTION_SPEED
|
gst/playback/: New decodebin2 element.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstdecodebin2.c: (gst_decode_bin_get_type),
(_gst_boolean_accumulator), (gst_decode_bin_class_init),
(gst_decode_bin_factory_filter), (compare_ranks), (print_feature),
(gst_decode_bin_init), (gst_decode_bin_dispose),
(gst_decode_bin_finalize), (gst_decode_bin_set_property),
(gst_decode_bin_get_property), (gst_decode_bin_set_caps),
(gst_decode_bin_get_caps), (gst_decode_bin_autoplug_continue),
(gst_decode_bin_autoplug_sort), (analyze_new_pad), (connect_pad),
(connect_element), (expose_pad), (type_found),
(pad_added_group_cb), (pad_removed_group_cb),
(no_more_pads_group_cb), (pad_added_cb), (pad_removed_cb),
(no_more_pads_cb), (find_compatibles), (is_demuxer_element),
(are_raw_caps), (multi_queue_overrun_cb),
(multi_queue_underrun_cb), (gst_decode_group_new),
(get_current_group), (group_demuxer_event_probe),
(gst_decode_group_control_demuxer_pad),
(gst_decode_group_control_source_pad),
(gst_decode_group_check_if_blocked),
(gst_decode_group_check_if_drained), (gst_decode_group_expose),
(gst_decode_group_hide), (gst_decode_group_free),
(gst_decode_group_set_complete), (source_pad_blocked_cb),
(source_pad_event_probe), (gst_decode_pad_new), (add_fakesink),
(remove_fakesink), (find_sink_pad), (gst_decode_bin_change_state),
(plugin_init):
New decodebin2 element.
Closes #370092
* gst/playback/gstplay-marshal.list:
Added marshallers for new signals in decodebin2
* gst/playback/gstplaybasebin.c: (setup_subtitle), (make_decoder):
Use decodebin2 if *and only if* the USE_DECODEBIN2 environment variable
is set.
2006-11-28 14:40:39 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
static GstBinClass *parent_class;
|
|
|
|
static guint gst_decode_bin_signals[LAST_SIGNAL] = { 0 };
|
|
|
|
|
2009-11-03 10:48:40 +00:00
|
|
|
static GstStaticCaps default_raw_caps = GST_STATIC_CAPS (DEFAULT_RAW_CAPS);
|
|
|
|
|
gst/playback/gstdecodebin2.c: Remove fakesink hack, we can now implement this more elegantly.
Original commit message from CVS:
* gst/playback/gstdecodebin2.c: (gst_decode_bin_class_init),
(gst_decode_bin_init), (gst_decode_bin_dispose),
(gst_decode_bin_set_sink_caps), (gst_decode_bin_get_sink_caps),
(gst_decode_bin_set_property), (gst_decode_bin_get_property),
(analyze_new_pad), (connect_pad), (expose_pad),
(gst_decode_group_new), (gst_decode_group_control_demuxer_pad),
(gst_decode_group_expose), (gst_decode_group_free),
(do_async_start), (do_async_done), (gst_decode_bin_change_state):
Remove fakesink hack, we can now implement this more elegantly.
Added property to bypass typefinding.
Removed underrun callback and demuxer pad probe, we now use the srcpad
probe to expose groups.
API::sink-caps property
* gst/playback/gstplaybin2.c: (no_more_pads_cb):
Guard against multiple emissions of the no_more_pads signal, which
happens when we are dealing with chained oggs.
* gst/playback/gsturidecodebin.c: (remove_decoders),
(make_decoder), (type_found), (setup_streaming), (source_new_pad),
(setup_source):
For streams, use our own typefind element and plug our queue after it.
We will need this to determine the type of buffering to use for the
queue soon.
2008-04-03 12:16:04 +00:00
|
|
|
static void do_async_start (GstDecodeBin * dbin);
|
|
|
|
static void do_async_done (GstDecodeBin * dbin);
|
gst/playback/: New decodebin2 element.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstdecodebin2.c: (gst_decode_bin_get_type),
(_gst_boolean_accumulator), (gst_decode_bin_class_init),
(gst_decode_bin_factory_filter), (compare_ranks), (print_feature),
(gst_decode_bin_init), (gst_decode_bin_dispose),
(gst_decode_bin_finalize), (gst_decode_bin_set_property),
(gst_decode_bin_get_property), (gst_decode_bin_set_caps),
(gst_decode_bin_get_caps), (gst_decode_bin_autoplug_continue),
(gst_decode_bin_autoplug_sort), (analyze_new_pad), (connect_pad),
(connect_element), (expose_pad), (type_found),
(pad_added_group_cb), (pad_removed_group_cb),
(no_more_pads_group_cb), (pad_added_cb), (pad_removed_cb),
(no_more_pads_cb), (find_compatibles), (is_demuxer_element),
(are_raw_caps), (multi_queue_overrun_cb),
(multi_queue_underrun_cb), (gst_decode_group_new),
(get_current_group), (group_demuxer_event_probe),
(gst_decode_group_control_demuxer_pad),
(gst_decode_group_control_source_pad),
(gst_decode_group_check_if_blocked),
(gst_decode_group_check_if_drained), (gst_decode_group_expose),
(gst_decode_group_hide), (gst_decode_group_free),
(gst_decode_group_set_complete), (source_pad_blocked_cb),
(source_pad_event_probe), (gst_decode_pad_new), (add_fakesink),
(remove_fakesink), (find_sink_pad), (gst_decode_bin_change_state),
(plugin_init):
New decodebin2 element.
Closes #370092
* gst/playback/gstplay-marshal.list:
Added marshallers for new signals in decodebin2
* gst/playback/gstplaybasebin.c: (setup_subtitle), (make_decoder):
Use decodebin2 if *and only if* the USE_DECODEBIN2 environment variable
is set.
2006-11-28 14:40:39 +00:00
|
|
|
|
|
|
|
static void type_found (GstElement * typefind, guint probability,
|
|
|
|
GstCaps * caps, GstDecodeBin * decode_bin);
|
|
|
|
|
2009-11-18 17:50:28 +00:00
|
|
|
static void decodebin_set_queue_size (GstDecodeBin * dbin,
|
2015-08-18 15:47:21 +00:00
|
|
|
GstElement * multiqueue, gboolean preroll, gboolean seekable);
|
2015-02-15 23:25:03 +00:00
|
|
|
static void decodebin_set_queue_size_full (GstDecodeBin * dbin,
|
|
|
|
GstElement * multiqueue, gboolean use_buffering, gboolean preroll,
|
2015-08-18 15:47:21 +00:00
|
|
|
gboolean seekable);
|
2009-11-18 17:50:28 +00:00
|
|
|
|
gst/playback/: New decodebin2 element.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstdecodebin2.c: (gst_decode_bin_get_type),
(_gst_boolean_accumulator), (gst_decode_bin_class_init),
(gst_decode_bin_factory_filter), (compare_ranks), (print_feature),
(gst_decode_bin_init), (gst_decode_bin_dispose),
(gst_decode_bin_finalize), (gst_decode_bin_set_property),
(gst_decode_bin_get_property), (gst_decode_bin_set_caps),
(gst_decode_bin_get_caps), (gst_decode_bin_autoplug_continue),
(gst_decode_bin_autoplug_sort), (analyze_new_pad), (connect_pad),
(connect_element), (expose_pad), (type_found),
(pad_added_group_cb), (pad_removed_group_cb),
(no_more_pads_group_cb), (pad_added_cb), (pad_removed_cb),
(no_more_pads_cb), (find_compatibles), (is_demuxer_element),
(are_raw_caps), (multi_queue_overrun_cb),
(multi_queue_underrun_cb), (gst_decode_group_new),
(get_current_group), (group_demuxer_event_probe),
(gst_decode_group_control_demuxer_pad),
(gst_decode_group_control_source_pad),
(gst_decode_group_check_if_blocked),
(gst_decode_group_check_if_drained), (gst_decode_group_expose),
(gst_decode_group_hide), (gst_decode_group_free),
(gst_decode_group_set_complete), (source_pad_blocked_cb),
(source_pad_event_probe), (gst_decode_pad_new), (add_fakesink),
(remove_fakesink), (find_sink_pad), (gst_decode_bin_change_state),
(plugin_init):
New decodebin2 element.
Closes #370092
* gst/playback/gstplay-marshal.list:
Added marshallers for new signals in decodebin2
* gst/playback/gstplaybasebin.c: (setup_subtitle), (make_decoder):
Use decodebin2 if *and only if* the USE_DECODEBIN2 environment variable
is set.
2006-11-28 14:40:39 +00:00
|
|
|
static gboolean gst_decode_bin_autoplug_continue (GstElement * element,
|
2007-10-24 11:07:57 +00:00
|
|
|
GstPad * pad, GstCaps * caps);
|
|
|
|
static GValueArray *gst_decode_bin_autoplug_factories (GstElement *
|
|
|
|
element, GstPad * pad, GstCaps * caps);
|
gst/playback/Makefile.am: Group decodebin2 and uridecodebin into the same plugin so that they can share the GEnumType.
Original commit message from CVS:
* gst/playback/Makefile.am:
Group decodebin2 and uridecodebin into the same plugin so that they
can share the GEnumType.
* gst/playback/gstdecodebin2.c: (_gst_array_accumulator),
(_gst_select_accumulator), (gst_decode_bin_class_init),
(gst_decode_bin_init), (gst_decode_bin_autoplug_sort),
(gst_decode_bin_autoplug_select), (gst_decode_bin_autoplug_add),
(analyze_new_pad), (connect_pad), (gst_decode_bin_plugin_init):
Add signal to sort factories instead of the more awkward autoplug-select
signal.
Modify autoplug_select so that we can try, skip or expose the
autopluggin of an element on a pad.
* gst/playback/gstfactorylists.c: (compare_ranks),
(decoders_filter), (sinks_filter), (gst_factory_list_is_type),
(element_filter), (gst_factory_list_get_elements),
(gst_factory_list_debug), (gst_factory_list_filter):
* gst/playback/gstfactorylists.h:
Simplify the API, allow getting elements based on mask.
* gst/playback/gstplay-marshal.list:
Add some more marshallers.
* gst/playback/gstplaybin2.c: (init_group), (gst_play_bin_init),
(gst_play_bin_finalize), (pad_removed_cb), (autoplug_factories_cb),
(autoplug_select_cb), (activate_group):
Add support for managing non-raw sinks by providing a custom element and
sink list to decodebin2.
Try to plug non-raw sinks when decodebin2 using autoplug-select of
decodebin2.
* gst/playback/gstplaysink.c: (gen_video_chain), (gen_audio_chain),
(gst_play_sink_set_mode), (gst_play_sink_request_pad):
* gst/playback/gstplaysink.h:
Add support for raw and non-raw sinks.
Add support to force sinks selected by playbin2.
Don't plug raw converters for non-raw sinks.
* gst/playback/gsturidecodebin.c: (_gst_array_accumulator),
(_gst_select_accumulator), (gst_uri_decode_bin_class_init),
(proxy_autoplug_select_signal), (gst_uri_decode_bin_plugin_init),
(plugin_init):
Use right accumulators.
Proxy new signal.
2007-12-05 17:11:48 +00:00
|
|
|
static GValueArray *gst_decode_bin_autoplug_sort (GstElement * element,
|
|
|
|
GstPad * pad, GstCaps * caps, GValueArray * factories);
|
|
|
|
static GstAutoplugSelectResult gst_decode_bin_autoplug_select (GstElement *
|
|
|
|
element, GstPad * pad, GstCaps * caps, GstElementFactory * factory);
|
2013-03-29 17:27:03 +00:00
|
|
|
static gboolean gst_decode_bin_autoplug_query (GstElement * element,
|
|
|
|
GstPad * pad, GstQuery * query);
|
2007-10-24 11:07:57 +00:00
|
|
|
|
gst/playback/: New decodebin2 element.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstdecodebin2.c: (gst_decode_bin_get_type),
(_gst_boolean_accumulator), (gst_decode_bin_class_init),
(gst_decode_bin_factory_filter), (compare_ranks), (print_feature),
(gst_decode_bin_init), (gst_decode_bin_dispose),
(gst_decode_bin_finalize), (gst_decode_bin_set_property),
(gst_decode_bin_get_property), (gst_decode_bin_set_caps),
(gst_decode_bin_get_caps), (gst_decode_bin_autoplug_continue),
(gst_decode_bin_autoplug_sort), (analyze_new_pad), (connect_pad),
(connect_element), (expose_pad), (type_found),
(pad_added_group_cb), (pad_removed_group_cb),
(no_more_pads_group_cb), (pad_added_cb), (pad_removed_cb),
(no_more_pads_cb), (find_compatibles), (is_demuxer_element),
(are_raw_caps), (multi_queue_overrun_cb),
(multi_queue_underrun_cb), (gst_decode_group_new),
(get_current_group), (group_demuxer_event_probe),
(gst_decode_group_control_demuxer_pad),
(gst_decode_group_control_source_pad),
(gst_decode_group_check_if_blocked),
(gst_decode_group_check_if_drained), (gst_decode_group_expose),
(gst_decode_group_hide), (gst_decode_group_free),
(gst_decode_group_set_complete), (source_pad_blocked_cb),
(source_pad_event_probe), (gst_decode_pad_new), (add_fakesink),
(remove_fakesink), (find_sink_pad), (gst_decode_bin_change_state),
(plugin_init):
New decodebin2 element.
Closes #370092
* gst/playback/gstplay-marshal.list:
Added marshallers for new signals in decodebin2
* gst/playback/gstplaybasebin.c: (setup_subtitle), (make_decoder):
Use decodebin2 if *and only if* the USE_DECODEBIN2 environment variable
is set.
2006-11-28 14:40:39 +00:00
|
|
|
static void gst_decode_bin_set_property (GObject * object, guint prop_id,
|
|
|
|
const GValue * value, GParamSpec * pspec);
|
|
|
|
static void gst_decode_bin_get_property (GObject * object, guint prop_id,
|
|
|
|
GValue * value, GParamSpec * pspec);
|
|
|
|
static void gst_decode_bin_set_caps (GstDecodeBin * dbin, GstCaps * caps);
|
|
|
|
static GstCaps *gst_decode_bin_get_caps (GstDecodeBin * dbin);
|
2007-06-05 16:05:19 +00:00
|
|
|
static void caps_notify_cb (GstPad * pad, GParamSpec * unused,
|
2009-09-26 10:17:49 +00:00
|
|
|
GstDecodeChain * chain);
|
gst/playback/: New decodebin2 element.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstdecodebin2.c: (gst_decode_bin_get_type),
(_gst_boolean_accumulator), (gst_decode_bin_class_init),
(gst_decode_bin_factory_filter), (compare_ranks), (print_feature),
(gst_decode_bin_init), (gst_decode_bin_dispose),
(gst_decode_bin_finalize), (gst_decode_bin_set_property),
(gst_decode_bin_get_property), (gst_decode_bin_set_caps),
(gst_decode_bin_get_caps), (gst_decode_bin_autoplug_continue),
(gst_decode_bin_autoplug_sort), (analyze_new_pad), (connect_pad),
(connect_element), (expose_pad), (type_found),
(pad_added_group_cb), (pad_removed_group_cb),
(no_more_pads_group_cb), (pad_added_cb), (pad_removed_cb),
(no_more_pads_cb), (find_compatibles), (is_demuxer_element),
(are_raw_caps), (multi_queue_overrun_cb),
(multi_queue_underrun_cb), (gst_decode_group_new),
(get_current_group), (group_demuxer_event_probe),
(gst_decode_group_control_demuxer_pad),
(gst_decode_group_control_source_pad),
(gst_decode_group_check_if_blocked),
(gst_decode_group_check_if_drained), (gst_decode_group_expose),
(gst_decode_group_hide), (gst_decode_group_free),
(gst_decode_group_set_complete), (source_pad_blocked_cb),
(source_pad_event_probe), (gst_decode_pad_new), (add_fakesink),
(remove_fakesink), (find_sink_pad), (gst_decode_bin_change_state),
(plugin_init):
New decodebin2 element.
Closes #370092
* gst/playback/gstplay-marshal.list:
Added marshallers for new signals in decodebin2
* gst/playback/gstplaybasebin.c: (setup_subtitle), (make_decoder):
Use decodebin2 if *and only if* the USE_DECODEBIN2 environment variable
is set.
2006-11-28 14:40:39 +00:00
|
|
|
|
2015-05-04 09:19:28 +00:00
|
|
|
static void flush_chain (GstDecodeChain * chain, gboolean flushing);
|
|
|
|
static void flush_group (GstDecodeGroup * group, gboolean flushing);
|
gst/playback/: New decodebin2 element.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstdecodebin2.c: (gst_decode_bin_get_type),
(_gst_boolean_accumulator), (gst_decode_bin_class_init),
(gst_decode_bin_factory_filter), (compare_ranks), (print_feature),
(gst_decode_bin_init), (gst_decode_bin_dispose),
(gst_decode_bin_finalize), (gst_decode_bin_set_property),
(gst_decode_bin_get_property), (gst_decode_bin_set_caps),
(gst_decode_bin_get_caps), (gst_decode_bin_autoplug_continue),
(gst_decode_bin_autoplug_sort), (analyze_new_pad), (connect_pad),
(connect_element), (expose_pad), (type_found),
(pad_added_group_cb), (pad_removed_group_cb),
(no_more_pads_group_cb), (pad_added_cb), (pad_removed_cb),
(no_more_pads_cb), (find_compatibles), (is_demuxer_element),
(are_raw_caps), (multi_queue_overrun_cb),
(multi_queue_underrun_cb), (gst_decode_group_new),
(get_current_group), (group_demuxer_event_probe),
(gst_decode_group_control_demuxer_pad),
(gst_decode_group_control_source_pad),
(gst_decode_group_check_if_blocked),
(gst_decode_group_check_if_drained), (gst_decode_group_expose),
(gst_decode_group_hide), (gst_decode_group_free),
(gst_decode_group_set_complete), (source_pad_blocked_cb),
(source_pad_event_probe), (gst_decode_pad_new), (add_fakesink),
(remove_fakesink), (find_sink_pad), (gst_decode_bin_change_state),
(plugin_init):
New decodebin2 element.
Closes #370092
* gst/playback/gstplay-marshal.list:
Added marshallers for new signals in decodebin2
* gst/playback/gstplaybasebin.c: (setup_subtitle), (make_decoder):
Use decodebin2 if *and only if* the USE_DECODEBIN2 environment variable
is set.
2006-11-28 14:40:39 +00:00
|
|
|
static GstPad *find_sink_pad (GstElement * element);
|
|
|
|
static GstStateChangeReturn gst_decode_bin_change_state (GstElement * element,
|
|
|
|
GstStateChange transition);
|
2011-10-13 15:34:49 +00:00
|
|
|
static void gst_decode_bin_handle_message (GstBin * bin, GstMessage * message);
|
2015-12-02 14:16:22 +00:00
|
|
|
static gboolean gst_decode_bin_remove_element (GstBin * bin,
|
|
|
|
GstElement * element);
|
gst/playback/: New decodebin2 element.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstdecodebin2.c: (gst_decode_bin_get_type),
(_gst_boolean_accumulator), (gst_decode_bin_class_init),
(gst_decode_bin_factory_filter), (compare_ranks), (print_feature),
(gst_decode_bin_init), (gst_decode_bin_dispose),
(gst_decode_bin_finalize), (gst_decode_bin_set_property),
(gst_decode_bin_get_property), (gst_decode_bin_set_caps),
(gst_decode_bin_get_caps), (gst_decode_bin_autoplug_continue),
(gst_decode_bin_autoplug_sort), (analyze_new_pad), (connect_pad),
(connect_element), (expose_pad), (type_found),
(pad_added_group_cb), (pad_removed_group_cb),
(no_more_pads_group_cb), (pad_added_cb), (pad_removed_cb),
(no_more_pads_cb), (find_compatibles), (is_demuxer_element),
(are_raw_caps), (multi_queue_overrun_cb),
(multi_queue_underrun_cb), (gst_decode_group_new),
(get_current_group), (group_demuxer_event_probe),
(gst_decode_group_control_demuxer_pad),
(gst_decode_group_control_source_pad),
(gst_decode_group_check_if_blocked),
(gst_decode_group_check_if_drained), (gst_decode_group_expose),
(gst_decode_group_hide), (gst_decode_group_free),
(gst_decode_group_set_complete), (source_pad_blocked_cb),
(source_pad_event_probe), (gst_decode_pad_new), (add_fakesink),
(remove_fakesink), (find_sink_pad), (gst_decode_bin_change_state),
(plugin_init):
New decodebin2 element.
Closes #370092
* gst/playback/gstplay-marshal.list:
Added marshallers for new signals in decodebin2
* gst/playback/gstplaybasebin.c: (setup_subtitle), (make_decoder):
Use decodebin2 if *and only if* the USE_DECODEBIN2 environment variable
is set.
2006-11-28 14:40:39 +00:00
|
|
|
|
2011-11-08 13:55:58 +00:00
|
|
|
static gboolean check_upstream_seekable (GstDecodeBin * dbin, GstPad * pad);
|
|
|
|
|
2014-07-10 10:03:46 +00:00
|
|
|
static GstCaps *get_pad_caps (GstPad * pad);
|
2017-01-18 03:59:18 +00:00
|
|
|
static void unblock_pads (GstDecodeBin * dbin);
|
2014-07-10 10:03:46 +00:00
|
|
|
|
2009-09-26 10:17:49 +00:00
|
|
|
#define EXPOSE_LOCK(dbin) G_STMT_START { \
|
gst/playback/: New decodebin2 element.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstdecodebin2.c: (gst_decode_bin_get_type),
(_gst_boolean_accumulator), (gst_decode_bin_class_init),
(gst_decode_bin_factory_filter), (compare_ranks), (print_feature),
(gst_decode_bin_init), (gst_decode_bin_dispose),
(gst_decode_bin_finalize), (gst_decode_bin_set_property),
(gst_decode_bin_get_property), (gst_decode_bin_set_caps),
(gst_decode_bin_get_caps), (gst_decode_bin_autoplug_continue),
(gst_decode_bin_autoplug_sort), (analyze_new_pad), (connect_pad),
(connect_element), (expose_pad), (type_found),
(pad_added_group_cb), (pad_removed_group_cb),
(no_more_pads_group_cb), (pad_added_cb), (pad_removed_cb),
(no_more_pads_cb), (find_compatibles), (is_demuxer_element),
(are_raw_caps), (multi_queue_overrun_cb),
(multi_queue_underrun_cb), (gst_decode_group_new),
(get_current_group), (group_demuxer_event_probe),
(gst_decode_group_control_demuxer_pad),
(gst_decode_group_control_source_pad),
(gst_decode_group_check_if_blocked),
(gst_decode_group_check_if_drained), (gst_decode_group_expose),
(gst_decode_group_hide), (gst_decode_group_free),
(gst_decode_group_set_complete), (source_pad_blocked_cb),
(source_pad_event_probe), (gst_decode_pad_new), (add_fakesink),
(remove_fakesink), (find_sink_pad), (gst_decode_bin_change_state),
(plugin_init):
New decodebin2 element.
Closes #370092
* gst/playback/gstplay-marshal.list:
Added marshallers for new signals in decodebin2
* gst/playback/gstplaybasebin.c: (setup_subtitle), (make_decoder):
Use decodebin2 if *and only if* the USE_DECODEBIN2 environment variable
is set.
2006-11-28 14:40:39 +00:00
|
|
|
GST_LOG_OBJECT (dbin, \
|
2009-09-26 10:17:49 +00:00
|
|
|
"expose locking from thread %p", \
|
gst/playback/: New decodebin2 element.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstdecodebin2.c: (gst_decode_bin_get_type),
(_gst_boolean_accumulator), (gst_decode_bin_class_init),
(gst_decode_bin_factory_filter), (compare_ranks), (print_feature),
(gst_decode_bin_init), (gst_decode_bin_dispose),
(gst_decode_bin_finalize), (gst_decode_bin_set_property),
(gst_decode_bin_get_property), (gst_decode_bin_set_caps),
(gst_decode_bin_get_caps), (gst_decode_bin_autoplug_continue),
(gst_decode_bin_autoplug_sort), (analyze_new_pad), (connect_pad),
(connect_element), (expose_pad), (type_found),
(pad_added_group_cb), (pad_removed_group_cb),
(no_more_pads_group_cb), (pad_added_cb), (pad_removed_cb),
(no_more_pads_cb), (find_compatibles), (is_demuxer_element),
(are_raw_caps), (multi_queue_overrun_cb),
(multi_queue_underrun_cb), (gst_decode_group_new),
(get_current_group), (group_demuxer_event_probe),
(gst_decode_group_control_demuxer_pad),
(gst_decode_group_control_source_pad),
(gst_decode_group_check_if_blocked),
(gst_decode_group_check_if_drained), (gst_decode_group_expose),
(gst_decode_group_hide), (gst_decode_group_free),
(gst_decode_group_set_complete), (source_pad_blocked_cb),
(source_pad_event_probe), (gst_decode_pad_new), (add_fakesink),
(remove_fakesink), (find_sink_pad), (gst_decode_bin_change_state),
(plugin_init):
New decodebin2 element.
Closes #370092
* gst/playback/gstplay-marshal.list:
Added marshallers for new signals in decodebin2
* gst/playback/gstplaybasebin.c: (setup_subtitle), (make_decoder):
Use decodebin2 if *and only if* the USE_DECODEBIN2 environment variable
is set.
2006-11-28 14:40:39 +00:00
|
|
|
g_thread_self ()); \
|
2013-02-07 09:49:33 +00:00
|
|
|
g_mutex_lock (&GST_DECODE_BIN_CAST(dbin)->expose_lock); \
|
gst/playback/: New decodebin2 element.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstdecodebin2.c: (gst_decode_bin_get_type),
(_gst_boolean_accumulator), (gst_decode_bin_class_init),
(gst_decode_bin_factory_filter), (compare_ranks), (print_feature),
(gst_decode_bin_init), (gst_decode_bin_dispose),
(gst_decode_bin_finalize), (gst_decode_bin_set_property),
(gst_decode_bin_get_property), (gst_decode_bin_set_caps),
(gst_decode_bin_get_caps), (gst_decode_bin_autoplug_continue),
(gst_decode_bin_autoplug_sort), (analyze_new_pad), (connect_pad),
(connect_element), (expose_pad), (type_found),
(pad_added_group_cb), (pad_removed_group_cb),
(no_more_pads_group_cb), (pad_added_cb), (pad_removed_cb),
(no_more_pads_cb), (find_compatibles), (is_demuxer_element),
(are_raw_caps), (multi_queue_overrun_cb),
(multi_queue_underrun_cb), (gst_decode_group_new),
(get_current_group), (group_demuxer_event_probe),
(gst_decode_group_control_demuxer_pad),
(gst_decode_group_control_source_pad),
(gst_decode_group_check_if_blocked),
(gst_decode_group_check_if_drained), (gst_decode_group_expose),
(gst_decode_group_hide), (gst_decode_group_free),
(gst_decode_group_set_complete), (source_pad_blocked_cb),
(source_pad_event_probe), (gst_decode_pad_new), (add_fakesink),
(remove_fakesink), (find_sink_pad), (gst_decode_bin_change_state),
(plugin_init):
New decodebin2 element.
Closes #370092
* gst/playback/gstplay-marshal.list:
Added marshallers for new signals in decodebin2
* gst/playback/gstplaybasebin.c: (setup_subtitle), (make_decoder):
Use decodebin2 if *and only if* the USE_DECODEBIN2 environment variable
is set.
2006-11-28 14:40:39 +00:00
|
|
|
GST_LOG_OBJECT (dbin, \
|
2009-09-26 10:17:49 +00:00
|
|
|
"expose locked from thread %p", \
|
gst/playback/: New decodebin2 element.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstdecodebin2.c: (gst_decode_bin_get_type),
(_gst_boolean_accumulator), (gst_decode_bin_class_init),
(gst_decode_bin_factory_filter), (compare_ranks), (print_feature),
(gst_decode_bin_init), (gst_decode_bin_dispose),
(gst_decode_bin_finalize), (gst_decode_bin_set_property),
(gst_decode_bin_get_property), (gst_decode_bin_set_caps),
(gst_decode_bin_get_caps), (gst_decode_bin_autoplug_continue),
(gst_decode_bin_autoplug_sort), (analyze_new_pad), (connect_pad),
(connect_element), (expose_pad), (type_found),
(pad_added_group_cb), (pad_removed_group_cb),
(no_more_pads_group_cb), (pad_added_cb), (pad_removed_cb),
(no_more_pads_cb), (find_compatibles), (is_demuxer_element),
(are_raw_caps), (multi_queue_overrun_cb),
(multi_queue_underrun_cb), (gst_decode_group_new),
(get_current_group), (group_demuxer_event_probe),
(gst_decode_group_control_demuxer_pad),
(gst_decode_group_control_source_pad),
(gst_decode_group_check_if_blocked),
(gst_decode_group_check_if_drained), (gst_decode_group_expose),
(gst_decode_group_hide), (gst_decode_group_free),
(gst_decode_group_set_complete), (source_pad_blocked_cb),
(source_pad_event_probe), (gst_decode_pad_new), (add_fakesink),
(remove_fakesink), (find_sink_pad), (gst_decode_bin_change_state),
(plugin_init):
New decodebin2 element.
Closes #370092
* gst/playback/gstplay-marshal.list:
Added marshallers for new signals in decodebin2
* gst/playback/gstplaybasebin.c: (setup_subtitle), (make_decoder):
Use decodebin2 if *and only if* the USE_DECODEBIN2 environment variable
is set.
2006-11-28 14:40:39 +00:00
|
|
|
g_thread_self ()); \
|
|
|
|
} G_STMT_END
|
|
|
|
|
2009-09-26 10:17:49 +00:00
|
|
|
#define EXPOSE_UNLOCK(dbin) G_STMT_START { \
|
gst/playback/: New decodebin2 element.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstdecodebin2.c: (gst_decode_bin_get_type),
(_gst_boolean_accumulator), (gst_decode_bin_class_init),
(gst_decode_bin_factory_filter), (compare_ranks), (print_feature),
(gst_decode_bin_init), (gst_decode_bin_dispose),
(gst_decode_bin_finalize), (gst_decode_bin_set_property),
(gst_decode_bin_get_property), (gst_decode_bin_set_caps),
(gst_decode_bin_get_caps), (gst_decode_bin_autoplug_continue),
(gst_decode_bin_autoplug_sort), (analyze_new_pad), (connect_pad),
(connect_element), (expose_pad), (type_found),
(pad_added_group_cb), (pad_removed_group_cb),
(no_more_pads_group_cb), (pad_added_cb), (pad_removed_cb),
(no_more_pads_cb), (find_compatibles), (is_demuxer_element),
(are_raw_caps), (multi_queue_overrun_cb),
(multi_queue_underrun_cb), (gst_decode_group_new),
(get_current_group), (group_demuxer_event_probe),
(gst_decode_group_control_demuxer_pad),
(gst_decode_group_control_source_pad),
(gst_decode_group_check_if_blocked),
(gst_decode_group_check_if_drained), (gst_decode_group_expose),
(gst_decode_group_hide), (gst_decode_group_free),
(gst_decode_group_set_complete), (source_pad_blocked_cb),
(source_pad_event_probe), (gst_decode_pad_new), (add_fakesink),
(remove_fakesink), (find_sink_pad), (gst_decode_bin_change_state),
(plugin_init):
New decodebin2 element.
Closes #370092
* gst/playback/gstplay-marshal.list:
Added marshallers for new signals in decodebin2
* gst/playback/gstplaybasebin.c: (setup_subtitle), (make_decoder):
Use decodebin2 if *and only if* the USE_DECODEBIN2 environment variable
is set.
2006-11-28 14:40:39 +00:00
|
|
|
GST_LOG_OBJECT (dbin, \
|
2009-09-26 10:17:49 +00:00
|
|
|
"expose unlocking from thread %p", \
|
gst/playback/: New decodebin2 element.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstdecodebin2.c: (gst_decode_bin_get_type),
(_gst_boolean_accumulator), (gst_decode_bin_class_init),
(gst_decode_bin_factory_filter), (compare_ranks), (print_feature),
(gst_decode_bin_init), (gst_decode_bin_dispose),
(gst_decode_bin_finalize), (gst_decode_bin_set_property),
(gst_decode_bin_get_property), (gst_decode_bin_set_caps),
(gst_decode_bin_get_caps), (gst_decode_bin_autoplug_continue),
(gst_decode_bin_autoplug_sort), (analyze_new_pad), (connect_pad),
(connect_element), (expose_pad), (type_found),
(pad_added_group_cb), (pad_removed_group_cb),
(no_more_pads_group_cb), (pad_added_cb), (pad_removed_cb),
(no_more_pads_cb), (find_compatibles), (is_demuxer_element),
(are_raw_caps), (multi_queue_overrun_cb),
(multi_queue_underrun_cb), (gst_decode_group_new),
(get_current_group), (group_demuxer_event_probe),
(gst_decode_group_control_demuxer_pad),
(gst_decode_group_control_source_pad),
(gst_decode_group_check_if_blocked),
(gst_decode_group_check_if_drained), (gst_decode_group_expose),
(gst_decode_group_hide), (gst_decode_group_free),
(gst_decode_group_set_complete), (source_pad_blocked_cb),
(source_pad_event_probe), (gst_decode_pad_new), (add_fakesink),
(remove_fakesink), (find_sink_pad), (gst_decode_bin_change_state),
(plugin_init):
New decodebin2 element.
Closes #370092
* gst/playback/gstplay-marshal.list:
Added marshallers for new signals in decodebin2
* gst/playback/gstplaybasebin.c: (setup_subtitle), (make_decoder):
Use decodebin2 if *and only if* the USE_DECODEBIN2 environment variable
is set.
2006-11-28 14:40:39 +00:00
|
|
|
g_thread_self ()); \
|
2013-02-07 09:49:33 +00:00
|
|
|
g_mutex_unlock (&GST_DECODE_BIN_CAST(dbin)->expose_lock); \
|
gst/playback/: New decodebin2 element.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstdecodebin2.c: (gst_decode_bin_get_type),
(_gst_boolean_accumulator), (gst_decode_bin_class_init),
(gst_decode_bin_factory_filter), (compare_ranks), (print_feature),
(gst_decode_bin_init), (gst_decode_bin_dispose),
(gst_decode_bin_finalize), (gst_decode_bin_set_property),
(gst_decode_bin_get_property), (gst_decode_bin_set_caps),
(gst_decode_bin_get_caps), (gst_decode_bin_autoplug_continue),
(gst_decode_bin_autoplug_sort), (analyze_new_pad), (connect_pad),
(connect_element), (expose_pad), (type_found),
(pad_added_group_cb), (pad_removed_group_cb),
(no_more_pads_group_cb), (pad_added_cb), (pad_removed_cb),
(no_more_pads_cb), (find_compatibles), (is_demuxer_element),
(are_raw_caps), (multi_queue_overrun_cb),
(multi_queue_underrun_cb), (gst_decode_group_new),
(get_current_group), (group_demuxer_event_probe),
(gst_decode_group_control_demuxer_pad),
(gst_decode_group_control_source_pad),
(gst_decode_group_check_if_blocked),
(gst_decode_group_check_if_drained), (gst_decode_group_expose),
(gst_decode_group_hide), (gst_decode_group_free),
(gst_decode_group_set_complete), (source_pad_blocked_cb),
(source_pad_event_probe), (gst_decode_pad_new), (add_fakesink),
(remove_fakesink), (find_sink_pad), (gst_decode_bin_change_state),
(plugin_init):
New decodebin2 element.
Closes #370092
* gst/playback/gstplay-marshal.list:
Added marshallers for new signals in decodebin2
* gst/playback/gstplaybasebin.c: (setup_subtitle), (make_decoder):
Use decodebin2 if *and only if* the USE_DECODEBIN2 environment variable
is set.
2006-11-28 14:40:39 +00:00
|
|
|
} G_STMT_END
|
|
|
|
|
2009-09-26 10:17:49 +00:00
|
|
|
#define DYN_LOCK(dbin) G_STMT_START { \
|
2009-03-06 18:28:37 +00:00
|
|
|
GST_LOG_OBJECT (dbin, \
|
|
|
|
"dynlocking from thread %p", \
|
|
|
|
g_thread_self ()); \
|
2013-02-07 09:49:33 +00:00
|
|
|
g_mutex_lock (&GST_DECODE_BIN_CAST(dbin)->dyn_lock); \
|
2009-03-06 18:28:37 +00:00
|
|
|
GST_LOG_OBJECT (dbin, \
|
|
|
|
"dynlocked from thread %p", \
|
|
|
|
g_thread_self ()); \
|
|
|
|
} G_STMT_END
|
|
|
|
|
2009-09-26 10:17:49 +00:00
|
|
|
#define DYN_UNLOCK(dbin) G_STMT_START { \
|
2009-03-06 18:28:37 +00:00
|
|
|
GST_LOG_OBJECT (dbin, \
|
|
|
|
"dynunlocking from thread %p", \
|
|
|
|
g_thread_self ()); \
|
2013-02-07 09:49:33 +00:00
|
|
|
g_mutex_unlock (&GST_DECODE_BIN_CAST(dbin)->dyn_lock); \
|
2009-03-06 18:28:37 +00:00
|
|
|
} G_STMT_END
|
|
|
|
|
2009-11-06 14:12:06 +00:00
|
|
|
#define SUBTITLE_LOCK(dbin) G_STMT_START { \
|
|
|
|
GST_LOG_OBJECT (dbin, \
|
|
|
|
"subtitle locking from thread %p", \
|
|
|
|
g_thread_self ()); \
|
2013-02-07 09:49:33 +00:00
|
|
|
g_mutex_lock (&GST_DECODE_BIN_CAST(dbin)->subtitle_lock); \
|
2009-11-06 14:12:06 +00:00
|
|
|
GST_LOG_OBJECT (dbin, \
|
|
|
|
"subtitle lock from thread %p", \
|
|
|
|
g_thread_self ()); \
|
|
|
|
} G_STMT_END
|
|
|
|
|
|
|
|
#define SUBTITLE_UNLOCK(dbin) G_STMT_START { \
|
|
|
|
GST_LOG_OBJECT (dbin, \
|
|
|
|
"subtitle unlocking from thread %p", \
|
|
|
|
g_thread_self ()); \
|
2013-02-07 09:49:33 +00:00
|
|
|
g_mutex_unlock (&GST_DECODE_BIN_CAST(dbin)->subtitle_lock); \
|
2009-11-06 14:12:06 +00:00
|
|
|
} G_STMT_END
|
|
|
|
|
2015-12-02 14:16:22 +00:00
|
|
|
#define BUFFERING_LOCK(dbin) G_STMT_START { \
|
|
|
|
GST_LOG_OBJECT (dbin, \
|
|
|
|
"buffering locking from thread %p", \
|
|
|
|
g_thread_self ()); \
|
|
|
|
g_mutex_lock (&GST_DECODE_BIN_CAST(dbin)->buffering_lock); \
|
|
|
|
GST_LOG_OBJECT (dbin, \
|
|
|
|
"buffering lock from thread %p", \
|
|
|
|
g_thread_self ()); \
|
|
|
|
} G_STMT_END
|
|
|
|
|
|
|
|
#define BUFFERING_UNLOCK(dbin) G_STMT_START { \
|
|
|
|
GST_LOG_OBJECT (dbin, \
|
|
|
|
"buffering unlocking from thread %p", \
|
|
|
|
g_thread_self ()); \
|
|
|
|
g_mutex_unlock (&GST_DECODE_BIN_CAST(dbin)->buffering_lock); \
|
|
|
|
} G_STMT_END
|
|
|
|
|
2009-11-19 17:51:33 +00:00
|
|
|
struct _GstPendingPad
|
|
|
|
{
|
|
|
|
GstPad *pad;
|
|
|
|
GstDecodeChain *chain;
|
|
|
|
gulong event_probe_id;
|
2013-05-22 15:29:17 +00:00
|
|
|
gulong notify_caps_id;
|
2009-11-19 17:51:33 +00:00
|
|
|
};
|
|
|
|
|
2011-06-26 13:40:17 +00:00
|
|
|
struct _GstDecodeElement
|
|
|
|
{
|
|
|
|
GstElement *element;
|
|
|
|
GstElement *capsfilter; /* Optional capsfilter for Parser/Convert */
|
2013-05-22 15:29:17 +00:00
|
|
|
gulong pad_added_id;
|
|
|
|
gulong pad_removed_id;
|
|
|
|
gulong no_more_pads_id;
|
2011-06-26 13:40:17 +00:00
|
|
|
};
|
|
|
|
|
gst/playback/: New decodebin2 element.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstdecodebin2.c: (gst_decode_bin_get_type),
(_gst_boolean_accumulator), (gst_decode_bin_class_init),
(gst_decode_bin_factory_filter), (compare_ranks), (print_feature),
(gst_decode_bin_init), (gst_decode_bin_dispose),
(gst_decode_bin_finalize), (gst_decode_bin_set_property),
(gst_decode_bin_get_property), (gst_decode_bin_set_caps),
(gst_decode_bin_get_caps), (gst_decode_bin_autoplug_continue),
(gst_decode_bin_autoplug_sort), (analyze_new_pad), (connect_pad),
(connect_element), (expose_pad), (type_found),
(pad_added_group_cb), (pad_removed_group_cb),
(no_more_pads_group_cb), (pad_added_cb), (pad_removed_cb),
(no_more_pads_cb), (find_compatibles), (is_demuxer_element),
(are_raw_caps), (multi_queue_overrun_cb),
(multi_queue_underrun_cb), (gst_decode_group_new),
(get_current_group), (group_demuxer_event_probe),
(gst_decode_group_control_demuxer_pad),
(gst_decode_group_control_source_pad),
(gst_decode_group_check_if_blocked),
(gst_decode_group_check_if_drained), (gst_decode_group_expose),
(gst_decode_group_hide), (gst_decode_group_free),
(gst_decode_group_set_complete), (source_pad_blocked_cb),
(source_pad_event_probe), (gst_decode_pad_new), (add_fakesink),
(remove_fakesink), (find_sink_pad), (gst_decode_bin_change_state),
(plugin_init):
New decodebin2 element.
Closes #370092
* gst/playback/gstplay-marshal.list:
Added marshallers for new signals in decodebin2
* gst/playback/gstplaybasebin.c: (setup_subtitle), (make_decoder):
Use decodebin2 if *and only if* the USE_DECODEBIN2 environment variable
is set.
2006-11-28 14:40:39 +00:00
|
|
|
/* GstDecodeGroup
|
|
|
|
*
|
|
|
|
* Streams belonging to the same group/chain of a media file
|
|
|
|
*
|
2009-09-26 10:17:49 +00:00
|
|
|
* When changing something here lock the parent chain!
|
gst/playback/: New decodebin2 element.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstdecodebin2.c: (gst_decode_bin_get_type),
(_gst_boolean_accumulator), (gst_decode_bin_class_init),
(gst_decode_bin_factory_filter), (compare_ranks), (print_feature),
(gst_decode_bin_init), (gst_decode_bin_dispose),
(gst_decode_bin_finalize), (gst_decode_bin_set_property),
(gst_decode_bin_get_property), (gst_decode_bin_set_caps),
(gst_decode_bin_get_caps), (gst_decode_bin_autoplug_continue),
(gst_decode_bin_autoplug_sort), (analyze_new_pad), (connect_pad),
(connect_element), (expose_pad), (type_found),
(pad_added_group_cb), (pad_removed_group_cb),
(no_more_pads_group_cb), (pad_added_cb), (pad_removed_cb),
(no_more_pads_cb), (find_compatibles), (is_demuxer_element),
(are_raw_caps), (multi_queue_overrun_cb),
(multi_queue_underrun_cb), (gst_decode_group_new),
(get_current_group), (group_demuxer_event_probe),
(gst_decode_group_control_demuxer_pad),
(gst_decode_group_control_source_pad),
(gst_decode_group_check_if_blocked),
(gst_decode_group_check_if_drained), (gst_decode_group_expose),
(gst_decode_group_hide), (gst_decode_group_free),
(gst_decode_group_set_complete), (source_pad_blocked_cb),
(source_pad_event_probe), (gst_decode_pad_new), (add_fakesink),
(remove_fakesink), (find_sink_pad), (gst_decode_bin_change_state),
(plugin_init):
New decodebin2 element.
Closes #370092
* gst/playback/gstplay-marshal.list:
Added marshallers for new signals in decodebin2
* gst/playback/gstplaybasebin.c: (setup_subtitle), (make_decoder):
Use decodebin2 if *and only if* the USE_DECODEBIN2 environment variable
is set.
2006-11-28 14:40:39 +00:00
|
|
|
*/
|
|
|
|
struct _GstDecodeGroup
|
|
|
|
{
|
|
|
|
GstDecodeBin *dbin;
|
2009-09-26 10:17:49 +00:00
|
|
|
GstDecodeChain *parent;
|
|
|
|
|
|
|
|
GstElement *multiqueue; /* Used for linking all child chains */
|
2009-03-19 18:35:15 +00:00
|
|
|
gulong overrunsig; /* the overrun signal for multiqueue */
|
2007-01-22 17:37:38 +00:00
|
|
|
|
2009-09-26 10:17:49 +00:00
|
|
|
gboolean overrun; /* TRUE if the multiqueue signaled overrun. This
|
|
|
|
* means that we should really expose the group */
|
|
|
|
|
|
|
|
gboolean no_more_pads; /* TRUE if the demuxer signaled no-more-pads */
|
|
|
|
gboolean drained; /* TRUE if the all children are drained */
|
|
|
|
|
|
|
|
GList *children; /* List of GstDecodeChains in this group */
|
|
|
|
|
|
|
|
GList *reqpads; /* List of RequestPads for multiqueue, there is
|
|
|
|
* exactly one RequestPad per child chain */
|
gst/playback/: New decodebin2 element.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstdecodebin2.c: (gst_decode_bin_get_type),
(_gst_boolean_accumulator), (gst_decode_bin_class_init),
(gst_decode_bin_factory_filter), (compare_ranks), (print_feature),
(gst_decode_bin_init), (gst_decode_bin_dispose),
(gst_decode_bin_finalize), (gst_decode_bin_set_property),
(gst_decode_bin_get_property), (gst_decode_bin_set_caps),
(gst_decode_bin_get_caps), (gst_decode_bin_autoplug_continue),
(gst_decode_bin_autoplug_sort), (analyze_new_pad), (connect_pad),
(connect_element), (expose_pad), (type_found),
(pad_added_group_cb), (pad_removed_group_cb),
(no_more_pads_group_cb), (pad_added_cb), (pad_removed_cb),
(no_more_pads_cb), (find_compatibles), (is_demuxer_element),
(are_raw_caps), (multi_queue_overrun_cb),
(multi_queue_underrun_cb), (gst_decode_group_new),
(get_current_group), (group_demuxer_event_probe),
(gst_decode_group_control_demuxer_pad),
(gst_decode_group_control_source_pad),
(gst_decode_group_check_if_blocked),
(gst_decode_group_check_if_drained), (gst_decode_group_expose),
(gst_decode_group_hide), (gst_decode_group_free),
(gst_decode_group_set_complete), (source_pad_blocked_cb),
(source_pad_event_probe), (gst_decode_pad_new), (add_fakesink),
(remove_fakesink), (find_sink_pad), (gst_decode_bin_change_state),
(plugin_init):
New decodebin2 element.
Closes #370092
* gst/playback/gstplay-marshal.list:
Added marshallers for new signals in decodebin2
* gst/playback/gstplaybasebin.c: (setup_subtitle), (make_decoder):
Use decodebin2 if *and only if* the USE_DECODEBIN2 environment variable
is set.
2006-11-28 14:40:39 +00:00
|
|
|
};
|
|
|
|
|
2009-09-26 10:17:49 +00:00
|
|
|
struct _GstDecodeChain
|
|
|
|
{
|
|
|
|
GstDecodeGroup *parent;
|
|
|
|
GstDecodeBin *dbin;
|
gst/playback/: New decodebin2 element.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstdecodebin2.c: (gst_decode_bin_get_type),
(_gst_boolean_accumulator), (gst_decode_bin_class_init),
(gst_decode_bin_factory_filter), (compare_ranks), (print_feature),
(gst_decode_bin_init), (gst_decode_bin_dispose),
(gst_decode_bin_finalize), (gst_decode_bin_set_property),
(gst_decode_bin_get_property), (gst_decode_bin_set_caps),
(gst_decode_bin_get_caps), (gst_decode_bin_autoplug_continue),
(gst_decode_bin_autoplug_sort), (analyze_new_pad), (connect_pad),
(connect_element), (expose_pad), (type_found),
(pad_added_group_cb), (pad_removed_group_cb),
(no_more_pads_group_cb), (pad_added_cb), (pad_removed_cb),
(no_more_pads_cb), (find_compatibles), (is_demuxer_element),
(are_raw_caps), (multi_queue_overrun_cb),
(multi_queue_underrun_cb), (gst_decode_group_new),
(get_current_group), (group_demuxer_event_probe),
(gst_decode_group_control_demuxer_pad),
(gst_decode_group_control_source_pad),
(gst_decode_group_check_if_blocked),
(gst_decode_group_check_if_drained), (gst_decode_group_expose),
(gst_decode_group_hide), (gst_decode_group_free),
(gst_decode_group_set_complete), (source_pad_blocked_cb),
(source_pad_event_probe), (gst_decode_pad_new), (add_fakesink),
(remove_fakesink), (find_sink_pad), (gst_decode_bin_change_state),
(plugin_init):
New decodebin2 element.
Closes #370092
* gst/playback/gstplay-marshal.list:
Added marshallers for new signals in decodebin2
* gst/playback/gstplaybasebin.c: (setup_subtitle), (make_decoder):
Use decodebin2 if *and only if* the USE_DECODEBIN2 environment variable
is set.
2006-11-28 14:40:39 +00:00
|
|
|
|
2015-11-06 14:21:14 +00:00
|
|
|
gint refs; /* Number of references to this object */
|
|
|
|
|
2013-02-07 09:49:33 +00:00
|
|
|
GMutex lock; /* Protects this chain and its groups */
|
gst/playback/: New decodebin2 element.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstdecodebin2.c: (gst_decode_bin_get_type),
(_gst_boolean_accumulator), (gst_decode_bin_class_init),
(gst_decode_bin_factory_filter), (compare_ranks), (print_feature),
(gst_decode_bin_init), (gst_decode_bin_dispose),
(gst_decode_bin_finalize), (gst_decode_bin_set_property),
(gst_decode_bin_get_property), (gst_decode_bin_set_caps),
(gst_decode_bin_get_caps), (gst_decode_bin_autoplug_continue),
(gst_decode_bin_autoplug_sort), (analyze_new_pad), (connect_pad),
(connect_element), (expose_pad), (type_found),
(pad_added_group_cb), (pad_removed_group_cb),
(no_more_pads_group_cb), (pad_added_cb), (pad_removed_cb),
(no_more_pads_cb), (find_compatibles), (is_demuxer_element),
(are_raw_caps), (multi_queue_overrun_cb),
(multi_queue_underrun_cb), (gst_decode_group_new),
(get_current_group), (group_demuxer_event_probe),
(gst_decode_group_control_demuxer_pad),
(gst_decode_group_control_source_pad),
(gst_decode_group_check_if_blocked),
(gst_decode_group_check_if_drained), (gst_decode_group_expose),
(gst_decode_group_hide), (gst_decode_group_free),
(gst_decode_group_set_complete), (source_pad_blocked_cb),
(source_pad_event_probe), (gst_decode_pad_new), (add_fakesink),
(remove_fakesink), (find_sink_pad), (gst_decode_bin_change_state),
(plugin_init):
New decodebin2 element.
Closes #370092
* gst/playback/gstplay-marshal.list:
Added marshallers for new signals in decodebin2
* gst/playback/gstplaybasebin.c: (setup_subtitle), (make_decoder):
Use decodebin2 if *and only if* the USE_DECODEBIN2 environment variable
is set.
2006-11-28 14:40:39 +00:00
|
|
|
|
2009-10-15 09:38:14 +00:00
|
|
|
GstPad *pad; /* srcpad that caused creation of this chain */
|
2017-05-03 15:02:19 +00:00
|
|
|
gulong pad_probe_id; /* id for the demuxer_source_pad_probe probe */
|
2009-10-15 09:38:14 +00:00
|
|
|
|
2012-10-11 09:36:54 +00:00
|
|
|
gboolean drained; /* TRUE if the all children are drained */
|
2009-09-26 10:17:49 +00:00
|
|
|
gboolean demuxer; /* TRUE if elements->data is a demuxer */
|
2014-03-06 21:28:46 +00:00
|
|
|
gboolean adaptive_demuxer; /* TRUE if elements->data is an adaptive streaming demuxer */
|
2011-11-25 10:08:58 +00:00
|
|
|
gboolean seekable; /* TRUE if this chain ends on a demuxer and is seekable */
|
2009-09-26 10:17:49 +00:00
|
|
|
GList *elements; /* All elements in this group, first
|
|
|
|
is the latest and most downstream element */
|
gst/playback/: New decodebin2 element.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstdecodebin2.c: (gst_decode_bin_get_type),
(_gst_boolean_accumulator), (gst_decode_bin_class_init),
(gst_decode_bin_factory_filter), (compare_ranks), (print_feature),
(gst_decode_bin_init), (gst_decode_bin_dispose),
(gst_decode_bin_finalize), (gst_decode_bin_set_property),
(gst_decode_bin_get_property), (gst_decode_bin_set_caps),
(gst_decode_bin_get_caps), (gst_decode_bin_autoplug_continue),
(gst_decode_bin_autoplug_sort), (analyze_new_pad), (connect_pad),
(connect_element), (expose_pad), (type_found),
(pad_added_group_cb), (pad_removed_group_cb),
(no_more_pads_group_cb), (pad_added_cb), (pad_removed_cb),
(no_more_pads_cb), (find_compatibles), (is_demuxer_element),
(are_raw_caps), (multi_queue_overrun_cb),
(multi_queue_underrun_cb), (gst_decode_group_new),
(get_current_group), (group_demuxer_event_probe),
(gst_decode_group_control_demuxer_pad),
(gst_decode_group_control_source_pad),
(gst_decode_group_check_if_blocked),
(gst_decode_group_check_if_drained), (gst_decode_group_expose),
(gst_decode_group_hide), (gst_decode_group_free),
(gst_decode_group_set_complete), (source_pad_blocked_cb),
(source_pad_event_probe), (gst_decode_pad_new), (add_fakesink),
(remove_fakesink), (find_sink_pad), (gst_decode_bin_change_state),
(plugin_init):
New decodebin2 element.
Closes #370092
* gst/playback/gstplay-marshal.list:
Added marshallers for new signals in decodebin2
* gst/playback/gstplaybasebin.c: (setup_subtitle), (make_decoder):
Use decodebin2 if *and only if* the USE_DECODEBIN2 environment variable
is set.
2006-11-28 14:40:39 +00:00
|
|
|
|
2009-09-26 10:17:49 +00:00
|
|
|
/* Note: there are only groups if the last element of this chain
|
|
|
|
* is a demuxer, otherwise the chain will end with an endpad.
|
|
|
|
* The other way around this means, that endpad only exists if this
|
|
|
|
* chain doesn't end with a demuxer! */
|
|
|
|
|
|
|
|
GstDecodeGroup *active_group; /* Currently active group */
|
|
|
|
GList *next_groups; /* head is newest group, tail is next group.
|
|
|
|
a new group will be created only if the head
|
|
|
|
group had no-more-pads. If it's only exposed
|
|
|
|
all new pads will be ignored! */
|
|
|
|
GList *pending_pads; /* Pads that have no fixed caps yet */
|
|
|
|
|
2013-03-29 17:27:03 +00:00
|
|
|
GstDecodePad *current_pad; /* Current ending pad of the chain that can't
|
|
|
|
* be exposed yet but would be the same as endpad
|
|
|
|
* once it can be exposed */
|
2009-09-26 10:17:49 +00:00
|
|
|
GstDecodePad *endpad; /* Pad of this chain that could be exposed */
|
|
|
|
gboolean deadend; /* This chain is incomplete and can't be completed,
|
|
|
|
e.g. no suitable decoder could be found
|
2009-11-19 17:51:33 +00:00
|
|
|
e.g. stream got EOS without buffers
|
2009-09-26 10:17:49 +00:00
|
|
|
*/
|
2014-08-25 17:59:40 +00:00
|
|
|
gchar *deadend_details;
|
2009-10-15 11:01:01 +00:00
|
|
|
GstCaps *endcaps; /* Caps that were used when linking to the endpad
|
|
|
|
or that resulted in the deadend
|
|
|
|
*/
|
2009-09-26 10:17:49 +00:00
|
|
|
|
|
|
|
/* FIXME: This should be done directly via a thread! */
|
|
|
|
GList *old_groups; /* Groups that should be freed later */
|
|
|
|
};
|
|
|
|
|
2015-11-06 14:21:14 +00:00
|
|
|
static GstDecodeChain *gst_decode_chain_ref (GstDecodeChain * chain);
|
|
|
|
static void gst_decode_chain_unref (GstDecodeChain * chain);
|
2009-09-26 10:17:49 +00:00
|
|
|
static void gst_decode_chain_free (GstDecodeChain * chain);
|
|
|
|
static GstDecodeChain *gst_decode_chain_new (GstDecodeBin * dbin,
|
2009-10-15 09:38:14 +00:00
|
|
|
GstDecodeGroup * group, GstPad * pad);
|
gst/playback/: New decodebin2 element.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstdecodebin2.c: (gst_decode_bin_get_type),
(_gst_boolean_accumulator), (gst_decode_bin_class_init),
(gst_decode_bin_factory_filter), (compare_ranks), (print_feature),
(gst_decode_bin_init), (gst_decode_bin_dispose),
(gst_decode_bin_finalize), (gst_decode_bin_set_property),
(gst_decode_bin_get_property), (gst_decode_bin_set_caps),
(gst_decode_bin_get_caps), (gst_decode_bin_autoplug_continue),
(gst_decode_bin_autoplug_sort), (analyze_new_pad), (connect_pad),
(connect_element), (expose_pad), (type_found),
(pad_added_group_cb), (pad_removed_group_cb),
(no_more_pads_group_cb), (pad_added_cb), (pad_removed_cb),
(no_more_pads_cb), (find_compatibles), (is_demuxer_element),
(are_raw_caps), (multi_queue_overrun_cb),
(multi_queue_underrun_cb), (gst_decode_group_new),
(get_current_group), (group_demuxer_event_probe),
(gst_decode_group_control_demuxer_pad),
(gst_decode_group_control_source_pad),
(gst_decode_group_check_if_blocked),
(gst_decode_group_check_if_drained), (gst_decode_group_expose),
(gst_decode_group_hide), (gst_decode_group_free),
(gst_decode_group_set_complete), (source_pad_blocked_cb),
(source_pad_event_probe), (gst_decode_pad_new), (add_fakesink),
(remove_fakesink), (find_sink_pad), (gst_decode_bin_change_state),
(plugin_init):
New decodebin2 element.
Closes #370092
* gst/playback/gstplay-marshal.list:
Added marshallers for new signals in decodebin2
* gst/playback/gstplaybasebin.c: (setup_subtitle), (make_decoder):
Use decodebin2 if *and only if* the USE_DECODEBIN2 environment variable
is set.
2006-11-28 14:40:39 +00:00
|
|
|
static void gst_decode_group_hide (GstDecodeGroup * group);
|
|
|
|
static void gst_decode_group_free (GstDecodeGroup * group);
|
2009-09-26 10:17:49 +00:00
|
|
|
static GstDecodeGroup *gst_decode_group_new (GstDecodeBin * dbin,
|
|
|
|
GstDecodeChain * chain);
|
|
|
|
static gboolean gst_decode_chain_is_complete (GstDecodeChain * chain);
|
|
|
|
static gboolean gst_decode_chain_expose (GstDecodeChain * chain,
|
2014-08-25 17:59:40 +00:00
|
|
|
GList ** endpads, gboolean * missing_plugin,
|
|
|
|
GString * missing_plugin_details, gboolean * last_group);
|
2009-09-26 10:17:49 +00:00
|
|
|
static gboolean gst_decode_chain_is_drained (GstDecodeChain * chain);
|
2013-02-06 11:41:19 +00:00
|
|
|
static gboolean gst_decode_chain_reset_buffering (GstDecodeChain * chain);
|
2009-09-26 10:17:49 +00:00
|
|
|
static gboolean gst_decode_group_is_complete (GstDecodeGroup * group);
|
|
|
|
static GstPad *gst_decode_group_control_demuxer_pad (GstDecodeGroup * group,
|
|
|
|
GstPad * pad);
|
|
|
|
static gboolean gst_decode_group_is_drained (GstDecodeGroup * group);
|
2013-02-06 11:41:19 +00:00
|
|
|
static gboolean gst_decode_group_reset_buffering (GstDecodeGroup * group);
|
2009-09-26 10:17:49 +00:00
|
|
|
|
|
|
|
static gboolean gst_decode_bin_expose (GstDecodeBin * dbin);
|
2013-02-06 11:41:19 +00:00
|
|
|
static void gst_decode_bin_reset_buffering (GstDecodeBin * dbin);
|
2009-09-26 10:17:49 +00:00
|
|
|
|
|
|
|
#define CHAIN_MUTEX_LOCK(chain) G_STMT_START { \
|
|
|
|
GST_LOG_OBJECT (chain->dbin, \
|
|
|
|
"locking chain %p from thread %p", \
|
|
|
|
chain, g_thread_self ()); \
|
2013-02-07 09:49:33 +00:00
|
|
|
g_mutex_lock (&chain->lock); \
|
2009-09-26 10:17:49 +00:00
|
|
|
GST_LOG_OBJECT (chain->dbin, \
|
|
|
|
"locked chain %p from thread %p", \
|
|
|
|
chain, g_thread_self ()); \
|
|
|
|
} G_STMT_END
|
|
|
|
|
|
|
|
#define CHAIN_MUTEX_UNLOCK(chain) G_STMT_START { \
|
|
|
|
GST_LOG_OBJECT (chain->dbin, \
|
|
|
|
"unlocking chain %p from thread %p", \
|
|
|
|
chain, g_thread_self ()); \
|
2013-02-07 09:49:33 +00:00
|
|
|
g_mutex_unlock (&chain->lock); \
|
2009-09-26 10:17:49 +00:00
|
|
|
} G_STMT_END
|
gst/playback/: New decodebin2 element.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstdecodebin2.c: (gst_decode_bin_get_type),
(_gst_boolean_accumulator), (gst_decode_bin_class_init),
(gst_decode_bin_factory_filter), (compare_ranks), (print_feature),
(gst_decode_bin_init), (gst_decode_bin_dispose),
(gst_decode_bin_finalize), (gst_decode_bin_set_property),
(gst_decode_bin_get_property), (gst_decode_bin_set_caps),
(gst_decode_bin_get_caps), (gst_decode_bin_autoplug_continue),
(gst_decode_bin_autoplug_sort), (analyze_new_pad), (connect_pad),
(connect_element), (expose_pad), (type_found),
(pad_added_group_cb), (pad_removed_group_cb),
(no_more_pads_group_cb), (pad_added_cb), (pad_removed_cb),
(no_more_pads_cb), (find_compatibles), (is_demuxer_element),
(are_raw_caps), (multi_queue_overrun_cb),
(multi_queue_underrun_cb), (gst_decode_group_new),
(get_current_group), (group_demuxer_event_probe),
(gst_decode_group_control_demuxer_pad),
(gst_decode_group_control_source_pad),
(gst_decode_group_check_if_blocked),
(gst_decode_group_check_if_drained), (gst_decode_group_expose),
(gst_decode_group_hide), (gst_decode_group_free),
(gst_decode_group_set_complete), (source_pad_blocked_cb),
(source_pad_event_probe), (gst_decode_pad_new), (add_fakesink),
(remove_fakesink), (find_sink_pad), (gst_decode_bin_change_state),
(plugin_init):
New decodebin2 element.
Closes #370092
* gst/playback/gstplay-marshal.list:
Added marshallers for new signals in decodebin2
* gst/playback/gstplaybasebin.c: (setup_subtitle), (make_decoder):
Use decodebin2 if *and only if* the USE_DECODEBIN2 environment variable
is set.
2006-11-28 14:40:39 +00:00
|
|
|
|
|
|
|
/* GstDecodePad
|
|
|
|
*
|
2009-09-26 10:17:49 +00:00
|
|
|
* GstPad private used for source pads of chains
|
gst/playback/: New decodebin2 element.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstdecodebin2.c: (gst_decode_bin_get_type),
(_gst_boolean_accumulator), (gst_decode_bin_class_init),
(gst_decode_bin_factory_filter), (compare_ranks), (print_feature),
(gst_decode_bin_init), (gst_decode_bin_dispose),
(gst_decode_bin_finalize), (gst_decode_bin_set_property),
(gst_decode_bin_get_property), (gst_decode_bin_set_caps),
(gst_decode_bin_get_caps), (gst_decode_bin_autoplug_continue),
(gst_decode_bin_autoplug_sort), (analyze_new_pad), (connect_pad),
(connect_element), (expose_pad), (type_found),
(pad_added_group_cb), (pad_removed_group_cb),
(no_more_pads_group_cb), (pad_added_cb), (pad_removed_cb),
(no_more_pads_cb), (find_compatibles), (is_demuxer_element),
(are_raw_caps), (multi_queue_overrun_cb),
(multi_queue_underrun_cb), (gst_decode_group_new),
(get_current_group), (group_demuxer_event_probe),
(gst_decode_group_control_demuxer_pad),
(gst_decode_group_control_source_pad),
(gst_decode_group_check_if_blocked),
(gst_decode_group_check_if_drained), (gst_decode_group_expose),
(gst_decode_group_hide), (gst_decode_group_free),
(gst_decode_group_set_complete), (source_pad_blocked_cb),
(source_pad_event_probe), (gst_decode_pad_new), (add_fakesink),
(remove_fakesink), (find_sink_pad), (gst_decode_bin_change_state),
(plugin_init):
New decodebin2 element.
Closes #370092
* gst/playback/gstplay-marshal.list:
Added marshallers for new signals in decodebin2
* gst/playback/gstplaybasebin.c: (setup_subtitle), (make_decoder):
Use decodebin2 if *and only if* the USE_DECODEBIN2 environment variable
is set.
2006-11-28 14:40:39 +00:00
|
|
|
*/
|
|
|
|
struct _GstDecodePad
|
|
|
|
{
|
gst/playback/gstdecodebin2.c (struct _GstDecodePad): Change to be a subclass of GstGhostPad.
Original commit message from CVS:
2008-10-08 Andy Wingo <wingo@pobox.com>
* gst/playback/gstdecodebin2.c (struct _GstDecodePad): Change to
be a subclass of GstGhostPad.
(analyze_new_pad): So, when emitting the signals that determine
how we do autoplugging, already create the ghost pad and use it as
the pad in the signal arguments. This allows applications to make
a connection between the pad passed in e.g. autoplug-continue, and
the pad passed in new-decoded-pad.
(connect_pad, expose_pad): Update to receive the ghosted decode
pad in the args, retargetting it as necessary if we have to plug
the target pad through a multiqueue.
(gst_decode_group_control_source_pad): Adapt to receive an
already-ghosted pad that just needs activation, blocking, and
drain notification.
(sort_end_pads): Adapt for decode pads actually being pads.
(gst_decode_group_expose): Adapt for decode pads actually being
pads. Rewrite the decode pad names so they appear in order. Adds a
new error case if we couldn't set the name.
(gst_decode_group_free, gst_decode_group_hide): Adapt cleanup
logic.
(gst_decode_pad_set_blocked, gst_decode_pad_add_drained_check):
New API for the decode pad, needed because we shouldn't do these
things inside gst_decode_pad_new(), but after.
(gst_decode_pad_new): Change to actually make the real pad, and
delay the blocking/drainage bits.
2008-10-08 12:49:40 +00:00
|
|
|
GstGhostPad parent;
|
|
|
|
GstDecodeBin *dbin;
|
2009-09-26 10:17:49 +00:00
|
|
|
GstDecodeChain *chain;
|
2009-03-19 18:35:15 +00:00
|
|
|
|
2009-09-26 10:17:49 +00:00
|
|
|
gboolean blocked; /* the *target* pad is blocked */
|
|
|
|
gboolean exposed; /* the pad is exposed */
|
2009-03-19 18:35:15 +00:00
|
|
|
gboolean drained; /* an EOS has been seen on the pad */
|
2011-06-01 17:34:54 +00:00
|
|
|
|
|
|
|
gulong block_id;
|
gst/playback/: New decodebin2 element.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstdecodebin2.c: (gst_decode_bin_get_type),
(_gst_boolean_accumulator), (gst_decode_bin_class_init),
(gst_decode_bin_factory_filter), (compare_ranks), (print_feature),
(gst_decode_bin_init), (gst_decode_bin_dispose),
(gst_decode_bin_finalize), (gst_decode_bin_set_property),
(gst_decode_bin_get_property), (gst_decode_bin_set_caps),
(gst_decode_bin_get_caps), (gst_decode_bin_autoplug_continue),
(gst_decode_bin_autoplug_sort), (analyze_new_pad), (connect_pad),
(connect_element), (expose_pad), (type_found),
(pad_added_group_cb), (pad_removed_group_cb),
(no_more_pads_group_cb), (pad_added_cb), (pad_removed_cb),
(no_more_pads_cb), (find_compatibles), (is_demuxer_element),
(are_raw_caps), (multi_queue_overrun_cb),
(multi_queue_underrun_cb), (gst_decode_group_new),
(get_current_group), (group_demuxer_event_probe),
(gst_decode_group_control_demuxer_pad),
(gst_decode_group_control_source_pad),
(gst_decode_group_check_if_blocked),
(gst_decode_group_check_if_drained), (gst_decode_group_expose),
(gst_decode_group_hide), (gst_decode_group_free),
(gst_decode_group_set_complete), (source_pad_blocked_cb),
(source_pad_event_probe), (gst_decode_pad_new), (add_fakesink),
(remove_fakesink), (find_sink_pad), (gst_decode_bin_change_state),
(plugin_init):
New decodebin2 element.
Closes #370092
* gst/playback/gstplay-marshal.list:
Added marshallers for new signals in decodebin2
* gst/playback/gstplaybasebin.c: (setup_subtitle), (make_decoder):
Use decodebin2 if *and only if* the USE_DECODEBIN2 environment variable
is set.
2006-11-28 14:40:39 +00:00
|
|
|
};
|
|
|
|
|
2010-03-11 12:32:14 +00:00
|
|
|
GType gst_decode_pad_get_type (void);
|
gst/playback/gstdecodebin2.c (struct _GstDecodePad): Change to be a subclass of GstGhostPad.
Original commit message from CVS:
2008-10-08 Andy Wingo <wingo@pobox.com>
* gst/playback/gstdecodebin2.c (struct _GstDecodePad): Change to
be a subclass of GstGhostPad.
(analyze_new_pad): So, when emitting the signals that determine
how we do autoplugging, already create the ghost pad and use it as
the pad in the signal arguments. This allows applications to make
a connection between the pad passed in e.g. autoplug-continue, and
the pad passed in new-decoded-pad.
(connect_pad, expose_pad): Update to receive the ghosted decode
pad in the args, retargetting it as necessary if we have to plug
the target pad through a multiqueue.
(gst_decode_group_control_source_pad): Adapt to receive an
already-ghosted pad that just needs activation, blocking, and
drain notification.
(sort_end_pads): Adapt for decode pads actually being pads.
(gst_decode_group_expose): Adapt for decode pads actually being
pads. Rewrite the decode pad names so they appear in order. Adds a
new error case if we couldn't set the name.
(gst_decode_group_free, gst_decode_group_hide): Adapt cleanup
logic.
(gst_decode_pad_set_blocked, gst_decode_pad_add_drained_check):
New API for the decode pad, needed because we shouldn't do these
things inside gst_decode_pad_new(), but after.
(gst_decode_pad_new): Change to actually make the real pad, and
delay the blocking/drainage bits.
2008-10-08 12:49:40 +00:00
|
|
|
G_DEFINE_TYPE (GstDecodePad, gst_decode_pad, GST_TYPE_GHOST_PAD);
|
|
|
|
#define GST_TYPE_DECODE_PAD (gst_decode_pad_get_type ())
|
|
|
|
#define GST_DECODE_PAD(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_DECODE_PAD,GstDecodePad))
|
|
|
|
|
2013-03-29 17:27:03 +00:00
|
|
|
static GstDecodePad *gst_decode_pad_new (GstDecodeBin * dbin,
|
2009-09-26 10:17:49 +00:00
|
|
|
GstDecodeChain * chain);
|
2008-10-08 14:00:07 +00:00
|
|
|
static void gst_decode_pad_activate (GstDecodePad * dpad,
|
2009-09-26 10:17:49 +00:00
|
|
|
GstDecodeChain * chain);
|
2008-10-08 14:00:07 +00:00
|
|
|
static void gst_decode_pad_unblock (GstDecodePad * dpad);
|
2009-09-26 10:17:49 +00:00
|
|
|
static void gst_decode_pad_set_blocked (GstDecodePad * dpad, gboolean blocked);
|
2013-03-29 17:27:03 +00:00
|
|
|
static gboolean gst_decode_pad_query (GstPad * pad, GstObject * parent,
|
|
|
|
GstQuery * query);
|
2016-05-04 01:33:50 +00:00
|
|
|
static gboolean gst_decode_pad_is_exposable (GstDecodePad * endpad);
|
gst/playback/: New decodebin2 element.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstdecodebin2.c: (gst_decode_bin_get_type),
(_gst_boolean_accumulator), (gst_decode_bin_class_init),
(gst_decode_bin_factory_filter), (compare_ranks), (print_feature),
(gst_decode_bin_init), (gst_decode_bin_dispose),
(gst_decode_bin_finalize), (gst_decode_bin_set_property),
(gst_decode_bin_get_property), (gst_decode_bin_set_caps),
(gst_decode_bin_get_caps), (gst_decode_bin_autoplug_continue),
(gst_decode_bin_autoplug_sort), (analyze_new_pad), (connect_pad),
(connect_element), (expose_pad), (type_found),
(pad_added_group_cb), (pad_removed_group_cb),
(no_more_pads_group_cb), (pad_added_cb), (pad_removed_cb),
(no_more_pads_cb), (find_compatibles), (is_demuxer_element),
(are_raw_caps), (multi_queue_overrun_cb),
(multi_queue_underrun_cb), (gst_decode_group_new),
(get_current_group), (group_demuxer_event_probe),
(gst_decode_group_control_demuxer_pad),
(gst_decode_group_control_source_pad),
(gst_decode_group_check_if_blocked),
(gst_decode_group_check_if_drained), (gst_decode_group_expose),
(gst_decode_group_hide), (gst_decode_group_free),
(gst_decode_group_set_complete), (source_pad_blocked_cb),
(source_pad_event_probe), (gst_decode_pad_new), (add_fakesink),
(remove_fakesink), (find_sink_pad), (gst_decode_bin_change_state),
(plugin_init):
New decodebin2 element.
Closes #370092
* gst/playback/gstplay-marshal.list:
Added marshallers for new signals in decodebin2
* gst/playback/gstplaybasebin.c: (setup_subtitle), (make_decoder):
Use decodebin2 if *and only if* the USE_DECODEBIN2 environment variable
is set.
2006-11-28 14:40:39 +00:00
|
|
|
|
2009-11-19 17:51:33 +00:00
|
|
|
static void gst_pending_pad_free (GstPendingPad * ppad);
|
2011-11-08 10:07:18 +00:00
|
|
|
static GstPadProbeReturn pad_event_cb (GstPad * pad, GstPadProbeInfo * info,
|
|
|
|
gpointer data);
|
2009-11-19 17:51:33 +00:00
|
|
|
|
gst/playback/: New decodebin2 element.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstdecodebin2.c: (gst_decode_bin_get_type),
(_gst_boolean_accumulator), (gst_decode_bin_class_init),
(gst_decode_bin_factory_filter), (compare_ranks), (print_feature),
(gst_decode_bin_init), (gst_decode_bin_dispose),
(gst_decode_bin_finalize), (gst_decode_bin_set_property),
(gst_decode_bin_get_property), (gst_decode_bin_set_caps),
(gst_decode_bin_get_caps), (gst_decode_bin_autoplug_continue),
(gst_decode_bin_autoplug_sort), (analyze_new_pad), (connect_pad),
(connect_element), (expose_pad), (type_found),
(pad_added_group_cb), (pad_removed_group_cb),
(no_more_pads_group_cb), (pad_added_cb), (pad_removed_cb),
(no_more_pads_cb), (find_compatibles), (is_demuxer_element),
(are_raw_caps), (multi_queue_overrun_cb),
(multi_queue_underrun_cb), (gst_decode_group_new),
(get_current_group), (group_demuxer_event_probe),
(gst_decode_group_control_demuxer_pad),
(gst_decode_group_control_source_pad),
(gst_decode_group_check_if_blocked),
(gst_decode_group_check_if_drained), (gst_decode_group_expose),
(gst_decode_group_hide), (gst_decode_group_free),
(gst_decode_group_set_complete), (source_pad_blocked_cb),
(source_pad_event_probe), (gst_decode_pad_new), (add_fakesink),
(remove_fakesink), (find_sink_pad), (gst_decode_bin_change_state),
(plugin_init):
New decodebin2 element.
Closes #370092
* gst/playback/gstplay-marshal.list:
Added marshallers for new signals in decodebin2
* gst/playback/gstplaybasebin.c: (setup_subtitle), (make_decoder):
Use decodebin2 if *and only if* the USE_DECODEBIN2 environment variable
is set.
2006-11-28 14:40:39 +00:00
|
|
|
/********************************
|
|
|
|
* Standard GObject boilerplate *
|
|
|
|
********************************/
|
|
|
|
|
|
|
|
static void gst_decode_bin_class_init (GstDecodeBinClass * klass);
|
|
|
|
static void gst_decode_bin_init (GstDecodeBin * decode_bin);
|
|
|
|
static void gst_decode_bin_dispose (GObject * object);
|
|
|
|
static void gst_decode_bin_finalize (GObject * object);
|
|
|
|
|
|
|
|
static GType
|
|
|
|
gst_decode_bin_get_type (void)
|
|
|
|
{
|
|
|
|
static GType gst_decode_bin_type = 0;
|
|
|
|
|
|
|
|
if (!gst_decode_bin_type) {
|
|
|
|
static const GTypeInfo gst_decode_bin_info = {
|
|
|
|
sizeof (GstDecodeBinClass),
|
|
|
|
NULL,
|
|
|
|
NULL,
|
|
|
|
(GClassInitFunc) gst_decode_bin_class_init,
|
|
|
|
NULL,
|
|
|
|
NULL,
|
|
|
|
sizeof (GstDecodeBin),
|
|
|
|
0,
|
|
|
|
(GInstanceInitFunc) gst_decode_bin_init,
|
|
|
|
NULL
|
|
|
|
};
|
|
|
|
|
|
|
|
gst_decode_bin_type =
|
2011-06-14 22:51:29 +00:00
|
|
|
g_type_register_static (GST_TYPE_BIN, "GstDecodeBin",
|
gst/playback/: New decodebin2 element.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstdecodebin2.c: (gst_decode_bin_get_type),
(_gst_boolean_accumulator), (gst_decode_bin_class_init),
(gst_decode_bin_factory_filter), (compare_ranks), (print_feature),
(gst_decode_bin_init), (gst_decode_bin_dispose),
(gst_decode_bin_finalize), (gst_decode_bin_set_property),
(gst_decode_bin_get_property), (gst_decode_bin_set_caps),
(gst_decode_bin_get_caps), (gst_decode_bin_autoplug_continue),
(gst_decode_bin_autoplug_sort), (analyze_new_pad), (connect_pad),
(connect_element), (expose_pad), (type_found),
(pad_added_group_cb), (pad_removed_group_cb),
(no_more_pads_group_cb), (pad_added_cb), (pad_removed_cb),
(no_more_pads_cb), (find_compatibles), (is_demuxer_element),
(are_raw_caps), (multi_queue_overrun_cb),
(multi_queue_underrun_cb), (gst_decode_group_new),
(get_current_group), (group_demuxer_event_probe),
(gst_decode_group_control_demuxer_pad),
(gst_decode_group_control_source_pad),
(gst_decode_group_check_if_blocked),
(gst_decode_group_check_if_drained), (gst_decode_group_expose),
(gst_decode_group_hide), (gst_decode_group_free),
(gst_decode_group_set_complete), (source_pad_blocked_cb),
(source_pad_event_probe), (gst_decode_pad_new), (add_fakesink),
(remove_fakesink), (find_sink_pad), (gst_decode_bin_change_state),
(plugin_init):
New decodebin2 element.
Closes #370092
* gst/playback/gstplay-marshal.list:
Added marshallers for new signals in decodebin2
* gst/playback/gstplaybasebin.c: (setup_subtitle), (make_decoder):
Use decodebin2 if *and only if* the USE_DECODEBIN2 environment variable
is set.
2006-11-28 14:40:39 +00:00
|
|
|
&gst_decode_bin_info, 0);
|
|
|
|
}
|
|
|
|
|
|
|
|
return gst_decode_bin_type;
|
|
|
|
}
|
|
|
|
|
|
|
|
static gboolean
|
|
|
|
_gst_boolean_accumulator (GSignalInvocationHint * ihint,
|
|
|
|
GValue * return_accu, const GValue * handler_return, gpointer dummy)
|
|
|
|
{
|
|
|
|
gboolean myboolean;
|
|
|
|
|
|
|
|
myboolean = g_value_get_boolean (handler_return);
|
|
|
|
if (!(ihint->run_type & G_SIGNAL_RUN_CLEANUP))
|
|
|
|
g_value_set_boolean (return_accu, myboolean);
|
|
|
|
|
|
|
|
/* stop emission if FALSE */
|
|
|
|
return myboolean;
|
|
|
|
}
|
|
|
|
|
2013-03-29 17:27:03 +00:00
|
|
|
static gboolean
|
|
|
|
_gst_boolean_or_accumulator (GSignalInvocationHint * ihint,
|
|
|
|
GValue * return_accu, const GValue * handler_return, gpointer dummy)
|
|
|
|
{
|
|
|
|
gboolean myboolean;
|
|
|
|
gboolean retboolean;
|
|
|
|
|
|
|
|
myboolean = g_value_get_boolean (handler_return);
|
|
|
|
retboolean = g_value_get_boolean (return_accu);
|
|
|
|
|
|
|
|
if (!(ihint->run_type & G_SIGNAL_RUN_CLEANUP))
|
|
|
|
g_value_set_boolean (return_accu, myboolean || retboolean);
|
|
|
|
|
|
|
|
return TRUE;
|
|
|
|
}
|
|
|
|
|
gst/playback/Makefile.am: Group decodebin2 and uridecodebin into the same plugin so that they can share the GEnumType.
Original commit message from CVS:
* gst/playback/Makefile.am:
Group decodebin2 and uridecodebin into the same plugin so that they
can share the GEnumType.
* gst/playback/gstdecodebin2.c: (_gst_array_accumulator),
(_gst_select_accumulator), (gst_decode_bin_class_init),
(gst_decode_bin_init), (gst_decode_bin_autoplug_sort),
(gst_decode_bin_autoplug_select), (gst_decode_bin_autoplug_add),
(analyze_new_pad), (connect_pad), (gst_decode_bin_plugin_init):
Add signal to sort factories instead of the more awkward autoplug-select
signal.
Modify autoplug_select so that we can try, skip or expose the
autopluggin of an element on a pad.
* gst/playback/gstfactorylists.c: (compare_ranks),
(decoders_filter), (sinks_filter), (gst_factory_list_is_type),
(element_filter), (gst_factory_list_get_elements),
(gst_factory_list_debug), (gst_factory_list_filter):
* gst/playback/gstfactorylists.h:
Simplify the API, allow getting elements based on mask.
* gst/playback/gstplay-marshal.list:
Add some more marshallers.
* gst/playback/gstplaybin2.c: (init_group), (gst_play_bin_init),
(gst_play_bin_finalize), (pad_removed_cb), (autoplug_factories_cb),
(autoplug_select_cb), (activate_group):
Add support for managing non-raw sinks by providing a custom element and
sink list to decodebin2.
Try to plug non-raw sinks when decodebin2 using autoplug-select of
decodebin2.
* gst/playback/gstplaysink.c: (gen_video_chain), (gen_audio_chain),
(gst_play_sink_set_mode), (gst_play_sink_request_pad):
* gst/playback/gstplaysink.h:
Add support for raw and non-raw sinks.
Add support to force sinks selected by playbin2.
Don't plug raw converters for non-raw sinks.
* gst/playback/gsturidecodebin.c: (_gst_array_accumulator),
(_gst_select_accumulator), (gst_uri_decode_bin_class_init),
(proxy_autoplug_select_signal), (gst_uri_decode_bin_plugin_init),
(plugin_init):
Use right accumulators.
Proxy new signal.
2007-12-05 17:11:48 +00:00
|
|
|
/* we collect the first result */
|
|
|
|
static gboolean
|
|
|
|
_gst_array_accumulator (GSignalInvocationHint * ihint,
|
|
|
|
GValue * return_accu, const GValue * handler_return, gpointer dummy)
|
|
|
|
{
|
|
|
|
gpointer array;
|
|
|
|
|
|
|
|
array = g_value_get_boxed (handler_return);
|
|
|
|
if (!(ihint->run_type & G_SIGNAL_RUN_CLEANUP))
|
|
|
|
g_value_set_boxed (return_accu, array);
|
|
|
|
|
|
|
|
return FALSE;
|
|
|
|
}
|
|
|
|
|
|
|
|
static gboolean
|
|
|
|
_gst_select_accumulator (GSignalInvocationHint * ihint,
|
|
|
|
GValue * return_accu, const GValue * handler_return, gpointer dummy)
|
|
|
|
{
|
|
|
|
GstAutoplugSelectResult res;
|
|
|
|
|
|
|
|
res = g_value_get_enum (handler_return);
|
|
|
|
if (!(ihint->run_type & G_SIGNAL_RUN_CLEANUP))
|
|
|
|
g_value_set_enum (return_accu, res);
|
|
|
|
|
2014-01-27 13:19:07 +00:00
|
|
|
/* Call the next handler in the chain (if any) when the current callback
|
|
|
|
* returns TRY. This makes it possible to register separate autoplug-select
|
|
|
|
* handlers that implement different TRY/EXPOSE/SKIP strategies.
|
|
|
|
*/
|
|
|
|
if (res == GST_AUTOPLUG_SELECT_TRY)
|
|
|
|
return TRUE;
|
|
|
|
|
gst/playback/Makefile.am: Group decodebin2 and uridecodebin into the same plugin so that they can share the GEnumType.
Original commit message from CVS:
* gst/playback/Makefile.am:
Group decodebin2 and uridecodebin into the same plugin so that they
can share the GEnumType.
* gst/playback/gstdecodebin2.c: (_gst_array_accumulator),
(_gst_select_accumulator), (gst_decode_bin_class_init),
(gst_decode_bin_init), (gst_decode_bin_autoplug_sort),
(gst_decode_bin_autoplug_select), (gst_decode_bin_autoplug_add),
(analyze_new_pad), (connect_pad), (gst_decode_bin_plugin_init):
Add signal to sort factories instead of the more awkward autoplug-select
signal.
Modify autoplug_select so that we can try, skip or expose the
autopluggin of an element on a pad.
* gst/playback/gstfactorylists.c: (compare_ranks),
(decoders_filter), (sinks_filter), (gst_factory_list_is_type),
(element_filter), (gst_factory_list_get_elements),
(gst_factory_list_debug), (gst_factory_list_filter):
* gst/playback/gstfactorylists.h:
Simplify the API, allow getting elements based on mask.
* gst/playback/gstplay-marshal.list:
Add some more marshallers.
* gst/playback/gstplaybin2.c: (init_group), (gst_play_bin_init),
(gst_play_bin_finalize), (pad_removed_cb), (autoplug_factories_cb),
(autoplug_select_cb), (activate_group):
Add support for managing non-raw sinks by providing a custom element and
sink list to decodebin2.
Try to plug non-raw sinks when decodebin2 using autoplug-select of
decodebin2.
* gst/playback/gstplaysink.c: (gen_video_chain), (gen_audio_chain),
(gst_play_sink_set_mode), (gst_play_sink_request_pad):
* gst/playback/gstplaysink.h:
Add support for raw and non-raw sinks.
Add support to force sinks selected by playbin2.
Don't plug raw converters for non-raw sinks.
* gst/playback/gsturidecodebin.c: (_gst_array_accumulator),
(_gst_select_accumulator), (gst_uri_decode_bin_class_init),
(proxy_autoplug_select_signal), (gst_uri_decode_bin_plugin_init),
(plugin_init):
Use right accumulators.
Proxy new signal.
2007-12-05 17:11:48 +00:00
|
|
|
return FALSE;
|
|
|
|
}
|
|
|
|
|
2010-06-14 09:16:45 +00:00
|
|
|
static gboolean
|
|
|
|
_gst_array_hasvalue_accumulator (GSignalInvocationHint * ihint,
|
|
|
|
GValue * return_accu, const GValue * handler_return, gpointer dummy)
|
|
|
|
{
|
|
|
|
gpointer array;
|
|
|
|
|
|
|
|
array = g_value_get_boxed (handler_return);
|
|
|
|
if (!(ihint->run_type & G_SIGNAL_RUN_CLEANUP))
|
|
|
|
g_value_set_boxed (return_accu, array);
|
|
|
|
|
|
|
|
if (array != NULL)
|
|
|
|
return FALSE;
|
|
|
|
|
|
|
|
return TRUE;
|
|
|
|
}
|
|
|
|
|
gst/playback/: New decodebin2 element.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstdecodebin2.c: (gst_decode_bin_get_type),
(_gst_boolean_accumulator), (gst_decode_bin_class_init),
(gst_decode_bin_factory_filter), (compare_ranks), (print_feature),
(gst_decode_bin_init), (gst_decode_bin_dispose),
(gst_decode_bin_finalize), (gst_decode_bin_set_property),
(gst_decode_bin_get_property), (gst_decode_bin_set_caps),
(gst_decode_bin_get_caps), (gst_decode_bin_autoplug_continue),
(gst_decode_bin_autoplug_sort), (analyze_new_pad), (connect_pad),
(connect_element), (expose_pad), (type_found),
(pad_added_group_cb), (pad_removed_group_cb),
(no_more_pads_group_cb), (pad_added_cb), (pad_removed_cb),
(no_more_pads_cb), (find_compatibles), (is_demuxer_element),
(are_raw_caps), (multi_queue_overrun_cb),
(multi_queue_underrun_cb), (gst_decode_group_new),
(get_current_group), (group_demuxer_event_probe),
(gst_decode_group_control_demuxer_pad),
(gst_decode_group_control_source_pad),
(gst_decode_group_check_if_blocked),
(gst_decode_group_check_if_drained), (gst_decode_group_expose),
(gst_decode_group_hide), (gst_decode_group_free),
(gst_decode_group_set_complete), (source_pad_blocked_cb),
(source_pad_event_probe), (gst_decode_pad_new), (add_fakesink),
(remove_fakesink), (find_sink_pad), (gst_decode_bin_change_state),
(plugin_init):
New decodebin2 element.
Closes #370092
* gst/playback/gstplay-marshal.list:
Added marshallers for new signals in decodebin2
* gst/playback/gstplaybasebin.c: (setup_subtitle), (make_decoder):
Use decodebin2 if *and only if* the USE_DECODEBIN2 environment variable
is set.
2006-11-28 14:40:39 +00:00
|
|
|
static void
|
|
|
|
gst_decode_bin_class_init (GstDecodeBinClass * klass)
|
|
|
|
{
|
|
|
|
GObjectClass *gobject_klass;
|
|
|
|
GstElementClass *gstelement_klass;
|
2011-10-13 15:34:49 +00:00
|
|
|
GstBinClass *gstbin_klass;
|
gst/playback/: New decodebin2 element.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstdecodebin2.c: (gst_decode_bin_get_type),
(_gst_boolean_accumulator), (gst_decode_bin_class_init),
(gst_decode_bin_factory_filter), (compare_ranks), (print_feature),
(gst_decode_bin_init), (gst_decode_bin_dispose),
(gst_decode_bin_finalize), (gst_decode_bin_set_property),
(gst_decode_bin_get_property), (gst_decode_bin_set_caps),
(gst_decode_bin_get_caps), (gst_decode_bin_autoplug_continue),
(gst_decode_bin_autoplug_sort), (analyze_new_pad), (connect_pad),
(connect_element), (expose_pad), (type_found),
(pad_added_group_cb), (pad_removed_group_cb),
(no_more_pads_group_cb), (pad_added_cb), (pad_removed_cb),
(no_more_pads_cb), (find_compatibles), (is_demuxer_element),
(are_raw_caps), (multi_queue_overrun_cb),
(multi_queue_underrun_cb), (gst_decode_group_new),
(get_current_group), (group_demuxer_event_probe),
(gst_decode_group_control_demuxer_pad),
(gst_decode_group_control_source_pad),
(gst_decode_group_check_if_blocked),
(gst_decode_group_check_if_drained), (gst_decode_group_expose),
(gst_decode_group_hide), (gst_decode_group_free),
(gst_decode_group_set_complete), (source_pad_blocked_cb),
(source_pad_event_probe), (gst_decode_pad_new), (add_fakesink),
(remove_fakesink), (find_sink_pad), (gst_decode_bin_change_state),
(plugin_init):
New decodebin2 element.
Closes #370092
* gst/playback/gstplay-marshal.list:
Added marshallers for new signals in decodebin2
* gst/playback/gstplaybasebin.c: (setup_subtitle), (make_decoder):
Use decodebin2 if *and only if* the USE_DECODEBIN2 environment variable
is set.
2006-11-28 14:40:39 +00:00
|
|
|
|
|
|
|
gobject_klass = (GObjectClass *) klass;
|
|
|
|
gstelement_klass = (GstElementClass *) klass;
|
2011-10-13 15:34:49 +00:00
|
|
|
gstbin_klass = (GstBinClass *) klass;
|
gst/playback/: New decodebin2 element.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstdecodebin2.c: (gst_decode_bin_get_type),
(_gst_boolean_accumulator), (gst_decode_bin_class_init),
(gst_decode_bin_factory_filter), (compare_ranks), (print_feature),
(gst_decode_bin_init), (gst_decode_bin_dispose),
(gst_decode_bin_finalize), (gst_decode_bin_set_property),
(gst_decode_bin_get_property), (gst_decode_bin_set_caps),
(gst_decode_bin_get_caps), (gst_decode_bin_autoplug_continue),
(gst_decode_bin_autoplug_sort), (analyze_new_pad), (connect_pad),
(connect_element), (expose_pad), (type_found),
(pad_added_group_cb), (pad_removed_group_cb),
(no_more_pads_group_cb), (pad_added_cb), (pad_removed_cb),
(no_more_pads_cb), (find_compatibles), (is_demuxer_element),
(are_raw_caps), (multi_queue_overrun_cb),
(multi_queue_underrun_cb), (gst_decode_group_new),
(get_current_group), (group_demuxer_event_probe),
(gst_decode_group_control_demuxer_pad),
(gst_decode_group_control_source_pad),
(gst_decode_group_check_if_blocked),
(gst_decode_group_check_if_drained), (gst_decode_group_expose),
(gst_decode_group_hide), (gst_decode_group_free),
(gst_decode_group_set_complete), (source_pad_blocked_cb),
(source_pad_event_probe), (gst_decode_pad_new), (add_fakesink),
(remove_fakesink), (find_sink_pad), (gst_decode_bin_change_state),
(plugin_init):
New decodebin2 element.
Closes #370092
* gst/playback/gstplay-marshal.list:
Added marshallers for new signals in decodebin2
* gst/playback/gstplaybasebin.c: (setup_subtitle), (make_decoder):
Use decodebin2 if *and only if* the USE_DECODEBIN2 environment variable
is set.
2006-11-28 14:40:39 +00:00
|
|
|
|
|
|
|
parent_class = g_type_class_peek_parent (klass);
|
|
|
|
|
2009-10-28 00:59:35 +00:00
|
|
|
gobject_klass->dispose = gst_decode_bin_dispose;
|
|
|
|
gobject_klass->finalize = gst_decode_bin_finalize;
|
|
|
|
gobject_klass->set_property = gst_decode_bin_set_property;
|
|
|
|
gobject_klass->get_property = gst_decode_bin_get_property;
|
gst/playback/: New decodebin2 element.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstdecodebin2.c: (gst_decode_bin_get_type),
(_gst_boolean_accumulator), (gst_decode_bin_class_init),
(gst_decode_bin_factory_filter), (compare_ranks), (print_feature),
(gst_decode_bin_init), (gst_decode_bin_dispose),
(gst_decode_bin_finalize), (gst_decode_bin_set_property),
(gst_decode_bin_get_property), (gst_decode_bin_set_caps),
(gst_decode_bin_get_caps), (gst_decode_bin_autoplug_continue),
(gst_decode_bin_autoplug_sort), (analyze_new_pad), (connect_pad),
(connect_element), (expose_pad), (type_found),
(pad_added_group_cb), (pad_removed_group_cb),
(no_more_pads_group_cb), (pad_added_cb), (pad_removed_cb),
(no_more_pads_cb), (find_compatibles), (is_demuxer_element),
(are_raw_caps), (multi_queue_overrun_cb),
(multi_queue_underrun_cb), (gst_decode_group_new),
(get_current_group), (group_demuxer_event_probe),
(gst_decode_group_control_demuxer_pad),
(gst_decode_group_control_source_pad),
(gst_decode_group_check_if_blocked),
(gst_decode_group_check_if_drained), (gst_decode_group_expose),
(gst_decode_group_hide), (gst_decode_group_free),
(gst_decode_group_set_complete), (source_pad_blocked_cb),
(source_pad_event_probe), (gst_decode_pad_new), (add_fakesink),
(remove_fakesink), (find_sink_pad), (gst_decode_bin_change_state),
(plugin_init):
New decodebin2 element.
Closes #370092
* gst/playback/gstplay-marshal.list:
Added marshallers for new signals in decodebin2
* gst/playback/gstplaybasebin.c: (setup_subtitle), (make_decoder):
Use decodebin2 if *and only if* the USE_DECODEBIN2 environment variable
is set.
2006-11-28 14:40:39 +00:00
|
|
|
|
2007-03-02 12:59:15 +00:00
|
|
|
/**
|
2011-06-14 22:51:29 +00:00
|
|
|
* GstDecodeBin::unknown-type:
|
2011-02-18 10:58:44 +00:00
|
|
|
* @bin: The decodebin.
|
2008-05-22 22:09:16 +00:00
|
|
|
* @pad: The new pad containing caps that cannot be resolved to a 'final'
|
|
|
|
* stream type.
|
2008-04-15 19:02:10 +00:00
|
|
|
* @caps: The #GstCaps of the pad that cannot be resolved.
|
2007-03-02 12:59:15 +00:00
|
|
|
*
|
|
|
|
* This signal is emitted when a pad for which there is no further possible
|
|
|
|
* decoding is added to the decodebin.
|
|
|
|
*/
|
gst/playback/: New decodebin2 element.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstdecodebin2.c: (gst_decode_bin_get_type),
(_gst_boolean_accumulator), (gst_decode_bin_class_init),
(gst_decode_bin_factory_filter), (compare_ranks), (print_feature),
(gst_decode_bin_init), (gst_decode_bin_dispose),
(gst_decode_bin_finalize), (gst_decode_bin_set_property),
(gst_decode_bin_get_property), (gst_decode_bin_set_caps),
(gst_decode_bin_get_caps), (gst_decode_bin_autoplug_continue),
(gst_decode_bin_autoplug_sort), (analyze_new_pad), (connect_pad),
(connect_element), (expose_pad), (type_found),
(pad_added_group_cb), (pad_removed_group_cb),
(no_more_pads_group_cb), (pad_added_cb), (pad_removed_cb),
(no_more_pads_cb), (find_compatibles), (is_demuxer_element),
(are_raw_caps), (multi_queue_overrun_cb),
(multi_queue_underrun_cb), (gst_decode_group_new),
(get_current_group), (group_demuxer_event_probe),
(gst_decode_group_control_demuxer_pad),
(gst_decode_group_control_source_pad),
(gst_decode_group_check_if_blocked),
(gst_decode_group_check_if_drained), (gst_decode_group_expose),
(gst_decode_group_hide), (gst_decode_group_free),
(gst_decode_group_set_complete), (source_pad_blocked_cb),
(source_pad_event_probe), (gst_decode_pad_new), (add_fakesink),
(remove_fakesink), (find_sink_pad), (gst_decode_bin_change_state),
(plugin_init):
New decodebin2 element.
Closes #370092
* gst/playback/gstplay-marshal.list:
Added marshallers for new signals in decodebin2
* gst/playback/gstplaybasebin.c: (setup_subtitle), (make_decoder):
Use decodebin2 if *and only if* the USE_DECODEBIN2 environment variable
is set.
2006-11-28 14:40:39 +00:00
|
|
|
gst_decode_bin_signals[SIGNAL_UNKNOWN_TYPE] =
|
|
|
|
g_signal_new ("unknown-type", G_TYPE_FROM_CLASS (klass),
|
|
|
|
G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (GstDecodeBinClass, unknown_type),
|
2012-03-02 10:15:02 +00:00
|
|
|
NULL, NULL, g_cclosure_marshal_generic, G_TYPE_NONE, 2,
|
gst/playback/: New decodebin2 element.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstdecodebin2.c: (gst_decode_bin_get_type),
(_gst_boolean_accumulator), (gst_decode_bin_class_init),
(gst_decode_bin_factory_filter), (compare_ranks), (print_feature),
(gst_decode_bin_init), (gst_decode_bin_dispose),
(gst_decode_bin_finalize), (gst_decode_bin_set_property),
(gst_decode_bin_get_property), (gst_decode_bin_set_caps),
(gst_decode_bin_get_caps), (gst_decode_bin_autoplug_continue),
(gst_decode_bin_autoplug_sort), (analyze_new_pad), (connect_pad),
(connect_element), (expose_pad), (type_found),
(pad_added_group_cb), (pad_removed_group_cb),
(no_more_pads_group_cb), (pad_added_cb), (pad_removed_cb),
(no_more_pads_cb), (find_compatibles), (is_demuxer_element),
(are_raw_caps), (multi_queue_overrun_cb),
(multi_queue_underrun_cb), (gst_decode_group_new),
(get_current_group), (group_demuxer_event_probe),
(gst_decode_group_control_demuxer_pad),
(gst_decode_group_control_source_pad),
(gst_decode_group_check_if_blocked),
(gst_decode_group_check_if_drained), (gst_decode_group_expose),
(gst_decode_group_hide), (gst_decode_group_free),
(gst_decode_group_set_complete), (source_pad_blocked_cb),
(source_pad_event_probe), (gst_decode_pad_new), (add_fakesink),
(remove_fakesink), (find_sink_pad), (gst_decode_bin_change_state),
(plugin_init):
New decodebin2 element.
Closes #370092
* gst/playback/gstplay-marshal.list:
Added marshallers for new signals in decodebin2
* gst/playback/gstplaybasebin.c: (setup_subtitle), (make_decoder):
Use decodebin2 if *and only if* the USE_DECODEBIN2 environment variable
is set.
2006-11-28 14:40:39 +00:00
|
|
|
GST_TYPE_PAD, GST_TYPE_CAPS);
|
2007-03-02 12:59:15 +00:00
|
|
|
|
|
|
|
/**
|
2011-06-14 22:51:29 +00:00
|
|
|
* GstDecodeBin::autoplug-continue:
|
2011-02-18 10:58:44 +00:00
|
|
|
* @bin: The decodebin.
|
2007-10-24 11:07:57 +00:00
|
|
|
* @pad: The #GstPad.
|
2007-03-02 12:59:15 +00:00
|
|
|
* @caps: The #GstCaps found.
|
|
|
|
*
|
2011-06-14 22:51:29 +00:00
|
|
|
* This signal is emitted whenever decodebin finds a new stream. It is
|
2007-03-02 12:59:15 +00:00
|
|
|
* emitted before looking for any elements that can handle that stream.
|
|
|
|
*
|
2017-01-23 19:36:11 +00:00
|
|
|
* > Invocation of signal handlers stops after the first signal handler
|
2017-10-03 21:31:18 +00:00
|
|
|
* > returns %FALSE. Signal handlers are invoked in the order they were
|
2017-01-23 19:36:11 +00:00
|
|
|
* > connected in.
|
2011-02-18 10:58:44 +00:00
|
|
|
*
|
2017-10-03 21:31:18 +00:00
|
|
|
* Returns: %TRUE if you wish decodebin to look for elements that can
|
|
|
|
* handle the given @caps. If %FALSE, those caps will be considered as
|
2011-06-14 23:32:23 +00:00
|
|
|
* final and the pad will be exposed as such (see 'pad-added' signal of
|
|
|
|
* #GstElement).
|
2007-03-02 12:59:15 +00:00
|
|
|
*/
|
gst/playback/: New decodebin2 element.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstdecodebin2.c: (gst_decode_bin_get_type),
(_gst_boolean_accumulator), (gst_decode_bin_class_init),
(gst_decode_bin_factory_filter), (compare_ranks), (print_feature),
(gst_decode_bin_init), (gst_decode_bin_dispose),
(gst_decode_bin_finalize), (gst_decode_bin_set_property),
(gst_decode_bin_get_property), (gst_decode_bin_set_caps),
(gst_decode_bin_get_caps), (gst_decode_bin_autoplug_continue),
(gst_decode_bin_autoplug_sort), (analyze_new_pad), (connect_pad),
(connect_element), (expose_pad), (type_found),
(pad_added_group_cb), (pad_removed_group_cb),
(no_more_pads_group_cb), (pad_added_cb), (pad_removed_cb),
(no_more_pads_cb), (find_compatibles), (is_demuxer_element),
(are_raw_caps), (multi_queue_overrun_cb),
(multi_queue_underrun_cb), (gst_decode_group_new),
(get_current_group), (group_demuxer_event_probe),
(gst_decode_group_control_demuxer_pad),
(gst_decode_group_control_source_pad),
(gst_decode_group_check_if_blocked),
(gst_decode_group_check_if_drained), (gst_decode_group_expose),
(gst_decode_group_hide), (gst_decode_group_free),
(gst_decode_group_set_complete), (source_pad_blocked_cb),
(source_pad_event_probe), (gst_decode_pad_new), (add_fakesink),
(remove_fakesink), (find_sink_pad), (gst_decode_bin_change_state),
(plugin_init):
New decodebin2 element.
Closes #370092
* gst/playback/gstplay-marshal.list:
Added marshallers for new signals in decodebin2
* gst/playback/gstplaybasebin.c: (setup_subtitle), (make_decoder):
Use decodebin2 if *and only if* the USE_DECODEBIN2 environment variable
is set.
2006-11-28 14:40:39 +00:00
|
|
|
gst_decode_bin_signals[SIGNAL_AUTOPLUG_CONTINUE] =
|
|
|
|
g_signal_new ("autoplug-continue", G_TYPE_FROM_CLASS (klass),
|
|
|
|
G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (GstDecodeBinClass, autoplug_continue),
|
2012-03-02 10:15:02 +00:00
|
|
|
_gst_boolean_accumulator, NULL, g_cclosure_marshal_generic,
|
2007-10-24 11:07:57 +00:00
|
|
|
G_TYPE_BOOLEAN, 2, GST_TYPE_PAD, GST_TYPE_CAPS);
|
|
|
|
|
|
|
|
/**
|
2011-06-14 22:51:29 +00:00
|
|
|
* GstDecodeBin::autoplug-factories:
|
2011-02-18 10:58:44 +00:00
|
|
|
* @bin: The decodebin.
|
2007-10-24 11:07:57 +00:00
|
|
|
* @pad: The #GstPad.
|
|
|
|
* @caps: The #GstCaps found.
|
|
|
|
*
|
2017-12-01 08:25:32 +00:00
|
|
|
* This signal is emitted when an array of possible factories for @caps on
|
2011-06-14 22:51:29 +00:00
|
|
|
* @pad is needed. Decodebin will by default return an array with all
|
2011-01-25 16:03:23 +00:00
|
|
|
* compatible factories, sorted by rank.
|
gst/playback/: Refactor some common code to filter factories and check caps compat.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstfactorylists.c: (compare_ranks), (print_feature),
(get_feature_array), (decoders_filter), (sinks_filter),
(gst_factory_list_get_decoders), (gst_factory_list_get_sinks),
(gst_factory_list_filter):
* gst/playback/gstfactorylists.h:
Refactor some common code to filter factories and check caps compat.
* gst/playback/gstdecodebin.c:
* gst/playback/gstdecodebin2.c: (gst_decode_bin_class_init),
(gst_decode_bin_init), (gst_decode_bin_dispose),
(gst_decode_bin_autoplug_continue),
(gst_decode_bin_autoplug_factories),
(gst_decode_bin_autoplug_select), (analyze_new_pad),
(find_compatibles):
* gst/playback/gstplaybin.c:
* gst/playback/gstplaybin2.c: (gst_play_bin_class_init),
(gst_play_bin_init), (gst_play_bin_finalize),
(autoplug_factories_cb), (activate_group):
* gst/playback/gstqueue2.c:
* gst/playback/gsturidecodebin.c: (proxy_unknown_type_signal),
(proxy_autoplug_continue_signal),
(proxy_autoplug_factories_signal), (proxy_autoplug_select_signal),
(proxy_drained_signal):
Add some more debug info and use factor filtering code.
2007-11-30 17:47:15 +00:00
|
|
|
*
|
|
|
|
* If this function returns NULL, @pad will be exposed as a final caps.
|
|
|
|
*
|
2011-01-25 16:03:23 +00:00
|
|
|
* If this function returns an empty array, the pad will be considered as
|
2011-03-14 08:09:35 +00:00
|
|
|
* having an unhandled type media type.
|
2011-02-18 10:58:44 +00:00
|
|
|
*
|
2017-01-23 19:36:11 +00:00
|
|
|
* > Only the signal handler that is connected first will ever by invoked.
|
|
|
|
* > Don't connect signal handlers with the #G_CONNECT_AFTER flag to this
|
|
|
|
* > signal, they will never be invoked!
|
2007-10-24 11:07:57 +00:00
|
|
|
*
|
|
|
|
* Returns: a #GValueArray* with a list of factories to try. The factories are
|
|
|
|
* by default tried in the returned order or based on the index returned by
|
|
|
|
* "autoplug-select".
|
|
|
|
*/
|
|
|
|
gst_decode_bin_signals[SIGNAL_AUTOPLUG_FACTORIES] =
|
|
|
|
g_signal_new ("autoplug-factories", G_TYPE_FROM_CLASS (klass),
|
|
|
|
G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (GstDecodeBinClass,
|
gst/playback/Makefile.am: Group decodebin2 and uridecodebin into the same plugin so that they can share the GEnumType.
Original commit message from CVS:
* gst/playback/Makefile.am:
Group decodebin2 and uridecodebin into the same plugin so that they
can share the GEnumType.
* gst/playback/gstdecodebin2.c: (_gst_array_accumulator),
(_gst_select_accumulator), (gst_decode_bin_class_init),
(gst_decode_bin_init), (gst_decode_bin_autoplug_sort),
(gst_decode_bin_autoplug_select), (gst_decode_bin_autoplug_add),
(analyze_new_pad), (connect_pad), (gst_decode_bin_plugin_init):
Add signal to sort factories instead of the more awkward autoplug-select
signal.
Modify autoplug_select so that we can try, skip or expose the
autopluggin of an element on a pad.
* gst/playback/gstfactorylists.c: (compare_ranks),
(decoders_filter), (sinks_filter), (gst_factory_list_is_type),
(element_filter), (gst_factory_list_get_elements),
(gst_factory_list_debug), (gst_factory_list_filter):
* gst/playback/gstfactorylists.h:
Simplify the API, allow getting elements based on mask.
* gst/playback/gstplay-marshal.list:
Add some more marshallers.
* gst/playback/gstplaybin2.c: (init_group), (gst_play_bin_init),
(gst_play_bin_finalize), (pad_removed_cb), (autoplug_factories_cb),
(autoplug_select_cb), (activate_group):
Add support for managing non-raw sinks by providing a custom element and
sink list to decodebin2.
Try to plug non-raw sinks when decodebin2 using autoplug-select of
decodebin2.
* gst/playback/gstplaysink.c: (gen_video_chain), (gen_audio_chain),
(gst_play_sink_set_mode), (gst_play_sink_request_pad):
* gst/playback/gstplaysink.h:
Add support for raw and non-raw sinks.
Add support to force sinks selected by playbin2.
Don't plug raw converters for non-raw sinks.
* gst/playback/gsturidecodebin.c: (_gst_array_accumulator),
(_gst_select_accumulator), (gst_uri_decode_bin_class_init),
(proxy_autoplug_select_signal), (gst_uri_decode_bin_plugin_init),
(plugin_init):
Use right accumulators.
Proxy new signal.
2007-12-05 17:11:48 +00:00
|
|
|
autoplug_factories), _gst_array_accumulator, NULL,
|
2012-03-02 10:15:02 +00:00
|
|
|
g_cclosure_marshal_generic, G_TYPE_VALUE_ARRAY, 2,
|
2007-10-24 11:07:57 +00:00
|
|
|
GST_TYPE_PAD, GST_TYPE_CAPS);
|
2007-03-02 12:59:15 +00:00
|
|
|
|
gst/playback/Makefile.am: Group decodebin2 and uridecodebin into the same plugin so that they can share the GEnumType.
Original commit message from CVS:
* gst/playback/Makefile.am:
Group decodebin2 and uridecodebin into the same plugin so that they
can share the GEnumType.
* gst/playback/gstdecodebin2.c: (_gst_array_accumulator),
(_gst_select_accumulator), (gst_decode_bin_class_init),
(gst_decode_bin_init), (gst_decode_bin_autoplug_sort),
(gst_decode_bin_autoplug_select), (gst_decode_bin_autoplug_add),
(analyze_new_pad), (connect_pad), (gst_decode_bin_plugin_init):
Add signal to sort factories instead of the more awkward autoplug-select
signal.
Modify autoplug_select so that we can try, skip or expose the
autopluggin of an element on a pad.
* gst/playback/gstfactorylists.c: (compare_ranks),
(decoders_filter), (sinks_filter), (gst_factory_list_is_type),
(element_filter), (gst_factory_list_get_elements),
(gst_factory_list_debug), (gst_factory_list_filter):
* gst/playback/gstfactorylists.h:
Simplify the API, allow getting elements based on mask.
* gst/playback/gstplay-marshal.list:
Add some more marshallers.
* gst/playback/gstplaybin2.c: (init_group), (gst_play_bin_init),
(gst_play_bin_finalize), (pad_removed_cb), (autoplug_factories_cb),
(autoplug_select_cb), (activate_group):
Add support for managing non-raw sinks by providing a custom element and
sink list to decodebin2.
Try to plug non-raw sinks when decodebin2 using autoplug-select of
decodebin2.
* gst/playback/gstplaysink.c: (gen_video_chain), (gen_audio_chain),
(gst_play_sink_set_mode), (gst_play_sink_request_pad):
* gst/playback/gstplaysink.h:
Add support for raw and non-raw sinks.
Add support to force sinks selected by playbin2.
Don't plug raw converters for non-raw sinks.
* gst/playback/gsturidecodebin.c: (_gst_array_accumulator),
(_gst_select_accumulator), (gst_uri_decode_bin_class_init),
(proxy_autoplug_select_signal), (gst_uri_decode_bin_plugin_init),
(plugin_init):
Use right accumulators.
Proxy new signal.
2007-12-05 17:11:48 +00:00
|
|
|
/**
|
2011-06-14 22:51:29 +00:00
|
|
|
* GstDecodeBin::autoplug-sort:
|
2011-02-18 10:58:44 +00:00
|
|
|
* @bin: The decodebin.
|
gst/playback/Makefile.am: Group decodebin2 and uridecodebin into the same plugin so that they can share the GEnumType.
Original commit message from CVS:
* gst/playback/Makefile.am:
Group decodebin2 and uridecodebin into the same plugin so that they
can share the GEnumType.
* gst/playback/gstdecodebin2.c: (_gst_array_accumulator),
(_gst_select_accumulator), (gst_decode_bin_class_init),
(gst_decode_bin_init), (gst_decode_bin_autoplug_sort),
(gst_decode_bin_autoplug_select), (gst_decode_bin_autoplug_add),
(analyze_new_pad), (connect_pad), (gst_decode_bin_plugin_init):
Add signal to sort factories instead of the more awkward autoplug-select
signal.
Modify autoplug_select so that we can try, skip or expose the
autopluggin of an element on a pad.
* gst/playback/gstfactorylists.c: (compare_ranks),
(decoders_filter), (sinks_filter), (gst_factory_list_is_type),
(element_filter), (gst_factory_list_get_elements),
(gst_factory_list_debug), (gst_factory_list_filter):
* gst/playback/gstfactorylists.h:
Simplify the API, allow getting elements based on mask.
* gst/playback/gstplay-marshal.list:
Add some more marshallers.
* gst/playback/gstplaybin2.c: (init_group), (gst_play_bin_init),
(gst_play_bin_finalize), (pad_removed_cb), (autoplug_factories_cb),
(autoplug_select_cb), (activate_group):
Add support for managing non-raw sinks by providing a custom element and
sink list to decodebin2.
Try to plug non-raw sinks when decodebin2 using autoplug-select of
decodebin2.
* gst/playback/gstplaysink.c: (gen_video_chain), (gen_audio_chain),
(gst_play_sink_set_mode), (gst_play_sink_request_pad):
* gst/playback/gstplaysink.h:
Add support for raw and non-raw sinks.
Add support to force sinks selected by playbin2.
Don't plug raw converters for non-raw sinks.
* gst/playback/gsturidecodebin.c: (_gst_array_accumulator),
(_gst_select_accumulator), (gst_uri_decode_bin_class_init),
(proxy_autoplug_select_signal), (gst_uri_decode_bin_plugin_init),
(plugin_init):
Use right accumulators.
Proxy new signal.
2007-12-05 17:11:48 +00:00
|
|
|
* @pad: The #GstPad.
|
|
|
|
* @caps: The #GstCaps.
|
|
|
|
* @factories: A #GValueArray of possible #GstElementFactory to use.
|
|
|
|
*
|
2011-06-14 22:51:29 +00:00
|
|
|
* Once decodebin has found the possible #GstElementFactory objects to try
|
2017-12-01 08:25:32 +00:00
|
|
|
* for @caps on @pad, this signal is emitted. The purpose of the signal is for
|
gst/playback/Makefile.am: Group decodebin2 and uridecodebin into the same plugin so that they can share the GEnumType.
Original commit message from CVS:
* gst/playback/Makefile.am:
Group decodebin2 and uridecodebin into the same plugin so that they
can share the GEnumType.
* gst/playback/gstdecodebin2.c: (_gst_array_accumulator),
(_gst_select_accumulator), (gst_decode_bin_class_init),
(gst_decode_bin_init), (gst_decode_bin_autoplug_sort),
(gst_decode_bin_autoplug_select), (gst_decode_bin_autoplug_add),
(analyze_new_pad), (connect_pad), (gst_decode_bin_plugin_init):
Add signal to sort factories instead of the more awkward autoplug-select
signal.
Modify autoplug_select so that we can try, skip or expose the
autopluggin of an element on a pad.
* gst/playback/gstfactorylists.c: (compare_ranks),
(decoders_filter), (sinks_filter), (gst_factory_list_is_type),
(element_filter), (gst_factory_list_get_elements),
(gst_factory_list_debug), (gst_factory_list_filter):
* gst/playback/gstfactorylists.h:
Simplify the API, allow getting elements based on mask.
* gst/playback/gstplay-marshal.list:
Add some more marshallers.
* gst/playback/gstplaybin2.c: (init_group), (gst_play_bin_init),
(gst_play_bin_finalize), (pad_removed_cb), (autoplug_factories_cb),
(autoplug_select_cb), (activate_group):
Add support for managing non-raw sinks by providing a custom element and
sink list to decodebin2.
Try to plug non-raw sinks when decodebin2 using autoplug-select of
decodebin2.
* gst/playback/gstplaysink.c: (gen_video_chain), (gen_audio_chain),
(gst_play_sink_set_mode), (gst_play_sink_request_pad):
* gst/playback/gstplaysink.h:
Add support for raw and non-raw sinks.
Add support to force sinks selected by playbin2.
Don't plug raw converters for non-raw sinks.
* gst/playback/gsturidecodebin.c: (_gst_array_accumulator),
(_gst_select_accumulator), (gst_uri_decode_bin_class_init),
(proxy_autoplug_select_signal), (gst_uri_decode_bin_plugin_init),
(plugin_init):
Use right accumulators.
Proxy new signal.
2007-12-05 17:11:48 +00:00
|
|
|
* the application to perform additional sorting or filtering on the element
|
|
|
|
* factory array.
|
|
|
|
*
|
2017-10-03 21:31:18 +00:00
|
|
|
* The callee should copy and modify @factories or return %NULL if the
|
2011-02-18 10:58:44 +00:00
|
|
|
* order should not change.
|
|
|
|
*
|
2017-01-23 19:36:11 +00:00
|
|
|
* > Invocation of signal handlers stops after one signal handler has
|
2017-10-03 21:31:18 +00:00
|
|
|
* > returned something else than %NULL. Signal handlers are invoked in
|
2017-01-23 19:36:11 +00:00
|
|
|
* > the order they were connected in.
|
|
|
|
* > Don't connect signal handlers with the #G_CONNECT_AFTER flag to this
|
|
|
|
* > signal, they will never be invoked!
|
gst/playback/Makefile.am: Group decodebin2 and uridecodebin into the same plugin so that they can share the GEnumType.
Original commit message from CVS:
* gst/playback/Makefile.am:
Group decodebin2 and uridecodebin into the same plugin so that they
can share the GEnumType.
* gst/playback/gstdecodebin2.c: (_gst_array_accumulator),
(_gst_select_accumulator), (gst_decode_bin_class_init),
(gst_decode_bin_init), (gst_decode_bin_autoplug_sort),
(gst_decode_bin_autoplug_select), (gst_decode_bin_autoplug_add),
(analyze_new_pad), (connect_pad), (gst_decode_bin_plugin_init):
Add signal to sort factories instead of the more awkward autoplug-select
signal.
Modify autoplug_select so that we can try, skip or expose the
autopluggin of an element on a pad.
* gst/playback/gstfactorylists.c: (compare_ranks),
(decoders_filter), (sinks_filter), (gst_factory_list_is_type),
(element_filter), (gst_factory_list_get_elements),
(gst_factory_list_debug), (gst_factory_list_filter):
* gst/playback/gstfactorylists.h:
Simplify the API, allow getting elements based on mask.
* gst/playback/gstplay-marshal.list:
Add some more marshallers.
* gst/playback/gstplaybin2.c: (init_group), (gst_play_bin_init),
(gst_play_bin_finalize), (pad_removed_cb), (autoplug_factories_cb),
(autoplug_select_cb), (activate_group):
Add support for managing non-raw sinks by providing a custom element and
sink list to decodebin2.
Try to plug non-raw sinks when decodebin2 using autoplug-select of
decodebin2.
* gst/playback/gstplaysink.c: (gen_video_chain), (gen_audio_chain),
(gst_play_sink_set_mode), (gst_play_sink_request_pad):
* gst/playback/gstplaysink.h:
Add support for raw and non-raw sinks.
Add support to force sinks selected by playbin2.
Don't plug raw converters for non-raw sinks.
* gst/playback/gsturidecodebin.c: (_gst_array_accumulator),
(_gst_select_accumulator), (gst_uri_decode_bin_class_init),
(proxy_autoplug_select_signal), (gst_uri_decode_bin_plugin_init),
(plugin_init):
Use right accumulators.
Proxy new signal.
2007-12-05 17:11:48 +00:00
|
|
|
*
|
|
|
|
* Returns: A new sorted array of #GstElementFactory objects.
|
|
|
|
*/
|
|
|
|
gst_decode_bin_signals[SIGNAL_AUTOPLUG_SORT] =
|
|
|
|
g_signal_new ("autoplug-sort", G_TYPE_FROM_CLASS (klass),
|
|
|
|
G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (GstDecodeBinClass, autoplug_sort),
|
2010-06-14 09:16:45 +00:00
|
|
|
_gst_array_hasvalue_accumulator, NULL,
|
2012-07-09 07:35:22 +00:00
|
|
|
g_cclosure_marshal_generic, G_TYPE_VALUE_ARRAY, 3, GST_TYPE_PAD,
|
|
|
|
GST_TYPE_CAPS, G_TYPE_VALUE_ARRAY | G_SIGNAL_TYPE_STATIC_SCOPE);
|
gst/playback/Makefile.am: Group decodebin2 and uridecodebin into the same plugin so that they can share the GEnumType.
Original commit message from CVS:
* gst/playback/Makefile.am:
Group decodebin2 and uridecodebin into the same plugin so that they
can share the GEnumType.
* gst/playback/gstdecodebin2.c: (_gst_array_accumulator),
(_gst_select_accumulator), (gst_decode_bin_class_init),
(gst_decode_bin_init), (gst_decode_bin_autoplug_sort),
(gst_decode_bin_autoplug_select), (gst_decode_bin_autoplug_add),
(analyze_new_pad), (connect_pad), (gst_decode_bin_plugin_init):
Add signal to sort factories instead of the more awkward autoplug-select
signal.
Modify autoplug_select so that we can try, skip or expose the
autopluggin of an element on a pad.
* gst/playback/gstfactorylists.c: (compare_ranks),
(decoders_filter), (sinks_filter), (gst_factory_list_is_type),
(element_filter), (gst_factory_list_get_elements),
(gst_factory_list_debug), (gst_factory_list_filter):
* gst/playback/gstfactorylists.h:
Simplify the API, allow getting elements based on mask.
* gst/playback/gstplay-marshal.list:
Add some more marshallers.
* gst/playback/gstplaybin2.c: (init_group), (gst_play_bin_init),
(gst_play_bin_finalize), (pad_removed_cb), (autoplug_factories_cb),
(autoplug_select_cb), (activate_group):
Add support for managing non-raw sinks by providing a custom element and
sink list to decodebin2.
Try to plug non-raw sinks when decodebin2 using autoplug-select of
decodebin2.
* gst/playback/gstplaysink.c: (gen_video_chain), (gen_audio_chain),
(gst_play_sink_set_mode), (gst_play_sink_request_pad):
* gst/playback/gstplaysink.h:
Add support for raw and non-raw sinks.
Add support to force sinks selected by playbin2.
Don't plug raw converters for non-raw sinks.
* gst/playback/gsturidecodebin.c: (_gst_array_accumulator),
(_gst_select_accumulator), (gst_uri_decode_bin_class_init),
(proxy_autoplug_select_signal), (gst_uri_decode_bin_plugin_init),
(plugin_init):
Use right accumulators.
Proxy new signal.
2007-12-05 17:11:48 +00:00
|
|
|
|
2007-03-02 12:59:15 +00:00
|
|
|
/**
|
2011-06-14 22:51:29 +00:00
|
|
|
* GstDecodeBin::autoplug-select:
|
2011-02-18 10:58:44 +00:00
|
|
|
* @bin: The decodebin.
|
2007-10-24 11:07:57 +00:00
|
|
|
* @pad: The #GstPad.
|
2007-03-02 12:59:15 +00:00
|
|
|
* @caps: The #GstCaps.
|
2011-02-18 10:58:44 +00:00
|
|
|
* @factory: A #GstElementFactory to use.
|
2007-03-02 12:59:15 +00:00
|
|
|
*
|
2011-06-14 22:51:29 +00:00
|
|
|
* This signal is emitted once decodebin has found all the possible
|
2009-02-02 11:54:31 +00:00
|
|
|
* #GstElementFactory that can be used to handle the given @caps. For each of
|
2011-09-13 19:10:43 +00:00
|
|
|
* those factories, this signal is emitted.
|
2007-03-02 12:59:15 +00:00
|
|
|
*
|
2009-02-02 11:54:31 +00:00
|
|
|
* The signal handler should return a #GST_TYPE_AUTOPLUG_SELECT_RESULT enum
|
2011-06-14 22:51:29 +00:00
|
|
|
* value indicating what decodebin should do next.
|
2009-02-02 11:54:31 +00:00
|
|
|
*
|
|
|
|
* A value of #GST_AUTOPLUG_SELECT_TRY will try to autoplug an element from
|
|
|
|
* @factory.
|
|
|
|
*
|
|
|
|
* A value of #GST_AUTOPLUG_SELECT_EXPOSE will expose @pad without plugging
|
|
|
|
* any element to it.
|
|
|
|
*
|
|
|
|
* A value of #GST_AUTOPLUG_SELECT_SKIP will skip @factory and move to the
|
|
|
|
* next factory.
|
|
|
|
*
|
2017-01-23 19:36:11 +00:00
|
|
|
* > The signal handler will not be invoked if any of the previously
|
|
|
|
* > registered signal handlers (if any) return a value other than
|
|
|
|
* > GST_AUTOPLUG_SELECT_TRY. Which also means that if you return
|
|
|
|
* > GST_AUTOPLUG_SELECT_TRY from one signal handler, handlers that get
|
|
|
|
* > registered next (again, if any) can override that decision.
|
2011-02-18 10:58:44 +00:00
|
|
|
*
|
2009-02-02 11:54:31 +00:00
|
|
|
* Returns: a #GST_TYPE_AUTOPLUG_SELECT_RESULT that indicates the required
|
|
|
|
* operation. the default handler will always return
|
|
|
|
* #GST_AUTOPLUG_SELECT_TRY.
|
2007-03-02 12:59:15 +00:00
|
|
|
*/
|
2007-10-24 11:07:57 +00:00
|
|
|
gst_decode_bin_signals[SIGNAL_AUTOPLUG_SELECT] =
|
|
|
|
g_signal_new ("autoplug-select", G_TYPE_FROM_CLASS (klass),
|
|
|
|
G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (GstDecodeBinClass, autoplug_select),
|
gst/playback/Makefile.am: Group decodebin2 and uridecodebin into the same plugin so that they can share the GEnumType.
Original commit message from CVS:
* gst/playback/Makefile.am:
Group decodebin2 and uridecodebin into the same plugin so that they
can share the GEnumType.
* gst/playback/gstdecodebin2.c: (_gst_array_accumulator),
(_gst_select_accumulator), (gst_decode_bin_class_init),
(gst_decode_bin_init), (gst_decode_bin_autoplug_sort),
(gst_decode_bin_autoplug_select), (gst_decode_bin_autoplug_add),
(analyze_new_pad), (connect_pad), (gst_decode_bin_plugin_init):
Add signal to sort factories instead of the more awkward autoplug-select
signal.
Modify autoplug_select so that we can try, skip or expose the
autopluggin of an element on a pad.
* gst/playback/gstfactorylists.c: (compare_ranks),
(decoders_filter), (sinks_filter), (gst_factory_list_is_type),
(element_filter), (gst_factory_list_get_elements),
(gst_factory_list_debug), (gst_factory_list_filter):
* gst/playback/gstfactorylists.h:
Simplify the API, allow getting elements based on mask.
* gst/playback/gstplay-marshal.list:
Add some more marshallers.
* gst/playback/gstplaybin2.c: (init_group), (gst_play_bin_init),
(gst_play_bin_finalize), (pad_removed_cb), (autoplug_factories_cb),
(autoplug_select_cb), (activate_group):
Add support for managing non-raw sinks by providing a custom element and
sink list to decodebin2.
Try to plug non-raw sinks when decodebin2 using autoplug-select of
decodebin2.
* gst/playback/gstplaysink.c: (gen_video_chain), (gen_audio_chain),
(gst_play_sink_set_mode), (gst_play_sink_request_pad):
* gst/playback/gstplaysink.h:
Add support for raw and non-raw sinks.
Add support to force sinks selected by playbin2.
Don't plug raw converters for non-raw sinks.
* gst/playback/gsturidecodebin.c: (_gst_array_accumulator),
(_gst_select_accumulator), (gst_uri_decode_bin_class_init),
(proxy_autoplug_select_signal), (gst_uri_decode_bin_plugin_init),
(plugin_init):
Use right accumulators.
Proxy new signal.
2007-12-05 17:11:48 +00:00
|
|
|
_gst_select_accumulator, NULL,
|
2012-03-02 10:15:02 +00:00
|
|
|
g_cclosure_marshal_generic,
|
gst/playback/Makefile.am: Group decodebin2 and uridecodebin into the same plugin so that they can share the GEnumType.
Original commit message from CVS:
* gst/playback/Makefile.am:
Group decodebin2 and uridecodebin into the same plugin so that they
can share the GEnumType.
* gst/playback/gstdecodebin2.c: (_gst_array_accumulator),
(_gst_select_accumulator), (gst_decode_bin_class_init),
(gst_decode_bin_init), (gst_decode_bin_autoplug_sort),
(gst_decode_bin_autoplug_select), (gst_decode_bin_autoplug_add),
(analyze_new_pad), (connect_pad), (gst_decode_bin_plugin_init):
Add signal to sort factories instead of the more awkward autoplug-select
signal.
Modify autoplug_select so that we can try, skip or expose the
autopluggin of an element on a pad.
* gst/playback/gstfactorylists.c: (compare_ranks),
(decoders_filter), (sinks_filter), (gst_factory_list_is_type),
(element_filter), (gst_factory_list_get_elements),
(gst_factory_list_debug), (gst_factory_list_filter):
* gst/playback/gstfactorylists.h:
Simplify the API, allow getting elements based on mask.
* gst/playback/gstplay-marshal.list:
Add some more marshallers.
* gst/playback/gstplaybin2.c: (init_group), (gst_play_bin_init),
(gst_play_bin_finalize), (pad_removed_cb), (autoplug_factories_cb),
(autoplug_select_cb), (activate_group):
Add support for managing non-raw sinks by providing a custom element and
sink list to decodebin2.
Try to plug non-raw sinks when decodebin2 using autoplug-select of
decodebin2.
* gst/playback/gstplaysink.c: (gen_video_chain), (gen_audio_chain),
(gst_play_sink_set_mode), (gst_play_sink_request_pad):
* gst/playback/gstplaysink.h:
Add support for raw and non-raw sinks.
Add support to force sinks selected by playbin2.
Don't plug raw converters for non-raw sinks.
* gst/playback/gsturidecodebin.c: (_gst_array_accumulator),
(_gst_select_accumulator), (gst_uri_decode_bin_class_init),
(proxy_autoplug_select_signal), (gst_uri_decode_bin_plugin_init),
(plugin_init):
Use right accumulators.
Proxy new signal.
2007-12-05 17:11:48 +00:00
|
|
|
GST_TYPE_AUTOPLUG_SELECT_RESULT, 3, GST_TYPE_PAD, GST_TYPE_CAPS,
|
|
|
|
GST_TYPE_ELEMENT_FACTORY);
|
gst/playback/: New decodebin2 element.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstdecodebin2.c: (gst_decode_bin_get_type),
(_gst_boolean_accumulator), (gst_decode_bin_class_init),
(gst_decode_bin_factory_filter), (compare_ranks), (print_feature),
(gst_decode_bin_init), (gst_decode_bin_dispose),
(gst_decode_bin_finalize), (gst_decode_bin_set_property),
(gst_decode_bin_get_property), (gst_decode_bin_set_caps),
(gst_decode_bin_get_caps), (gst_decode_bin_autoplug_continue),
(gst_decode_bin_autoplug_sort), (analyze_new_pad), (connect_pad),
(connect_element), (expose_pad), (type_found),
(pad_added_group_cb), (pad_removed_group_cb),
(no_more_pads_group_cb), (pad_added_cb), (pad_removed_cb),
(no_more_pads_cb), (find_compatibles), (is_demuxer_element),
(are_raw_caps), (multi_queue_overrun_cb),
(multi_queue_underrun_cb), (gst_decode_group_new),
(get_current_group), (group_demuxer_event_probe),
(gst_decode_group_control_demuxer_pad),
(gst_decode_group_control_source_pad),
(gst_decode_group_check_if_blocked),
(gst_decode_group_check_if_drained), (gst_decode_group_expose),
(gst_decode_group_hide), (gst_decode_group_free),
(gst_decode_group_set_complete), (source_pad_blocked_cb),
(source_pad_event_probe), (gst_decode_pad_new), (add_fakesink),
(remove_fakesink), (find_sink_pad), (gst_decode_bin_change_state),
(plugin_init):
New decodebin2 element.
Closes #370092
* gst/playback/gstplay-marshal.list:
Added marshallers for new signals in decodebin2
* gst/playback/gstplaybasebin.c: (setup_subtitle), (make_decoder):
Use decodebin2 if *and only if* the USE_DECODEBIN2 environment variable
is set.
2006-11-28 14:40:39 +00:00
|
|
|
|
2013-03-29 17:27:03 +00:00
|
|
|
/**
|
|
|
|
* GstDecodeBin::autoplug-query:
|
|
|
|
* @bin: The decodebin.
|
|
|
|
* @pad: The #GstPad.
|
2016-02-15 19:28:33 +00:00
|
|
|
* @child: The child element doing the query
|
2013-03-29 17:27:03 +00:00
|
|
|
* @query: The #GstQuery.
|
|
|
|
*
|
|
|
|
* This signal is emitted whenever an autoplugged element that is
|
|
|
|
* not linked downstream yet and not exposed does a query. It can
|
|
|
|
* be used to tell the element about the downstream supported caps
|
|
|
|
* for example.
|
|
|
|
*
|
2017-10-03 21:31:18 +00:00
|
|
|
* Returns: %TRUE if the query was handled, %FALSE otherwise.
|
2013-03-29 17:27:03 +00:00
|
|
|
*/
|
|
|
|
gst_decode_bin_signals[SIGNAL_AUTOPLUG_QUERY] =
|
|
|
|
g_signal_new ("autoplug-query", G_TYPE_FROM_CLASS (klass),
|
|
|
|
G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (GstDecodeBinClass, autoplug_query),
|
|
|
|
_gst_boolean_or_accumulator, NULL, g_cclosure_marshal_generic,
|
2013-05-28 10:03:49 +00:00
|
|
|
G_TYPE_BOOLEAN, 3, GST_TYPE_PAD, GST_TYPE_ELEMENT,
|
2013-03-29 17:27:03 +00:00
|
|
|
GST_TYPE_QUERY | G_SIGNAL_TYPE_STATIC_SCOPE);
|
|
|
|
|
gst/playback/gstdecodebin2.c: Add drained signal fired when decodebin finishes decoding the data.
Original commit message from CVS:
* gst/playback/gstdecodebin2.c: (gst_decode_bin_class_init),
(gst_decode_group_check_if_drained), (source_pad_event_probe),
(remove_fakesink):
Add drained signal fired when decodebin finishes decoding the data.
Remove deprecated STATE_DIRTY message.
* gst/playback/gsturidecodebin.c: (gst_uri_decode_bin_class_init),
(unknown_type_cb), (new_decoded_pad_cb), (pad_removed_cb),
(analyse_source), (proxy_drained_signal), (make_decoder),
(source_new_pad), (value_list_append_structure_list),
(handle_redirect_message), (handle_message):
Proxy the new drained signal.
Handle pad removed from decodebin.
Handle redirect messages by sorting multiple redirections based on the
connection speed.
2007-11-16 12:51:44 +00:00
|
|
|
/**
|
2011-06-14 22:51:29 +00:00
|
|
|
* GstDecodeBin::drained
|
2008-04-15 19:02:10 +00:00
|
|
|
* @bin: The decodebin
|
gst/playback/gstdecodebin2.c: Add drained signal fired when decodebin finishes decoding the data.
Original commit message from CVS:
* gst/playback/gstdecodebin2.c: (gst_decode_bin_class_init),
(gst_decode_group_check_if_drained), (source_pad_event_probe),
(remove_fakesink):
Add drained signal fired when decodebin finishes decoding the data.
Remove deprecated STATE_DIRTY message.
* gst/playback/gsturidecodebin.c: (gst_uri_decode_bin_class_init),
(unknown_type_cb), (new_decoded_pad_cb), (pad_removed_cb),
(analyse_source), (proxy_drained_signal), (make_decoder),
(source_new_pad), (value_list_append_structure_list),
(handle_redirect_message), (handle_message):
Proxy the new drained signal.
Handle pad removed from decodebin.
Handle redirect messages by sorting multiple redirections based on the
connection speed.
2007-11-16 12:51:44 +00:00
|
|
|
*
|
2011-06-14 22:51:29 +00:00
|
|
|
* This signal is emitted once decodebin has finished decoding all the data.
|
gst/playback/gstdecodebin2.c: Add drained signal fired when decodebin finishes decoding the data.
Original commit message from CVS:
* gst/playback/gstdecodebin2.c: (gst_decode_bin_class_init),
(gst_decode_group_check_if_drained), (source_pad_event_probe),
(remove_fakesink):
Add drained signal fired when decodebin finishes decoding the data.
Remove deprecated STATE_DIRTY message.
* gst/playback/gsturidecodebin.c: (gst_uri_decode_bin_class_init),
(unknown_type_cb), (new_decoded_pad_cb), (pad_removed_cb),
(analyse_source), (proxy_drained_signal), (make_decoder),
(source_new_pad), (value_list_append_structure_list),
(handle_redirect_message), (handle_message):
Proxy the new drained signal.
Handle pad removed from decodebin.
Handle redirect messages by sorting multiple redirections based on the
connection speed.
2007-11-16 12:51:44 +00:00
|
|
|
*/
|
|
|
|
gst_decode_bin_signals[SIGNAL_DRAINED] =
|
|
|
|
g_signal_new ("drained", G_TYPE_FROM_CLASS (klass),
|
|
|
|
G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (GstDecodeBinClass, drained),
|
2012-03-02 10:15:02 +00:00
|
|
|
NULL, NULL, g_cclosure_marshal_generic, G_TYPE_NONE, 0, G_TYPE_NONE);
|
gst/playback/gstdecodebin2.c: Add drained signal fired when decodebin finishes decoding the data.
Original commit message from CVS:
* gst/playback/gstdecodebin2.c: (gst_decode_bin_class_init),
(gst_decode_group_check_if_drained), (source_pad_event_probe),
(remove_fakesink):
Add drained signal fired when decodebin finishes decoding the data.
Remove deprecated STATE_DIRTY message.
* gst/playback/gsturidecodebin.c: (gst_uri_decode_bin_class_init),
(unknown_type_cb), (new_decoded_pad_cb), (pad_removed_cb),
(analyse_source), (proxy_drained_signal), (make_decoder),
(source_new_pad), (value_list_append_structure_list),
(handle_redirect_message), (handle_message):
Proxy the new drained signal.
Handle pad removed from decodebin.
Handle redirect messages by sorting multiple redirections based on the
connection speed.
2007-11-16 12:51:44 +00:00
|
|
|
|
gst/playback/: New decodebin2 element.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstdecodebin2.c: (gst_decode_bin_get_type),
(_gst_boolean_accumulator), (gst_decode_bin_class_init),
(gst_decode_bin_factory_filter), (compare_ranks), (print_feature),
(gst_decode_bin_init), (gst_decode_bin_dispose),
(gst_decode_bin_finalize), (gst_decode_bin_set_property),
(gst_decode_bin_get_property), (gst_decode_bin_set_caps),
(gst_decode_bin_get_caps), (gst_decode_bin_autoplug_continue),
(gst_decode_bin_autoplug_sort), (analyze_new_pad), (connect_pad),
(connect_element), (expose_pad), (type_found),
(pad_added_group_cb), (pad_removed_group_cb),
(no_more_pads_group_cb), (pad_added_cb), (pad_removed_cb),
(no_more_pads_cb), (find_compatibles), (is_demuxer_element),
(are_raw_caps), (multi_queue_overrun_cb),
(multi_queue_underrun_cb), (gst_decode_group_new),
(get_current_group), (group_demuxer_event_probe),
(gst_decode_group_control_demuxer_pad),
(gst_decode_group_control_source_pad),
(gst_decode_group_check_if_blocked),
(gst_decode_group_check_if_drained), (gst_decode_group_expose),
(gst_decode_group_hide), (gst_decode_group_free),
(gst_decode_group_set_complete), (source_pad_blocked_cb),
(source_pad_event_probe), (gst_decode_pad_new), (add_fakesink),
(remove_fakesink), (find_sink_pad), (gst_decode_bin_change_state),
(plugin_init):
New decodebin2 element.
Closes #370092
* gst/playback/gstplay-marshal.list:
Added marshallers for new signals in decodebin2
* gst/playback/gstplaybasebin.c: (setup_subtitle), (make_decoder):
Use decodebin2 if *and only if* the USE_DECODEBIN2 environment variable
is set.
2006-11-28 14:40:39 +00:00
|
|
|
g_object_class_install_property (gobject_klass, PROP_CAPS,
|
|
|
|
g_param_spec_boxed ("caps", "Caps", "The caps on which to stop decoding.",
|
2008-03-22 15:00:53 +00:00
|
|
|
GST_TYPE_CAPS, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
|
gst/playback/: New decodebin2 element.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstdecodebin2.c: (gst_decode_bin_get_type),
(_gst_boolean_accumulator), (gst_decode_bin_class_init),
(gst_decode_bin_factory_filter), (compare_ranks), (print_feature),
(gst_decode_bin_init), (gst_decode_bin_dispose),
(gst_decode_bin_finalize), (gst_decode_bin_set_property),
(gst_decode_bin_get_property), (gst_decode_bin_set_caps),
(gst_decode_bin_get_caps), (gst_decode_bin_autoplug_continue),
(gst_decode_bin_autoplug_sort), (analyze_new_pad), (connect_pad),
(connect_element), (expose_pad), (type_found),
(pad_added_group_cb), (pad_removed_group_cb),
(no_more_pads_group_cb), (pad_added_cb), (pad_removed_cb),
(no_more_pads_cb), (find_compatibles), (is_demuxer_element),
(are_raw_caps), (multi_queue_overrun_cb),
(multi_queue_underrun_cb), (gst_decode_group_new),
(get_current_group), (group_demuxer_event_probe),
(gst_decode_group_control_demuxer_pad),
(gst_decode_group_control_source_pad),
(gst_decode_group_check_if_blocked),
(gst_decode_group_check_if_drained), (gst_decode_group_expose),
(gst_decode_group_hide), (gst_decode_group_free),
(gst_decode_group_set_complete), (source_pad_blocked_cb),
(source_pad_event_probe), (gst_decode_pad_new), (add_fakesink),
(remove_fakesink), (find_sink_pad), (gst_decode_bin_change_state),
(plugin_init):
New decodebin2 element.
Closes #370092
* gst/playback/gstplay-marshal.list:
Added marshallers for new signals in decodebin2
* gst/playback/gstplaybasebin.c: (setup_subtitle), (make_decoder):
Use decodebin2 if *and only if* the USE_DECODEBIN2 environment variable
is set.
2006-11-28 14:40:39 +00:00
|
|
|
|
gst/playback/gstdecodebin2.c: Move subtitle encoding property to decodebin2 so that it can set the property value on ...
Original commit message from CVS:
* gst/playback/gstdecodebin2.c: (gst_decode_bin_class_init),
(gst_decode_bin_dispose), (gst_decode_bin_set_caps),
(gst_decode_bin_set_subs_encoding),
(gst_decode_bin_get_subs_encoding), (gst_decode_bin_set_property),
(gst_decode_bin_get_property), (analyze_new_pad):
Move subtitle encoding property to decodebin2 so that it can set the
property value on all elements that it autoplugs and that require it.
Make caps refcounting more consistent in get/set.
* gst/playback/gsturidecodebin.c: (_gst_boolean_accumulator),
(gst_uri_decode_bin_class_init), (gst_uri_decode_bin_init),
(gst_uri_decode_bin_finalize), (gst_uri_decode_bin_set_property),
(gst_uri_decode_bin_get_property), (proxy_unknown_type_signal),
(proxy_autoplug_continue_signal),
(proxy_autoplug_factories_signal), (proxy_autoplug_select_signal),
(make_decoder):
Proxy properties and relevant signals from the internal decodebin.
Make properties MT safe.
2007-10-25 17:36:49 +00:00
|
|
|
g_object_class_install_property (gobject_klass, PROP_SUBTITLE_ENCODING,
|
|
|
|
g_param_spec_string ("subtitle-encoding", "subtitle encoding",
|
|
|
|
"Encoding to assume if input subtitles are not in UTF-8 encoding. "
|
|
|
|
"If not set, the GST_SUBTITLE_ENCODING environment variable will "
|
|
|
|
"be checked for an encoding to use. If that is not set either, "
|
2008-03-22 15:00:53 +00:00
|
|
|
"ISO-8859-15 will be assumed.", NULL,
|
|
|
|
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
|
gst/playback/gstdecodebin2.c: Move subtitle encoding property to decodebin2 so that it can set the property value on ...
Original commit message from CVS:
* gst/playback/gstdecodebin2.c: (gst_decode_bin_class_init),
(gst_decode_bin_dispose), (gst_decode_bin_set_caps),
(gst_decode_bin_set_subs_encoding),
(gst_decode_bin_get_subs_encoding), (gst_decode_bin_set_property),
(gst_decode_bin_get_property), (analyze_new_pad):
Move subtitle encoding property to decodebin2 so that it can set the
property value on all elements that it autoplugs and that require it.
Make caps refcounting more consistent in get/set.
* gst/playback/gsturidecodebin.c: (_gst_boolean_accumulator),
(gst_uri_decode_bin_class_init), (gst_uri_decode_bin_init),
(gst_uri_decode_bin_finalize), (gst_uri_decode_bin_set_property),
(gst_uri_decode_bin_get_property), (proxy_unknown_type_signal),
(proxy_autoplug_continue_signal),
(proxy_autoplug_factories_signal), (proxy_autoplug_select_signal),
(make_decoder):
Proxy properties and relevant signals from the internal decodebin.
Make properties MT safe.
2007-10-25 17:36:49 +00:00
|
|
|
|
gst/playback/gstdecodebin2.c: Remove fakesink hack, we can now implement this more elegantly.
Original commit message from CVS:
* gst/playback/gstdecodebin2.c: (gst_decode_bin_class_init),
(gst_decode_bin_init), (gst_decode_bin_dispose),
(gst_decode_bin_set_sink_caps), (gst_decode_bin_get_sink_caps),
(gst_decode_bin_set_property), (gst_decode_bin_get_property),
(analyze_new_pad), (connect_pad), (expose_pad),
(gst_decode_group_new), (gst_decode_group_control_demuxer_pad),
(gst_decode_group_expose), (gst_decode_group_free),
(do_async_start), (do_async_done), (gst_decode_bin_change_state):
Remove fakesink hack, we can now implement this more elegantly.
Added property to bypass typefinding.
Removed underrun callback and demuxer pad probe, we now use the srcpad
probe to expose groups.
API::sink-caps property
* gst/playback/gstplaybin2.c: (no_more_pads_cb):
Guard against multiple emissions of the no_more_pads signal, which
happens when we are dealing with chained oggs.
* gst/playback/gsturidecodebin.c: (remove_decoders),
(make_decoder), (type_found), (setup_streaming), (source_new_pad),
(setup_source):
For streams, use our own typefind element and plug our queue after it.
We will need this to determine the type of buffering to use for the
queue soon.
2008-04-03 12:16:04 +00:00
|
|
|
g_object_class_install_property (gobject_klass, PROP_SINK_CAPS,
|
|
|
|
g_param_spec_boxed ("sink-caps", "Sink Caps",
|
|
|
|
"The caps of the input data. (NULL = use typefind element)",
|
|
|
|
GST_TYPE_CAPS, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
|
|
|
|
|
2009-10-23 14:42:23 +00:00
|
|
|
/**
|
2011-06-14 22:51:29 +00:00
|
|
|
* GstDecodeBin::use-buffering
|
2009-10-23 14:42:23 +00:00
|
|
|
*
|
2011-06-14 22:51:29 +00:00
|
|
|
* Activate buffering in decodebin. This will instruct the multiqueues behind
|
2009-10-23 14:42:23 +00:00
|
|
|
* decoders to emit BUFFERING messages.
|
|
|
|
*/
|
|
|
|
g_object_class_install_property (gobject_klass, PROP_USE_BUFFERING,
|
|
|
|
g_param_spec_boolean ("use-buffering", "Use Buffering",
|
2009-10-23 18:32:29 +00:00
|
|
|
"Emit GST_MESSAGE_BUFFERING based on low-/high-percent thresholds",
|
2009-10-23 14:42:23 +00:00
|
|
|
DEFAULT_USE_BUFFERING, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
|
|
|
|
|
|
|
|
/**
|
2011-06-14 22:51:29 +00:00
|
|
|
* GstDecodeBin:low-percent
|
2009-10-23 14:42:23 +00:00
|
|
|
*
|
2009-10-27 14:22:22 +00:00
|
|
|
* Low threshold percent for buffering to start.
|
2009-10-23 14:42:23 +00:00
|
|
|
*/
|
|
|
|
g_object_class_install_property (gobject_klass, PROP_LOW_PERCENT,
|
|
|
|
g_param_spec_int ("low-percent", "Low percent",
|
2009-10-27 14:22:22 +00:00
|
|
|
"Low threshold for buffering to start", 0, 100,
|
2009-10-23 14:42:23 +00:00
|
|
|
DEFAULT_LOW_PERCENT, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
|
|
|
|
/**
|
2011-06-14 22:51:29 +00:00
|
|
|
* GstDecodeBin:high-percent
|
2009-10-23 14:42:23 +00:00
|
|
|
*
|
2009-10-27 14:22:22 +00:00
|
|
|
* High threshold percent for buffering to finish.
|
2009-10-23 14:42:23 +00:00
|
|
|
*/
|
|
|
|
g_object_class_install_property (gobject_klass, PROP_HIGH_PERCENT,
|
|
|
|
g_param_spec_int ("high-percent", "High percent",
|
2009-10-27 14:22:22 +00:00
|
|
|
"High threshold for buffering to finish", 0, 100,
|
2009-10-23 14:42:23 +00:00
|
|
|
DEFAULT_HIGH_PERCENT, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
|
|
|
|
|
|
|
|
/**
|
2011-06-14 22:51:29 +00:00
|
|
|
* GstDecodeBin:max-size-bytes
|
2009-10-23 14:42:23 +00:00
|
|
|
*
|
2011-09-13 19:10:43 +00:00
|
|
|
* Max amount of bytes in the queue (0=automatic).
|
2009-10-23 14:42:23 +00:00
|
|
|
*/
|
|
|
|
g_object_class_install_property (gobject_klass, PROP_MAX_SIZE_BYTES,
|
|
|
|
g_param_spec_uint ("max-size-bytes", "Max. size (bytes)",
|
2009-10-23 15:02:40 +00:00
|
|
|
"Max. amount of bytes in the queue (0=automatic)",
|
|
|
|
0, G_MAXUINT, DEFAULT_MAX_SIZE_BYTES,
|
2009-10-23 14:42:23 +00:00
|
|
|
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
|
|
|
|
/**
|
2011-06-14 22:51:29 +00:00
|
|
|
* GstDecodeBin:max-size-buffers
|
2009-10-23 14:42:23 +00:00
|
|
|
*
|
2011-09-13 19:10:43 +00:00
|
|
|
* Max amount of buffers in the queue (0=automatic).
|
2009-10-23 14:42:23 +00:00
|
|
|
*/
|
|
|
|
g_object_class_install_property (gobject_klass, PROP_MAX_SIZE_BUFFERS,
|
|
|
|
g_param_spec_uint ("max-size-buffers", "Max. size (buffers)",
|
2009-10-23 15:02:40 +00:00
|
|
|
"Max. number of buffers in the queue (0=automatic)",
|
|
|
|
0, G_MAXUINT, DEFAULT_MAX_SIZE_BUFFERS,
|
2009-10-23 14:42:23 +00:00
|
|
|
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
|
|
|
|
/**
|
2011-06-14 22:51:29 +00:00
|
|
|
* GstDecodeBin:max-size-time
|
2009-10-23 14:42:23 +00:00
|
|
|
*
|
2011-09-13 19:10:43 +00:00
|
|
|
* Max amount of time in the queue (in ns, 0=automatic).
|
2009-10-23 14:42:23 +00:00
|
|
|
*/
|
|
|
|
g_object_class_install_property (gobject_klass, PROP_MAX_SIZE_TIME,
|
|
|
|
g_param_spec_uint64 ("max-size-time", "Max. size (ns)",
|
2009-10-23 15:02:40 +00:00
|
|
|
"Max. amount of data in the queue (in ns, 0=automatic)",
|
|
|
|
0, G_MAXUINT64,
|
2009-10-23 14:42:23 +00:00
|
|
|
DEFAULT_MAX_SIZE_TIME, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
|
|
|
|
|
2009-11-06 16:01:04 +00:00
|
|
|
/**
|
2011-06-14 22:51:29 +00:00
|
|
|
* GstDecodeBin::post-stream-topology
|
2009-11-06 16:01:04 +00:00
|
|
|
*
|
|
|
|
* Post stream-topology messages on the bus every time the topology changes.
|
|
|
|
*/
|
|
|
|
g_object_class_install_property (gobject_klass, PROP_POST_STREAM_TOPOLOGY,
|
|
|
|
g_param_spec_boolean ("post-stream-topology", "Post Stream Topology",
|
|
|
|
"Post stream-topology messages",
|
|
|
|
DEFAULT_POST_STREAM_TOPOLOGY,
|
|
|
|
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
|
|
|
|
|
2010-05-06 16:50:51 +00:00
|
|
|
/**
|
2011-06-14 22:51:29 +00:00
|
|
|
* GstDecodeBin::expose-all-streams
|
2010-05-06 16:50:51 +00:00
|
|
|
*
|
|
|
|
* Expose streams of unknown type.
|
|
|
|
*
|
|
|
|
* If set to %FALSE, then only the streams that can be decoded to the final
|
|
|
|
* caps (see 'caps' property) will have a pad exposed. Streams that do not
|
|
|
|
* match those caps but could have been decoded will not have decoder plugged
|
2011-01-25 16:03:23 +00:00
|
|
|
* in internally and will not have a pad exposed.
|
2010-05-06 16:50:51 +00:00
|
|
|
*/
|
|
|
|
g_object_class_install_property (gobject_klass, PROP_EXPOSE_ALL_STREAMS,
|
|
|
|
g_param_spec_boolean ("expose-all-streams", "Expose All Streams",
|
|
|
|
"Expose all streams, including those of unknown type or that don't match the 'caps' property",
|
|
|
|
DEFAULT_EXPOSE_ALL_STREAMS,
|
|
|
|
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
|
|
|
|
|
2012-05-10 17:11:47 +00:00
|
|
|
/**
|
|
|
|
* GstDecodeBin2::connection-speed
|
|
|
|
*
|
|
|
|
* Network connection speed in kbps (0 = unknownw)
|
|
|
|
*/
|
|
|
|
g_object_class_install_property (gobject_klass, PROP_CONNECTION_SPEED,
|
|
|
|
g_param_spec_uint64 ("connection-speed", "Connection Speed",
|
|
|
|
"Network connection speed in kbps (0 = unknown)",
|
|
|
|
0, G_MAXUINT64 / 1000, DEFAULT_CONNECTION_SPEED,
|
|
|
|
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
|
|
|
|
|
2009-11-06 16:01:04 +00:00
|
|
|
|
|
|
|
|
gst/playback/: New decodebin2 element.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstdecodebin2.c: (gst_decode_bin_get_type),
(_gst_boolean_accumulator), (gst_decode_bin_class_init),
(gst_decode_bin_factory_filter), (compare_ranks), (print_feature),
(gst_decode_bin_init), (gst_decode_bin_dispose),
(gst_decode_bin_finalize), (gst_decode_bin_set_property),
(gst_decode_bin_get_property), (gst_decode_bin_set_caps),
(gst_decode_bin_get_caps), (gst_decode_bin_autoplug_continue),
(gst_decode_bin_autoplug_sort), (analyze_new_pad), (connect_pad),
(connect_element), (expose_pad), (type_found),
(pad_added_group_cb), (pad_removed_group_cb),
(no_more_pads_group_cb), (pad_added_cb), (pad_removed_cb),
(no_more_pads_cb), (find_compatibles), (is_demuxer_element),
(are_raw_caps), (multi_queue_overrun_cb),
(multi_queue_underrun_cb), (gst_decode_group_new),
(get_current_group), (group_demuxer_event_probe),
(gst_decode_group_control_demuxer_pad),
(gst_decode_group_control_source_pad),
(gst_decode_group_check_if_blocked),
(gst_decode_group_check_if_drained), (gst_decode_group_expose),
(gst_decode_group_hide), (gst_decode_group_free),
(gst_decode_group_set_complete), (source_pad_blocked_cb),
(source_pad_event_probe), (gst_decode_pad_new), (add_fakesink),
(remove_fakesink), (find_sink_pad), (gst_decode_bin_change_state),
(plugin_init):
New decodebin2 element.
Closes #370092
* gst/playback/gstplay-marshal.list:
Added marshallers for new signals in decodebin2
* gst/playback/gstplaybasebin.c: (setup_subtitle), (make_decoder):
Use decodebin2 if *and only if* the USE_DECODEBIN2 environment variable
is set.
2006-11-28 14:40:39 +00:00
|
|
|
klass->autoplug_continue =
|
|
|
|
GST_DEBUG_FUNCPTR (gst_decode_bin_autoplug_continue);
|
2007-10-24 11:07:57 +00:00
|
|
|
klass->autoplug_factories =
|
|
|
|
GST_DEBUG_FUNCPTR (gst_decode_bin_autoplug_factories);
|
gst/playback/Makefile.am: Group decodebin2 and uridecodebin into the same plugin so that they can share the GEnumType.
Original commit message from CVS:
* gst/playback/Makefile.am:
Group decodebin2 and uridecodebin into the same plugin so that they
can share the GEnumType.
* gst/playback/gstdecodebin2.c: (_gst_array_accumulator),
(_gst_select_accumulator), (gst_decode_bin_class_init),
(gst_decode_bin_init), (gst_decode_bin_autoplug_sort),
(gst_decode_bin_autoplug_select), (gst_decode_bin_autoplug_add),
(analyze_new_pad), (connect_pad), (gst_decode_bin_plugin_init):
Add signal to sort factories instead of the more awkward autoplug-select
signal.
Modify autoplug_select so that we can try, skip or expose the
autopluggin of an element on a pad.
* gst/playback/gstfactorylists.c: (compare_ranks),
(decoders_filter), (sinks_filter), (gst_factory_list_is_type),
(element_filter), (gst_factory_list_get_elements),
(gst_factory_list_debug), (gst_factory_list_filter):
* gst/playback/gstfactorylists.h:
Simplify the API, allow getting elements based on mask.
* gst/playback/gstplay-marshal.list:
Add some more marshallers.
* gst/playback/gstplaybin2.c: (init_group), (gst_play_bin_init),
(gst_play_bin_finalize), (pad_removed_cb), (autoplug_factories_cb),
(autoplug_select_cb), (activate_group):
Add support for managing non-raw sinks by providing a custom element and
sink list to decodebin2.
Try to plug non-raw sinks when decodebin2 using autoplug-select of
decodebin2.
* gst/playback/gstplaysink.c: (gen_video_chain), (gen_audio_chain),
(gst_play_sink_set_mode), (gst_play_sink_request_pad):
* gst/playback/gstplaysink.h:
Add support for raw and non-raw sinks.
Add support to force sinks selected by playbin2.
Don't plug raw converters for non-raw sinks.
* gst/playback/gsturidecodebin.c: (_gst_array_accumulator),
(_gst_select_accumulator), (gst_uri_decode_bin_class_init),
(proxy_autoplug_select_signal), (gst_uri_decode_bin_plugin_init),
(plugin_init):
Use right accumulators.
Proxy new signal.
2007-12-05 17:11:48 +00:00
|
|
|
klass->autoplug_sort = GST_DEBUG_FUNCPTR (gst_decode_bin_autoplug_sort);
|
2007-10-24 11:07:57 +00:00
|
|
|
klass->autoplug_select = GST_DEBUG_FUNCPTR (gst_decode_bin_autoplug_select);
|
2013-03-29 17:27:03 +00:00
|
|
|
klass->autoplug_query = GST_DEBUG_FUNCPTR (gst_decode_bin_autoplug_query);
|
gst/playback/: New decodebin2 element.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstdecodebin2.c: (gst_decode_bin_get_type),
(_gst_boolean_accumulator), (gst_decode_bin_class_init),
(gst_decode_bin_factory_filter), (compare_ranks), (print_feature),
(gst_decode_bin_init), (gst_decode_bin_dispose),
(gst_decode_bin_finalize), (gst_decode_bin_set_property),
(gst_decode_bin_get_property), (gst_decode_bin_set_caps),
(gst_decode_bin_get_caps), (gst_decode_bin_autoplug_continue),
(gst_decode_bin_autoplug_sort), (analyze_new_pad), (connect_pad),
(connect_element), (expose_pad), (type_found),
(pad_added_group_cb), (pad_removed_group_cb),
(no_more_pads_group_cb), (pad_added_cb), (pad_removed_cb),
(no_more_pads_cb), (find_compatibles), (is_demuxer_element),
(are_raw_caps), (multi_queue_overrun_cb),
(multi_queue_underrun_cb), (gst_decode_group_new),
(get_current_group), (group_demuxer_event_probe),
(gst_decode_group_control_demuxer_pad),
(gst_decode_group_control_source_pad),
(gst_decode_group_check_if_blocked),
(gst_decode_group_check_if_drained), (gst_decode_group_expose),
(gst_decode_group_hide), (gst_decode_group_free),
(gst_decode_group_set_complete), (source_pad_blocked_cb),
(source_pad_event_probe), (gst_decode_pad_new), (add_fakesink),
(remove_fakesink), (find_sink_pad), (gst_decode_bin_change_state),
(plugin_init):
New decodebin2 element.
Closes #370092
* gst/playback/gstplay-marshal.list:
Added marshallers for new signals in decodebin2
* gst/playback/gstplaybasebin.c: (setup_subtitle), (make_decoder):
Use decodebin2 if *and only if* the USE_DECODEBIN2 environment variable
is set.
2006-11-28 14:40:39 +00:00
|
|
|
|
2016-03-03 07:46:24 +00:00
|
|
|
gst_element_class_add_static_pad_template (gstelement_klass,
|
|
|
|
&decoder_bin_sink_template);
|
|
|
|
gst_element_class_add_static_pad_template (gstelement_klass,
|
|
|
|
&decoder_bin_src_template);
|
gst/playback/: New decodebin2 element.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstdecodebin2.c: (gst_decode_bin_get_type),
(_gst_boolean_accumulator), (gst_decode_bin_class_init),
(gst_decode_bin_factory_filter), (compare_ranks), (print_feature),
(gst_decode_bin_init), (gst_decode_bin_dispose),
(gst_decode_bin_finalize), (gst_decode_bin_set_property),
(gst_decode_bin_get_property), (gst_decode_bin_set_caps),
(gst_decode_bin_get_caps), (gst_decode_bin_autoplug_continue),
(gst_decode_bin_autoplug_sort), (analyze_new_pad), (connect_pad),
(connect_element), (expose_pad), (type_found),
(pad_added_group_cb), (pad_removed_group_cb),
(no_more_pads_group_cb), (pad_added_cb), (pad_removed_cb),
(no_more_pads_cb), (find_compatibles), (is_demuxer_element),
(are_raw_caps), (multi_queue_overrun_cb),
(multi_queue_underrun_cb), (gst_decode_group_new),
(get_current_group), (group_demuxer_event_probe),
(gst_decode_group_control_demuxer_pad),
(gst_decode_group_control_source_pad),
(gst_decode_group_check_if_blocked),
(gst_decode_group_check_if_drained), (gst_decode_group_expose),
(gst_decode_group_hide), (gst_decode_group_free),
(gst_decode_group_set_complete), (source_pad_blocked_cb),
(source_pad_event_probe), (gst_decode_pad_new), (add_fakesink),
(remove_fakesink), (find_sink_pad), (gst_decode_bin_change_state),
(plugin_init):
New decodebin2 element.
Closes #370092
* gst/playback/gstplay-marshal.list:
Added marshallers for new signals in decodebin2
* gst/playback/gstplaybasebin.c: (setup_subtitle), (make_decoder):
Use decodebin2 if *and only if* the USE_DECODEBIN2 environment variable
is set.
2006-11-28 14:40:39 +00:00
|
|
|
|
2012-04-09 23:45:16 +00:00
|
|
|
gst_element_class_set_static_metadata (gstelement_klass,
|
2010-03-16 14:45:23 +00:00
|
|
|
"Decoder Bin", "Generic/Bin/Decoder",
|
|
|
|
"Autoplug and decode to raw media",
|
|
|
|
"Edward Hervey <edward.hervey@collabora.co.uk>, "
|
|
|
|
"Sebastian Dröge <sebastian.droege@collabora.co.uk>");
|
gst/playback/: New decodebin2 element.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstdecodebin2.c: (gst_decode_bin_get_type),
(_gst_boolean_accumulator), (gst_decode_bin_class_init),
(gst_decode_bin_factory_filter), (compare_ranks), (print_feature),
(gst_decode_bin_init), (gst_decode_bin_dispose),
(gst_decode_bin_finalize), (gst_decode_bin_set_property),
(gst_decode_bin_get_property), (gst_decode_bin_set_caps),
(gst_decode_bin_get_caps), (gst_decode_bin_autoplug_continue),
(gst_decode_bin_autoplug_sort), (analyze_new_pad), (connect_pad),
(connect_element), (expose_pad), (type_found),
(pad_added_group_cb), (pad_removed_group_cb),
(no_more_pads_group_cb), (pad_added_cb), (pad_removed_cb),
(no_more_pads_cb), (find_compatibles), (is_demuxer_element),
(are_raw_caps), (multi_queue_overrun_cb),
(multi_queue_underrun_cb), (gst_decode_group_new),
(get_current_group), (group_demuxer_event_probe),
(gst_decode_group_control_demuxer_pad),
(gst_decode_group_control_source_pad),
(gst_decode_group_check_if_blocked),
(gst_decode_group_check_if_drained), (gst_decode_group_expose),
(gst_decode_group_hide), (gst_decode_group_free),
(gst_decode_group_set_complete), (source_pad_blocked_cb),
(source_pad_event_probe), (gst_decode_pad_new), (add_fakesink),
(remove_fakesink), (find_sink_pad), (gst_decode_bin_change_state),
(plugin_init):
New decodebin2 element.
Closes #370092
* gst/playback/gstplay-marshal.list:
Added marshallers for new signals in decodebin2
* gst/playback/gstplaybasebin.c: (setup_subtitle), (make_decoder):
Use decodebin2 if *and only if* the USE_DECODEBIN2 environment variable
is set.
2006-11-28 14:40:39 +00:00
|
|
|
|
|
|
|
gstelement_klass->change_state =
|
|
|
|
GST_DEBUG_FUNCPTR (gst_decode_bin_change_state);
|
2011-10-13 15:34:49 +00:00
|
|
|
|
|
|
|
gstbin_klass->handle_message =
|
|
|
|
GST_DEBUG_FUNCPTR (gst_decode_bin_handle_message);
|
2012-10-03 10:37:33 +00:00
|
|
|
|
2015-12-02 14:16:22 +00:00
|
|
|
gstbin_klass->remove_element =
|
|
|
|
GST_DEBUG_FUNCPTR (gst_decode_bin_remove_element);
|
|
|
|
|
2012-10-03 10:37:33 +00:00
|
|
|
g_type_class_ref (GST_TYPE_DECODE_PAD);
|
gst/playback/: New decodebin2 element.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstdecodebin2.c: (gst_decode_bin_get_type),
(_gst_boolean_accumulator), (gst_decode_bin_class_init),
(gst_decode_bin_factory_filter), (compare_ranks), (print_feature),
(gst_decode_bin_init), (gst_decode_bin_dispose),
(gst_decode_bin_finalize), (gst_decode_bin_set_property),
(gst_decode_bin_get_property), (gst_decode_bin_set_caps),
(gst_decode_bin_get_caps), (gst_decode_bin_autoplug_continue),
(gst_decode_bin_autoplug_sort), (analyze_new_pad), (connect_pad),
(connect_element), (expose_pad), (type_found),
(pad_added_group_cb), (pad_removed_group_cb),
(no_more_pads_group_cb), (pad_added_cb), (pad_removed_cb),
(no_more_pads_cb), (find_compatibles), (is_demuxer_element),
(are_raw_caps), (multi_queue_overrun_cb),
(multi_queue_underrun_cb), (gst_decode_group_new),
(get_current_group), (group_demuxer_event_probe),
(gst_decode_group_control_demuxer_pad),
(gst_decode_group_control_source_pad),
(gst_decode_group_check_if_blocked),
(gst_decode_group_check_if_drained), (gst_decode_group_expose),
(gst_decode_group_hide), (gst_decode_group_free),
(gst_decode_group_set_complete), (source_pad_blocked_cb),
(source_pad_event_probe), (gst_decode_pad_new), (add_fakesink),
(remove_fakesink), (find_sink_pad), (gst_decode_bin_change_state),
(plugin_init):
New decodebin2 element.
Closes #370092
* gst/playback/gstplay-marshal.list:
Added marshallers for new signals in decodebin2
* gst/playback/gstplaybasebin.c: (setup_subtitle), (make_decoder):
Use decodebin2 if *and only if* the USE_DECODEBIN2 environment variable
is set.
2006-11-28 14:40:39 +00:00
|
|
|
}
|
|
|
|
|
2009-11-11 13:00:26 +00:00
|
|
|
/* Must be called with factories lock! */
|
|
|
|
static void
|
|
|
|
gst_decode_bin_update_factories_list (GstDecodeBin * dbin)
|
|
|
|
{
|
2012-01-02 14:30:53 +00:00
|
|
|
guint cookie;
|
|
|
|
|
|
|
|
cookie = gst_registry_get_feature_list_cookie (gst_registry_get ());
|
|
|
|
if (!dbin->factories || dbin->factories_cookie != cookie) {
|
2009-11-11 13:00:26 +00:00
|
|
|
if (dbin->factories)
|
2010-08-06 09:53:38 +00:00
|
|
|
gst_plugin_feature_list_free (dbin->factories);
|
|
|
|
dbin->factories =
|
|
|
|
gst_element_factory_list_get_elements
|
|
|
|
(GST_ELEMENT_FACTORY_TYPE_DECODABLE, GST_RANK_MARGINAL);
|
2012-06-12 09:58:29 +00:00
|
|
|
dbin->factories =
|
2016-09-01 05:47:02 +00:00
|
|
|
g_list_sort (dbin->factories,
|
|
|
|
gst_playback_utils_compare_factories_func);
|
2012-01-02 14:30:53 +00:00
|
|
|
dbin->factories_cookie = cookie;
|
2009-11-11 13:00:26 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
gst/playback/: New decodebin2 element.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstdecodebin2.c: (gst_decode_bin_get_type),
(_gst_boolean_accumulator), (gst_decode_bin_class_init),
(gst_decode_bin_factory_filter), (compare_ranks), (print_feature),
(gst_decode_bin_init), (gst_decode_bin_dispose),
(gst_decode_bin_finalize), (gst_decode_bin_set_property),
(gst_decode_bin_get_property), (gst_decode_bin_set_caps),
(gst_decode_bin_get_caps), (gst_decode_bin_autoplug_continue),
(gst_decode_bin_autoplug_sort), (analyze_new_pad), (connect_pad),
(connect_element), (expose_pad), (type_found),
(pad_added_group_cb), (pad_removed_group_cb),
(no_more_pads_group_cb), (pad_added_cb), (pad_removed_cb),
(no_more_pads_cb), (find_compatibles), (is_demuxer_element),
(are_raw_caps), (multi_queue_overrun_cb),
(multi_queue_underrun_cb), (gst_decode_group_new),
(get_current_group), (group_demuxer_event_probe),
(gst_decode_group_control_demuxer_pad),
(gst_decode_group_control_source_pad),
(gst_decode_group_check_if_blocked),
(gst_decode_group_check_if_drained), (gst_decode_group_expose),
(gst_decode_group_hide), (gst_decode_group_free),
(gst_decode_group_set_complete), (source_pad_blocked_cb),
(source_pad_event_probe), (gst_decode_pad_new), (add_fakesink),
(remove_fakesink), (find_sink_pad), (gst_decode_bin_change_state),
(plugin_init):
New decodebin2 element.
Closes #370092
* gst/playback/gstplay-marshal.list:
Added marshallers for new signals in decodebin2
* gst/playback/gstplaybasebin.c: (setup_subtitle), (make_decoder):
Use decodebin2 if *and only if* the USE_DECODEBIN2 environment variable
is set.
2006-11-28 14:40:39 +00:00
|
|
|
static void
|
|
|
|
gst_decode_bin_init (GstDecodeBin * decode_bin)
|
|
|
|
{
|
|
|
|
/* first filter out the interesting element factories */
|
2013-02-07 09:49:33 +00:00
|
|
|
g_mutex_init (&decode_bin->factories_lock);
|
gst/playback/: New decodebin2 element.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstdecodebin2.c: (gst_decode_bin_get_type),
(_gst_boolean_accumulator), (gst_decode_bin_class_init),
(gst_decode_bin_factory_filter), (compare_ranks), (print_feature),
(gst_decode_bin_init), (gst_decode_bin_dispose),
(gst_decode_bin_finalize), (gst_decode_bin_set_property),
(gst_decode_bin_get_property), (gst_decode_bin_set_caps),
(gst_decode_bin_get_caps), (gst_decode_bin_autoplug_continue),
(gst_decode_bin_autoplug_sort), (analyze_new_pad), (connect_pad),
(connect_element), (expose_pad), (type_found),
(pad_added_group_cb), (pad_removed_group_cb),
(no_more_pads_group_cb), (pad_added_cb), (pad_removed_cb),
(no_more_pads_cb), (find_compatibles), (is_demuxer_element),
(are_raw_caps), (multi_queue_overrun_cb),
(multi_queue_underrun_cb), (gst_decode_group_new),
(get_current_group), (group_demuxer_event_probe),
(gst_decode_group_control_demuxer_pad),
(gst_decode_group_control_source_pad),
(gst_decode_group_check_if_blocked),
(gst_decode_group_check_if_drained), (gst_decode_group_expose),
(gst_decode_group_hide), (gst_decode_group_free),
(gst_decode_group_set_complete), (source_pad_blocked_cb),
(source_pad_event_probe), (gst_decode_pad_new), (add_fakesink),
(remove_fakesink), (find_sink_pad), (gst_decode_bin_change_state),
(plugin_init):
New decodebin2 element.
Closes #370092
* gst/playback/gstplay-marshal.list:
Added marshallers for new signals in decodebin2
* gst/playback/gstplaybasebin.c: (setup_subtitle), (make_decoder):
Use decodebin2 if *and only if* the USE_DECODEBIN2 environment variable
is set.
2006-11-28 14:40:39 +00:00
|
|
|
|
|
|
|
/* we create the typefind element only once */
|
|
|
|
decode_bin->typefind = gst_element_factory_make ("typefind", "typefind");
|
|
|
|
if (!decode_bin->typefind) {
|
|
|
|
g_warning ("can't find typefind element, decodebin will not work");
|
|
|
|
} else {
|
|
|
|
GstPad *pad;
|
|
|
|
GstPad *gpad;
|
2010-11-17 08:14:59 +00:00
|
|
|
GstPadTemplate *pad_tmpl;
|
gst/playback/: New decodebin2 element.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstdecodebin2.c: (gst_decode_bin_get_type),
(_gst_boolean_accumulator), (gst_decode_bin_class_init),
(gst_decode_bin_factory_filter), (compare_ranks), (print_feature),
(gst_decode_bin_init), (gst_decode_bin_dispose),
(gst_decode_bin_finalize), (gst_decode_bin_set_property),
(gst_decode_bin_get_property), (gst_decode_bin_set_caps),
(gst_decode_bin_get_caps), (gst_decode_bin_autoplug_continue),
(gst_decode_bin_autoplug_sort), (analyze_new_pad), (connect_pad),
(connect_element), (expose_pad), (type_found),
(pad_added_group_cb), (pad_removed_group_cb),
(no_more_pads_group_cb), (pad_added_cb), (pad_removed_cb),
(no_more_pads_cb), (find_compatibles), (is_demuxer_element),
(are_raw_caps), (multi_queue_overrun_cb),
(multi_queue_underrun_cb), (gst_decode_group_new),
(get_current_group), (group_demuxer_event_probe),
(gst_decode_group_control_demuxer_pad),
(gst_decode_group_control_source_pad),
(gst_decode_group_check_if_blocked),
(gst_decode_group_check_if_drained), (gst_decode_group_expose),
(gst_decode_group_hide), (gst_decode_group_free),
(gst_decode_group_set_complete), (source_pad_blocked_cb),
(source_pad_event_probe), (gst_decode_pad_new), (add_fakesink),
(remove_fakesink), (find_sink_pad), (gst_decode_bin_change_state),
(plugin_init):
New decodebin2 element.
Closes #370092
* gst/playback/gstplay-marshal.list:
Added marshallers for new signals in decodebin2
* gst/playback/gstplaybasebin.c: (setup_subtitle), (make_decoder):
Use decodebin2 if *and only if* the USE_DECODEBIN2 environment variable
is set.
2006-11-28 14:40:39 +00:00
|
|
|
|
|
|
|
/* add the typefind element */
|
|
|
|
if (!gst_bin_add (GST_BIN (decode_bin), decode_bin->typefind)) {
|
|
|
|
g_warning ("Could not add typefind element, decodebin will not work");
|
|
|
|
gst_object_unref (decode_bin->typefind);
|
|
|
|
decode_bin->typefind = NULL;
|
|
|
|
}
|
|
|
|
|
|
|
|
/* get the sinkpad */
|
Don't use bad gst_element_get_pad().
Original commit message from CVS:
* ext/ogg/gstoggdemux.c: (gst_ogg_pad_typefind):
* gst/playback/decodetest.c: (new_decoded_pad_cb):
* gst/playback/gstdecodebin.c: (gst_decode_bin_init),
(try_to_link_1), (elem_is_dynamic), (close_link), (type_found),
(cleanup_decodebin):
* gst/playback/gstdecodebin2.c: (gst_decode_bin_init),
(connect_element), (gst_decode_group_control_demuxer_pad):
* gst/playback/gstplaybasebin.c: (queue_remove_probe),
(queue_out_of_data), (gen_preroll_element), (preroll_unlinked),
(mute_group_type):
* gst/playback/gstplaybin.c: (gst_play_bin_vis_blocked),
(gst_play_bin_set_property), (handoff), (gen_video_element),
(gen_text_element), (gen_audio_element), (gen_vis_element),
(remove_sinks), (add_sink), (setup_sinks):
* gst/playback/gstplaybin2.c: (pad_added_cb), (no_more_pads_cb):
* gst/playback/gstplaysink.c: (gst_play_sink_get_video_sink),
(gst_play_sink_get_audio_sink), (gst_play_sink_vis_unblocked),
(gst_play_sink_vis_blocked), (gst_play_sink_set_vis_plugin),
(gst_play_sink_get_vis_plugin), (gst_play_sink_set_mute),
(gen_video_chain), (gen_text_chain), (gen_audio_chain),
(gen_vis_chain), (gst_play_sink_reconfigure),
(gst_play_sink_set_font_desc), (gst_play_sink_get_font_desc),
(gst_play_sink_request_pad):
* gst/playback/gsturidecodebin.c: (type_found), (setup_source):
* gst/playback/test.c: (gen_video_element), (gen_audio_element),
(cb_newpad):
* gst/playback/test6.c: (new_decoded_pad_cb):
* tests/check/elements/audioconvert.c: (GST_START_TEST):
* tests/check/elements/audiorate.c: (test_injector_chain),
(do_perfect_stream_test):
* tests/check/elements/ffmpegcolorspace.c: (GST_START_TEST):
* tests/check/elements/gdpdepay.c: (GST_START_TEST):
* tests/check/elements/gnomevfssink.c:
* tests/check/elements/textoverlay.c:
(notgst_check_setup_src_pad2), (notgst_check_teardown_src_pad2):
* tests/check/elements/videotestsrc.c: (GST_START_TEST):
* tests/check/libs/cddabasesrc.c: (GST_START_TEST):
* tests/check/pipelines/oggmux.c: (test_pipeline):
* tests/check/pipelines/streamheader.c: (GST_START_TEST):
* tests/check/pipelines/theoraenc.c: (GST_START_TEST):
* tests/check/pipelines/vorbisenc.c: (GST_START_TEST):
* tests/examples/seek/scrubby.c: (make_wav_pipeline):
* tests/examples/seek/seek.c: (make_mod_pipeline),
(make_dv_pipeline), (make_wav_pipeline), (make_flac_pipeline),
(make_sid_pipeline), (make_parse_pipeline), (make_vorbis_pipeline),
(make_theora_pipeline), (make_vorbis_theora_pipeline),
(make_avi_msmpeg4v3_mp3_pipeline), (make_mp3_pipeline),
(make_avi_pipeline), (make_mpeg_pipeline), (make_mpegnt_pipeline),
(update_fill), (msg_buffering):
Don't use bad gst_element_get_pad().
2008-05-21 16:36:50 +00:00
|
|
|
pad = gst_element_get_static_pad (decode_bin->typefind, "sink");
|
gst/playback/: New decodebin2 element.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstdecodebin2.c: (gst_decode_bin_get_type),
(_gst_boolean_accumulator), (gst_decode_bin_class_init),
(gst_decode_bin_factory_filter), (compare_ranks), (print_feature),
(gst_decode_bin_init), (gst_decode_bin_dispose),
(gst_decode_bin_finalize), (gst_decode_bin_set_property),
(gst_decode_bin_get_property), (gst_decode_bin_set_caps),
(gst_decode_bin_get_caps), (gst_decode_bin_autoplug_continue),
(gst_decode_bin_autoplug_sort), (analyze_new_pad), (connect_pad),
(connect_element), (expose_pad), (type_found),
(pad_added_group_cb), (pad_removed_group_cb),
(no_more_pads_group_cb), (pad_added_cb), (pad_removed_cb),
(no_more_pads_cb), (find_compatibles), (is_demuxer_element),
(are_raw_caps), (multi_queue_overrun_cb),
(multi_queue_underrun_cb), (gst_decode_group_new),
(get_current_group), (group_demuxer_event_probe),
(gst_decode_group_control_demuxer_pad),
(gst_decode_group_control_source_pad),
(gst_decode_group_check_if_blocked),
(gst_decode_group_check_if_drained), (gst_decode_group_expose),
(gst_decode_group_hide), (gst_decode_group_free),
(gst_decode_group_set_complete), (source_pad_blocked_cb),
(source_pad_event_probe), (gst_decode_pad_new), (add_fakesink),
(remove_fakesink), (find_sink_pad), (gst_decode_bin_change_state),
(plugin_init):
New decodebin2 element.
Closes #370092
* gst/playback/gstplay-marshal.list:
Added marshallers for new signals in decodebin2
* gst/playback/gstplaybasebin.c: (setup_subtitle), (make_decoder):
Use decodebin2 if *and only if* the USE_DECODEBIN2 environment variable
is set.
2006-11-28 14:40:39 +00:00
|
|
|
|
2010-11-17 08:14:59 +00:00
|
|
|
/* get the pad template */
|
|
|
|
pad_tmpl = gst_static_pad_template_get (&decoder_bin_sink_template);
|
|
|
|
|
gst/playback/: New decodebin2 element.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstdecodebin2.c: (gst_decode_bin_get_type),
(_gst_boolean_accumulator), (gst_decode_bin_class_init),
(gst_decode_bin_factory_filter), (compare_ranks), (print_feature),
(gst_decode_bin_init), (gst_decode_bin_dispose),
(gst_decode_bin_finalize), (gst_decode_bin_set_property),
(gst_decode_bin_get_property), (gst_decode_bin_set_caps),
(gst_decode_bin_get_caps), (gst_decode_bin_autoplug_continue),
(gst_decode_bin_autoplug_sort), (analyze_new_pad), (connect_pad),
(connect_element), (expose_pad), (type_found),
(pad_added_group_cb), (pad_removed_group_cb),
(no_more_pads_group_cb), (pad_added_cb), (pad_removed_cb),
(no_more_pads_cb), (find_compatibles), (is_demuxer_element),
(are_raw_caps), (multi_queue_overrun_cb),
(multi_queue_underrun_cb), (gst_decode_group_new),
(get_current_group), (group_demuxer_event_probe),
(gst_decode_group_control_demuxer_pad),
(gst_decode_group_control_source_pad),
(gst_decode_group_check_if_blocked),
(gst_decode_group_check_if_drained), (gst_decode_group_expose),
(gst_decode_group_hide), (gst_decode_group_free),
(gst_decode_group_set_complete), (source_pad_blocked_cb),
(source_pad_event_probe), (gst_decode_pad_new), (add_fakesink),
(remove_fakesink), (find_sink_pad), (gst_decode_bin_change_state),
(plugin_init):
New decodebin2 element.
Closes #370092
* gst/playback/gstplay-marshal.list:
Added marshallers for new signals in decodebin2
* gst/playback/gstplaybasebin.c: (setup_subtitle), (make_decoder):
Use decodebin2 if *and only if* the USE_DECODEBIN2 environment variable
is set.
2006-11-28 14:40:39 +00:00
|
|
|
/* ghost the sink pad to ourself */
|
2010-11-17 08:14:59 +00:00
|
|
|
gpad = gst_ghost_pad_new_from_template ("sink", pad, pad_tmpl);
|
gst/playback/: New decodebin2 element.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstdecodebin2.c: (gst_decode_bin_get_type),
(_gst_boolean_accumulator), (gst_decode_bin_class_init),
(gst_decode_bin_factory_filter), (compare_ranks), (print_feature),
(gst_decode_bin_init), (gst_decode_bin_dispose),
(gst_decode_bin_finalize), (gst_decode_bin_set_property),
(gst_decode_bin_get_property), (gst_decode_bin_set_caps),
(gst_decode_bin_get_caps), (gst_decode_bin_autoplug_continue),
(gst_decode_bin_autoplug_sort), (analyze_new_pad), (connect_pad),
(connect_element), (expose_pad), (type_found),
(pad_added_group_cb), (pad_removed_group_cb),
(no_more_pads_group_cb), (pad_added_cb), (pad_removed_cb),
(no_more_pads_cb), (find_compatibles), (is_demuxer_element),
(are_raw_caps), (multi_queue_overrun_cb),
(multi_queue_underrun_cb), (gst_decode_group_new),
(get_current_group), (group_demuxer_event_probe),
(gst_decode_group_control_demuxer_pad),
(gst_decode_group_control_source_pad),
(gst_decode_group_check_if_blocked),
(gst_decode_group_check_if_drained), (gst_decode_group_expose),
(gst_decode_group_hide), (gst_decode_group_free),
(gst_decode_group_set_complete), (source_pad_blocked_cb),
(source_pad_event_probe), (gst_decode_pad_new), (add_fakesink),
(remove_fakesink), (find_sink_pad), (gst_decode_bin_change_state),
(plugin_init):
New decodebin2 element.
Closes #370092
* gst/playback/gstplay-marshal.list:
Added marshallers for new signals in decodebin2
* gst/playback/gstplaybasebin.c: (setup_subtitle), (make_decoder):
Use decodebin2 if *and only if* the USE_DECODEBIN2 environment variable
is set.
2006-11-28 14:40:39 +00:00
|
|
|
gst_pad_set_active (gpad, TRUE);
|
|
|
|
gst_element_add_pad (GST_ELEMENT (decode_bin), gpad);
|
|
|
|
|
2010-11-17 08:14:59 +00:00
|
|
|
gst_object_unref (pad_tmpl);
|
gst/playback/: New decodebin2 element.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstdecodebin2.c: (gst_decode_bin_get_type),
(_gst_boolean_accumulator), (gst_decode_bin_class_init),
(gst_decode_bin_factory_filter), (compare_ranks), (print_feature),
(gst_decode_bin_init), (gst_decode_bin_dispose),
(gst_decode_bin_finalize), (gst_decode_bin_set_property),
(gst_decode_bin_get_property), (gst_decode_bin_set_caps),
(gst_decode_bin_get_caps), (gst_decode_bin_autoplug_continue),
(gst_decode_bin_autoplug_sort), (analyze_new_pad), (connect_pad),
(connect_element), (expose_pad), (type_found),
(pad_added_group_cb), (pad_removed_group_cb),
(no_more_pads_group_cb), (pad_added_cb), (pad_removed_cb),
(no_more_pads_cb), (find_compatibles), (is_demuxer_element),
(are_raw_caps), (multi_queue_overrun_cb),
(multi_queue_underrun_cb), (gst_decode_group_new),
(get_current_group), (group_demuxer_event_probe),
(gst_decode_group_control_demuxer_pad),
(gst_decode_group_control_source_pad),
(gst_decode_group_check_if_blocked),
(gst_decode_group_check_if_drained), (gst_decode_group_expose),
(gst_decode_group_hide), (gst_decode_group_free),
(gst_decode_group_set_complete), (source_pad_blocked_cb),
(source_pad_event_probe), (gst_decode_pad_new), (add_fakesink),
(remove_fakesink), (find_sink_pad), (gst_decode_bin_change_state),
(plugin_init):
New decodebin2 element.
Closes #370092
* gst/playback/gstplay-marshal.list:
Added marshallers for new signals in decodebin2
* gst/playback/gstplaybasebin.c: (setup_subtitle), (make_decoder):
Use decodebin2 if *and only if* the USE_DECODEBIN2 environment variable
is set.
2006-11-28 14:40:39 +00:00
|
|
|
gst_object_unref (pad);
|
|
|
|
}
|
|
|
|
|
2013-02-07 09:49:33 +00:00
|
|
|
g_mutex_init (&decode_bin->expose_lock);
|
2009-09-26 10:17:49 +00:00
|
|
|
decode_bin->decode_chain = NULL;
|
gst/playback/: New decodebin2 element.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstdecodebin2.c: (gst_decode_bin_get_type),
(_gst_boolean_accumulator), (gst_decode_bin_class_init),
(gst_decode_bin_factory_filter), (compare_ranks), (print_feature),
(gst_decode_bin_init), (gst_decode_bin_dispose),
(gst_decode_bin_finalize), (gst_decode_bin_set_property),
(gst_decode_bin_get_property), (gst_decode_bin_set_caps),
(gst_decode_bin_get_caps), (gst_decode_bin_autoplug_continue),
(gst_decode_bin_autoplug_sort), (analyze_new_pad), (connect_pad),
(connect_element), (expose_pad), (type_found),
(pad_added_group_cb), (pad_removed_group_cb),
(no_more_pads_group_cb), (pad_added_cb), (pad_removed_cb),
(no_more_pads_cb), (find_compatibles), (is_demuxer_element),
(are_raw_caps), (multi_queue_overrun_cb),
(multi_queue_underrun_cb), (gst_decode_group_new),
(get_current_group), (group_demuxer_event_probe),
(gst_decode_group_control_demuxer_pad),
(gst_decode_group_control_source_pad),
(gst_decode_group_check_if_blocked),
(gst_decode_group_check_if_drained), (gst_decode_group_expose),
(gst_decode_group_hide), (gst_decode_group_free),
(gst_decode_group_set_complete), (source_pad_blocked_cb),
(source_pad_event_probe), (gst_decode_pad_new), (add_fakesink),
(remove_fakesink), (find_sink_pad), (gst_decode_bin_change_state),
(plugin_init):
New decodebin2 element.
Closes #370092
* gst/playback/gstplay-marshal.list:
Added marshallers for new signals in decodebin2
* gst/playback/gstplaybasebin.c: (setup_subtitle), (make_decoder):
Use decodebin2 if *and only if* the USE_DECODEBIN2 environment variable
is set.
2006-11-28 14:40:39 +00:00
|
|
|
|
2013-02-07 09:49:33 +00:00
|
|
|
g_mutex_init (&decode_bin->dyn_lock);
|
2009-03-06 18:28:37 +00:00
|
|
|
decode_bin->shutdown = FALSE;
|
|
|
|
decode_bin->blocked_pads = NULL;
|
|
|
|
|
2013-02-07 09:49:33 +00:00
|
|
|
g_mutex_init (&decode_bin->subtitle_lock);
|
2015-12-02 14:16:22 +00:00
|
|
|
g_mutex_init (&decode_bin->buffering_lock);
|
2016-03-24 03:59:48 +00:00
|
|
|
g_mutex_init (&decode_bin->buffering_post_lock);
|
2009-11-06 14:12:06 +00:00
|
|
|
|
2017-11-10 13:54:12 +00:00
|
|
|
g_mutex_init (&decode_bin->cleanup_lock);
|
|
|
|
decode_bin->cleanup_thread = NULL;
|
|
|
|
|
2009-10-23 14:42:23 +00:00
|
|
|
decode_bin->encoding = g_strdup (DEFAULT_SUBTITLE_ENCODING);
|
2009-11-03 10:48:40 +00:00
|
|
|
decode_bin->caps = gst_static_caps_get (&default_raw_caps);
|
2009-10-23 14:42:23 +00:00
|
|
|
decode_bin->use_buffering = DEFAULT_USE_BUFFERING;
|
|
|
|
decode_bin->low_percent = DEFAULT_LOW_PERCENT;
|
|
|
|
decode_bin->high_percent = DEFAULT_HIGH_PERCENT;
|
|
|
|
|
|
|
|
decode_bin->max_size_bytes = DEFAULT_MAX_SIZE_BYTES;
|
|
|
|
decode_bin->max_size_buffers = DEFAULT_MAX_SIZE_BUFFERS;
|
|
|
|
decode_bin->max_size_time = DEFAULT_MAX_SIZE_TIME;
|
2010-05-06 16:50:51 +00:00
|
|
|
|
|
|
|
decode_bin->expose_allstreams = DEFAULT_EXPOSE_ALL_STREAMS;
|
2012-05-10 17:11:47 +00:00
|
|
|
decode_bin->connection_speed = DEFAULT_CONNECTION_SPEED;
|
gst/playback/: New decodebin2 element.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstdecodebin2.c: (gst_decode_bin_get_type),
(_gst_boolean_accumulator), (gst_decode_bin_class_init),
(gst_decode_bin_factory_filter), (compare_ranks), (print_feature),
(gst_decode_bin_init), (gst_decode_bin_dispose),
(gst_decode_bin_finalize), (gst_decode_bin_set_property),
(gst_decode_bin_get_property), (gst_decode_bin_set_caps),
(gst_decode_bin_get_caps), (gst_decode_bin_autoplug_continue),
(gst_decode_bin_autoplug_sort), (analyze_new_pad), (connect_pad),
(connect_element), (expose_pad), (type_found),
(pad_added_group_cb), (pad_removed_group_cb),
(no_more_pads_group_cb), (pad_added_cb), (pad_removed_cb),
(no_more_pads_cb), (find_compatibles), (is_demuxer_element),
(are_raw_caps), (multi_queue_overrun_cb),
(multi_queue_underrun_cb), (gst_decode_group_new),
(get_current_group), (group_demuxer_event_probe),
(gst_decode_group_control_demuxer_pad),
(gst_decode_group_control_source_pad),
(gst_decode_group_check_if_blocked),
(gst_decode_group_check_if_drained), (gst_decode_group_expose),
(gst_decode_group_hide), (gst_decode_group_free),
(gst_decode_group_set_complete), (source_pad_blocked_cb),
(source_pad_event_probe), (gst_decode_pad_new), (add_fakesink),
(remove_fakesink), (find_sink_pad), (gst_decode_bin_change_state),
(plugin_init):
New decodebin2 element.
Closes #370092
* gst/playback/gstplay-marshal.list:
Added marshallers for new signals in decodebin2
* gst/playback/gstplaybasebin.c: (setup_subtitle), (make_decoder):
Use decodebin2 if *and only if* the USE_DECODEBIN2 environment variable
is set.
2006-11-28 14:40:39 +00:00
|
|
|
}
|
|
|
|
|
2009-03-25 18:01:45 +00:00
|
|
|
static void
|
|
|
|
gst_decode_bin_dispose (GObject * object)
|
|
|
|
{
|
|
|
|
GstDecodeBin *decode_bin;
|
|
|
|
|
|
|
|
decode_bin = GST_DECODE_BIN (object);
|
|
|
|
|
|
|
|
if (decode_bin->factories)
|
2010-08-06 09:53:38 +00:00
|
|
|
gst_plugin_feature_list_free (decode_bin->factories);
|
2009-03-25 18:01:45 +00:00
|
|
|
decode_bin->factories = NULL;
|
|
|
|
|
2009-09-26 10:17:49 +00:00
|
|
|
if (decode_bin->decode_chain)
|
|
|
|
gst_decode_chain_free (decode_bin->decode_chain);
|
|
|
|
decode_bin->decode_chain = NULL;
|
2007-02-20 15:44:32 +00:00
|
|
|
|
gst/playback/: New decodebin2 element.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstdecodebin2.c: (gst_decode_bin_get_type),
(_gst_boolean_accumulator), (gst_decode_bin_class_init),
(gst_decode_bin_factory_filter), (compare_ranks), (print_feature),
(gst_decode_bin_init), (gst_decode_bin_dispose),
(gst_decode_bin_finalize), (gst_decode_bin_set_property),
(gst_decode_bin_get_property), (gst_decode_bin_set_caps),
(gst_decode_bin_get_caps), (gst_decode_bin_autoplug_continue),
(gst_decode_bin_autoplug_sort), (analyze_new_pad), (connect_pad),
(connect_element), (expose_pad), (type_found),
(pad_added_group_cb), (pad_removed_group_cb),
(no_more_pads_group_cb), (pad_added_cb), (pad_removed_cb),
(no_more_pads_cb), (find_compatibles), (is_demuxer_element),
(are_raw_caps), (multi_queue_overrun_cb),
(multi_queue_underrun_cb), (gst_decode_group_new),
(get_current_group), (group_demuxer_event_probe),
(gst_decode_group_control_demuxer_pad),
(gst_decode_group_control_source_pad),
(gst_decode_group_check_if_blocked),
(gst_decode_group_check_if_drained), (gst_decode_group_expose),
(gst_decode_group_hide), (gst_decode_group_free),
(gst_decode_group_set_complete), (source_pad_blocked_cb),
(source_pad_event_probe), (gst_decode_pad_new), (add_fakesink),
(remove_fakesink), (find_sink_pad), (gst_decode_bin_change_state),
(plugin_init):
New decodebin2 element.
Closes #370092
* gst/playback/gstplay-marshal.list:
Added marshallers for new signals in decodebin2
* gst/playback/gstplaybasebin.c: (setup_subtitle), (make_decoder):
Use decodebin2 if *and only if* the USE_DECODEBIN2 environment variable
is set.
2006-11-28 14:40:39 +00:00
|
|
|
if (decode_bin->caps)
|
|
|
|
gst_caps_unref (decode_bin->caps);
|
|
|
|
decode_bin->caps = NULL;
|
gst/playback/gstdecodebin2.c: Move subtitle encoding property to decodebin2 so that it can set the property value on ...
Original commit message from CVS:
* gst/playback/gstdecodebin2.c: (gst_decode_bin_class_init),
(gst_decode_bin_dispose), (gst_decode_bin_set_caps),
(gst_decode_bin_set_subs_encoding),
(gst_decode_bin_get_subs_encoding), (gst_decode_bin_set_property),
(gst_decode_bin_get_property), (analyze_new_pad):
Move subtitle encoding property to decodebin2 so that it can set the
property value on all elements that it autoplugs and that require it.
Make caps refcounting more consistent in get/set.
* gst/playback/gsturidecodebin.c: (_gst_boolean_accumulator),
(gst_uri_decode_bin_class_init), (gst_uri_decode_bin_init),
(gst_uri_decode_bin_finalize), (gst_uri_decode_bin_set_property),
(gst_uri_decode_bin_get_property), (proxy_unknown_type_signal),
(proxy_autoplug_continue_signal),
(proxy_autoplug_factories_signal), (proxy_autoplug_select_signal),
(make_decoder):
Proxy properties and relevant signals from the internal decodebin.
Make properties MT safe.
2007-10-25 17:36:49 +00:00
|
|
|
|
|
|
|
g_free (decode_bin->encoding);
|
|
|
|
decode_bin->encoding = NULL;
|
|
|
|
|
2008-03-24 11:36:08 +00:00
|
|
|
g_list_free (decode_bin->subtitles);
|
|
|
|
decode_bin->subtitles = NULL;
|
|
|
|
|
2017-01-18 03:59:18 +00:00
|
|
|
unblock_pads (decode_bin);
|
|
|
|
|
gst/playback/: New decodebin2 element.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstdecodebin2.c: (gst_decode_bin_get_type),
(_gst_boolean_accumulator), (gst_decode_bin_class_init),
(gst_decode_bin_factory_filter), (compare_ranks), (print_feature),
(gst_decode_bin_init), (gst_decode_bin_dispose),
(gst_decode_bin_finalize), (gst_decode_bin_set_property),
(gst_decode_bin_get_property), (gst_decode_bin_set_caps),
(gst_decode_bin_get_caps), (gst_decode_bin_autoplug_continue),
(gst_decode_bin_autoplug_sort), (analyze_new_pad), (connect_pad),
(connect_element), (expose_pad), (type_found),
(pad_added_group_cb), (pad_removed_group_cb),
(no_more_pads_group_cb), (pad_added_cb), (pad_removed_cb),
(no_more_pads_cb), (find_compatibles), (is_demuxer_element),
(are_raw_caps), (multi_queue_overrun_cb),
(multi_queue_underrun_cb), (gst_decode_group_new),
(get_current_group), (group_demuxer_event_probe),
(gst_decode_group_control_demuxer_pad),
(gst_decode_group_control_source_pad),
(gst_decode_group_check_if_blocked),
(gst_decode_group_check_if_drained), (gst_decode_group_expose),
(gst_decode_group_hide), (gst_decode_group_free),
(gst_decode_group_set_complete), (source_pad_blocked_cb),
(source_pad_event_probe), (gst_decode_pad_new), (add_fakesink),
(remove_fakesink), (find_sink_pad), (gst_decode_bin_change_state),
(plugin_init):
New decodebin2 element.
Closes #370092
* gst/playback/gstplay-marshal.list:
Added marshallers for new signals in decodebin2
* gst/playback/gstplaybasebin.c: (setup_subtitle), (make_decoder):
Use decodebin2 if *and only if* the USE_DECODEBIN2 environment variable
is set.
2006-11-28 14:40:39 +00:00
|
|
|
G_OBJECT_CLASS (parent_class)->dispose (object);
|
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
|
|
|
gst_decode_bin_finalize (GObject * object)
|
|
|
|
{
|
2007-01-23 17:49:29 +00:00
|
|
|
GstDecodeBin *decode_bin;
|
gst/playback/: New decodebin2 element.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstdecodebin2.c: (gst_decode_bin_get_type),
(_gst_boolean_accumulator), (gst_decode_bin_class_init),
(gst_decode_bin_factory_filter), (compare_ranks), (print_feature),
(gst_decode_bin_init), (gst_decode_bin_dispose),
(gst_decode_bin_finalize), (gst_decode_bin_set_property),
(gst_decode_bin_get_property), (gst_decode_bin_set_caps),
(gst_decode_bin_get_caps), (gst_decode_bin_autoplug_continue),
(gst_decode_bin_autoplug_sort), (analyze_new_pad), (connect_pad),
(connect_element), (expose_pad), (type_found),
(pad_added_group_cb), (pad_removed_group_cb),
(no_more_pads_group_cb), (pad_added_cb), (pad_removed_cb),
(no_more_pads_cb), (find_compatibles), (is_demuxer_element),
(are_raw_caps), (multi_queue_overrun_cb),
(multi_queue_underrun_cb), (gst_decode_group_new),
(get_current_group), (group_demuxer_event_probe),
(gst_decode_group_control_demuxer_pad),
(gst_decode_group_control_source_pad),
(gst_decode_group_check_if_blocked),
(gst_decode_group_check_if_drained), (gst_decode_group_expose),
(gst_decode_group_hide), (gst_decode_group_free),
(gst_decode_group_set_complete), (source_pad_blocked_cb),
(source_pad_event_probe), (gst_decode_pad_new), (add_fakesink),
(remove_fakesink), (find_sink_pad), (gst_decode_bin_change_state),
(plugin_init):
New decodebin2 element.
Closes #370092
* gst/playback/gstplay-marshal.list:
Added marshallers for new signals in decodebin2
* gst/playback/gstplaybasebin.c: (setup_subtitle), (make_decoder):
Use decodebin2 if *and only if* the USE_DECODEBIN2 environment variable
is set.
2006-11-28 14:40:39 +00:00
|
|
|
|
2007-01-23 17:49:29 +00:00
|
|
|
decode_bin = GST_DECODE_BIN (object);
|
|
|
|
|
2013-02-07 09:49:33 +00:00
|
|
|
g_mutex_clear (&decode_bin->expose_lock);
|
|
|
|
g_mutex_clear (&decode_bin->dyn_lock);
|
|
|
|
g_mutex_clear (&decode_bin->subtitle_lock);
|
2015-12-02 14:16:22 +00:00
|
|
|
g_mutex_clear (&decode_bin->buffering_lock);
|
2016-03-24 03:59:48 +00:00
|
|
|
g_mutex_clear (&decode_bin->buffering_post_lock);
|
2013-02-07 09:49:33 +00:00
|
|
|
g_mutex_clear (&decode_bin->factories_lock);
|
2017-11-10 13:54:12 +00:00
|
|
|
g_mutex_clear (&decode_bin->cleanup_lock);
|
2009-11-11 13:00:26 +00:00
|
|
|
|
gst/playback/: New decodebin2 element.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstdecodebin2.c: (gst_decode_bin_get_type),
(_gst_boolean_accumulator), (gst_decode_bin_class_init),
(gst_decode_bin_factory_filter), (compare_ranks), (print_feature),
(gst_decode_bin_init), (gst_decode_bin_dispose),
(gst_decode_bin_finalize), (gst_decode_bin_set_property),
(gst_decode_bin_get_property), (gst_decode_bin_set_caps),
(gst_decode_bin_get_caps), (gst_decode_bin_autoplug_continue),
(gst_decode_bin_autoplug_sort), (analyze_new_pad), (connect_pad),
(connect_element), (expose_pad), (type_found),
(pad_added_group_cb), (pad_removed_group_cb),
(no_more_pads_group_cb), (pad_added_cb), (pad_removed_cb),
(no_more_pads_cb), (find_compatibles), (is_demuxer_element),
(are_raw_caps), (multi_queue_overrun_cb),
(multi_queue_underrun_cb), (gst_decode_group_new),
(get_current_group), (group_demuxer_event_probe),
(gst_decode_group_control_demuxer_pad),
(gst_decode_group_control_source_pad),
(gst_decode_group_check_if_blocked),
(gst_decode_group_check_if_drained), (gst_decode_group_expose),
(gst_decode_group_hide), (gst_decode_group_free),
(gst_decode_group_set_complete), (source_pad_blocked_cb),
(source_pad_event_probe), (gst_decode_pad_new), (add_fakesink),
(remove_fakesink), (find_sink_pad), (gst_decode_bin_change_state),
(plugin_init):
New decodebin2 element.
Closes #370092
* gst/playback/gstplay-marshal.list:
Added marshallers for new signals in decodebin2
* gst/playback/gstplaybasebin.c: (setup_subtitle), (make_decoder):
Use decodebin2 if *and only if* the USE_DECODEBIN2 environment variable
is set.
2006-11-28 14:40:39 +00:00
|
|
|
G_OBJECT_CLASS (parent_class)->finalize (object);
|
|
|
|
}
|
|
|
|
|
|
|
|
/* _set_caps
|
|
|
|
* Changes the caps on which decodebin will stop decoding.
|
|
|
|
* Will unref the previously set one. The refcount of the given caps will be
|
gst/playback/gstdecodebin2.c: Move subtitle encoding property to decodebin2 so that it can set the property value on ...
Original commit message from CVS:
* gst/playback/gstdecodebin2.c: (gst_decode_bin_class_init),
(gst_decode_bin_dispose), (gst_decode_bin_set_caps),
(gst_decode_bin_set_subs_encoding),
(gst_decode_bin_get_subs_encoding), (gst_decode_bin_set_property),
(gst_decode_bin_get_property), (analyze_new_pad):
Move subtitle encoding property to decodebin2 so that it can set the
property value on all elements that it autoplugs and that require it.
Make caps refcounting more consistent in get/set.
* gst/playback/gsturidecodebin.c: (_gst_boolean_accumulator),
(gst_uri_decode_bin_class_init), (gst_uri_decode_bin_init),
(gst_uri_decode_bin_finalize), (gst_uri_decode_bin_set_property),
(gst_uri_decode_bin_get_property), (proxy_unknown_type_signal),
(proxy_autoplug_continue_signal),
(proxy_autoplug_factories_signal), (proxy_autoplug_select_signal),
(make_decoder):
Proxy properties and relevant signals from the internal decodebin.
Make properties MT safe.
2007-10-25 17:36:49 +00:00
|
|
|
* increased.
|
gst/playback/: New decodebin2 element.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstdecodebin2.c: (gst_decode_bin_get_type),
(_gst_boolean_accumulator), (gst_decode_bin_class_init),
(gst_decode_bin_factory_filter), (compare_ranks), (print_feature),
(gst_decode_bin_init), (gst_decode_bin_dispose),
(gst_decode_bin_finalize), (gst_decode_bin_set_property),
(gst_decode_bin_get_property), (gst_decode_bin_set_caps),
(gst_decode_bin_get_caps), (gst_decode_bin_autoplug_continue),
(gst_decode_bin_autoplug_sort), (analyze_new_pad), (connect_pad),
(connect_element), (expose_pad), (type_found),
(pad_added_group_cb), (pad_removed_group_cb),
(no_more_pads_group_cb), (pad_added_cb), (pad_removed_cb),
(no_more_pads_cb), (find_compatibles), (is_demuxer_element),
(are_raw_caps), (multi_queue_overrun_cb),
(multi_queue_underrun_cb), (gst_decode_group_new),
(get_current_group), (group_demuxer_event_probe),
(gst_decode_group_control_demuxer_pad),
(gst_decode_group_control_source_pad),
(gst_decode_group_check_if_blocked),
(gst_decode_group_check_if_drained), (gst_decode_group_expose),
(gst_decode_group_hide), (gst_decode_group_free),
(gst_decode_group_set_complete), (source_pad_blocked_cb),
(source_pad_event_probe), (gst_decode_pad_new), (add_fakesink),
(remove_fakesink), (find_sink_pad), (gst_decode_bin_change_state),
(plugin_init):
New decodebin2 element.
Closes #370092
* gst/playback/gstplay-marshal.list:
Added marshallers for new signals in decodebin2
* gst/playback/gstplaybasebin.c: (setup_subtitle), (make_decoder):
Use decodebin2 if *and only if* the USE_DECODEBIN2 environment variable
is set.
2006-11-28 14:40:39 +00:00
|
|
|
* @caps can be NULL.
|
|
|
|
*
|
|
|
|
* MT-safe
|
|
|
|
*/
|
|
|
|
static void
|
|
|
|
gst_decode_bin_set_caps (GstDecodeBin * dbin, GstCaps * caps)
|
|
|
|
{
|
|
|
|
GST_DEBUG_OBJECT (dbin, "Setting new caps: %" GST_PTR_FORMAT, caps);
|
|
|
|
|
2008-03-24 11:36:08 +00:00
|
|
|
GST_OBJECT_LOCK (dbin);
|
2009-09-26 10:17:49 +00:00
|
|
|
gst_caps_replace (&dbin->caps, caps);
|
2008-03-24 11:36:08 +00:00
|
|
|
GST_OBJECT_UNLOCK (dbin);
|
gst/playback/: New decodebin2 element.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstdecodebin2.c: (gst_decode_bin_get_type),
(_gst_boolean_accumulator), (gst_decode_bin_class_init),
(gst_decode_bin_factory_filter), (compare_ranks), (print_feature),
(gst_decode_bin_init), (gst_decode_bin_dispose),
(gst_decode_bin_finalize), (gst_decode_bin_set_property),
(gst_decode_bin_get_property), (gst_decode_bin_set_caps),
(gst_decode_bin_get_caps), (gst_decode_bin_autoplug_continue),
(gst_decode_bin_autoplug_sort), (analyze_new_pad), (connect_pad),
(connect_element), (expose_pad), (type_found),
(pad_added_group_cb), (pad_removed_group_cb),
(no_more_pads_group_cb), (pad_added_cb), (pad_removed_cb),
(no_more_pads_cb), (find_compatibles), (is_demuxer_element),
(are_raw_caps), (multi_queue_overrun_cb),
(multi_queue_underrun_cb), (gst_decode_group_new),
(get_current_group), (group_demuxer_event_probe),
(gst_decode_group_control_demuxer_pad),
(gst_decode_group_control_source_pad),
(gst_decode_group_check_if_blocked),
(gst_decode_group_check_if_drained), (gst_decode_group_expose),
(gst_decode_group_hide), (gst_decode_group_free),
(gst_decode_group_set_complete), (source_pad_blocked_cb),
(source_pad_event_probe), (gst_decode_pad_new), (add_fakesink),
(remove_fakesink), (find_sink_pad), (gst_decode_bin_change_state),
(plugin_init):
New decodebin2 element.
Closes #370092
* gst/playback/gstplay-marshal.list:
Added marshallers for new signals in decodebin2
* gst/playback/gstplaybasebin.c: (setup_subtitle), (make_decoder):
Use decodebin2 if *and only if* the USE_DECODEBIN2 environment variable
is set.
2006-11-28 14:40:39 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/* _get_caps
|
|
|
|
* Returns the currently configured caps on which decodebin will stop decoding.
|
|
|
|
* The returned caps (if not NULL), will have its refcount incremented.
|
|
|
|
*
|
|
|
|
* MT-safe
|
|
|
|
*/
|
|
|
|
static GstCaps *
|
|
|
|
gst_decode_bin_get_caps (GstDecodeBin * dbin)
|
|
|
|
{
|
|
|
|
GstCaps *caps;
|
|
|
|
|
|
|
|
GST_DEBUG_OBJECT (dbin, "Getting currently set caps");
|
|
|
|
|
2008-03-24 11:36:08 +00:00
|
|
|
GST_OBJECT_LOCK (dbin);
|
gst/playback/: New decodebin2 element.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstdecodebin2.c: (gst_decode_bin_get_type),
(_gst_boolean_accumulator), (gst_decode_bin_class_init),
(gst_decode_bin_factory_filter), (compare_ranks), (print_feature),
(gst_decode_bin_init), (gst_decode_bin_dispose),
(gst_decode_bin_finalize), (gst_decode_bin_set_property),
(gst_decode_bin_get_property), (gst_decode_bin_set_caps),
(gst_decode_bin_get_caps), (gst_decode_bin_autoplug_continue),
(gst_decode_bin_autoplug_sort), (analyze_new_pad), (connect_pad),
(connect_element), (expose_pad), (type_found),
(pad_added_group_cb), (pad_removed_group_cb),
(no_more_pads_group_cb), (pad_added_cb), (pad_removed_cb),
(no_more_pads_cb), (find_compatibles), (is_demuxer_element),
(are_raw_caps), (multi_queue_overrun_cb),
(multi_queue_underrun_cb), (gst_decode_group_new),
(get_current_group), (group_demuxer_event_probe),
(gst_decode_group_control_demuxer_pad),
(gst_decode_group_control_source_pad),
(gst_decode_group_check_if_blocked),
(gst_decode_group_check_if_drained), (gst_decode_group_expose),
(gst_decode_group_hide), (gst_decode_group_free),
(gst_decode_group_set_complete), (source_pad_blocked_cb),
(source_pad_event_probe), (gst_decode_pad_new), (add_fakesink),
(remove_fakesink), (find_sink_pad), (gst_decode_bin_change_state),
(plugin_init):
New decodebin2 element.
Closes #370092
* gst/playback/gstplay-marshal.list:
Added marshallers for new signals in decodebin2
* gst/playback/gstplaybasebin.c: (setup_subtitle), (make_decoder):
Use decodebin2 if *and only if* the USE_DECODEBIN2 environment variable
is set.
2006-11-28 14:40:39 +00:00
|
|
|
caps = dbin->caps;
|
|
|
|
if (caps)
|
|
|
|
gst_caps_ref (caps);
|
2008-03-24 11:36:08 +00:00
|
|
|
GST_OBJECT_UNLOCK (dbin);
|
gst/playback/: New decodebin2 element.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstdecodebin2.c: (gst_decode_bin_get_type),
(_gst_boolean_accumulator), (gst_decode_bin_class_init),
(gst_decode_bin_factory_filter), (compare_ranks), (print_feature),
(gst_decode_bin_init), (gst_decode_bin_dispose),
(gst_decode_bin_finalize), (gst_decode_bin_set_property),
(gst_decode_bin_get_property), (gst_decode_bin_set_caps),
(gst_decode_bin_get_caps), (gst_decode_bin_autoplug_continue),
(gst_decode_bin_autoplug_sort), (analyze_new_pad), (connect_pad),
(connect_element), (expose_pad), (type_found),
(pad_added_group_cb), (pad_removed_group_cb),
(no_more_pads_group_cb), (pad_added_cb), (pad_removed_cb),
(no_more_pads_cb), (find_compatibles), (is_demuxer_element),
(are_raw_caps), (multi_queue_overrun_cb),
(multi_queue_underrun_cb), (gst_decode_group_new),
(get_current_group), (group_demuxer_event_probe),
(gst_decode_group_control_demuxer_pad),
(gst_decode_group_control_source_pad),
(gst_decode_group_check_if_blocked),
(gst_decode_group_check_if_drained), (gst_decode_group_expose),
(gst_decode_group_hide), (gst_decode_group_free),
(gst_decode_group_set_complete), (source_pad_blocked_cb),
(source_pad_event_probe), (gst_decode_pad_new), (add_fakesink),
(remove_fakesink), (find_sink_pad), (gst_decode_bin_change_state),
(plugin_init):
New decodebin2 element.
Closes #370092
* gst/playback/gstplay-marshal.list:
Added marshallers for new signals in decodebin2
* gst/playback/gstplaybasebin.c: (setup_subtitle), (make_decoder):
Use decodebin2 if *and only if* the USE_DECODEBIN2 environment variable
is set.
2006-11-28 14:40:39 +00:00
|
|
|
|
|
|
|
return caps;
|
|
|
|
}
|
|
|
|
|
gst/playback/gstdecodebin2.c: Remove fakesink hack, we can now implement this more elegantly.
Original commit message from CVS:
* gst/playback/gstdecodebin2.c: (gst_decode_bin_class_init),
(gst_decode_bin_init), (gst_decode_bin_dispose),
(gst_decode_bin_set_sink_caps), (gst_decode_bin_get_sink_caps),
(gst_decode_bin_set_property), (gst_decode_bin_get_property),
(analyze_new_pad), (connect_pad), (expose_pad),
(gst_decode_group_new), (gst_decode_group_control_demuxer_pad),
(gst_decode_group_expose), (gst_decode_group_free),
(do_async_start), (do_async_done), (gst_decode_bin_change_state):
Remove fakesink hack, we can now implement this more elegantly.
Added property to bypass typefinding.
Removed underrun callback and demuxer pad probe, we now use the srcpad
probe to expose groups.
API::sink-caps property
* gst/playback/gstplaybin2.c: (no_more_pads_cb):
Guard against multiple emissions of the no_more_pads signal, which
happens when we are dealing with chained oggs.
* gst/playback/gsturidecodebin.c: (remove_decoders),
(make_decoder), (type_found), (setup_streaming), (source_new_pad),
(setup_source):
For streams, use our own typefind element and plug our queue after it.
We will need this to determine the type of buffering to use for the
queue soon.
2008-04-03 12:16:04 +00:00
|
|
|
static void
|
|
|
|
gst_decode_bin_set_sink_caps (GstDecodeBin * dbin, GstCaps * caps)
|
|
|
|
{
|
|
|
|
GST_DEBUG_OBJECT (dbin, "Setting new caps: %" GST_PTR_FORMAT, caps);
|
|
|
|
|
|
|
|
g_object_set (dbin->typefind, "force-caps", caps, NULL);
|
|
|
|
}
|
|
|
|
|
|
|
|
static GstCaps *
|
|
|
|
gst_decode_bin_get_sink_caps (GstDecodeBin * dbin)
|
|
|
|
{
|
|
|
|
GstCaps *caps;
|
|
|
|
|
|
|
|
GST_DEBUG_OBJECT (dbin, "Getting currently set caps");
|
|
|
|
|
|
|
|
g_object_get (dbin->typefind, "force-caps", &caps, NULL);
|
|
|
|
|
|
|
|
return caps;
|
|
|
|
}
|
|
|
|
|
gst/playback/gstdecodebin2.c: Move subtitle encoding property to decodebin2 so that it can set the property value on ...
Original commit message from CVS:
* gst/playback/gstdecodebin2.c: (gst_decode_bin_class_init),
(gst_decode_bin_dispose), (gst_decode_bin_set_caps),
(gst_decode_bin_set_subs_encoding),
(gst_decode_bin_get_subs_encoding), (gst_decode_bin_set_property),
(gst_decode_bin_get_property), (analyze_new_pad):
Move subtitle encoding property to decodebin2 so that it can set the
property value on all elements that it autoplugs and that require it.
Make caps refcounting more consistent in get/set.
* gst/playback/gsturidecodebin.c: (_gst_boolean_accumulator),
(gst_uri_decode_bin_class_init), (gst_uri_decode_bin_init),
(gst_uri_decode_bin_finalize), (gst_uri_decode_bin_set_property),
(gst_uri_decode_bin_get_property), (proxy_unknown_type_signal),
(proxy_autoplug_continue_signal),
(proxy_autoplug_factories_signal), (proxy_autoplug_select_signal),
(make_decoder):
Proxy properties and relevant signals from the internal decodebin.
Make properties MT safe.
2007-10-25 17:36:49 +00:00
|
|
|
static void
|
|
|
|
gst_decode_bin_set_subs_encoding (GstDecodeBin * dbin, const gchar * encoding)
|
|
|
|
{
|
2008-03-24 11:36:08 +00:00
|
|
|
GList *walk;
|
|
|
|
|
gst/playback/gstdecodebin2.c: Move subtitle encoding property to decodebin2 so that it can set the property value on ...
Original commit message from CVS:
* gst/playback/gstdecodebin2.c: (gst_decode_bin_class_init),
(gst_decode_bin_dispose), (gst_decode_bin_set_caps),
(gst_decode_bin_set_subs_encoding),
(gst_decode_bin_get_subs_encoding), (gst_decode_bin_set_property),
(gst_decode_bin_get_property), (analyze_new_pad):
Move subtitle encoding property to decodebin2 so that it can set the
property value on all elements that it autoplugs and that require it.
Make caps refcounting more consistent in get/set.
* gst/playback/gsturidecodebin.c: (_gst_boolean_accumulator),
(gst_uri_decode_bin_class_init), (gst_uri_decode_bin_init),
(gst_uri_decode_bin_finalize), (gst_uri_decode_bin_set_property),
(gst_uri_decode_bin_get_property), (proxy_unknown_type_signal),
(proxy_autoplug_continue_signal),
(proxy_autoplug_factories_signal), (proxy_autoplug_select_signal),
(make_decoder):
Proxy properties and relevant signals from the internal decodebin.
Make properties MT safe.
2007-10-25 17:36:49 +00:00
|
|
|
GST_DEBUG_OBJECT (dbin, "Setting new encoding: %s", GST_STR_NULL (encoding));
|
|
|
|
|
2009-11-06 14:12:06 +00:00
|
|
|
SUBTITLE_LOCK (dbin);
|
gst/playback/gstdecodebin2.c: Move subtitle encoding property to decodebin2 so that it can set the property value on ...
Original commit message from CVS:
* gst/playback/gstdecodebin2.c: (gst_decode_bin_class_init),
(gst_decode_bin_dispose), (gst_decode_bin_set_caps),
(gst_decode_bin_set_subs_encoding),
(gst_decode_bin_get_subs_encoding), (gst_decode_bin_set_property),
(gst_decode_bin_get_property), (analyze_new_pad):
Move subtitle encoding property to decodebin2 so that it can set the
property value on all elements that it autoplugs and that require it.
Make caps refcounting more consistent in get/set.
* gst/playback/gsturidecodebin.c: (_gst_boolean_accumulator),
(gst_uri_decode_bin_class_init), (gst_uri_decode_bin_init),
(gst_uri_decode_bin_finalize), (gst_uri_decode_bin_set_property),
(gst_uri_decode_bin_get_property), (proxy_unknown_type_signal),
(proxy_autoplug_continue_signal),
(proxy_autoplug_factories_signal), (proxy_autoplug_select_signal),
(make_decoder):
Proxy properties and relevant signals from the internal decodebin.
Make properties MT safe.
2007-10-25 17:36:49 +00:00
|
|
|
g_free (dbin->encoding);
|
|
|
|
dbin->encoding = g_strdup (encoding);
|
2008-03-24 11:36:08 +00:00
|
|
|
|
|
|
|
/* set the subtitle encoding on all added elements */
|
|
|
|
for (walk = dbin->subtitles; walk; walk = g_list_next (walk)) {
|
|
|
|
g_object_set (G_OBJECT (walk->data), "subtitle-encoding", dbin->encoding,
|
|
|
|
NULL);
|
|
|
|
}
|
2009-11-06 14:12:06 +00:00
|
|
|
SUBTITLE_UNLOCK (dbin);
|
gst/playback/gstdecodebin2.c: Move subtitle encoding property to decodebin2 so that it can set the property value on ...
Original commit message from CVS:
* gst/playback/gstdecodebin2.c: (gst_decode_bin_class_init),
(gst_decode_bin_dispose), (gst_decode_bin_set_caps),
(gst_decode_bin_set_subs_encoding),
(gst_decode_bin_get_subs_encoding), (gst_decode_bin_set_property),
(gst_decode_bin_get_property), (analyze_new_pad):
Move subtitle encoding property to decodebin2 so that it can set the
property value on all elements that it autoplugs and that require it.
Make caps refcounting more consistent in get/set.
* gst/playback/gsturidecodebin.c: (_gst_boolean_accumulator),
(gst_uri_decode_bin_class_init), (gst_uri_decode_bin_init),
(gst_uri_decode_bin_finalize), (gst_uri_decode_bin_set_property),
(gst_uri_decode_bin_get_property), (proxy_unknown_type_signal),
(proxy_autoplug_continue_signal),
(proxy_autoplug_factories_signal), (proxy_autoplug_select_signal),
(make_decoder):
Proxy properties and relevant signals from the internal decodebin.
Make properties MT safe.
2007-10-25 17:36:49 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
static gchar *
|
|
|
|
gst_decode_bin_get_subs_encoding (GstDecodeBin * dbin)
|
|
|
|
{
|
|
|
|
gchar *encoding;
|
|
|
|
|
|
|
|
GST_DEBUG_OBJECT (dbin, "Getting currently set encoding");
|
|
|
|
|
2009-11-06 14:12:06 +00:00
|
|
|
SUBTITLE_LOCK (dbin);
|
gst/playback/gstdecodebin2.c: Move subtitle encoding property to decodebin2 so that it can set the property value on ...
Original commit message from CVS:
* gst/playback/gstdecodebin2.c: (gst_decode_bin_class_init),
(gst_decode_bin_dispose), (gst_decode_bin_set_caps),
(gst_decode_bin_set_subs_encoding),
(gst_decode_bin_get_subs_encoding), (gst_decode_bin_set_property),
(gst_decode_bin_get_property), (analyze_new_pad):
Move subtitle encoding property to decodebin2 so that it can set the
property value on all elements that it autoplugs and that require it.
Make caps refcounting more consistent in get/set.
* gst/playback/gsturidecodebin.c: (_gst_boolean_accumulator),
(gst_uri_decode_bin_class_init), (gst_uri_decode_bin_init),
(gst_uri_decode_bin_finalize), (gst_uri_decode_bin_set_property),
(gst_uri_decode_bin_get_property), (proxy_unknown_type_signal),
(proxy_autoplug_continue_signal),
(proxy_autoplug_factories_signal), (proxy_autoplug_select_signal),
(make_decoder):
Proxy properties and relevant signals from the internal decodebin.
Make properties MT safe.
2007-10-25 17:36:49 +00:00
|
|
|
encoding = g_strdup (dbin->encoding);
|
2009-11-06 14:12:06 +00:00
|
|
|
SUBTITLE_UNLOCK (dbin);
|
gst/playback/gstdecodebin2.c: Move subtitle encoding property to decodebin2 so that it can set the property value on ...
Original commit message from CVS:
* gst/playback/gstdecodebin2.c: (gst_decode_bin_class_init),
(gst_decode_bin_dispose), (gst_decode_bin_set_caps),
(gst_decode_bin_set_subs_encoding),
(gst_decode_bin_get_subs_encoding), (gst_decode_bin_set_property),
(gst_decode_bin_get_property), (analyze_new_pad):
Move subtitle encoding property to decodebin2 so that it can set the
property value on all elements that it autoplugs and that require it.
Make caps refcounting more consistent in get/set.
* gst/playback/gsturidecodebin.c: (_gst_boolean_accumulator),
(gst_uri_decode_bin_class_init), (gst_uri_decode_bin_init),
(gst_uri_decode_bin_finalize), (gst_uri_decode_bin_set_property),
(gst_uri_decode_bin_get_property), (proxy_unknown_type_signal),
(proxy_autoplug_continue_signal),
(proxy_autoplug_factories_signal), (proxy_autoplug_select_signal),
(make_decoder):
Proxy properties and relevant signals from the internal decodebin.
Make properties MT safe.
2007-10-25 17:36:49 +00:00
|
|
|
|
|
|
|
return encoding;
|
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
|
|
|
gst_decode_bin_set_property (GObject * object, guint prop_id,
|
|
|
|
const GValue * value, GParamSpec * pspec)
|
|
|
|
{
|
|
|
|
GstDecodeBin *dbin;
|
|
|
|
|
|
|
|
dbin = GST_DECODE_BIN (object);
|
|
|
|
|
|
|
|
switch (prop_id) {
|
|
|
|
case PROP_CAPS:
|
|
|
|
gst_decode_bin_set_caps (dbin, g_value_get_boxed (value));
|
|
|
|
break;
|
|
|
|
case PROP_SUBTITLE_ENCODING:
|
|
|
|
gst_decode_bin_set_subs_encoding (dbin, g_value_get_string (value));
|
|
|
|
break;
|
gst/playback/gstdecodebin2.c: Remove fakesink hack, we can now implement this more elegantly.
Original commit message from CVS:
* gst/playback/gstdecodebin2.c: (gst_decode_bin_class_init),
(gst_decode_bin_init), (gst_decode_bin_dispose),
(gst_decode_bin_set_sink_caps), (gst_decode_bin_get_sink_caps),
(gst_decode_bin_set_property), (gst_decode_bin_get_property),
(analyze_new_pad), (connect_pad), (expose_pad),
(gst_decode_group_new), (gst_decode_group_control_demuxer_pad),
(gst_decode_group_expose), (gst_decode_group_free),
(do_async_start), (do_async_done), (gst_decode_bin_change_state):
Remove fakesink hack, we can now implement this more elegantly.
Added property to bypass typefinding.
Removed underrun callback and demuxer pad probe, we now use the srcpad
probe to expose groups.
API::sink-caps property
* gst/playback/gstplaybin2.c: (no_more_pads_cb):
Guard against multiple emissions of the no_more_pads signal, which
happens when we are dealing with chained oggs.
* gst/playback/gsturidecodebin.c: (remove_decoders),
(make_decoder), (type_found), (setup_streaming), (source_new_pad),
(setup_source):
For streams, use our own typefind element and plug our queue after it.
We will need this to determine the type of buffering to use for the
queue soon.
2008-04-03 12:16:04 +00:00
|
|
|
case PROP_SINK_CAPS:
|
|
|
|
gst_decode_bin_set_sink_caps (dbin, g_value_get_boxed (value));
|
|
|
|
break;
|
2009-10-23 14:42:23 +00:00
|
|
|
case PROP_USE_BUFFERING:
|
|
|
|
dbin->use_buffering = g_value_get_boolean (value);
|
|
|
|
break;
|
|
|
|
case PROP_LOW_PERCENT:
|
|
|
|
dbin->low_percent = g_value_get_int (value);
|
|
|
|
break;
|
|
|
|
case PROP_HIGH_PERCENT:
|
|
|
|
dbin->high_percent = g_value_get_int (value);
|
|
|
|
break;
|
|
|
|
case PROP_MAX_SIZE_BYTES:
|
|
|
|
dbin->max_size_bytes = g_value_get_uint (value);
|
|
|
|
break;
|
|
|
|
case PROP_MAX_SIZE_BUFFERS:
|
|
|
|
dbin->max_size_buffers = g_value_get_uint (value);
|
|
|
|
break;
|
|
|
|
case PROP_MAX_SIZE_TIME:
|
|
|
|
dbin->max_size_time = g_value_get_uint64 (value);
|
|
|
|
break;
|
2009-11-06 16:01:04 +00:00
|
|
|
case PROP_POST_STREAM_TOPOLOGY:
|
|
|
|
dbin->post_stream_topology = g_value_get_boolean (value);
|
|
|
|
break;
|
2010-05-06 16:50:51 +00:00
|
|
|
case PROP_EXPOSE_ALL_STREAMS:
|
|
|
|
dbin->expose_allstreams = g_value_get_boolean (value);
|
|
|
|
break;
|
2012-05-10 17:11:47 +00:00
|
|
|
case PROP_CONNECTION_SPEED:
|
|
|
|
GST_OBJECT_LOCK (dbin);
|
|
|
|
dbin->connection_speed = g_value_get_uint64 (value) * 1000;
|
|
|
|
GST_OBJECT_UNLOCK (dbin);
|
|
|
|
break;
|
gst/playback/gstdecodebin2.c: Move subtitle encoding property to decodebin2 so that it can set the property value on ...
Original commit message from CVS:
* gst/playback/gstdecodebin2.c: (gst_decode_bin_class_init),
(gst_decode_bin_dispose), (gst_decode_bin_set_caps),
(gst_decode_bin_set_subs_encoding),
(gst_decode_bin_get_subs_encoding), (gst_decode_bin_set_property),
(gst_decode_bin_get_property), (analyze_new_pad):
Move subtitle encoding property to decodebin2 so that it can set the
property value on all elements that it autoplugs and that require it.
Make caps refcounting more consistent in get/set.
* gst/playback/gsturidecodebin.c: (_gst_boolean_accumulator),
(gst_uri_decode_bin_class_init), (gst_uri_decode_bin_init),
(gst_uri_decode_bin_finalize), (gst_uri_decode_bin_set_property),
(gst_uri_decode_bin_get_property), (proxy_unknown_type_signal),
(proxy_autoplug_continue_signal),
(proxy_autoplug_factories_signal), (proxy_autoplug_select_signal),
(make_decoder):
Proxy properties and relevant signals from the internal decodebin.
Make properties MT safe.
2007-10-25 17:36:49 +00:00
|
|
|
default:
|
|
|
|
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
|
|
|
gst_decode_bin_get_property (GObject * object, guint prop_id,
|
|
|
|
GValue * value, GParamSpec * pspec)
|
|
|
|
{
|
|
|
|
GstDecodeBin *dbin;
|
|
|
|
|
|
|
|
dbin = GST_DECODE_BIN (object);
|
|
|
|
switch (prop_id) {
|
|
|
|
case PROP_CAPS:
|
|
|
|
g_value_take_boxed (value, gst_decode_bin_get_caps (dbin));
|
|
|
|
break;
|
|
|
|
case PROP_SUBTITLE_ENCODING:
|
|
|
|
g_value_take_string (value, gst_decode_bin_get_subs_encoding (dbin));
|
|
|
|
break;
|
gst/playback/gstdecodebin2.c: Remove fakesink hack, we can now implement this more elegantly.
Original commit message from CVS:
* gst/playback/gstdecodebin2.c: (gst_decode_bin_class_init),
(gst_decode_bin_init), (gst_decode_bin_dispose),
(gst_decode_bin_set_sink_caps), (gst_decode_bin_get_sink_caps),
(gst_decode_bin_set_property), (gst_decode_bin_get_property),
(analyze_new_pad), (connect_pad), (expose_pad),
(gst_decode_group_new), (gst_decode_group_control_demuxer_pad),
(gst_decode_group_expose), (gst_decode_group_free),
(do_async_start), (do_async_done), (gst_decode_bin_change_state):
Remove fakesink hack, we can now implement this more elegantly.
Added property to bypass typefinding.
Removed underrun callback and demuxer pad probe, we now use the srcpad
probe to expose groups.
API::sink-caps property
* gst/playback/gstplaybin2.c: (no_more_pads_cb):
Guard against multiple emissions of the no_more_pads signal, which
happens when we are dealing with chained oggs.
* gst/playback/gsturidecodebin.c: (remove_decoders),
(make_decoder), (type_found), (setup_streaming), (source_new_pad),
(setup_source):
For streams, use our own typefind element and plug our queue after it.
We will need this to determine the type of buffering to use for the
queue soon.
2008-04-03 12:16:04 +00:00
|
|
|
case PROP_SINK_CAPS:
|
|
|
|
g_value_take_boxed (value, gst_decode_bin_get_sink_caps (dbin));
|
|
|
|
break;
|
2009-10-23 14:42:23 +00:00
|
|
|
case PROP_USE_BUFFERING:
|
|
|
|
g_value_set_boolean (value, dbin->use_buffering);
|
|
|
|
break;
|
|
|
|
case PROP_LOW_PERCENT:
|
|
|
|
g_value_set_int (value, dbin->low_percent);
|
|
|
|
break;
|
|
|
|
case PROP_HIGH_PERCENT:
|
|
|
|
g_value_set_int (value, dbin->high_percent);
|
|
|
|
break;
|
|
|
|
case PROP_MAX_SIZE_BYTES:
|
|
|
|
g_value_set_uint (value, dbin->max_size_bytes);
|
|
|
|
break;
|
|
|
|
case PROP_MAX_SIZE_BUFFERS:
|
|
|
|
g_value_set_uint (value, dbin->max_size_buffers);
|
|
|
|
break;
|
|
|
|
case PROP_MAX_SIZE_TIME:
|
|
|
|
g_value_set_uint64 (value, dbin->max_size_time);
|
|
|
|
break;
|
2009-11-06 16:01:04 +00:00
|
|
|
case PROP_POST_STREAM_TOPOLOGY:
|
|
|
|
g_value_set_boolean (value, dbin->post_stream_topology);
|
|
|
|
break;
|
2010-05-06 16:50:51 +00:00
|
|
|
case PROP_EXPOSE_ALL_STREAMS:
|
|
|
|
g_value_set_boolean (value, dbin->expose_allstreams);
|
|
|
|
break;
|
2012-05-10 17:11:47 +00:00
|
|
|
case PROP_CONNECTION_SPEED:
|
|
|
|
GST_OBJECT_LOCK (dbin);
|
|
|
|
g_value_set_uint64 (value, dbin->connection_speed / 1000);
|
|
|
|
GST_OBJECT_UNLOCK (dbin);
|
|
|
|
break;
|
gst/playback/gstdecodebin2.c: Move subtitle encoding property to decodebin2 so that it can set the property value on ...
Original commit message from CVS:
* gst/playback/gstdecodebin2.c: (gst_decode_bin_class_init),
(gst_decode_bin_dispose), (gst_decode_bin_set_caps),
(gst_decode_bin_set_subs_encoding),
(gst_decode_bin_get_subs_encoding), (gst_decode_bin_set_property),
(gst_decode_bin_get_property), (analyze_new_pad):
Move subtitle encoding property to decodebin2 so that it can set the
property value on all elements that it autoplugs and that require it.
Make caps refcounting more consistent in get/set.
* gst/playback/gsturidecodebin.c: (_gst_boolean_accumulator),
(gst_uri_decode_bin_class_init), (gst_uri_decode_bin_init),
(gst_uri_decode_bin_finalize), (gst_uri_decode_bin_set_property),
(gst_uri_decode_bin_get_property), (proxy_unknown_type_signal),
(proxy_autoplug_continue_signal),
(proxy_autoplug_factories_signal), (proxy_autoplug_select_signal),
(make_decoder):
Proxy properties and relevant signals from the internal decodebin.
Make properties MT safe.
2007-10-25 17:36:49 +00:00
|
|
|
default:
|
|
|
|
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
gst/playback/: New decodebin2 element.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstdecodebin2.c: (gst_decode_bin_get_type),
(_gst_boolean_accumulator), (gst_decode_bin_class_init),
(gst_decode_bin_factory_filter), (compare_ranks), (print_feature),
(gst_decode_bin_init), (gst_decode_bin_dispose),
(gst_decode_bin_finalize), (gst_decode_bin_set_property),
(gst_decode_bin_get_property), (gst_decode_bin_set_caps),
(gst_decode_bin_get_caps), (gst_decode_bin_autoplug_continue),
(gst_decode_bin_autoplug_sort), (analyze_new_pad), (connect_pad),
(connect_element), (expose_pad), (type_found),
(pad_added_group_cb), (pad_removed_group_cb),
(no_more_pads_group_cb), (pad_added_cb), (pad_removed_cb),
(no_more_pads_cb), (find_compatibles), (is_demuxer_element),
(are_raw_caps), (multi_queue_overrun_cb),
(multi_queue_underrun_cb), (gst_decode_group_new),
(get_current_group), (group_demuxer_event_probe),
(gst_decode_group_control_demuxer_pad),
(gst_decode_group_control_source_pad),
(gst_decode_group_check_if_blocked),
(gst_decode_group_check_if_drained), (gst_decode_group_expose),
(gst_decode_group_hide), (gst_decode_group_free),
(gst_decode_group_set_complete), (source_pad_blocked_cb),
(source_pad_event_probe), (gst_decode_pad_new), (add_fakesink),
(remove_fakesink), (find_sink_pad), (gst_decode_bin_change_state),
(plugin_init):
New decodebin2 element.
Closes #370092
* gst/playback/gstplay-marshal.list:
Added marshallers for new signals in decodebin2
* gst/playback/gstplaybasebin.c: (setup_subtitle), (make_decoder):
Use decodebin2 if *and only if* the USE_DECODEBIN2 environment variable
is set.
2006-11-28 14:40:39 +00:00
|
|
|
/*****
|
|
|
|
* Default autoplug signal handlers
|
|
|
|
*****/
|
|
|
|
static gboolean
|
2007-10-24 11:07:57 +00:00
|
|
|
gst_decode_bin_autoplug_continue (GstElement * element, GstPad * pad,
|
|
|
|
GstCaps * caps)
|
gst/playback/: New decodebin2 element.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstdecodebin2.c: (gst_decode_bin_get_type),
(_gst_boolean_accumulator), (gst_decode_bin_class_init),
(gst_decode_bin_factory_filter), (compare_ranks), (print_feature),
(gst_decode_bin_init), (gst_decode_bin_dispose),
(gst_decode_bin_finalize), (gst_decode_bin_set_property),
(gst_decode_bin_get_property), (gst_decode_bin_set_caps),
(gst_decode_bin_get_caps), (gst_decode_bin_autoplug_continue),
(gst_decode_bin_autoplug_sort), (analyze_new_pad), (connect_pad),
(connect_element), (expose_pad), (type_found),
(pad_added_group_cb), (pad_removed_group_cb),
(no_more_pads_group_cb), (pad_added_cb), (pad_removed_cb),
(no_more_pads_cb), (find_compatibles), (is_demuxer_element),
(are_raw_caps), (multi_queue_overrun_cb),
(multi_queue_underrun_cb), (gst_decode_group_new),
(get_current_group), (group_demuxer_event_probe),
(gst_decode_group_control_demuxer_pad),
(gst_decode_group_control_source_pad),
(gst_decode_group_check_if_blocked),
(gst_decode_group_check_if_drained), (gst_decode_group_expose),
(gst_decode_group_hide), (gst_decode_group_free),
(gst_decode_group_set_complete), (source_pad_blocked_cb),
(source_pad_event_probe), (gst_decode_pad_new), (add_fakesink),
(remove_fakesink), (find_sink_pad), (gst_decode_bin_change_state),
(plugin_init):
New decodebin2 element.
Closes #370092
* gst/playback/gstplay-marshal.list:
Added marshallers for new signals in decodebin2
* gst/playback/gstplaybasebin.c: (setup_subtitle), (make_decoder):
Use decodebin2 if *and only if* the USE_DECODEBIN2 environment variable
is set.
2006-11-28 14:40:39 +00:00
|
|
|
{
|
gst/playback/: Refactor some common code to filter factories and check caps compat.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstfactorylists.c: (compare_ranks), (print_feature),
(get_feature_array), (decoders_filter), (sinks_filter),
(gst_factory_list_get_decoders), (gst_factory_list_get_sinks),
(gst_factory_list_filter):
* gst/playback/gstfactorylists.h:
Refactor some common code to filter factories and check caps compat.
* gst/playback/gstdecodebin.c:
* gst/playback/gstdecodebin2.c: (gst_decode_bin_class_init),
(gst_decode_bin_init), (gst_decode_bin_dispose),
(gst_decode_bin_autoplug_continue),
(gst_decode_bin_autoplug_factories),
(gst_decode_bin_autoplug_select), (analyze_new_pad),
(find_compatibles):
* gst/playback/gstplaybin.c:
* gst/playback/gstplaybin2.c: (gst_play_bin_class_init),
(gst_play_bin_init), (gst_play_bin_finalize),
(autoplug_factories_cb), (activate_group):
* gst/playback/gstqueue2.c:
* gst/playback/gsturidecodebin.c: (proxy_unknown_type_signal),
(proxy_autoplug_continue_signal),
(proxy_autoplug_factories_signal), (proxy_autoplug_select_signal),
(proxy_drained_signal):
Add some more debug info and use factor filtering code.
2007-11-30 17:47:15 +00:00
|
|
|
GST_DEBUG_OBJECT (element, "autoplug-continue returns TRUE");
|
|
|
|
|
2007-10-24 11:07:57 +00:00
|
|
|
/* by default we always continue */
|
gst/playback/: New decodebin2 element.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstdecodebin2.c: (gst_decode_bin_get_type),
(_gst_boolean_accumulator), (gst_decode_bin_class_init),
(gst_decode_bin_factory_filter), (compare_ranks), (print_feature),
(gst_decode_bin_init), (gst_decode_bin_dispose),
(gst_decode_bin_finalize), (gst_decode_bin_set_property),
(gst_decode_bin_get_property), (gst_decode_bin_set_caps),
(gst_decode_bin_get_caps), (gst_decode_bin_autoplug_continue),
(gst_decode_bin_autoplug_sort), (analyze_new_pad), (connect_pad),
(connect_element), (expose_pad), (type_found),
(pad_added_group_cb), (pad_removed_group_cb),
(no_more_pads_group_cb), (pad_added_cb), (pad_removed_cb),
(no_more_pads_cb), (find_compatibles), (is_demuxer_element),
(are_raw_caps), (multi_queue_overrun_cb),
(multi_queue_underrun_cb), (gst_decode_group_new),
(get_current_group), (group_demuxer_event_probe),
(gst_decode_group_control_demuxer_pad),
(gst_decode_group_control_source_pad),
(gst_decode_group_check_if_blocked),
(gst_decode_group_check_if_drained), (gst_decode_group_expose),
(gst_decode_group_hide), (gst_decode_group_free),
(gst_decode_group_set_complete), (source_pad_blocked_cb),
(source_pad_event_probe), (gst_decode_pad_new), (add_fakesink),
(remove_fakesink), (find_sink_pad), (gst_decode_bin_change_state),
(plugin_init):
New decodebin2 element.
Closes #370092
* gst/playback/gstplay-marshal.list:
Added marshallers for new signals in decodebin2
* gst/playback/gstplaybasebin.c: (setup_subtitle), (make_decoder):
Use decodebin2 if *and only if* the USE_DECODEBIN2 environment variable
is set.
2006-11-28 14:40:39 +00:00
|
|
|
return TRUE;
|
|
|
|
}
|
|
|
|
|
2007-10-24 11:07:57 +00:00
|
|
|
static GValueArray *
|
|
|
|
gst_decode_bin_autoplug_factories (GstElement * element, GstPad * pad,
|
|
|
|
GstCaps * caps)
|
gst/playback/: New decodebin2 element.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstdecodebin2.c: (gst_decode_bin_get_type),
(_gst_boolean_accumulator), (gst_decode_bin_class_init),
(gst_decode_bin_factory_filter), (compare_ranks), (print_feature),
(gst_decode_bin_init), (gst_decode_bin_dispose),
(gst_decode_bin_finalize), (gst_decode_bin_set_property),
(gst_decode_bin_get_property), (gst_decode_bin_set_caps),
(gst_decode_bin_get_caps), (gst_decode_bin_autoplug_continue),
(gst_decode_bin_autoplug_sort), (analyze_new_pad), (connect_pad),
(connect_element), (expose_pad), (type_found),
(pad_added_group_cb), (pad_removed_group_cb),
(no_more_pads_group_cb), (pad_added_cb), (pad_removed_cb),
(no_more_pads_cb), (find_compatibles), (is_demuxer_element),
(are_raw_caps), (multi_queue_overrun_cb),
(multi_queue_underrun_cb), (gst_decode_group_new),
(get_current_group), (group_demuxer_event_probe),
(gst_decode_group_control_demuxer_pad),
(gst_decode_group_control_source_pad),
(gst_decode_group_check_if_blocked),
(gst_decode_group_check_if_drained), (gst_decode_group_expose),
(gst_decode_group_hide), (gst_decode_group_free),
(gst_decode_group_set_complete), (source_pad_blocked_cb),
(source_pad_event_probe), (gst_decode_pad_new), (add_fakesink),
(remove_fakesink), (find_sink_pad), (gst_decode_bin_change_state),
(plugin_init):
New decodebin2 element.
Closes #370092
* gst/playback/gstplay-marshal.list:
Added marshallers for new signals in decodebin2
* gst/playback/gstplaybasebin.c: (setup_subtitle), (make_decoder):
Use decodebin2 if *and only if* the USE_DECODEBIN2 environment variable
is set.
2006-11-28 14:40:39 +00:00
|
|
|
{
|
2010-08-06 09:53:38 +00:00
|
|
|
GList *list, *tmp;
|
2007-10-24 11:07:57 +00:00
|
|
|
GValueArray *result;
|
2009-11-11 13:00:26 +00:00
|
|
|
GstDecodeBin *dbin = GST_DECODE_BIN_CAST (element);
|
2007-10-24 11:07:57 +00:00
|
|
|
|
2008-03-24 11:36:08 +00:00
|
|
|
GST_DEBUG_OBJECT (element, "finding factories");
|
|
|
|
|
2007-10-24 11:07:57 +00:00
|
|
|
/* return all compatible factories for caps */
|
2013-02-07 09:49:33 +00:00
|
|
|
g_mutex_lock (&dbin->factories_lock);
|
2009-11-11 13:00:26 +00:00
|
|
|
gst_decode_bin_update_factories_list (dbin);
|
2010-08-06 09:53:38 +00:00
|
|
|
list =
|
|
|
|
gst_element_factory_list_filter (dbin->factories, caps, GST_PAD_SINK,
|
2013-05-15 15:15:18 +00:00
|
|
|
gst_caps_is_fixed (caps));
|
2013-02-07 09:49:33 +00:00
|
|
|
g_mutex_unlock (&dbin->factories_lock);
|
2007-10-24 11:07:57 +00:00
|
|
|
|
2010-08-06 09:53:38 +00:00
|
|
|
result = g_value_array_new (g_list_length (list));
|
|
|
|
for (tmp = list; tmp; tmp = tmp->next) {
|
|
|
|
GstElementFactory *factory = GST_ELEMENT_FACTORY_CAST (tmp->data);
|
|
|
|
GValue val = { 0, };
|
|
|
|
|
|
|
|
g_value_init (&val, G_TYPE_OBJECT);
|
|
|
|
g_value_set_object (&val, factory);
|
|
|
|
g_value_array_append (result, &val);
|
|
|
|
g_value_unset (&val);
|
|
|
|
}
|
|
|
|
gst_plugin_feature_list_free (list);
|
|
|
|
|
gst/playback/: Refactor some common code to filter factories and check caps compat.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstfactorylists.c: (compare_ranks), (print_feature),
(get_feature_array), (decoders_filter), (sinks_filter),
(gst_factory_list_get_decoders), (gst_factory_list_get_sinks),
(gst_factory_list_filter):
* gst/playback/gstfactorylists.h:
Refactor some common code to filter factories and check caps compat.
* gst/playback/gstdecodebin.c:
* gst/playback/gstdecodebin2.c: (gst_decode_bin_class_init),
(gst_decode_bin_init), (gst_decode_bin_dispose),
(gst_decode_bin_autoplug_continue),
(gst_decode_bin_autoplug_factories),
(gst_decode_bin_autoplug_select), (analyze_new_pad),
(find_compatibles):
* gst/playback/gstplaybin.c:
* gst/playback/gstplaybin2.c: (gst_play_bin_class_init),
(gst_play_bin_init), (gst_play_bin_finalize),
(autoplug_factories_cb), (activate_group):
* gst/playback/gstqueue2.c:
* gst/playback/gsturidecodebin.c: (proxy_unknown_type_signal),
(proxy_autoplug_continue_signal),
(proxy_autoplug_factories_signal), (proxy_autoplug_select_signal),
(proxy_drained_signal):
Add some more debug info and use factor filtering code.
2007-11-30 17:47:15 +00:00
|
|
|
GST_DEBUG_OBJECT (element, "autoplug-factories returns %p", result);
|
|
|
|
|
2007-10-24 11:07:57 +00:00
|
|
|
return result;
|
gst/playback/: New decodebin2 element.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstdecodebin2.c: (gst_decode_bin_get_type),
(_gst_boolean_accumulator), (gst_decode_bin_class_init),
(gst_decode_bin_factory_filter), (compare_ranks), (print_feature),
(gst_decode_bin_init), (gst_decode_bin_dispose),
(gst_decode_bin_finalize), (gst_decode_bin_set_property),
(gst_decode_bin_get_property), (gst_decode_bin_set_caps),
(gst_decode_bin_get_caps), (gst_decode_bin_autoplug_continue),
(gst_decode_bin_autoplug_sort), (analyze_new_pad), (connect_pad),
(connect_element), (expose_pad), (type_found),
(pad_added_group_cb), (pad_removed_group_cb),
(no_more_pads_group_cb), (pad_added_cb), (pad_removed_cb),
(no_more_pads_cb), (find_compatibles), (is_demuxer_element),
(are_raw_caps), (multi_queue_overrun_cb),
(multi_queue_underrun_cb), (gst_decode_group_new),
(get_current_group), (group_demuxer_event_probe),
(gst_decode_group_control_demuxer_pad),
(gst_decode_group_control_source_pad),
(gst_decode_group_check_if_blocked),
(gst_decode_group_check_if_drained), (gst_decode_group_expose),
(gst_decode_group_hide), (gst_decode_group_free),
(gst_decode_group_set_complete), (source_pad_blocked_cb),
(source_pad_event_probe), (gst_decode_pad_new), (add_fakesink),
(remove_fakesink), (find_sink_pad), (gst_decode_bin_change_state),
(plugin_init):
New decodebin2 element.
Closes #370092
* gst/playback/gstplay-marshal.list:
Added marshallers for new signals in decodebin2
* gst/playback/gstplaybasebin.c: (setup_subtitle), (make_decoder):
Use decodebin2 if *and only if* the USE_DECODEBIN2 environment variable
is set.
2006-11-28 14:40:39 +00:00
|
|
|
}
|
|
|
|
|
gst/playback/Makefile.am: Group decodebin2 and uridecodebin into the same plugin so that they can share the GEnumType.
Original commit message from CVS:
* gst/playback/Makefile.am:
Group decodebin2 and uridecodebin into the same plugin so that they
can share the GEnumType.
* gst/playback/gstdecodebin2.c: (_gst_array_accumulator),
(_gst_select_accumulator), (gst_decode_bin_class_init),
(gst_decode_bin_init), (gst_decode_bin_autoplug_sort),
(gst_decode_bin_autoplug_select), (gst_decode_bin_autoplug_add),
(analyze_new_pad), (connect_pad), (gst_decode_bin_plugin_init):
Add signal to sort factories instead of the more awkward autoplug-select
signal.
Modify autoplug_select so that we can try, skip or expose the
autopluggin of an element on a pad.
* gst/playback/gstfactorylists.c: (compare_ranks),
(decoders_filter), (sinks_filter), (gst_factory_list_is_type),
(element_filter), (gst_factory_list_get_elements),
(gst_factory_list_debug), (gst_factory_list_filter):
* gst/playback/gstfactorylists.h:
Simplify the API, allow getting elements based on mask.
* gst/playback/gstplay-marshal.list:
Add some more marshallers.
* gst/playback/gstplaybin2.c: (init_group), (gst_play_bin_init),
(gst_play_bin_finalize), (pad_removed_cb), (autoplug_factories_cb),
(autoplug_select_cb), (activate_group):
Add support for managing non-raw sinks by providing a custom element and
sink list to decodebin2.
Try to plug non-raw sinks when decodebin2 using autoplug-select of
decodebin2.
* gst/playback/gstplaysink.c: (gen_video_chain), (gen_audio_chain),
(gst_play_sink_set_mode), (gst_play_sink_request_pad):
* gst/playback/gstplaysink.h:
Add support for raw and non-raw sinks.
Add support to force sinks selected by playbin2.
Don't plug raw converters for non-raw sinks.
* gst/playback/gsturidecodebin.c: (_gst_array_accumulator),
(_gst_select_accumulator), (gst_uri_decode_bin_class_init),
(proxy_autoplug_select_signal), (gst_uri_decode_bin_plugin_init),
(plugin_init):
Use right accumulators.
Proxy new signal.
2007-12-05 17:11:48 +00:00
|
|
|
static GValueArray *
|
|
|
|
gst_decode_bin_autoplug_sort (GstElement * element, GstPad * pad,
|
2007-10-24 11:07:57 +00:00
|
|
|
GstCaps * caps, GValueArray * factories)
|
|
|
|
{
|
2011-02-18 11:01:05 +00:00
|
|
|
return NULL;
|
gst/playback/Makefile.am: Group decodebin2 and uridecodebin into the same plugin so that they can share the GEnumType.
Original commit message from CVS:
* gst/playback/Makefile.am:
Group decodebin2 and uridecodebin into the same plugin so that they
can share the GEnumType.
* gst/playback/gstdecodebin2.c: (_gst_array_accumulator),
(_gst_select_accumulator), (gst_decode_bin_class_init),
(gst_decode_bin_init), (gst_decode_bin_autoplug_sort),
(gst_decode_bin_autoplug_select), (gst_decode_bin_autoplug_add),
(analyze_new_pad), (connect_pad), (gst_decode_bin_plugin_init):
Add signal to sort factories instead of the more awkward autoplug-select
signal.
Modify autoplug_select so that we can try, skip or expose the
autopluggin of an element on a pad.
* gst/playback/gstfactorylists.c: (compare_ranks),
(decoders_filter), (sinks_filter), (gst_factory_list_is_type),
(element_filter), (gst_factory_list_get_elements),
(gst_factory_list_debug), (gst_factory_list_filter):
* gst/playback/gstfactorylists.h:
Simplify the API, allow getting elements based on mask.
* gst/playback/gstplay-marshal.list:
Add some more marshallers.
* gst/playback/gstplaybin2.c: (init_group), (gst_play_bin_init),
(gst_play_bin_finalize), (pad_removed_cb), (autoplug_factories_cb),
(autoplug_select_cb), (activate_group):
Add support for managing non-raw sinks by providing a custom element and
sink list to decodebin2.
Try to plug non-raw sinks when decodebin2 using autoplug-select of
decodebin2.
* gst/playback/gstplaysink.c: (gen_video_chain), (gen_audio_chain),
(gst_play_sink_set_mode), (gst_play_sink_request_pad):
* gst/playback/gstplaysink.h:
Add support for raw and non-raw sinks.
Add support to force sinks selected by playbin2.
Don't plug raw converters for non-raw sinks.
* gst/playback/gsturidecodebin.c: (_gst_array_accumulator),
(_gst_select_accumulator), (gst_uri_decode_bin_class_init),
(proxy_autoplug_select_signal), (gst_uri_decode_bin_plugin_init),
(plugin_init):
Use right accumulators.
Proxy new signal.
2007-12-05 17:11:48 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
static GstAutoplugSelectResult
|
|
|
|
gst_decode_bin_autoplug_select (GstElement * element, GstPad * pad,
|
|
|
|
GstCaps * caps, GstElementFactory * factory)
|
|
|
|
{
|
|
|
|
GST_DEBUG_OBJECT (element, "default autoplug-select returns TRY");
|
|
|
|
|
|
|
|
/* Try factory. */
|
|
|
|
return GST_AUTOPLUG_SELECT_TRY;
|
2007-10-24 11:07:57 +00:00
|
|
|
}
|
gst/playback/: New decodebin2 element.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstdecodebin2.c: (gst_decode_bin_get_type),
(_gst_boolean_accumulator), (gst_decode_bin_class_init),
(gst_decode_bin_factory_filter), (compare_ranks), (print_feature),
(gst_decode_bin_init), (gst_decode_bin_dispose),
(gst_decode_bin_finalize), (gst_decode_bin_set_property),
(gst_decode_bin_get_property), (gst_decode_bin_set_caps),
(gst_decode_bin_get_caps), (gst_decode_bin_autoplug_continue),
(gst_decode_bin_autoplug_sort), (analyze_new_pad), (connect_pad),
(connect_element), (expose_pad), (type_found),
(pad_added_group_cb), (pad_removed_group_cb),
(no_more_pads_group_cb), (pad_added_cb), (pad_removed_cb),
(no_more_pads_cb), (find_compatibles), (is_demuxer_element),
(are_raw_caps), (multi_queue_overrun_cb),
(multi_queue_underrun_cb), (gst_decode_group_new),
(get_current_group), (group_demuxer_event_probe),
(gst_decode_group_control_demuxer_pad),
(gst_decode_group_control_source_pad),
(gst_decode_group_check_if_blocked),
(gst_decode_group_check_if_drained), (gst_decode_group_expose),
(gst_decode_group_hide), (gst_decode_group_free),
(gst_decode_group_set_complete), (source_pad_blocked_cb),
(source_pad_event_probe), (gst_decode_pad_new), (add_fakesink),
(remove_fakesink), (find_sink_pad), (gst_decode_bin_change_state),
(plugin_init):
New decodebin2 element.
Closes #370092
* gst/playback/gstplay-marshal.list:
Added marshallers for new signals in decodebin2
* gst/playback/gstplaybasebin.c: (setup_subtitle), (make_decoder):
Use decodebin2 if *and only if* the USE_DECODEBIN2 environment variable
is set.
2006-11-28 14:40:39 +00:00
|
|
|
|
2013-03-29 17:27:03 +00:00
|
|
|
static gboolean
|
|
|
|
gst_decode_bin_autoplug_query (GstElement * element, GstPad * pad,
|
|
|
|
GstQuery * query)
|
|
|
|
{
|
|
|
|
/* No query handled here */
|
|
|
|
return FALSE;
|
|
|
|
}
|
|
|
|
|
gst/playback/: New decodebin2 element.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstdecodebin2.c: (gst_decode_bin_get_type),
(_gst_boolean_accumulator), (gst_decode_bin_class_init),
(gst_decode_bin_factory_filter), (compare_ranks), (print_feature),
(gst_decode_bin_init), (gst_decode_bin_dispose),
(gst_decode_bin_finalize), (gst_decode_bin_set_property),
(gst_decode_bin_get_property), (gst_decode_bin_set_caps),
(gst_decode_bin_get_caps), (gst_decode_bin_autoplug_continue),
(gst_decode_bin_autoplug_sort), (analyze_new_pad), (connect_pad),
(connect_element), (expose_pad), (type_found),
(pad_added_group_cb), (pad_removed_group_cb),
(no_more_pads_group_cb), (pad_added_cb), (pad_removed_cb),
(no_more_pads_cb), (find_compatibles), (is_demuxer_element),
(are_raw_caps), (multi_queue_overrun_cb),
(multi_queue_underrun_cb), (gst_decode_group_new),
(get_current_group), (group_demuxer_event_probe),
(gst_decode_group_control_demuxer_pad),
(gst_decode_group_control_source_pad),
(gst_decode_group_check_if_blocked),
(gst_decode_group_check_if_drained), (gst_decode_group_expose),
(gst_decode_group_hide), (gst_decode_group_free),
(gst_decode_group_set_complete), (source_pad_blocked_cb),
(source_pad_event_probe), (gst_decode_pad_new), (add_fakesink),
(remove_fakesink), (find_sink_pad), (gst_decode_bin_change_state),
(plugin_init):
New decodebin2 element.
Closes #370092
* gst/playback/gstplay-marshal.list:
Added marshallers for new signals in decodebin2
* gst/playback/gstplaybasebin.c: (setup_subtitle), (make_decoder):
Use decodebin2 if *and only if* the USE_DECODEBIN2 environment variable
is set.
2006-11-28 14:40:39 +00:00
|
|
|
/********
|
|
|
|
* Discovery methods
|
|
|
|
*****/
|
|
|
|
|
2010-05-06 15:47:12 +00:00
|
|
|
static gboolean are_final_caps (GstDecodeBin * dbin, GstCaps * caps);
|
gst/playback/: New decodebin2 element.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstdecodebin2.c: (gst_decode_bin_get_type),
(_gst_boolean_accumulator), (gst_decode_bin_class_init),
(gst_decode_bin_factory_filter), (compare_ranks), (print_feature),
(gst_decode_bin_init), (gst_decode_bin_dispose),
(gst_decode_bin_finalize), (gst_decode_bin_set_property),
(gst_decode_bin_get_property), (gst_decode_bin_set_caps),
(gst_decode_bin_get_caps), (gst_decode_bin_autoplug_continue),
(gst_decode_bin_autoplug_sort), (analyze_new_pad), (connect_pad),
(connect_element), (expose_pad), (type_found),
(pad_added_group_cb), (pad_removed_group_cb),
(no_more_pads_group_cb), (pad_added_cb), (pad_removed_cb),
(no_more_pads_cb), (find_compatibles), (is_demuxer_element),
(are_raw_caps), (multi_queue_overrun_cb),
(multi_queue_underrun_cb), (gst_decode_group_new),
(get_current_group), (group_demuxer_event_probe),
(gst_decode_group_control_demuxer_pad),
(gst_decode_group_control_source_pad),
(gst_decode_group_check_if_blocked),
(gst_decode_group_check_if_drained), (gst_decode_group_expose),
(gst_decode_group_hide), (gst_decode_group_free),
(gst_decode_group_set_complete), (source_pad_blocked_cb),
(source_pad_event_probe), (gst_decode_pad_new), (add_fakesink),
(remove_fakesink), (find_sink_pad), (gst_decode_bin_change_state),
(plugin_init):
New decodebin2 element.
Closes #370092
* gst/playback/gstplay-marshal.list:
Added marshallers for new signals in decodebin2
* gst/playback/gstplaybasebin.c: (setup_subtitle), (make_decoder):
Use decodebin2 if *and only if* the USE_DECODEBIN2 environment variable
is set.
2006-11-28 14:40:39 +00:00
|
|
|
static gboolean is_demuxer_element (GstElement * srcelement);
|
2014-02-20 14:02:09 +00:00
|
|
|
static gboolean is_adaptive_demuxer_element (GstElement * srcelement);
|
gst/playback/: New decodebin2 element.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstdecodebin2.c: (gst_decode_bin_get_type),
(_gst_boolean_accumulator), (gst_decode_bin_class_init),
(gst_decode_bin_factory_filter), (compare_ranks), (print_feature),
(gst_decode_bin_init), (gst_decode_bin_dispose),
(gst_decode_bin_finalize), (gst_decode_bin_set_property),
(gst_decode_bin_get_property), (gst_decode_bin_set_caps),
(gst_decode_bin_get_caps), (gst_decode_bin_autoplug_continue),
(gst_decode_bin_autoplug_sort), (analyze_new_pad), (connect_pad),
(connect_element), (expose_pad), (type_found),
(pad_added_group_cb), (pad_removed_group_cb),
(no_more_pads_group_cb), (pad_added_cb), (pad_removed_cb),
(no_more_pads_cb), (find_compatibles), (is_demuxer_element),
(are_raw_caps), (multi_queue_overrun_cb),
(multi_queue_underrun_cb), (gst_decode_group_new),
(get_current_group), (group_demuxer_event_probe),
(gst_decode_group_control_demuxer_pad),
(gst_decode_group_control_source_pad),
(gst_decode_group_check_if_blocked),
(gst_decode_group_check_if_drained), (gst_decode_group_expose),
(gst_decode_group_hide), (gst_decode_group_free),
(gst_decode_group_set_complete), (source_pad_blocked_cb),
(source_pad_event_probe), (gst_decode_pad_new), (add_fakesink),
(remove_fakesink), (find_sink_pad), (gst_decode_bin_change_state),
(plugin_init):
New decodebin2 element.
Closes #370092
* gst/playback/gstplay-marshal.list:
Added marshallers for new signals in decodebin2
* gst/playback/gstplaybasebin.c: (setup_subtitle), (make_decoder):
Use decodebin2 if *and only if* the USE_DECODEBIN2 environment variable
is set.
2006-11-28 14:40:39 +00:00
|
|
|
|
|
|
|
static gboolean connect_pad (GstDecodeBin * dbin, GstElement * src,
|
gst/playback/gstdecodebin2.c (struct _GstDecodePad): Change to be a subclass of GstGhostPad.
Original commit message from CVS:
2008-10-08 Andy Wingo <wingo@pobox.com>
* gst/playback/gstdecodebin2.c (struct _GstDecodePad): Change to
be a subclass of GstGhostPad.
(analyze_new_pad): So, when emitting the signals that determine
how we do autoplugging, already create the ghost pad and use it as
the pad in the signal arguments. This allows applications to make
a connection between the pad passed in e.g. autoplug-continue, and
the pad passed in new-decoded-pad.
(connect_pad, expose_pad): Update to receive the ghosted decode
pad in the args, retargetting it as necessary if we have to plug
the target pad through a multiqueue.
(gst_decode_group_control_source_pad): Adapt to receive an
already-ghosted pad that just needs activation, blocking, and
drain notification.
(sort_end_pads): Adapt for decode pads actually being pads.
(gst_decode_group_expose): Adapt for decode pads actually being
pads. Rewrite the decode pad names so they appear in order. Adds a
new error case if we couldn't set the name.
(gst_decode_group_free, gst_decode_group_hide): Adapt cleanup
logic.
(gst_decode_pad_set_blocked, gst_decode_pad_add_drained_check):
New API for the decode pad, needed because we shouldn't do these
things inside gst_decode_pad_new(), but after.
(gst_decode_pad_new): Change to actually make the real pad, and
delay the blocking/drainage bits.
2008-10-08 12:49:40 +00:00
|
|
|
GstDecodePad * dpad, GstPad * pad, GstCaps * caps, GValueArray * factories,
|
2014-08-25 17:59:40 +00:00
|
|
|
GstDecodeChain * chain, gchar ** deadend_details);
|
2014-07-10 14:24:36 +00:00
|
|
|
static GList *connect_element (GstDecodeBin * dbin, GstDecodeElement * delem,
|
2009-09-26 10:17:49 +00:00
|
|
|
GstDecodeChain * chain);
|
gst/playback/gstdecodebin2.c (struct _GstDecodePad): Change to be a subclass of GstGhostPad.
Original commit message from CVS:
2008-10-08 Andy Wingo <wingo@pobox.com>
* gst/playback/gstdecodebin2.c (struct _GstDecodePad): Change to
be a subclass of GstGhostPad.
(analyze_new_pad): So, when emitting the signals that determine
how we do autoplugging, already create the ghost pad and use it as
the pad in the signal arguments. This allows applications to make
a connection between the pad passed in e.g. autoplug-continue, and
the pad passed in new-decoded-pad.
(connect_pad, expose_pad): Update to receive the ghosted decode
pad in the args, retargetting it as necessary if we have to plug
the target pad through a multiqueue.
(gst_decode_group_control_source_pad): Adapt to receive an
already-ghosted pad that just needs activation, blocking, and
drain notification.
(sort_end_pads): Adapt for decode pads actually being pads.
(gst_decode_group_expose): Adapt for decode pads actually being
pads. Rewrite the decode pad names so they appear in order. Adds a
new error case if we couldn't set the name.
(gst_decode_group_free, gst_decode_group_hide): Adapt cleanup
logic.
(gst_decode_pad_set_blocked, gst_decode_pad_add_drained_check):
New API for the decode pad, needed because we shouldn't do these
things inside gst_decode_pad_new(), but after.
(gst_decode_pad_new): Change to actually make the real pad, and
delay the blocking/drainage bits.
2008-10-08 12:49:40 +00:00
|
|
|
static void expose_pad (GstDecodeBin * dbin, GstElement * src,
|
2016-03-12 17:47:47 +00:00
|
|
|
GstDecodePad * dpad, GstPad * pad, GstCaps * caps, GstDecodeChain * chain);
|
gst/playback/: New decodebin2 element.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstdecodebin2.c: (gst_decode_bin_get_type),
(_gst_boolean_accumulator), (gst_decode_bin_class_init),
(gst_decode_bin_factory_filter), (compare_ranks), (print_feature),
(gst_decode_bin_init), (gst_decode_bin_dispose),
(gst_decode_bin_finalize), (gst_decode_bin_set_property),
(gst_decode_bin_get_property), (gst_decode_bin_set_caps),
(gst_decode_bin_get_caps), (gst_decode_bin_autoplug_continue),
(gst_decode_bin_autoplug_sort), (analyze_new_pad), (connect_pad),
(connect_element), (expose_pad), (type_found),
(pad_added_group_cb), (pad_removed_group_cb),
(no_more_pads_group_cb), (pad_added_cb), (pad_removed_cb),
(no_more_pads_cb), (find_compatibles), (is_demuxer_element),
(are_raw_caps), (multi_queue_overrun_cb),
(multi_queue_underrun_cb), (gst_decode_group_new),
(get_current_group), (group_demuxer_event_probe),
(gst_decode_group_control_demuxer_pad),
(gst_decode_group_control_source_pad),
(gst_decode_group_check_if_blocked),
(gst_decode_group_check_if_drained), (gst_decode_group_expose),
(gst_decode_group_hide), (gst_decode_group_free),
(gst_decode_group_set_complete), (source_pad_blocked_cb),
(source_pad_event_probe), (gst_decode_pad_new), (add_fakesink),
(remove_fakesink), (find_sink_pad), (gst_decode_bin_change_state),
(plugin_init):
New decodebin2 element.
Closes #370092
* gst/playback/gstplay-marshal.list:
Added marshallers for new signals in decodebin2
* gst/playback/gstplaybasebin.c: (setup_subtitle), (make_decoder):
Use decodebin2 if *and only if* the USE_DECODEBIN2 environment variable
is set.
2006-11-28 14:40:39 +00:00
|
|
|
|
|
|
|
static void pad_added_cb (GstElement * element, GstPad * pad,
|
2009-09-26 10:17:49 +00:00
|
|
|
GstDecodeChain * chain);
|
gst/playback/: New decodebin2 element.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstdecodebin2.c: (gst_decode_bin_get_type),
(_gst_boolean_accumulator), (gst_decode_bin_class_init),
(gst_decode_bin_factory_filter), (compare_ranks), (print_feature),
(gst_decode_bin_init), (gst_decode_bin_dispose),
(gst_decode_bin_finalize), (gst_decode_bin_set_property),
(gst_decode_bin_get_property), (gst_decode_bin_set_caps),
(gst_decode_bin_get_caps), (gst_decode_bin_autoplug_continue),
(gst_decode_bin_autoplug_sort), (analyze_new_pad), (connect_pad),
(connect_element), (expose_pad), (type_found),
(pad_added_group_cb), (pad_removed_group_cb),
(no_more_pads_group_cb), (pad_added_cb), (pad_removed_cb),
(no_more_pads_cb), (find_compatibles), (is_demuxer_element),
(are_raw_caps), (multi_queue_overrun_cb),
(multi_queue_underrun_cb), (gst_decode_group_new),
(get_current_group), (group_demuxer_event_probe),
(gst_decode_group_control_demuxer_pad),
(gst_decode_group_control_source_pad),
(gst_decode_group_check_if_blocked),
(gst_decode_group_check_if_drained), (gst_decode_group_expose),
(gst_decode_group_hide), (gst_decode_group_free),
(gst_decode_group_set_complete), (source_pad_blocked_cb),
(source_pad_event_probe), (gst_decode_pad_new), (add_fakesink),
(remove_fakesink), (find_sink_pad), (gst_decode_bin_change_state),
(plugin_init):
New decodebin2 element.
Closes #370092
* gst/playback/gstplay-marshal.list:
Added marshallers for new signals in decodebin2
* gst/playback/gstplaybasebin.c: (setup_subtitle), (make_decoder):
Use decodebin2 if *and only if* the USE_DECODEBIN2 environment variable
is set.
2006-11-28 14:40:39 +00:00
|
|
|
static void pad_removed_cb (GstElement * element, GstPad * pad,
|
2009-09-26 10:17:49 +00:00
|
|
|
GstDecodeChain * chain);
|
|
|
|
static void no_more_pads_cb (GstElement * element, GstDecodeChain * chain);
|
gst/playback/: New decodebin2 element.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstdecodebin2.c: (gst_decode_bin_get_type),
(_gst_boolean_accumulator), (gst_decode_bin_class_init),
(gst_decode_bin_factory_filter), (compare_ranks), (print_feature),
(gst_decode_bin_init), (gst_decode_bin_dispose),
(gst_decode_bin_finalize), (gst_decode_bin_set_property),
(gst_decode_bin_get_property), (gst_decode_bin_set_caps),
(gst_decode_bin_get_caps), (gst_decode_bin_autoplug_continue),
(gst_decode_bin_autoplug_sort), (analyze_new_pad), (connect_pad),
(connect_element), (expose_pad), (type_found),
(pad_added_group_cb), (pad_removed_group_cb),
(no_more_pads_group_cb), (pad_added_cb), (pad_removed_cb),
(no_more_pads_cb), (find_compatibles), (is_demuxer_element),
(are_raw_caps), (multi_queue_overrun_cb),
(multi_queue_underrun_cb), (gst_decode_group_new),
(get_current_group), (group_demuxer_event_probe),
(gst_decode_group_control_demuxer_pad),
(gst_decode_group_control_source_pad),
(gst_decode_group_check_if_blocked),
(gst_decode_group_check_if_drained), (gst_decode_group_expose),
(gst_decode_group_hide), (gst_decode_group_free),
(gst_decode_group_set_complete), (source_pad_blocked_cb),
(source_pad_event_probe), (gst_decode_pad_new), (add_fakesink),
(remove_fakesink), (find_sink_pad), (gst_decode_bin_change_state),
(plugin_init):
New decodebin2 element.
Closes #370092
* gst/playback/gstplay-marshal.list:
Added marshallers for new signals in decodebin2
* gst/playback/gstplaybasebin.c: (setup_subtitle), (make_decoder):
Use decodebin2 if *and only if* the USE_DECODEBIN2 environment variable
is set.
2006-11-28 14:40:39 +00:00
|
|
|
|
2009-09-26 10:17:49 +00:00
|
|
|
static GstDecodeGroup *gst_decode_chain_get_current_group (GstDecodeChain *
|
|
|
|
chain);
|
gst/playback/: New decodebin2 element.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstdecodebin2.c: (gst_decode_bin_get_type),
(_gst_boolean_accumulator), (gst_decode_bin_class_init),
(gst_decode_bin_factory_filter), (compare_ranks), (print_feature),
(gst_decode_bin_init), (gst_decode_bin_dispose),
(gst_decode_bin_finalize), (gst_decode_bin_set_property),
(gst_decode_bin_get_property), (gst_decode_bin_set_caps),
(gst_decode_bin_get_caps), (gst_decode_bin_autoplug_continue),
(gst_decode_bin_autoplug_sort), (analyze_new_pad), (connect_pad),
(connect_element), (expose_pad), (type_found),
(pad_added_group_cb), (pad_removed_group_cb),
(no_more_pads_group_cb), (pad_added_cb), (pad_removed_cb),
(no_more_pads_cb), (find_compatibles), (is_demuxer_element),
(are_raw_caps), (multi_queue_overrun_cb),
(multi_queue_underrun_cb), (gst_decode_group_new),
(get_current_group), (group_demuxer_event_probe),
(gst_decode_group_control_demuxer_pad),
(gst_decode_group_control_source_pad),
(gst_decode_group_check_if_blocked),
(gst_decode_group_check_if_drained), (gst_decode_group_expose),
(gst_decode_group_hide), (gst_decode_group_free),
(gst_decode_group_set_complete), (source_pad_blocked_cb),
(source_pad_event_probe), (gst_decode_pad_new), (add_fakesink),
(remove_fakesink), (find_sink_pad), (gst_decode_bin_change_state),
(plugin_init):
New decodebin2 element.
Closes #370092
* gst/playback/gstplay-marshal.list:
Added marshallers for new signals in decodebin2
* gst/playback/gstplaybasebin.c: (setup_subtitle), (make_decoder):
Use decodebin2 if *and only if* the USE_DECODEBIN2 environment variable
is set.
2006-11-28 14:40:39 +00:00
|
|
|
|
2013-11-29 16:26:13 +00:00
|
|
|
static gboolean
|
|
|
|
clear_sticky_events (GstPad * pad, GstEvent ** event, gpointer user_data)
|
|
|
|
{
|
|
|
|
GST_DEBUG_OBJECT (pad, "clearing sticky event %" GST_PTR_FORMAT, *event);
|
|
|
|
gst_event_unref (*event);
|
|
|
|
*event = NULL;
|
|
|
|
return TRUE;
|
|
|
|
}
|
|
|
|
|
|
|
|
static gboolean
|
|
|
|
copy_sticky_events (GstPad * pad, GstEvent ** event, gpointer user_data)
|
|
|
|
{
|
|
|
|
GstPad *gpad = GST_PAD_CAST (user_data);
|
|
|
|
|
|
|
|
GST_DEBUG_OBJECT (gpad, "store sticky event %" GST_PTR_FORMAT, *event);
|
|
|
|
gst_pad_store_sticky_event (gpad, *event);
|
|
|
|
|
|
|
|
return TRUE;
|
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
|
|
|
decode_pad_set_target (GstDecodePad * dpad, GstPad * target)
|
|
|
|
{
|
|
|
|
gst_ghost_pad_set_target (GST_GHOST_PAD_CAST (dpad), target);
|
|
|
|
if (target == NULL)
|
|
|
|
gst_pad_sticky_events_foreach (GST_PAD_CAST (dpad), clear_sticky_events,
|
|
|
|
NULL);
|
|
|
|
else
|
|
|
|
gst_pad_sticky_events_foreach (target, copy_sticky_events, dpad);
|
|
|
|
}
|
|
|
|
|
2007-11-09 12:21:52 +00:00
|
|
|
/* called when a new pad is discovered. It will perform some basic actions
|
|
|
|
* before trying to link something to it.
|
|
|
|
*
|
|
|
|
* - Check the caps, don't do anything when there are no caps or when they have
|
|
|
|
* no good type.
|
|
|
|
* - signal AUTOPLUG_CONTINUE to check if we need to continue autoplugging this
|
|
|
|
* pad.
|
|
|
|
* - if the caps are non-fixed, setup a handler to continue autoplugging when
|
|
|
|
* the caps become fixed (connect to notify::caps).
|
|
|
|
* - get list of factories to autoplug.
|
|
|
|
* - continue autoplugging to one of the factories.
|
|
|
|
*/
|
2015-10-15 16:40:43 +00:00
|
|
|
/* returns whether to expose the pad */
|
|
|
|
static gboolean
|
gst/playback/: New decodebin2 element.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstdecodebin2.c: (gst_decode_bin_get_type),
(_gst_boolean_accumulator), (gst_decode_bin_class_init),
(gst_decode_bin_factory_filter), (compare_ranks), (print_feature),
(gst_decode_bin_init), (gst_decode_bin_dispose),
(gst_decode_bin_finalize), (gst_decode_bin_set_property),
(gst_decode_bin_get_property), (gst_decode_bin_set_caps),
(gst_decode_bin_get_caps), (gst_decode_bin_autoplug_continue),
(gst_decode_bin_autoplug_sort), (analyze_new_pad), (connect_pad),
(connect_element), (expose_pad), (type_found),
(pad_added_group_cb), (pad_removed_group_cb),
(no_more_pads_group_cb), (pad_added_cb), (pad_removed_cb),
(no_more_pads_cb), (find_compatibles), (is_demuxer_element),
(are_raw_caps), (multi_queue_overrun_cb),
(multi_queue_underrun_cb), (gst_decode_group_new),
(get_current_group), (group_demuxer_event_probe),
(gst_decode_group_control_demuxer_pad),
(gst_decode_group_control_source_pad),
(gst_decode_group_check_if_blocked),
(gst_decode_group_check_if_drained), (gst_decode_group_expose),
(gst_decode_group_hide), (gst_decode_group_free),
(gst_decode_group_set_complete), (source_pad_blocked_cb),
(source_pad_event_probe), (gst_decode_pad_new), (add_fakesink),
(remove_fakesink), (find_sink_pad), (gst_decode_bin_change_state),
(plugin_init):
New decodebin2 element.
Closes #370092
* gst/playback/gstplay-marshal.list:
Added marshallers for new signals in decodebin2
* gst/playback/gstplaybasebin.c: (setup_subtitle), (make_decoder):
Use decodebin2 if *and only if* the USE_DECODEBIN2 environment variable
is set.
2006-11-28 14:40:39 +00:00
|
|
|
analyze_new_pad (GstDecodeBin * dbin, GstElement * src, GstPad * pad,
|
2015-10-19 16:52:24 +00:00
|
|
|
GstCaps * caps, GstDecodeChain * chain, GstDecodeChain ** new_chain)
|
gst/playback/: New decodebin2 element.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstdecodebin2.c: (gst_decode_bin_get_type),
(_gst_boolean_accumulator), (gst_decode_bin_class_init),
(gst_decode_bin_factory_filter), (compare_ranks), (print_feature),
(gst_decode_bin_init), (gst_decode_bin_dispose),
(gst_decode_bin_finalize), (gst_decode_bin_set_property),
(gst_decode_bin_get_property), (gst_decode_bin_set_caps),
(gst_decode_bin_get_caps), (gst_decode_bin_autoplug_continue),
(gst_decode_bin_autoplug_sort), (analyze_new_pad), (connect_pad),
(connect_element), (expose_pad), (type_found),
(pad_added_group_cb), (pad_removed_group_cb),
(no_more_pads_group_cb), (pad_added_cb), (pad_removed_cb),
(no_more_pads_cb), (find_compatibles), (is_demuxer_element),
(are_raw_caps), (multi_queue_overrun_cb),
(multi_queue_underrun_cb), (gst_decode_group_new),
(get_current_group), (group_demuxer_event_probe),
(gst_decode_group_control_demuxer_pad),
(gst_decode_group_control_source_pad),
(gst_decode_group_check_if_blocked),
(gst_decode_group_check_if_drained), (gst_decode_group_expose),
(gst_decode_group_hide), (gst_decode_group_free),
(gst_decode_group_set_complete), (source_pad_blocked_cb),
(source_pad_event_probe), (gst_decode_pad_new), (add_fakesink),
(remove_fakesink), (find_sink_pad), (gst_decode_bin_change_state),
(plugin_init):
New decodebin2 element.
Closes #370092
* gst/playback/gstplay-marshal.list:
Added marshallers for new signals in decodebin2
* gst/playback/gstplaybasebin.c: (setup_subtitle), (make_decoder):
Use decodebin2 if *and only if* the USE_DECODEBIN2 environment variable
is set.
2006-11-28 14:40:39 +00:00
|
|
|
{
|
|
|
|
gboolean apcontinue = TRUE;
|
gst/playback/Makefile.am: Group decodebin2 and uridecodebin into the same plugin so that they can share the GEnumType.
Original commit message from CVS:
* gst/playback/Makefile.am:
Group decodebin2 and uridecodebin into the same plugin so that they
can share the GEnumType.
* gst/playback/gstdecodebin2.c: (_gst_array_accumulator),
(_gst_select_accumulator), (gst_decode_bin_class_init),
(gst_decode_bin_init), (gst_decode_bin_autoplug_sort),
(gst_decode_bin_autoplug_select), (gst_decode_bin_autoplug_add),
(analyze_new_pad), (connect_pad), (gst_decode_bin_plugin_init):
Add signal to sort factories instead of the more awkward autoplug-select
signal.
Modify autoplug_select so that we can try, skip or expose the
autopluggin of an element on a pad.
* gst/playback/gstfactorylists.c: (compare_ranks),
(decoders_filter), (sinks_filter), (gst_factory_list_is_type),
(element_filter), (gst_factory_list_get_elements),
(gst_factory_list_debug), (gst_factory_list_filter):
* gst/playback/gstfactorylists.h:
Simplify the API, allow getting elements based on mask.
* gst/playback/gstplay-marshal.list:
Add some more marshallers.
* gst/playback/gstplaybin2.c: (init_group), (gst_play_bin_init),
(gst_play_bin_finalize), (pad_removed_cb), (autoplug_factories_cb),
(autoplug_select_cb), (activate_group):
Add support for managing non-raw sinks by providing a custom element and
sink list to decodebin2.
Try to plug non-raw sinks when decodebin2 using autoplug-select of
decodebin2.
* gst/playback/gstplaysink.c: (gen_video_chain), (gen_audio_chain),
(gst_play_sink_set_mode), (gst_play_sink_request_pad):
* gst/playback/gstplaysink.h:
Add support for raw and non-raw sinks.
Add support to force sinks selected by playbin2.
Don't plug raw converters for non-raw sinks.
* gst/playback/gsturidecodebin.c: (_gst_array_accumulator),
(_gst_select_accumulator), (gst_uri_decode_bin_class_init),
(proxy_autoplug_select_signal), (gst_uri_decode_bin_plugin_init),
(plugin_init):
Use right accumulators.
Proxy new signal.
2007-12-05 17:11:48 +00:00
|
|
|
GValueArray *factories = NULL, *result = NULL;
|
gst/playback/gstdecodebin2.c (struct _GstDecodePad): Change to be a subclass of GstGhostPad.
Original commit message from CVS:
2008-10-08 Andy Wingo <wingo@pobox.com>
* gst/playback/gstdecodebin2.c (struct _GstDecodePad): Change to
be a subclass of GstGhostPad.
(analyze_new_pad): So, when emitting the signals that determine
how we do autoplugging, already create the ghost pad and use it as
the pad in the signal arguments. This allows applications to make
a connection between the pad passed in e.g. autoplug-continue, and
the pad passed in new-decoded-pad.
(connect_pad, expose_pad): Update to receive the ghosted decode
pad in the args, retargetting it as necessary if we have to plug
the target pad through a multiqueue.
(gst_decode_group_control_source_pad): Adapt to receive an
already-ghosted pad that just needs activation, blocking, and
drain notification.
(sort_end_pads): Adapt for decode pads actually being pads.
(gst_decode_group_expose): Adapt for decode pads actually being
pads. Rewrite the decode pad names so they appear in order. Adds a
new error case if we couldn't set the name.
(gst_decode_group_free, gst_decode_group_hide): Adapt cleanup
logic.
(gst_decode_pad_set_blocked, gst_decode_pad_add_drained_check):
New API for the decode pad, needed because we shouldn't do these
things inside gst_decode_pad_new(), but after.
(gst_decode_pad_new): Change to actually make the real pad, and
delay the blocking/drainage bits.
2008-10-08 12:49:40 +00:00
|
|
|
GstDecodePad *dpad;
|
2011-06-26 13:40:17 +00:00
|
|
|
GstElementFactory *factory;
|
|
|
|
const gchar *classification;
|
2011-09-07 14:43:36 +00:00
|
|
|
gboolean is_parser_converter = FALSE;
|
2011-09-19 09:53:02 +00:00
|
|
|
gboolean res;
|
2014-08-25 17:59:40 +00:00
|
|
|
gchar *deadend_details = NULL;
|
gst/playback/: New decodebin2 element.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstdecodebin2.c: (gst_decode_bin_get_type),
(_gst_boolean_accumulator), (gst_decode_bin_class_init),
(gst_decode_bin_factory_filter), (compare_ranks), (print_feature),
(gst_decode_bin_init), (gst_decode_bin_dispose),
(gst_decode_bin_finalize), (gst_decode_bin_set_property),
(gst_decode_bin_get_property), (gst_decode_bin_set_caps),
(gst_decode_bin_get_caps), (gst_decode_bin_autoplug_continue),
(gst_decode_bin_autoplug_sort), (analyze_new_pad), (connect_pad),
(connect_element), (expose_pad), (type_found),
(pad_added_group_cb), (pad_removed_group_cb),
(no_more_pads_group_cb), (pad_added_cb), (pad_removed_cb),
(no_more_pads_cb), (find_compatibles), (is_demuxer_element),
(are_raw_caps), (multi_queue_overrun_cb),
(multi_queue_underrun_cb), (gst_decode_group_new),
(get_current_group), (group_demuxer_event_probe),
(gst_decode_group_control_demuxer_pad),
(gst_decode_group_control_source_pad),
(gst_decode_group_check_if_blocked),
(gst_decode_group_check_if_drained), (gst_decode_group_expose),
(gst_decode_group_hide), (gst_decode_group_free),
(gst_decode_group_set_complete), (source_pad_blocked_cb),
(source_pad_event_probe), (gst_decode_pad_new), (add_fakesink),
(remove_fakesink), (find_sink_pad), (gst_decode_bin_change_state),
(plugin_init):
New decodebin2 element.
Closes #370092
* gst/playback/gstplay-marshal.list:
Added marshallers for new signals in decodebin2
* gst/playback/gstplaybasebin.c: (setup_subtitle), (make_decoder):
Use decodebin2 if *and only if* the USE_DECODEBIN2 environment variable
is set.
2006-11-28 14:40:39 +00:00
|
|
|
|
|
|
|
GST_DEBUG_OBJECT (dbin, "Pad %s:%s caps:%" GST_PTR_FORMAT,
|
|
|
|
GST_DEBUG_PAD_NAME (pad), caps);
|
|
|
|
|
2015-10-19 16:52:24 +00:00
|
|
|
if (new_chain)
|
|
|
|
*new_chain = chain;
|
|
|
|
|
2011-06-26 13:40:17 +00:00
|
|
|
if (chain->elements
|
2011-09-07 14:43:36 +00:00
|
|
|
&& src != ((GstDecodeElement *) chain->elements->data)->element
|
|
|
|
&& src != ((GstDecodeElement *) chain->elements->data)->capsfilter) {
|
2009-09-26 10:17:49 +00:00
|
|
|
GST_ERROR_OBJECT (dbin, "New pad from not the last element in this chain");
|
2015-10-15 16:40:43 +00:00
|
|
|
return FALSE;
|
2009-09-26 10:17:49 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
if (chain->endpad) {
|
|
|
|
GST_ERROR_OBJECT (dbin, "New pad in a chain that is already complete");
|
2015-10-15 16:40:43 +00:00
|
|
|
return FALSE;
|
2009-09-26 10:17:49 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
if (chain->demuxer) {
|
|
|
|
GstDecodeGroup *group;
|
|
|
|
GstDecodeChain *oldchain = chain;
|
2014-02-21 08:53:09 +00:00
|
|
|
GstDecodeElement *demux = (chain->elements ? chain->elements->data : NULL);
|
2009-09-26 10:17:49 +00:00
|
|
|
|
2013-03-29 17:27:03 +00:00
|
|
|
if (chain->current_pad)
|
|
|
|
gst_object_unref (chain->current_pad);
|
|
|
|
chain->current_pad = NULL;
|
|
|
|
|
2011-01-25 16:03:23 +00:00
|
|
|
/* we are adding a new pad for a demuxer (see is_demuxer_element(),
|
|
|
|
* start a new chain for it */
|
2009-09-26 10:17:49 +00:00
|
|
|
CHAIN_MUTEX_LOCK (oldchain);
|
|
|
|
group = gst_decode_chain_get_current_group (chain);
|
2013-03-30 09:25:45 +00:00
|
|
|
if (group && !g_list_find (group->children, chain)) {
|
2015-10-19 16:52:24 +00:00
|
|
|
g_assert (new_chain != NULL);
|
|
|
|
*new_chain = chain = gst_decode_chain_new (dbin, group, pad);
|
2009-09-26 10:17:49 +00:00
|
|
|
group->children = g_list_prepend (group->children, chain);
|
|
|
|
}
|
|
|
|
CHAIN_MUTEX_UNLOCK (oldchain);
|
|
|
|
if (!group) {
|
|
|
|
GST_WARNING_OBJECT (dbin, "No current group");
|
2015-10-15 16:40:43 +00:00
|
|
|
return FALSE;
|
2009-09-26 10:17:49 +00:00
|
|
|
}
|
2014-02-21 08:53:09 +00:00
|
|
|
|
|
|
|
/* If this is not a dynamic pad demuxer, we're no-more-pads
|
|
|
|
* already before anything else happens
|
|
|
|
*/
|
2014-04-10 12:34:58 +00:00
|
|
|
if (demux == NULL || !demux->no_more_pads_id)
|
2014-02-21 08:53:09 +00:00
|
|
|
group->no_more_pads = TRUE;
|
2009-09-26 10:17:49 +00:00
|
|
|
}
|
|
|
|
|
2014-07-23 17:51:36 +00:00
|
|
|
/* From here on we own a reference to the caps as
|
|
|
|
* we might create new caps below and would need
|
|
|
|
* to unref them later */
|
|
|
|
if (caps)
|
|
|
|
gst_caps_ref (caps);
|
|
|
|
|
gst/playback/: New decodebin2 element.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstdecodebin2.c: (gst_decode_bin_get_type),
(_gst_boolean_accumulator), (gst_decode_bin_class_init),
(gst_decode_bin_factory_filter), (compare_ranks), (print_feature),
(gst_decode_bin_init), (gst_decode_bin_dispose),
(gst_decode_bin_finalize), (gst_decode_bin_set_property),
(gst_decode_bin_get_property), (gst_decode_bin_set_caps),
(gst_decode_bin_get_caps), (gst_decode_bin_autoplug_continue),
(gst_decode_bin_autoplug_sort), (analyze_new_pad), (connect_pad),
(connect_element), (expose_pad), (type_found),
(pad_added_group_cb), (pad_removed_group_cb),
(no_more_pads_group_cb), (pad_added_cb), (pad_removed_cb),
(no_more_pads_cb), (find_compatibles), (is_demuxer_element),
(are_raw_caps), (multi_queue_overrun_cb),
(multi_queue_underrun_cb), (gst_decode_group_new),
(get_current_group), (group_demuxer_event_probe),
(gst_decode_group_control_demuxer_pad),
(gst_decode_group_control_source_pad),
(gst_decode_group_check_if_blocked),
(gst_decode_group_check_if_drained), (gst_decode_group_expose),
(gst_decode_group_hide), (gst_decode_group_free),
(gst_decode_group_set_complete), (source_pad_blocked_cb),
(source_pad_event_probe), (gst_decode_pad_new), (add_fakesink),
(remove_fakesink), (find_sink_pad), (gst_decode_bin_change_state),
(plugin_init):
New decodebin2 element.
Closes #370092
* gst/playback/gstplay-marshal.list:
Added marshallers for new signals in decodebin2
* gst/playback/gstplaybasebin.c: (setup_subtitle), (make_decoder):
Use decodebin2 if *and only if* the USE_DECODEBIN2 environment variable
is set.
2006-11-28 14:40:39 +00:00
|
|
|
if ((caps == NULL) || gst_caps_is_empty (caps))
|
|
|
|
goto unknown_type;
|
|
|
|
|
|
|
|
if (gst_caps_is_any (caps))
|
|
|
|
goto any_caps;
|
|
|
|
|
2013-03-29 17:27:03 +00:00
|
|
|
if (!chain->current_pad)
|
|
|
|
chain->current_pad = gst_decode_pad_new (dbin, chain);
|
|
|
|
|
|
|
|
dpad = gst_object_ref (chain->current_pad);
|
2013-11-28 10:25:20 +00:00
|
|
|
gst_pad_set_active (GST_PAD_CAST (dpad), TRUE);
|
2013-11-29 16:26:13 +00:00
|
|
|
decode_pad_set_target (dpad, pad);
|
gst/playback/gstdecodebin2.c (struct _GstDecodePad): Change to be a subclass of GstGhostPad.
Original commit message from CVS:
2008-10-08 Andy Wingo <wingo@pobox.com>
* gst/playback/gstdecodebin2.c (struct _GstDecodePad): Change to
be a subclass of GstGhostPad.
(analyze_new_pad): So, when emitting the signals that determine
how we do autoplugging, already create the ghost pad and use it as
the pad in the signal arguments. This allows applications to make
a connection between the pad passed in e.g. autoplug-continue, and
the pad passed in new-decoded-pad.
(connect_pad, expose_pad): Update to receive the ghosted decode
pad in the args, retargetting it as necessary if we have to plug
the target pad through a multiqueue.
(gst_decode_group_control_source_pad): Adapt to receive an
already-ghosted pad that just needs activation, blocking, and
drain notification.
(sort_end_pads): Adapt for decode pads actually being pads.
(gst_decode_group_expose): Adapt for decode pads actually being
pads. Rewrite the decode pad names so they appear in order. Adds a
new error case if we couldn't set the name.
(gst_decode_group_free, gst_decode_group_hide): Adapt cleanup
logic.
(gst_decode_pad_set_blocked, gst_decode_pad_add_drained_check):
New API for the decode pad, needed because we shouldn't do these
things inside gst_decode_pad_new(), but after.
(gst_decode_pad_new): Change to actually make the real pad, and
delay the blocking/drainage bits.
2008-10-08 12:49:40 +00:00
|
|
|
|
2007-10-24 11:07:57 +00:00
|
|
|
/* 1. Emit 'autoplug-continue' the result will tell us if this pads needs
|
2011-09-20 12:03:47 +00:00
|
|
|
* further autoplugging. Only do this for fixed caps, for unfixed caps
|
|
|
|
* we will later come here again from the notify::caps handler. The
|
2014-10-12 21:03:20 +00:00
|
|
|
* problem with unfixed caps is that, we can't reliably tell if the output
|
2011-09-20 12:03:47 +00:00
|
|
|
* is e.g. accepted by a sink because only parts of the possible final
|
|
|
|
* caps might be accepted by the sink. */
|
|
|
|
if (gst_caps_is_fixed (caps))
|
|
|
|
g_signal_emit (G_OBJECT (dbin),
|
|
|
|
gst_decode_bin_signals[SIGNAL_AUTOPLUG_CONTINUE], 0, dpad, caps,
|
|
|
|
&apcontinue);
|
|
|
|
else
|
|
|
|
apcontinue = TRUE;
|
gst/playback/: New decodebin2 element.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstdecodebin2.c: (gst_decode_bin_get_type),
(_gst_boolean_accumulator), (gst_decode_bin_class_init),
(gst_decode_bin_factory_filter), (compare_ranks), (print_feature),
(gst_decode_bin_init), (gst_decode_bin_dispose),
(gst_decode_bin_finalize), (gst_decode_bin_set_property),
(gst_decode_bin_get_property), (gst_decode_bin_set_caps),
(gst_decode_bin_get_caps), (gst_decode_bin_autoplug_continue),
(gst_decode_bin_autoplug_sort), (analyze_new_pad), (connect_pad),
(connect_element), (expose_pad), (type_found),
(pad_added_group_cb), (pad_removed_group_cb),
(no_more_pads_group_cb), (pad_added_cb), (pad_removed_cb),
(no_more_pads_cb), (find_compatibles), (is_demuxer_element),
(are_raw_caps), (multi_queue_overrun_cb),
(multi_queue_underrun_cb), (gst_decode_group_new),
(get_current_group), (group_demuxer_event_probe),
(gst_decode_group_control_demuxer_pad),
(gst_decode_group_control_source_pad),
(gst_decode_group_check_if_blocked),
(gst_decode_group_check_if_drained), (gst_decode_group_expose),
(gst_decode_group_hide), (gst_decode_group_free),
(gst_decode_group_set_complete), (source_pad_blocked_cb),
(source_pad_event_probe), (gst_decode_pad_new), (add_fakesink),
(remove_fakesink), (find_sink_pad), (gst_decode_bin_change_state),
(plugin_init):
New decodebin2 element.
Closes #370092
* gst/playback/gstplay-marshal.list:
Added marshallers for new signals in decodebin2
* gst/playback/gstplaybasebin.c: (setup_subtitle), (make_decoder):
Use decodebin2 if *and only if* the USE_DECODEBIN2 environment variable
is set.
2006-11-28 14:40:39 +00:00
|
|
|
|
|
|
|
/* 1.a if autoplug-continue is FALSE or caps is a raw format, goto pad_is_final */
|
2010-05-06 15:47:12 +00:00
|
|
|
if ((!apcontinue) || are_final_caps (dbin, caps))
|
gst/playback/: New decodebin2 element.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstdecodebin2.c: (gst_decode_bin_get_type),
(_gst_boolean_accumulator), (gst_decode_bin_class_init),
(gst_decode_bin_factory_filter), (compare_ranks), (print_feature),
(gst_decode_bin_init), (gst_decode_bin_dispose),
(gst_decode_bin_finalize), (gst_decode_bin_set_property),
(gst_decode_bin_get_property), (gst_decode_bin_set_caps),
(gst_decode_bin_get_caps), (gst_decode_bin_autoplug_continue),
(gst_decode_bin_autoplug_sort), (analyze_new_pad), (connect_pad),
(connect_element), (expose_pad), (type_found),
(pad_added_group_cb), (pad_removed_group_cb),
(no_more_pads_group_cb), (pad_added_cb), (pad_removed_cb),
(no_more_pads_cb), (find_compatibles), (is_demuxer_element),
(are_raw_caps), (multi_queue_overrun_cb),
(multi_queue_underrun_cb), (gst_decode_group_new),
(get_current_group), (group_demuxer_event_probe),
(gst_decode_group_control_demuxer_pad),
(gst_decode_group_control_source_pad),
(gst_decode_group_check_if_blocked),
(gst_decode_group_check_if_drained), (gst_decode_group_expose),
(gst_decode_group_hide), (gst_decode_group_free),
(gst_decode_group_set_complete), (source_pad_blocked_cb),
(source_pad_event_probe), (gst_decode_pad_new), (add_fakesink),
(remove_fakesink), (find_sink_pad), (gst_decode_bin_change_state),
(plugin_init):
New decodebin2 element.
Closes #370092
* gst/playback/gstplay-marshal.list:
Added marshallers for new signals in decodebin2
* gst/playback/gstplaybasebin.c: (setup_subtitle), (make_decoder):
Use decodebin2 if *and only if* the USE_DECODEBIN2 environment variable
is set.
2006-11-28 14:40:39 +00:00
|
|
|
goto expose_pad;
|
|
|
|
|
2011-06-26 13:40:17 +00:00
|
|
|
/* 1.b For Parser/Converter that can output different stream formats
|
|
|
|
* we insert a capsfilter with the sorted caps of all possible next
|
|
|
|
* elements and continue with the capsfilter srcpad */
|
|
|
|
factory = gst_element_get_factory (src);
|
2012-09-15 16:57:09 +00:00
|
|
|
classification =
|
|
|
|
gst_element_factory_get_metadata (factory, GST_ELEMENT_METADATA_KLASS);
|
2011-06-26 13:40:17 +00:00
|
|
|
is_parser_converter = (strstr (classification, "Parser")
|
|
|
|
&& strstr (classification, "Converter"));
|
|
|
|
|
|
|
|
/* 1.c when the caps are not fixed yet, we can't be sure what element to
|
2007-06-05 16:05:19 +00:00
|
|
|
* connect. We delay autoplugging until the caps are fixed */
|
2014-07-10 10:17:52 +00:00
|
|
|
if (!is_parser_converter && !gst_caps_is_fixed (caps)) {
|
2007-06-05 16:05:19 +00:00
|
|
|
goto non_fixed;
|
2014-07-10 10:17:52 +00:00
|
|
|
} else if (!is_parser_converter) {
|
|
|
|
gst_caps_unref (caps);
|
|
|
|
caps = gst_pad_get_current_caps (pad);
|
|
|
|
if (!caps) {
|
|
|
|
GST_DEBUG_OBJECT (dbin, "No final caps set yet, delaying autoplugging");
|
2014-10-02 19:20:48 +00:00
|
|
|
gst_object_unref (dpad);
|
2014-07-10 10:17:52 +00:00
|
|
|
goto setup_caps_delay;
|
|
|
|
}
|
|
|
|
}
|
2007-06-05 16:05:19 +00:00
|
|
|
|
2011-06-26 13:40:17 +00:00
|
|
|
/* 1.d else get the factories and if there's no compatible factory goto
|
2007-11-09 12:21:52 +00:00
|
|
|
* unknown_type */
|
2007-10-24 11:07:57 +00:00
|
|
|
g_signal_emit (G_OBJECT (dbin),
|
gst/playback/gstdecodebin2.c (struct _GstDecodePad): Change to be a subclass of GstGhostPad.
Original commit message from CVS:
2008-10-08 Andy Wingo <wingo@pobox.com>
* gst/playback/gstdecodebin2.c (struct _GstDecodePad): Change to
be a subclass of GstGhostPad.
(analyze_new_pad): So, when emitting the signals that determine
how we do autoplugging, already create the ghost pad and use it as
the pad in the signal arguments. This allows applications to make
a connection between the pad passed in e.g. autoplug-continue, and
the pad passed in new-decoded-pad.
(connect_pad, expose_pad): Update to receive the ghosted decode
pad in the args, retargetting it as necessary if we have to plug
the target pad through a multiqueue.
(gst_decode_group_control_source_pad): Adapt to receive an
already-ghosted pad that just needs activation, blocking, and
drain notification.
(sort_end_pads): Adapt for decode pads actually being pads.
(gst_decode_group_expose): Adapt for decode pads actually being
pads. Rewrite the decode pad names so they appear in order. Adds a
new error case if we couldn't set the name.
(gst_decode_group_free, gst_decode_group_hide): Adapt cleanup
logic.
(gst_decode_pad_set_blocked, gst_decode_pad_add_drained_check):
New API for the decode pad, needed because we shouldn't do these
things inside gst_decode_pad_new(), but after.
(gst_decode_pad_new): Change to actually make the real pad, and
delay the blocking/drainage bits.
2008-10-08 12:49:40 +00:00
|
|
|
gst_decode_bin_signals[SIGNAL_AUTOPLUG_FACTORIES], 0, dpad, caps,
|
2007-10-24 11:07:57 +00:00
|
|
|
&factories);
|
gst/playback/: Refactor some common code to filter factories and check caps compat.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstfactorylists.c: (compare_ranks), (print_feature),
(get_feature_array), (decoders_filter), (sinks_filter),
(gst_factory_list_get_decoders), (gst_factory_list_get_sinks),
(gst_factory_list_filter):
* gst/playback/gstfactorylists.h:
Refactor some common code to filter factories and check caps compat.
* gst/playback/gstdecodebin.c:
* gst/playback/gstdecodebin2.c: (gst_decode_bin_class_init),
(gst_decode_bin_init), (gst_decode_bin_dispose),
(gst_decode_bin_autoplug_continue),
(gst_decode_bin_autoplug_factories),
(gst_decode_bin_autoplug_select), (analyze_new_pad),
(find_compatibles):
* gst/playback/gstplaybin.c:
* gst/playback/gstplaybin2.c: (gst_play_bin_class_init),
(gst_play_bin_init), (gst_play_bin_finalize),
(autoplug_factories_cb), (activate_group):
* gst/playback/gstqueue2.c:
* gst/playback/gsturidecodebin.c: (proxy_unknown_type_signal),
(proxy_autoplug_continue_signal),
(proxy_autoplug_factories_signal), (proxy_autoplug_select_signal),
(proxy_drained_signal):
Add some more debug info and use factor filtering code.
2007-11-30 17:47:15 +00:00
|
|
|
|
|
|
|
/* NULL means that we can expose the pad */
|
|
|
|
if (factories == NULL)
|
|
|
|
goto expose_pad;
|
|
|
|
|
2010-06-04 17:30:14 +00:00
|
|
|
/* if the array is empty, we have a type for which we have no decoder */
|
gst/playback/: Refactor some common code to filter factories and check caps compat.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstfactorylists.c: (compare_ranks), (print_feature),
(get_feature_array), (decoders_filter), (sinks_filter),
(gst_factory_list_get_decoders), (gst_factory_list_get_sinks),
(gst_factory_list_filter):
* gst/playback/gstfactorylists.h:
Refactor some common code to filter factories and check caps compat.
* gst/playback/gstdecodebin.c:
* gst/playback/gstdecodebin2.c: (gst_decode_bin_class_init),
(gst_decode_bin_init), (gst_decode_bin_dispose),
(gst_decode_bin_autoplug_continue),
(gst_decode_bin_autoplug_factories),
(gst_decode_bin_autoplug_select), (analyze_new_pad),
(find_compatibles):
* gst/playback/gstplaybin.c:
* gst/playback/gstplaybin2.c: (gst_play_bin_class_init),
(gst_play_bin_init), (gst_play_bin_finalize),
(autoplug_factories_cb), (activate_group):
* gst/playback/gstqueue2.c:
* gst/playback/gsturidecodebin.c: (proxy_unknown_type_signal),
(proxy_autoplug_continue_signal),
(proxy_autoplug_factories_signal), (proxy_autoplug_select_signal),
(proxy_drained_signal):
Add some more debug info and use factor filtering code.
2007-11-30 17:47:15 +00:00
|
|
|
if (factories->n_values == 0) {
|
2010-06-04 17:30:14 +00:00
|
|
|
if (!dbin->expose_allstreams) {
|
|
|
|
GstCaps *raw = gst_static_caps_get (&default_raw_caps);
|
|
|
|
|
|
|
|
/* If the caps are raw, this just means we don't want to expose them */
|
2013-05-14 08:06:40 +00:00
|
|
|
if (gst_caps_is_subset (caps, raw)) {
|
2011-09-06 11:06:26 +00:00
|
|
|
g_value_array_free (factories);
|
2010-06-04 17:30:14 +00:00
|
|
|
gst_caps_unref (raw);
|
2010-09-15 12:15:13 +00:00
|
|
|
gst_object_unref (dpad);
|
2010-06-04 17:30:14 +00:00
|
|
|
goto discarded_type;
|
|
|
|
}
|
|
|
|
gst_caps_unref (raw);
|
|
|
|
}
|
|
|
|
|
|
|
|
/* if not we have a unhandled type with no compatible factories */
|
gst/playback/: Refactor some common code to filter factories and check caps compat.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstfactorylists.c: (compare_ranks), (print_feature),
(get_feature_array), (decoders_filter), (sinks_filter),
(gst_factory_list_get_decoders), (gst_factory_list_get_sinks),
(gst_factory_list_filter):
* gst/playback/gstfactorylists.h:
Refactor some common code to filter factories and check caps compat.
* gst/playback/gstdecodebin.c:
* gst/playback/gstdecodebin2.c: (gst_decode_bin_class_init),
(gst_decode_bin_init), (gst_decode_bin_dispose),
(gst_decode_bin_autoplug_continue),
(gst_decode_bin_autoplug_factories),
(gst_decode_bin_autoplug_select), (analyze_new_pad),
(find_compatibles):
* gst/playback/gstplaybin.c:
* gst/playback/gstplaybin2.c: (gst_play_bin_class_init),
(gst_play_bin_init), (gst_play_bin_finalize),
(autoplug_factories_cb), (activate_group):
* gst/playback/gstqueue2.c:
* gst/playback/gsturidecodebin.c: (proxy_unknown_type_signal),
(proxy_autoplug_continue_signal),
(proxy_autoplug_factories_signal), (proxy_autoplug_select_signal),
(proxy_drained_signal):
Add some more debug info and use factor filtering code.
2007-11-30 17:47:15 +00:00
|
|
|
g_value_array_free (factories);
|
gst/playback/gstdecodebin2.c (struct _GstDecodePad): Change to be a subclass of GstGhostPad.
Original commit message from CVS:
2008-10-08 Andy Wingo <wingo@pobox.com>
* gst/playback/gstdecodebin2.c (struct _GstDecodePad): Change to
be a subclass of GstGhostPad.
(analyze_new_pad): So, when emitting the signals that determine
how we do autoplugging, already create the ghost pad and use it as
the pad in the signal arguments. This allows applications to make
a connection between the pad passed in e.g. autoplug-continue, and
the pad passed in new-decoded-pad.
(connect_pad, expose_pad): Update to receive the ghosted decode
pad in the args, retargetting it as necessary if we have to plug
the target pad through a multiqueue.
(gst_decode_group_control_source_pad): Adapt to receive an
already-ghosted pad that just needs activation, blocking, and
drain notification.
(sort_end_pads): Adapt for decode pads actually being pads.
(gst_decode_group_expose): Adapt for decode pads actually being
pads. Rewrite the decode pad names so they appear in order. Adds a
new error case if we couldn't set the name.
(gst_decode_group_free, gst_decode_group_hide): Adapt cleanup
logic.
(gst_decode_pad_set_blocked, gst_decode_pad_add_drained_check):
New API for the decode pad, needed because we shouldn't do these
things inside gst_decode_pad_new(), but after.
(gst_decode_pad_new): Change to actually make the real pad, and
delay the blocking/drainage bits.
2008-10-08 12:49:40 +00:00
|
|
|
gst_object_unref (dpad);
|
gst/playback/: New decodebin2 element.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstdecodebin2.c: (gst_decode_bin_get_type),
(_gst_boolean_accumulator), (gst_decode_bin_class_init),
(gst_decode_bin_factory_filter), (compare_ranks), (print_feature),
(gst_decode_bin_init), (gst_decode_bin_dispose),
(gst_decode_bin_finalize), (gst_decode_bin_set_property),
(gst_decode_bin_get_property), (gst_decode_bin_set_caps),
(gst_decode_bin_get_caps), (gst_decode_bin_autoplug_continue),
(gst_decode_bin_autoplug_sort), (analyze_new_pad), (connect_pad),
(connect_element), (expose_pad), (type_found),
(pad_added_group_cb), (pad_removed_group_cb),
(no_more_pads_group_cb), (pad_added_cb), (pad_removed_cb),
(no_more_pads_cb), (find_compatibles), (is_demuxer_element),
(are_raw_caps), (multi_queue_overrun_cb),
(multi_queue_underrun_cb), (gst_decode_group_new),
(get_current_group), (group_demuxer_event_probe),
(gst_decode_group_control_demuxer_pad),
(gst_decode_group_control_source_pad),
(gst_decode_group_check_if_blocked),
(gst_decode_group_check_if_drained), (gst_decode_group_expose),
(gst_decode_group_hide), (gst_decode_group_free),
(gst_decode_group_set_complete), (source_pad_blocked_cb),
(source_pad_event_probe), (gst_decode_pad_new), (add_fakesink),
(remove_fakesink), (find_sink_pad), (gst_decode_bin_change_state),
(plugin_init):
New decodebin2 element.
Closes #370092
* gst/playback/gstplay-marshal.list:
Added marshallers for new signals in decodebin2
* gst/playback/gstplaybasebin.c: (setup_subtitle), (make_decoder):
Use decodebin2 if *and only if* the USE_DECODEBIN2 environment variable
is set.
2006-11-28 14:40:39 +00:00
|
|
|
goto unknown_type;
|
|
|
|
}
|
|
|
|
|
2011-06-26 13:40:17 +00:00
|
|
|
/* 1.e sort some more. */
|
gst/playback/Makefile.am: Group decodebin2 and uridecodebin into the same plugin so that they can share the GEnumType.
Original commit message from CVS:
* gst/playback/Makefile.am:
Group decodebin2 and uridecodebin into the same plugin so that they
can share the GEnumType.
* gst/playback/gstdecodebin2.c: (_gst_array_accumulator),
(_gst_select_accumulator), (gst_decode_bin_class_init),
(gst_decode_bin_init), (gst_decode_bin_autoplug_sort),
(gst_decode_bin_autoplug_select), (gst_decode_bin_autoplug_add),
(analyze_new_pad), (connect_pad), (gst_decode_bin_plugin_init):
Add signal to sort factories instead of the more awkward autoplug-select
signal.
Modify autoplug_select so that we can try, skip or expose the
autopluggin of an element on a pad.
* gst/playback/gstfactorylists.c: (compare_ranks),
(decoders_filter), (sinks_filter), (gst_factory_list_is_type),
(element_filter), (gst_factory_list_get_elements),
(gst_factory_list_debug), (gst_factory_list_filter):
* gst/playback/gstfactorylists.h:
Simplify the API, allow getting elements based on mask.
* gst/playback/gstplay-marshal.list:
Add some more marshallers.
* gst/playback/gstplaybin2.c: (init_group), (gst_play_bin_init),
(gst_play_bin_finalize), (pad_removed_cb), (autoplug_factories_cb),
(autoplug_select_cb), (activate_group):
Add support for managing non-raw sinks by providing a custom element and
sink list to decodebin2.
Try to plug non-raw sinks when decodebin2 using autoplug-select of
decodebin2.
* gst/playback/gstplaysink.c: (gen_video_chain), (gen_audio_chain),
(gst_play_sink_set_mode), (gst_play_sink_request_pad):
* gst/playback/gstplaysink.h:
Add support for raw and non-raw sinks.
Add support to force sinks selected by playbin2.
Don't plug raw converters for non-raw sinks.
* gst/playback/gsturidecodebin.c: (_gst_array_accumulator),
(_gst_select_accumulator), (gst_uri_decode_bin_class_init),
(proxy_autoplug_select_signal), (gst_uri_decode_bin_plugin_init),
(plugin_init):
Use right accumulators.
Proxy new signal.
2007-12-05 17:11:48 +00:00
|
|
|
g_signal_emit (G_OBJECT (dbin),
|
gst/playback/gstdecodebin2.c (struct _GstDecodePad): Change to be a subclass of GstGhostPad.
Original commit message from CVS:
2008-10-08 Andy Wingo <wingo@pobox.com>
* gst/playback/gstdecodebin2.c (struct _GstDecodePad): Change to
be a subclass of GstGhostPad.
(analyze_new_pad): So, when emitting the signals that determine
how we do autoplugging, already create the ghost pad and use it as
the pad in the signal arguments. This allows applications to make
a connection between the pad passed in e.g. autoplug-continue, and
the pad passed in new-decoded-pad.
(connect_pad, expose_pad): Update to receive the ghosted decode
pad in the args, retargetting it as necessary if we have to plug
the target pad through a multiqueue.
(gst_decode_group_control_source_pad): Adapt to receive an
already-ghosted pad that just needs activation, blocking, and
drain notification.
(sort_end_pads): Adapt for decode pads actually being pads.
(gst_decode_group_expose): Adapt for decode pads actually being
pads. Rewrite the decode pad names so they appear in order. Adds a
new error case if we couldn't set the name.
(gst_decode_group_free, gst_decode_group_hide): Adapt cleanup
logic.
(gst_decode_pad_set_blocked, gst_decode_pad_add_drained_check):
New API for the decode pad, needed because we shouldn't do these
things inside gst_decode_pad_new(), but after.
(gst_decode_pad_new): Change to actually make the real pad, and
delay the blocking/drainage bits.
2008-10-08 12:49:40 +00:00
|
|
|
gst_decode_bin_signals[SIGNAL_AUTOPLUG_SORT], 0, dpad, caps, factories,
|
gst/playback/Makefile.am: Group decodebin2 and uridecodebin into the same plugin so that they can share the GEnumType.
Original commit message from CVS:
* gst/playback/Makefile.am:
Group decodebin2 and uridecodebin into the same plugin so that they
can share the GEnumType.
* gst/playback/gstdecodebin2.c: (_gst_array_accumulator),
(_gst_select_accumulator), (gst_decode_bin_class_init),
(gst_decode_bin_init), (gst_decode_bin_autoplug_sort),
(gst_decode_bin_autoplug_select), (gst_decode_bin_autoplug_add),
(analyze_new_pad), (connect_pad), (gst_decode_bin_plugin_init):
Add signal to sort factories instead of the more awkward autoplug-select
signal.
Modify autoplug_select so that we can try, skip or expose the
autopluggin of an element on a pad.
* gst/playback/gstfactorylists.c: (compare_ranks),
(decoders_filter), (sinks_filter), (gst_factory_list_is_type),
(element_filter), (gst_factory_list_get_elements),
(gst_factory_list_debug), (gst_factory_list_filter):
* gst/playback/gstfactorylists.h:
Simplify the API, allow getting elements based on mask.
* gst/playback/gstplay-marshal.list:
Add some more marshallers.
* gst/playback/gstplaybin2.c: (init_group), (gst_play_bin_init),
(gst_play_bin_finalize), (pad_removed_cb), (autoplug_factories_cb),
(autoplug_select_cb), (activate_group):
Add support for managing non-raw sinks by providing a custom element and
sink list to decodebin2.
Try to plug non-raw sinks when decodebin2 using autoplug-select of
decodebin2.
* gst/playback/gstplaysink.c: (gen_video_chain), (gen_audio_chain),
(gst_play_sink_set_mode), (gst_play_sink_request_pad):
* gst/playback/gstplaysink.h:
Add support for raw and non-raw sinks.
Add support to force sinks selected by playbin2.
Don't plug raw converters for non-raw sinks.
* gst/playback/gsturidecodebin.c: (_gst_array_accumulator),
(_gst_select_accumulator), (gst_uri_decode_bin_class_init),
(proxy_autoplug_select_signal), (gst_uri_decode_bin_plugin_init),
(plugin_init):
Use right accumulators.
Proxy new signal.
2007-12-05 17:11:48 +00:00
|
|
|
&result);
|
2011-02-18 10:57:12 +00:00
|
|
|
if (result) {
|
|
|
|
g_value_array_free (factories);
|
|
|
|
factories = result;
|
|
|
|
}
|
gst/playback/Makefile.am: Group decodebin2 and uridecodebin into the same plugin so that they can share the GEnumType.
Original commit message from CVS:
* gst/playback/Makefile.am:
Group decodebin2 and uridecodebin into the same plugin so that they
can share the GEnumType.
* gst/playback/gstdecodebin2.c: (_gst_array_accumulator),
(_gst_select_accumulator), (gst_decode_bin_class_init),
(gst_decode_bin_init), (gst_decode_bin_autoplug_sort),
(gst_decode_bin_autoplug_select), (gst_decode_bin_autoplug_add),
(analyze_new_pad), (connect_pad), (gst_decode_bin_plugin_init):
Add signal to sort factories instead of the more awkward autoplug-select
signal.
Modify autoplug_select so that we can try, skip or expose the
autopluggin of an element on a pad.
* gst/playback/gstfactorylists.c: (compare_ranks),
(decoders_filter), (sinks_filter), (gst_factory_list_is_type),
(element_filter), (gst_factory_list_get_elements),
(gst_factory_list_debug), (gst_factory_list_filter):
* gst/playback/gstfactorylists.h:
Simplify the API, allow getting elements based on mask.
* gst/playback/gstplay-marshal.list:
Add some more marshallers.
* gst/playback/gstplaybin2.c: (init_group), (gst_play_bin_init),
(gst_play_bin_finalize), (pad_removed_cb), (autoplug_factories_cb),
(autoplug_select_cb), (activate_group):
Add support for managing non-raw sinks by providing a custom element and
sink list to decodebin2.
Try to plug non-raw sinks when decodebin2 using autoplug-select of
decodebin2.
* gst/playback/gstplaysink.c: (gen_video_chain), (gen_audio_chain),
(gst_play_sink_set_mode), (gst_play_sink_request_pad):
* gst/playback/gstplaysink.h:
Add support for raw and non-raw sinks.
Add support to force sinks selected by playbin2.
Don't plug raw converters for non-raw sinks.
* gst/playback/gsturidecodebin.c: (_gst_array_accumulator),
(_gst_select_accumulator), (gst_uri_decode_bin_class_init),
(proxy_autoplug_select_signal), (gst_uri_decode_bin_plugin_init),
(plugin_init):
Use right accumulators.
Proxy new signal.
2007-12-05 17:11:48 +00:00
|
|
|
|
2010-05-06 16:50:51 +00:00
|
|
|
/* At this point we have a potential decoder, but we might not need it
|
|
|
|
* if it doesn't match the output caps */
|
2011-09-20 12:04:45 +00:00
|
|
|
if (!dbin->expose_allstreams && gst_caps_is_fixed (caps)) {
|
2010-05-06 16:50:51 +00:00
|
|
|
guint i;
|
|
|
|
const GList *tmps;
|
|
|
|
gboolean dontuse = FALSE;
|
|
|
|
|
|
|
|
GST_DEBUG ("Checking if we can abort early");
|
|
|
|
|
2011-06-26 13:40:17 +00:00
|
|
|
/* 1.f Do an early check to see if the candidates are potential decoders, but
|
2011-01-25 16:03:23 +00:00
|
|
|
* due to the fact that they decode to a mediatype that is not final we don't
|
2010-05-06 16:50:51 +00:00
|
|
|
* need them */
|
|
|
|
|
|
|
|
for (i = 0; i < factories->n_values && !dontuse; i++) {
|
|
|
|
GstElementFactory *factory =
|
2011-09-05 18:31:04 +00:00
|
|
|
g_value_get_object (g_value_array_get_nth (factories, i));
|
2010-05-06 16:50:51 +00:00
|
|
|
GstCaps *tcaps;
|
|
|
|
|
|
|
|
/* We are only interested in skipping decoders */
|
2012-09-15 16:57:09 +00:00
|
|
|
if (strstr (gst_element_factory_get_metadata (factory,
|
|
|
|
GST_ELEMENT_METADATA_KLASS), "Decoder")) {
|
2010-05-06 16:50:51 +00:00
|
|
|
|
|
|
|
GST_DEBUG ("Trying factory %s",
|
|
|
|
gst_plugin_feature_get_name (GST_PLUGIN_FEATURE (factory)));
|
|
|
|
|
|
|
|
/* Check the source pad template caps to see if they match raw caps but don't match
|
|
|
|
* our final caps*/
|
|
|
|
for (tmps = gst_element_factory_get_static_pad_templates (factory);
|
|
|
|
tmps && !dontuse; tmps = tmps->next) {
|
|
|
|
GstStaticPadTemplate *st = (GstStaticPadTemplate *) tmps->data;
|
|
|
|
if (st->direction != GST_PAD_SRC)
|
|
|
|
continue;
|
|
|
|
tcaps = gst_static_pad_template_get_caps (st);
|
2011-02-26 22:20:42 +00:00
|
|
|
|
|
|
|
apcontinue = TRUE;
|
|
|
|
|
|
|
|
/* Emit autoplug-continue to see if the caps are considered to be raw caps */
|
|
|
|
g_signal_emit (G_OBJECT (dbin),
|
|
|
|
gst_decode_bin_signals[SIGNAL_AUTOPLUG_CONTINUE], 0, dpad, tcaps,
|
|
|
|
&apcontinue);
|
|
|
|
|
|
|
|
/* If autoplug-continue returns TRUE and the caps are not final, don't use them */
|
|
|
|
if (apcontinue && !are_final_caps (dbin, tcaps))
|
2010-05-06 16:50:51 +00:00
|
|
|
dontuse = TRUE;
|
|
|
|
gst_caps_unref (tcaps);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2010-09-15 12:15:13 +00:00
|
|
|
if (dontuse) {
|
|
|
|
gst_object_unref (dpad);
|
2011-09-06 11:06:26 +00:00
|
|
|
g_value_array_free (factories);
|
2010-05-06 16:50:51 +00:00
|
|
|
goto discarded_type;
|
2010-09-15 12:15:13 +00:00
|
|
|
}
|
2010-05-06 16:50:51 +00:00
|
|
|
}
|
|
|
|
|
2011-06-26 13:40:17 +00:00
|
|
|
/* 1.g now get the factory template caps and insert the capsfilter if this
|
|
|
|
* is a parser/converter
|
|
|
|
*/
|
|
|
|
if (is_parser_converter) {
|
|
|
|
GstCaps *filter_caps;
|
|
|
|
gint i;
|
2016-06-01 13:56:13 +00:00
|
|
|
GstElement *capsfilter;
|
2011-06-26 13:40:17 +00:00
|
|
|
GstPad *p;
|
|
|
|
GstDecodeElement *delem;
|
|
|
|
|
|
|
|
filter_caps = gst_caps_new_empty ();
|
|
|
|
for (i = 0; i < factories->n_values; i++) {
|
|
|
|
GstElementFactory *factory =
|
|
|
|
g_value_get_object (g_value_array_get_nth (factories, i));
|
2011-09-07 12:19:32 +00:00
|
|
|
GstCaps *tcaps, *intersection;
|
2011-06-26 13:40:17 +00:00
|
|
|
const GList *tmps;
|
|
|
|
|
|
|
|
GST_DEBUG ("Trying factory %s",
|
|
|
|
gst_plugin_feature_get_name (GST_PLUGIN_FEATURE (factory)));
|
|
|
|
|
2015-02-20 10:34:11 +00:00
|
|
|
if (gst_element_get_factory (src) == factory ||
|
|
|
|
gst_element_factory_list_is_type (factory,
|
|
|
|
GST_ELEMENT_FACTORY_TYPE_PARSER)) {
|
2011-06-26 13:40:17 +00:00
|
|
|
GST_DEBUG ("Skipping factory");
|
|
|
|
continue;
|
|
|
|
}
|
|
|
|
|
|
|
|
for (tmps = gst_element_factory_get_static_pad_templates (factory); tmps;
|
|
|
|
tmps = tmps->next) {
|
|
|
|
GstStaticPadTemplate *st = (GstStaticPadTemplate *) tmps->data;
|
|
|
|
if (st->direction != GST_PAD_SINK || st->presence != GST_PAD_ALWAYS)
|
|
|
|
continue;
|
|
|
|
tcaps = gst_static_pad_template_get_caps (st);
|
2011-09-07 12:19:32 +00:00
|
|
|
intersection =
|
|
|
|
gst_caps_intersect_full (tcaps, caps, GST_CAPS_INTERSECT_FIRST);
|
2012-03-11 18:04:41 +00:00
|
|
|
filter_caps = gst_caps_merge (filter_caps, intersection);
|
2011-06-26 13:40:17 +00:00
|
|
|
gst_caps_unref (tcaps);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
/* Append the parser caps to prevent any not-negotiated errors */
|
2012-03-11 18:04:41 +00:00
|
|
|
filter_caps = gst_caps_merge (filter_caps, gst_caps_ref (caps));
|
2011-06-26 13:40:17 +00:00
|
|
|
|
2016-06-01 13:56:13 +00:00
|
|
|
if (chain->elements) {
|
|
|
|
delem = (GstDecodeElement *) chain->elements->data;
|
|
|
|
capsfilter = delem->capsfilter =
|
|
|
|
gst_element_factory_make ("capsfilter", NULL);
|
|
|
|
} else {
|
|
|
|
delem = g_slice_new0 (GstDecodeElement);
|
|
|
|
capsfilter = delem->element =
|
|
|
|
gst_element_factory_make ("capsfilter", NULL);
|
|
|
|
delem->capsfilter = NULL;
|
|
|
|
chain->elements = g_list_prepend (chain->elements, delem);
|
|
|
|
}
|
|
|
|
|
|
|
|
g_object_set (G_OBJECT (capsfilter), "caps", filter_caps, NULL);
|
2011-06-26 13:40:17 +00:00
|
|
|
gst_caps_unref (filter_caps);
|
2016-06-01 13:56:13 +00:00
|
|
|
gst_element_set_state (capsfilter, GST_STATE_PAUSED);
|
|
|
|
gst_bin_add (GST_BIN_CAST (dbin), gst_object_ref (capsfilter));
|
2011-06-26 13:40:17 +00:00
|
|
|
|
2013-11-29 16:26:13 +00:00
|
|
|
decode_pad_set_target (dpad, NULL);
|
2016-06-01 13:56:13 +00:00
|
|
|
p = gst_element_get_static_pad (capsfilter, "sink");
|
2011-06-26 13:40:17 +00:00
|
|
|
gst_pad_link_full (pad, p, GST_PAD_LINK_CHECK_NOTHING);
|
|
|
|
gst_object_unref (p);
|
2016-06-01 13:56:13 +00:00
|
|
|
p = gst_element_get_static_pad (capsfilter, "src");
|
2013-11-29 16:26:13 +00:00
|
|
|
decode_pad_set_target (dpad, p);
|
2011-06-26 13:40:17 +00:00
|
|
|
pad = p;
|
2011-09-07 14:43:36 +00:00
|
|
|
|
2014-07-10 10:03:46 +00:00
|
|
|
gst_caps_unref (caps);
|
|
|
|
|
2014-07-10 10:17:52 +00:00
|
|
|
caps = gst_pad_get_current_caps (pad);
|
|
|
|
if (!caps) {
|
|
|
|
GST_DEBUG_OBJECT (dbin, "No final caps set yet, delaying autoplugging");
|
2014-10-02 19:20:48 +00:00
|
|
|
gst_object_unref (dpad);
|
2014-10-06 07:15:13 +00:00
|
|
|
g_value_array_free (factories);
|
2014-07-10 10:17:52 +00:00
|
|
|
goto setup_caps_delay;
|
2011-09-07 14:43:36 +00:00
|
|
|
}
|
2011-06-26 13:40:17 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/* 1.h else continue autoplugging something from the list. */
|
gst/playback/: New decodebin2 element.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstdecodebin2.c: (gst_decode_bin_get_type),
(_gst_boolean_accumulator), (gst_decode_bin_class_init),
(gst_decode_bin_factory_filter), (compare_ranks), (print_feature),
(gst_decode_bin_init), (gst_decode_bin_dispose),
(gst_decode_bin_finalize), (gst_decode_bin_set_property),
(gst_decode_bin_get_property), (gst_decode_bin_set_caps),
(gst_decode_bin_get_caps), (gst_decode_bin_autoplug_continue),
(gst_decode_bin_autoplug_sort), (analyze_new_pad), (connect_pad),
(connect_element), (expose_pad), (type_found),
(pad_added_group_cb), (pad_removed_group_cb),
(no_more_pads_group_cb), (pad_added_cb), (pad_removed_cb),
(no_more_pads_cb), (find_compatibles), (is_demuxer_element),
(are_raw_caps), (multi_queue_overrun_cb),
(multi_queue_underrun_cb), (gst_decode_group_new),
(get_current_group), (group_demuxer_event_probe),
(gst_decode_group_control_demuxer_pad),
(gst_decode_group_control_source_pad),
(gst_decode_group_check_if_blocked),
(gst_decode_group_check_if_drained), (gst_decode_group_expose),
(gst_decode_group_hide), (gst_decode_group_free),
(gst_decode_group_set_complete), (source_pad_blocked_cb),
(source_pad_event_probe), (gst_decode_pad_new), (add_fakesink),
(remove_fakesink), (find_sink_pad), (gst_decode_bin_change_state),
(plugin_init):
New decodebin2 element.
Closes #370092
* gst/playback/gstplay-marshal.list:
Added marshallers for new signals in decodebin2
* gst/playback/gstplaybasebin.c: (setup_subtitle), (make_decoder):
Use decodebin2 if *and only if* the USE_DECODEBIN2 environment variable
is set.
2006-11-28 14:40:39 +00:00
|
|
|
GST_LOG_OBJECT (pad, "Let's continue discovery on this pad");
|
2014-08-25 17:59:40 +00:00
|
|
|
res =
|
|
|
|
connect_pad (dbin, src, dpad, pad, caps, factories, chain,
|
|
|
|
&deadend_details);
|
2007-11-09 12:21:52 +00:00
|
|
|
|
2011-06-26 13:40:17 +00:00
|
|
|
/* Need to unref the capsfilter srcpad here if
|
|
|
|
* we inserted a capsfilter */
|
|
|
|
if (is_parser_converter)
|
|
|
|
gst_object_unref (pad);
|
|
|
|
|
gst/playback/gstdecodebin2.c (struct _GstDecodePad): Change to be a subclass of GstGhostPad.
Original commit message from CVS:
2008-10-08 Andy Wingo <wingo@pobox.com>
* gst/playback/gstdecodebin2.c (struct _GstDecodePad): Change to
be a subclass of GstGhostPad.
(analyze_new_pad): So, when emitting the signals that determine
how we do autoplugging, already create the ghost pad and use it as
the pad in the signal arguments. This allows applications to make
a connection between the pad passed in e.g. autoplug-continue, and
the pad passed in new-decoded-pad.
(connect_pad, expose_pad): Update to receive the ghosted decode
pad in the args, retargetting it as necessary if we have to plug
the target pad through a multiqueue.
(gst_decode_group_control_source_pad): Adapt to receive an
already-ghosted pad that just needs activation, blocking, and
drain notification.
(sort_end_pads): Adapt for decode pads actually being pads.
(gst_decode_group_expose): Adapt for decode pads actually being
pads. Rewrite the decode pad names so they appear in order. Adds a
new error case if we couldn't set the name.
(gst_decode_group_free, gst_decode_group_hide): Adapt cleanup
logic.
(gst_decode_pad_set_blocked, gst_decode_pad_add_drained_check):
New API for the decode pad, needed because we shouldn't do these
things inside gst_decode_pad_new(), but after.
(gst_decode_pad_new): Change to actually make the real pad, and
delay the blocking/drainage bits.
2008-10-08 12:49:40 +00:00
|
|
|
gst_object_unref (dpad);
|
2007-10-24 11:07:57 +00:00
|
|
|
g_value_array_free (factories);
|
gst/playback/: New decodebin2 element.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstdecodebin2.c: (gst_decode_bin_get_type),
(_gst_boolean_accumulator), (gst_decode_bin_class_init),
(gst_decode_bin_factory_filter), (compare_ranks), (print_feature),
(gst_decode_bin_init), (gst_decode_bin_dispose),
(gst_decode_bin_finalize), (gst_decode_bin_set_property),
(gst_decode_bin_get_property), (gst_decode_bin_set_caps),
(gst_decode_bin_get_caps), (gst_decode_bin_autoplug_continue),
(gst_decode_bin_autoplug_sort), (analyze_new_pad), (connect_pad),
(connect_element), (expose_pad), (type_found),
(pad_added_group_cb), (pad_removed_group_cb),
(no_more_pads_group_cb), (pad_added_cb), (pad_removed_cb),
(no_more_pads_cb), (find_compatibles), (is_demuxer_element),
(are_raw_caps), (multi_queue_overrun_cb),
(multi_queue_underrun_cb), (gst_decode_group_new),
(get_current_group), (group_demuxer_event_probe),
(gst_decode_group_control_demuxer_pad),
(gst_decode_group_control_source_pad),
(gst_decode_group_check_if_blocked),
(gst_decode_group_check_if_drained), (gst_decode_group_expose),
(gst_decode_group_hide), (gst_decode_group_free),
(gst_decode_group_set_complete), (source_pad_blocked_cb),
(source_pad_event_probe), (gst_decode_pad_new), (add_fakesink),
(remove_fakesink), (find_sink_pad), (gst_decode_bin_change_state),
(plugin_init):
New decodebin2 element.
Closes #370092
* gst/playback/gstplay-marshal.list:
Added marshallers for new signals in decodebin2
* gst/playback/gstplaybasebin.c: (setup_subtitle), (make_decoder):
Use decodebin2 if *and only if* the USE_DECODEBIN2 environment variable
is set.
2006-11-28 14:40:39 +00:00
|
|
|
|
2011-09-19 09:53:02 +00:00
|
|
|
if (!res)
|
|
|
|
goto unknown_type;
|
|
|
|
|
2014-07-23 17:51:36 +00:00
|
|
|
gst_caps_unref (caps);
|
|
|
|
|
2015-10-15 16:40:43 +00:00
|
|
|
return FALSE;
|
gst/playback/: New decodebin2 element.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstdecodebin2.c: (gst_decode_bin_get_type),
(_gst_boolean_accumulator), (gst_decode_bin_class_init),
(gst_decode_bin_factory_filter), (compare_ranks), (print_feature),
(gst_decode_bin_init), (gst_decode_bin_dispose),
(gst_decode_bin_finalize), (gst_decode_bin_set_property),
(gst_decode_bin_get_property), (gst_decode_bin_set_caps),
(gst_decode_bin_get_caps), (gst_decode_bin_autoplug_continue),
(gst_decode_bin_autoplug_sort), (analyze_new_pad), (connect_pad),
(connect_element), (expose_pad), (type_found),
(pad_added_group_cb), (pad_removed_group_cb),
(no_more_pads_group_cb), (pad_added_cb), (pad_removed_cb),
(no_more_pads_cb), (find_compatibles), (is_demuxer_element),
(are_raw_caps), (multi_queue_overrun_cb),
(multi_queue_underrun_cb), (gst_decode_group_new),
(get_current_group), (group_demuxer_event_probe),
(gst_decode_group_control_demuxer_pad),
(gst_decode_group_control_source_pad),
(gst_decode_group_check_if_blocked),
(gst_decode_group_check_if_drained), (gst_decode_group_expose),
(gst_decode_group_hide), (gst_decode_group_free),
(gst_decode_group_set_complete), (source_pad_blocked_cb),
(source_pad_event_probe), (gst_decode_pad_new), (add_fakesink),
(remove_fakesink), (find_sink_pad), (gst_decode_bin_change_state),
(plugin_init):
New decodebin2 element.
Closes #370092
* gst/playback/gstplay-marshal.list:
Added marshallers for new signals in decodebin2
* gst/playback/gstplaybasebin.c: (setup_subtitle), (make_decoder):
Use decodebin2 if *and only if* the USE_DECODEBIN2 environment variable
is set.
2006-11-28 14:40:39 +00:00
|
|
|
|
|
|
|
expose_pad:
|
|
|
|
{
|
2015-10-15 16:40:43 +00:00
|
|
|
GST_LOG_OBJECT (dbin, "Pad is final and should expose the pad. "
|
|
|
|
"autoplug-continue:%d", apcontinue);
|
gst/playback/gstdecodebin2.c (struct _GstDecodePad): Change to be a subclass of GstGhostPad.
Original commit message from CVS:
2008-10-08 Andy Wingo <wingo@pobox.com>
* gst/playback/gstdecodebin2.c (struct _GstDecodePad): Change to
be a subclass of GstGhostPad.
(analyze_new_pad): So, when emitting the signals that determine
how we do autoplugging, already create the ghost pad and use it as
the pad in the signal arguments. This allows applications to make
a connection between the pad passed in e.g. autoplug-continue, and
the pad passed in new-decoded-pad.
(connect_pad, expose_pad): Update to receive the ghosted decode
pad in the args, retargetting it as necessary if we have to plug
the target pad through a multiqueue.
(gst_decode_group_control_source_pad): Adapt to receive an
already-ghosted pad that just needs activation, blocking, and
drain notification.
(sort_end_pads): Adapt for decode pads actually being pads.
(gst_decode_group_expose): Adapt for decode pads actually being
pads. Rewrite the decode pad names so they appear in order. Adds a
new error case if we couldn't set the name.
(gst_decode_group_free, gst_decode_group_hide): Adapt cleanup
logic.
(gst_decode_pad_set_blocked, gst_decode_pad_add_drained_check):
New API for the decode pad, needed because we shouldn't do these
things inside gst_decode_pad_new(), but after.
(gst_decode_pad_new): Change to actually make the real pad, and
delay the blocking/drainage bits.
2008-10-08 12:49:40 +00:00
|
|
|
gst_object_unref (dpad);
|
2014-07-23 17:51:36 +00:00
|
|
|
gst_caps_unref (caps);
|
2015-10-15 16:40:43 +00:00
|
|
|
return TRUE;
|
gst/playback/: New decodebin2 element.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstdecodebin2.c: (gst_decode_bin_get_type),
(_gst_boolean_accumulator), (gst_decode_bin_class_init),
(gst_decode_bin_factory_filter), (compare_ranks), (print_feature),
(gst_decode_bin_init), (gst_decode_bin_dispose),
(gst_decode_bin_finalize), (gst_decode_bin_set_property),
(gst_decode_bin_get_property), (gst_decode_bin_set_caps),
(gst_decode_bin_get_caps), (gst_decode_bin_autoplug_continue),
(gst_decode_bin_autoplug_sort), (analyze_new_pad), (connect_pad),
(connect_element), (expose_pad), (type_found),
(pad_added_group_cb), (pad_removed_group_cb),
(no_more_pads_group_cb), (pad_added_cb), (pad_removed_cb),
(no_more_pads_cb), (find_compatibles), (is_demuxer_element),
(are_raw_caps), (multi_queue_overrun_cb),
(multi_queue_underrun_cb), (gst_decode_group_new),
(get_current_group), (group_demuxer_event_probe),
(gst_decode_group_control_demuxer_pad),
(gst_decode_group_control_source_pad),
(gst_decode_group_check_if_blocked),
(gst_decode_group_check_if_drained), (gst_decode_group_expose),
(gst_decode_group_hide), (gst_decode_group_free),
(gst_decode_group_set_complete), (source_pad_blocked_cb),
(source_pad_event_probe), (gst_decode_pad_new), (add_fakesink),
(remove_fakesink), (find_sink_pad), (gst_decode_bin_change_state),
(plugin_init):
New decodebin2 element.
Closes #370092
* gst/playback/gstplay-marshal.list:
Added marshallers for new signals in decodebin2
* gst/playback/gstplaybasebin.c: (setup_subtitle), (make_decoder):
Use decodebin2 if *and only if* the USE_DECODEBIN2 environment variable
is set.
2006-11-28 14:40:39 +00:00
|
|
|
}
|
2010-05-06 16:50:51 +00:00
|
|
|
|
|
|
|
discarded_type:
|
|
|
|
{
|
|
|
|
GST_LOG_OBJECT (pad, "Known type, but discarded because not final caps");
|
|
|
|
chain->deadend = TRUE;
|
2014-07-23 17:51:36 +00:00
|
|
|
chain->endcaps = caps;
|
2013-03-30 16:17:04 +00:00
|
|
|
gst_object_replace ((GstObject **) & chain->current_pad, NULL);
|
2010-05-06 16:50:51 +00:00
|
|
|
|
|
|
|
/* Try to expose anything */
|
|
|
|
EXPOSE_LOCK (dbin);
|
2015-02-04 11:46:09 +00:00
|
|
|
if (dbin->decode_chain) {
|
|
|
|
if (gst_decode_chain_is_complete (dbin->decode_chain)) {
|
|
|
|
gst_decode_bin_expose (dbin);
|
|
|
|
}
|
2010-05-06 16:50:51 +00:00
|
|
|
}
|
|
|
|
EXPOSE_UNLOCK (dbin);
|
|
|
|
do_async_done (dbin);
|
|
|
|
|
2015-10-15 16:40:43 +00:00
|
|
|
return FALSE;
|
2010-05-06 16:50:51 +00:00
|
|
|
}
|
|
|
|
|
gst/playback/: New decodebin2 element.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstdecodebin2.c: (gst_decode_bin_get_type),
(_gst_boolean_accumulator), (gst_decode_bin_class_init),
(gst_decode_bin_factory_filter), (compare_ranks), (print_feature),
(gst_decode_bin_init), (gst_decode_bin_dispose),
(gst_decode_bin_finalize), (gst_decode_bin_set_property),
(gst_decode_bin_get_property), (gst_decode_bin_set_caps),
(gst_decode_bin_get_caps), (gst_decode_bin_autoplug_continue),
(gst_decode_bin_autoplug_sort), (analyze_new_pad), (connect_pad),
(connect_element), (expose_pad), (type_found),
(pad_added_group_cb), (pad_removed_group_cb),
(no_more_pads_group_cb), (pad_added_cb), (pad_removed_cb),
(no_more_pads_cb), (find_compatibles), (is_demuxer_element),
(are_raw_caps), (multi_queue_overrun_cb),
(multi_queue_underrun_cb), (gst_decode_group_new),
(get_current_group), (group_demuxer_event_probe),
(gst_decode_group_control_demuxer_pad),
(gst_decode_group_control_source_pad),
(gst_decode_group_check_if_blocked),
(gst_decode_group_check_if_drained), (gst_decode_group_expose),
(gst_decode_group_hide), (gst_decode_group_free),
(gst_decode_group_set_complete), (source_pad_blocked_cb),
(source_pad_event_probe), (gst_decode_pad_new), (add_fakesink),
(remove_fakesink), (find_sink_pad), (gst_decode_bin_change_state),
(plugin_init):
New decodebin2 element.
Closes #370092
* gst/playback/gstplay-marshal.list:
Added marshallers for new signals in decodebin2
* gst/playback/gstplaybasebin.c: (setup_subtitle), (make_decoder):
Use decodebin2 if *and only if* the USE_DECODEBIN2 environment variable
is set.
2006-11-28 14:40:39 +00:00
|
|
|
unknown_type:
|
|
|
|
{
|
2010-02-15 07:26:05 +00:00
|
|
|
GST_LOG_OBJECT (pad, "Unknown type, posting message and firing signal");
|
2007-01-17 16:11:14 +00:00
|
|
|
|
2014-08-25 17:59:40 +00:00
|
|
|
chain->deadend_details = deadend_details;
|
2009-09-26 10:17:49 +00:00
|
|
|
chain->deadend = TRUE;
|
2014-07-23 17:51:36 +00:00
|
|
|
chain->endcaps = caps;
|
2013-03-30 16:17:04 +00:00
|
|
|
gst_object_replace ((GstObject **) & chain->current_pad, NULL);
|
2007-01-17 16:11:14 +00:00
|
|
|
|
2009-08-31 09:10:55 +00:00
|
|
|
gst_element_post_message (GST_ELEMENT_CAST (dbin),
|
|
|
|
gst_missing_decoder_message_new (GST_ELEMENT_CAST (dbin), caps));
|
|
|
|
|
2010-02-15 07:26:05 +00:00
|
|
|
g_signal_emit (G_OBJECT (dbin),
|
|
|
|
gst_decode_bin_signals[SIGNAL_UNKNOWN_TYPE], 0, pad, caps);
|
|
|
|
|
2009-09-26 10:17:49 +00:00
|
|
|
/* Try to expose anything */
|
|
|
|
EXPOSE_LOCK (dbin);
|
2015-02-04 11:46:09 +00:00
|
|
|
if (dbin->decode_chain) {
|
|
|
|
if (gst_decode_chain_is_complete (dbin->decode_chain)) {
|
|
|
|
gst_decode_bin_expose (dbin);
|
|
|
|
}
|
2009-09-26 10:17:49 +00:00
|
|
|
}
|
|
|
|
EXPOSE_UNLOCK (dbin);
|
|
|
|
|
2007-10-30 15:54:46 +00:00
|
|
|
if (src == dbin->typefind) {
|
2014-08-25 12:15:06 +00:00
|
|
|
if (!caps || gst_caps_is_empty (caps)) {
|
2009-08-05 13:36:30 +00:00
|
|
|
GST_ELEMENT_ERROR (dbin, STREAM, TYPE_NOT_FOUND,
|
2014-08-25 12:15:06 +00:00
|
|
|
(_("Could not determine type of stream")), (NULL));
|
2009-08-05 13:36:30 +00:00
|
|
|
}
|
2010-09-29 16:54:28 +00:00
|
|
|
do_async_done (dbin);
|
2007-10-30 15:54:46 +00:00
|
|
|
}
|
2015-10-15 16:40:43 +00:00
|
|
|
return FALSE;
|
gst/playback/: New decodebin2 element.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstdecodebin2.c: (gst_decode_bin_get_type),
(_gst_boolean_accumulator), (gst_decode_bin_class_init),
(gst_decode_bin_factory_filter), (compare_ranks), (print_feature),
(gst_decode_bin_init), (gst_decode_bin_dispose),
(gst_decode_bin_finalize), (gst_decode_bin_set_property),
(gst_decode_bin_get_property), (gst_decode_bin_set_caps),
(gst_decode_bin_get_caps), (gst_decode_bin_autoplug_continue),
(gst_decode_bin_autoplug_sort), (analyze_new_pad), (connect_pad),
(connect_element), (expose_pad), (type_found),
(pad_added_group_cb), (pad_removed_group_cb),
(no_more_pads_group_cb), (pad_added_cb), (pad_removed_cb),
(no_more_pads_cb), (find_compatibles), (is_demuxer_element),
(are_raw_caps), (multi_queue_overrun_cb),
(multi_queue_underrun_cb), (gst_decode_group_new),
(get_current_group), (group_demuxer_event_probe),
(gst_decode_group_control_demuxer_pad),
(gst_decode_group_control_source_pad),
(gst_decode_group_check_if_blocked),
(gst_decode_group_check_if_drained), (gst_decode_group_expose),
(gst_decode_group_hide), (gst_decode_group_free),
(gst_decode_group_set_complete), (source_pad_blocked_cb),
(source_pad_event_probe), (gst_decode_pad_new), (add_fakesink),
(remove_fakesink), (find_sink_pad), (gst_decode_bin_change_state),
(plugin_init):
New decodebin2 element.
Closes #370092
* gst/playback/gstplay-marshal.list:
Added marshallers for new signals in decodebin2
* gst/playback/gstplaybasebin.c: (setup_subtitle), (make_decoder):
Use decodebin2 if *and only if* the USE_DECODEBIN2 environment variable
is set.
2006-11-28 14:40:39 +00:00
|
|
|
}
|
2007-06-05 16:05:19 +00:00
|
|
|
non_fixed:
|
|
|
|
{
|
|
|
|
GST_DEBUG_OBJECT (pad, "pad has non-fixed caps delay autoplugging");
|
gst/playback/gstdecodebin2.c (struct _GstDecodePad): Change to be a subclass of GstGhostPad.
Original commit message from CVS:
2008-10-08 Andy Wingo <wingo@pobox.com>
* gst/playback/gstdecodebin2.c (struct _GstDecodePad): Change to
be a subclass of GstGhostPad.
(analyze_new_pad): So, when emitting the signals that determine
how we do autoplugging, already create the ghost pad and use it as
the pad in the signal arguments. This allows applications to make
a connection between the pad passed in e.g. autoplug-continue, and
the pad passed in new-decoded-pad.
(connect_pad, expose_pad): Update to receive the ghosted decode
pad in the args, retargetting it as necessary if we have to plug
the target pad through a multiqueue.
(gst_decode_group_control_source_pad): Adapt to receive an
already-ghosted pad that just needs activation, blocking, and
drain notification.
(sort_end_pads): Adapt for decode pads actually being pads.
(gst_decode_group_expose): Adapt for decode pads actually being
pads. Rewrite the decode pad names so they appear in order. Adds a
new error case if we couldn't set the name.
(gst_decode_group_free, gst_decode_group_hide): Adapt cleanup
logic.
(gst_decode_pad_set_blocked, gst_decode_pad_add_drained_check):
New API for the decode pad, needed because we shouldn't do these
things inside gst_decode_pad_new(), but after.
(gst_decode_pad_new): Change to actually make the real pad, and
delay the blocking/drainage bits.
2008-10-08 12:49:40 +00:00
|
|
|
gst_object_unref (dpad);
|
2007-06-05 16:05:19 +00:00
|
|
|
goto setup_caps_delay;
|
|
|
|
}
|
gst/playback/: New decodebin2 element.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstdecodebin2.c: (gst_decode_bin_get_type),
(_gst_boolean_accumulator), (gst_decode_bin_class_init),
(gst_decode_bin_factory_filter), (compare_ranks), (print_feature),
(gst_decode_bin_init), (gst_decode_bin_dispose),
(gst_decode_bin_finalize), (gst_decode_bin_set_property),
(gst_decode_bin_get_property), (gst_decode_bin_set_caps),
(gst_decode_bin_get_caps), (gst_decode_bin_autoplug_continue),
(gst_decode_bin_autoplug_sort), (analyze_new_pad), (connect_pad),
(connect_element), (expose_pad), (type_found),
(pad_added_group_cb), (pad_removed_group_cb),
(no_more_pads_group_cb), (pad_added_cb), (pad_removed_cb),
(no_more_pads_cb), (find_compatibles), (is_demuxer_element),
(are_raw_caps), (multi_queue_overrun_cb),
(multi_queue_underrun_cb), (gst_decode_group_new),
(get_current_group), (group_demuxer_event_probe),
(gst_decode_group_control_demuxer_pad),
(gst_decode_group_control_source_pad),
(gst_decode_group_check_if_blocked),
(gst_decode_group_check_if_drained), (gst_decode_group_expose),
(gst_decode_group_hide), (gst_decode_group_free),
(gst_decode_group_set_complete), (source_pad_blocked_cb),
(source_pad_event_probe), (gst_decode_pad_new), (add_fakesink),
(remove_fakesink), (find_sink_pad), (gst_decode_bin_change_state),
(plugin_init):
New decodebin2 element.
Closes #370092
* gst/playback/gstplay-marshal.list:
Added marshallers for new signals in decodebin2
* gst/playback/gstplaybasebin.c: (setup_subtitle), (make_decoder):
Use decodebin2 if *and only if* the USE_DECODEBIN2 environment variable
is set.
2006-11-28 14:40:39 +00:00
|
|
|
any_caps:
|
|
|
|
{
|
2012-07-11 08:31:09 +00:00
|
|
|
GST_DEBUG_OBJECT (pad, "pad has ANY caps, delaying auto-pluggin");
|
2007-06-05 16:05:19 +00:00
|
|
|
goto setup_caps_delay;
|
|
|
|
}
|
|
|
|
setup_caps_delay:
|
|
|
|
{
|
2009-11-19 17:51:33 +00:00
|
|
|
GstPendingPad *ppad;
|
|
|
|
|
2007-06-05 16:05:19 +00:00
|
|
|
/* connect to caps notification */
|
2009-09-26 10:17:49 +00:00
|
|
|
CHAIN_MUTEX_LOCK (chain);
|
|
|
|
GST_LOG_OBJECT (dbin, "Chain %p has now %d dynamic pads", chain,
|
|
|
|
g_list_length (chain->pending_pads));
|
2009-11-19 17:51:33 +00:00
|
|
|
ppad = g_slice_new0 (GstPendingPad);
|
|
|
|
ppad->pad = gst_object_ref (pad);
|
|
|
|
ppad->chain = chain;
|
|
|
|
ppad->event_probe_id =
|
2011-11-07 16:10:48 +00:00
|
|
|
gst_pad_add_probe (pad, GST_PAD_PROBE_TYPE_EVENT_DOWNSTREAM,
|
|
|
|
pad_event_cb, ppad, NULL);
|
2009-11-19 17:51:33 +00:00
|
|
|
chain->pending_pads = g_list_prepend (chain->pending_pads, ppad);
|
2013-05-22 15:29:17 +00:00
|
|
|
ppad->notify_caps_id = g_signal_connect (pad, "notify::caps",
|
2009-09-26 10:17:49 +00:00
|
|
|
G_CALLBACK (caps_notify_cb), chain);
|
2011-08-31 10:39:18 +00:00
|
|
|
CHAIN_MUTEX_UNLOCK (chain);
|
2011-09-07 14:43:36 +00:00
|
|
|
|
|
|
|
/* If we're here because we have a Parser/Converter
|
|
|
|
* we have to unref the pad */
|
|
|
|
if (is_parser_converter)
|
|
|
|
gst_object_unref (pad);
|
2014-07-23 17:51:36 +00:00
|
|
|
if (caps)
|
|
|
|
gst_caps_unref (caps);
|
2011-09-07 14:43:36 +00:00
|
|
|
|
2015-10-15 16:40:43 +00:00
|
|
|
return FALSE;
|
gst/playback/: New decodebin2 element.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstdecodebin2.c: (gst_decode_bin_get_type),
(_gst_boolean_accumulator), (gst_decode_bin_class_init),
(gst_decode_bin_factory_filter), (compare_ranks), (print_feature),
(gst_decode_bin_init), (gst_decode_bin_dispose),
(gst_decode_bin_finalize), (gst_decode_bin_set_property),
(gst_decode_bin_get_property), (gst_decode_bin_set_caps),
(gst_decode_bin_get_caps), (gst_decode_bin_autoplug_continue),
(gst_decode_bin_autoplug_sort), (analyze_new_pad), (connect_pad),
(connect_element), (expose_pad), (type_found),
(pad_added_group_cb), (pad_removed_group_cb),
(no_more_pads_group_cb), (pad_added_cb), (pad_removed_cb),
(no_more_pads_cb), (find_compatibles), (is_demuxer_element),
(are_raw_caps), (multi_queue_overrun_cb),
(multi_queue_underrun_cb), (gst_decode_group_new),
(get_current_group), (group_demuxer_event_probe),
(gst_decode_group_control_demuxer_pad),
(gst_decode_group_control_source_pad),
(gst_decode_group_check_if_blocked),
(gst_decode_group_check_if_drained), (gst_decode_group_expose),
(gst_decode_group_hide), (gst_decode_group_free),
(gst_decode_group_set_complete), (source_pad_blocked_cb),
(source_pad_event_probe), (gst_decode_pad_new), (add_fakesink),
(remove_fakesink), (find_sink_pad), (gst_decode_bin_change_state),
(plugin_init):
New decodebin2 element.
Closes #370092
* gst/playback/gstplay-marshal.list:
Added marshallers for new signals in decodebin2
* gst/playback/gstplaybasebin.c: (setup_subtitle), (make_decoder):
Use decodebin2 if *and only if* the USE_DECODEBIN2 environment variable
is set.
2006-11-28 14:40:39 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2011-10-13 15:34:49 +00:00
|
|
|
static void
|
|
|
|
add_error_filter (GstDecodeBin * dbin, GstElement * element)
|
|
|
|
{
|
|
|
|
GST_OBJECT_LOCK (dbin);
|
|
|
|
dbin->filtered = g_list_prepend (dbin->filtered, element);
|
|
|
|
GST_OBJECT_UNLOCK (dbin);
|
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
2014-08-25 17:59:40 +00:00
|
|
|
remove_error_filter (GstDecodeBin * dbin, GstElement * element,
|
|
|
|
GstMessage ** error)
|
2011-10-13 15:34:49 +00:00
|
|
|
{
|
2014-08-25 17:59:40 +00:00
|
|
|
GList *l;
|
|
|
|
|
2011-10-13 15:34:49 +00:00
|
|
|
GST_OBJECT_LOCK (dbin);
|
|
|
|
dbin->filtered = g_list_remove (dbin->filtered, element);
|
2014-08-25 17:59:40 +00:00
|
|
|
|
|
|
|
if (error)
|
|
|
|
*error = NULL;
|
|
|
|
|
|
|
|
l = dbin->filtered_errors;
|
|
|
|
while (l) {
|
|
|
|
GstMessage *msg = l->data;
|
|
|
|
|
|
|
|
if (GST_MESSAGE_SRC (msg) == GST_OBJECT_CAST (element)) {
|
|
|
|
/* Get the last error of this element, i.e. the earliest */
|
|
|
|
if (error)
|
|
|
|
gst_message_replace (error, msg);
|
|
|
|
gst_message_unref (msg);
|
2015-02-26 11:06:23 +00:00
|
|
|
l = dbin->filtered_errors = g_list_delete_link (dbin->filtered_errors, l);
|
2014-08-25 17:59:40 +00:00
|
|
|
} else {
|
|
|
|
l = l->next;
|
|
|
|
}
|
|
|
|
}
|
2011-10-13 15:34:49 +00:00
|
|
|
GST_OBJECT_UNLOCK (dbin);
|
|
|
|
}
|
gst/playback/: New decodebin2 element.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstdecodebin2.c: (gst_decode_bin_get_type),
(_gst_boolean_accumulator), (gst_decode_bin_class_init),
(gst_decode_bin_factory_filter), (compare_ranks), (print_feature),
(gst_decode_bin_init), (gst_decode_bin_dispose),
(gst_decode_bin_finalize), (gst_decode_bin_set_property),
(gst_decode_bin_get_property), (gst_decode_bin_set_caps),
(gst_decode_bin_get_caps), (gst_decode_bin_autoplug_continue),
(gst_decode_bin_autoplug_sort), (analyze_new_pad), (connect_pad),
(connect_element), (expose_pad), (type_found),
(pad_added_group_cb), (pad_removed_group_cb),
(no_more_pads_group_cb), (pad_added_cb), (pad_removed_cb),
(no_more_pads_cb), (find_compatibles), (is_demuxer_element),
(are_raw_caps), (multi_queue_overrun_cb),
(multi_queue_underrun_cb), (gst_decode_group_new),
(get_current_group), (group_demuxer_event_probe),
(gst_decode_group_control_demuxer_pad),
(gst_decode_group_control_source_pad),
(gst_decode_group_check_if_blocked),
(gst_decode_group_check_if_drained), (gst_decode_group_expose),
(gst_decode_group_hide), (gst_decode_group_free),
(gst_decode_group_set_complete), (source_pad_blocked_cb),
(source_pad_event_probe), (gst_decode_pad_new), (add_fakesink),
(remove_fakesink), (find_sink_pad), (gst_decode_bin_change_state),
(plugin_init):
New decodebin2 element.
Closes #370092
* gst/playback/gstplay-marshal.list:
Added marshallers for new signals in decodebin2
* gst/playback/gstplaybasebin.c: (setup_subtitle), (make_decoder):
Use decodebin2 if *and only if* the USE_DECODEBIN2 environment variable
is set.
2006-11-28 14:40:39 +00:00
|
|
|
|
2014-07-10 10:51:22 +00:00
|
|
|
typedef struct
|
|
|
|
{
|
|
|
|
gboolean ret;
|
|
|
|
GstPad *peer;
|
|
|
|
} SendStickyEventsData;
|
|
|
|
|
|
|
|
static gboolean
|
|
|
|
send_sticky_event (GstPad * pad, GstEvent ** event, gpointer user_data)
|
|
|
|
{
|
|
|
|
SendStickyEventsData *data = user_data;
|
|
|
|
gboolean ret;
|
|
|
|
|
|
|
|
ret = gst_pad_send_event (data->peer, gst_event_ref (*event));
|
|
|
|
if (!ret)
|
|
|
|
data->ret = FALSE;
|
|
|
|
|
|
|
|
return data->ret;
|
|
|
|
}
|
|
|
|
|
|
|
|
static gboolean
|
|
|
|
send_sticky_events (GstDecodeBin * dbin, GstPad * pad)
|
|
|
|
{
|
|
|
|
SendStickyEventsData data;
|
|
|
|
|
|
|
|
data.ret = TRUE;
|
|
|
|
data.peer = gst_pad_get_peer (pad);
|
|
|
|
|
|
|
|
gst_pad_sticky_events_foreach (pad, send_sticky_event, &data);
|
|
|
|
|
|
|
|
gst_object_unref (data.peer);
|
|
|
|
|
|
|
|
return data.ret;
|
|
|
|
}
|
|
|
|
|
2014-08-25 17:59:40 +00:00
|
|
|
static gchar *
|
|
|
|
error_message_to_string (GstMessage * msg)
|
|
|
|
{
|
|
|
|
GError *err;
|
|
|
|
gchar *debug, *message, *full_message;
|
|
|
|
|
|
|
|
gst_message_parse_error (msg, &err, &debug);
|
|
|
|
|
|
|
|
message = gst_error_get_message (err->domain, err->code);
|
|
|
|
|
|
|
|
if (debug)
|
|
|
|
full_message = g_strdup_printf ("%s\n%s\n%s", message, err->message, debug);
|
|
|
|
else
|
|
|
|
full_message = g_strdup_printf ("%s\n%s", message, err->message);
|
|
|
|
|
|
|
|
g_free (message);
|
|
|
|
g_free (debug);
|
|
|
|
g_clear_error (&err);
|
|
|
|
|
|
|
|
return full_message;
|
|
|
|
}
|
|
|
|
|
2015-05-04 09:19:28 +00:00
|
|
|
static GstPadProbeReturn
|
|
|
|
demuxer_source_pad_probe (GstPad * pad, GstPadProbeInfo * info,
|
|
|
|
gpointer user_data)
|
|
|
|
{
|
|
|
|
GstEvent *event = GST_PAD_PROBE_INFO_EVENT (info);
|
|
|
|
GstDecodeGroup *group = (GstDecodeGroup *) user_data;
|
|
|
|
GstDecodeChain *parent_chain = group->parent;
|
|
|
|
|
|
|
|
GST_DEBUG_OBJECT (pad, "Saw event %s", GST_EVENT_TYPE_NAME (event));
|
|
|
|
/* Check if we are the active group, if not we need to proxy the flush
|
|
|
|
* events to the other groups (of which at least one is exposed, ensuring
|
|
|
|
* flushing properly propagates downstream of decodebin */
|
|
|
|
if (parent_chain->active_group == group)
|
|
|
|
return GST_PAD_PROBE_OK;
|
|
|
|
|
|
|
|
switch (GST_EVENT_TYPE (event)) {
|
|
|
|
case GST_EVENT_FLUSH_START:
|
|
|
|
case GST_EVENT_FLUSH_STOP:
|
|
|
|
{
|
|
|
|
GList *tmp;
|
|
|
|
GST_DEBUG_OBJECT (pad, "Proxying flush events to inactive groups");
|
|
|
|
/* Proxy to active group */
|
|
|
|
for (tmp = parent_chain->active_group->reqpads; tmp; tmp = tmp->next) {
|
|
|
|
GstPad *reqpad = (GstPad *) tmp->data;
|
|
|
|
gst_pad_send_event (reqpad, gst_event_ref (event));
|
|
|
|
}
|
|
|
|
/* Proxy to other non-active groups (except ourself) */
|
|
|
|
for (tmp = parent_chain->next_groups; tmp; tmp = tmp->next) {
|
|
|
|
GList *tmp2;
|
|
|
|
GstDecodeGroup *tmpgroup = (GstDecodeGroup *) tmp->data;
|
|
|
|
if (tmpgroup != group) {
|
2015-08-16 10:53:02 +00:00
|
|
|
for (tmp2 = tmpgroup->reqpads; tmp2; tmp2 = tmp2->next) {
|
2015-05-04 09:19:28 +00:00
|
|
|
GstPad *reqpad = (GstPad *) tmp2->data;
|
|
|
|
gst_pad_send_event (reqpad, gst_event_ref (event));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
flush_chain (parent_chain,
|
|
|
|
GST_EVENT_TYPE (event) == GST_EVENT_FLUSH_START);
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
default:
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
|
|
|
return GST_PAD_PROBE_OK;
|
|
|
|
}
|
|
|
|
|
2016-01-21 16:30:40 +00:00
|
|
|
typedef struct
|
|
|
|
{
|
|
|
|
GstDecodeChain *chain;
|
|
|
|
GstPad *pad;
|
|
|
|
} PadExposeData;
|
|
|
|
|
2007-03-02 12:59:15 +00:00
|
|
|
/* connect_pad:
|
gst/playback/: New decodebin2 element.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstdecodebin2.c: (gst_decode_bin_get_type),
(_gst_boolean_accumulator), (gst_decode_bin_class_init),
(gst_decode_bin_factory_filter), (compare_ranks), (print_feature),
(gst_decode_bin_init), (gst_decode_bin_dispose),
(gst_decode_bin_finalize), (gst_decode_bin_set_property),
(gst_decode_bin_get_property), (gst_decode_bin_set_caps),
(gst_decode_bin_get_caps), (gst_decode_bin_autoplug_continue),
(gst_decode_bin_autoplug_sort), (analyze_new_pad), (connect_pad),
(connect_element), (expose_pad), (type_found),
(pad_added_group_cb), (pad_removed_group_cb),
(no_more_pads_group_cb), (pad_added_cb), (pad_removed_cb),
(no_more_pads_cb), (find_compatibles), (is_demuxer_element),
(are_raw_caps), (multi_queue_overrun_cb),
(multi_queue_underrun_cb), (gst_decode_group_new),
(get_current_group), (group_demuxer_event_probe),
(gst_decode_group_control_demuxer_pad),
(gst_decode_group_control_source_pad),
(gst_decode_group_check_if_blocked),
(gst_decode_group_check_if_drained), (gst_decode_group_expose),
(gst_decode_group_hide), (gst_decode_group_free),
(gst_decode_group_set_complete), (source_pad_blocked_cb),
(source_pad_event_probe), (gst_decode_pad_new), (add_fakesink),
(remove_fakesink), (find_sink_pad), (gst_decode_bin_change_state),
(plugin_init):
New decodebin2 element.
Closes #370092
* gst/playback/gstplay-marshal.list:
Added marshallers for new signals in decodebin2
* gst/playback/gstplaybasebin.c: (setup_subtitle), (make_decoder):
Use decodebin2 if *and only if* the USE_DECODEBIN2 environment variable
is set.
2006-11-28 14:40:39 +00:00
|
|
|
*
|
|
|
|
* Try to connect the given pad to an element created from one of the factories,
|
|
|
|
* and recursively.
|
|
|
|
*
|
gst/playback/gstdecodebin2.c (struct _GstDecodePad): Change to be a subclass of GstGhostPad.
Original commit message from CVS:
2008-10-08 Andy Wingo <wingo@pobox.com>
* gst/playback/gstdecodebin2.c (struct _GstDecodePad): Change to
be a subclass of GstGhostPad.
(analyze_new_pad): So, when emitting the signals that determine
how we do autoplugging, already create the ghost pad and use it as
the pad in the signal arguments. This allows applications to make
a connection between the pad passed in e.g. autoplug-continue, and
the pad passed in new-decoded-pad.
(connect_pad, expose_pad): Update to receive the ghosted decode
pad in the args, retargetting it as necessary if we have to plug
the target pad through a multiqueue.
(gst_decode_group_control_source_pad): Adapt to receive an
already-ghosted pad that just needs activation, blocking, and
drain notification.
(sort_end_pads): Adapt for decode pads actually being pads.
(gst_decode_group_expose): Adapt for decode pads actually being
pads. Rewrite the decode pad names so they appear in order. Adds a
new error case if we couldn't set the name.
(gst_decode_group_free, gst_decode_group_hide): Adapt cleanup
logic.
(gst_decode_pad_set_blocked, gst_decode_pad_add_drained_check):
New API for the decode pad, needed because we shouldn't do these
things inside gst_decode_pad_new(), but after.
(gst_decode_pad_new): Change to actually make the real pad, and
delay the blocking/drainage bits.
2008-10-08 12:49:40 +00:00
|
|
|
* Note that dpad is ghosting pad, and so pad is linked; be sure to unset dpad's
|
|
|
|
* target before trying to link pad.
|
|
|
|
*
|
gst/playback/: New decodebin2 element.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstdecodebin2.c: (gst_decode_bin_get_type),
(_gst_boolean_accumulator), (gst_decode_bin_class_init),
(gst_decode_bin_factory_filter), (compare_ranks), (print_feature),
(gst_decode_bin_init), (gst_decode_bin_dispose),
(gst_decode_bin_finalize), (gst_decode_bin_set_property),
(gst_decode_bin_get_property), (gst_decode_bin_set_caps),
(gst_decode_bin_get_caps), (gst_decode_bin_autoplug_continue),
(gst_decode_bin_autoplug_sort), (analyze_new_pad), (connect_pad),
(connect_element), (expose_pad), (type_found),
(pad_added_group_cb), (pad_removed_group_cb),
(no_more_pads_group_cb), (pad_added_cb), (pad_removed_cb),
(no_more_pads_cb), (find_compatibles), (is_demuxer_element),
(are_raw_caps), (multi_queue_overrun_cb),
(multi_queue_underrun_cb), (gst_decode_group_new),
(get_current_group), (group_demuxer_event_probe),
(gst_decode_group_control_demuxer_pad),
(gst_decode_group_control_source_pad),
(gst_decode_group_check_if_blocked),
(gst_decode_group_check_if_drained), (gst_decode_group_expose),
(gst_decode_group_hide), (gst_decode_group_free),
(gst_decode_group_set_complete), (source_pad_blocked_cb),
(source_pad_event_probe), (gst_decode_pad_new), (add_fakesink),
(remove_fakesink), (find_sink_pad), (gst_decode_bin_change_state),
(plugin_init):
New decodebin2 element.
Closes #370092
* gst/playback/gstplay-marshal.list:
Added marshallers for new signals in decodebin2
* gst/playback/gstplaybasebin.c: (setup_subtitle), (make_decoder):
Use decodebin2 if *and only if* the USE_DECODEBIN2 environment variable
is set.
2006-11-28 14:40:39 +00:00
|
|
|
* Returns TRUE if an element was properly created and linked
|
|
|
|
*/
|
|
|
|
static gboolean
|
gst/playback/gstdecodebin2.c (struct _GstDecodePad): Change to be a subclass of GstGhostPad.
Original commit message from CVS:
2008-10-08 Andy Wingo <wingo@pobox.com>
* gst/playback/gstdecodebin2.c (struct _GstDecodePad): Change to
be a subclass of GstGhostPad.
(analyze_new_pad): So, when emitting the signals that determine
how we do autoplugging, already create the ghost pad and use it as
the pad in the signal arguments. This allows applications to make
a connection between the pad passed in e.g. autoplug-continue, and
the pad passed in new-decoded-pad.
(connect_pad, expose_pad): Update to receive the ghosted decode
pad in the args, retargetting it as necessary if we have to plug
the target pad through a multiqueue.
(gst_decode_group_control_source_pad): Adapt to receive an
already-ghosted pad that just needs activation, blocking, and
drain notification.
(sort_end_pads): Adapt for decode pads actually being pads.
(gst_decode_group_expose): Adapt for decode pads actually being
pads. Rewrite the decode pad names so they appear in order. Adds a
new error case if we couldn't set the name.
(gst_decode_group_free, gst_decode_group_hide): Adapt cleanup
logic.
(gst_decode_pad_set_blocked, gst_decode_pad_add_drained_check):
New API for the decode pad, needed because we shouldn't do these
things inside gst_decode_pad_new(), but after.
(gst_decode_pad_new): Change to actually make the real pad, and
delay the blocking/drainage bits.
2008-10-08 12:49:40 +00:00
|
|
|
connect_pad (GstDecodeBin * dbin, GstElement * src, GstDecodePad * dpad,
|
|
|
|
GstPad * pad, GstCaps * caps, GValueArray * factories,
|
2014-08-25 17:59:40 +00:00
|
|
|
GstDecodeChain * chain, gchar ** deadend_details)
|
gst/playback/: New decodebin2 element.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstdecodebin2.c: (gst_decode_bin_get_type),
(_gst_boolean_accumulator), (gst_decode_bin_class_init),
(gst_decode_bin_factory_filter), (compare_ranks), (print_feature),
(gst_decode_bin_init), (gst_decode_bin_dispose),
(gst_decode_bin_finalize), (gst_decode_bin_set_property),
(gst_decode_bin_get_property), (gst_decode_bin_set_caps),
(gst_decode_bin_get_caps), (gst_decode_bin_autoplug_continue),
(gst_decode_bin_autoplug_sort), (analyze_new_pad), (connect_pad),
(connect_element), (expose_pad), (type_found),
(pad_added_group_cb), (pad_removed_group_cb),
(no_more_pads_group_cb), (pad_added_cb), (pad_removed_cb),
(no_more_pads_cb), (find_compatibles), (is_demuxer_element),
(are_raw_caps), (multi_queue_overrun_cb),
(multi_queue_underrun_cb), (gst_decode_group_new),
(get_current_group), (group_demuxer_event_probe),
(gst_decode_group_control_demuxer_pad),
(gst_decode_group_control_source_pad),
(gst_decode_group_check_if_blocked),
(gst_decode_group_check_if_drained), (gst_decode_group_expose),
(gst_decode_group_hide), (gst_decode_group_free),
(gst_decode_group_set_complete), (source_pad_blocked_cb),
(source_pad_event_probe), (gst_decode_pad_new), (add_fakesink),
(remove_fakesink), (find_sink_pad), (gst_decode_bin_change_state),
(plugin_init):
New decodebin2 element.
Closes #370092
* gst/playback/gstplay-marshal.list:
Added marshallers for new signals in decodebin2
* gst/playback/gstplaybasebin.c: (setup_subtitle), (make_decoder):
Use decodebin2 if *and only if* the USE_DECODEBIN2 environment variable
is set.
2006-11-28 14:40:39 +00:00
|
|
|
{
|
|
|
|
gboolean res = FALSE;
|
2007-04-03 11:10:52 +00:00
|
|
|
GstPad *mqpad = NULL;
|
2009-09-26 10:17:49 +00:00
|
|
|
gboolean is_demuxer = chain->parent && !chain->elements; /* First pad after the demuxer */
|
2014-08-25 17:59:40 +00:00
|
|
|
GString *error_details = NULL;
|
gst/playback/: New decodebin2 element.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstdecodebin2.c: (gst_decode_bin_get_type),
(_gst_boolean_accumulator), (gst_decode_bin_class_init),
(gst_decode_bin_factory_filter), (compare_ranks), (print_feature),
(gst_decode_bin_init), (gst_decode_bin_dispose),
(gst_decode_bin_finalize), (gst_decode_bin_set_property),
(gst_decode_bin_get_property), (gst_decode_bin_set_caps),
(gst_decode_bin_get_caps), (gst_decode_bin_autoplug_continue),
(gst_decode_bin_autoplug_sort), (analyze_new_pad), (connect_pad),
(connect_element), (expose_pad), (type_found),
(pad_added_group_cb), (pad_removed_group_cb),
(no_more_pads_group_cb), (pad_added_cb), (pad_removed_cb),
(no_more_pads_cb), (find_compatibles), (is_demuxer_element),
(are_raw_caps), (multi_queue_overrun_cb),
(multi_queue_underrun_cb), (gst_decode_group_new),
(get_current_group), (group_demuxer_event_probe),
(gst_decode_group_control_demuxer_pad),
(gst_decode_group_control_source_pad),
(gst_decode_group_check_if_blocked),
(gst_decode_group_check_if_drained), (gst_decode_group_expose),
(gst_decode_group_hide), (gst_decode_group_free),
(gst_decode_group_set_complete), (source_pad_blocked_cb),
(source_pad_event_probe), (gst_decode_pad_new), (add_fakesink),
(remove_fakesink), (find_sink_pad), (gst_decode_bin_change_state),
(plugin_init):
New decodebin2 element.
Closes #370092
* gst/playback/gstplay-marshal.list:
Added marshallers for new signals in decodebin2
* gst/playback/gstplaybasebin.c: (setup_subtitle), (make_decoder):
Use decodebin2 if *and only if* the USE_DECODEBIN2 environment variable
is set.
2006-11-28 14:40:39 +00:00
|
|
|
|
|
|
|
g_return_val_if_fail (factories != NULL, FALSE);
|
2007-10-24 11:07:57 +00:00
|
|
|
g_return_val_if_fail (factories->n_values > 0, FALSE);
|
|
|
|
|
2012-07-11 13:39:24 +00:00
|
|
|
GST_DEBUG_OBJECT (dbin,
|
|
|
|
"pad %s:%s , chain:%p, %d factories, caps %" GST_PTR_FORMAT,
|
|
|
|
GST_DEBUG_PAD_NAME (pad), chain, factories->n_values, caps);
|
gst/playback/: New decodebin2 element.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstdecodebin2.c: (gst_decode_bin_get_type),
(_gst_boolean_accumulator), (gst_decode_bin_class_init),
(gst_decode_bin_factory_filter), (compare_ranks), (print_feature),
(gst_decode_bin_init), (gst_decode_bin_dispose),
(gst_decode_bin_finalize), (gst_decode_bin_set_property),
(gst_decode_bin_get_property), (gst_decode_bin_set_caps),
(gst_decode_bin_get_caps), (gst_decode_bin_autoplug_continue),
(gst_decode_bin_autoplug_sort), (analyze_new_pad), (connect_pad),
(connect_element), (expose_pad), (type_found),
(pad_added_group_cb), (pad_removed_group_cb),
(no_more_pads_group_cb), (pad_added_cb), (pad_removed_cb),
(no_more_pads_cb), (find_compatibles), (is_demuxer_element),
(are_raw_caps), (multi_queue_overrun_cb),
(multi_queue_underrun_cb), (gst_decode_group_new),
(get_current_group), (group_demuxer_event_probe),
(gst_decode_group_control_demuxer_pad),
(gst_decode_group_control_source_pad),
(gst_decode_group_check_if_blocked),
(gst_decode_group_check_if_drained), (gst_decode_group_expose),
(gst_decode_group_hide), (gst_decode_group_free),
(gst_decode_group_set_complete), (source_pad_blocked_cb),
(source_pad_event_probe), (gst_decode_pad_new), (add_fakesink),
(remove_fakesink), (find_sink_pad), (gst_decode_bin_change_state),
(plugin_init):
New decodebin2 element.
Closes #370092
* gst/playback/gstplay-marshal.list:
Added marshallers for new signals in decodebin2
* gst/playback/gstplaybasebin.c: (setup_subtitle), (make_decoder):
Use decodebin2 if *and only if* the USE_DECODEBIN2 environment variable
is set.
2006-11-28 14:40:39 +00:00
|
|
|
|
|
|
|
/* 1. is element demuxer or parser */
|
2009-09-26 10:17:49 +00:00
|
|
|
if (is_demuxer) {
|
|
|
|
GST_LOG_OBJECT (src,
|
|
|
|
"is a demuxer, connecting the pad through multiqueue '%s'",
|
|
|
|
GST_OBJECT_NAME (chain->parent->multiqueue));
|
gst/playback/: New decodebin2 element.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstdecodebin2.c: (gst_decode_bin_get_type),
(_gst_boolean_accumulator), (gst_decode_bin_class_init),
(gst_decode_bin_factory_filter), (compare_ranks), (print_feature),
(gst_decode_bin_init), (gst_decode_bin_dispose),
(gst_decode_bin_finalize), (gst_decode_bin_set_property),
(gst_decode_bin_get_property), (gst_decode_bin_set_caps),
(gst_decode_bin_get_caps), (gst_decode_bin_autoplug_continue),
(gst_decode_bin_autoplug_sort), (analyze_new_pad), (connect_pad),
(connect_element), (expose_pad), (type_found),
(pad_added_group_cb), (pad_removed_group_cb),
(no_more_pads_group_cb), (pad_added_cb), (pad_removed_cb),
(no_more_pads_cb), (find_compatibles), (is_demuxer_element),
(are_raw_caps), (multi_queue_overrun_cb),
(multi_queue_underrun_cb), (gst_decode_group_new),
(get_current_group), (group_demuxer_event_probe),
(gst_decode_group_control_demuxer_pad),
(gst_decode_group_control_source_pad),
(gst_decode_group_check_if_blocked),
(gst_decode_group_check_if_drained), (gst_decode_group_expose),
(gst_decode_group_hide), (gst_decode_group_free),
(gst_decode_group_set_complete), (source_pad_blocked_cb),
(source_pad_event_probe), (gst_decode_pad_new), (add_fakesink),
(remove_fakesink), (find_sink_pad), (gst_decode_bin_change_state),
(plugin_init):
New decodebin2 element.
Closes #370092
* gst/playback/gstplay-marshal.list:
Added marshallers for new signals in decodebin2
* gst/playback/gstplaybasebin.c: (setup_subtitle), (make_decoder):
Use decodebin2 if *and only if* the USE_DECODEBIN2 environment variable
is set.
2006-11-28 14:40:39 +00:00
|
|
|
|
2015-05-04 09:19:28 +00:00
|
|
|
/* Set a flush-start/-stop probe on the downstream events */
|
2017-05-03 15:02:19 +00:00
|
|
|
chain->pad_probe_id =
|
|
|
|
gst_pad_add_probe (pad, GST_PAD_PROBE_TYPE_EVENT_FLUSH,
|
2015-05-04 09:19:28 +00:00
|
|
|
demuxer_source_pad_probe, chain->parent, NULL);
|
|
|
|
|
2013-11-29 16:26:13 +00:00
|
|
|
decode_pad_set_target (dpad, NULL);
|
2009-09-26 10:17:49 +00:00
|
|
|
if (!(mqpad = gst_decode_group_control_demuxer_pad (chain->parent, pad)))
|
gst/playback/: New decodebin2 element.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstdecodebin2.c: (gst_decode_bin_get_type),
(_gst_boolean_accumulator), (gst_decode_bin_class_init),
(gst_decode_bin_factory_filter), (compare_ranks), (print_feature),
(gst_decode_bin_init), (gst_decode_bin_dispose),
(gst_decode_bin_finalize), (gst_decode_bin_set_property),
(gst_decode_bin_get_property), (gst_decode_bin_set_caps),
(gst_decode_bin_get_caps), (gst_decode_bin_autoplug_continue),
(gst_decode_bin_autoplug_sort), (analyze_new_pad), (connect_pad),
(connect_element), (expose_pad), (type_found),
(pad_added_group_cb), (pad_removed_group_cb),
(no_more_pads_group_cb), (pad_added_cb), (pad_removed_cb),
(no_more_pads_cb), (find_compatibles), (is_demuxer_element),
(are_raw_caps), (multi_queue_overrun_cb),
(multi_queue_underrun_cb), (gst_decode_group_new),
(get_current_group), (group_demuxer_event_probe),
(gst_decode_group_control_demuxer_pad),
(gst_decode_group_control_source_pad),
(gst_decode_group_check_if_blocked),
(gst_decode_group_check_if_drained), (gst_decode_group_expose),
(gst_decode_group_hide), (gst_decode_group_free),
(gst_decode_group_set_complete), (source_pad_blocked_cb),
(source_pad_event_probe), (gst_decode_pad_new), (add_fakesink),
(remove_fakesink), (find_sink_pad), (gst_decode_bin_change_state),
(plugin_init):
New decodebin2 element.
Closes #370092
* gst/playback/gstplay-marshal.list:
Added marshallers for new signals in decodebin2
* gst/playback/gstplaybasebin.c: (setup_subtitle), (make_decoder):
Use decodebin2 if *and only if* the USE_DECODEBIN2 environment variable
is set.
2006-11-28 14:40:39 +00:00
|
|
|
goto beach;
|
2009-09-26 10:17:49 +00:00
|
|
|
src = chain->parent->multiqueue;
|
2016-08-09 09:39:53 +00:00
|
|
|
/* Forward sticky events to mq src pad to allow factory initialization */
|
|
|
|
gst_pad_sticky_events_foreach (pad, copy_sticky_events, mqpad);
|
gst/playback/: New decodebin2 element.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstdecodebin2.c: (gst_decode_bin_get_type),
(_gst_boolean_accumulator), (gst_decode_bin_class_init),
(gst_decode_bin_factory_filter), (compare_ranks), (print_feature),
(gst_decode_bin_init), (gst_decode_bin_dispose),
(gst_decode_bin_finalize), (gst_decode_bin_set_property),
(gst_decode_bin_get_property), (gst_decode_bin_set_caps),
(gst_decode_bin_get_caps), (gst_decode_bin_autoplug_continue),
(gst_decode_bin_autoplug_sort), (analyze_new_pad), (connect_pad),
(connect_element), (expose_pad), (type_found),
(pad_added_group_cb), (pad_removed_group_cb),
(no_more_pads_group_cb), (pad_added_cb), (pad_removed_cb),
(no_more_pads_cb), (find_compatibles), (is_demuxer_element),
(are_raw_caps), (multi_queue_overrun_cb),
(multi_queue_underrun_cb), (gst_decode_group_new),
(get_current_group), (group_demuxer_event_probe),
(gst_decode_group_control_demuxer_pad),
(gst_decode_group_control_source_pad),
(gst_decode_group_check_if_blocked),
(gst_decode_group_check_if_drained), (gst_decode_group_expose),
(gst_decode_group_hide), (gst_decode_group_free),
(gst_decode_group_set_complete), (source_pad_blocked_cb),
(source_pad_event_probe), (gst_decode_pad_new), (add_fakesink),
(remove_fakesink), (find_sink_pad), (gst_decode_bin_change_state),
(plugin_init):
New decodebin2 element.
Closes #370092
* gst/playback/gstplay-marshal.list:
Added marshallers for new signals in decodebin2
* gst/playback/gstplaybasebin.c: (setup_subtitle), (make_decoder):
Use decodebin2 if *and only if* the USE_DECODEBIN2 environment variable
is set.
2006-11-28 14:40:39 +00:00
|
|
|
pad = mqpad;
|
2013-11-29 16:26:13 +00:00
|
|
|
decode_pad_set_target (dpad, pad);
|
gst/playback/: New decodebin2 element.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstdecodebin2.c: (gst_decode_bin_get_type),
(_gst_boolean_accumulator), (gst_decode_bin_class_init),
(gst_decode_bin_factory_filter), (compare_ranks), (print_feature),
(gst_decode_bin_init), (gst_decode_bin_dispose),
(gst_decode_bin_finalize), (gst_decode_bin_set_property),
(gst_decode_bin_get_property), (gst_decode_bin_set_caps),
(gst_decode_bin_get_caps), (gst_decode_bin_autoplug_continue),
(gst_decode_bin_autoplug_sort), (analyze_new_pad), (connect_pad),
(connect_element), (expose_pad), (type_found),
(pad_added_group_cb), (pad_removed_group_cb),
(no_more_pads_group_cb), (pad_added_cb), (pad_removed_cb),
(no_more_pads_cb), (find_compatibles), (is_demuxer_element),
(are_raw_caps), (multi_queue_overrun_cb),
(multi_queue_underrun_cb), (gst_decode_group_new),
(get_current_group), (group_demuxer_event_probe),
(gst_decode_group_control_demuxer_pad),
(gst_decode_group_control_source_pad),
(gst_decode_group_check_if_blocked),
(gst_decode_group_check_if_drained), (gst_decode_group_expose),
(gst_decode_group_hide), (gst_decode_group_free),
(gst_decode_group_set_complete), (source_pad_blocked_cb),
(source_pad_event_probe), (gst_decode_pad_new), (add_fakesink),
(remove_fakesink), (find_sink_pad), (gst_decode_bin_change_state),
(plugin_init):
New decodebin2 element.
Closes #370092
* gst/playback/gstplay-marshal.list:
Added marshallers for new signals in decodebin2
* gst/playback/gstplaybasebin.c: (setup_subtitle), (make_decoder):
Use decodebin2 if *and only if* the USE_DECODEBIN2 environment variable
is set.
2006-11-28 14:40:39 +00:00
|
|
|
}
|
|
|
|
|
2014-08-25 17:59:40 +00:00
|
|
|
error_details = g_string_new ("");
|
|
|
|
|
gst/playback/: New decodebin2 element.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstdecodebin2.c: (gst_decode_bin_get_type),
(_gst_boolean_accumulator), (gst_decode_bin_class_init),
(gst_decode_bin_factory_filter), (compare_ranks), (print_feature),
(gst_decode_bin_init), (gst_decode_bin_dispose),
(gst_decode_bin_finalize), (gst_decode_bin_set_property),
(gst_decode_bin_get_property), (gst_decode_bin_set_caps),
(gst_decode_bin_get_caps), (gst_decode_bin_autoplug_continue),
(gst_decode_bin_autoplug_sort), (analyze_new_pad), (connect_pad),
(connect_element), (expose_pad), (type_found),
(pad_added_group_cb), (pad_removed_group_cb),
(no_more_pads_group_cb), (pad_added_cb), (pad_removed_cb),
(no_more_pads_cb), (find_compatibles), (is_demuxer_element),
(are_raw_caps), (multi_queue_overrun_cb),
(multi_queue_underrun_cb), (gst_decode_group_new),
(get_current_group), (group_demuxer_event_probe),
(gst_decode_group_control_demuxer_pad),
(gst_decode_group_control_source_pad),
(gst_decode_group_check_if_blocked),
(gst_decode_group_check_if_drained), (gst_decode_group_expose),
(gst_decode_group_hide), (gst_decode_group_free),
(gst_decode_group_set_complete), (source_pad_blocked_cb),
(source_pad_event_probe), (gst_decode_pad_new), (add_fakesink),
(remove_fakesink), (find_sink_pad), (gst_decode_bin_change_state),
(plugin_init):
New decodebin2 element.
Closes #370092
* gst/playback/gstplay-marshal.list:
Added marshallers for new signals in decodebin2
* gst/playback/gstplaybasebin.c: (setup_subtitle), (make_decoder):
Use decodebin2 if *and only if* the USE_DECODEBIN2 environment variable
is set.
2006-11-28 14:40:39 +00:00
|
|
|
/* 2. Try to create an element and link to it */
|
2007-10-24 11:07:57 +00:00
|
|
|
while (factories->n_values > 0) {
|
gst/playback/Makefile.am: Group decodebin2 and uridecodebin into the same plugin so that they can share the GEnumType.
Original commit message from CVS:
* gst/playback/Makefile.am:
Group decodebin2 and uridecodebin into the same plugin so that they
can share the GEnumType.
* gst/playback/gstdecodebin2.c: (_gst_array_accumulator),
(_gst_select_accumulator), (gst_decode_bin_class_init),
(gst_decode_bin_init), (gst_decode_bin_autoplug_sort),
(gst_decode_bin_autoplug_select), (gst_decode_bin_autoplug_add),
(analyze_new_pad), (connect_pad), (gst_decode_bin_plugin_init):
Add signal to sort factories instead of the more awkward autoplug-select
signal.
Modify autoplug_select so that we can try, skip or expose the
autopluggin of an element on a pad.
* gst/playback/gstfactorylists.c: (compare_ranks),
(decoders_filter), (sinks_filter), (gst_factory_list_is_type),
(element_filter), (gst_factory_list_get_elements),
(gst_factory_list_debug), (gst_factory_list_filter):
* gst/playback/gstfactorylists.h:
Simplify the API, allow getting elements based on mask.
* gst/playback/gstplay-marshal.list:
Add some more marshallers.
* gst/playback/gstplaybin2.c: (init_group), (gst_play_bin_init),
(gst_play_bin_finalize), (pad_removed_cb), (autoplug_factories_cb),
(autoplug_select_cb), (activate_group):
Add support for managing non-raw sinks by providing a custom element and
sink list to decodebin2.
Try to plug non-raw sinks when decodebin2 using autoplug-select of
decodebin2.
* gst/playback/gstplaysink.c: (gen_video_chain), (gen_audio_chain),
(gst_play_sink_set_mode), (gst_play_sink_request_pad):
* gst/playback/gstplaysink.h:
Add support for raw and non-raw sinks.
Add support to force sinks selected by playbin2.
Don't plug raw converters for non-raw sinks.
* gst/playback/gsturidecodebin.c: (_gst_array_accumulator),
(_gst_select_accumulator), (gst_uri_decode_bin_class_init),
(proxy_autoplug_select_signal), (gst_uri_decode_bin_plugin_init),
(plugin_init):
Use right accumulators.
Proxy new signal.
2007-12-05 17:11:48 +00:00
|
|
|
GstAutoplugSelectResult ret;
|
2007-10-24 11:07:57 +00:00
|
|
|
GstElementFactory *factory;
|
2011-06-26 13:40:17 +00:00
|
|
|
GstDecodeElement *delem;
|
gst/playback/: New decodebin2 element.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstdecodebin2.c: (gst_decode_bin_get_type),
(_gst_boolean_accumulator), (gst_decode_bin_class_init),
(gst_decode_bin_factory_filter), (compare_ranks), (print_feature),
(gst_decode_bin_init), (gst_decode_bin_dispose),
(gst_decode_bin_finalize), (gst_decode_bin_set_property),
(gst_decode_bin_get_property), (gst_decode_bin_set_caps),
(gst_decode_bin_get_caps), (gst_decode_bin_autoplug_continue),
(gst_decode_bin_autoplug_sort), (analyze_new_pad), (connect_pad),
(connect_element), (expose_pad), (type_found),
(pad_added_group_cb), (pad_removed_group_cb),
(no_more_pads_group_cb), (pad_added_cb), (pad_removed_cb),
(no_more_pads_cb), (find_compatibles), (is_demuxer_element),
(are_raw_caps), (multi_queue_overrun_cb),
(multi_queue_underrun_cb), (gst_decode_group_new),
(get_current_group), (group_demuxer_event_probe),
(gst_decode_group_control_demuxer_pad),
(gst_decode_group_control_source_pad),
(gst_decode_group_check_if_blocked),
(gst_decode_group_check_if_drained), (gst_decode_group_expose),
(gst_decode_group_hide), (gst_decode_group_free),
(gst_decode_group_set_complete), (source_pad_blocked_cb),
(source_pad_event_probe), (gst_decode_pad_new), (add_fakesink),
(remove_fakesink), (find_sink_pad), (gst_decode_bin_change_state),
(plugin_init):
New decodebin2 element.
Closes #370092
* gst/playback/gstplay-marshal.list:
Added marshallers for new signals in decodebin2
* gst/playback/gstplaybasebin.c: (setup_subtitle), (make_decoder):
Use decodebin2 if *and only if* the USE_DECODEBIN2 environment variable
is set.
2006-11-28 14:40:39 +00:00
|
|
|
GstElement *element;
|
|
|
|
GstPad *sinkpad;
|
2012-04-16 06:27:20 +00:00
|
|
|
GParamSpec *pspec;
|
2008-03-24 11:36:08 +00:00
|
|
|
gboolean subtitle;
|
2014-07-10 14:24:36 +00:00
|
|
|
GList *to_connect = NULL;
|
2016-01-21 16:30:40 +00:00
|
|
|
GList *to_expose = NULL;
|
2016-04-12 13:25:12 +00:00
|
|
|
gboolean is_parser = FALSE;
|
2016-04-12 13:32:20 +00:00
|
|
|
gboolean is_decoder = FALSE;
|
gst/playback/: New decodebin2 element.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstdecodebin2.c: (gst_decode_bin_get_type),
(_gst_boolean_accumulator), (gst_decode_bin_class_init),
(gst_decode_bin_factory_filter), (compare_ranks), (print_feature),
(gst_decode_bin_init), (gst_decode_bin_dispose),
(gst_decode_bin_finalize), (gst_decode_bin_set_property),
(gst_decode_bin_get_property), (gst_decode_bin_set_caps),
(gst_decode_bin_get_caps), (gst_decode_bin_autoplug_continue),
(gst_decode_bin_autoplug_sort), (analyze_new_pad), (connect_pad),
(connect_element), (expose_pad), (type_found),
(pad_added_group_cb), (pad_removed_group_cb),
(no_more_pads_group_cb), (pad_added_cb), (pad_removed_cb),
(no_more_pads_cb), (find_compatibles), (is_demuxer_element),
(are_raw_caps), (multi_queue_overrun_cb),
(multi_queue_underrun_cb), (gst_decode_group_new),
(get_current_group), (group_demuxer_event_probe),
(gst_decode_group_control_demuxer_pad),
(gst_decode_group_control_source_pad),
(gst_decode_group_check_if_blocked),
(gst_decode_group_check_if_drained), (gst_decode_group_expose),
(gst_decode_group_hide), (gst_decode_group_free),
(gst_decode_group_set_complete), (source_pad_blocked_cb),
(source_pad_event_probe), (gst_decode_pad_new), (add_fakesink),
(remove_fakesink), (find_sink_pad), (gst_decode_bin_change_state),
(plugin_init):
New decodebin2 element.
Closes #370092
* gst/playback/gstplay-marshal.list:
Added marshallers for new signals in decodebin2
* gst/playback/gstplaybasebin.c: (setup_subtitle), (make_decoder):
Use decodebin2 if *and only if* the USE_DECODEBIN2 environment variable
is set.
2006-11-28 14:40:39 +00:00
|
|
|
|
2009-09-26 10:17:49 +00:00
|
|
|
/* Set dpad target to pad again, it might've been unset
|
|
|
|
* below but we came back here because something failed
|
|
|
|
*/
|
2013-11-29 16:26:13 +00:00
|
|
|
decode_pad_set_target (dpad, pad);
|
2009-09-26 10:17:49 +00:00
|
|
|
|
gst/playback/Makefile.am: Group decodebin2 and uridecodebin into the same plugin so that they can share the GEnumType.
Original commit message from CVS:
* gst/playback/Makefile.am:
Group decodebin2 and uridecodebin into the same plugin so that they
can share the GEnumType.
* gst/playback/gstdecodebin2.c: (_gst_array_accumulator),
(_gst_select_accumulator), (gst_decode_bin_class_init),
(gst_decode_bin_init), (gst_decode_bin_autoplug_sort),
(gst_decode_bin_autoplug_select), (gst_decode_bin_autoplug_add),
(analyze_new_pad), (connect_pad), (gst_decode_bin_plugin_init):
Add signal to sort factories instead of the more awkward autoplug-select
signal.
Modify autoplug_select so that we can try, skip or expose the
autopluggin of an element on a pad.
* gst/playback/gstfactorylists.c: (compare_ranks),
(decoders_filter), (sinks_filter), (gst_factory_list_is_type),
(element_filter), (gst_factory_list_get_elements),
(gst_factory_list_debug), (gst_factory_list_filter):
* gst/playback/gstfactorylists.h:
Simplify the API, allow getting elements based on mask.
* gst/playback/gstplay-marshal.list:
Add some more marshallers.
* gst/playback/gstplaybin2.c: (init_group), (gst_play_bin_init),
(gst_play_bin_finalize), (pad_removed_cb), (autoplug_factories_cb),
(autoplug_select_cb), (activate_group):
Add support for managing non-raw sinks by providing a custom element and
sink list to decodebin2.
Try to plug non-raw sinks when decodebin2 using autoplug-select of
decodebin2.
* gst/playback/gstplaysink.c: (gen_video_chain), (gen_audio_chain),
(gst_play_sink_set_mode), (gst_play_sink_request_pad):
* gst/playback/gstplaysink.h:
Add support for raw and non-raw sinks.
Add support to force sinks selected by playbin2.
Don't plug raw converters for non-raw sinks.
* gst/playback/gsturidecodebin.c: (_gst_array_accumulator),
(_gst_select_accumulator), (gst_uri_decode_bin_class_init),
(proxy_autoplug_select_signal), (gst_uri_decode_bin_plugin_init),
(plugin_init):
Use right accumulators.
Proxy new signal.
2007-12-05 17:11:48 +00:00
|
|
|
/* take first factory */
|
|
|
|
factory = g_value_get_object (g_value_array_get_nth (factories, 0));
|
|
|
|
/* Remove selected factory from the list. */
|
|
|
|
g_value_array_remove (factories, 0);
|
|
|
|
|
2012-07-11 13:39:24 +00:00
|
|
|
GST_LOG_OBJECT (src, "trying factory %" GST_PTR_FORMAT, factory);
|
|
|
|
|
2011-09-08 12:42:13 +00:00
|
|
|
/* Check if the caps are really supported by the factory. The
|
|
|
|
* factory list is non-empty-subset filtered while caps
|
|
|
|
* are only accepted by a pad if they are a subset of the
|
|
|
|
* pad caps.
|
|
|
|
*
|
|
|
|
* FIXME: Only do this for fixed caps here. Non-fixed caps
|
|
|
|
* can happen if a Parser/Converter was autoplugged before
|
|
|
|
* this. We then assume that it will be able to convert to
|
|
|
|
* everything that the decoder would want.
|
|
|
|
*
|
|
|
|
* A subset check will fail here because the parser caps
|
|
|
|
* will be generic and while the decoder will only
|
|
|
|
* support a subset of the parser caps.
|
|
|
|
*/
|
|
|
|
if (gst_caps_is_fixed (caps)) {
|
|
|
|
const GList *templs;
|
|
|
|
gboolean skip = FALSE;
|
|
|
|
|
|
|
|
templs = gst_element_factory_get_static_pad_templates (factory);
|
|
|
|
|
|
|
|
while (templs) {
|
|
|
|
GstStaticPadTemplate *templ = (GstStaticPadTemplate *) templs->data;
|
|
|
|
|
|
|
|
if (templ->direction == GST_PAD_SINK) {
|
|
|
|
GstCaps *templcaps = gst_static_caps_get (&templ->static_caps);
|
|
|
|
|
|
|
|
if (!gst_caps_is_subset (caps, templcaps)) {
|
2012-07-11 13:39:24 +00:00
|
|
|
GST_DEBUG_OBJECT (src,
|
|
|
|
"caps %" GST_PTR_FORMAT " not subset of %" GST_PTR_FORMAT, caps,
|
|
|
|
templcaps);
|
2011-09-08 12:42:13 +00:00
|
|
|
gst_caps_unref (templcaps);
|
|
|
|
skip = TRUE;
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
|
|
|
gst_caps_unref (templcaps);
|
|
|
|
}
|
|
|
|
templs = g_list_next (templs);
|
|
|
|
}
|
|
|
|
if (skip)
|
|
|
|
continue;
|
|
|
|
}
|
|
|
|
|
2011-02-27 08:32:55 +00:00
|
|
|
/* If the factory is for a parser we first check if the factory
|
|
|
|
* was already used for the current chain. If it was used already
|
|
|
|
* we would otherwise create an infinite loop here because the
|
|
|
|
* parser apparently accepts its own output as input.
|
|
|
|
* This is only done for parsers because it's perfectly valid
|
|
|
|
* to have other element classes after each other because a
|
|
|
|
* parser is the only one that does not change the data. A
|
|
|
|
* valid example for this would be multiple id3demux in a row.
|
2011-02-26 22:39:03 +00:00
|
|
|
*/
|
2016-04-12 13:25:12 +00:00
|
|
|
is_parser = strstr (gst_element_factory_get_metadata (factory,
|
2014-10-12 21:03:55 +00:00
|
|
|
GST_ELEMENT_METADATA_KLASS), "Parser") != NULL;
|
2014-11-25 12:39:07 +00:00
|
|
|
|
2016-04-12 13:25:12 +00:00
|
|
|
if (is_parser) {
|
2011-02-27 08:32:55 +00:00
|
|
|
gboolean skip = FALSE;
|
|
|
|
GList *l;
|
|
|
|
|
|
|
|
CHAIN_MUTEX_LOCK (chain);
|
|
|
|
for (l = chain->elements; l; l = l->next) {
|
2011-06-26 13:40:17 +00:00
|
|
|
GstDecodeElement *delem = (GstDecodeElement *) l->data;
|
|
|
|
GstElement *otherelement = delem->element;
|
2011-02-26 22:39:03 +00:00
|
|
|
|
2011-02-27 08:32:55 +00:00
|
|
|
if (gst_element_get_factory (otherelement) == factory) {
|
|
|
|
skip = TRUE;
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
2014-02-21 08:43:38 +00:00
|
|
|
|
|
|
|
if (!skip && chain->parent && chain->parent->parent) {
|
|
|
|
GstDecodeChain *parent_chain = chain->parent->parent;
|
|
|
|
GstDecodeElement *pelem =
|
|
|
|
parent_chain->elements ? parent_chain->elements->data : NULL;
|
|
|
|
|
|
|
|
if (pelem && gst_element_get_factory (pelem->element) == factory)
|
|
|
|
skip = TRUE;
|
|
|
|
}
|
2014-10-26 10:04:38 +00:00
|
|
|
CHAIN_MUTEX_UNLOCK (chain);
|
|
|
|
if (skip) {
|
|
|
|
GST_DEBUG_OBJECT (dbin,
|
|
|
|
"Skipping factory '%s' because it was already used in this chain",
|
|
|
|
gst_plugin_feature_get_name (GST_PLUGIN_FEATURE_CAST (factory)));
|
|
|
|
continue;
|
2011-02-26 22:39:03 +00:00
|
|
|
}
|
2014-07-10 14:24:36 +00:00
|
|
|
|
2011-02-26 22:39:03 +00:00
|
|
|
}
|
|
|
|
|
gst/playback/Makefile.am: Group decodebin2 and uridecodebin into the same plugin so that they can share the GEnumType.
Original commit message from CVS:
* gst/playback/Makefile.am:
Group decodebin2 and uridecodebin into the same plugin so that they
can share the GEnumType.
* gst/playback/gstdecodebin2.c: (_gst_array_accumulator),
(_gst_select_accumulator), (gst_decode_bin_class_init),
(gst_decode_bin_init), (gst_decode_bin_autoplug_sort),
(gst_decode_bin_autoplug_select), (gst_decode_bin_autoplug_add),
(analyze_new_pad), (connect_pad), (gst_decode_bin_plugin_init):
Add signal to sort factories instead of the more awkward autoplug-select
signal.
Modify autoplug_select so that we can try, skip or expose the
autopluggin of an element on a pad.
* gst/playback/gstfactorylists.c: (compare_ranks),
(decoders_filter), (sinks_filter), (gst_factory_list_is_type),
(element_filter), (gst_factory_list_get_elements),
(gst_factory_list_debug), (gst_factory_list_filter):
* gst/playback/gstfactorylists.h:
Simplify the API, allow getting elements based on mask.
* gst/playback/gstplay-marshal.list:
Add some more marshallers.
* gst/playback/gstplaybin2.c: (init_group), (gst_play_bin_init),
(gst_play_bin_finalize), (pad_removed_cb), (autoplug_factories_cb),
(autoplug_select_cb), (activate_group):
Add support for managing non-raw sinks by providing a custom element and
sink list to decodebin2.
Try to plug non-raw sinks when decodebin2 using autoplug-select of
decodebin2.
* gst/playback/gstplaysink.c: (gen_video_chain), (gen_audio_chain),
(gst_play_sink_set_mode), (gst_play_sink_request_pad):
* gst/playback/gstplaysink.h:
Add support for raw and non-raw sinks.
Add support to force sinks selected by playbin2.
Don't plug raw converters for non-raw sinks.
* gst/playback/gsturidecodebin.c: (_gst_array_accumulator),
(_gst_select_accumulator), (gst_uri_decode_bin_class_init),
(proxy_autoplug_select_signal), (gst_uri_decode_bin_plugin_init),
(plugin_init):
Use right accumulators.
Proxy new signal.
2007-12-05 17:11:48 +00:00
|
|
|
/* emit autoplug-select to see what we should do with it. */
|
2007-10-24 11:07:57 +00:00
|
|
|
g_signal_emit (G_OBJECT (dbin),
|
|
|
|
gst_decode_bin_signals[SIGNAL_AUTOPLUG_SELECT],
|
gst/playback/gstdecodebin2.c (struct _GstDecodePad): Change to be a subclass of GstGhostPad.
Original commit message from CVS:
2008-10-08 Andy Wingo <wingo@pobox.com>
* gst/playback/gstdecodebin2.c (struct _GstDecodePad): Change to
be a subclass of GstGhostPad.
(analyze_new_pad): So, when emitting the signals that determine
how we do autoplugging, already create the ghost pad and use it as
the pad in the signal arguments. This allows applications to make
a connection between the pad passed in e.g. autoplug-continue, and
the pad passed in new-decoded-pad.
(connect_pad, expose_pad): Update to receive the ghosted decode
pad in the args, retargetting it as necessary if we have to plug
the target pad through a multiqueue.
(gst_decode_group_control_source_pad): Adapt to receive an
already-ghosted pad that just needs activation, blocking, and
drain notification.
(sort_end_pads): Adapt for decode pads actually being pads.
(gst_decode_group_expose): Adapt for decode pads actually being
pads. Rewrite the decode pad names so they appear in order. Adds a
new error case if we couldn't set the name.
(gst_decode_group_free, gst_decode_group_hide): Adapt cleanup
logic.
(gst_decode_pad_set_blocked, gst_decode_pad_add_drained_check):
New API for the decode pad, needed because we shouldn't do these
things inside gst_decode_pad_new(), but after.
(gst_decode_pad_new): Change to actually make the real pad, and
delay the blocking/drainage bits.
2008-10-08 12:49:40 +00:00
|
|
|
0, dpad, caps, factory, &ret);
|
2007-10-24 11:07:57 +00:00
|
|
|
|
gst/playback/Makefile.am: Group decodebin2 and uridecodebin into the same plugin so that they can share the GEnumType.
Original commit message from CVS:
* gst/playback/Makefile.am:
Group decodebin2 and uridecodebin into the same plugin so that they
can share the GEnumType.
* gst/playback/gstdecodebin2.c: (_gst_array_accumulator),
(_gst_select_accumulator), (gst_decode_bin_class_init),
(gst_decode_bin_init), (gst_decode_bin_autoplug_sort),
(gst_decode_bin_autoplug_select), (gst_decode_bin_autoplug_add),
(analyze_new_pad), (connect_pad), (gst_decode_bin_plugin_init):
Add signal to sort factories instead of the more awkward autoplug-select
signal.
Modify autoplug_select so that we can try, skip or expose the
autopluggin of an element on a pad.
* gst/playback/gstfactorylists.c: (compare_ranks),
(decoders_filter), (sinks_filter), (gst_factory_list_is_type),
(element_filter), (gst_factory_list_get_elements),
(gst_factory_list_debug), (gst_factory_list_filter):
* gst/playback/gstfactorylists.h:
Simplify the API, allow getting elements based on mask.
* gst/playback/gstplay-marshal.list:
Add some more marshallers.
* gst/playback/gstplaybin2.c: (init_group), (gst_play_bin_init),
(gst_play_bin_finalize), (pad_removed_cb), (autoplug_factories_cb),
(autoplug_select_cb), (activate_group):
Add support for managing non-raw sinks by providing a custom element and
sink list to decodebin2.
Try to plug non-raw sinks when decodebin2 using autoplug-select of
decodebin2.
* gst/playback/gstplaysink.c: (gen_video_chain), (gen_audio_chain),
(gst_play_sink_set_mode), (gst_play_sink_request_pad):
* gst/playback/gstplaysink.h:
Add support for raw and non-raw sinks.
Add support to force sinks selected by playbin2.
Don't plug raw converters for non-raw sinks.
* gst/playback/gsturidecodebin.c: (_gst_array_accumulator),
(_gst_select_accumulator), (gst_uri_decode_bin_class_init),
(proxy_autoplug_select_signal), (gst_uri_decode_bin_plugin_init),
(plugin_init):
Use right accumulators.
Proxy new signal.
2007-12-05 17:11:48 +00:00
|
|
|
switch (ret) {
|
|
|
|
case GST_AUTOPLUG_SELECT_TRY:
|
|
|
|
GST_DEBUG_OBJECT (dbin, "autoplug select requested try");
|
|
|
|
break;
|
|
|
|
case GST_AUTOPLUG_SELECT_EXPOSE:
|
|
|
|
GST_DEBUG_OBJECT (dbin, "autoplug select requested expose");
|
2007-12-13 12:31:38 +00:00
|
|
|
/* expose the pad, we don't have the source element */
|
2016-03-12 17:47:47 +00:00
|
|
|
expose_pad (dbin, src, dpad, pad, caps, chain);
|
2007-12-13 12:31:38 +00:00
|
|
|
res = TRUE;
|
gst/playback/Makefile.am: Group decodebin2 and uridecodebin into the same plugin so that they can share the GEnumType.
Original commit message from CVS:
* gst/playback/Makefile.am:
Group decodebin2 and uridecodebin into the same plugin so that they
can share the GEnumType.
* gst/playback/gstdecodebin2.c: (_gst_array_accumulator),
(_gst_select_accumulator), (gst_decode_bin_class_init),
(gst_decode_bin_init), (gst_decode_bin_autoplug_sort),
(gst_decode_bin_autoplug_select), (gst_decode_bin_autoplug_add),
(analyze_new_pad), (connect_pad), (gst_decode_bin_plugin_init):
Add signal to sort factories instead of the more awkward autoplug-select
signal.
Modify autoplug_select so that we can try, skip or expose the
autopluggin of an element on a pad.
* gst/playback/gstfactorylists.c: (compare_ranks),
(decoders_filter), (sinks_filter), (gst_factory_list_is_type),
(element_filter), (gst_factory_list_get_elements),
(gst_factory_list_debug), (gst_factory_list_filter):
* gst/playback/gstfactorylists.h:
Simplify the API, allow getting elements based on mask.
* gst/playback/gstplay-marshal.list:
Add some more marshallers.
* gst/playback/gstplaybin2.c: (init_group), (gst_play_bin_init),
(gst_play_bin_finalize), (pad_removed_cb), (autoplug_factories_cb),
(autoplug_select_cb), (activate_group):
Add support for managing non-raw sinks by providing a custom element and
sink list to decodebin2.
Try to plug non-raw sinks when decodebin2 using autoplug-select of
decodebin2.
* gst/playback/gstplaysink.c: (gen_video_chain), (gen_audio_chain),
(gst_play_sink_set_mode), (gst_play_sink_request_pad):
* gst/playback/gstplaysink.h:
Add support for raw and non-raw sinks.
Add support to force sinks selected by playbin2.
Don't plug raw converters for non-raw sinks.
* gst/playback/gsturidecodebin.c: (_gst_array_accumulator),
(_gst_select_accumulator), (gst_uri_decode_bin_class_init),
(proxy_autoplug_select_signal), (gst_uri_decode_bin_plugin_init),
(plugin_init):
Use right accumulators.
Proxy new signal.
2007-12-05 17:11:48 +00:00
|
|
|
goto beach;
|
|
|
|
case GST_AUTOPLUG_SELECT_SKIP:
|
|
|
|
GST_DEBUG_OBJECT (dbin, "autoplug select requested skip");
|
|
|
|
continue;
|
|
|
|
default:
|
|
|
|
GST_WARNING_OBJECT (dbin, "autoplug select returned unhandled %d", ret);
|
|
|
|
break;
|
2007-10-24 11:07:57 +00:00
|
|
|
}
|
|
|
|
|
gst/playback/gstdecodebin2.c (struct _GstDecodePad): Change to be a subclass of GstGhostPad.
Original commit message from CVS:
2008-10-08 Andy Wingo <wingo@pobox.com>
* gst/playback/gstdecodebin2.c (struct _GstDecodePad): Change to
be a subclass of GstGhostPad.
(analyze_new_pad): So, when emitting the signals that determine
how we do autoplugging, already create the ghost pad and use it as
the pad in the signal arguments. This allows applications to make
a connection between the pad passed in e.g. autoplug-continue, and
the pad passed in new-decoded-pad.
(connect_pad, expose_pad): Update to receive the ghosted decode
pad in the args, retargetting it as necessary if we have to plug
the target pad through a multiqueue.
(gst_decode_group_control_source_pad): Adapt to receive an
already-ghosted pad that just needs activation, blocking, and
drain notification.
(sort_end_pads): Adapt for decode pads actually being pads.
(gst_decode_group_expose): Adapt for decode pads actually being
pads. Rewrite the decode pad names so they appear in order. Adds a
new error case if we couldn't set the name.
(gst_decode_group_free, gst_decode_group_hide): Adapt cleanup
logic.
(gst_decode_pad_set_blocked, gst_decode_pad_add_drained_check):
New API for the decode pad, needed because we shouldn't do these
things inside gst_decode_pad_new(), but after.
(gst_decode_pad_new): Change to actually make the real pad, and
delay the blocking/drainage bits.
2008-10-08 12:49:40 +00:00
|
|
|
/* 2.0. Unlink pad */
|
2013-11-29 16:26:13 +00:00
|
|
|
decode_pad_set_target (dpad, NULL);
|
gst/playback/gstdecodebin2.c (struct _GstDecodePad): Change to be a subclass of GstGhostPad.
Original commit message from CVS:
2008-10-08 Andy Wingo <wingo@pobox.com>
* gst/playback/gstdecodebin2.c (struct _GstDecodePad): Change to
be a subclass of GstGhostPad.
(analyze_new_pad): So, when emitting the signals that determine
how we do autoplugging, already create the ghost pad and use it as
the pad in the signal arguments. This allows applications to make
a connection between the pad passed in e.g. autoplug-continue, and
the pad passed in new-decoded-pad.
(connect_pad, expose_pad): Update to receive the ghosted decode
pad in the args, retargetting it as necessary if we have to plug
the target pad through a multiqueue.
(gst_decode_group_control_source_pad): Adapt to receive an
already-ghosted pad that just needs activation, blocking, and
drain notification.
(sort_end_pads): Adapt for decode pads actually being pads.
(gst_decode_group_expose): Adapt for decode pads actually being
pads. Rewrite the decode pad names so they appear in order. Adds a
new error case if we couldn't set the name.
(gst_decode_group_free, gst_decode_group_hide): Adapt cleanup
logic.
(gst_decode_pad_set_blocked, gst_decode_pad_add_drained_check):
New API for the decode pad, needed because we shouldn't do these
things inside gst_decode_pad_new(), but after.
(gst_decode_pad_new): Change to actually make the real pad, and
delay the blocking/drainage bits.
2008-10-08 12:49:40 +00:00
|
|
|
|
gst/playback/: New decodebin2 element.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstdecodebin2.c: (gst_decode_bin_get_type),
(_gst_boolean_accumulator), (gst_decode_bin_class_init),
(gst_decode_bin_factory_filter), (compare_ranks), (print_feature),
(gst_decode_bin_init), (gst_decode_bin_dispose),
(gst_decode_bin_finalize), (gst_decode_bin_set_property),
(gst_decode_bin_get_property), (gst_decode_bin_set_caps),
(gst_decode_bin_get_caps), (gst_decode_bin_autoplug_continue),
(gst_decode_bin_autoplug_sort), (analyze_new_pad), (connect_pad),
(connect_element), (expose_pad), (type_found),
(pad_added_group_cb), (pad_removed_group_cb),
(no_more_pads_group_cb), (pad_added_cb), (pad_removed_cb),
(no_more_pads_cb), (find_compatibles), (is_demuxer_element),
(are_raw_caps), (multi_queue_overrun_cb),
(multi_queue_underrun_cb), (gst_decode_group_new),
(get_current_group), (group_demuxer_event_probe),
(gst_decode_group_control_demuxer_pad),
(gst_decode_group_control_source_pad),
(gst_decode_group_check_if_blocked),
(gst_decode_group_check_if_drained), (gst_decode_group_expose),
(gst_decode_group_hide), (gst_decode_group_free),
(gst_decode_group_set_complete), (source_pad_blocked_cb),
(source_pad_event_probe), (gst_decode_pad_new), (add_fakesink),
(remove_fakesink), (find_sink_pad), (gst_decode_bin_change_state),
(plugin_init):
New decodebin2 element.
Closes #370092
* gst/playback/gstplay-marshal.list:
Added marshallers for new signals in decodebin2
* gst/playback/gstplaybasebin.c: (setup_subtitle), (make_decoder):
Use decodebin2 if *and only if* the USE_DECODEBIN2 environment variable
is set.
2006-11-28 14:40:39 +00:00
|
|
|
/* 2.1. Try to create an element */
|
|
|
|
if ((element = gst_element_factory_create (factory, NULL)) == NULL) {
|
|
|
|
GST_WARNING_OBJECT (dbin, "Could not create an element from %s",
|
|
|
|
gst_plugin_feature_get_name (GST_PLUGIN_FEATURE (factory)));
|
2014-08-25 17:59:40 +00:00
|
|
|
g_string_append_printf (error_details,
|
|
|
|
"Could not create an element from %s\n",
|
|
|
|
gst_plugin_feature_get_name (GST_PLUGIN_FEATURE (factory)));
|
gst/playback/: New decodebin2 element.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstdecodebin2.c: (gst_decode_bin_get_type),
(_gst_boolean_accumulator), (gst_decode_bin_class_init),
(gst_decode_bin_factory_filter), (compare_ranks), (print_feature),
(gst_decode_bin_init), (gst_decode_bin_dispose),
(gst_decode_bin_finalize), (gst_decode_bin_set_property),
(gst_decode_bin_get_property), (gst_decode_bin_set_caps),
(gst_decode_bin_get_caps), (gst_decode_bin_autoplug_continue),
(gst_decode_bin_autoplug_sort), (analyze_new_pad), (connect_pad),
(connect_element), (expose_pad), (type_found),
(pad_added_group_cb), (pad_removed_group_cb),
(no_more_pads_group_cb), (pad_added_cb), (pad_removed_cb),
(no_more_pads_cb), (find_compatibles), (is_demuxer_element),
(are_raw_caps), (multi_queue_overrun_cb),
(multi_queue_underrun_cb), (gst_decode_group_new),
(get_current_group), (group_demuxer_event_probe),
(gst_decode_group_control_demuxer_pad),
(gst_decode_group_control_source_pad),
(gst_decode_group_check_if_blocked),
(gst_decode_group_check_if_drained), (gst_decode_group_expose),
(gst_decode_group_hide), (gst_decode_group_free),
(gst_decode_group_set_complete), (source_pad_blocked_cb),
(source_pad_event_probe), (gst_decode_pad_new), (add_fakesink),
(remove_fakesink), (find_sink_pad), (gst_decode_bin_change_state),
(plugin_init):
New decodebin2 element.
Closes #370092
* gst/playback/gstplay-marshal.list:
Added marshallers for new signals in decodebin2
* gst/playback/gstplaybasebin.c: (setup_subtitle), (make_decoder):
Use decodebin2 if *and only if* the USE_DECODEBIN2 environment variable
is set.
2006-11-28 14:40:39 +00:00
|
|
|
continue;
|
|
|
|
}
|
|
|
|
|
2011-10-13 15:34:49 +00:00
|
|
|
/* Filter errors, this will prevent the element from causing the pipeline
|
|
|
|
* to error while we test it using READY state. */
|
|
|
|
add_error_filter (dbin, element);
|
|
|
|
|
2013-05-24 11:41:46 +00:00
|
|
|
/* We don't yet want the bin to control the element's state */
|
|
|
|
gst_element_set_locked_state (element, TRUE);
|
|
|
|
|
2011-10-13 15:34:49 +00:00
|
|
|
/* ... add it ... */
|
|
|
|
if (!(gst_bin_add (GST_BIN_CAST (dbin), element))) {
|
|
|
|
GST_WARNING_OBJECT (dbin, "Couldn't add %s to the bin",
|
gst/playback/: New decodebin2 element.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstdecodebin2.c: (gst_decode_bin_get_type),
(_gst_boolean_accumulator), (gst_decode_bin_class_init),
(gst_decode_bin_factory_filter), (compare_ranks), (print_feature),
(gst_decode_bin_init), (gst_decode_bin_dispose),
(gst_decode_bin_finalize), (gst_decode_bin_set_property),
(gst_decode_bin_get_property), (gst_decode_bin_set_caps),
(gst_decode_bin_get_caps), (gst_decode_bin_autoplug_continue),
(gst_decode_bin_autoplug_sort), (analyze_new_pad), (connect_pad),
(connect_element), (expose_pad), (type_found),
(pad_added_group_cb), (pad_removed_group_cb),
(no_more_pads_group_cb), (pad_added_cb), (pad_removed_cb),
(no_more_pads_cb), (find_compatibles), (is_demuxer_element),
(are_raw_caps), (multi_queue_overrun_cb),
(multi_queue_underrun_cb), (gst_decode_group_new),
(get_current_group), (group_demuxer_event_probe),
(gst_decode_group_control_demuxer_pad),
(gst_decode_group_control_source_pad),
(gst_decode_group_check_if_blocked),
(gst_decode_group_check_if_drained), (gst_decode_group_expose),
(gst_decode_group_hide), (gst_decode_group_free),
(gst_decode_group_set_complete), (source_pad_blocked_cb),
(source_pad_event_probe), (gst_decode_pad_new), (add_fakesink),
(remove_fakesink), (find_sink_pad), (gst_decode_bin_change_state),
(plugin_init):
New decodebin2 element.
Closes #370092
* gst/playback/gstplay-marshal.list:
Added marshallers for new signals in decodebin2
* gst/playback/gstplaybasebin.c: (setup_subtitle), (make_decoder):
Use decodebin2 if *and only if* the USE_DECODEBIN2 environment variable
is set.
2006-11-28 14:40:39 +00:00
|
|
|
GST_ELEMENT_NAME (element));
|
2014-08-25 17:59:40 +00:00
|
|
|
remove_error_filter (dbin, element, NULL);
|
|
|
|
g_string_append_printf (error_details, "Couldn't add %s to the bin\n",
|
|
|
|
GST_ELEMENT_NAME (element));
|
gst/playback/: New decodebin2 element.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstdecodebin2.c: (gst_decode_bin_get_type),
(_gst_boolean_accumulator), (gst_decode_bin_class_init),
(gst_decode_bin_factory_filter), (compare_ranks), (print_feature),
(gst_decode_bin_init), (gst_decode_bin_dispose),
(gst_decode_bin_finalize), (gst_decode_bin_set_property),
(gst_decode_bin_get_property), (gst_decode_bin_set_caps),
(gst_decode_bin_get_caps), (gst_decode_bin_autoplug_continue),
(gst_decode_bin_autoplug_sort), (analyze_new_pad), (connect_pad),
(connect_element), (expose_pad), (type_found),
(pad_added_group_cb), (pad_removed_group_cb),
(no_more_pads_group_cb), (pad_added_cb), (pad_removed_cb),
(no_more_pads_cb), (find_compatibles), (is_demuxer_element),
(are_raw_caps), (multi_queue_overrun_cb),
(multi_queue_underrun_cb), (gst_decode_group_new),
(get_current_group), (group_demuxer_event_probe),
(gst_decode_group_control_demuxer_pad),
(gst_decode_group_control_source_pad),
(gst_decode_group_check_if_blocked),
(gst_decode_group_check_if_drained), (gst_decode_group_expose),
(gst_decode_group_hide), (gst_decode_group_free),
(gst_decode_group_set_complete), (source_pad_blocked_cb),
(source_pad_event_probe), (gst_decode_pad_new), (add_fakesink),
(remove_fakesink), (find_sink_pad), (gst_decode_bin_change_state),
(plugin_init):
New decodebin2 element.
Closes #370092
* gst/playback/gstplay-marshal.list:
Added marshallers for new signals in decodebin2
* gst/playback/gstplaybasebin.c: (setup_subtitle), (make_decoder):
Use decodebin2 if *and only if* the USE_DECODEBIN2 environment variable
is set.
2006-11-28 14:40:39 +00:00
|
|
|
gst_object_unref (element);
|
|
|
|
continue;
|
|
|
|
}
|
|
|
|
|
2011-10-13 15:34:49 +00:00
|
|
|
/* Find its sink pad. */
|
gst/playback/Makefile.am: Group decodebin2 and uridecodebin into the same plugin so that they can share the GEnumType.
Original commit message from CVS:
* gst/playback/Makefile.am:
Group decodebin2 and uridecodebin into the same plugin so that they
can share the GEnumType.
* gst/playback/gstdecodebin2.c: (_gst_array_accumulator),
(_gst_select_accumulator), (gst_decode_bin_class_init),
(gst_decode_bin_init), (gst_decode_bin_autoplug_sort),
(gst_decode_bin_autoplug_select), (gst_decode_bin_autoplug_add),
(analyze_new_pad), (connect_pad), (gst_decode_bin_plugin_init):
Add signal to sort factories instead of the more awkward autoplug-select
signal.
Modify autoplug_select so that we can try, skip or expose the
autopluggin of an element on a pad.
* gst/playback/gstfactorylists.c: (compare_ranks),
(decoders_filter), (sinks_filter), (gst_factory_list_is_type),
(element_filter), (gst_factory_list_get_elements),
(gst_factory_list_debug), (gst_factory_list_filter):
* gst/playback/gstfactorylists.h:
Simplify the API, allow getting elements based on mask.
* gst/playback/gstplay-marshal.list:
Add some more marshallers.
* gst/playback/gstplaybin2.c: (init_group), (gst_play_bin_init),
(gst_play_bin_finalize), (pad_removed_cb), (autoplug_factories_cb),
(autoplug_select_cb), (activate_group):
Add support for managing non-raw sinks by providing a custom element and
sink list to decodebin2.
Try to plug non-raw sinks when decodebin2 using autoplug-select of
decodebin2.
* gst/playback/gstplaysink.c: (gen_video_chain), (gen_audio_chain),
(gst_play_sink_set_mode), (gst_play_sink_request_pad):
* gst/playback/gstplaysink.h:
Add support for raw and non-raw sinks.
Add support to force sinks selected by playbin2.
Don't plug raw converters for non-raw sinks.
* gst/playback/gsturidecodebin.c: (_gst_array_accumulator),
(_gst_select_accumulator), (gst_uri_decode_bin_class_init),
(proxy_autoplug_select_signal), (gst_uri_decode_bin_plugin_init),
(plugin_init):
Use right accumulators.
Proxy new signal.
2007-12-05 17:11:48 +00:00
|
|
|
if (!(sinkpad = find_sink_pad (element))) {
|
|
|
|
GST_WARNING_OBJECT (dbin, "Element %s doesn't have a sink pad",
|
gst/playback/: New decodebin2 element.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstdecodebin2.c: (gst_decode_bin_get_type),
(_gst_boolean_accumulator), (gst_decode_bin_class_init),
(gst_decode_bin_factory_filter), (compare_ranks), (print_feature),
(gst_decode_bin_init), (gst_decode_bin_dispose),
(gst_decode_bin_finalize), (gst_decode_bin_set_property),
(gst_decode_bin_get_property), (gst_decode_bin_set_caps),
(gst_decode_bin_get_caps), (gst_decode_bin_autoplug_continue),
(gst_decode_bin_autoplug_sort), (analyze_new_pad), (connect_pad),
(connect_element), (expose_pad), (type_found),
(pad_added_group_cb), (pad_removed_group_cb),
(no_more_pads_group_cb), (pad_added_cb), (pad_removed_cb),
(no_more_pads_cb), (find_compatibles), (is_demuxer_element),
(are_raw_caps), (multi_queue_overrun_cb),
(multi_queue_underrun_cb), (gst_decode_group_new),
(get_current_group), (group_demuxer_event_probe),
(gst_decode_group_control_demuxer_pad),
(gst_decode_group_control_source_pad),
(gst_decode_group_check_if_blocked),
(gst_decode_group_check_if_drained), (gst_decode_group_expose),
(gst_decode_group_hide), (gst_decode_group_free),
(gst_decode_group_set_complete), (source_pad_blocked_cb),
(source_pad_event_probe), (gst_decode_pad_new), (add_fakesink),
(remove_fakesink), (find_sink_pad), (gst_decode_bin_change_state),
(plugin_init):
New decodebin2 element.
Closes #370092
* gst/playback/gstplay-marshal.list:
Added marshallers for new signals in decodebin2
* gst/playback/gstplaybasebin.c: (setup_subtitle), (make_decoder):
Use decodebin2 if *and only if* the USE_DECODEBIN2 environment variable
is set.
2006-11-28 14:40:39 +00:00
|
|
|
GST_ELEMENT_NAME (element));
|
2014-08-25 17:59:40 +00:00
|
|
|
remove_error_filter (dbin, element, NULL);
|
|
|
|
g_string_append_printf (error_details,
|
|
|
|
"Element %s doesn't have a sink pad", GST_ELEMENT_NAME (element));
|
2011-10-13 15:34:49 +00:00
|
|
|
gst_bin_remove (GST_BIN (dbin), element);
|
gst/playback/: New decodebin2 element.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstdecodebin2.c: (gst_decode_bin_get_type),
(_gst_boolean_accumulator), (gst_decode_bin_class_init),
(gst_decode_bin_factory_filter), (compare_ranks), (print_feature),
(gst_decode_bin_init), (gst_decode_bin_dispose),
(gst_decode_bin_finalize), (gst_decode_bin_set_property),
(gst_decode_bin_get_property), (gst_decode_bin_set_caps),
(gst_decode_bin_get_caps), (gst_decode_bin_autoplug_continue),
(gst_decode_bin_autoplug_sort), (analyze_new_pad), (connect_pad),
(connect_element), (expose_pad), (type_found),
(pad_added_group_cb), (pad_removed_group_cb),
(no_more_pads_group_cb), (pad_added_cb), (pad_removed_cb),
(no_more_pads_cb), (find_compatibles), (is_demuxer_element),
(are_raw_caps), (multi_queue_overrun_cb),
(multi_queue_underrun_cb), (gst_decode_group_new),
(get_current_group), (group_demuxer_event_probe),
(gst_decode_group_control_demuxer_pad),
(gst_decode_group_control_source_pad),
(gst_decode_group_check_if_blocked),
(gst_decode_group_check_if_drained), (gst_decode_group_expose),
(gst_decode_group_hide), (gst_decode_group_free),
(gst_decode_group_set_complete), (source_pad_blocked_cb),
(source_pad_event_probe), (gst_decode_pad_new), (add_fakesink),
(remove_fakesink), (find_sink_pad), (gst_decode_bin_change_state),
(plugin_init):
New decodebin2 element.
Closes #370092
* gst/playback/gstplay-marshal.list:
Added marshallers for new signals in decodebin2
* gst/playback/gstplaybasebin.c: (setup_subtitle), (make_decoder):
Use decodebin2 if *and only if* the USE_DECODEBIN2 environment variable
is set.
2006-11-28 14:40:39 +00:00
|
|
|
continue;
|
|
|
|
}
|
|
|
|
|
2011-10-13 15:34:49 +00:00
|
|
|
/* ... and try to link */
|
2015-01-13 22:25:52 +00:00
|
|
|
if ((gst_pad_link_full (pad, sinkpad,
|
|
|
|
GST_PAD_LINK_CHECK_NOTHING)) != GST_PAD_LINK_OK) {
|
2011-10-13 15:34:49 +00:00
|
|
|
GST_WARNING_OBJECT (dbin, "Link failed on pad %s:%s",
|
|
|
|
GST_DEBUG_PAD_NAME (sinkpad));
|
2014-08-25 17:59:40 +00:00
|
|
|
remove_error_filter (dbin, element, NULL);
|
|
|
|
g_string_append_printf (error_details, "Link failed on pad %s:%s",
|
|
|
|
GST_DEBUG_PAD_NAME (sinkpad));
|
gst/playback/: New decodebin2 element.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstdecodebin2.c: (gst_decode_bin_get_type),
(_gst_boolean_accumulator), (gst_decode_bin_class_init),
(gst_decode_bin_factory_filter), (compare_ranks), (print_feature),
(gst_decode_bin_init), (gst_decode_bin_dispose),
(gst_decode_bin_finalize), (gst_decode_bin_set_property),
(gst_decode_bin_get_property), (gst_decode_bin_set_caps),
(gst_decode_bin_get_caps), (gst_decode_bin_autoplug_continue),
(gst_decode_bin_autoplug_sort), (analyze_new_pad), (connect_pad),
(connect_element), (expose_pad), (type_found),
(pad_added_group_cb), (pad_removed_group_cb),
(no_more_pads_group_cb), (pad_added_cb), (pad_removed_cb),
(no_more_pads_cb), (find_compatibles), (is_demuxer_element),
(are_raw_caps), (multi_queue_overrun_cb),
(multi_queue_underrun_cb), (gst_decode_group_new),
(get_current_group), (group_demuxer_event_probe),
(gst_decode_group_control_demuxer_pad),
(gst_decode_group_control_source_pad),
(gst_decode_group_check_if_blocked),
(gst_decode_group_check_if_drained), (gst_decode_group_expose),
(gst_decode_group_hide), (gst_decode_group_free),
(gst_decode_group_set_complete), (source_pad_blocked_cb),
(source_pad_event_probe), (gst_decode_pad_new), (add_fakesink),
(remove_fakesink), (find_sink_pad), (gst_decode_bin_change_state),
(plugin_init):
New decodebin2 element.
Closes #370092
* gst/playback/gstplay-marshal.list:
Added marshallers for new signals in decodebin2
* gst/playback/gstplaybasebin.c: (setup_subtitle), (make_decoder):
Use decodebin2 if *and only if* the USE_DECODEBIN2 environment variable
is set.
2006-11-28 14:40:39 +00:00
|
|
|
gst_object_unref (sinkpad);
|
2011-10-13 15:34:49 +00:00
|
|
|
gst_bin_remove (GST_BIN (dbin), element);
|
gst/playback/: New decodebin2 element.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstdecodebin2.c: (gst_decode_bin_get_type),
(_gst_boolean_accumulator), (gst_decode_bin_class_init),
(gst_decode_bin_factory_filter), (compare_ranks), (print_feature),
(gst_decode_bin_init), (gst_decode_bin_dispose),
(gst_decode_bin_finalize), (gst_decode_bin_set_property),
(gst_decode_bin_get_property), (gst_decode_bin_set_caps),
(gst_decode_bin_get_caps), (gst_decode_bin_autoplug_continue),
(gst_decode_bin_autoplug_sort), (analyze_new_pad), (connect_pad),
(connect_element), (expose_pad), (type_found),
(pad_added_group_cb), (pad_removed_group_cb),
(no_more_pads_group_cb), (pad_added_cb), (pad_removed_cb),
(no_more_pads_cb), (find_compatibles), (is_demuxer_element),
(are_raw_caps), (multi_queue_overrun_cb),
(multi_queue_underrun_cb), (gst_decode_group_new),
(get_current_group), (group_demuxer_event_probe),
(gst_decode_group_control_demuxer_pad),
(gst_decode_group_control_source_pad),
(gst_decode_group_check_if_blocked),
(gst_decode_group_check_if_drained), (gst_decode_group_expose),
(gst_decode_group_hide), (gst_decode_group_free),
(gst_decode_group_set_complete), (source_pad_blocked_cb),
(source_pad_event_probe), (gst_decode_pad_new), (add_fakesink),
(remove_fakesink), (find_sink_pad), (gst_decode_bin_change_state),
(plugin_init):
New decodebin2 element.
Closes #370092
* gst/playback/gstplay-marshal.list:
Added marshallers for new signals in decodebin2
* gst/playback/gstplaybasebin.c: (setup_subtitle), (make_decoder):
Use decodebin2 if *and only if* the USE_DECODEBIN2 environment variable
is set.
2006-11-28 14:40:39 +00:00
|
|
|
continue;
|
|
|
|
}
|
|
|
|
|
2011-10-13 15:34:49 +00:00
|
|
|
/* ... activate it ... */
|
|
|
|
if ((gst_element_set_state (element,
|
|
|
|
GST_STATE_READY)) == GST_STATE_CHANGE_FAILURE) {
|
2014-08-25 17:59:40 +00:00
|
|
|
GstMessage *error_msg;
|
|
|
|
|
2011-10-13 15:34:49 +00:00
|
|
|
GST_WARNING_OBJECT (dbin, "Couldn't set %s to READY",
|
|
|
|
GST_ELEMENT_NAME (element));
|
2014-08-25 17:59:40 +00:00
|
|
|
remove_error_filter (dbin, element, &error_msg);
|
|
|
|
|
|
|
|
if (error_msg) {
|
|
|
|
gchar *error_string = error_message_to_string (error_msg);
|
|
|
|
g_string_append_printf (error_details, "Couldn't set %s to READY:\n%s",
|
|
|
|
GST_ELEMENT_NAME (element), error_string);
|
|
|
|
gst_message_unref (error_msg);
|
|
|
|
g_free (error_string);
|
|
|
|
} else {
|
|
|
|
g_string_append_printf (error_details, "Couldn't set %s to READY",
|
|
|
|
GST_ELEMENT_NAME (element));
|
|
|
|
}
|
gst/playback/: New decodebin2 element.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstdecodebin2.c: (gst_decode_bin_get_type),
(_gst_boolean_accumulator), (gst_decode_bin_class_init),
(gst_decode_bin_factory_filter), (compare_ranks), (print_feature),
(gst_decode_bin_init), (gst_decode_bin_dispose),
(gst_decode_bin_finalize), (gst_decode_bin_set_property),
(gst_decode_bin_get_property), (gst_decode_bin_set_caps),
(gst_decode_bin_get_caps), (gst_decode_bin_autoplug_continue),
(gst_decode_bin_autoplug_sort), (analyze_new_pad), (connect_pad),
(connect_element), (expose_pad), (type_found),
(pad_added_group_cb), (pad_removed_group_cb),
(no_more_pads_group_cb), (pad_added_cb), (pad_removed_cb),
(no_more_pads_cb), (find_compatibles), (is_demuxer_element),
(are_raw_caps), (multi_queue_overrun_cb),
(multi_queue_underrun_cb), (gst_decode_group_new),
(get_current_group), (group_demuxer_event_probe),
(gst_decode_group_control_demuxer_pad),
(gst_decode_group_control_source_pad),
(gst_decode_group_check_if_blocked),
(gst_decode_group_check_if_drained), (gst_decode_group_expose),
(gst_decode_group_hide), (gst_decode_group_free),
(gst_decode_group_set_complete), (source_pad_blocked_cb),
(source_pad_event_probe), (gst_decode_pad_new), (add_fakesink),
(remove_fakesink), (find_sink_pad), (gst_decode_bin_change_state),
(plugin_init):
New decodebin2 element.
Closes #370092
* gst/playback/gstplay-marshal.list:
Added marshallers for new signals in decodebin2
* gst/playback/gstplaybasebin.c: (setup_subtitle), (make_decoder):
Use decodebin2 if *and only if* the USE_DECODEBIN2 environment variable
is set.
2006-11-28 14:40:39 +00:00
|
|
|
gst_object_unref (sinkpad);
|
|
|
|
gst_bin_remove (GST_BIN (dbin), element);
|
|
|
|
continue;
|
|
|
|
}
|
2011-10-13 15:34:49 +00:00
|
|
|
|
2012-11-22 12:06:14 +00:00
|
|
|
/* check if we still accept the caps on the pad after setting
|
|
|
|
* the element to READY */
|
|
|
|
if (!gst_pad_query_accept_caps (sinkpad, caps)) {
|
2014-08-25 17:59:40 +00:00
|
|
|
GstMessage *error_msg;
|
|
|
|
|
2012-11-22 12:06:14 +00:00
|
|
|
GST_WARNING_OBJECT (dbin, "Element %s does not accept caps",
|
|
|
|
GST_ELEMENT_NAME (element));
|
2014-07-10 10:22:35 +00:00
|
|
|
|
2014-08-25 17:59:40 +00:00
|
|
|
remove_error_filter (dbin, element, &error_msg);
|
|
|
|
|
|
|
|
if (error_msg) {
|
|
|
|
gchar *error_string = error_message_to_string (error_msg);
|
|
|
|
g_string_append_printf (error_details,
|
|
|
|
"Element %s does not accept caps:\n%s", GST_ELEMENT_NAME (element),
|
|
|
|
error_string);
|
|
|
|
gst_message_unref (error_msg);
|
|
|
|
g_free (error_string);
|
|
|
|
} else {
|
|
|
|
g_string_append_printf (error_details,
|
|
|
|
"Element %s does not accept caps", GST_ELEMENT_NAME (element));
|
|
|
|
}
|
2014-07-10 10:22:35 +00:00
|
|
|
|
2012-11-22 12:09:46 +00:00
|
|
|
gst_element_set_state (element, GST_STATE_NULL);
|
2012-11-22 12:06:14 +00:00
|
|
|
gst_object_unref (sinkpad);
|
|
|
|
gst_bin_remove (GST_BIN (dbin), element);
|
|
|
|
continue;
|
|
|
|
}
|
|
|
|
|
2007-04-03 11:10:52 +00:00
|
|
|
gst_object_unref (sinkpad);
|
gst/playback/: New decodebin2 element.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstdecodebin2.c: (gst_decode_bin_get_type),
(_gst_boolean_accumulator), (gst_decode_bin_class_init),
(gst_decode_bin_factory_filter), (compare_ranks), (print_feature),
(gst_decode_bin_init), (gst_decode_bin_dispose),
(gst_decode_bin_finalize), (gst_decode_bin_set_property),
(gst_decode_bin_get_property), (gst_decode_bin_set_caps),
(gst_decode_bin_get_caps), (gst_decode_bin_autoplug_continue),
(gst_decode_bin_autoplug_sort), (analyze_new_pad), (connect_pad),
(connect_element), (expose_pad), (type_found),
(pad_added_group_cb), (pad_removed_group_cb),
(no_more_pads_group_cb), (pad_added_cb), (pad_removed_cb),
(no_more_pads_cb), (find_compatibles), (is_demuxer_element),
(are_raw_caps), (multi_queue_overrun_cb),
(multi_queue_underrun_cb), (gst_decode_group_new),
(get_current_group), (group_demuxer_event_probe),
(gst_decode_group_control_demuxer_pad),
(gst_decode_group_control_source_pad),
(gst_decode_group_check_if_blocked),
(gst_decode_group_check_if_drained), (gst_decode_group_expose),
(gst_decode_group_hide), (gst_decode_group_free),
(gst_decode_group_set_complete), (source_pad_blocked_cb),
(source_pad_event_probe), (gst_decode_pad_new), (add_fakesink),
(remove_fakesink), (find_sink_pad), (gst_decode_bin_change_state),
(plugin_init):
New decodebin2 element.
Closes #370092
* gst/playback/gstplay-marshal.list:
Added marshallers for new signals in decodebin2
* gst/playback/gstplaybasebin.c: (setup_subtitle), (make_decoder):
Use decodebin2 if *and only if* the USE_DECODEBIN2 environment variable
is set.
2006-11-28 14:40:39 +00:00
|
|
|
GST_LOG_OBJECT (dbin, "linked on pad %s:%s", GST_DEBUG_PAD_NAME (pad));
|
|
|
|
|
2009-09-26 10:17:49 +00:00
|
|
|
CHAIN_MUTEX_LOCK (chain);
|
2013-05-22 15:29:17 +00:00
|
|
|
delem = g_slice_new0 (GstDecodeElement);
|
2011-06-26 13:40:17 +00:00
|
|
|
delem->element = gst_object_ref (element);
|
|
|
|
delem->capsfilter = NULL;
|
|
|
|
chain->elements = g_list_prepend (chain->elements, delem);
|
2009-09-26 10:17:49 +00:00
|
|
|
chain->demuxer = is_demuxer_element (element);
|
2014-03-06 21:28:46 +00:00
|
|
|
chain->adaptive_demuxer = is_adaptive_demuxer_element (element);
|
2014-02-20 14:02:09 +00:00
|
|
|
|
2016-12-15 14:29:02 +00:00
|
|
|
is_decoder = strstr (gst_element_factory_get_metadata (factory,
|
|
|
|
GST_ELEMENT_METADATA_KLASS), "Decoder") != NULL;
|
|
|
|
|
2014-02-20 14:02:09 +00:00
|
|
|
/* For adaptive streaming demuxer we insert a multiqueue after
|
2014-08-11 08:57:43 +00:00
|
|
|
* this demuxer.
|
2014-02-20 14:02:09 +00:00
|
|
|
* Now for the case where we have a container stream inside these
|
|
|
|
* buffers, another demuxer will be plugged and after this second
|
|
|
|
* demuxer there will be a second multiqueue. This second multiqueue
|
|
|
|
* will get smaller buffers and will be the one emitting buffering
|
|
|
|
* messages.
|
|
|
|
* If we don't have a container stream inside the fragment buffers,
|
|
|
|
* we'll insert a multiqueue below right after the next element after
|
|
|
|
* the adaptive streaming demuxer. This is going to be a parser or
|
|
|
|
* decoder, and will output smaller buffers.
|
|
|
|
*/
|
|
|
|
if (chain->parent && chain->parent->parent) {
|
|
|
|
GstDecodeChain *parent_chain = chain->parent->parent;
|
|
|
|
|
2016-12-15 14:29:02 +00:00
|
|
|
if (parent_chain->adaptive_demuxer && (is_parser || is_decoder))
|
2014-02-20 14:02:09 +00:00
|
|
|
chain->demuxer = TRUE;
|
|
|
|
}
|
|
|
|
|
2016-04-12 13:32:20 +00:00
|
|
|
/* If we are configured to use buffering and there is no demuxer in the
|
|
|
|
* chain, we still want a multiqueue, otherwise we will ignore the
|
|
|
|
* use-buffering property. In that case, we will insert a multiqueue after
|
|
|
|
* the parser or decoder - not elsewhere, otherwise we won't have
|
|
|
|
* timestamps.
|
|
|
|
*/
|
|
|
|
|
|
|
|
if (!chain->parent && (is_parser || is_decoder) && dbin->use_buffering) {
|
|
|
|
chain->demuxer = TRUE;
|
|
|
|
if (is_decoder) {
|
|
|
|
GST_WARNING_OBJECT (dbin,
|
|
|
|
"Buffering messages used for decoded and non-parsed data");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2009-09-26 10:17:49 +00:00
|
|
|
CHAIN_MUTEX_UNLOCK (chain);
|
|
|
|
|
2012-05-10 17:11:47 +00:00
|
|
|
/* Set connection-speed property if needed */
|
2014-11-28 13:28:06 +00:00
|
|
|
if (chain->demuxer) {
|
2012-05-10 17:15:26 +00:00
|
|
|
GParamSpec *pspec;
|
|
|
|
|
|
|
|
if ((pspec = g_object_class_find_property (G_OBJECT_GET_CLASS (element),
|
|
|
|
"connection-speed"))) {
|
|
|
|
guint64 speed = dbin->connection_speed / 1000;
|
|
|
|
gboolean wrong_type = FALSE;
|
|
|
|
|
|
|
|
if (G_PARAM_SPEC_TYPE (pspec) == G_TYPE_PARAM_UINT) {
|
|
|
|
GParamSpecUInt *pspecuint = G_PARAM_SPEC_UINT (pspec);
|
|
|
|
|
|
|
|
speed = CLAMP (speed, pspecuint->minimum, pspecuint->maximum);
|
|
|
|
} else if (G_PARAM_SPEC_TYPE (pspec) == G_TYPE_PARAM_INT) {
|
|
|
|
GParamSpecInt *pspecint = G_PARAM_SPEC_INT (pspec);
|
|
|
|
|
|
|
|
speed = CLAMP (speed, pspecint->minimum, pspecint->maximum);
|
|
|
|
} else if (G_PARAM_SPEC_TYPE (pspec) == G_TYPE_PARAM_UINT64) {
|
|
|
|
GParamSpecUInt64 *pspecuint = G_PARAM_SPEC_UINT64 (pspec);
|
|
|
|
|
|
|
|
speed = CLAMP (speed, pspecuint->minimum, pspecuint->maximum);
|
|
|
|
} else if (G_PARAM_SPEC_TYPE (pspec) == G_TYPE_PARAM_INT64) {
|
2012-05-11 07:26:47 +00:00
|
|
|
GParamSpecInt64 *pspecint = G_PARAM_SPEC_INT64 (pspec);
|
2012-05-10 17:15:26 +00:00
|
|
|
|
|
|
|
speed = CLAMP (speed, pspecint->minimum, pspecint->maximum);
|
|
|
|
} else {
|
|
|
|
GST_WARNING_OBJECT (dbin,
|
2012-05-11 13:33:31 +00:00
|
|
|
"The connection speed property %" G_GUINT64_FORMAT " of type %s"
|
2012-05-10 17:15:26 +00:00
|
|
|
" is not usefull not setting it", speed,
|
|
|
|
g_type_name (G_PARAM_SPEC_TYPE (pspec)));
|
|
|
|
wrong_type = TRUE;
|
|
|
|
}
|
|
|
|
|
2014-11-28 13:28:06 +00:00
|
|
|
if (!wrong_type) {
|
2012-05-11 13:33:31 +00:00
|
|
|
GST_DEBUG_OBJECT (dbin, "setting connection-speed=%" G_GUINT64_FORMAT
|
|
|
|
" to demuxer element", speed);
|
2012-05-10 17:15:26 +00:00
|
|
|
|
|
|
|
g_object_set (element, "connection-speed", speed, NULL);
|
|
|
|
}
|
2012-05-10 17:11:47 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2008-03-24 11:36:08 +00:00
|
|
|
/* try to configure the subtitle encoding property when we can */
|
2012-04-16 06:27:20 +00:00
|
|
|
pspec = g_object_class_find_property (G_OBJECT_GET_CLASS (element),
|
|
|
|
"subtitle-encoding");
|
|
|
|
if (pspec && G_PARAM_SPEC_VALUE_TYPE (pspec) == G_TYPE_STRING) {
|
2009-11-06 14:12:06 +00:00
|
|
|
SUBTITLE_LOCK (dbin);
|
2008-03-24 11:36:08 +00:00
|
|
|
GST_DEBUG_OBJECT (dbin,
|
|
|
|
"setting subtitle-encoding=%s to element", dbin->encoding);
|
|
|
|
g_object_set (G_OBJECT (element), "subtitle-encoding", dbin->encoding,
|
|
|
|
NULL);
|
2009-11-06 14:12:06 +00:00
|
|
|
SUBTITLE_UNLOCK (dbin);
|
2008-03-24 11:36:08 +00:00
|
|
|
subtitle = TRUE;
|
2012-04-16 06:27:20 +00:00
|
|
|
} else {
|
2008-03-24 11:36:08 +00:00
|
|
|
subtitle = FALSE;
|
2012-04-16 06:27:20 +00:00
|
|
|
}
|
2008-03-24 11:36:08 +00:00
|
|
|
|
2014-07-10 14:24:36 +00:00
|
|
|
/* link this element further */
|
|
|
|
to_connect = connect_element (dbin, delem, chain);
|
|
|
|
|
2016-01-21 16:30:40 +00:00
|
|
|
while (to_connect) {
|
|
|
|
GstPad *opad = to_connect->data;
|
|
|
|
gboolean expose_pad = FALSE;
|
|
|
|
GstDecodeChain *new_chain;
|
|
|
|
GstCaps *ocaps;
|
|
|
|
|
|
|
|
ocaps = get_pad_caps (opad);
|
|
|
|
expose_pad =
|
|
|
|
analyze_new_pad (dbin, delem->element, opad, ocaps, chain,
|
|
|
|
&new_chain);
|
|
|
|
|
|
|
|
if (ocaps)
|
|
|
|
gst_caps_unref (ocaps);
|
|
|
|
|
|
|
|
if (expose_pad) {
|
|
|
|
PadExposeData *expose_data = g_new0 (PadExposeData, 1);
|
|
|
|
expose_data->chain = new_chain;
|
|
|
|
expose_data->pad = gst_object_ref (opad);
|
|
|
|
to_expose = g_list_prepend (to_expose, expose_data);
|
2014-07-10 14:24:36 +00:00
|
|
|
}
|
2016-01-21 16:30:40 +00:00
|
|
|
|
|
|
|
gst_object_unref (opad);
|
|
|
|
to_connect = g_list_delete_link (to_connect, to_connect);
|
2014-07-10 14:24:36 +00:00
|
|
|
}
|
2016-01-21 16:30:40 +00:00
|
|
|
/* any pads left in to_expose are to be exposed */
|
2014-07-10 14:24:36 +00:00
|
|
|
|
gst/playback/: New decodebin2 element.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstdecodebin2.c: (gst_decode_bin_get_type),
(_gst_boolean_accumulator), (gst_decode_bin_class_init),
(gst_decode_bin_factory_filter), (compare_ranks), (print_feature),
(gst_decode_bin_init), (gst_decode_bin_dispose),
(gst_decode_bin_finalize), (gst_decode_bin_set_property),
(gst_decode_bin_get_property), (gst_decode_bin_set_caps),
(gst_decode_bin_get_caps), (gst_decode_bin_autoplug_continue),
(gst_decode_bin_autoplug_sort), (analyze_new_pad), (connect_pad),
(connect_element), (expose_pad), (type_found),
(pad_added_group_cb), (pad_removed_group_cb),
(no_more_pads_group_cb), (pad_added_cb), (pad_removed_cb),
(no_more_pads_cb), (find_compatibles), (is_demuxer_element),
(are_raw_caps), (multi_queue_overrun_cb),
(multi_queue_underrun_cb), (gst_decode_group_new),
(get_current_group), (group_demuxer_event_probe),
(gst_decode_group_control_demuxer_pad),
(gst_decode_group_control_source_pad),
(gst_decode_group_check_if_blocked),
(gst_decode_group_check_if_drained), (gst_decode_group_expose),
(gst_decode_group_hide), (gst_decode_group_free),
(gst_decode_group_set_complete), (source_pad_blocked_cb),
(source_pad_event_probe), (gst_decode_pad_new), (add_fakesink),
(remove_fakesink), (find_sink_pad), (gst_decode_bin_change_state),
(plugin_init):
New decodebin2 element.
Closes #370092
* gst/playback/gstplay-marshal.list:
Added marshallers for new signals in decodebin2
* gst/playback/gstplaybasebin.c: (setup_subtitle), (make_decoder):
Use decodebin2 if *and only if* the USE_DECODEBIN2 environment variable
is set.
2006-11-28 14:40:39 +00:00
|
|
|
/* Bring the element to the state of the parent */
|
2014-11-25 15:46:50 +00:00
|
|
|
|
|
|
|
/* First lock element's sinkpad stream lock so no data reaches
|
|
|
|
* the possible new element added when caps are sent by element
|
|
|
|
* while we're still sending sticky events */
|
|
|
|
GST_PAD_STREAM_LOCK (sinkpad);
|
|
|
|
|
gst/playback/: New decodebin2 element.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstdecodebin2.c: (gst_decode_bin_get_type),
(_gst_boolean_accumulator), (gst_decode_bin_class_init),
(gst_decode_bin_factory_filter), (compare_ranks), (print_feature),
(gst_decode_bin_init), (gst_decode_bin_dispose),
(gst_decode_bin_finalize), (gst_decode_bin_set_property),
(gst_decode_bin_get_property), (gst_decode_bin_set_caps),
(gst_decode_bin_get_caps), (gst_decode_bin_autoplug_continue),
(gst_decode_bin_autoplug_sort), (analyze_new_pad), (connect_pad),
(connect_element), (expose_pad), (type_found),
(pad_added_group_cb), (pad_removed_group_cb),
(no_more_pads_group_cb), (pad_added_cb), (pad_removed_cb),
(no_more_pads_cb), (find_compatibles), (is_demuxer_element),
(are_raw_caps), (multi_queue_overrun_cb),
(multi_queue_underrun_cb), (gst_decode_group_new),
(get_current_group), (group_demuxer_event_probe),
(gst_decode_group_control_demuxer_pad),
(gst_decode_group_control_source_pad),
(gst_decode_group_check_if_blocked),
(gst_decode_group_check_if_drained), (gst_decode_group_expose),
(gst_decode_group_hide), (gst_decode_group_free),
(gst_decode_group_set_complete), (source_pad_blocked_cb),
(source_pad_event_probe), (gst_decode_pad_new), (add_fakesink),
(remove_fakesink), (find_sink_pad), (gst_decode_bin_change_state),
(plugin_init):
New decodebin2 element.
Closes #370092
* gst/playback/gstplay-marshal.list:
Added marshallers for new signals in decodebin2
* gst/playback/gstplaybasebin.c: (setup_subtitle), (make_decoder):
Use decodebin2 if *and only if* the USE_DECODEBIN2 environment variable
is set.
2006-11-28 14:40:39 +00:00
|
|
|
if ((gst_element_set_state (element,
|
2014-07-10 10:51:22 +00:00
|
|
|
GST_STATE_PAUSED)) == GST_STATE_CHANGE_FAILURE ||
|
|
|
|
!send_sticky_events (dbin, pad)) {
|
2011-06-26 13:40:17 +00:00
|
|
|
GstDecodeElement *dtmp = NULL;
|
2009-09-26 10:17:49 +00:00
|
|
|
GstElement *tmp = NULL;
|
2014-08-25 17:59:40 +00:00
|
|
|
GstMessage *error_msg;
|
2009-09-26 10:17:49 +00:00
|
|
|
|
2014-11-25 15:46:50 +00:00
|
|
|
GST_PAD_STREAM_UNLOCK (sinkpad);
|
|
|
|
|
gst/playback/: New decodebin2 element.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstdecodebin2.c: (gst_decode_bin_get_type),
(_gst_boolean_accumulator), (gst_decode_bin_class_init),
(gst_decode_bin_factory_filter), (compare_ranks), (print_feature),
(gst_decode_bin_init), (gst_decode_bin_dispose),
(gst_decode_bin_finalize), (gst_decode_bin_set_property),
(gst_decode_bin_get_property), (gst_decode_bin_set_caps),
(gst_decode_bin_get_caps), (gst_decode_bin_autoplug_continue),
(gst_decode_bin_autoplug_sort), (analyze_new_pad), (connect_pad),
(connect_element), (expose_pad), (type_found),
(pad_added_group_cb), (pad_removed_group_cb),
(no_more_pads_group_cb), (pad_added_cb), (pad_removed_cb),
(no_more_pads_cb), (find_compatibles), (is_demuxer_element),
(are_raw_caps), (multi_queue_overrun_cb),
(multi_queue_underrun_cb), (gst_decode_group_new),
(get_current_group), (group_demuxer_event_probe),
(gst_decode_group_control_demuxer_pad),
(gst_decode_group_control_source_pad),
(gst_decode_group_check_if_blocked),
(gst_decode_group_check_if_drained), (gst_decode_group_expose),
(gst_decode_group_hide), (gst_decode_group_free),
(gst_decode_group_set_complete), (source_pad_blocked_cb),
(source_pad_event_probe), (gst_decode_pad_new), (add_fakesink),
(remove_fakesink), (find_sink_pad), (gst_decode_bin_change_state),
(plugin_init):
New decodebin2 element.
Closes #370092
* gst/playback/gstplay-marshal.list:
Added marshallers for new signals in decodebin2
* gst/playback/gstplaybasebin.c: (setup_subtitle), (make_decoder):
Use decodebin2 if *and only if* the USE_DECODEBIN2 environment variable
is set.
2006-11-28 14:40:39 +00:00
|
|
|
GST_WARNING_OBJECT (dbin, "Couldn't set %s to PAUSED",
|
|
|
|
GST_ELEMENT_NAME (element));
|
2009-09-26 10:17:49 +00:00
|
|
|
|
2016-01-21 16:30:40 +00:00
|
|
|
while (to_expose) {
|
|
|
|
PadExposeData *expose_data = to_expose->data;
|
|
|
|
gst_object_unref (expose_data->pad);
|
|
|
|
g_free (expose_data);
|
|
|
|
to_expose = g_list_delete_link (to_expose, to_expose);
|
|
|
|
}
|
2014-07-10 14:24:36 +00:00
|
|
|
|
2014-08-25 17:59:40 +00:00
|
|
|
remove_error_filter (dbin, element, &error_msg);
|
|
|
|
|
|
|
|
if (error_msg) {
|
|
|
|
gchar *error_string = error_message_to_string (error_msg);
|
|
|
|
g_string_append_printf (error_details, "Couldn't set %s to PAUSED:\n%s",
|
|
|
|
GST_ELEMENT_NAME (element), error_string);
|
|
|
|
gst_message_unref (error_msg);
|
|
|
|
g_free (error_string);
|
|
|
|
} else {
|
|
|
|
g_string_append_printf (error_details, "Couldn't set %s to PAUSED",
|
|
|
|
GST_ELEMENT_NAME (element));
|
|
|
|
}
|
2014-07-10 10:22:35 +00:00
|
|
|
|
2009-09-26 10:17:49 +00:00
|
|
|
/* Remove all elements in this chain that were just added. No
|
|
|
|
* other thread could've added elements in the meantime */
|
|
|
|
CHAIN_MUTEX_LOCK (chain);
|
|
|
|
do {
|
2011-02-18 08:36:34 +00:00
|
|
|
GList *l;
|
|
|
|
|
2011-06-26 13:40:17 +00:00
|
|
|
dtmp = chain->elements->data;
|
|
|
|
tmp = dtmp->element;
|
2011-02-18 08:36:34 +00:00
|
|
|
|
|
|
|
/* Disconnect any signal handlers that might be connected
|
|
|
|
* in connect_element() or analyze_pad() */
|
2013-05-22 15:29:17 +00:00
|
|
|
if (dtmp->pad_added_id)
|
|
|
|
g_signal_handler_disconnect (tmp, dtmp->pad_added_id);
|
|
|
|
if (dtmp->pad_removed_id)
|
|
|
|
g_signal_handler_disconnect (tmp, dtmp->pad_removed_id);
|
|
|
|
if (dtmp->no_more_pads_id)
|
|
|
|
g_signal_handler_disconnect (tmp, dtmp->no_more_pads_id);
|
2011-02-18 08:36:34 +00:00
|
|
|
|
|
|
|
for (l = chain->pending_pads; l;) {
|
|
|
|
GstPendingPad *pp = l->data;
|
|
|
|
GList *n;
|
|
|
|
|
|
|
|
if (GST_PAD_PARENT (pp->pad) != tmp) {
|
|
|
|
l = l->next;
|
|
|
|
continue;
|
|
|
|
}
|
|
|
|
|
2013-05-22 15:29:17 +00:00
|
|
|
gst_pending_pad_free (pp);
|
2011-02-18 08:36:34 +00:00
|
|
|
|
|
|
|
/* Remove element from the list, update list head and go to the
|
|
|
|
* next element in the list */
|
|
|
|
n = l->next;
|
|
|
|
chain->pending_pads = g_list_delete_link (chain->pending_pads, l);
|
|
|
|
l = n;
|
|
|
|
}
|
|
|
|
|
2011-06-26 13:40:17 +00:00
|
|
|
if (dtmp->capsfilter) {
|
|
|
|
gst_bin_remove (GST_BIN (dbin), dtmp->capsfilter);
|
|
|
|
gst_element_set_state (dtmp->capsfilter, GST_STATE_NULL);
|
|
|
|
gst_object_unref (dtmp->capsfilter);
|
|
|
|
}
|
|
|
|
|
2009-09-26 10:17:49 +00:00
|
|
|
gst_bin_remove (GST_BIN (dbin), tmp);
|
2011-02-18 08:36:34 +00:00
|
|
|
gst_element_set_state (tmp, GST_STATE_NULL);
|
|
|
|
|
2011-02-15 16:01:13 +00:00
|
|
|
gst_object_unref (tmp);
|
2011-06-26 13:40:17 +00:00
|
|
|
g_slice_free (GstDecodeElement, dtmp);
|
|
|
|
|
2009-09-26 10:17:49 +00:00
|
|
|
chain->elements = g_list_delete_link (chain->elements, chain->elements);
|
|
|
|
} while (tmp != element);
|
|
|
|
CHAIN_MUTEX_UNLOCK (chain);
|
|
|
|
|
gst/playback/: New decodebin2 element.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstdecodebin2.c: (gst_decode_bin_get_type),
(_gst_boolean_accumulator), (gst_decode_bin_class_init),
(gst_decode_bin_factory_filter), (compare_ranks), (print_feature),
(gst_decode_bin_init), (gst_decode_bin_dispose),
(gst_decode_bin_finalize), (gst_decode_bin_set_property),
(gst_decode_bin_get_property), (gst_decode_bin_set_caps),
(gst_decode_bin_get_caps), (gst_decode_bin_autoplug_continue),
(gst_decode_bin_autoplug_sort), (analyze_new_pad), (connect_pad),
(connect_element), (expose_pad), (type_found),
(pad_added_group_cb), (pad_removed_group_cb),
(no_more_pads_group_cb), (pad_added_cb), (pad_removed_cb),
(no_more_pads_cb), (find_compatibles), (is_demuxer_element),
(are_raw_caps), (multi_queue_overrun_cb),
(multi_queue_underrun_cb), (gst_decode_group_new),
(get_current_group), (group_demuxer_event_probe),
(gst_decode_group_control_demuxer_pad),
(gst_decode_group_control_source_pad),
(gst_decode_group_check_if_blocked),
(gst_decode_group_check_if_drained), (gst_decode_group_expose),
(gst_decode_group_hide), (gst_decode_group_free),
(gst_decode_group_set_complete), (source_pad_blocked_cb),
(source_pad_event_probe), (gst_decode_pad_new), (add_fakesink),
(remove_fakesink), (find_sink_pad), (gst_decode_bin_change_state),
(plugin_init):
New decodebin2 element.
Closes #370092
* gst/playback/gstplay-marshal.list:
Added marshallers for new signals in decodebin2
* gst/playback/gstplaybasebin.c: (setup_subtitle), (make_decoder):
Use decodebin2 if *and only if* the USE_DECODEBIN2 environment variable
is set.
2006-11-28 14:40:39 +00:00
|
|
|
continue;
|
2014-11-25 15:46:50 +00:00
|
|
|
} else {
|
|
|
|
/* Everything went well, the spice must flow now */
|
|
|
|
GST_PAD_STREAM_UNLOCK (sinkpad);
|
gst/playback/: New decodebin2 element.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstdecodebin2.c: (gst_decode_bin_get_type),
(_gst_boolean_accumulator), (gst_decode_bin_class_init),
(gst_decode_bin_factory_filter), (compare_ranks), (print_feature),
(gst_decode_bin_init), (gst_decode_bin_dispose),
(gst_decode_bin_finalize), (gst_decode_bin_set_property),
(gst_decode_bin_get_property), (gst_decode_bin_set_caps),
(gst_decode_bin_get_caps), (gst_decode_bin_autoplug_continue),
(gst_decode_bin_autoplug_sort), (analyze_new_pad), (connect_pad),
(connect_element), (expose_pad), (type_found),
(pad_added_group_cb), (pad_removed_group_cb),
(no_more_pads_group_cb), (pad_added_cb), (pad_removed_cb),
(no_more_pads_cb), (find_compatibles), (is_demuxer_element),
(are_raw_caps), (multi_queue_overrun_cb),
(multi_queue_underrun_cb), (gst_decode_group_new),
(get_current_group), (group_demuxer_event_probe),
(gst_decode_group_control_demuxer_pad),
(gst_decode_group_control_source_pad),
(gst_decode_group_check_if_blocked),
(gst_decode_group_check_if_drained), (gst_decode_group_expose),
(gst_decode_group_hide), (gst_decode_group_free),
(gst_decode_group_set_complete), (source_pad_blocked_cb),
(source_pad_event_probe), (gst_decode_pad_new), (add_fakesink),
(remove_fakesink), (find_sink_pad), (gst_decode_bin_change_state),
(plugin_init):
New decodebin2 element.
Closes #370092
* gst/playback/gstplay-marshal.list:
Added marshallers for new signals in decodebin2
* gst/playback/gstplaybasebin.c: (setup_subtitle), (make_decoder):
Use decodebin2 if *and only if* the USE_DECODEBIN2 environment variable
is set.
2006-11-28 14:40:39 +00:00
|
|
|
}
|
2013-05-24 11:41:46 +00:00
|
|
|
|
2014-07-10 10:22:35 +00:00
|
|
|
/* Remove error filter now, from now on we can't gracefully
|
|
|
|
* handle errors of the element anymore */
|
2014-08-25 17:59:40 +00:00
|
|
|
remove_error_filter (dbin, element, NULL);
|
2014-07-10 10:22:35 +00:00
|
|
|
|
2013-05-24 11:41:46 +00:00
|
|
|
/* Now let the bin handle the state */
|
|
|
|
gst_element_set_locked_state (element, FALSE);
|
|
|
|
|
2008-03-24 11:36:08 +00:00
|
|
|
if (subtitle) {
|
2009-11-06 14:12:06 +00:00
|
|
|
SUBTITLE_LOCK (dbin);
|
2008-03-24 11:36:08 +00:00
|
|
|
/* we added the element now, add it to the list of subtitle-encoding
|
|
|
|
* elements when we can set the property */
|
|
|
|
dbin->subtitles = g_list_prepend (dbin->subtitles, element);
|
2009-11-06 14:12:06 +00:00
|
|
|
SUBTITLE_UNLOCK (dbin);
|
2008-03-24 11:36:08 +00:00
|
|
|
}
|
gst/playback/: New decodebin2 element.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstdecodebin2.c: (gst_decode_bin_get_type),
(_gst_boolean_accumulator), (gst_decode_bin_class_init),
(gst_decode_bin_factory_filter), (compare_ranks), (print_feature),
(gst_decode_bin_init), (gst_decode_bin_dispose),
(gst_decode_bin_finalize), (gst_decode_bin_set_property),
(gst_decode_bin_get_property), (gst_decode_bin_set_caps),
(gst_decode_bin_get_caps), (gst_decode_bin_autoplug_continue),
(gst_decode_bin_autoplug_sort), (analyze_new_pad), (connect_pad),
(connect_element), (expose_pad), (type_found),
(pad_added_group_cb), (pad_removed_group_cb),
(no_more_pads_group_cb), (pad_added_cb), (pad_removed_cb),
(no_more_pads_cb), (find_compatibles), (is_demuxer_element),
(are_raw_caps), (multi_queue_overrun_cb),
(multi_queue_underrun_cb), (gst_decode_group_new),
(get_current_group), (group_demuxer_event_probe),
(gst_decode_group_control_demuxer_pad),
(gst_decode_group_control_source_pad),
(gst_decode_group_check_if_blocked),
(gst_decode_group_check_if_drained), (gst_decode_group_expose),
(gst_decode_group_hide), (gst_decode_group_free),
(gst_decode_group_set_complete), (source_pad_blocked_cb),
(source_pad_event_probe), (gst_decode_pad_new), (add_fakesink),
(remove_fakesink), (find_sink_pad), (gst_decode_bin_change_state),
(plugin_init):
New decodebin2 element.
Closes #370092
* gst/playback/gstplay-marshal.list:
Added marshallers for new signals in decodebin2
* gst/playback/gstplaybasebin.c: (setup_subtitle), (make_decoder):
Use decodebin2 if *and only if* the USE_DECODEBIN2 environment variable
is set.
2006-11-28 14:40:39 +00:00
|
|
|
|
2016-01-21 16:30:40 +00:00
|
|
|
while (to_expose) {
|
|
|
|
PadExposeData *expose_data = to_expose->data;
|
|
|
|
GstCaps *ocaps;
|
2015-10-19 16:58:26 +00:00
|
|
|
|
2016-01-21 16:30:40 +00:00
|
|
|
ocaps = get_pad_caps (expose_data->pad);
|
|
|
|
expose_pad (dbin, delem->element, expose_data->chain->current_pad,
|
2016-03-12 17:47:47 +00:00
|
|
|
expose_data->pad, ocaps, expose_data->chain);
|
2015-10-19 16:58:26 +00:00
|
|
|
|
2016-01-21 16:30:40 +00:00
|
|
|
if (ocaps)
|
|
|
|
gst_caps_unref (ocaps);
|
2015-10-19 16:58:26 +00:00
|
|
|
|
2016-01-21 16:30:40 +00:00
|
|
|
gst_object_unref (expose_data->pad);
|
|
|
|
g_free (expose_data);
|
|
|
|
to_expose = g_list_delete_link (to_expose, to_expose);
|
2015-10-19 16:58:26 +00:00
|
|
|
}
|
2014-07-10 10:50:17 +00:00
|
|
|
|
gst/playback/: New decodebin2 element.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstdecodebin2.c: (gst_decode_bin_get_type),
(_gst_boolean_accumulator), (gst_decode_bin_class_init),
(gst_decode_bin_factory_filter), (compare_ranks), (print_feature),
(gst_decode_bin_init), (gst_decode_bin_dispose),
(gst_decode_bin_finalize), (gst_decode_bin_set_property),
(gst_decode_bin_get_property), (gst_decode_bin_set_caps),
(gst_decode_bin_get_caps), (gst_decode_bin_autoplug_continue),
(gst_decode_bin_autoplug_sort), (analyze_new_pad), (connect_pad),
(connect_element), (expose_pad), (type_found),
(pad_added_group_cb), (pad_removed_group_cb),
(no_more_pads_group_cb), (pad_added_cb), (pad_removed_cb),
(no_more_pads_cb), (find_compatibles), (is_demuxer_element),
(are_raw_caps), (multi_queue_overrun_cb),
(multi_queue_underrun_cb), (gst_decode_group_new),
(get_current_group), (group_demuxer_event_probe),
(gst_decode_group_control_demuxer_pad),
(gst_decode_group_control_source_pad),
(gst_decode_group_check_if_blocked),
(gst_decode_group_check_if_drained), (gst_decode_group_expose),
(gst_decode_group_hide), (gst_decode_group_free),
(gst_decode_group_set_complete), (source_pad_blocked_cb),
(source_pad_event_probe), (gst_decode_pad_new), (add_fakesink),
(remove_fakesink), (find_sink_pad), (gst_decode_bin_change_state),
(plugin_init):
New decodebin2 element.
Closes #370092
* gst/playback/gstplay-marshal.list:
Added marshallers for new signals in decodebin2
* gst/playback/gstplaybasebin.c: (setup_subtitle), (make_decoder):
Use decodebin2 if *and only if* the USE_DECODEBIN2 environment variable
is set.
2006-11-28 14:40:39 +00:00
|
|
|
res = TRUE;
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
gst/playback/Makefile.am: Group decodebin2 and uridecodebin into the same plugin so that they can share the GEnumType.
Original commit message from CVS:
* gst/playback/Makefile.am:
Group decodebin2 and uridecodebin into the same plugin so that they
can share the GEnumType.
* gst/playback/gstdecodebin2.c: (_gst_array_accumulator),
(_gst_select_accumulator), (gst_decode_bin_class_init),
(gst_decode_bin_init), (gst_decode_bin_autoplug_sort),
(gst_decode_bin_autoplug_select), (gst_decode_bin_autoplug_add),
(analyze_new_pad), (connect_pad), (gst_decode_bin_plugin_init):
Add signal to sort factories instead of the more awkward autoplug-select
signal.
Modify autoplug_select so that we can try, skip or expose the
autopluggin of an element on a pad.
* gst/playback/gstfactorylists.c: (compare_ranks),
(decoders_filter), (sinks_filter), (gst_factory_list_is_type),
(element_filter), (gst_factory_list_get_elements),
(gst_factory_list_debug), (gst_factory_list_filter):
* gst/playback/gstfactorylists.h:
Simplify the API, allow getting elements based on mask.
* gst/playback/gstplay-marshal.list:
Add some more marshallers.
* gst/playback/gstplaybin2.c: (init_group), (gst_play_bin_init),
(gst_play_bin_finalize), (pad_removed_cb), (autoplug_factories_cb),
(autoplug_select_cb), (activate_group):
Add support for managing non-raw sinks by providing a custom element and
sink list to decodebin2.
Try to plug non-raw sinks when decodebin2 using autoplug-select of
decodebin2.
* gst/playback/gstplaysink.c: (gen_video_chain), (gen_audio_chain),
(gst_play_sink_set_mode), (gst_play_sink_request_pad):
* gst/playback/gstplaysink.h:
Add support for raw and non-raw sinks.
Add support to force sinks selected by playbin2.
Don't plug raw converters for non-raw sinks.
* gst/playback/gsturidecodebin.c: (_gst_array_accumulator),
(_gst_select_accumulator), (gst_uri_decode_bin_class_init),
(proxy_autoplug_select_signal), (gst_uri_decode_bin_plugin_init),
(plugin_init):
Use right accumulators.
Proxy new signal.
2007-12-05 17:11:48 +00:00
|
|
|
beach:
|
2007-04-03 11:10:52 +00:00
|
|
|
if (mqpad)
|
|
|
|
gst_object_unref (mqpad);
|
|
|
|
|
2014-08-25 17:59:40 +00:00
|
|
|
if (error_details)
|
2015-07-31 04:31:56 +00:00
|
|
|
*deadend_details = g_string_free (error_details, (error_details->len == 0
|
|
|
|
|| res));
|
2014-08-25 17:59:40 +00:00
|
|
|
else
|
|
|
|
*deadend_details = NULL;
|
|
|
|
|
gst/playback/: New decodebin2 element.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstdecodebin2.c: (gst_decode_bin_get_type),
(_gst_boolean_accumulator), (gst_decode_bin_class_init),
(gst_decode_bin_factory_filter), (compare_ranks), (print_feature),
(gst_decode_bin_init), (gst_decode_bin_dispose),
(gst_decode_bin_finalize), (gst_decode_bin_set_property),
(gst_decode_bin_get_property), (gst_decode_bin_set_caps),
(gst_decode_bin_get_caps), (gst_decode_bin_autoplug_continue),
(gst_decode_bin_autoplug_sort), (analyze_new_pad), (connect_pad),
(connect_element), (expose_pad), (type_found),
(pad_added_group_cb), (pad_removed_group_cb),
(no_more_pads_group_cb), (pad_added_cb), (pad_removed_cb),
(no_more_pads_cb), (find_compatibles), (is_demuxer_element),
(are_raw_caps), (multi_queue_overrun_cb),
(multi_queue_underrun_cb), (gst_decode_group_new),
(get_current_group), (group_demuxer_event_probe),
(gst_decode_group_control_demuxer_pad),
(gst_decode_group_control_source_pad),
(gst_decode_group_check_if_blocked),
(gst_decode_group_check_if_drained), (gst_decode_group_expose),
(gst_decode_group_hide), (gst_decode_group_free),
(gst_decode_group_set_complete), (source_pad_blocked_cb),
(source_pad_event_probe), (gst_decode_pad_new), (add_fakesink),
(remove_fakesink), (find_sink_pad), (gst_decode_bin_change_state),
(plugin_init):
New decodebin2 element.
Closes #370092
* gst/playback/gstplay-marshal.list:
Added marshallers for new signals in decodebin2
* gst/playback/gstplaybasebin.c: (setup_subtitle), (make_decoder):
Use decodebin2 if *and only if* the USE_DECODEBIN2 environment variable
is set.
2006-11-28 14:40:39 +00:00
|
|
|
return res;
|
|
|
|
}
|
|
|
|
|
2010-06-28 08:53:57 +00:00
|
|
|
static GstCaps *
|
|
|
|
get_pad_caps (GstPad * pad)
|
|
|
|
{
|
|
|
|
GstCaps *caps;
|
|
|
|
|
|
|
|
/* first check the pad caps, if this is set, we are positively sure it is
|
|
|
|
* fixed and exactly what the element will produce. */
|
2011-05-09 11:05:12 +00:00
|
|
|
caps = gst_pad_get_current_caps (pad);
|
2010-06-28 08:53:57 +00:00
|
|
|
|
|
|
|
/* then use the getcaps function if we don't have caps. These caps might not
|
|
|
|
* be fixed in some cases, in which case analyze_new_pad will set up a
|
|
|
|
* notify::caps signal to continue autoplugging. */
|
|
|
|
if (caps == NULL)
|
2011-11-15 15:48:15 +00:00
|
|
|
caps = gst_pad_query_caps (pad, NULL);
|
2010-06-28 08:53:57 +00:00
|
|
|
|
|
|
|
return caps;
|
|
|
|
}
|
|
|
|
|
2014-07-10 14:24:36 +00:00
|
|
|
/* Returns a list of pads that can be connected to already and
|
|
|
|
* connects to pad-added and related signals */
|
|
|
|
static GList *
|
2013-05-22 15:29:17 +00:00
|
|
|
connect_element (GstDecodeBin * dbin, GstDecodeElement * delem,
|
2009-09-26 10:17:49 +00:00
|
|
|
GstDecodeChain * chain)
|
gst/playback/: New decodebin2 element.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstdecodebin2.c: (gst_decode_bin_get_type),
(_gst_boolean_accumulator), (gst_decode_bin_class_init),
(gst_decode_bin_factory_filter), (compare_ranks), (print_feature),
(gst_decode_bin_init), (gst_decode_bin_dispose),
(gst_decode_bin_finalize), (gst_decode_bin_set_property),
(gst_decode_bin_get_property), (gst_decode_bin_set_caps),
(gst_decode_bin_get_caps), (gst_decode_bin_autoplug_continue),
(gst_decode_bin_autoplug_sort), (analyze_new_pad), (connect_pad),
(connect_element), (expose_pad), (type_found),
(pad_added_group_cb), (pad_removed_group_cb),
(no_more_pads_group_cb), (pad_added_cb), (pad_removed_cb),
(no_more_pads_cb), (find_compatibles), (is_demuxer_element),
(are_raw_caps), (multi_queue_overrun_cb),
(multi_queue_underrun_cb), (gst_decode_group_new),
(get_current_group), (group_demuxer_event_probe),
(gst_decode_group_control_demuxer_pad),
(gst_decode_group_control_source_pad),
(gst_decode_group_check_if_blocked),
(gst_decode_group_check_if_drained), (gst_decode_group_expose),
(gst_decode_group_hide), (gst_decode_group_free),
(gst_decode_group_set_complete), (source_pad_blocked_cb),
(source_pad_event_probe), (gst_decode_pad_new), (add_fakesink),
(remove_fakesink), (find_sink_pad), (gst_decode_bin_change_state),
(plugin_init):
New decodebin2 element.
Closes #370092
* gst/playback/gstplay-marshal.list:
Added marshallers for new signals in decodebin2
* gst/playback/gstplaybasebin.c: (setup_subtitle), (make_decoder):
Use decodebin2 if *and only if* the USE_DECODEBIN2 environment variable
is set.
2006-11-28 14:40:39 +00:00
|
|
|
{
|
2013-05-22 15:29:17 +00:00
|
|
|
GstElement *element = delem->element;
|
gst/playback/: New decodebin2 element.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstdecodebin2.c: (gst_decode_bin_get_type),
(_gst_boolean_accumulator), (gst_decode_bin_class_init),
(gst_decode_bin_factory_filter), (compare_ranks), (print_feature),
(gst_decode_bin_init), (gst_decode_bin_dispose),
(gst_decode_bin_finalize), (gst_decode_bin_set_property),
(gst_decode_bin_get_property), (gst_decode_bin_set_caps),
(gst_decode_bin_get_caps), (gst_decode_bin_autoplug_continue),
(gst_decode_bin_autoplug_sort), (analyze_new_pad), (connect_pad),
(connect_element), (expose_pad), (type_found),
(pad_added_group_cb), (pad_removed_group_cb),
(no_more_pads_group_cb), (pad_added_cb), (pad_removed_cb),
(no_more_pads_cb), (find_compatibles), (is_demuxer_element),
(are_raw_caps), (multi_queue_overrun_cb),
(multi_queue_underrun_cb), (gst_decode_group_new),
(get_current_group), (group_demuxer_event_probe),
(gst_decode_group_control_demuxer_pad),
(gst_decode_group_control_source_pad),
(gst_decode_group_check_if_blocked),
(gst_decode_group_check_if_drained), (gst_decode_group_expose),
(gst_decode_group_hide), (gst_decode_group_free),
(gst_decode_group_set_complete), (source_pad_blocked_cb),
(source_pad_event_probe), (gst_decode_pad_new), (add_fakesink),
(remove_fakesink), (find_sink_pad), (gst_decode_bin_change_state),
(plugin_init):
New decodebin2 element.
Closes #370092
* gst/playback/gstplay-marshal.list:
Added marshallers for new signals in decodebin2
* gst/playback/gstplaybasebin.c: (setup_subtitle), (make_decoder):
Use decodebin2 if *and only if* the USE_DECODEBIN2 environment variable
is set.
2006-11-28 14:40:39 +00:00
|
|
|
GList *pads;
|
|
|
|
gboolean dynamic = FALSE;
|
|
|
|
GList *to_connect = NULL;
|
|
|
|
|
2009-09-26 10:17:49 +00:00
|
|
|
GST_DEBUG_OBJECT (dbin, "Attempting to connect element %s [chain:%p] further",
|
|
|
|
GST_ELEMENT_NAME (element), chain);
|
gst/playback/: New decodebin2 element.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstdecodebin2.c: (gst_decode_bin_get_type),
(_gst_boolean_accumulator), (gst_decode_bin_class_init),
(gst_decode_bin_factory_filter), (compare_ranks), (print_feature),
(gst_decode_bin_init), (gst_decode_bin_dispose),
(gst_decode_bin_finalize), (gst_decode_bin_set_property),
(gst_decode_bin_get_property), (gst_decode_bin_set_caps),
(gst_decode_bin_get_caps), (gst_decode_bin_autoplug_continue),
(gst_decode_bin_autoplug_sort), (analyze_new_pad), (connect_pad),
(connect_element), (expose_pad), (type_found),
(pad_added_group_cb), (pad_removed_group_cb),
(no_more_pads_group_cb), (pad_added_cb), (pad_removed_cb),
(no_more_pads_cb), (find_compatibles), (is_demuxer_element),
(are_raw_caps), (multi_queue_overrun_cb),
(multi_queue_underrun_cb), (gst_decode_group_new),
(get_current_group), (group_demuxer_event_probe),
(gst_decode_group_control_demuxer_pad),
(gst_decode_group_control_source_pad),
(gst_decode_group_check_if_blocked),
(gst_decode_group_check_if_drained), (gst_decode_group_expose),
(gst_decode_group_hide), (gst_decode_group_free),
(gst_decode_group_set_complete), (source_pad_blocked_cb),
(source_pad_event_probe), (gst_decode_pad_new), (add_fakesink),
(remove_fakesink), (find_sink_pad), (gst_decode_bin_change_state),
(plugin_init):
New decodebin2 element.
Closes #370092
* gst/playback/gstplay-marshal.list:
Added marshallers for new signals in decodebin2
* gst/playback/gstplaybasebin.c: (setup_subtitle), (make_decoder):
Use decodebin2 if *and only if* the USE_DECODEBIN2 environment variable
is set.
2006-11-28 14:40:39 +00:00
|
|
|
|
|
|
|
/* 1. Loop over pad templates, grabbing existing pads along the way */
|
|
|
|
for (pads = GST_ELEMENT_GET_CLASS (element)->padtemplates; pads;
|
|
|
|
pads = g_list_next (pads)) {
|
|
|
|
GstPadTemplate *templ = GST_PAD_TEMPLATE (pads->data);
|
|
|
|
const gchar *templ_name;
|
|
|
|
|
|
|
|
/* we are only interested in source pads */
|
|
|
|
if (GST_PAD_TEMPLATE_DIRECTION (templ) != GST_PAD_SRC)
|
|
|
|
continue;
|
|
|
|
|
|
|
|
templ_name = GST_PAD_TEMPLATE_NAME_TEMPLATE (templ);
|
|
|
|
GST_DEBUG_OBJECT (dbin, "got a source pad template %s", templ_name);
|
|
|
|
|
|
|
|
/* figure out what kind of pad this is */
|
|
|
|
switch (GST_PAD_TEMPLATE_PRESENCE (templ)) {
|
|
|
|
case GST_PAD_ALWAYS:
|
|
|
|
{
|
|
|
|
/* get the pad that we need to autoplug */
|
Don't use bad gst_element_get_pad().
Original commit message from CVS:
* ext/ogg/gstoggdemux.c: (gst_ogg_pad_typefind):
* gst/playback/decodetest.c: (new_decoded_pad_cb):
* gst/playback/gstdecodebin.c: (gst_decode_bin_init),
(try_to_link_1), (elem_is_dynamic), (close_link), (type_found),
(cleanup_decodebin):
* gst/playback/gstdecodebin2.c: (gst_decode_bin_init),
(connect_element), (gst_decode_group_control_demuxer_pad):
* gst/playback/gstplaybasebin.c: (queue_remove_probe),
(queue_out_of_data), (gen_preroll_element), (preroll_unlinked),
(mute_group_type):
* gst/playback/gstplaybin.c: (gst_play_bin_vis_blocked),
(gst_play_bin_set_property), (handoff), (gen_video_element),
(gen_text_element), (gen_audio_element), (gen_vis_element),
(remove_sinks), (add_sink), (setup_sinks):
* gst/playback/gstplaybin2.c: (pad_added_cb), (no_more_pads_cb):
* gst/playback/gstplaysink.c: (gst_play_sink_get_video_sink),
(gst_play_sink_get_audio_sink), (gst_play_sink_vis_unblocked),
(gst_play_sink_vis_blocked), (gst_play_sink_set_vis_plugin),
(gst_play_sink_get_vis_plugin), (gst_play_sink_set_mute),
(gen_video_chain), (gen_text_chain), (gen_audio_chain),
(gen_vis_chain), (gst_play_sink_reconfigure),
(gst_play_sink_set_font_desc), (gst_play_sink_get_font_desc),
(gst_play_sink_request_pad):
* gst/playback/gsturidecodebin.c: (type_found), (setup_source):
* gst/playback/test.c: (gen_video_element), (gen_audio_element),
(cb_newpad):
* gst/playback/test6.c: (new_decoded_pad_cb):
* tests/check/elements/audioconvert.c: (GST_START_TEST):
* tests/check/elements/audiorate.c: (test_injector_chain),
(do_perfect_stream_test):
* tests/check/elements/ffmpegcolorspace.c: (GST_START_TEST):
* tests/check/elements/gdpdepay.c: (GST_START_TEST):
* tests/check/elements/gnomevfssink.c:
* tests/check/elements/textoverlay.c:
(notgst_check_setup_src_pad2), (notgst_check_teardown_src_pad2):
* tests/check/elements/videotestsrc.c: (GST_START_TEST):
* tests/check/libs/cddabasesrc.c: (GST_START_TEST):
* tests/check/pipelines/oggmux.c: (test_pipeline):
* tests/check/pipelines/streamheader.c: (GST_START_TEST):
* tests/check/pipelines/theoraenc.c: (GST_START_TEST):
* tests/check/pipelines/vorbisenc.c: (GST_START_TEST):
* tests/examples/seek/scrubby.c: (make_wav_pipeline):
* tests/examples/seek/seek.c: (make_mod_pipeline),
(make_dv_pipeline), (make_wav_pipeline), (make_flac_pipeline),
(make_sid_pipeline), (make_parse_pipeline), (make_vorbis_pipeline),
(make_theora_pipeline), (make_vorbis_theora_pipeline),
(make_avi_msmpeg4v3_mp3_pipeline), (make_mp3_pipeline),
(make_avi_pipeline), (make_mpeg_pipeline), (make_mpegnt_pipeline),
(update_fill), (msg_buffering):
Don't use bad gst_element_get_pad().
2008-05-21 16:36:50 +00:00
|
|
|
GstPad *pad = gst_element_get_static_pad (element, templ_name);
|
gst/playback/: New decodebin2 element.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstdecodebin2.c: (gst_decode_bin_get_type),
(_gst_boolean_accumulator), (gst_decode_bin_class_init),
(gst_decode_bin_factory_filter), (compare_ranks), (print_feature),
(gst_decode_bin_init), (gst_decode_bin_dispose),
(gst_decode_bin_finalize), (gst_decode_bin_set_property),
(gst_decode_bin_get_property), (gst_decode_bin_set_caps),
(gst_decode_bin_get_caps), (gst_decode_bin_autoplug_continue),
(gst_decode_bin_autoplug_sort), (analyze_new_pad), (connect_pad),
(connect_element), (expose_pad), (type_found),
(pad_added_group_cb), (pad_removed_group_cb),
(no_more_pads_group_cb), (pad_added_cb), (pad_removed_cb),
(no_more_pads_cb), (find_compatibles), (is_demuxer_element),
(are_raw_caps), (multi_queue_overrun_cb),
(multi_queue_underrun_cb), (gst_decode_group_new),
(get_current_group), (group_demuxer_event_probe),
(gst_decode_group_control_demuxer_pad),
(gst_decode_group_control_source_pad),
(gst_decode_group_check_if_blocked),
(gst_decode_group_check_if_drained), (gst_decode_group_expose),
(gst_decode_group_hide), (gst_decode_group_free),
(gst_decode_group_set_complete), (source_pad_blocked_cb),
(source_pad_event_probe), (gst_decode_pad_new), (add_fakesink),
(remove_fakesink), (find_sink_pad), (gst_decode_bin_change_state),
(plugin_init):
New decodebin2 element.
Closes #370092
* gst/playback/gstplay-marshal.list:
Added marshallers for new signals in decodebin2
* gst/playback/gstplaybasebin.c: (setup_subtitle), (make_decoder):
Use decodebin2 if *and only if* the USE_DECODEBIN2 environment variable
is set.
2006-11-28 14:40:39 +00:00
|
|
|
|
|
|
|
if (pad) {
|
|
|
|
GST_DEBUG_OBJECT (dbin, "got the pad for always template %s",
|
|
|
|
templ_name);
|
|
|
|
/* here is the pad, we need to autoplug it */
|
|
|
|
to_connect = g_list_prepend (to_connect, pad);
|
|
|
|
} else {
|
|
|
|
/* strange, pad is marked as always but it's not
|
|
|
|
* there. Fix the element */
|
|
|
|
GST_WARNING_OBJECT (dbin,
|
|
|
|
"could not get the pad for always template %s", templ_name);
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
case GST_PAD_SOMETIMES:
|
|
|
|
{
|
|
|
|
/* try to get the pad to see if it is already created or
|
|
|
|
* not */
|
Don't use bad gst_element_get_pad().
Original commit message from CVS:
* ext/ogg/gstoggdemux.c: (gst_ogg_pad_typefind):
* gst/playback/decodetest.c: (new_decoded_pad_cb):
* gst/playback/gstdecodebin.c: (gst_decode_bin_init),
(try_to_link_1), (elem_is_dynamic), (close_link), (type_found),
(cleanup_decodebin):
* gst/playback/gstdecodebin2.c: (gst_decode_bin_init),
(connect_element), (gst_decode_group_control_demuxer_pad):
* gst/playback/gstplaybasebin.c: (queue_remove_probe),
(queue_out_of_data), (gen_preroll_element), (preroll_unlinked),
(mute_group_type):
* gst/playback/gstplaybin.c: (gst_play_bin_vis_blocked),
(gst_play_bin_set_property), (handoff), (gen_video_element),
(gen_text_element), (gen_audio_element), (gen_vis_element),
(remove_sinks), (add_sink), (setup_sinks):
* gst/playback/gstplaybin2.c: (pad_added_cb), (no_more_pads_cb):
* gst/playback/gstplaysink.c: (gst_play_sink_get_video_sink),
(gst_play_sink_get_audio_sink), (gst_play_sink_vis_unblocked),
(gst_play_sink_vis_blocked), (gst_play_sink_set_vis_plugin),
(gst_play_sink_get_vis_plugin), (gst_play_sink_set_mute),
(gen_video_chain), (gen_text_chain), (gen_audio_chain),
(gen_vis_chain), (gst_play_sink_reconfigure),
(gst_play_sink_set_font_desc), (gst_play_sink_get_font_desc),
(gst_play_sink_request_pad):
* gst/playback/gsturidecodebin.c: (type_found), (setup_source):
* gst/playback/test.c: (gen_video_element), (gen_audio_element),
(cb_newpad):
* gst/playback/test6.c: (new_decoded_pad_cb):
* tests/check/elements/audioconvert.c: (GST_START_TEST):
* tests/check/elements/audiorate.c: (test_injector_chain),
(do_perfect_stream_test):
* tests/check/elements/ffmpegcolorspace.c: (GST_START_TEST):
* tests/check/elements/gdpdepay.c: (GST_START_TEST):
* tests/check/elements/gnomevfssink.c:
* tests/check/elements/textoverlay.c:
(notgst_check_setup_src_pad2), (notgst_check_teardown_src_pad2):
* tests/check/elements/videotestsrc.c: (GST_START_TEST):
* tests/check/libs/cddabasesrc.c: (GST_START_TEST):
* tests/check/pipelines/oggmux.c: (test_pipeline):
* tests/check/pipelines/streamheader.c: (GST_START_TEST):
* tests/check/pipelines/theoraenc.c: (GST_START_TEST):
* tests/check/pipelines/vorbisenc.c: (GST_START_TEST):
* tests/examples/seek/scrubby.c: (make_wav_pipeline):
* tests/examples/seek/seek.c: (make_mod_pipeline),
(make_dv_pipeline), (make_wav_pipeline), (make_flac_pipeline),
(make_sid_pipeline), (make_parse_pipeline), (make_vorbis_pipeline),
(make_theora_pipeline), (make_vorbis_theora_pipeline),
(make_avi_msmpeg4v3_mp3_pipeline), (make_mp3_pipeline),
(make_avi_pipeline), (make_mpeg_pipeline), (make_mpegnt_pipeline),
(update_fill), (msg_buffering):
Don't use bad gst_element_get_pad().
2008-05-21 16:36:50 +00:00
|
|
|
GstPad *pad = gst_element_get_static_pad (element, templ_name);
|
gst/playback/: New decodebin2 element.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstdecodebin2.c: (gst_decode_bin_get_type),
(_gst_boolean_accumulator), (gst_decode_bin_class_init),
(gst_decode_bin_factory_filter), (compare_ranks), (print_feature),
(gst_decode_bin_init), (gst_decode_bin_dispose),
(gst_decode_bin_finalize), (gst_decode_bin_set_property),
(gst_decode_bin_get_property), (gst_decode_bin_set_caps),
(gst_decode_bin_get_caps), (gst_decode_bin_autoplug_continue),
(gst_decode_bin_autoplug_sort), (analyze_new_pad), (connect_pad),
(connect_element), (expose_pad), (type_found),
(pad_added_group_cb), (pad_removed_group_cb),
(no_more_pads_group_cb), (pad_added_cb), (pad_removed_cb),
(no_more_pads_cb), (find_compatibles), (is_demuxer_element),
(are_raw_caps), (multi_queue_overrun_cb),
(multi_queue_underrun_cb), (gst_decode_group_new),
(get_current_group), (group_demuxer_event_probe),
(gst_decode_group_control_demuxer_pad),
(gst_decode_group_control_source_pad),
(gst_decode_group_check_if_blocked),
(gst_decode_group_check_if_drained), (gst_decode_group_expose),
(gst_decode_group_hide), (gst_decode_group_free),
(gst_decode_group_set_complete), (source_pad_blocked_cb),
(source_pad_event_probe), (gst_decode_pad_new), (add_fakesink),
(remove_fakesink), (find_sink_pad), (gst_decode_bin_change_state),
(plugin_init):
New decodebin2 element.
Closes #370092
* gst/playback/gstplay-marshal.list:
Added marshallers for new signals in decodebin2
* gst/playback/gstplaybasebin.c: (setup_subtitle), (make_decoder):
Use decodebin2 if *and only if* the USE_DECODEBIN2 environment variable
is set.
2006-11-28 14:40:39 +00:00
|
|
|
|
|
|
|
if (pad) {
|
|
|
|
GST_DEBUG_OBJECT (dbin, "got the pad for sometimes template %s",
|
|
|
|
templ_name);
|
|
|
|
/* the pad is created, we need to autoplug it */
|
|
|
|
to_connect = g_list_prepend (to_connect, pad);
|
|
|
|
} else {
|
|
|
|
GST_DEBUG_OBJECT (dbin,
|
|
|
|
"did not get the sometimes pad of template %s", templ_name);
|
|
|
|
/* we have an element that will create dynamic pads */
|
|
|
|
dynamic = TRUE;
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
case GST_PAD_REQUEST:
|
|
|
|
/* ignore request pads */
|
|
|
|
GST_DEBUG_OBJECT (dbin, "ignoring request padtemplate %s", templ_name);
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2009-09-26 10:17:49 +00:00
|
|
|
/* 2. if there are more potential pads, connect to relevant signals */
|
gst/playback/: New decodebin2 element.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstdecodebin2.c: (gst_decode_bin_get_type),
(_gst_boolean_accumulator), (gst_decode_bin_class_init),
(gst_decode_bin_factory_filter), (compare_ranks), (print_feature),
(gst_decode_bin_init), (gst_decode_bin_dispose),
(gst_decode_bin_finalize), (gst_decode_bin_set_property),
(gst_decode_bin_get_property), (gst_decode_bin_set_caps),
(gst_decode_bin_get_caps), (gst_decode_bin_autoplug_continue),
(gst_decode_bin_autoplug_sort), (analyze_new_pad), (connect_pad),
(connect_element), (expose_pad), (type_found),
(pad_added_group_cb), (pad_removed_group_cb),
(no_more_pads_group_cb), (pad_added_cb), (pad_removed_cb),
(no_more_pads_cb), (find_compatibles), (is_demuxer_element),
(are_raw_caps), (multi_queue_overrun_cb),
(multi_queue_underrun_cb), (gst_decode_group_new),
(get_current_group), (group_demuxer_event_probe),
(gst_decode_group_control_demuxer_pad),
(gst_decode_group_control_source_pad),
(gst_decode_group_check_if_blocked),
(gst_decode_group_check_if_drained), (gst_decode_group_expose),
(gst_decode_group_hide), (gst_decode_group_free),
(gst_decode_group_set_complete), (source_pad_blocked_cb),
(source_pad_event_probe), (gst_decode_pad_new), (add_fakesink),
(remove_fakesink), (find_sink_pad), (gst_decode_bin_change_state),
(plugin_init):
New decodebin2 element.
Closes #370092
* gst/playback/gstplay-marshal.list:
Added marshallers for new signals in decodebin2
* gst/playback/gstplaybasebin.c: (setup_subtitle), (make_decoder):
Use decodebin2 if *and only if* the USE_DECODEBIN2 environment variable
is set.
2006-11-28 14:40:39 +00:00
|
|
|
if (dynamic) {
|
2009-09-26 10:17:49 +00:00
|
|
|
GST_LOG_OBJECT (dbin, "Adding signals to element %s in chain %p",
|
|
|
|
GST_ELEMENT_NAME (element), chain);
|
2013-05-22 15:29:17 +00:00
|
|
|
delem->pad_added_id = g_signal_connect (element, "pad-added",
|
2009-09-26 10:17:49 +00:00
|
|
|
G_CALLBACK (pad_added_cb), chain);
|
2013-05-22 15:29:17 +00:00
|
|
|
delem->pad_removed_id = g_signal_connect (element, "pad-removed",
|
2009-09-26 10:17:49 +00:00
|
|
|
G_CALLBACK (pad_removed_cb), chain);
|
2013-05-22 15:29:17 +00:00
|
|
|
delem->no_more_pads_id = g_signal_connect (element, "no-more-pads",
|
2009-09-26 10:17:49 +00:00
|
|
|
G_CALLBACK (no_more_pads_cb), chain);
|
gst/playback/: New decodebin2 element.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstdecodebin2.c: (gst_decode_bin_get_type),
(_gst_boolean_accumulator), (gst_decode_bin_class_init),
(gst_decode_bin_factory_filter), (compare_ranks), (print_feature),
(gst_decode_bin_init), (gst_decode_bin_dispose),
(gst_decode_bin_finalize), (gst_decode_bin_set_property),
(gst_decode_bin_get_property), (gst_decode_bin_set_caps),
(gst_decode_bin_get_caps), (gst_decode_bin_autoplug_continue),
(gst_decode_bin_autoplug_sort), (analyze_new_pad), (connect_pad),
(connect_element), (expose_pad), (type_found),
(pad_added_group_cb), (pad_removed_group_cb),
(no_more_pads_group_cb), (pad_added_cb), (pad_removed_cb),
(no_more_pads_cb), (find_compatibles), (is_demuxer_element),
(are_raw_caps), (multi_queue_overrun_cb),
(multi_queue_underrun_cb), (gst_decode_group_new),
(get_current_group), (group_demuxer_event_probe),
(gst_decode_group_control_demuxer_pad),
(gst_decode_group_control_source_pad),
(gst_decode_group_check_if_blocked),
(gst_decode_group_check_if_drained), (gst_decode_group_expose),
(gst_decode_group_hide), (gst_decode_group_free),
(gst_decode_group_set_complete), (source_pad_blocked_cb),
(source_pad_event_probe), (gst_decode_pad_new), (add_fakesink),
(remove_fakesink), (find_sink_pad), (gst_decode_bin_change_state),
(plugin_init):
New decodebin2 element.
Closes #370092
* gst/playback/gstplay-marshal.list:
Added marshallers for new signals in decodebin2
* gst/playback/gstplaybasebin.c: (setup_subtitle), (make_decoder):
Use decodebin2 if *and only if* the USE_DECODEBIN2 environment variable
is set.
2006-11-28 14:40:39 +00:00
|
|
|
}
|
|
|
|
|
2014-07-10 14:24:36 +00:00
|
|
|
/* 3. return all pads that can be connected to already */
|
gst/playback/: New decodebin2 element.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstdecodebin2.c: (gst_decode_bin_get_type),
(_gst_boolean_accumulator), (gst_decode_bin_class_init),
(gst_decode_bin_factory_filter), (compare_ranks), (print_feature),
(gst_decode_bin_init), (gst_decode_bin_dispose),
(gst_decode_bin_finalize), (gst_decode_bin_set_property),
(gst_decode_bin_get_property), (gst_decode_bin_set_caps),
(gst_decode_bin_get_caps), (gst_decode_bin_autoplug_continue),
(gst_decode_bin_autoplug_sort), (analyze_new_pad), (connect_pad),
(connect_element), (expose_pad), (type_found),
(pad_added_group_cb), (pad_removed_group_cb),
(no_more_pads_group_cb), (pad_added_cb), (pad_removed_cb),
(no_more_pads_cb), (find_compatibles), (is_demuxer_element),
(are_raw_caps), (multi_queue_overrun_cb),
(multi_queue_underrun_cb), (gst_decode_group_new),
(get_current_group), (group_demuxer_event_probe),
(gst_decode_group_control_demuxer_pad),
(gst_decode_group_control_source_pad),
(gst_decode_group_check_if_blocked),
(gst_decode_group_check_if_drained), (gst_decode_group_expose),
(gst_decode_group_hide), (gst_decode_group_free),
(gst_decode_group_set_complete), (source_pad_blocked_cb),
(source_pad_event_probe), (gst_decode_pad_new), (add_fakesink),
(remove_fakesink), (find_sink_pad), (gst_decode_bin_change_state),
(plugin_init):
New decodebin2 element.
Closes #370092
* gst/playback/gstplay-marshal.list:
Added marshallers for new signals in decodebin2
* gst/playback/gstplaybasebin.c: (setup_subtitle), (make_decoder):
Use decodebin2 if *and only if* the USE_DECODEBIN2 environment variable
is set.
2006-11-28 14:40:39 +00:00
|
|
|
|
2014-07-10 14:24:36 +00:00
|
|
|
return to_connect;
|
gst/playback/: New decodebin2 element.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstdecodebin2.c: (gst_decode_bin_get_type),
(_gst_boolean_accumulator), (gst_decode_bin_class_init),
(gst_decode_bin_factory_filter), (compare_ranks), (print_feature),
(gst_decode_bin_init), (gst_decode_bin_dispose),
(gst_decode_bin_finalize), (gst_decode_bin_set_property),
(gst_decode_bin_get_property), (gst_decode_bin_set_caps),
(gst_decode_bin_get_caps), (gst_decode_bin_autoplug_continue),
(gst_decode_bin_autoplug_sort), (analyze_new_pad), (connect_pad),
(connect_element), (expose_pad), (type_found),
(pad_added_group_cb), (pad_removed_group_cb),
(no_more_pads_group_cb), (pad_added_cb), (pad_removed_cb),
(no_more_pads_cb), (find_compatibles), (is_demuxer_element),
(are_raw_caps), (multi_queue_overrun_cb),
(multi_queue_underrun_cb), (gst_decode_group_new),
(get_current_group), (group_demuxer_event_probe),
(gst_decode_group_control_demuxer_pad),
(gst_decode_group_control_source_pad),
(gst_decode_group_check_if_blocked),
(gst_decode_group_check_if_drained), (gst_decode_group_expose),
(gst_decode_group_hide), (gst_decode_group_free),
(gst_decode_group_set_complete), (source_pad_blocked_cb),
(source_pad_event_probe), (gst_decode_pad_new), (add_fakesink),
(remove_fakesink), (find_sink_pad), (gst_decode_bin_change_state),
(plugin_init):
New decodebin2 element.
Closes #370092
* gst/playback/gstplay-marshal.list:
Added marshallers for new signals in decodebin2
* gst/playback/gstplaybasebin.c: (setup_subtitle), (make_decoder):
Use decodebin2 if *and only if* the USE_DECODEBIN2 environment variable
is set.
2006-11-28 14:40:39 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/* expose_pad:
|
|
|
|
*
|
2009-09-26 10:17:49 +00:00
|
|
|
* Expose the given pad on the chain as a decoded pad.
|
gst/playback/: New decodebin2 element.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstdecodebin2.c: (gst_decode_bin_get_type),
(_gst_boolean_accumulator), (gst_decode_bin_class_init),
(gst_decode_bin_factory_filter), (compare_ranks), (print_feature),
(gst_decode_bin_init), (gst_decode_bin_dispose),
(gst_decode_bin_finalize), (gst_decode_bin_set_property),
(gst_decode_bin_get_property), (gst_decode_bin_set_caps),
(gst_decode_bin_get_caps), (gst_decode_bin_autoplug_continue),
(gst_decode_bin_autoplug_sort), (analyze_new_pad), (connect_pad),
(connect_element), (expose_pad), (type_found),
(pad_added_group_cb), (pad_removed_group_cb),
(no_more_pads_group_cb), (pad_added_cb), (pad_removed_cb),
(no_more_pads_cb), (find_compatibles), (is_demuxer_element),
(are_raw_caps), (multi_queue_overrun_cb),
(multi_queue_underrun_cb), (gst_decode_group_new),
(get_current_group), (group_demuxer_event_probe),
(gst_decode_group_control_demuxer_pad),
(gst_decode_group_control_source_pad),
(gst_decode_group_check_if_blocked),
(gst_decode_group_check_if_drained), (gst_decode_group_expose),
(gst_decode_group_hide), (gst_decode_group_free),
(gst_decode_group_set_complete), (source_pad_blocked_cb),
(source_pad_event_probe), (gst_decode_pad_new), (add_fakesink),
(remove_fakesink), (find_sink_pad), (gst_decode_bin_change_state),
(plugin_init):
New decodebin2 element.
Closes #370092
* gst/playback/gstplay-marshal.list:
Added marshallers for new signals in decodebin2
* gst/playback/gstplaybasebin.c: (setup_subtitle), (make_decoder):
Use decodebin2 if *and only if* the USE_DECODEBIN2 environment variable
is set.
2006-11-28 14:40:39 +00:00
|
|
|
*/
|
|
|
|
static void
|
gst/playback/gstdecodebin2.c (struct _GstDecodePad): Change to be a subclass of GstGhostPad.
Original commit message from CVS:
2008-10-08 Andy Wingo <wingo@pobox.com>
* gst/playback/gstdecodebin2.c (struct _GstDecodePad): Change to
be a subclass of GstGhostPad.
(analyze_new_pad): So, when emitting the signals that determine
how we do autoplugging, already create the ghost pad and use it as
the pad in the signal arguments. This allows applications to make
a connection between the pad passed in e.g. autoplug-continue, and
the pad passed in new-decoded-pad.
(connect_pad, expose_pad): Update to receive the ghosted decode
pad in the args, retargetting it as necessary if we have to plug
the target pad through a multiqueue.
(gst_decode_group_control_source_pad): Adapt to receive an
already-ghosted pad that just needs activation, blocking, and
drain notification.
(sort_end_pads): Adapt for decode pads actually being pads.
(gst_decode_group_expose): Adapt for decode pads actually being
pads. Rewrite the decode pad names so they appear in order. Adds a
new error case if we couldn't set the name.
(gst_decode_group_free, gst_decode_group_hide): Adapt cleanup
logic.
(gst_decode_pad_set_blocked, gst_decode_pad_add_drained_check):
New API for the decode pad, needed because we shouldn't do these
things inside gst_decode_pad_new(), but after.
(gst_decode_pad_new): Change to actually make the real pad, and
delay the blocking/drainage bits.
2008-10-08 12:49:40 +00:00
|
|
|
expose_pad (GstDecodeBin * dbin, GstElement * src, GstDecodePad * dpad,
|
2016-03-12 17:47:47 +00:00
|
|
|
GstPad * pad, GstCaps * caps, GstDecodeChain * chain)
|
gst/playback/: New decodebin2 element.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstdecodebin2.c: (gst_decode_bin_get_type),
(_gst_boolean_accumulator), (gst_decode_bin_class_init),
(gst_decode_bin_factory_filter), (compare_ranks), (print_feature),
(gst_decode_bin_init), (gst_decode_bin_dispose),
(gst_decode_bin_finalize), (gst_decode_bin_set_property),
(gst_decode_bin_get_property), (gst_decode_bin_set_caps),
(gst_decode_bin_get_caps), (gst_decode_bin_autoplug_continue),
(gst_decode_bin_autoplug_sort), (analyze_new_pad), (connect_pad),
(connect_element), (expose_pad), (type_found),
(pad_added_group_cb), (pad_removed_group_cb),
(no_more_pads_group_cb), (pad_added_cb), (pad_removed_cb),
(no_more_pads_cb), (find_compatibles), (is_demuxer_element),
(are_raw_caps), (multi_queue_overrun_cb),
(multi_queue_underrun_cb), (gst_decode_group_new),
(get_current_group), (group_demuxer_event_probe),
(gst_decode_group_control_demuxer_pad),
(gst_decode_group_control_source_pad),
(gst_decode_group_check_if_blocked),
(gst_decode_group_check_if_drained), (gst_decode_group_expose),
(gst_decode_group_hide), (gst_decode_group_free),
(gst_decode_group_set_complete), (source_pad_blocked_cb),
(source_pad_event_probe), (gst_decode_pad_new), (add_fakesink),
(remove_fakesink), (find_sink_pad), (gst_decode_bin_change_state),
(plugin_init):
New decodebin2 element.
Closes #370092
* gst/playback/gstplay-marshal.list:
Added marshallers for new signals in decodebin2
* gst/playback/gstplaybasebin.c: (setup_subtitle), (make_decoder):
Use decodebin2 if *and only if* the USE_DECODEBIN2 environment variable
is set.
2006-11-28 14:40:39 +00:00
|
|
|
{
|
2007-04-03 11:10:52 +00:00
|
|
|
GstPad *mqpad = NULL;
|
gst/playback/: New decodebin2 element.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstdecodebin2.c: (gst_decode_bin_get_type),
(_gst_boolean_accumulator), (gst_decode_bin_class_init),
(gst_decode_bin_factory_filter), (compare_ranks), (print_feature),
(gst_decode_bin_init), (gst_decode_bin_dispose),
(gst_decode_bin_finalize), (gst_decode_bin_set_property),
(gst_decode_bin_get_property), (gst_decode_bin_set_caps),
(gst_decode_bin_get_caps), (gst_decode_bin_autoplug_continue),
(gst_decode_bin_autoplug_sort), (analyze_new_pad), (connect_pad),
(connect_element), (expose_pad), (type_found),
(pad_added_group_cb), (pad_removed_group_cb),
(no_more_pads_group_cb), (pad_added_cb), (pad_removed_cb),
(no_more_pads_cb), (find_compatibles), (is_demuxer_element),
(are_raw_caps), (multi_queue_overrun_cb),
(multi_queue_underrun_cb), (gst_decode_group_new),
(get_current_group), (group_demuxer_event_probe),
(gst_decode_group_control_demuxer_pad),
(gst_decode_group_control_source_pad),
(gst_decode_group_check_if_blocked),
(gst_decode_group_check_if_drained), (gst_decode_group_expose),
(gst_decode_group_hide), (gst_decode_group_free),
(gst_decode_group_set_complete), (source_pad_blocked_cb),
(source_pad_event_probe), (gst_decode_pad_new), (add_fakesink),
(remove_fakesink), (find_sink_pad), (gst_decode_bin_change_state),
(plugin_init):
New decodebin2 element.
Closes #370092
* gst/playback/gstplay-marshal.list:
Added marshallers for new signals in decodebin2
* gst/playback/gstplaybasebin.c: (setup_subtitle), (make_decoder):
Use decodebin2 if *and only if* the USE_DECODEBIN2 environment variable
is set.
2006-11-28 14:40:39 +00:00
|
|
|
|
2009-09-26 10:17:49 +00:00
|
|
|
GST_DEBUG_OBJECT (dbin, "pad %s:%s, chain:%p",
|
|
|
|
GST_DEBUG_PAD_NAME (pad), chain);
|
gst/playback/: New decodebin2 element.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstdecodebin2.c: (gst_decode_bin_get_type),
(_gst_boolean_accumulator), (gst_decode_bin_class_init),
(gst_decode_bin_factory_filter), (compare_ranks), (print_feature),
(gst_decode_bin_init), (gst_decode_bin_dispose),
(gst_decode_bin_finalize), (gst_decode_bin_set_property),
(gst_decode_bin_get_property), (gst_decode_bin_set_caps),
(gst_decode_bin_get_caps), (gst_decode_bin_autoplug_continue),
(gst_decode_bin_autoplug_sort), (analyze_new_pad), (connect_pad),
(connect_element), (expose_pad), (type_found),
(pad_added_group_cb), (pad_removed_group_cb),
(no_more_pads_group_cb), (pad_added_cb), (pad_removed_cb),
(no_more_pads_cb), (find_compatibles), (is_demuxer_element),
(are_raw_caps), (multi_queue_overrun_cb),
(multi_queue_underrun_cb), (gst_decode_group_new),
(get_current_group), (group_demuxer_event_probe),
(gst_decode_group_control_demuxer_pad),
(gst_decode_group_control_source_pad),
(gst_decode_group_check_if_blocked),
(gst_decode_group_check_if_drained), (gst_decode_group_expose),
(gst_decode_group_hide), (gst_decode_group_free),
(gst_decode_group_set_complete), (source_pad_blocked_cb),
(source_pad_event_probe), (gst_decode_pad_new), (add_fakesink),
(remove_fakesink), (find_sink_pad), (gst_decode_bin_change_state),
(plugin_init):
New decodebin2 element.
Closes #370092
* gst/playback/gstplay-marshal.list:
Added marshallers for new signals in decodebin2
* gst/playback/gstplaybasebin.c: (setup_subtitle), (make_decoder):
Use decodebin2 if *and only if* the USE_DECODEBIN2 environment variable
is set.
2006-11-28 14:40:39 +00:00
|
|
|
|
2009-09-26 10:17:49 +00:00
|
|
|
/* If this is the first pad for this chain, there are no other elements
|
|
|
|
* and the source element is not the multiqueue we must link through the
|
|
|
|
* multiqueue.
|
|
|
|
*
|
|
|
|
* This is the case if a demuxer directly exposed a raw pad.
|
|
|
|
*/
|
|
|
|
if (chain->parent && !chain->elements && src != chain->parent->multiqueue) {
|
2007-06-05 16:05:19 +00:00
|
|
|
GST_LOG_OBJECT (src, "connecting the pad through multiqueue");
|
gst/playback/: New decodebin2 element.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstdecodebin2.c: (gst_decode_bin_get_type),
(_gst_boolean_accumulator), (gst_decode_bin_class_init),
(gst_decode_bin_factory_filter), (compare_ranks), (print_feature),
(gst_decode_bin_init), (gst_decode_bin_dispose),
(gst_decode_bin_finalize), (gst_decode_bin_set_property),
(gst_decode_bin_get_property), (gst_decode_bin_set_caps),
(gst_decode_bin_get_caps), (gst_decode_bin_autoplug_continue),
(gst_decode_bin_autoplug_sort), (analyze_new_pad), (connect_pad),
(connect_element), (expose_pad), (type_found),
(pad_added_group_cb), (pad_removed_group_cb),
(no_more_pads_group_cb), (pad_added_cb), (pad_removed_cb),
(no_more_pads_cb), (find_compatibles), (is_demuxer_element),
(are_raw_caps), (multi_queue_overrun_cb),
(multi_queue_underrun_cb), (gst_decode_group_new),
(get_current_group), (group_demuxer_event_probe),
(gst_decode_group_control_demuxer_pad),
(gst_decode_group_control_source_pad),
(gst_decode_group_check_if_blocked),
(gst_decode_group_check_if_drained), (gst_decode_group_expose),
(gst_decode_group_hide), (gst_decode_group_free),
(gst_decode_group_set_complete), (source_pad_blocked_cb),
(source_pad_event_probe), (gst_decode_pad_new), (add_fakesink),
(remove_fakesink), (find_sink_pad), (gst_decode_bin_change_state),
(plugin_init):
New decodebin2 element.
Closes #370092
* gst/playback/gstplay-marshal.list:
Added marshallers for new signals in decodebin2
* gst/playback/gstplaybasebin.c: (setup_subtitle), (make_decoder):
Use decodebin2 if *and only if* the USE_DECODEBIN2 environment variable
is set.
2006-11-28 14:40:39 +00:00
|
|
|
|
2013-11-29 16:26:13 +00:00
|
|
|
decode_pad_set_target (dpad, NULL);
|
2009-09-26 10:17:49 +00:00
|
|
|
if (!(mqpad = gst_decode_group_control_demuxer_pad (chain->parent, pad)))
|
gst/playback/: New decodebin2 element.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstdecodebin2.c: (gst_decode_bin_get_type),
(_gst_boolean_accumulator), (gst_decode_bin_class_init),
(gst_decode_bin_factory_filter), (compare_ranks), (print_feature),
(gst_decode_bin_init), (gst_decode_bin_dispose),
(gst_decode_bin_finalize), (gst_decode_bin_set_property),
(gst_decode_bin_get_property), (gst_decode_bin_set_caps),
(gst_decode_bin_get_caps), (gst_decode_bin_autoplug_continue),
(gst_decode_bin_autoplug_sort), (analyze_new_pad), (connect_pad),
(connect_element), (expose_pad), (type_found),
(pad_added_group_cb), (pad_removed_group_cb),
(no_more_pads_group_cb), (pad_added_cb), (pad_removed_cb),
(no_more_pads_cb), (find_compatibles), (is_demuxer_element),
(are_raw_caps), (multi_queue_overrun_cb),
(multi_queue_underrun_cb), (gst_decode_group_new),
(get_current_group), (group_demuxer_event_probe),
(gst_decode_group_control_demuxer_pad),
(gst_decode_group_control_source_pad),
(gst_decode_group_check_if_blocked),
(gst_decode_group_check_if_drained), (gst_decode_group_expose),
(gst_decode_group_hide), (gst_decode_group_free),
(gst_decode_group_set_complete), (source_pad_blocked_cb),
(source_pad_event_probe), (gst_decode_pad_new), (add_fakesink),
(remove_fakesink), (find_sink_pad), (gst_decode_bin_change_state),
(plugin_init):
New decodebin2 element.
Closes #370092
* gst/playback/gstplay-marshal.list:
Added marshallers for new signals in decodebin2
* gst/playback/gstplaybasebin.c: (setup_subtitle), (make_decoder):
Use decodebin2 if *and only if* the USE_DECODEBIN2 environment variable
is set.
2006-11-28 14:40:39 +00:00
|
|
|
goto beach;
|
|
|
|
pad = mqpad;
|
2013-11-29 16:26:13 +00:00
|
|
|
decode_pad_set_target (dpad, pad);
|
gst/playback/: New decodebin2 element.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstdecodebin2.c: (gst_decode_bin_get_type),
(_gst_boolean_accumulator), (gst_decode_bin_class_init),
(gst_decode_bin_factory_filter), (compare_ranks), (print_feature),
(gst_decode_bin_init), (gst_decode_bin_dispose),
(gst_decode_bin_finalize), (gst_decode_bin_set_property),
(gst_decode_bin_get_property), (gst_decode_bin_set_caps),
(gst_decode_bin_get_caps), (gst_decode_bin_autoplug_continue),
(gst_decode_bin_autoplug_sort), (analyze_new_pad), (connect_pad),
(connect_element), (expose_pad), (type_found),
(pad_added_group_cb), (pad_removed_group_cb),
(no_more_pads_group_cb), (pad_added_cb), (pad_removed_cb),
(no_more_pads_cb), (find_compatibles), (is_demuxer_element),
(are_raw_caps), (multi_queue_overrun_cb),
(multi_queue_underrun_cb), (gst_decode_group_new),
(get_current_group), (group_demuxer_event_probe),
(gst_decode_group_control_demuxer_pad),
(gst_decode_group_control_source_pad),
(gst_decode_group_check_if_blocked),
(gst_decode_group_check_if_drained), (gst_decode_group_expose),
(gst_decode_group_hide), (gst_decode_group_free),
(gst_decode_group_set_complete), (source_pad_blocked_cb),
(source_pad_event_probe), (gst_decode_pad_new), (add_fakesink),
(remove_fakesink), (find_sink_pad), (gst_decode_bin_change_state),
(plugin_init):
New decodebin2 element.
Closes #370092
* gst/playback/gstplay-marshal.list:
Added marshallers for new signals in decodebin2
* gst/playback/gstplaybasebin.c: (setup_subtitle), (make_decoder):
Use decodebin2 if *and only if* the USE_DECODEBIN2 environment variable
is set.
2006-11-28 14:40:39 +00:00
|
|
|
}
|
|
|
|
|
2009-09-26 10:17:49 +00:00
|
|
|
gst_decode_pad_activate (dpad, chain);
|
|
|
|
chain->endpad = gst_object_ref (dpad);
|
2009-10-15 11:01:01 +00:00
|
|
|
chain->endcaps = gst_caps_ref (caps);
|
gst/playback/: New decodebin2 element.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstdecodebin2.c: (gst_decode_bin_get_type),
(_gst_boolean_accumulator), (gst_decode_bin_class_init),
(gst_decode_bin_factory_filter), (compare_ranks), (print_feature),
(gst_decode_bin_init), (gst_decode_bin_dispose),
(gst_decode_bin_finalize), (gst_decode_bin_set_property),
(gst_decode_bin_get_property), (gst_decode_bin_set_caps),
(gst_decode_bin_get_caps), (gst_decode_bin_autoplug_continue),
(gst_decode_bin_autoplug_sort), (analyze_new_pad), (connect_pad),
(connect_element), (expose_pad), (type_found),
(pad_added_group_cb), (pad_removed_group_cb),
(no_more_pads_group_cb), (pad_added_cb), (pad_removed_cb),
(no_more_pads_cb), (find_compatibles), (is_demuxer_element),
(are_raw_caps), (multi_queue_overrun_cb),
(multi_queue_underrun_cb), (gst_decode_group_new),
(get_current_group), (group_demuxer_event_probe),
(gst_decode_group_control_demuxer_pad),
(gst_decode_group_control_source_pad),
(gst_decode_group_check_if_blocked),
(gst_decode_group_check_if_drained), (gst_decode_group_expose),
(gst_decode_group_hide), (gst_decode_group_free),
(gst_decode_group_set_complete), (source_pad_blocked_cb),
(source_pad_event_probe), (gst_decode_pad_new), (add_fakesink),
(remove_fakesink), (find_sink_pad), (gst_decode_bin_change_state),
(plugin_init):
New decodebin2 element.
Closes #370092
* gst/playback/gstplay-marshal.list:
Added marshallers for new signals in decodebin2
* gst/playback/gstplaybasebin.c: (setup_subtitle), (make_decoder):
Use decodebin2 if *and only if* the USE_DECODEBIN2 environment variable
is set.
2006-11-28 14:40:39 +00:00
|
|
|
|
2016-03-12 17:47:47 +00:00
|
|
|
EXPOSE_LOCK (dbin);
|
2015-02-04 11:46:09 +00:00
|
|
|
if (dbin->decode_chain) {
|
|
|
|
if (gst_decode_chain_is_complete (dbin->decode_chain)) {
|
|
|
|
gst_decode_bin_expose (dbin);
|
|
|
|
}
|
gst/playback/: New decodebin2 element.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstdecodebin2.c: (gst_decode_bin_get_type),
(_gst_boolean_accumulator), (gst_decode_bin_class_init),
(gst_decode_bin_factory_filter), (compare_ranks), (print_feature),
(gst_decode_bin_init), (gst_decode_bin_dispose),
(gst_decode_bin_finalize), (gst_decode_bin_set_property),
(gst_decode_bin_get_property), (gst_decode_bin_set_caps),
(gst_decode_bin_get_caps), (gst_decode_bin_autoplug_continue),
(gst_decode_bin_autoplug_sort), (analyze_new_pad), (connect_pad),
(connect_element), (expose_pad), (type_found),
(pad_added_group_cb), (pad_removed_group_cb),
(no_more_pads_group_cb), (pad_added_cb), (pad_removed_cb),
(no_more_pads_cb), (find_compatibles), (is_demuxer_element),
(are_raw_caps), (multi_queue_overrun_cb),
(multi_queue_underrun_cb), (gst_decode_group_new),
(get_current_group), (group_demuxer_event_probe),
(gst_decode_group_control_demuxer_pad),
(gst_decode_group_control_source_pad),
(gst_decode_group_check_if_blocked),
(gst_decode_group_check_if_drained), (gst_decode_group_expose),
(gst_decode_group_hide), (gst_decode_group_free),
(gst_decode_group_set_complete), (source_pad_blocked_cb),
(source_pad_event_probe), (gst_decode_pad_new), (add_fakesink),
(remove_fakesink), (find_sink_pad), (gst_decode_bin_change_state),
(plugin_init):
New decodebin2 element.
Closes #370092
* gst/playback/gstplay-marshal.list:
Added marshallers for new signals in decodebin2
* gst/playback/gstplaybasebin.c: (setup_subtitle), (make_decoder):
Use decodebin2 if *and only if* the USE_DECODEBIN2 environment variable
is set.
2006-11-28 14:40:39 +00:00
|
|
|
}
|
2016-03-12 17:47:47 +00:00
|
|
|
EXPOSE_UNLOCK (dbin);
|
2009-09-26 10:17:49 +00:00
|
|
|
|
2007-04-03 11:10:52 +00:00
|
|
|
if (mqpad)
|
|
|
|
gst_object_unref (mqpad);
|
|
|
|
|
gst/playback/: New decodebin2 element.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstdecodebin2.c: (gst_decode_bin_get_type),
(_gst_boolean_accumulator), (gst_decode_bin_class_init),
(gst_decode_bin_factory_filter), (compare_ranks), (print_feature),
(gst_decode_bin_init), (gst_decode_bin_dispose),
(gst_decode_bin_finalize), (gst_decode_bin_set_property),
(gst_decode_bin_get_property), (gst_decode_bin_set_caps),
(gst_decode_bin_get_caps), (gst_decode_bin_autoplug_continue),
(gst_decode_bin_autoplug_sort), (analyze_new_pad), (connect_pad),
(connect_element), (expose_pad), (type_found),
(pad_added_group_cb), (pad_removed_group_cb),
(no_more_pads_group_cb), (pad_added_cb), (pad_removed_cb),
(no_more_pads_cb), (find_compatibles), (is_demuxer_element),
(are_raw_caps), (multi_queue_overrun_cb),
(multi_queue_underrun_cb), (gst_decode_group_new),
(get_current_group), (group_demuxer_event_probe),
(gst_decode_group_control_demuxer_pad),
(gst_decode_group_control_source_pad),
(gst_decode_group_check_if_blocked),
(gst_decode_group_check_if_drained), (gst_decode_group_expose),
(gst_decode_group_hide), (gst_decode_group_free),
(gst_decode_group_set_complete), (source_pad_blocked_cb),
(source_pad_event_probe), (gst_decode_pad_new), (add_fakesink),
(remove_fakesink), (find_sink_pad), (gst_decode_bin_change_state),
(plugin_init):
New decodebin2 element.
Closes #370092
* gst/playback/gstplay-marshal.list:
Added marshallers for new signals in decodebin2
* gst/playback/gstplaybasebin.c: (setup_subtitle), (make_decoder):
Use decodebin2 if *and only if* the USE_DECODEBIN2 environment variable
is set.
2006-11-28 14:40:39 +00:00
|
|
|
beach:
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
2011-05-09 20:20:23 +00:00
|
|
|
/* check_upstream_seekable:
|
|
|
|
*
|
|
|
|
* Check if upstream is seekable.
|
|
|
|
*/
|
2011-11-08 13:55:58 +00:00
|
|
|
static gboolean
|
2011-05-09 20:20:23 +00:00
|
|
|
check_upstream_seekable (GstDecodeBin * dbin, GstPad * pad)
|
|
|
|
{
|
|
|
|
GstQuery *query;
|
|
|
|
gint64 start = -1, stop = -1;
|
2011-11-08 13:55:58 +00:00
|
|
|
gboolean seekable = FALSE;
|
2011-05-09 20:20:23 +00:00
|
|
|
|
|
|
|
query = gst_query_new_seeking (GST_FORMAT_BYTES);
|
2011-05-17 09:24:18 +00:00
|
|
|
if (!gst_pad_peer_query (pad, query)) {
|
2011-05-09 20:20:23 +00:00
|
|
|
GST_DEBUG_OBJECT (dbin, "seeking query failed");
|
2016-03-21 07:06:20 +00:00
|
|
|
goto done;
|
2011-05-09 20:20:23 +00:00
|
|
|
}
|
|
|
|
|
2011-11-08 13:55:58 +00:00
|
|
|
gst_query_parse_seeking (query, NULL, &seekable, &start, &stop);
|
2011-05-09 20:20:23 +00:00
|
|
|
|
|
|
|
/* try harder to query upstream size if we didn't get it the first time */
|
2011-11-08 13:55:58 +00:00
|
|
|
if (seekable && stop == -1) {
|
2011-05-09 20:20:23 +00:00
|
|
|
GST_DEBUG_OBJECT (dbin, "doing duration query to fix up unset stop");
|
2011-11-15 16:58:19 +00:00
|
|
|
gst_pad_peer_query_duration (pad, GST_FORMAT_BYTES, &stop);
|
2011-05-09 20:20:23 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/* if upstream doesn't know the size, it's likely that it's not seekable in
|
|
|
|
* practice even if it technically may be seekable */
|
2011-11-08 13:55:58 +00:00
|
|
|
if (seekable && (start != 0 || stop <= start)) {
|
2011-05-09 20:20:23 +00:00
|
|
|
GST_DEBUG_OBJECT (dbin, "seekable but unknown start/stop -> disable");
|
2016-03-21 07:06:20 +00:00
|
|
|
seekable = FALSE;
|
|
|
|
} else {
|
|
|
|
GST_DEBUG_OBJECT (dbin, "upstream seekable: %d", seekable);
|
2011-05-09 20:20:23 +00:00
|
|
|
}
|
|
|
|
|
2016-03-21 07:06:20 +00:00
|
|
|
done:
|
|
|
|
gst_query_unref (query);
|
2011-11-08 13:55:58 +00:00
|
|
|
return seekable;
|
2011-05-09 20:20:23 +00:00
|
|
|
}
|
|
|
|
|
gst/playback/: New decodebin2 element.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstdecodebin2.c: (gst_decode_bin_get_type),
(_gst_boolean_accumulator), (gst_decode_bin_class_init),
(gst_decode_bin_factory_filter), (compare_ranks), (print_feature),
(gst_decode_bin_init), (gst_decode_bin_dispose),
(gst_decode_bin_finalize), (gst_decode_bin_set_property),
(gst_decode_bin_get_property), (gst_decode_bin_set_caps),
(gst_decode_bin_get_caps), (gst_decode_bin_autoplug_continue),
(gst_decode_bin_autoplug_sort), (analyze_new_pad), (connect_pad),
(connect_element), (expose_pad), (type_found),
(pad_added_group_cb), (pad_removed_group_cb),
(no_more_pads_group_cb), (pad_added_cb), (pad_removed_cb),
(no_more_pads_cb), (find_compatibles), (is_demuxer_element),
(are_raw_caps), (multi_queue_overrun_cb),
(multi_queue_underrun_cb), (gst_decode_group_new),
(get_current_group), (group_demuxer_event_probe),
(gst_decode_group_control_demuxer_pad),
(gst_decode_group_control_source_pad),
(gst_decode_group_check_if_blocked),
(gst_decode_group_check_if_drained), (gst_decode_group_expose),
(gst_decode_group_hide), (gst_decode_group_free),
(gst_decode_group_set_complete), (source_pad_blocked_cb),
(source_pad_event_probe), (gst_decode_pad_new), (add_fakesink),
(remove_fakesink), (find_sink_pad), (gst_decode_bin_change_state),
(plugin_init):
New decodebin2 element.
Closes #370092
* gst/playback/gstplay-marshal.list:
Added marshallers for new signals in decodebin2
* gst/playback/gstplaybasebin.c: (setup_subtitle), (make_decoder):
Use decodebin2 if *and only if* the USE_DECODEBIN2 environment variable
is set.
2006-11-28 14:40:39 +00:00
|
|
|
static void
|
|
|
|
type_found (GstElement * typefind, guint probability,
|
|
|
|
GstCaps * caps, GstDecodeBin * decode_bin)
|
|
|
|
{
|
2010-09-13 08:02:44 +00:00
|
|
|
GstPad *pad, *sink_pad;
|
2015-11-06 14:21:14 +00:00
|
|
|
GstDecodeChain *chain;
|
gst/playback/: New decodebin2 element.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstdecodebin2.c: (gst_decode_bin_get_type),
(_gst_boolean_accumulator), (gst_decode_bin_class_init),
(gst_decode_bin_factory_filter), (compare_ranks), (print_feature),
(gst_decode_bin_init), (gst_decode_bin_dispose),
(gst_decode_bin_finalize), (gst_decode_bin_set_property),
(gst_decode_bin_get_property), (gst_decode_bin_set_caps),
(gst_decode_bin_get_caps), (gst_decode_bin_autoplug_continue),
(gst_decode_bin_autoplug_sort), (analyze_new_pad), (connect_pad),
(connect_element), (expose_pad), (type_found),
(pad_added_group_cb), (pad_removed_group_cb),
(no_more_pads_group_cb), (pad_added_cb), (pad_removed_cb),
(no_more_pads_cb), (find_compatibles), (is_demuxer_element),
(are_raw_caps), (multi_queue_overrun_cb),
(multi_queue_underrun_cb), (gst_decode_group_new),
(get_current_group), (group_demuxer_event_probe),
(gst_decode_group_control_demuxer_pad),
(gst_decode_group_control_source_pad),
(gst_decode_group_check_if_blocked),
(gst_decode_group_check_if_drained), (gst_decode_group_expose),
(gst_decode_group_hide), (gst_decode_group_free),
(gst_decode_group_set_complete), (source_pad_blocked_cb),
(source_pad_event_probe), (gst_decode_pad_new), (add_fakesink),
(remove_fakesink), (find_sink_pad), (gst_decode_bin_change_state),
(plugin_init):
New decodebin2 element.
Closes #370092
* gst/playback/gstplay-marshal.list:
Added marshallers for new signals in decodebin2
* gst/playback/gstplaybasebin.c: (setup_subtitle), (make_decoder):
Use decodebin2 if *and only if* the USE_DECODEBIN2 environment variable
is set.
2006-11-28 14:40:39 +00:00
|
|
|
|
|
|
|
GST_DEBUG_OBJECT (decode_bin, "typefind found caps %" GST_PTR_FORMAT, caps);
|
|
|
|
|
2008-11-20 22:11:38 +00:00
|
|
|
/* If the typefinder (but not something else) finds text/plain - i.e. that's
|
|
|
|
* the top-level type of the file - then error out.
|
|
|
|
*/
|
|
|
|
if (gst_structure_has_name (gst_caps_get_structure (caps, 0), "text/plain")) {
|
|
|
|
GST_ELEMENT_ERROR (decode_bin, STREAM, WRONG_TYPE,
|
|
|
|
(_("This appears to be a text file")),
|
2011-06-14 22:51:29 +00:00
|
|
|
("decodebin cannot decode plain text files"));
|
2008-11-20 22:11:38 +00:00
|
|
|
goto exit;
|
|
|
|
}
|
|
|
|
|
2007-09-10 12:05:34 +00:00
|
|
|
pad = gst_element_get_static_pad (typefind, "src");
|
2010-09-13 08:02:44 +00:00
|
|
|
sink_pad = gst_element_get_static_pad (typefind, "sink");
|
gst/playback/: New decodebin2 element.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstdecodebin2.c: (gst_decode_bin_get_type),
(_gst_boolean_accumulator), (gst_decode_bin_class_init),
(gst_decode_bin_factory_filter), (compare_ranks), (print_feature),
(gst_decode_bin_init), (gst_decode_bin_dispose),
(gst_decode_bin_finalize), (gst_decode_bin_set_property),
(gst_decode_bin_get_property), (gst_decode_bin_set_caps),
(gst_decode_bin_get_caps), (gst_decode_bin_autoplug_continue),
(gst_decode_bin_autoplug_sort), (analyze_new_pad), (connect_pad),
(connect_element), (expose_pad), (type_found),
(pad_added_group_cb), (pad_removed_group_cb),
(no_more_pads_group_cb), (pad_added_cb), (pad_removed_cb),
(no_more_pads_cb), (find_compatibles), (is_demuxer_element),
(are_raw_caps), (multi_queue_overrun_cb),
(multi_queue_underrun_cb), (gst_decode_group_new),
(get_current_group), (group_demuxer_event_probe),
(gst_decode_group_control_demuxer_pad),
(gst_decode_group_control_source_pad),
(gst_decode_group_check_if_blocked),
(gst_decode_group_check_if_drained), (gst_decode_group_expose),
(gst_decode_group_hide), (gst_decode_group_free),
(gst_decode_group_set_complete), (source_pad_blocked_cb),
(source_pad_event_probe), (gst_decode_pad_new), (add_fakesink),
(remove_fakesink), (find_sink_pad), (gst_decode_bin_change_state),
(plugin_init):
New decodebin2 element.
Closes #370092
* gst/playback/gstplay-marshal.list:
Added marshallers for new signals in decodebin2
* gst/playback/gstplaybasebin.c: (setup_subtitle), (make_decoder):
Use decodebin2 if *and only if* the USE_DECODEBIN2 environment variable
is set.
2006-11-28 14:40:39 +00:00
|
|
|
|
2010-09-13 08:02:44 +00:00
|
|
|
/* need some lock here to prevent race with shutdown state change
|
|
|
|
* which might yank away e.g. decode_chain while building stuff here.
|
|
|
|
* In typical cases, STREAM_LOCK is held and handles that, it need not
|
|
|
|
* be held (if called from a proxied setcaps), so grab it anyway */
|
|
|
|
GST_PAD_STREAM_LOCK (sink_pad);
|
2015-11-06 14:21:14 +00:00
|
|
|
/* FIXME: we can only deal with one type, we don't yet support dynamically changing
|
|
|
|
* caps from the typefind element */
|
|
|
|
if (decode_bin->have_type || decode_bin->decode_chain) {
|
|
|
|
} else {
|
|
|
|
decode_bin->have_type = TRUE;
|
|
|
|
|
|
|
|
decode_bin->decode_chain = gst_decode_chain_new (decode_bin, NULL, pad);
|
|
|
|
chain = gst_decode_chain_ref (decode_bin->decode_chain);
|
|
|
|
|
|
|
|
if (analyze_new_pad (decode_bin, typefind, pad, caps,
|
|
|
|
decode_bin->decode_chain, NULL))
|
|
|
|
expose_pad (decode_bin, typefind, decode_bin->decode_chain->current_pad,
|
2016-03-12 17:47:47 +00:00
|
|
|
pad, caps, decode_bin->decode_chain);
|
2016-03-12 17:45:26 +00:00
|
|
|
|
2015-11-06 14:21:14 +00:00
|
|
|
gst_decode_chain_unref (chain);
|
|
|
|
}
|
|
|
|
|
2010-09-13 08:02:44 +00:00
|
|
|
GST_PAD_STREAM_UNLOCK (sink_pad);
|
|
|
|
gst_object_unref (sink_pad);
|
gst/playback/: New decodebin2 element.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstdecodebin2.c: (gst_decode_bin_get_type),
(_gst_boolean_accumulator), (gst_decode_bin_class_init),
(gst_decode_bin_factory_filter), (compare_ranks), (print_feature),
(gst_decode_bin_init), (gst_decode_bin_dispose),
(gst_decode_bin_finalize), (gst_decode_bin_set_property),
(gst_decode_bin_get_property), (gst_decode_bin_set_caps),
(gst_decode_bin_get_caps), (gst_decode_bin_autoplug_continue),
(gst_decode_bin_autoplug_sort), (analyze_new_pad), (connect_pad),
(connect_element), (expose_pad), (type_found),
(pad_added_group_cb), (pad_removed_group_cb),
(no_more_pads_group_cb), (pad_added_cb), (pad_removed_cb),
(no_more_pads_cb), (find_compatibles), (is_demuxer_element),
(are_raw_caps), (multi_queue_overrun_cb),
(multi_queue_underrun_cb), (gst_decode_group_new),
(get_current_group), (group_demuxer_event_probe),
(gst_decode_group_control_demuxer_pad),
(gst_decode_group_control_source_pad),
(gst_decode_group_check_if_blocked),
(gst_decode_group_check_if_drained), (gst_decode_group_expose),
(gst_decode_group_hide), (gst_decode_group_free),
(gst_decode_group_set_complete), (source_pad_blocked_cb),
(source_pad_event_probe), (gst_decode_pad_new), (add_fakesink),
(remove_fakesink), (find_sink_pad), (gst_decode_bin_change_state),
(plugin_init):
New decodebin2 element.
Closes #370092
* gst/playback/gstplay-marshal.list:
Added marshallers for new signals in decodebin2
* gst/playback/gstplaybasebin.c: (setup_subtitle), (make_decoder):
Use decodebin2 if *and only if* the USE_DECODEBIN2 environment variable
is set.
2006-11-28 14:40:39 +00:00
|
|
|
gst_object_unref (pad);
|
|
|
|
|
2015-12-02 18:16:05 +00:00
|
|
|
exit:
|
gst/playback/: New decodebin2 element.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstdecodebin2.c: (gst_decode_bin_get_type),
(_gst_boolean_accumulator), (gst_decode_bin_class_init),
(gst_decode_bin_factory_filter), (compare_ranks), (print_feature),
(gst_decode_bin_init), (gst_decode_bin_dispose),
(gst_decode_bin_finalize), (gst_decode_bin_set_property),
(gst_decode_bin_get_property), (gst_decode_bin_set_caps),
(gst_decode_bin_get_caps), (gst_decode_bin_autoplug_continue),
(gst_decode_bin_autoplug_sort), (analyze_new_pad), (connect_pad),
(connect_element), (expose_pad), (type_found),
(pad_added_group_cb), (pad_removed_group_cb),
(no_more_pads_group_cb), (pad_added_cb), (pad_removed_cb),
(no_more_pads_cb), (find_compatibles), (is_demuxer_element),
(are_raw_caps), (multi_queue_overrun_cb),
(multi_queue_underrun_cb), (gst_decode_group_new),
(get_current_group), (group_demuxer_event_probe),
(gst_decode_group_control_demuxer_pad),
(gst_decode_group_control_source_pad),
(gst_decode_group_check_if_blocked),
(gst_decode_group_check_if_drained), (gst_decode_group_expose),
(gst_decode_group_hide), (gst_decode_group_free),
(gst_decode_group_set_complete), (source_pad_blocked_cb),
(source_pad_event_probe), (gst_decode_pad_new), (add_fakesink),
(remove_fakesink), (find_sink_pad), (gst_decode_bin_change_state),
(plugin_init):
New decodebin2 element.
Closes #370092
* gst/playback/gstplay-marshal.list:
Added marshallers for new signals in decodebin2
* gst/playback/gstplaybasebin.c: (setup_subtitle), (make_decoder):
Use decodebin2 if *and only if* the USE_DECODEBIN2 environment variable
is set.
2006-11-28 14:40:39 +00:00
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
2011-11-01 00:34:28 +00:00
|
|
|
static GstPadProbeReturn
|
2011-11-08 10:07:18 +00:00
|
|
|
pad_event_cb (GstPad * pad, GstPadProbeInfo * info, gpointer data)
|
2009-11-19 17:51:33 +00:00
|
|
|
{
|
2011-11-08 10:07:18 +00:00
|
|
|
GstEvent *event = GST_PAD_PROBE_INFO_EVENT (info);
|
2009-11-19 17:51:33 +00:00
|
|
|
GstPendingPad *ppad = (GstPendingPad *) data;
|
|
|
|
GstDecodeChain *chain = ppad->chain;
|
|
|
|
GstDecodeBin *dbin = chain->dbin;
|
|
|
|
|
|
|
|
g_assert (ppad);
|
|
|
|
g_assert (chain);
|
|
|
|
g_assert (dbin);
|
|
|
|
switch (GST_EVENT_TYPE (event)) {
|
|
|
|
case GST_EVENT_EOS:
|
2015-03-27 02:53:44 +00:00
|
|
|
GST_DEBUG_OBJECT (pad, "Received EOS on a non final pad, this stream "
|
2009-11-19 17:51:33 +00:00
|
|
|
"ended too early");
|
|
|
|
chain->deadend = TRUE;
|
2014-07-11 21:51:44 +00:00
|
|
|
chain->drained = TRUE;
|
2013-03-30 16:17:04 +00:00
|
|
|
gst_object_replace ((GstObject **) & chain->current_pad, NULL);
|
2009-11-19 17:51:33 +00:00
|
|
|
/* we don't set the endcaps because NULL endcaps means early EOS */
|
2014-07-11 21:51:44 +00:00
|
|
|
|
2009-11-19 17:51:33 +00:00
|
|
|
EXPOSE_LOCK (dbin);
|
2015-02-04 11:46:09 +00:00
|
|
|
if (dbin->decode_chain)
|
|
|
|
if (gst_decode_chain_is_complete (dbin->decode_chain))
|
|
|
|
gst_decode_bin_expose (dbin);
|
2009-11-19 17:51:33 +00:00
|
|
|
EXPOSE_UNLOCK (dbin);
|
|
|
|
break;
|
|
|
|
default:
|
|
|
|
break;
|
|
|
|
}
|
2011-11-01 00:34:28 +00:00
|
|
|
return GST_PAD_PROBE_OK;
|
2009-11-19 17:51:33 +00:00
|
|
|
}
|
|
|
|
|
gst/playback/: New decodebin2 element.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstdecodebin2.c: (gst_decode_bin_get_type),
(_gst_boolean_accumulator), (gst_decode_bin_class_init),
(gst_decode_bin_factory_filter), (compare_ranks), (print_feature),
(gst_decode_bin_init), (gst_decode_bin_dispose),
(gst_decode_bin_finalize), (gst_decode_bin_set_property),
(gst_decode_bin_get_property), (gst_decode_bin_set_caps),
(gst_decode_bin_get_caps), (gst_decode_bin_autoplug_continue),
(gst_decode_bin_autoplug_sort), (analyze_new_pad), (connect_pad),
(connect_element), (expose_pad), (type_found),
(pad_added_group_cb), (pad_removed_group_cb),
(no_more_pads_group_cb), (pad_added_cb), (pad_removed_cb),
(no_more_pads_cb), (find_compatibles), (is_demuxer_element),
(are_raw_caps), (multi_queue_overrun_cb),
(multi_queue_underrun_cb), (gst_decode_group_new),
(get_current_group), (group_demuxer_event_probe),
(gst_decode_group_control_demuxer_pad),
(gst_decode_group_control_source_pad),
(gst_decode_group_check_if_blocked),
(gst_decode_group_check_if_drained), (gst_decode_group_expose),
(gst_decode_group_hide), (gst_decode_group_free),
(gst_decode_group_set_complete), (source_pad_blocked_cb),
(source_pad_event_probe), (gst_decode_pad_new), (add_fakesink),
(remove_fakesink), (find_sink_pad), (gst_decode_bin_change_state),
(plugin_init):
New decodebin2 element.
Closes #370092
* gst/playback/gstplay-marshal.list:
Added marshallers for new signals in decodebin2
* gst/playback/gstplaybasebin.c: (setup_subtitle), (make_decoder):
Use decodebin2 if *and only if* the USE_DECODEBIN2 environment variable
is set.
2006-11-28 14:40:39 +00:00
|
|
|
static void
|
2009-09-26 10:17:49 +00:00
|
|
|
pad_added_cb (GstElement * element, GstPad * pad, GstDecodeChain * chain)
|
gst/playback/: New decodebin2 element.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstdecodebin2.c: (gst_decode_bin_get_type),
(_gst_boolean_accumulator), (gst_decode_bin_class_init),
(gst_decode_bin_factory_filter), (compare_ranks), (print_feature),
(gst_decode_bin_init), (gst_decode_bin_dispose),
(gst_decode_bin_finalize), (gst_decode_bin_set_property),
(gst_decode_bin_get_property), (gst_decode_bin_set_caps),
(gst_decode_bin_get_caps), (gst_decode_bin_autoplug_continue),
(gst_decode_bin_autoplug_sort), (analyze_new_pad), (connect_pad),
(connect_element), (expose_pad), (type_found),
(pad_added_group_cb), (pad_removed_group_cb),
(no_more_pads_group_cb), (pad_added_cb), (pad_removed_cb),
(no_more_pads_cb), (find_compatibles), (is_demuxer_element),
(are_raw_caps), (multi_queue_overrun_cb),
(multi_queue_underrun_cb), (gst_decode_group_new),
(get_current_group), (group_demuxer_event_probe),
(gst_decode_group_control_demuxer_pad),
(gst_decode_group_control_source_pad),
(gst_decode_group_check_if_blocked),
(gst_decode_group_check_if_drained), (gst_decode_group_expose),
(gst_decode_group_hide), (gst_decode_group_free),
(gst_decode_group_set_complete), (source_pad_blocked_cb),
(source_pad_event_probe), (gst_decode_pad_new), (add_fakesink),
(remove_fakesink), (find_sink_pad), (gst_decode_bin_change_state),
(plugin_init):
New decodebin2 element.
Closes #370092
* gst/playback/gstplay-marshal.list:
Added marshallers for new signals in decodebin2
* gst/playback/gstplaybasebin.c: (setup_subtitle), (make_decoder):
Use decodebin2 if *and only if* the USE_DECODEBIN2 environment variable
is set.
2006-11-28 14:40:39 +00:00
|
|
|
{
|
2007-02-20 11:20:52 +00:00
|
|
|
GstCaps *caps;
|
2009-03-19 18:19:38 +00:00
|
|
|
GstDecodeBin *dbin;
|
2015-10-19 16:52:24 +00:00
|
|
|
GstDecodeChain *new_chain;
|
2009-03-19 18:19:38 +00:00
|
|
|
|
2009-09-26 10:17:49 +00:00
|
|
|
dbin = chain->dbin;
|
2007-02-20 11:20:52 +00:00
|
|
|
|
2009-09-26 10:17:49 +00:00
|
|
|
GST_DEBUG_OBJECT (pad, "pad added, chain:%p", chain);
|
2015-08-20 16:30:38 +00:00
|
|
|
GST_PAD_STREAM_LOCK (pad);
|
|
|
|
if (!gst_pad_is_active (pad)) {
|
|
|
|
GST_PAD_STREAM_UNLOCK (pad);
|
|
|
|
GST_DEBUG_OBJECT (pad, "Ignoring pad-added from a deactivated pad");
|
|
|
|
return;
|
|
|
|
}
|
gst/playback/: New decodebin2 element.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstdecodebin2.c: (gst_decode_bin_get_type),
(_gst_boolean_accumulator), (gst_decode_bin_class_init),
(gst_decode_bin_factory_filter), (compare_ranks), (print_feature),
(gst_decode_bin_init), (gst_decode_bin_dispose),
(gst_decode_bin_finalize), (gst_decode_bin_set_property),
(gst_decode_bin_get_property), (gst_decode_bin_set_caps),
(gst_decode_bin_get_caps), (gst_decode_bin_autoplug_continue),
(gst_decode_bin_autoplug_sort), (analyze_new_pad), (connect_pad),
(connect_element), (expose_pad), (type_found),
(pad_added_group_cb), (pad_removed_group_cb),
(no_more_pads_group_cb), (pad_added_cb), (pad_removed_cb),
(no_more_pads_cb), (find_compatibles), (is_demuxer_element),
(are_raw_caps), (multi_queue_overrun_cb),
(multi_queue_underrun_cb), (gst_decode_group_new),
(get_current_group), (group_demuxer_event_probe),
(gst_decode_group_control_demuxer_pad),
(gst_decode_group_control_source_pad),
(gst_decode_group_check_if_blocked),
(gst_decode_group_check_if_drained), (gst_decode_group_expose),
(gst_decode_group_hide), (gst_decode_group_free),
(gst_decode_group_set_complete), (source_pad_blocked_cb),
(source_pad_event_probe), (gst_decode_pad_new), (add_fakesink),
(remove_fakesink), (find_sink_pad), (gst_decode_bin_change_state),
(plugin_init):
New decodebin2 element.
Closes #370092
* gst/playback/gstplay-marshal.list:
Added marshallers for new signals in decodebin2
* gst/playback/gstplaybasebin.c: (setup_subtitle), (make_decoder):
Use decodebin2 if *and only if* the USE_DECODEBIN2 environment variable
is set.
2006-11-28 14:40:39 +00:00
|
|
|
|
2010-06-28 08:53:57 +00:00
|
|
|
caps = get_pad_caps (pad);
|
2015-10-19 16:52:24 +00:00
|
|
|
if (analyze_new_pad (dbin, element, pad, caps, chain, &new_chain))
|
2016-03-12 17:47:47 +00:00
|
|
|
expose_pad (dbin, element, new_chain->current_pad, pad, caps, new_chain);
|
2007-02-20 11:20:52 +00:00
|
|
|
if (caps)
|
|
|
|
gst_caps_unref (caps);
|
|
|
|
|
2015-08-20 16:30:38 +00:00
|
|
|
GST_PAD_STREAM_UNLOCK (pad);
|
gst/playback/: New decodebin2 element.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstdecodebin2.c: (gst_decode_bin_get_type),
(_gst_boolean_accumulator), (gst_decode_bin_class_init),
(gst_decode_bin_factory_filter), (compare_ranks), (print_feature),
(gst_decode_bin_init), (gst_decode_bin_dispose),
(gst_decode_bin_finalize), (gst_decode_bin_set_property),
(gst_decode_bin_get_property), (gst_decode_bin_set_caps),
(gst_decode_bin_get_caps), (gst_decode_bin_autoplug_continue),
(gst_decode_bin_autoplug_sort), (analyze_new_pad), (connect_pad),
(connect_element), (expose_pad), (type_found),
(pad_added_group_cb), (pad_removed_group_cb),
(no_more_pads_group_cb), (pad_added_cb), (pad_removed_cb),
(no_more_pads_cb), (find_compatibles), (is_demuxer_element),
(are_raw_caps), (multi_queue_overrun_cb),
(multi_queue_underrun_cb), (gst_decode_group_new),
(get_current_group), (group_demuxer_event_probe),
(gst_decode_group_control_demuxer_pad),
(gst_decode_group_control_source_pad),
(gst_decode_group_check_if_blocked),
(gst_decode_group_check_if_drained), (gst_decode_group_expose),
(gst_decode_group_hide), (gst_decode_group_free),
(gst_decode_group_set_complete), (source_pad_blocked_cb),
(source_pad_event_probe), (gst_decode_pad_new), (add_fakesink),
(remove_fakesink), (find_sink_pad), (gst_decode_bin_change_state),
(plugin_init):
New decodebin2 element.
Closes #370092
* gst/playback/gstplay-marshal.list:
Added marshallers for new signals in decodebin2
* gst/playback/gstplaybasebin.c: (setup_subtitle), (make_decoder):
Use decodebin2 if *and only if* the USE_DECODEBIN2 environment variable
is set.
2006-11-28 14:40:39 +00:00
|
|
|
}
|
|
|
|
|
2015-04-29 13:56:39 +00:00
|
|
|
static GstPadProbeReturn
|
|
|
|
sink_pad_event_probe (GstPad * pad, GstPadProbeInfo * info, gpointer user_data)
|
|
|
|
{
|
|
|
|
GstDecodeGroup *group = (GstDecodeGroup *) user_data;
|
|
|
|
GstEvent *event = GST_PAD_PROBE_INFO_EVENT (info);
|
|
|
|
GstPad *peer = gst_pad_get_peer (pad);
|
|
|
|
GstPadProbeReturn proberet = GST_PAD_PROBE_OK;
|
|
|
|
|
|
|
|
GST_DEBUG_OBJECT (pad, "Got upstream event %s", GST_EVENT_TYPE_NAME (event));
|
|
|
|
|
|
|
|
if (peer == NULL) {
|
|
|
|
GST_DEBUG_OBJECT (pad, "We are unlinked !");
|
|
|
|
if (group->parent && group->parent->next_groups) {
|
|
|
|
GstDecodeGroup *last_group =
|
|
|
|
g_list_last (group->parent->next_groups)->data;
|
|
|
|
GST_DEBUG_OBJECT (pad, "We could send the event to another group (%p)",
|
|
|
|
last_group);
|
|
|
|
/* Grab another sinkpad for that last group through which we will forward this event */
|
|
|
|
if (last_group->reqpads) {
|
|
|
|
GstPad *sinkpad = (GstPad *) last_group->reqpads->data;
|
|
|
|
GstPad *otherpeer = gst_pad_get_peer (sinkpad);
|
|
|
|
if (otherpeer) {
|
|
|
|
GST_DEBUG_OBJECT (otherpeer, "Attempting to forward event");
|
|
|
|
if (gst_pad_send_event (otherpeer, gst_event_ref (event))) {
|
2015-10-06 13:20:51 +00:00
|
|
|
gst_event_unref (event);
|
2015-04-29 13:56:39 +00:00
|
|
|
proberet = GST_PAD_PROBE_HANDLED;
|
|
|
|
}
|
|
|
|
gst_object_unref (otherpeer);
|
|
|
|
}
|
2015-10-27 13:44:06 +00:00
|
|
|
} else {
|
2015-04-29 13:56:39 +00:00
|
|
|
GST_DEBUG_OBJECT (pad, "No request pads, can't forward event");
|
2015-10-27 13:44:06 +00:00
|
|
|
}
|
2015-04-29 13:56:39 +00:00
|
|
|
}
|
2015-10-27 13:44:06 +00:00
|
|
|
} else {
|
2015-04-29 13:56:39 +00:00
|
|
|
gst_object_unref (peer);
|
2015-10-27 13:44:06 +00:00
|
|
|
}
|
2015-04-29 13:56:39 +00:00
|
|
|
|
|
|
|
return proberet;
|
|
|
|
}
|
|
|
|
|
|
|
|
static GstPadProbeReturn
|
|
|
|
sink_pad_query_probe (GstPad * pad, GstPadProbeInfo * info, gpointer user_data)
|
|
|
|
{
|
|
|
|
GstDecodeGroup *group = (GstDecodeGroup *) user_data;
|
|
|
|
GstPad *peer = gst_pad_get_peer (pad);
|
|
|
|
GstQuery *query = GST_PAD_PROBE_INFO_QUERY (info);
|
|
|
|
GstPadProbeReturn proberet = GST_PAD_PROBE_OK;
|
|
|
|
|
|
|
|
GST_DEBUG_OBJECT (pad, "Got upstream query %s", GST_QUERY_TYPE_NAME (query));
|
|
|
|
|
|
|
|
if (peer == NULL) {
|
|
|
|
GST_DEBUG_OBJECT (pad, "We are unlinked !");
|
|
|
|
if (group->parent && group->parent->next_groups) {
|
|
|
|
GstDecodeGroup *last_group =
|
|
|
|
g_list_last (group->parent->next_groups)->data;
|
|
|
|
GST_DEBUG_OBJECT (pad, "We could send the query to another group");
|
|
|
|
/* Grab another sinkpad for that last group through which we will forward this event */
|
|
|
|
if (last_group->reqpads) {
|
|
|
|
GstPad *sinkpad = (GstPad *) last_group->reqpads->data;
|
|
|
|
GstPad *otherpeer = gst_pad_get_peer (sinkpad);
|
|
|
|
if (otherpeer) {
|
|
|
|
GST_DEBUG_OBJECT (otherpeer, "Attempting to forward query");
|
|
|
|
if (gst_pad_query (otherpeer, query)) {
|
|
|
|
proberet = GST_PAD_PROBE_HANDLED;
|
|
|
|
} else
|
|
|
|
GST_DEBUG ("FAILURE");
|
|
|
|
gst_object_unref (otherpeer);
|
|
|
|
} else
|
|
|
|
GST_DEBUG_OBJECT (sinkpad, "request pad not connected ??");
|
|
|
|
} else
|
|
|
|
GST_DEBUG_OBJECT (pad, "No request pads ???");
|
|
|
|
}
|
|
|
|
} else
|
|
|
|
gst_object_unref (peer);
|
|
|
|
|
|
|
|
return proberet;
|
|
|
|
}
|
|
|
|
|
gst/playback/: New decodebin2 element.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstdecodebin2.c: (gst_decode_bin_get_type),
(_gst_boolean_accumulator), (gst_decode_bin_class_init),
(gst_decode_bin_factory_filter), (compare_ranks), (print_feature),
(gst_decode_bin_init), (gst_decode_bin_dispose),
(gst_decode_bin_finalize), (gst_decode_bin_set_property),
(gst_decode_bin_get_property), (gst_decode_bin_set_caps),
(gst_decode_bin_get_caps), (gst_decode_bin_autoplug_continue),
(gst_decode_bin_autoplug_sort), (analyze_new_pad), (connect_pad),
(connect_element), (expose_pad), (type_found),
(pad_added_group_cb), (pad_removed_group_cb),
(no_more_pads_group_cb), (pad_added_cb), (pad_removed_cb),
(no_more_pads_cb), (find_compatibles), (is_demuxer_element),
(are_raw_caps), (multi_queue_overrun_cb),
(multi_queue_underrun_cb), (gst_decode_group_new),
(get_current_group), (group_demuxer_event_probe),
(gst_decode_group_control_demuxer_pad),
(gst_decode_group_control_source_pad),
(gst_decode_group_check_if_blocked),
(gst_decode_group_check_if_drained), (gst_decode_group_expose),
(gst_decode_group_hide), (gst_decode_group_free),
(gst_decode_group_set_complete), (source_pad_blocked_cb),
(source_pad_event_probe), (gst_decode_pad_new), (add_fakesink),
(remove_fakesink), (find_sink_pad), (gst_decode_bin_change_state),
(plugin_init):
New decodebin2 element.
Closes #370092
* gst/playback/gstplay-marshal.list:
Added marshallers for new signals in decodebin2
* gst/playback/gstplaybasebin.c: (setup_subtitle), (make_decoder):
Use decodebin2 if *and only if* the USE_DECODEBIN2 environment variable
is set.
2006-11-28 14:40:39 +00:00
|
|
|
static void
|
2009-09-26 10:17:49 +00:00
|
|
|
pad_removed_cb (GstElement * element, GstPad * pad, GstDecodeChain * chain)
|
gst/playback/: New decodebin2 element.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstdecodebin2.c: (gst_decode_bin_get_type),
(_gst_boolean_accumulator), (gst_decode_bin_class_init),
(gst_decode_bin_factory_filter), (compare_ranks), (print_feature),
(gst_decode_bin_init), (gst_decode_bin_dispose),
(gst_decode_bin_finalize), (gst_decode_bin_set_property),
(gst_decode_bin_get_property), (gst_decode_bin_set_caps),
(gst_decode_bin_get_caps), (gst_decode_bin_autoplug_continue),
(gst_decode_bin_autoplug_sort), (analyze_new_pad), (connect_pad),
(connect_element), (expose_pad), (type_found),
(pad_added_group_cb), (pad_removed_group_cb),
(no_more_pads_group_cb), (pad_added_cb), (pad_removed_cb),
(no_more_pads_cb), (find_compatibles), (is_demuxer_element),
(are_raw_caps), (multi_queue_overrun_cb),
(multi_queue_underrun_cb), (gst_decode_group_new),
(get_current_group), (group_demuxer_event_probe),
(gst_decode_group_control_demuxer_pad),
(gst_decode_group_control_source_pad),
(gst_decode_group_check_if_blocked),
(gst_decode_group_check_if_drained), (gst_decode_group_expose),
(gst_decode_group_hide), (gst_decode_group_free),
(gst_decode_group_set_complete), (source_pad_blocked_cb),
(source_pad_event_probe), (gst_decode_pad_new), (add_fakesink),
(remove_fakesink), (find_sink_pad), (gst_decode_bin_change_state),
(plugin_init):
New decodebin2 element.
Closes #370092
* gst/playback/gstplay-marshal.list:
Added marshallers for new signals in decodebin2
* gst/playback/gstplaybasebin.c: (setup_subtitle), (make_decoder):
Use decodebin2 if *and only if* the USE_DECODEBIN2 environment variable
is set.
2006-11-28 14:40:39 +00:00
|
|
|
{
|
2009-09-26 10:17:49 +00:00
|
|
|
GList *l;
|
|
|
|
|
|
|
|
GST_LOG_OBJECT (pad, "pad removed, chain:%p", chain);
|
gst/playback/: New decodebin2 element.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstdecodebin2.c: (gst_decode_bin_get_type),
(_gst_boolean_accumulator), (gst_decode_bin_class_init),
(gst_decode_bin_factory_filter), (compare_ranks), (print_feature),
(gst_decode_bin_init), (gst_decode_bin_dispose),
(gst_decode_bin_finalize), (gst_decode_bin_set_property),
(gst_decode_bin_get_property), (gst_decode_bin_set_caps),
(gst_decode_bin_get_caps), (gst_decode_bin_autoplug_continue),
(gst_decode_bin_autoplug_sort), (analyze_new_pad), (connect_pad),
(connect_element), (expose_pad), (type_found),
(pad_added_group_cb), (pad_removed_group_cb),
(no_more_pads_group_cb), (pad_added_cb), (pad_removed_cb),
(no_more_pads_cb), (find_compatibles), (is_demuxer_element),
(are_raw_caps), (multi_queue_overrun_cb),
(multi_queue_underrun_cb), (gst_decode_group_new),
(get_current_group), (group_demuxer_event_probe),
(gst_decode_group_control_demuxer_pad),
(gst_decode_group_control_source_pad),
(gst_decode_group_check_if_blocked),
(gst_decode_group_check_if_drained), (gst_decode_group_expose),
(gst_decode_group_hide), (gst_decode_group_free),
(gst_decode_group_set_complete), (source_pad_blocked_cb),
(source_pad_event_probe), (gst_decode_pad_new), (add_fakesink),
(remove_fakesink), (find_sink_pad), (gst_decode_bin_change_state),
(plugin_init):
New decodebin2 element.
Closes #370092
* gst/playback/gstplay-marshal.list:
Added marshallers for new signals in decodebin2
* gst/playback/gstplaybasebin.c: (setup_subtitle), (make_decoder):
Use decodebin2 if *and only if* the USE_DECODEBIN2 environment variable
is set.
2006-11-28 14:40:39 +00:00
|
|
|
|
|
|
|
/* In fact, we don't have to do anything here, the active group will be
|
|
|
|
* removed when the group's multiqueue is drained */
|
2009-09-26 10:17:49 +00:00
|
|
|
CHAIN_MUTEX_LOCK (chain);
|
|
|
|
for (l = chain->pending_pads; l; l = l->next) {
|
2009-11-19 17:51:33 +00:00
|
|
|
GstPendingPad *ppad = l->data;
|
|
|
|
GstPad *opad = ppad->pad;
|
2009-09-26 10:17:49 +00:00
|
|
|
|
|
|
|
if (pad == opad) {
|
2009-11-19 17:51:33 +00:00
|
|
|
gst_pending_pad_free (ppad);
|
2009-09-26 10:17:49 +00:00
|
|
|
chain->pending_pads = g_list_delete_link (chain->pending_pads, l);
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
CHAIN_MUTEX_UNLOCK (chain);
|
gst/playback/: New decodebin2 element.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstdecodebin2.c: (gst_decode_bin_get_type),
(_gst_boolean_accumulator), (gst_decode_bin_class_init),
(gst_decode_bin_factory_filter), (compare_ranks), (print_feature),
(gst_decode_bin_init), (gst_decode_bin_dispose),
(gst_decode_bin_finalize), (gst_decode_bin_set_property),
(gst_decode_bin_get_property), (gst_decode_bin_set_caps),
(gst_decode_bin_get_caps), (gst_decode_bin_autoplug_continue),
(gst_decode_bin_autoplug_sort), (analyze_new_pad), (connect_pad),
(connect_element), (expose_pad), (type_found),
(pad_added_group_cb), (pad_removed_group_cb),
(no_more_pads_group_cb), (pad_added_cb), (pad_removed_cb),
(no_more_pads_cb), (find_compatibles), (is_demuxer_element),
(are_raw_caps), (multi_queue_overrun_cb),
(multi_queue_underrun_cb), (gst_decode_group_new),
(get_current_group), (group_demuxer_event_probe),
(gst_decode_group_control_demuxer_pad),
(gst_decode_group_control_source_pad),
(gst_decode_group_check_if_blocked),
(gst_decode_group_check_if_drained), (gst_decode_group_expose),
(gst_decode_group_hide), (gst_decode_group_free),
(gst_decode_group_set_complete), (source_pad_blocked_cb),
(source_pad_event_probe), (gst_decode_pad_new), (add_fakesink),
(remove_fakesink), (find_sink_pad), (gst_decode_bin_change_state),
(plugin_init):
New decodebin2 element.
Closes #370092
* gst/playback/gstplay-marshal.list:
Added marshallers for new signals in decodebin2
* gst/playback/gstplaybasebin.c: (setup_subtitle), (make_decoder):
Use decodebin2 if *and only if* the USE_DECODEBIN2 environment variable
is set.
2006-11-28 14:40:39 +00:00
|
|
|
}
|
|
|
|
|
2008-11-21 00:04:48 +00:00
|
|
|
static void
|
2009-09-26 10:17:49 +00:00
|
|
|
no_more_pads_cb (GstElement * element, GstDecodeChain * chain)
|
gst/playback/: New decodebin2 element.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstdecodebin2.c: (gst_decode_bin_get_type),
(_gst_boolean_accumulator), (gst_decode_bin_class_init),
(gst_decode_bin_factory_filter), (compare_ranks), (print_feature),
(gst_decode_bin_init), (gst_decode_bin_dispose),
(gst_decode_bin_finalize), (gst_decode_bin_set_property),
(gst_decode_bin_get_property), (gst_decode_bin_set_caps),
(gst_decode_bin_get_caps), (gst_decode_bin_autoplug_continue),
(gst_decode_bin_autoplug_sort), (analyze_new_pad), (connect_pad),
(connect_element), (expose_pad), (type_found),
(pad_added_group_cb), (pad_removed_group_cb),
(no_more_pads_group_cb), (pad_added_cb), (pad_removed_cb),
(no_more_pads_cb), (find_compatibles), (is_demuxer_element),
(are_raw_caps), (multi_queue_overrun_cb),
(multi_queue_underrun_cb), (gst_decode_group_new),
(get_current_group), (group_demuxer_event_probe),
(gst_decode_group_control_demuxer_pad),
(gst_decode_group_control_source_pad),
(gst_decode_group_check_if_blocked),
(gst_decode_group_check_if_drained), (gst_decode_group_expose),
(gst_decode_group_hide), (gst_decode_group_free),
(gst_decode_group_set_complete), (source_pad_blocked_cb),
(source_pad_event_probe), (gst_decode_pad_new), (add_fakesink),
(remove_fakesink), (find_sink_pad), (gst_decode_bin_change_state),
(plugin_init):
New decodebin2 element.
Closes #370092
* gst/playback/gstplay-marshal.list:
Added marshallers for new signals in decodebin2
* gst/playback/gstplaybasebin.c: (setup_subtitle), (make_decoder):
Use decodebin2 if *and only if* the USE_DECODEBIN2 environment variable
is set.
2006-11-28 14:40:39 +00:00
|
|
|
{
|
2009-09-26 10:17:49 +00:00
|
|
|
GstDecodeGroup *group = NULL;
|
2009-03-17 18:09:02 +00:00
|
|
|
|
2009-09-26 10:17:49 +00:00
|
|
|
GST_LOG_OBJECT (element, "got no more pads");
|
gst/playback/: New decodebin2 element.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstdecodebin2.c: (gst_decode_bin_get_type),
(_gst_boolean_accumulator), (gst_decode_bin_class_init),
(gst_decode_bin_factory_filter), (compare_ranks), (print_feature),
(gst_decode_bin_init), (gst_decode_bin_dispose),
(gst_decode_bin_finalize), (gst_decode_bin_set_property),
(gst_decode_bin_get_property), (gst_decode_bin_set_caps),
(gst_decode_bin_get_caps), (gst_decode_bin_autoplug_continue),
(gst_decode_bin_autoplug_sort), (analyze_new_pad), (connect_pad),
(connect_element), (expose_pad), (type_found),
(pad_added_group_cb), (pad_removed_group_cb),
(no_more_pads_group_cb), (pad_added_cb), (pad_removed_cb),
(no_more_pads_cb), (find_compatibles), (is_demuxer_element),
(are_raw_caps), (multi_queue_overrun_cb),
(multi_queue_underrun_cb), (gst_decode_group_new),
(get_current_group), (group_demuxer_event_probe),
(gst_decode_group_control_demuxer_pad),
(gst_decode_group_control_source_pad),
(gst_decode_group_check_if_blocked),
(gst_decode_group_check_if_drained), (gst_decode_group_expose),
(gst_decode_group_hide), (gst_decode_group_free),
(gst_decode_group_set_complete), (source_pad_blocked_cb),
(source_pad_event_probe), (gst_decode_pad_new), (add_fakesink),
(remove_fakesink), (find_sink_pad), (gst_decode_bin_change_state),
(plugin_init):
New decodebin2 element.
Closes #370092
* gst/playback/gstplay-marshal.list:
Added marshallers for new signals in decodebin2
* gst/playback/gstplaybasebin.c: (setup_subtitle), (make_decoder):
Use decodebin2 if *and only if* the USE_DECODEBIN2 environment variable
is set.
2006-11-28 14:40:39 +00:00
|
|
|
|
2010-01-15 18:52:29 +00:00
|
|
|
CHAIN_MUTEX_LOCK (chain);
|
2011-06-26 13:40:17 +00:00
|
|
|
if (!chain->elements
|
|
|
|
|| ((GstDecodeElement *) chain->elements->data)->element != element) {
|
2009-09-26 10:17:49 +00:00
|
|
|
GST_LOG_OBJECT (chain->dbin, "no-more-pads from old chain element '%s'",
|
|
|
|
GST_OBJECT_NAME (element));
|
2010-01-15 18:52:29 +00:00
|
|
|
CHAIN_MUTEX_UNLOCK (chain);
|
gst/playback/: New decodebin2 element.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstdecodebin2.c: (gst_decode_bin_get_type),
(_gst_boolean_accumulator), (gst_decode_bin_class_init),
(gst_decode_bin_factory_filter), (compare_ranks), (print_feature),
(gst_decode_bin_init), (gst_decode_bin_dispose),
(gst_decode_bin_finalize), (gst_decode_bin_set_property),
(gst_decode_bin_get_property), (gst_decode_bin_set_caps),
(gst_decode_bin_get_caps), (gst_decode_bin_autoplug_continue),
(gst_decode_bin_autoplug_sort), (analyze_new_pad), (connect_pad),
(connect_element), (expose_pad), (type_found),
(pad_added_group_cb), (pad_removed_group_cb),
(no_more_pads_group_cb), (pad_added_cb), (pad_removed_cb),
(no_more_pads_cb), (find_compatibles), (is_demuxer_element),
(are_raw_caps), (multi_queue_overrun_cb),
(multi_queue_underrun_cb), (gst_decode_group_new),
(get_current_group), (group_demuxer_event_probe),
(gst_decode_group_control_demuxer_pad),
(gst_decode_group_control_source_pad),
(gst_decode_group_check_if_blocked),
(gst_decode_group_check_if_drained), (gst_decode_group_expose),
(gst_decode_group_hide), (gst_decode_group_free),
(gst_decode_group_set_complete), (source_pad_blocked_cb),
(source_pad_event_probe), (gst_decode_pad_new), (add_fakesink),
(remove_fakesink), (find_sink_pad), (gst_decode_bin_change_state),
(plugin_init):
New decodebin2 element.
Closes #370092
* gst/playback/gstplay-marshal.list:
Added marshallers for new signals in decodebin2
* gst/playback/gstplaybasebin.c: (setup_subtitle), (make_decoder):
Use decodebin2 if *and only if* the USE_DECODEBIN2 environment variable
is set.
2006-11-28 14:40:39 +00:00
|
|
|
return;
|
2009-10-13 14:50:37 +00:00
|
|
|
} else if (!chain->demuxer) {
|
|
|
|
GST_LOG_OBJECT (chain->dbin, "no-more-pads from a non-demuxer element '%s'",
|
|
|
|
GST_OBJECT_NAME (element));
|
2010-01-15 18:52:29 +00:00
|
|
|
CHAIN_MUTEX_UNLOCK (chain);
|
2009-10-13 14:50:37 +00:00
|
|
|
return;
|
gst/playback/: New decodebin2 element.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstdecodebin2.c: (gst_decode_bin_get_type),
(_gst_boolean_accumulator), (gst_decode_bin_class_init),
(gst_decode_bin_factory_filter), (compare_ranks), (print_feature),
(gst_decode_bin_init), (gst_decode_bin_dispose),
(gst_decode_bin_finalize), (gst_decode_bin_set_property),
(gst_decode_bin_get_property), (gst_decode_bin_set_caps),
(gst_decode_bin_get_caps), (gst_decode_bin_autoplug_continue),
(gst_decode_bin_autoplug_sort), (analyze_new_pad), (connect_pad),
(connect_element), (expose_pad), (type_found),
(pad_added_group_cb), (pad_removed_group_cb),
(no_more_pads_group_cb), (pad_added_cb), (pad_removed_cb),
(no_more_pads_cb), (find_compatibles), (is_demuxer_element),
(are_raw_caps), (multi_queue_overrun_cb),
(multi_queue_underrun_cb), (gst_decode_group_new),
(get_current_group), (group_demuxer_event_probe),
(gst_decode_group_control_demuxer_pad),
(gst_decode_group_control_source_pad),
(gst_decode_group_check_if_blocked),
(gst_decode_group_check_if_drained), (gst_decode_group_expose),
(gst_decode_group_hide), (gst_decode_group_free),
(gst_decode_group_set_complete), (source_pad_blocked_cb),
(source_pad_event_probe), (gst_decode_pad_new), (add_fakesink),
(remove_fakesink), (find_sink_pad), (gst_decode_bin_change_state),
(plugin_init):
New decodebin2 element.
Closes #370092
* gst/playback/gstplay-marshal.list:
Added marshallers for new signals in decodebin2
* gst/playback/gstplaybasebin.c: (setup_subtitle), (make_decoder):
Use decodebin2 if *and only if* the USE_DECODEBIN2 environment variable
is set.
2006-11-28 14:40:39 +00:00
|
|
|
}
|
2007-06-05 16:05:19 +00:00
|
|
|
|
2009-09-26 10:17:49 +00:00
|
|
|
/* when we received no_more_pads, we can complete the pads of the chain */
|
|
|
|
if (!chain->next_groups && chain->active_group) {
|
|
|
|
group = chain->active_group;
|
|
|
|
} else if (chain->next_groups) {
|
2013-02-06 14:09:52 +00:00
|
|
|
GList *iter;
|
|
|
|
for (iter = chain->next_groups; iter; iter = g_list_next (iter)) {
|
|
|
|
group = iter->data;
|
|
|
|
if (!group->no_more_pads)
|
|
|
|
break;
|
|
|
|
}
|
2009-09-26 10:17:49 +00:00
|
|
|
}
|
|
|
|
if (!group) {
|
|
|
|
GST_ERROR_OBJECT (chain->dbin, "can't find group for element");
|
|
|
|
CHAIN_MUTEX_UNLOCK (chain);
|
|
|
|
return;
|
|
|
|
}
|
2009-03-05 23:42:23 +00:00
|
|
|
|
2009-09-26 10:17:49 +00:00
|
|
|
GST_DEBUG_OBJECT (element, "Setting group %p to complete", group);
|
2007-06-05 16:05:19 +00:00
|
|
|
|
2009-09-26 10:17:49 +00:00
|
|
|
group->no_more_pads = TRUE;
|
2015-01-12 13:38:09 +00:00
|
|
|
/* this group has prerolled enough to not need more pads,
|
|
|
|
* we can probably set its buffering state to playing now */
|
|
|
|
GST_DEBUG_OBJECT (group->dbin, "Setting group %p multiqueue to "
|
|
|
|
"'playing' buffering mode", group);
|
|
|
|
decodebin_set_queue_size (group->dbin, group->multiqueue, FALSE,
|
2015-08-18 15:47:21 +00:00
|
|
|
(group->parent ? group->parent->seekable : TRUE));
|
2009-09-26 10:17:49 +00:00
|
|
|
CHAIN_MUTEX_UNLOCK (chain);
|
2007-06-05 16:05:19 +00:00
|
|
|
|
2009-09-26 10:17:49 +00:00
|
|
|
EXPOSE_LOCK (chain->dbin);
|
2015-02-04 11:46:09 +00:00
|
|
|
if (chain->dbin->decode_chain) {
|
|
|
|
if (gst_decode_chain_is_complete (chain->dbin->decode_chain)) {
|
|
|
|
gst_decode_bin_expose (chain->dbin);
|
|
|
|
}
|
2009-09-26 10:17:49 +00:00
|
|
|
}
|
|
|
|
EXPOSE_UNLOCK (chain->dbin);
|
2007-06-05 16:05:19 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
2009-09-26 10:17:49 +00:00
|
|
|
caps_notify_cb (GstPad * pad, GParamSpec * unused, GstDecodeChain * chain)
|
2007-06-05 16:05:19 +00:00
|
|
|
{
|
|
|
|
GstElement *element;
|
2009-09-26 10:17:49 +00:00
|
|
|
GList *l;
|
2007-06-05 16:05:19 +00:00
|
|
|
|
|
|
|
GST_LOG_OBJECT (pad, "Notified caps for pad %s:%s", GST_DEBUG_PAD_NAME (pad));
|
|
|
|
|
2009-03-05 23:42:23 +00:00
|
|
|
/* Disconnect this; if we still need it, we'll reconnect to this in
|
|
|
|
* analyze_new_pad */
|
2007-06-05 16:05:19 +00:00
|
|
|
element = GST_ELEMENT_CAST (gst_pad_get_parent (pad));
|
|
|
|
|
2009-09-26 10:17:49 +00:00
|
|
|
CHAIN_MUTEX_LOCK (chain);
|
|
|
|
for (l = chain->pending_pads; l; l = l->next) {
|
2009-11-19 17:51:33 +00:00
|
|
|
GstPendingPad *ppad = l->data;
|
|
|
|
if (ppad->pad == pad) {
|
|
|
|
gst_pending_pad_free (ppad);
|
2009-09-26 10:17:49 +00:00
|
|
|
chain->pending_pads = g_list_delete_link (chain->pending_pads, l);
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
CHAIN_MUTEX_UNLOCK (chain);
|
|
|
|
|
|
|
|
pad_added_cb (element, pad, chain);
|
2007-06-05 16:05:19 +00:00
|
|
|
|
|
|
|
gst_object_unref (element);
|
|
|
|
}
|
|
|
|
|
2011-01-25 16:03:23 +00:00
|
|
|
/* Decide whether an element is a demuxer based on the
|
gst/playback/: New decodebin2 element.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstdecodebin2.c: (gst_decode_bin_get_type),
(_gst_boolean_accumulator), (gst_decode_bin_class_init),
(gst_decode_bin_factory_filter), (compare_ranks), (print_feature),
(gst_decode_bin_init), (gst_decode_bin_dispose),
(gst_decode_bin_finalize), (gst_decode_bin_set_property),
(gst_decode_bin_get_property), (gst_decode_bin_set_caps),
(gst_decode_bin_get_caps), (gst_decode_bin_autoplug_continue),
(gst_decode_bin_autoplug_sort), (analyze_new_pad), (connect_pad),
(connect_element), (expose_pad), (type_found),
(pad_added_group_cb), (pad_removed_group_cb),
(no_more_pads_group_cb), (pad_added_cb), (pad_removed_cb),
(no_more_pads_cb), (find_compatibles), (is_demuxer_element),
(are_raw_caps), (multi_queue_overrun_cb),
(multi_queue_underrun_cb), (gst_decode_group_new),
(get_current_group), (group_demuxer_event_probe),
(gst_decode_group_control_demuxer_pad),
(gst_decode_group_control_source_pad),
(gst_decode_group_check_if_blocked),
(gst_decode_group_check_if_drained), (gst_decode_group_expose),
(gst_decode_group_hide), (gst_decode_group_free),
(gst_decode_group_set_complete), (source_pad_blocked_cb),
(source_pad_event_probe), (gst_decode_pad_new), (add_fakesink),
(remove_fakesink), (find_sink_pad), (gst_decode_bin_change_state),
(plugin_init):
New decodebin2 element.
Closes #370092
* gst/playback/gstplay-marshal.list:
Added marshallers for new signals in decodebin2
* gst/playback/gstplaybasebin.c: (setup_subtitle), (make_decoder):
Use decodebin2 if *and only if* the USE_DECODEBIN2 environment variable
is set.
2006-11-28 14:40:39 +00:00
|
|
|
* klass and number/type of src pad templates it has */
|
2008-11-21 00:04:48 +00:00
|
|
|
static gboolean
|
|
|
|
is_demuxer_element (GstElement * srcelement)
|
gst/playback/: New decodebin2 element.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstdecodebin2.c: (gst_decode_bin_get_type),
(_gst_boolean_accumulator), (gst_decode_bin_class_init),
(gst_decode_bin_factory_filter), (compare_ranks), (print_feature),
(gst_decode_bin_init), (gst_decode_bin_dispose),
(gst_decode_bin_finalize), (gst_decode_bin_set_property),
(gst_decode_bin_get_property), (gst_decode_bin_set_caps),
(gst_decode_bin_get_caps), (gst_decode_bin_autoplug_continue),
(gst_decode_bin_autoplug_sort), (analyze_new_pad), (connect_pad),
(connect_element), (expose_pad), (type_found),
(pad_added_group_cb), (pad_removed_group_cb),
(no_more_pads_group_cb), (pad_added_cb), (pad_removed_cb),
(no_more_pads_cb), (find_compatibles), (is_demuxer_element),
(are_raw_caps), (multi_queue_overrun_cb),
(multi_queue_underrun_cb), (gst_decode_group_new),
(get_current_group), (group_demuxer_event_probe),
(gst_decode_group_control_demuxer_pad),
(gst_decode_group_control_source_pad),
(gst_decode_group_check_if_blocked),
(gst_decode_group_check_if_drained), (gst_decode_group_expose),
(gst_decode_group_hide), (gst_decode_group_free),
(gst_decode_group_set_complete), (source_pad_blocked_cb),
(source_pad_event_probe), (gst_decode_pad_new), (add_fakesink),
(remove_fakesink), (find_sink_pad), (gst_decode_bin_change_state),
(plugin_init):
New decodebin2 element.
Closes #370092
* gst/playback/gstplay-marshal.list:
Added marshallers for new signals in decodebin2
* gst/playback/gstplaybasebin.c: (setup_subtitle), (make_decoder):
Use decodebin2 if *and only if* the USE_DECODEBIN2 environment variable
is set.
2006-11-28 14:40:39 +00:00
|
|
|
{
|
|
|
|
GstElementFactory *srcfactory;
|
|
|
|
GstElementClass *elemclass;
|
2009-08-08 13:54:02 +00:00
|
|
|
GList *walk;
|
gst/playback/: New decodebin2 element.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstdecodebin2.c: (gst_decode_bin_get_type),
(_gst_boolean_accumulator), (gst_decode_bin_class_init),
(gst_decode_bin_factory_filter), (compare_ranks), (print_feature),
(gst_decode_bin_init), (gst_decode_bin_dispose),
(gst_decode_bin_finalize), (gst_decode_bin_set_property),
(gst_decode_bin_get_property), (gst_decode_bin_set_caps),
(gst_decode_bin_get_caps), (gst_decode_bin_autoplug_continue),
(gst_decode_bin_autoplug_sort), (analyze_new_pad), (connect_pad),
(connect_element), (expose_pad), (type_found),
(pad_added_group_cb), (pad_removed_group_cb),
(no_more_pads_group_cb), (pad_added_cb), (pad_removed_cb),
(no_more_pads_cb), (find_compatibles), (is_demuxer_element),
(are_raw_caps), (multi_queue_overrun_cb),
(multi_queue_underrun_cb), (gst_decode_group_new),
(get_current_group), (group_demuxer_event_probe),
(gst_decode_group_control_demuxer_pad),
(gst_decode_group_control_source_pad),
(gst_decode_group_check_if_blocked),
(gst_decode_group_check_if_drained), (gst_decode_group_expose),
(gst_decode_group_hide), (gst_decode_group_free),
(gst_decode_group_set_complete), (source_pad_blocked_cb),
(source_pad_event_probe), (gst_decode_pad_new), (add_fakesink),
(remove_fakesink), (find_sink_pad), (gst_decode_bin_change_state),
(plugin_init):
New decodebin2 element.
Closes #370092
* gst/playback/gstplay-marshal.list:
Added marshallers for new signals in decodebin2
* gst/playback/gstplaybasebin.c: (setup_subtitle), (make_decoder):
Use decodebin2 if *and only if* the USE_DECODEBIN2 environment variable
is set.
2006-11-28 14:40:39 +00:00
|
|
|
const gchar *klass;
|
|
|
|
gint potential_src_pads = 0;
|
|
|
|
|
|
|
|
srcfactory = gst_element_get_factory (srcelement);
|
2012-09-15 16:57:09 +00:00
|
|
|
klass =
|
|
|
|
gst_element_factory_get_metadata (srcfactory, GST_ELEMENT_METADATA_KLASS);
|
gst/playback/: New decodebin2 element.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstdecodebin2.c: (gst_decode_bin_get_type),
(_gst_boolean_accumulator), (gst_decode_bin_class_init),
(gst_decode_bin_factory_filter), (compare_ranks), (print_feature),
(gst_decode_bin_init), (gst_decode_bin_dispose),
(gst_decode_bin_finalize), (gst_decode_bin_set_property),
(gst_decode_bin_get_property), (gst_decode_bin_set_caps),
(gst_decode_bin_get_caps), (gst_decode_bin_autoplug_continue),
(gst_decode_bin_autoplug_sort), (analyze_new_pad), (connect_pad),
(connect_element), (expose_pad), (type_found),
(pad_added_group_cb), (pad_removed_group_cb),
(no_more_pads_group_cb), (pad_added_cb), (pad_removed_cb),
(no_more_pads_cb), (find_compatibles), (is_demuxer_element),
(are_raw_caps), (multi_queue_overrun_cb),
(multi_queue_underrun_cb), (gst_decode_group_new),
(get_current_group), (group_demuxer_event_probe),
(gst_decode_group_control_demuxer_pad),
(gst_decode_group_control_source_pad),
(gst_decode_group_check_if_blocked),
(gst_decode_group_check_if_drained), (gst_decode_group_expose),
(gst_decode_group_hide), (gst_decode_group_free),
(gst_decode_group_set_complete), (source_pad_blocked_cb),
(source_pad_event_probe), (gst_decode_pad_new), (add_fakesink),
(remove_fakesink), (find_sink_pad), (gst_decode_bin_change_state),
(plugin_init):
New decodebin2 element.
Closes #370092
* gst/playback/gstplay-marshal.list:
Added marshallers for new signals in decodebin2
* gst/playback/gstplaybasebin.c: (setup_subtitle), (make_decoder):
Use decodebin2 if *and only if* the USE_DECODEBIN2 environment variable
is set.
2006-11-28 14:40:39 +00:00
|
|
|
|
|
|
|
/* Can't be a demuxer unless it has Demux in the klass name */
|
|
|
|
if (!strstr (klass, "Demux"))
|
|
|
|
return FALSE;
|
|
|
|
|
|
|
|
/* Walk the src pad templates and count how many the element
|
|
|
|
* might produce */
|
|
|
|
elemclass = GST_ELEMENT_GET_CLASS (srcelement);
|
|
|
|
|
2009-08-08 13:54:02 +00:00
|
|
|
walk = gst_element_class_get_pad_template_list (elemclass);
|
gst/playback/: New decodebin2 element.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstdecodebin2.c: (gst_decode_bin_get_type),
(_gst_boolean_accumulator), (gst_decode_bin_class_init),
(gst_decode_bin_factory_filter), (compare_ranks), (print_feature),
(gst_decode_bin_init), (gst_decode_bin_dispose),
(gst_decode_bin_finalize), (gst_decode_bin_set_property),
(gst_decode_bin_get_property), (gst_decode_bin_set_caps),
(gst_decode_bin_get_caps), (gst_decode_bin_autoplug_continue),
(gst_decode_bin_autoplug_sort), (analyze_new_pad), (connect_pad),
(connect_element), (expose_pad), (type_found),
(pad_added_group_cb), (pad_removed_group_cb),
(no_more_pads_group_cb), (pad_added_cb), (pad_removed_cb),
(no_more_pads_cb), (find_compatibles), (is_demuxer_element),
(are_raw_caps), (multi_queue_overrun_cb),
(multi_queue_underrun_cb), (gst_decode_group_new),
(get_current_group), (group_demuxer_event_probe),
(gst_decode_group_control_demuxer_pad),
(gst_decode_group_control_source_pad),
(gst_decode_group_check_if_blocked),
(gst_decode_group_check_if_drained), (gst_decode_group_expose),
(gst_decode_group_hide), (gst_decode_group_free),
(gst_decode_group_set_complete), (source_pad_blocked_cb),
(source_pad_event_probe), (gst_decode_pad_new), (add_fakesink),
(remove_fakesink), (find_sink_pad), (gst_decode_bin_change_state),
(plugin_init):
New decodebin2 element.
Closes #370092
* gst/playback/gstplay-marshal.list:
Added marshallers for new signals in decodebin2
* gst/playback/gstplaybasebin.c: (setup_subtitle), (make_decoder):
Use decodebin2 if *and only if* the USE_DECODEBIN2 environment variable
is set.
2006-11-28 14:40:39 +00:00
|
|
|
while (walk != NULL) {
|
|
|
|
GstPadTemplate *templ;
|
|
|
|
|
|
|
|
templ = (GstPadTemplate *) walk->data;
|
|
|
|
if (GST_PAD_TEMPLATE_DIRECTION (templ) == GST_PAD_SRC) {
|
|
|
|
switch (GST_PAD_TEMPLATE_PRESENCE (templ)) {
|
|
|
|
case GST_PAD_ALWAYS:
|
|
|
|
case GST_PAD_SOMETIMES:
|
|
|
|
if (strstr (GST_PAD_TEMPLATE_NAME_TEMPLATE (templ), "%"))
|
|
|
|
potential_src_pads += 2; /* Might make multiple pads */
|
|
|
|
else
|
|
|
|
potential_src_pads += 1;
|
|
|
|
break;
|
|
|
|
case GST_PAD_REQUEST:
|
|
|
|
potential_src_pads += 2;
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
walk = g_list_next (walk);
|
|
|
|
}
|
|
|
|
|
|
|
|
if (potential_src_pads < 2)
|
|
|
|
return FALSE;
|
|
|
|
|
|
|
|
return TRUE;
|
|
|
|
}
|
|
|
|
|
2014-02-20 14:02:09 +00:00
|
|
|
static gboolean
|
|
|
|
is_adaptive_demuxer_element (GstElement * srcelement)
|
|
|
|
{
|
|
|
|
GstElementFactory *srcfactory;
|
|
|
|
const gchar *klass;
|
|
|
|
|
|
|
|
srcfactory = gst_element_get_factory (srcelement);
|
|
|
|
klass =
|
|
|
|
gst_element_factory_get_metadata (srcfactory, GST_ELEMENT_METADATA_KLASS);
|
|
|
|
|
|
|
|
/* Can't be a demuxer unless it has Demux in the klass name */
|
|
|
|
if (!strstr (klass, "Demux") || !strstr (klass, "Adaptive"))
|
|
|
|
return FALSE;
|
|
|
|
|
|
|
|
return TRUE;
|
|
|
|
}
|
|
|
|
|
2010-05-06 15:47:12 +00:00
|
|
|
/* Returns TRUE if the caps are compatible with the caps specified in the 'caps'
|
|
|
|
* property (which by default are the raw caps)
|
2011-01-25 16:03:23 +00:00
|
|
|
*
|
gst/playback/: New decodebin2 element.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstdecodebin2.c: (gst_decode_bin_get_type),
(_gst_boolean_accumulator), (gst_decode_bin_class_init),
(gst_decode_bin_factory_filter), (compare_ranks), (print_feature),
(gst_decode_bin_init), (gst_decode_bin_dispose),
(gst_decode_bin_finalize), (gst_decode_bin_set_property),
(gst_decode_bin_get_property), (gst_decode_bin_set_caps),
(gst_decode_bin_get_caps), (gst_decode_bin_autoplug_continue),
(gst_decode_bin_autoplug_sort), (analyze_new_pad), (connect_pad),
(connect_element), (expose_pad), (type_found),
(pad_added_group_cb), (pad_removed_group_cb),
(no_more_pads_group_cb), (pad_added_cb), (pad_removed_cb),
(no_more_pads_cb), (find_compatibles), (is_demuxer_element),
(are_raw_caps), (multi_queue_overrun_cb),
(multi_queue_underrun_cb), (gst_decode_group_new),
(get_current_group), (group_demuxer_event_probe),
(gst_decode_group_control_demuxer_pad),
(gst_decode_group_control_source_pad),
(gst_decode_group_check_if_blocked),
(gst_decode_group_check_if_drained), (gst_decode_group_expose),
(gst_decode_group_hide), (gst_decode_group_free),
(gst_decode_group_set_complete), (source_pad_blocked_cb),
(source_pad_event_probe), (gst_decode_pad_new), (add_fakesink),
(remove_fakesink), (find_sink_pad), (gst_decode_bin_change_state),
(plugin_init):
New decodebin2 element.
Closes #370092
* gst/playback/gstplay-marshal.list:
Added marshallers for new signals in decodebin2
* gst/playback/gstplaybasebin.c: (setup_subtitle), (make_decoder):
Use decodebin2 if *and only if* the USE_DECODEBIN2 environment variable
is set.
2006-11-28 14:40:39 +00:00
|
|
|
* The decodebin_lock should be taken !
|
|
|
|
*/
|
2008-11-21 00:04:48 +00:00
|
|
|
static gboolean
|
2010-05-06 15:47:12 +00:00
|
|
|
are_final_caps (GstDecodeBin * dbin, GstCaps * caps)
|
gst/playback/: New decodebin2 element.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstdecodebin2.c: (gst_decode_bin_get_type),
(_gst_boolean_accumulator), (gst_decode_bin_class_init),
(gst_decode_bin_factory_filter), (compare_ranks), (print_feature),
(gst_decode_bin_init), (gst_decode_bin_dispose),
(gst_decode_bin_finalize), (gst_decode_bin_set_property),
(gst_decode_bin_get_property), (gst_decode_bin_set_caps),
(gst_decode_bin_get_caps), (gst_decode_bin_autoplug_continue),
(gst_decode_bin_autoplug_sort), (analyze_new_pad), (connect_pad),
(connect_element), (expose_pad), (type_found),
(pad_added_group_cb), (pad_removed_group_cb),
(no_more_pads_group_cb), (pad_added_cb), (pad_removed_cb),
(no_more_pads_cb), (find_compatibles), (is_demuxer_element),
(are_raw_caps), (multi_queue_overrun_cb),
(multi_queue_underrun_cb), (gst_decode_group_new),
(get_current_group), (group_demuxer_event_probe),
(gst_decode_group_control_demuxer_pad),
(gst_decode_group_control_source_pad),
(gst_decode_group_check_if_blocked),
(gst_decode_group_check_if_drained), (gst_decode_group_expose),
(gst_decode_group_hide), (gst_decode_group_free),
(gst_decode_group_set_complete), (source_pad_blocked_cb),
(source_pad_event_probe), (gst_decode_pad_new), (add_fakesink),
(remove_fakesink), (find_sink_pad), (gst_decode_bin_change_state),
(plugin_init):
New decodebin2 element.
Closes #370092
* gst/playback/gstplay-marshal.list:
Added marshallers for new signals in decodebin2
* gst/playback/gstplaybasebin.c: (setup_subtitle), (make_decoder):
Use decodebin2 if *and only if* the USE_DECODEBIN2 environment variable
is set.
2006-11-28 14:40:39 +00:00
|
|
|
{
|
|
|
|
gboolean res;
|
|
|
|
|
|
|
|
GST_LOG_OBJECT (dbin, "Checking with caps %" GST_PTR_FORMAT, caps);
|
|
|
|
|
2008-03-24 11:36:08 +00:00
|
|
|
/* lock for getting the caps */
|
|
|
|
GST_OBJECT_LOCK (dbin);
|
2013-05-14 08:06:40 +00:00
|
|
|
res = gst_caps_is_subset (caps, dbin->caps);
|
2008-03-24 11:36:08 +00:00
|
|
|
GST_OBJECT_UNLOCK (dbin);
|
gst/playback/: New decodebin2 element.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstdecodebin2.c: (gst_decode_bin_get_type),
(_gst_boolean_accumulator), (gst_decode_bin_class_init),
(gst_decode_bin_factory_filter), (compare_ranks), (print_feature),
(gst_decode_bin_init), (gst_decode_bin_dispose),
(gst_decode_bin_finalize), (gst_decode_bin_set_property),
(gst_decode_bin_get_property), (gst_decode_bin_set_caps),
(gst_decode_bin_get_caps), (gst_decode_bin_autoplug_continue),
(gst_decode_bin_autoplug_sort), (analyze_new_pad), (connect_pad),
(connect_element), (expose_pad), (type_found),
(pad_added_group_cb), (pad_removed_group_cb),
(no_more_pads_group_cb), (pad_added_cb), (pad_removed_cb),
(no_more_pads_cb), (find_compatibles), (is_demuxer_element),
(are_raw_caps), (multi_queue_overrun_cb),
(multi_queue_underrun_cb), (gst_decode_group_new),
(get_current_group), (group_demuxer_event_probe),
(gst_decode_group_control_demuxer_pad),
(gst_decode_group_control_source_pad),
(gst_decode_group_check_if_blocked),
(gst_decode_group_check_if_drained), (gst_decode_group_expose),
(gst_decode_group_hide), (gst_decode_group_free),
(gst_decode_group_set_complete), (source_pad_blocked_cb),
(source_pad_event_probe), (gst_decode_pad_new), (add_fakesink),
(remove_fakesink), (find_sink_pad), (gst_decode_bin_change_state),
(plugin_init):
New decodebin2 element.
Closes #370092
* gst/playback/gstplay-marshal.list:
Added marshallers for new signals in decodebin2
* gst/playback/gstplaybasebin.c: (setup_subtitle), (make_decoder):
Use decodebin2 if *and only if* the USE_DECODEBIN2 environment variable
is set.
2006-11-28 14:40:39 +00:00
|
|
|
|
|
|
|
GST_LOG_OBJECT (dbin, "Caps are %sfinal caps", res ? "" : "not ");
|
|
|
|
|
|
|
|
return res;
|
|
|
|
}
|
|
|
|
|
2013-02-06 11:41:19 +00:00
|
|
|
/* gst_decode_bin_reset_buffering:
|
|
|
|
*
|
|
|
|
* Enables buffering on the last multiqueue of each group only,
|
|
|
|
* disabling the rest
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
static void
|
|
|
|
gst_decode_bin_reset_buffering (GstDecodeBin * dbin)
|
|
|
|
{
|
|
|
|
if (!dbin->use_buffering)
|
|
|
|
return;
|
|
|
|
|
|
|
|
GST_DEBUG_OBJECT (dbin, "Reseting multiqueues buffering");
|
2015-02-04 11:46:09 +00:00
|
|
|
if (dbin->decode_chain) {
|
|
|
|
CHAIN_MUTEX_LOCK (dbin->decode_chain);
|
|
|
|
gst_decode_chain_reset_buffering (dbin->decode_chain);
|
|
|
|
CHAIN_MUTEX_UNLOCK (dbin->decode_chain);
|
|
|
|
}
|
2013-02-06 11:41:19 +00:00
|
|
|
}
|
|
|
|
|
gst/playback/: New decodebin2 element.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstdecodebin2.c: (gst_decode_bin_get_type),
(_gst_boolean_accumulator), (gst_decode_bin_class_init),
(gst_decode_bin_factory_filter), (compare_ranks), (print_feature),
(gst_decode_bin_init), (gst_decode_bin_dispose),
(gst_decode_bin_finalize), (gst_decode_bin_set_property),
(gst_decode_bin_get_property), (gst_decode_bin_set_caps),
(gst_decode_bin_get_caps), (gst_decode_bin_autoplug_continue),
(gst_decode_bin_autoplug_sort), (analyze_new_pad), (connect_pad),
(connect_element), (expose_pad), (type_found),
(pad_added_group_cb), (pad_removed_group_cb),
(no_more_pads_group_cb), (pad_added_cb), (pad_removed_cb),
(no_more_pads_cb), (find_compatibles), (is_demuxer_element),
(are_raw_caps), (multi_queue_overrun_cb),
(multi_queue_underrun_cb), (gst_decode_group_new),
(get_current_group), (group_demuxer_event_probe),
(gst_decode_group_control_demuxer_pad),
(gst_decode_group_control_source_pad),
(gst_decode_group_check_if_blocked),
(gst_decode_group_check_if_drained), (gst_decode_group_expose),
(gst_decode_group_hide), (gst_decode_group_free),
(gst_decode_group_set_complete), (source_pad_blocked_cb),
(source_pad_event_probe), (gst_decode_pad_new), (add_fakesink),
(remove_fakesink), (find_sink_pad), (gst_decode_bin_change_state),
(plugin_init):
New decodebin2 element.
Closes #370092
* gst/playback/gstplay-marshal.list:
Added marshallers for new signals in decodebin2
* gst/playback/gstplaybasebin.c: (setup_subtitle), (make_decoder):
Use decodebin2 if *and only if* the USE_DECODEBIN2 environment variable
is set.
2006-11-28 14:40:39 +00:00
|
|
|
/****
|
2009-09-26 10:17:49 +00:00
|
|
|
* GstDecodeChain functions
|
gst/playback/: New decodebin2 element.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstdecodebin2.c: (gst_decode_bin_get_type),
(_gst_boolean_accumulator), (gst_decode_bin_class_init),
(gst_decode_bin_factory_filter), (compare_ranks), (print_feature),
(gst_decode_bin_init), (gst_decode_bin_dispose),
(gst_decode_bin_finalize), (gst_decode_bin_set_property),
(gst_decode_bin_get_property), (gst_decode_bin_set_caps),
(gst_decode_bin_get_caps), (gst_decode_bin_autoplug_continue),
(gst_decode_bin_autoplug_sort), (analyze_new_pad), (connect_pad),
(connect_element), (expose_pad), (type_found),
(pad_added_group_cb), (pad_removed_group_cb),
(no_more_pads_group_cb), (pad_added_cb), (pad_removed_cb),
(no_more_pads_cb), (find_compatibles), (is_demuxer_element),
(are_raw_caps), (multi_queue_overrun_cb),
(multi_queue_underrun_cb), (gst_decode_group_new),
(get_current_group), (group_demuxer_event_probe),
(gst_decode_group_control_demuxer_pad),
(gst_decode_group_control_source_pad),
(gst_decode_group_check_if_blocked),
(gst_decode_group_check_if_drained), (gst_decode_group_expose),
(gst_decode_group_hide), (gst_decode_group_free),
(gst_decode_group_set_complete), (source_pad_blocked_cb),
(source_pad_event_probe), (gst_decode_pad_new), (add_fakesink),
(remove_fakesink), (find_sink_pad), (gst_decode_bin_change_state),
(plugin_init):
New decodebin2 element.
Closes #370092
* gst/playback/gstplay-marshal.list:
Added marshallers for new signals in decodebin2
* gst/playback/gstplaybasebin.c: (setup_subtitle), (make_decoder):
Use decodebin2 if *and only if* the USE_DECODEBIN2 environment variable
is set.
2006-11-28 14:40:39 +00:00
|
|
|
****/
|
|
|
|
|
2013-02-06 11:41:19 +00:00
|
|
|
static gboolean
|
|
|
|
gst_decode_chain_reset_buffering (GstDecodeChain * chain)
|
|
|
|
{
|
|
|
|
GstDecodeGroup *group;
|
|
|
|
|
|
|
|
group = chain->active_group;
|
|
|
|
GST_LOG_OBJECT (chain->dbin, "Resetting chain %p buffering, active group: %p",
|
|
|
|
chain, group);
|
|
|
|
if (group) {
|
|
|
|
return gst_decode_group_reset_buffering (group);
|
|
|
|
}
|
|
|
|
return FALSE;
|
|
|
|
}
|
|
|
|
|
2009-09-26 10:17:49 +00:00
|
|
|
/* gst_decode_chain_get_current_group:
|
|
|
|
*
|
|
|
|
* Returns the current group of this chain, to which
|
|
|
|
* new chains should be attached or NULL if the last
|
|
|
|
* group didn't have no-more-pads.
|
|
|
|
*
|
|
|
|
* Not MT-safe: Call with parent chain lock!
|
2009-03-19 18:19:38 +00:00
|
|
|
*/
|
2009-09-26 10:17:49 +00:00
|
|
|
static GstDecodeGroup *
|
|
|
|
gst_decode_chain_get_current_group (GstDecodeChain * chain)
|
gst/playback/: New decodebin2 element.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstdecodebin2.c: (gst_decode_bin_get_type),
(_gst_boolean_accumulator), (gst_decode_bin_class_init),
(gst_decode_bin_factory_filter), (compare_ranks), (print_feature),
(gst_decode_bin_init), (gst_decode_bin_dispose),
(gst_decode_bin_finalize), (gst_decode_bin_set_property),
(gst_decode_bin_get_property), (gst_decode_bin_set_caps),
(gst_decode_bin_get_caps), (gst_decode_bin_autoplug_continue),
(gst_decode_bin_autoplug_sort), (analyze_new_pad), (connect_pad),
(connect_element), (expose_pad), (type_found),
(pad_added_group_cb), (pad_removed_group_cb),
(no_more_pads_group_cb), (pad_added_cb), (pad_removed_cb),
(no_more_pads_cb), (find_compatibles), (is_demuxer_element),
(are_raw_caps), (multi_queue_overrun_cb),
(multi_queue_underrun_cb), (gst_decode_group_new),
(get_current_group), (group_demuxer_event_probe),
(gst_decode_group_control_demuxer_pad),
(gst_decode_group_control_source_pad),
(gst_decode_group_check_if_blocked),
(gst_decode_group_check_if_drained), (gst_decode_group_expose),
(gst_decode_group_hide), (gst_decode_group_free),
(gst_decode_group_set_complete), (source_pad_blocked_cb),
(source_pad_event_probe), (gst_decode_pad_new), (add_fakesink),
(remove_fakesink), (find_sink_pad), (gst_decode_bin_change_state),
(plugin_init):
New decodebin2 element.
Closes #370092
* gst/playback/gstplay-marshal.list:
Added marshallers for new signals in decodebin2
* gst/playback/gstplaybasebin.c: (setup_subtitle), (make_decoder):
Use decodebin2 if *and only if* the USE_DECODEBIN2 environment variable
is set.
2006-11-28 14:40:39 +00:00
|
|
|
{
|
2009-09-26 10:17:49 +00:00
|
|
|
GstDecodeGroup *group;
|
gst/playback/: New decodebin2 element.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstdecodebin2.c: (gst_decode_bin_get_type),
(_gst_boolean_accumulator), (gst_decode_bin_class_init),
(gst_decode_bin_factory_filter), (compare_ranks), (print_feature),
(gst_decode_bin_init), (gst_decode_bin_dispose),
(gst_decode_bin_finalize), (gst_decode_bin_set_property),
(gst_decode_bin_get_property), (gst_decode_bin_set_caps),
(gst_decode_bin_get_caps), (gst_decode_bin_autoplug_continue),
(gst_decode_bin_autoplug_sort), (analyze_new_pad), (connect_pad),
(connect_element), (expose_pad), (type_found),
(pad_added_group_cb), (pad_removed_group_cb),
(no_more_pads_group_cb), (pad_added_cb), (pad_removed_cb),
(no_more_pads_cb), (find_compatibles), (is_demuxer_element),
(are_raw_caps), (multi_queue_overrun_cb),
(multi_queue_underrun_cb), (gst_decode_group_new),
(get_current_group), (group_demuxer_event_probe),
(gst_decode_group_control_demuxer_pad),
(gst_decode_group_control_source_pad),
(gst_decode_group_check_if_blocked),
(gst_decode_group_check_if_drained), (gst_decode_group_expose),
(gst_decode_group_hide), (gst_decode_group_free),
(gst_decode_group_set_complete), (source_pad_blocked_cb),
(source_pad_event_probe), (gst_decode_pad_new), (add_fakesink),
(remove_fakesink), (find_sink_pad), (gst_decode_bin_change_state),
(plugin_init):
New decodebin2 element.
Closes #370092
* gst/playback/gstplay-marshal.list:
Added marshallers for new signals in decodebin2
* gst/playback/gstplaybasebin.c: (setup_subtitle), (make_decoder):
Use decodebin2 if *and only if* the USE_DECODEBIN2 environment variable
is set.
2006-11-28 14:40:39 +00:00
|
|
|
|
2009-09-26 10:17:49 +00:00
|
|
|
if (!chain->next_groups && chain->active_group
|
|
|
|
&& chain->active_group->overrun && !chain->active_group->no_more_pads) {
|
|
|
|
GST_WARNING_OBJECT (chain->dbin,
|
|
|
|
"Currently active group %p is exposed"
|
|
|
|
" and wants to add a new pad without having signaled no-more-pads",
|
|
|
|
chain->active_group);
|
|
|
|
return NULL;
|
|
|
|
}
|
2009-03-19 18:19:38 +00:00
|
|
|
|
2009-09-26 10:17:49 +00:00
|
|
|
if (chain->next_groups && (group = chain->next_groups->data) && group->overrun
|
|
|
|
&& !group->no_more_pads) {
|
|
|
|
GST_WARNING_OBJECT (chain->dbin,
|
|
|
|
"Currently newest pending group %p "
|
|
|
|
"had overflow but didn't signal no-more-pads", group);
|
|
|
|
return NULL;
|
|
|
|
}
|
2009-03-19 18:19:38 +00:00
|
|
|
|
2009-09-26 10:17:49 +00:00
|
|
|
/* Now we know that we can really return something useful */
|
|
|
|
if (!chain->active_group) {
|
|
|
|
chain->active_group = group = gst_decode_group_new (chain->dbin, chain);
|
|
|
|
} else if (!chain->active_group->overrun
|
|
|
|
&& !chain->active_group->no_more_pads) {
|
|
|
|
group = chain->active_group;
|
2009-03-19 18:19:38 +00:00
|
|
|
} else {
|
2013-02-06 14:09:52 +00:00
|
|
|
GList *iter;
|
|
|
|
group = NULL;
|
|
|
|
for (iter = chain->next_groups; iter; iter = g_list_next (iter)) {
|
|
|
|
GstDecodeGroup *next_group = iter->data;
|
|
|
|
|
|
|
|
if (!next_group->overrun && !next_group->no_more_pads) {
|
|
|
|
group = next_group;
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (!group) {
|
2009-09-26 10:17:49 +00:00
|
|
|
group = gst_decode_group_new (chain->dbin, chain);
|
2013-02-01 20:50:36 +00:00
|
|
|
chain->next_groups = g_list_append (chain->next_groups, group);
|
2009-03-19 18:19:38 +00:00
|
|
|
}
|
|
|
|
|
2009-09-26 10:17:49 +00:00
|
|
|
return group;
|
gst/playback/: New decodebin2 element.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstdecodebin2.c: (gst_decode_bin_get_type),
(_gst_boolean_accumulator), (gst_decode_bin_class_init),
(gst_decode_bin_factory_filter), (compare_ranks), (print_feature),
(gst_decode_bin_init), (gst_decode_bin_dispose),
(gst_decode_bin_finalize), (gst_decode_bin_set_property),
(gst_decode_bin_get_property), (gst_decode_bin_set_caps),
(gst_decode_bin_get_caps), (gst_decode_bin_autoplug_continue),
(gst_decode_bin_autoplug_sort), (analyze_new_pad), (connect_pad),
(connect_element), (expose_pad), (type_found),
(pad_added_group_cb), (pad_removed_group_cb),
(no_more_pads_group_cb), (pad_added_cb), (pad_removed_cb),
(no_more_pads_cb), (find_compatibles), (is_demuxer_element),
(are_raw_caps), (multi_queue_overrun_cb),
(multi_queue_underrun_cb), (gst_decode_group_new),
(get_current_group), (group_demuxer_event_probe),
(gst_decode_group_control_demuxer_pad),
(gst_decode_group_control_source_pad),
(gst_decode_group_check_if_blocked),
(gst_decode_group_check_if_drained), (gst_decode_group_expose),
(gst_decode_group_hide), (gst_decode_group_free),
(gst_decode_group_set_complete), (source_pad_blocked_cb),
(source_pad_event_probe), (gst_decode_pad_new), (add_fakesink),
(remove_fakesink), (find_sink_pad), (gst_decode_bin_change_state),
(plugin_init):
New decodebin2 element.
Closes #370092
* gst/playback/gstplay-marshal.list:
Added marshallers for new signals in decodebin2
* gst/playback/gstplaybasebin.c: (setup_subtitle), (make_decoder):
Use decodebin2 if *and only if* the USE_DECODEBIN2 environment variable
is set.
2006-11-28 14:40:39 +00:00
|
|
|
}
|
|
|
|
|
2009-09-26 10:17:49 +00:00
|
|
|
static void gst_decode_group_free_internal (GstDecodeGroup * group,
|
|
|
|
gboolean hide);
|
|
|
|
|
2015-11-06 14:21:14 +00:00
|
|
|
static void
|
|
|
|
gst_decode_chain_unref (GstDecodeChain * chain)
|
|
|
|
{
|
|
|
|
if (g_atomic_int_dec_and_test (&chain->refs)) {
|
|
|
|
g_mutex_clear (&chain->lock);
|
|
|
|
g_slice_free (GstDecodeChain, chain);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
static GstDecodeChain *
|
|
|
|
gst_decode_chain_ref (GstDecodeChain * chain)
|
|
|
|
{
|
|
|
|
g_atomic_int_inc (&chain->refs);
|
|
|
|
return chain;
|
|
|
|
}
|
|
|
|
|
2009-09-26 10:17:49 +00:00
|
|
|
static void
|
|
|
|
gst_decode_chain_free_internal (GstDecodeChain * chain, gboolean hide)
|
gst/playback/: New decodebin2 element.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstdecodebin2.c: (gst_decode_bin_get_type),
(_gst_boolean_accumulator), (gst_decode_bin_class_init),
(gst_decode_bin_factory_filter), (compare_ranks), (print_feature),
(gst_decode_bin_init), (gst_decode_bin_dispose),
(gst_decode_bin_finalize), (gst_decode_bin_set_property),
(gst_decode_bin_get_property), (gst_decode_bin_set_caps),
(gst_decode_bin_get_caps), (gst_decode_bin_autoplug_continue),
(gst_decode_bin_autoplug_sort), (analyze_new_pad), (connect_pad),
(connect_element), (expose_pad), (type_found),
(pad_added_group_cb), (pad_removed_group_cb),
(no_more_pads_group_cb), (pad_added_cb), (pad_removed_cb),
(no_more_pads_cb), (find_compatibles), (is_demuxer_element),
(are_raw_caps), (multi_queue_overrun_cb),
(multi_queue_underrun_cb), (gst_decode_group_new),
(get_current_group), (group_demuxer_event_probe),
(gst_decode_group_control_demuxer_pad),
(gst_decode_group_control_source_pad),
(gst_decode_group_check_if_blocked),
(gst_decode_group_check_if_drained), (gst_decode_group_expose),
(gst_decode_group_hide), (gst_decode_group_free),
(gst_decode_group_set_complete), (source_pad_blocked_cb),
(source_pad_event_probe), (gst_decode_pad_new), (add_fakesink),
(remove_fakesink), (find_sink_pad), (gst_decode_bin_change_state),
(plugin_init):
New decodebin2 element.
Closes #370092
* gst/playback/gstplay-marshal.list:
Added marshallers for new signals in decodebin2
* gst/playback/gstplaybasebin.c: (setup_subtitle), (make_decoder):
Use decodebin2 if *and only if* the USE_DECODEBIN2 environment variable
is set.
2006-11-28 14:40:39 +00:00
|
|
|
{
|
decodebin: fix deadlock between downward state change and pad addition
If caps on a newly added pad are NULL, analyze_new_pad will try to
acquire the chain lock to add a probe to the pad so the chain can
be built later. This comes from the streaming thread, in response
to headers or other buffers causing this pad to be added, so the
stream lock is taken.
Meanwhile, another thread might be destroying the chain from a
downward state change. This will cause the chain to be freed with
the chain lock taken, and some elements are set to NULL here, which
can include the parser. This causes pad deactivation, which tries
to take the element's pad's stream lock, deadlocking.
Fix this by keeping track of which elements need setting to NULL,
and only do this after the chain lock is released. Only the chain
manipulation needs to be locked, not the elements' state changes.
https://bugzilla.gnome.org/show_bug.cgi?id=741355
2015-02-05 12:07:50 +00:00
|
|
|
GList *l, *set_to_null = NULL;
|
2009-09-26 10:17:49 +00:00
|
|
|
|
|
|
|
CHAIN_MUTEX_LOCK (chain);
|
|
|
|
|
|
|
|
GST_DEBUG_OBJECT (chain->dbin, "%s chain %p", (hide ? "Hiding" : "Freeing"),
|
|
|
|
chain);
|
gst/playback/: New decodebin2 element.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstdecodebin2.c: (gst_decode_bin_get_type),
(_gst_boolean_accumulator), (gst_decode_bin_class_init),
(gst_decode_bin_factory_filter), (compare_ranks), (print_feature),
(gst_decode_bin_init), (gst_decode_bin_dispose),
(gst_decode_bin_finalize), (gst_decode_bin_set_property),
(gst_decode_bin_get_property), (gst_decode_bin_set_caps),
(gst_decode_bin_get_caps), (gst_decode_bin_autoplug_continue),
(gst_decode_bin_autoplug_sort), (analyze_new_pad), (connect_pad),
(connect_element), (expose_pad), (type_found),
(pad_added_group_cb), (pad_removed_group_cb),
(no_more_pads_group_cb), (pad_added_cb), (pad_removed_cb),
(no_more_pads_cb), (find_compatibles), (is_demuxer_element),
(are_raw_caps), (multi_queue_overrun_cb),
(multi_queue_underrun_cb), (gst_decode_group_new),
(get_current_group), (group_demuxer_event_probe),
(gst_decode_group_control_demuxer_pad),
(gst_decode_group_control_source_pad),
(gst_decode_group_check_if_blocked),
(gst_decode_group_check_if_drained), (gst_decode_group_expose),
(gst_decode_group_hide), (gst_decode_group_free),
(gst_decode_group_set_complete), (source_pad_blocked_cb),
(source_pad_event_probe), (gst_decode_pad_new), (add_fakesink),
(remove_fakesink), (find_sink_pad), (gst_decode_bin_change_state),
(plugin_init):
New decodebin2 element.
Closes #370092
* gst/playback/gstplay-marshal.list:
Added marshallers for new signals in decodebin2
* gst/playback/gstplaybasebin.c: (setup_subtitle), (make_decoder):
Use decodebin2 if *and only if* the USE_DECODEBIN2 environment variable
is set.
2006-11-28 14:40:39 +00:00
|
|
|
|
2009-09-26 10:17:49 +00:00
|
|
|
if (chain->active_group) {
|
|
|
|
gst_decode_group_free_internal (chain->active_group, hide);
|
|
|
|
if (!hide)
|
|
|
|
chain->active_group = NULL;
|
|
|
|
}
|
|
|
|
|
|
|
|
for (l = chain->next_groups; l; l = l->next) {
|
|
|
|
gst_decode_group_free_internal ((GstDecodeGroup *) l->data, hide);
|
|
|
|
if (!hide)
|
|
|
|
l->data = NULL;
|
|
|
|
}
|
|
|
|
if (!hide) {
|
|
|
|
g_list_free (chain->next_groups);
|
|
|
|
chain->next_groups = NULL;
|
|
|
|
}
|
gst/playback/: New decodebin2 element.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstdecodebin2.c: (gst_decode_bin_get_type),
(_gst_boolean_accumulator), (gst_decode_bin_class_init),
(gst_decode_bin_factory_filter), (compare_ranks), (print_feature),
(gst_decode_bin_init), (gst_decode_bin_dispose),
(gst_decode_bin_finalize), (gst_decode_bin_set_property),
(gst_decode_bin_get_property), (gst_decode_bin_set_caps),
(gst_decode_bin_get_caps), (gst_decode_bin_autoplug_continue),
(gst_decode_bin_autoplug_sort), (analyze_new_pad), (connect_pad),
(connect_element), (expose_pad), (type_found),
(pad_added_group_cb), (pad_removed_group_cb),
(no_more_pads_group_cb), (pad_added_cb), (pad_removed_cb),
(no_more_pads_cb), (find_compatibles), (is_demuxer_element),
(are_raw_caps), (multi_queue_overrun_cb),
(multi_queue_underrun_cb), (gst_decode_group_new),
(get_current_group), (group_demuxer_event_probe),
(gst_decode_group_control_demuxer_pad),
(gst_decode_group_control_source_pad),
(gst_decode_group_check_if_blocked),
(gst_decode_group_check_if_drained), (gst_decode_group_expose),
(gst_decode_group_hide), (gst_decode_group_free),
(gst_decode_group_set_complete), (source_pad_blocked_cb),
(source_pad_event_probe), (gst_decode_pad_new), (add_fakesink),
(remove_fakesink), (find_sink_pad), (gst_decode_bin_change_state),
(plugin_init):
New decodebin2 element.
Closes #370092
* gst/playback/gstplay-marshal.list:
Added marshallers for new signals in decodebin2
* gst/playback/gstplaybasebin.c: (setup_subtitle), (make_decoder):
Use decodebin2 if *and only if* the USE_DECODEBIN2 environment variable
is set.
2006-11-28 14:40:39 +00:00
|
|
|
|
2009-09-26 10:17:49 +00:00
|
|
|
if (!hide) {
|
|
|
|
for (l = chain->old_groups; l; l = l->next) {
|
|
|
|
GstDecodeGroup *group = l->data;
|
|
|
|
|
|
|
|
gst_decode_group_free (group);
|
2007-06-05 16:05:19 +00:00
|
|
|
}
|
2009-09-26 10:17:49 +00:00
|
|
|
g_list_free (chain->old_groups);
|
|
|
|
chain->old_groups = NULL;
|
gst/playback/: New decodebin2 element.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstdecodebin2.c: (gst_decode_bin_get_type),
(_gst_boolean_accumulator), (gst_decode_bin_class_init),
(gst_decode_bin_factory_filter), (compare_ranks), (print_feature),
(gst_decode_bin_init), (gst_decode_bin_dispose),
(gst_decode_bin_finalize), (gst_decode_bin_set_property),
(gst_decode_bin_get_property), (gst_decode_bin_set_caps),
(gst_decode_bin_get_caps), (gst_decode_bin_autoplug_continue),
(gst_decode_bin_autoplug_sort), (analyze_new_pad), (connect_pad),
(connect_element), (expose_pad), (type_found),
(pad_added_group_cb), (pad_removed_group_cb),
(no_more_pads_group_cb), (pad_added_cb), (pad_removed_cb),
(no_more_pads_cb), (find_compatibles), (is_demuxer_element),
(are_raw_caps), (multi_queue_overrun_cb),
(multi_queue_underrun_cb), (gst_decode_group_new),
(get_current_group), (group_demuxer_event_probe),
(gst_decode_group_control_demuxer_pad),
(gst_decode_group_control_source_pad),
(gst_decode_group_check_if_blocked),
(gst_decode_group_check_if_drained), (gst_decode_group_expose),
(gst_decode_group_hide), (gst_decode_group_free),
(gst_decode_group_set_complete), (source_pad_blocked_cb),
(source_pad_event_probe), (gst_decode_pad_new), (add_fakesink),
(remove_fakesink), (find_sink_pad), (gst_decode_bin_change_state),
(plugin_init):
New decodebin2 element.
Closes #370092
* gst/playback/gstplay-marshal.list:
Added marshallers for new signals in decodebin2
* gst/playback/gstplaybasebin.c: (setup_subtitle), (make_decoder):
Use decodebin2 if *and only if* the USE_DECODEBIN2 environment variable
is set.
2006-11-28 14:40:39 +00:00
|
|
|
}
|
|
|
|
|
2009-09-26 10:17:49 +00:00
|
|
|
for (l = chain->pending_pads; l; l = l->next) {
|
2009-11-19 17:51:33 +00:00
|
|
|
GstPendingPad *ppad = l->data;
|
|
|
|
gst_pending_pad_free (ppad);
|
2009-09-26 10:17:49 +00:00
|
|
|
l->data = NULL;
|
|
|
|
}
|
|
|
|
g_list_free (chain->pending_pads);
|
|
|
|
chain->pending_pads = NULL;
|
gst/playback/: New decodebin2 element.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstdecodebin2.c: (gst_decode_bin_get_type),
(_gst_boolean_accumulator), (gst_decode_bin_class_init),
(gst_decode_bin_factory_filter), (compare_ranks), (print_feature),
(gst_decode_bin_init), (gst_decode_bin_dispose),
(gst_decode_bin_finalize), (gst_decode_bin_set_property),
(gst_decode_bin_get_property), (gst_decode_bin_set_caps),
(gst_decode_bin_get_caps), (gst_decode_bin_autoplug_continue),
(gst_decode_bin_autoplug_sort), (analyze_new_pad), (connect_pad),
(connect_element), (expose_pad), (type_found),
(pad_added_group_cb), (pad_removed_group_cb),
(no_more_pads_group_cb), (pad_added_cb), (pad_removed_cb),
(no_more_pads_cb), (find_compatibles), (is_demuxer_element),
(are_raw_caps), (multi_queue_overrun_cb),
(multi_queue_underrun_cb), (gst_decode_group_new),
(get_current_group), (group_demuxer_event_probe),
(gst_decode_group_control_demuxer_pad),
(gst_decode_group_control_source_pad),
(gst_decode_group_check_if_blocked),
(gst_decode_group_check_if_drained), (gst_decode_group_expose),
(gst_decode_group_hide), (gst_decode_group_free),
(gst_decode_group_set_complete), (source_pad_blocked_cb),
(source_pad_event_probe), (gst_decode_pad_new), (add_fakesink),
(remove_fakesink), (find_sink_pad), (gst_decode_bin_change_state),
(plugin_init):
New decodebin2 element.
Closes #370092
* gst/playback/gstplay-marshal.list:
Added marshallers for new signals in decodebin2
* gst/playback/gstplaybasebin.c: (setup_subtitle), (make_decoder):
Use decodebin2 if *and only if* the USE_DECODEBIN2 environment variable
is set.
2006-11-28 14:40:39 +00:00
|
|
|
|
2009-09-26 10:17:49 +00:00
|
|
|
for (l = chain->elements; l; l = l->next) {
|
2011-06-26 13:40:17 +00:00
|
|
|
GstDecodeElement *delem = l->data;
|
|
|
|
GstElement *element = delem->element;
|
gst/playback/: New decodebin2 element.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstdecodebin2.c: (gst_decode_bin_get_type),
(_gst_boolean_accumulator), (gst_decode_bin_class_init),
(gst_decode_bin_factory_filter), (compare_ranks), (print_feature),
(gst_decode_bin_init), (gst_decode_bin_dispose),
(gst_decode_bin_finalize), (gst_decode_bin_set_property),
(gst_decode_bin_get_property), (gst_decode_bin_set_caps),
(gst_decode_bin_get_caps), (gst_decode_bin_autoplug_continue),
(gst_decode_bin_autoplug_sort), (analyze_new_pad), (connect_pad),
(connect_element), (expose_pad), (type_found),
(pad_added_group_cb), (pad_removed_group_cb),
(no_more_pads_group_cb), (pad_added_cb), (pad_removed_cb),
(no_more_pads_cb), (find_compatibles), (is_demuxer_element),
(are_raw_caps), (multi_queue_overrun_cb),
(multi_queue_underrun_cb), (gst_decode_group_new),
(get_current_group), (group_demuxer_event_probe),
(gst_decode_group_control_demuxer_pad),
(gst_decode_group_control_source_pad),
(gst_decode_group_check_if_blocked),
(gst_decode_group_check_if_drained), (gst_decode_group_expose),
(gst_decode_group_hide), (gst_decode_group_free),
(gst_decode_group_set_complete), (source_pad_blocked_cb),
(source_pad_event_probe), (gst_decode_pad_new), (add_fakesink),
(remove_fakesink), (find_sink_pad), (gst_decode_bin_change_state),
(plugin_init):
New decodebin2 element.
Closes #370092
* gst/playback/gstplay-marshal.list:
Added marshallers for new signals in decodebin2
* gst/playback/gstplaybasebin.c: (setup_subtitle), (make_decoder):
Use decodebin2 if *and only if* the USE_DECODEBIN2 environment variable
is set.
2006-11-28 14:40:39 +00:00
|
|
|
|
2013-05-22 15:29:17 +00:00
|
|
|
if (delem->pad_added_id)
|
|
|
|
g_signal_handler_disconnect (element, delem->pad_added_id);
|
|
|
|
delem->pad_added_id = 0;
|
|
|
|
if (delem->pad_removed_id)
|
|
|
|
g_signal_handler_disconnect (element, delem->pad_removed_id);
|
|
|
|
delem->pad_removed_id = 0;
|
|
|
|
if (delem->no_more_pads_id)
|
|
|
|
g_signal_handler_disconnect (element, delem->no_more_pads_id);
|
|
|
|
delem->no_more_pads_id = 0;
|
2009-09-26 10:17:49 +00:00
|
|
|
|
2011-06-26 13:40:17 +00:00
|
|
|
if (delem->capsfilter) {
|
|
|
|
if (GST_OBJECT_PARENT (delem->capsfilter) ==
|
|
|
|
GST_OBJECT_CAST (chain->dbin))
|
|
|
|
gst_bin_remove (GST_BIN_CAST (chain->dbin), delem->capsfilter);
|
|
|
|
if (!hide) {
|
decodebin: fix deadlock between downward state change and pad addition
If caps on a newly added pad are NULL, analyze_new_pad will try to
acquire the chain lock to add a probe to the pad so the chain can
be built later. This comes from the streaming thread, in response
to headers or other buffers causing this pad to be added, so the
stream lock is taken.
Meanwhile, another thread might be destroying the chain from a
downward state change. This will cause the chain to be freed with
the chain lock taken, and some elements are set to NULL here, which
can include the parser. This causes pad deactivation, which tries
to take the element's pad's stream lock, deadlocking.
Fix this by keeping track of which elements need setting to NULL,
and only do this after the chain lock is released. Only the chain
manipulation needs to be locked, not the elements' state changes.
https://bugzilla.gnome.org/show_bug.cgi?id=741355
2015-02-05 12:07:50 +00:00
|
|
|
set_to_null =
|
|
|
|
g_list_append (set_to_null, gst_object_ref (delem->capsfilter));
|
2011-06-26 13:40:17 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2009-09-26 10:17:49 +00:00
|
|
|
if (GST_OBJECT_PARENT (element) == GST_OBJECT_CAST (chain->dbin))
|
|
|
|
gst_bin_remove (GST_BIN_CAST (chain->dbin), element);
|
|
|
|
if (!hide) {
|
decodebin: fix deadlock between downward state change and pad addition
If caps on a newly added pad are NULL, analyze_new_pad will try to
acquire the chain lock to add a probe to the pad so the chain can
be built later. This comes from the streaming thread, in response
to headers or other buffers causing this pad to be added, so the
stream lock is taken.
Meanwhile, another thread might be destroying the chain from a
downward state change. This will cause the chain to be freed with
the chain lock taken, and some elements are set to NULL here, which
can include the parser. This causes pad deactivation, which tries
to take the element's pad's stream lock, deadlocking.
Fix this by keeping track of which elements need setting to NULL,
and only do this after the chain lock is released. Only the chain
manipulation needs to be locked, not the elements' state changes.
https://bugzilla.gnome.org/show_bug.cgi?id=741355
2015-02-05 12:07:50 +00:00
|
|
|
set_to_null = g_list_append (set_to_null, gst_object_ref (element));
|
2009-09-26 10:17:49 +00:00
|
|
|
}
|
gst/playback/: New decodebin2 element.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstdecodebin2.c: (gst_decode_bin_get_type),
(_gst_boolean_accumulator), (gst_decode_bin_class_init),
(gst_decode_bin_factory_filter), (compare_ranks), (print_feature),
(gst_decode_bin_init), (gst_decode_bin_dispose),
(gst_decode_bin_finalize), (gst_decode_bin_set_property),
(gst_decode_bin_get_property), (gst_decode_bin_set_caps),
(gst_decode_bin_get_caps), (gst_decode_bin_autoplug_continue),
(gst_decode_bin_autoplug_sort), (analyze_new_pad), (connect_pad),
(connect_element), (expose_pad), (type_found),
(pad_added_group_cb), (pad_removed_group_cb),
(no_more_pads_group_cb), (pad_added_cb), (pad_removed_cb),
(no_more_pads_cb), (find_compatibles), (is_demuxer_element),
(are_raw_caps), (multi_queue_overrun_cb),
(multi_queue_underrun_cb), (gst_decode_group_new),
(get_current_group), (group_demuxer_event_probe),
(gst_decode_group_control_demuxer_pad),
(gst_decode_group_control_source_pad),
(gst_decode_group_check_if_blocked),
(gst_decode_group_check_if_drained), (gst_decode_group_expose),
(gst_decode_group_hide), (gst_decode_group_free),
(gst_decode_group_set_complete), (source_pad_blocked_cb),
(source_pad_event_probe), (gst_decode_pad_new), (add_fakesink),
(remove_fakesink), (find_sink_pad), (gst_decode_bin_change_state),
(plugin_init):
New decodebin2 element.
Closes #370092
* gst/playback/gstplay-marshal.list:
Added marshallers for new signals in decodebin2
* gst/playback/gstplaybasebin.c: (setup_subtitle), (make_decoder):
Use decodebin2 if *and only if* the USE_DECODEBIN2 environment variable
is set.
2006-11-28 14:40:39 +00:00
|
|
|
|
2009-11-06 14:12:06 +00:00
|
|
|
SUBTITLE_LOCK (chain->dbin);
|
2009-09-26 10:17:49 +00:00
|
|
|
/* remove possible subtitle element */
|
|
|
|
chain->dbin->subtitles = g_list_remove (chain->dbin->subtitles, element);
|
2009-11-06 14:12:06 +00:00
|
|
|
SUBTITLE_UNLOCK (chain->dbin);
|
2007-01-22 17:37:38 +00:00
|
|
|
|
2009-09-26 10:17:49 +00:00
|
|
|
if (!hide) {
|
2011-06-26 13:40:17 +00:00
|
|
|
if (delem->capsfilter) {
|
|
|
|
gst_object_unref (delem->capsfilter);
|
|
|
|
delem->capsfilter = NULL;
|
|
|
|
}
|
|
|
|
|
2009-09-26 10:17:49 +00:00
|
|
|
gst_object_unref (element);
|
|
|
|
l->data = NULL;
|
2011-06-26 13:40:17 +00:00
|
|
|
|
|
|
|
g_slice_free (GstDecodeElement, delem);
|
gst/playback/: New decodebin2 element.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstdecodebin2.c: (gst_decode_bin_get_type),
(_gst_boolean_accumulator), (gst_decode_bin_class_init),
(gst_decode_bin_factory_filter), (compare_ranks), (print_feature),
(gst_decode_bin_init), (gst_decode_bin_dispose),
(gst_decode_bin_finalize), (gst_decode_bin_set_property),
(gst_decode_bin_get_property), (gst_decode_bin_set_caps),
(gst_decode_bin_get_caps), (gst_decode_bin_autoplug_continue),
(gst_decode_bin_autoplug_sort), (analyze_new_pad), (connect_pad),
(connect_element), (expose_pad), (type_found),
(pad_added_group_cb), (pad_removed_group_cb),
(no_more_pads_group_cb), (pad_added_cb), (pad_removed_cb),
(no_more_pads_cb), (find_compatibles), (is_demuxer_element),
(are_raw_caps), (multi_queue_overrun_cb),
(multi_queue_underrun_cb), (gst_decode_group_new),
(get_current_group), (group_demuxer_event_probe),
(gst_decode_group_control_demuxer_pad),
(gst_decode_group_control_source_pad),
(gst_decode_group_check_if_blocked),
(gst_decode_group_check_if_drained), (gst_decode_group_expose),
(gst_decode_group_hide), (gst_decode_group_free),
(gst_decode_group_set_complete), (source_pad_blocked_cb),
(source_pad_event_probe), (gst_decode_pad_new), (add_fakesink),
(remove_fakesink), (find_sink_pad), (gst_decode_bin_change_state),
(plugin_init):
New decodebin2 element.
Closes #370092
* gst/playback/gstplay-marshal.list:
Added marshallers for new signals in decodebin2
* gst/playback/gstplaybasebin.c: (setup_subtitle), (make_decoder):
Use decodebin2 if *and only if* the USE_DECODEBIN2 environment variable
is set.
2006-11-28 14:40:39 +00:00
|
|
|
}
|
|
|
|
}
|
2009-09-26 10:17:49 +00:00
|
|
|
if (!hide) {
|
|
|
|
g_list_free (chain->elements);
|
|
|
|
chain->elements = NULL;
|
2009-02-25 09:05:38 +00:00
|
|
|
}
|
gst/playback/: New decodebin2 element.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstdecodebin2.c: (gst_decode_bin_get_type),
(_gst_boolean_accumulator), (gst_decode_bin_class_init),
(gst_decode_bin_factory_filter), (compare_ranks), (print_feature),
(gst_decode_bin_init), (gst_decode_bin_dispose),
(gst_decode_bin_finalize), (gst_decode_bin_set_property),
(gst_decode_bin_get_property), (gst_decode_bin_set_caps),
(gst_decode_bin_get_caps), (gst_decode_bin_autoplug_continue),
(gst_decode_bin_autoplug_sort), (analyze_new_pad), (connect_pad),
(connect_element), (expose_pad), (type_found),
(pad_added_group_cb), (pad_removed_group_cb),
(no_more_pads_group_cb), (pad_added_cb), (pad_removed_cb),
(no_more_pads_cb), (find_compatibles), (is_demuxer_element),
(are_raw_caps), (multi_queue_overrun_cb),
(multi_queue_underrun_cb), (gst_decode_group_new),
(get_current_group), (group_demuxer_event_probe),
(gst_decode_group_control_demuxer_pad),
(gst_decode_group_control_source_pad),
(gst_decode_group_check_if_blocked),
(gst_decode_group_check_if_drained), (gst_decode_group_expose),
(gst_decode_group_hide), (gst_decode_group_free),
(gst_decode_group_set_complete), (source_pad_blocked_cb),
(source_pad_event_probe), (gst_decode_pad_new), (add_fakesink),
(remove_fakesink), (find_sink_pad), (gst_decode_bin_change_state),
(plugin_init):
New decodebin2 element.
Closes #370092
* gst/playback/gstplay-marshal.list:
Added marshallers for new signals in decodebin2
* gst/playback/gstplaybasebin.c: (setup_subtitle), (make_decoder):
Use decodebin2 if *and only if* the USE_DECODEBIN2 environment variable
is set.
2006-11-28 14:40:39 +00:00
|
|
|
|
2009-09-26 10:17:49 +00:00
|
|
|
if (chain->endpad) {
|
2010-12-11 16:14:36 +00:00
|
|
|
if (chain->endpad->exposed) {
|
2015-12-16 16:07:54 +00:00
|
|
|
gst_element_remove_pad (GST_ELEMENT_CAST (chain->dbin),
|
|
|
|
GST_PAD_CAST (chain->endpad));
|
2010-12-11 16:14:36 +00:00
|
|
|
}
|
gst/playback/: New decodebin2 element.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstdecodebin2.c: (gst_decode_bin_get_type),
(_gst_boolean_accumulator), (gst_decode_bin_class_init),
(gst_decode_bin_factory_filter), (compare_ranks), (print_feature),
(gst_decode_bin_init), (gst_decode_bin_dispose),
(gst_decode_bin_finalize), (gst_decode_bin_set_property),
(gst_decode_bin_get_property), (gst_decode_bin_set_caps),
(gst_decode_bin_get_caps), (gst_decode_bin_autoplug_continue),
(gst_decode_bin_autoplug_sort), (analyze_new_pad), (connect_pad),
(connect_element), (expose_pad), (type_found),
(pad_added_group_cb), (pad_removed_group_cb),
(no_more_pads_group_cb), (pad_added_cb), (pad_removed_cb),
(no_more_pads_cb), (find_compatibles), (is_demuxer_element),
(are_raw_caps), (multi_queue_overrun_cb),
(multi_queue_underrun_cb), (gst_decode_group_new),
(get_current_group), (group_demuxer_event_probe),
(gst_decode_group_control_demuxer_pad),
(gst_decode_group_control_source_pad),
(gst_decode_group_check_if_blocked),
(gst_decode_group_check_if_drained), (gst_decode_group_expose),
(gst_decode_group_hide), (gst_decode_group_free),
(gst_decode_group_set_complete), (source_pad_blocked_cb),
(source_pad_event_probe), (gst_decode_pad_new), (add_fakesink),
(remove_fakesink), (find_sink_pad), (gst_decode_bin_change_state),
(plugin_init):
New decodebin2 element.
Closes #370092
* gst/playback/gstplay-marshal.list:
Added marshallers for new signals in decodebin2
* gst/playback/gstplaybasebin.c: (setup_subtitle), (make_decoder):
Use decodebin2 if *and only if* the USE_DECODEBIN2 environment variable
is set.
2006-11-28 14:40:39 +00:00
|
|
|
|
2013-11-29 16:26:13 +00:00
|
|
|
decode_pad_set_target (chain->endpad, NULL);
|
2009-09-26 10:17:49 +00:00
|
|
|
chain->endpad->exposed = FALSE;
|
|
|
|
if (!hide) {
|
|
|
|
gst_object_unref (chain->endpad);
|
|
|
|
chain->endpad = NULL;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2013-03-29 17:27:03 +00:00
|
|
|
if (!hide && chain->current_pad) {
|
|
|
|
gst_object_unref (chain->current_pad);
|
|
|
|
chain->current_pad = NULL;
|
|
|
|
}
|
|
|
|
|
2009-10-15 09:38:14 +00:00
|
|
|
if (chain->pad) {
|
|
|
|
gst_object_unref (chain->pad);
|
|
|
|
chain->pad = NULL;
|
|
|
|
}
|
|
|
|
|
2009-10-15 11:01:01 +00:00
|
|
|
if (chain->endcaps) {
|
|
|
|
gst_caps_unref (chain->endcaps);
|
|
|
|
chain->endcaps = NULL;
|
|
|
|
}
|
2014-08-25 17:59:40 +00:00
|
|
|
g_free (chain->deadend_details);
|
|
|
|
chain->deadend_details = NULL;
|
2009-10-15 11:01:01 +00:00
|
|
|
|
2009-12-23 20:24:48 +00:00
|
|
|
GST_DEBUG_OBJECT (chain->dbin, "%s chain %p", (hide ? "Hidden" : "Freed"),
|
2009-09-26 10:17:49 +00:00
|
|
|
chain);
|
|
|
|
CHAIN_MUTEX_UNLOCK (chain);
|
decodebin: fix deadlock between downward state change and pad addition
If caps on a newly added pad are NULL, analyze_new_pad will try to
acquire the chain lock to add a probe to the pad so the chain can
be built later. This comes from the streaming thread, in response
to headers or other buffers causing this pad to be added, so the
stream lock is taken.
Meanwhile, another thread might be destroying the chain from a
downward state change. This will cause the chain to be freed with
the chain lock taken, and some elements are set to NULL here, which
can include the parser. This causes pad deactivation, which tries
to take the element's pad's stream lock, deadlocking.
Fix this by keeping track of which elements need setting to NULL,
and only do this after the chain lock is released. Only the chain
manipulation needs to be locked, not the elements' state changes.
https://bugzilla.gnome.org/show_bug.cgi?id=741355
2015-02-05 12:07:50 +00:00
|
|
|
|
|
|
|
while (set_to_null) {
|
|
|
|
GstElement *element = set_to_null->data;
|
|
|
|
set_to_null = g_list_delete_link (set_to_null, set_to_null);
|
|
|
|
gst_element_set_state (element, GST_STATE_NULL);
|
|
|
|
gst_object_unref (element);
|
|
|
|
}
|
|
|
|
|
2015-11-06 14:21:14 +00:00
|
|
|
if (!hide)
|
|
|
|
gst_decode_chain_unref (chain);
|
gst/playback/: New decodebin2 element.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstdecodebin2.c: (gst_decode_bin_get_type),
(_gst_boolean_accumulator), (gst_decode_bin_class_init),
(gst_decode_bin_factory_filter), (compare_ranks), (print_feature),
(gst_decode_bin_init), (gst_decode_bin_dispose),
(gst_decode_bin_finalize), (gst_decode_bin_set_property),
(gst_decode_bin_get_property), (gst_decode_bin_set_caps),
(gst_decode_bin_get_caps), (gst_decode_bin_autoplug_continue),
(gst_decode_bin_autoplug_sort), (analyze_new_pad), (connect_pad),
(connect_element), (expose_pad), (type_found),
(pad_added_group_cb), (pad_removed_group_cb),
(no_more_pads_group_cb), (pad_added_cb), (pad_removed_cb),
(no_more_pads_cb), (find_compatibles), (is_demuxer_element),
(are_raw_caps), (multi_queue_overrun_cb),
(multi_queue_underrun_cb), (gst_decode_group_new),
(get_current_group), (group_demuxer_event_probe),
(gst_decode_group_control_demuxer_pad),
(gst_decode_group_control_source_pad),
(gst_decode_group_check_if_blocked),
(gst_decode_group_check_if_drained), (gst_decode_group_expose),
(gst_decode_group_hide), (gst_decode_group_free),
(gst_decode_group_set_complete), (source_pad_blocked_cb),
(source_pad_event_probe), (gst_decode_pad_new), (add_fakesink),
(remove_fakesink), (find_sink_pad), (gst_decode_bin_change_state),
(plugin_init):
New decodebin2 element.
Closes #370092
* gst/playback/gstplay-marshal.list:
Added marshallers for new signals in decodebin2
* gst/playback/gstplaybasebin.c: (setup_subtitle), (make_decoder):
Use decodebin2 if *and only if* the USE_DECODEBIN2 environment variable
is set.
2006-11-28 14:40:39 +00:00
|
|
|
}
|
|
|
|
|
2009-09-26 10:17:49 +00:00
|
|
|
/* gst_decode_chain_free:
|
gst/playback/: New decodebin2 element.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstdecodebin2.c: (gst_decode_bin_get_type),
(_gst_boolean_accumulator), (gst_decode_bin_class_init),
(gst_decode_bin_factory_filter), (compare_ranks), (print_feature),
(gst_decode_bin_init), (gst_decode_bin_dispose),
(gst_decode_bin_finalize), (gst_decode_bin_set_property),
(gst_decode_bin_get_property), (gst_decode_bin_set_caps),
(gst_decode_bin_get_caps), (gst_decode_bin_autoplug_continue),
(gst_decode_bin_autoplug_sort), (analyze_new_pad), (connect_pad),
(connect_element), (expose_pad), (type_found),
(pad_added_group_cb), (pad_removed_group_cb),
(no_more_pads_group_cb), (pad_added_cb), (pad_removed_cb),
(no_more_pads_cb), (find_compatibles), (is_demuxer_element),
(are_raw_caps), (multi_queue_overrun_cb),
(multi_queue_underrun_cb), (gst_decode_group_new),
(get_current_group), (group_demuxer_event_probe),
(gst_decode_group_control_demuxer_pad),
(gst_decode_group_control_source_pad),
(gst_decode_group_check_if_blocked),
(gst_decode_group_check_if_drained), (gst_decode_group_expose),
(gst_decode_group_hide), (gst_decode_group_free),
(gst_decode_group_set_complete), (source_pad_blocked_cb),
(source_pad_event_probe), (gst_decode_pad_new), (add_fakesink),
(remove_fakesink), (find_sink_pad), (gst_decode_bin_change_state),
(plugin_init):
New decodebin2 element.
Closes #370092
* gst/playback/gstplay-marshal.list:
Added marshallers for new signals in decodebin2
* gst/playback/gstplaybasebin.c: (setup_subtitle), (make_decoder):
Use decodebin2 if *and only if* the USE_DECODEBIN2 environment variable
is set.
2006-11-28 14:40:39 +00:00
|
|
|
*
|
2009-09-26 10:17:49 +00:00
|
|
|
* Completely frees and removes the chain and all
|
2011-06-14 22:51:29 +00:00
|
|
|
* child groups from decodebin.
|
gst/playback/: New decodebin2 element.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstdecodebin2.c: (gst_decode_bin_get_type),
(_gst_boolean_accumulator), (gst_decode_bin_class_init),
(gst_decode_bin_factory_filter), (compare_ranks), (print_feature),
(gst_decode_bin_init), (gst_decode_bin_dispose),
(gst_decode_bin_finalize), (gst_decode_bin_set_property),
(gst_decode_bin_get_property), (gst_decode_bin_set_caps),
(gst_decode_bin_get_caps), (gst_decode_bin_autoplug_continue),
(gst_decode_bin_autoplug_sort), (analyze_new_pad), (connect_pad),
(connect_element), (expose_pad), (type_found),
(pad_added_group_cb), (pad_removed_group_cb),
(no_more_pads_group_cb), (pad_added_cb), (pad_removed_cb),
(no_more_pads_cb), (find_compatibles), (is_demuxer_element),
(are_raw_caps), (multi_queue_overrun_cb),
(multi_queue_underrun_cb), (gst_decode_group_new),
(get_current_group), (group_demuxer_event_probe),
(gst_decode_group_control_demuxer_pad),
(gst_decode_group_control_source_pad),
(gst_decode_group_check_if_blocked),
(gst_decode_group_check_if_drained), (gst_decode_group_expose),
(gst_decode_group_hide), (gst_decode_group_free),
(gst_decode_group_set_complete), (source_pad_blocked_cb),
(source_pad_event_probe), (gst_decode_pad_new), (add_fakesink),
(remove_fakesink), (find_sink_pad), (gst_decode_bin_change_state),
(plugin_init):
New decodebin2 element.
Closes #370092
* gst/playback/gstplay-marshal.list:
Added marshallers for new signals in decodebin2
* gst/playback/gstplaybasebin.c: (setup_subtitle), (make_decoder):
Use decodebin2 if *and only if* the USE_DECODEBIN2 environment variable
is set.
2006-11-28 14:40:39 +00:00
|
|
|
*
|
2009-09-26 10:17:49 +00:00
|
|
|
* MT-safe, don't hold the chain lock or any child chain's lock
|
|
|
|
* when calling this!
|
gst/playback/: New decodebin2 element.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstdecodebin2.c: (gst_decode_bin_get_type),
(_gst_boolean_accumulator), (gst_decode_bin_class_init),
(gst_decode_bin_factory_filter), (compare_ranks), (print_feature),
(gst_decode_bin_init), (gst_decode_bin_dispose),
(gst_decode_bin_finalize), (gst_decode_bin_set_property),
(gst_decode_bin_get_property), (gst_decode_bin_set_caps),
(gst_decode_bin_get_caps), (gst_decode_bin_autoplug_continue),
(gst_decode_bin_autoplug_sort), (analyze_new_pad), (connect_pad),
(connect_element), (expose_pad), (type_found),
(pad_added_group_cb), (pad_removed_group_cb),
(no_more_pads_group_cb), (pad_added_cb), (pad_removed_cb),
(no_more_pads_cb), (find_compatibles), (is_demuxer_element),
(are_raw_caps), (multi_queue_overrun_cb),
(multi_queue_underrun_cb), (gst_decode_group_new),
(get_current_group), (group_demuxer_event_probe),
(gst_decode_group_control_demuxer_pad),
(gst_decode_group_control_source_pad),
(gst_decode_group_check_if_blocked),
(gst_decode_group_check_if_drained), (gst_decode_group_expose),
(gst_decode_group_hide), (gst_decode_group_free),
(gst_decode_group_set_complete), (source_pad_blocked_cb),
(source_pad_event_probe), (gst_decode_pad_new), (add_fakesink),
(remove_fakesink), (find_sink_pad), (gst_decode_bin_change_state),
(plugin_init):
New decodebin2 element.
Closes #370092
* gst/playback/gstplay-marshal.list:
Added marshallers for new signals in decodebin2
* gst/playback/gstplaybasebin.c: (setup_subtitle), (make_decoder):
Use decodebin2 if *and only if* the USE_DECODEBIN2 environment variable
is set.
2006-11-28 14:40:39 +00:00
|
|
|
*/
|
2009-09-26 10:17:49 +00:00
|
|
|
static void
|
|
|
|
gst_decode_chain_free (GstDecodeChain * chain)
|
gst/playback/: New decodebin2 element.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstdecodebin2.c: (gst_decode_bin_get_type),
(_gst_boolean_accumulator), (gst_decode_bin_class_init),
(gst_decode_bin_factory_filter), (compare_ranks), (print_feature),
(gst_decode_bin_init), (gst_decode_bin_dispose),
(gst_decode_bin_finalize), (gst_decode_bin_set_property),
(gst_decode_bin_get_property), (gst_decode_bin_set_caps),
(gst_decode_bin_get_caps), (gst_decode_bin_autoplug_continue),
(gst_decode_bin_autoplug_sort), (analyze_new_pad), (connect_pad),
(connect_element), (expose_pad), (type_found),
(pad_added_group_cb), (pad_removed_group_cb),
(no_more_pads_group_cb), (pad_added_cb), (pad_removed_cb),
(no_more_pads_cb), (find_compatibles), (is_demuxer_element),
(are_raw_caps), (multi_queue_overrun_cb),
(multi_queue_underrun_cb), (gst_decode_group_new),
(get_current_group), (group_demuxer_event_probe),
(gst_decode_group_control_demuxer_pad),
(gst_decode_group_control_source_pad),
(gst_decode_group_check_if_blocked),
(gst_decode_group_check_if_drained), (gst_decode_group_expose),
(gst_decode_group_hide), (gst_decode_group_free),
(gst_decode_group_set_complete), (source_pad_blocked_cb),
(source_pad_event_probe), (gst_decode_pad_new), (add_fakesink),
(remove_fakesink), (find_sink_pad), (gst_decode_bin_change_state),
(plugin_init):
New decodebin2 element.
Closes #370092
* gst/playback/gstplay-marshal.list:
Added marshallers for new signals in decodebin2
* gst/playback/gstplaybasebin.c: (setup_subtitle), (make_decoder):
Use decodebin2 if *and only if* the USE_DECODEBIN2 environment variable
is set.
2006-11-28 14:40:39 +00:00
|
|
|
{
|
2009-09-26 10:17:49 +00:00
|
|
|
gst_decode_chain_free_internal (chain, FALSE);
|
|
|
|
}
|
gst/playback/: New decodebin2 element.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstdecodebin2.c: (gst_decode_bin_get_type),
(_gst_boolean_accumulator), (gst_decode_bin_class_init),
(gst_decode_bin_factory_filter), (compare_ranks), (print_feature),
(gst_decode_bin_init), (gst_decode_bin_dispose),
(gst_decode_bin_finalize), (gst_decode_bin_set_property),
(gst_decode_bin_get_property), (gst_decode_bin_set_caps),
(gst_decode_bin_get_caps), (gst_decode_bin_autoplug_continue),
(gst_decode_bin_autoplug_sort), (analyze_new_pad), (connect_pad),
(connect_element), (expose_pad), (type_found),
(pad_added_group_cb), (pad_removed_group_cb),
(no_more_pads_group_cb), (pad_added_cb), (pad_removed_cb),
(no_more_pads_cb), (find_compatibles), (is_demuxer_element),
(are_raw_caps), (multi_queue_overrun_cb),
(multi_queue_underrun_cb), (gst_decode_group_new),
(get_current_group), (group_demuxer_event_probe),
(gst_decode_group_control_demuxer_pad),
(gst_decode_group_control_source_pad),
(gst_decode_group_check_if_blocked),
(gst_decode_group_check_if_drained), (gst_decode_group_expose),
(gst_decode_group_hide), (gst_decode_group_free),
(gst_decode_group_set_complete), (source_pad_blocked_cb),
(source_pad_event_probe), (gst_decode_pad_new), (add_fakesink),
(remove_fakesink), (find_sink_pad), (gst_decode_bin_change_state),
(plugin_init):
New decodebin2 element.
Closes #370092
* gst/playback/gstplay-marshal.list:
Added marshallers for new signals in decodebin2
* gst/playback/gstplaybasebin.c: (setup_subtitle), (make_decoder):
Use decodebin2 if *and only if* the USE_DECODEBIN2 environment variable
is set.
2006-11-28 14:40:39 +00:00
|
|
|
|
2009-09-26 10:17:49 +00:00
|
|
|
/* gst_decode_chain_new:
|
|
|
|
*
|
|
|
|
* Creates a new decode chain and initializes it.
|
|
|
|
*
|
|
|
|
* It's up to the caller to add it to the list of child chains of
|
|
|
|
* a group!
|
|
|
|
*/
|
|
|
|
static GstDecodeChain *
|
2009-10-15 09:38:14 +00:00
|
|
|
gst_decode_chain_new (GstDecodeBin * dbin, GstDecodeGroup * parent,
|
|
|
|
GstPad * pad)
|
2009-09-26 10:17:49 +00:00
|
|
|
{
|
|
|
|
GstDecodeChain *chain = g_slice_new0 (GstDecodeChain);
|
2009-04-14 09:34:49 +00:00
|
|
|
|
2009-09-26 10:17:49 +00:00
|
|
|
GST_DEBUG_OBJECT (dbin, "Creating new chain %p with parent group %p", chain,
|
|
|
|
parent);
|
gst/playback/: New decodebin2 element.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstdecodebin2.c: (gst_decode_bin_get_type),
(_gst_boolean_accumulator), (gst_decode_bin_class_init),
(gst_decode_bin_factory_filter), (compare_ranks), (print_feature),
(gst_decode_bin_init), (gst_decode_bin_dispose),
(gst_decode_bin_finalize), (gst_decode_bin_set_property),
(gst_decode_bin_get_property), (gst_decode_bin_set_caps),
(gst_decode_bin_get_caps), (gst_decode_bin_autoplug_continue),
(gst_decode_bin_autoplug_sort), (analyze_new_pad), (connect_pad),
(connect_element), (expose_pad), (type_found),
(pad_added_group_cb), (pad_removed_group_cb),
(no_more_pads_group_cb), (pad_added_cb), (pad_removed_cb),
(no_more_pads_cb), (find_compatibles), (is_demuxer_element),
(are_raw_caps), (multi_queue_overrun_cb),
(multi_queue_underrun_cb), (gst_decode_group_new),
(get_current_group), (group_demuxer_event_probe),
(gst_decode_group_control_demuxer_pad),
(gst_decode_group_control_source_pad),
(gst_decode_group_check_if_blocked),
(gst_decode_group_check_if_drained), (gst_decode_group_expose),
(gst_decode_group_hide), (gst_decode_group_free),
(gst_decode_group_set_complete), (source_pad_blocked_cb),
(source_pad_event_probe), (gst_decode_pad_new), (add_fakesink),
(remove_fakesink), (find_sink_pad), (gst_decode_bin_change_state),
(plugin_init):
New decodebin2 element.
Closes #370092
* gst/playback/gstplay-marshal.list:
Added marshallers for new signals in decodebin2
* gst/playback/gstplaybasebin.c: (setup_subtitle), (make_decoder):
Use decodebin2 if *and only if* the USE_DECODEBIN2 environment variable
is set.
2006-11-28 14:40:39 +00:00
|
|
|
|
2009-09-26 10:17:49 +00:00
|
|
|
chain->dbin = dbin;
|
|
|
|
chain->parent = parent;
|
2015-11-06 14:21:14 +00:00
|
|
|
chain->refs = 1;
|
2013-02-07 09:49:33 +00:00
|
|
|
g_mutex_init (&chain->lock);
|
2009-10-15 09:38:14 +00:00
|
|
|
chain->pad = gst_object_ref (pad);
|
gst/playback/: New decodebin2 element.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstdecodebin2.c: (gst_decode_bin_get_type),
(_gst_boolean_accumulator), (gst_decode_bin_class_init),
(gst_decode_bin_factory_filter), (compare_ranks), (print_feature),
(gst_decode_bin_init), (gst_decode_bin_dispose),
(gst_decode_bin_finalize), (gst_decode_bin_set_property),
(gst_decode_bin_get_property), (gst_decode_bin_set_caps),
(gst_decode_bin_get_caps), (gst_decode_bin_autoplug_continue),
(gst_decode_bin_autoplug_sort), (analyze_new_pad), (connect_pad),
(connect_element), (expose_pad), (type_found),
(pad_added_group_cb), (pad_removed_group_cb),
(no_more_pads_group_cb), (pad_added_cb), (pad_removed_cb),
(no_more_pads_cb), (find_compatibles), (is_demuxer_element),
(are_raw_caps), (multi_queue_overrun_cb),
(multi_queue_underrun_cb), (gst_decode_group_new),
(get_current_group), (group_demuxer_event_probe),
(gst_decode_group_control_demuxer_pad),
(gst_decode_group_control_source_pad),
(gst_decode_group_check_if_blocked),
(gst_decode_group_check_if_drained), (gst_decode_group_expose),
(gst_decode_group_hide), (gst_decode_group_free),
(gst_decode_group_set_complete), (source_pad_blocked_cb),
(source_pad_event_probe), (gst_decode_pad_new), (add_fakesink),
(remove_fakesink), (find_sink_pad), (gst_decode_bin_change_state),
(plugin_init):
New decodebin2 element.
Closes #370092
* gst/playback/gstplay-marshal.list:
Added marshallers for new signals in decodebin2
* gst/playback/gstplaybasebin.c: (setup_subtitle), (make_decoder):
Use decodebin2 if *and only if* the USE_DECODEBIN2 environment variable
is set.
2006-11-28 14:40:39 +00:00
|
|
|
|
2009-09-26 10:17:49 +00:00
|
|
|
return chain;
|
|
|
|
}
|
gst/playback/: New decodebin2 element.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstdecodebin2.c: (gst_decode_bin_get_type),
(_gst_boolean_accumulator), (gst_decode_bin_class_init),
(gst_decode_bin_factory_filter), (compare_ranks), (print_feature),
(gst_decode_bin_init), (gst_decode_bin_dispose),
(gst_decode_bin_finalize), (gst_decode_bin_set_property),
(gst_decode_bin_get_property), (gst_decode_bin_set_caps),
(gst_decode_bin_get_caps), (gst_decode_bin_autoplug_continue),
(gst_decode_bin_autoplug_sort), (analyze_new_pad), (connect_pad),
(connect_element), (expose_pad), (type_found),
(pad_added_group_cb), (pad_removed_group_cb),
(no_more_pads_group_cb), (pad_added_cb), (pad_removed_cb),
(no_more_pads_cb), (find_compatibles), (is_demuxer_element),
(are_raw_caps), (multi_queue_overrun_cb),
(multi_queue_underrun_cb), (gst_decode_group_new),
(get_current_group), (group_demuxer_event_probe),
(gst_decode_group_control_demuxer_pad),
(gst_decode_group_control_source_pad),
(gst_decode_group_check_if_blocked),
(gst_decode_group_check_if_drained), (gst_decode_group_expose),
(gst_decode_group_hide), (gst_decode_group_free),
(gst_decode_group_set_complete), (source_pad_blocked_cb),
(source_pad_event_probe), (gst_decode_pad_new), (add_fakesink),
(remove_fakesink), (find_sink_pad), (gst_decode_bin_change_state),
(plugin_init):
New decodebin2 element.
Closes #370092
* gst/playback/gstplay-marshal.list:
Added marshallers for new signals in decodebin2
* gst/playback/gstplaybasebin.c: (setup_subtitle), (make_decoder):
Use decodebin2 if *and only if* the USE_DECODEBIN2 environment variable
is set.
2006-11-28 14:40:39 +00:00
|
|
|
|
2009-09-26 10:17:49 +00:00
|
|
|
/****
|
|
|
|
* GstDecodeGroup functions
|
|
|
|
****/
|
gst/playback/: New decodebin2 element.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstdecodebin2.c: (gst_decode_bin_get_type),
(_gst_boolean_accumulator), (gst_decode_bin_class_init),
(gst_decode_bin_factory_filter), (compare_ranks), (print_feature),
(gst_decode_bin_init), (gst_decode_bin_dispose),
(gst_decode_bin_finalize), (gst_decode_bin_set_property),
(gst_decode_bin_get_property), (gst_decode_bin_set_caps),
(gst_decode_bin_get_caps), (gst_decode_bin_autoplug_continue),
(gst_decode_bin_autoplug_sort), (analyze_new_pad), (connect_pad),
(connect_element), (expose_pad), (type_found),
(pad_added_group_cb), (pad_removed_group_cb),
(no_more_pads_group_cb), (pad_added_cb), (pad_removed_cb),
(no_more_pads_cb), (find_compatibles), (is_demuxer_element),
(are_raw_caps), (multi_queue_overrun_cb),
(multi_queue_underrun_cb), (gst_decode_group_new),
(get_current_group), (group_demuxer_event_probe),
(gst_decode_group_control_demuxer_pad),
(gst_decode_group_control_source_pad),
(gst_decode_group_check_if_blocked),
(gst_decode_group_check_if_drained), (gst_decode_group_expose),
(gst_decode_group_hide), (gst_decode_group_free),
(gst_decode_group_set_complete), (source_pad_blocked_cb),
(source_pad_event_probe), (gst_decode_pad_new), (add_fakesink),
(remove_fakesink), (find_sink_pad), (gst_decode_bin_change_state),
(plugin_init):
New decodebin2 element.
Closes #370092
* gst/playback/gstplay-marshal.list:
Added marshallers for new signals in decodebin2
* gst/playback/gstplaybasebin.c: (setup_subtitle), (make_decoder):
Use decodebin2 if *and only if* the USE_DECODEBIN2 environment variable
is set.
2006-11-28 14:40:39 +00:00
|
|
|
|
2009-09-26 10:17:49 +00:00
|
|
|
/* The overrun callback is used to expose groups that have not yet had their
|
|
|
|
* no_more_pads called while the (large) multiqueue overflowed. When this
|
|
|
|
* happens we must assume that the no_more_pads will not arrive anymore and we
|
2011-01-25 16:03:23 +00:00
|
|
|
* must expose the pads that we have.
|
2009-09-26 10:17:49 +00:00
|
|
|
*/
|
|
|
|
static void
|
|
|
|
multi_queue_overrun_cb (GstElement * queue, GstDecodeGroup * group)
|
|
|
|
{
|
|
|
|
GstDecodeBin *dbin;
|
2007-09-10 12:05:34 +00:00
|
|
|
|
2009-09-26 10:17:49 +00:00
|
|
|
dbin = group->dbin;
|
gst/playback/: New decodebin2 element.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstdecodebin2.c: (gst_decode_bin_get_type),
(_gst_boolean_accumulator), (gst_decode_bin_class_init),
(gst_decode_bin_factory_filter), (compare_ranks), (print_feature),
(gst_decode_bin_init), (gst_decode_bin_dispose),
(gst_decode_bin_finalize), (gst_decode_bin_set_property),
(gst_decode_bin_get_property), (gst_decode_bin_set_caps),
(gst_decode_bin_get_caps), (gst_decode_bin_autoplug_continue),
(gst_decode_bin_autoplug_sort), (analyze_new_pad), (connect_pad),
(connect_element), (expose_pad), (type_found),
(pad_added_group_cb), (pad_removed_group_cb),
(no_more_pads_group_cb), (pad_added_cb), (pad_removed_cb),
(no_more_pads_cb), (find_compatibles), (is_demuxer_element),
(are_raw_caps), (multi_queue_overrun_cb),
(multi_queue_underrun_cb), (gst_decode_group_new),
(get_current_group), (group_demuxer_event_probe),
(gst_decode_group_control_demuxer_pad),
(gst_decode_group_control_source_pad),
(gst_decode_group_check_if_blocked),
(gst_decode_group_check_if_drained), (gst_decode_group_expose),
(gst_decode_group_hide), (gst_decode_group_free),
(gst_decode_group_set_complete), (source_pad_blocked_cb),
(source_pad_event_probe), (gst_decode_pad_new), (add_fakesink),
(remove_fakesink), (find_sink_pad), (gst_decode_bin_change_state),
(plugin_init):
New decodebin2 element.
Closes #370092
* gst/playback/gstplay-marshal.list:
Added marshallers for new signals in decodebin2
* gst/playback/gstplaybasebin.c: (setup_subtitle), (make_decoder):
Use decodebin2 if *and only if* the USE_DECODEBIN2 environment variable
is set.
2006-11-28 14:40:39 +00:00
|
|
|
|
2009-09-26 10:17:49 +00:00
|
|
|
GST_LOG_OBJECT (dbin, "multiqueue '%s' (%p) is full", GST_OBJECT_NAME (queue),
|
|
|
|
queue);
|
gst/playback/: New decodebin2 element.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstdecodebin2.c: (gst_decode_bin_get_type),
(_gst_boolean_accumulator), (gst_decode_bin_class_init),
(gst_decode_bin_factory_filter), (compare_ranks), (print_feature),
(gst_decode_bin_init), (gst_decode_bin_dispose),
(gst_decode_bin_finalize), (gst_decode_bin_set_property),
(gst_decode_bin_get_property), (gst_decode_bin_set_caps),
(gst_decode_bin_get_caps), (gst_decode_bin_autoplug_continue),
(gst_decode_bin_autoplug_sort), (analyze_new_pad), (connect_pad),
(connect_element), (expose_pad), (type_found),
(pad_added_group_cb), (pad_removed_group_cb),
(no_more_pads_group_cb), (pad_added_cb), (pad_removed_cb),
(no_more_pads_cb), (find_compatibles), (is_demuxer_element),
(are_raw_caps), (multi_queue_overrun_cb),
(multi_queue_underrun_cb), (gst_decode_group_new),
(get_current_group), (group_demuxer_event_probe),
(gst_decode_group_control_demuxer_pad),
(gst_decode_group_control_source_pad),
(gst_decode_group_check_if_blocked),
(gst_decode_group_check_if_drained), (gst_decode_group_expose),
(gst_decode_group_hide), (gst_decode_group_free),
(gst_decode_group_set_complete), (source_pad_blocked_cb),
(source_pad_event_probe), (gst_decode_pad_new), (add_fakesink),
(remove_fakesink), (find_sink_pad), (gst_decode_bin_change_state),
(plugin_init):
New decodebin2 element.
Closes #370092
* gst/playback/gstplay-marshal.list:
Added marshallers for new signals in decodebin2
* gst/playback/gstplaybasebin.c: (setup_subtitle), (make_decoder):
Use decodebin2 if *and only if* the USE_DECODEBIN2 environment variable
is set.
2006-11-28 14:40:39 +00:00
|
|
|
|
2015-08-18 15:47:22 +00:00
|
|
|
group->overrun = TRUE;
|
2015-08-18 15:47:18 +00:00
|
|
|
/* this group has prerolled enough to not need more pads,
|
|
|
|
* we can probably set its buffering state to playing now */
|
2015-08-18 15:47:22 +00:00
|
|
|
GST_DEBUG_OBJECT (group->dbin, "Setting group %p multiqueue to "
|
|
|
|
"'playing' buffering mode", group);
|
|
|
|
decodebin_set_queue_size (group->dbin, group->multiqueue, FALSE,
|
|
|
|
(group->parent ? group->parent->seekable : TRUE));
|
gst/playback/: New decodebin2 element.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstdecodebin2.c: (gst_decode_bin_get_type),
(_gst_boolean_accumulator), (gst_decode_bin_class_init),
(gst_decode_bin_factory_filter), (compare_ranks), (print_feature),
(gst_decode_bin_init), (gst_decode_bin_dispose),
(gst_decode_bin_finalize), (gst_decode_bin_set_property),
(gst_decode_bin_get_property), (gst_decode_bin_set_caps),
(gst_decode_bin_get_caps), (gst_decode_bin_autoplug_continue),
(gst_decode_bin_autoplug_sort), (analyze_new_pad), (connect_pad),
(connect_element), (expose_pad), (type_found),
(pad_added_group_cb), (pad_removed_group_cb),
(no_more_pads_group_cb), (pad_added_cb), (pad_removed_cb),
(no_more_pads_cb), (find_compatibles), (is_demuxer_element),
(are_raw_caps), (multi_queue_overrun_cb),
(multi_queue_underrun_cb), (gst_decode_group_new),
(get_current_group), (group_demuxer_event_probe),
(gst_decode_group_control_demuxer_pad),
(gst_decode_group_control_source_pad),
(gst_decode_group_check_if_blocked),
(gst_decode_group_check_if_drained), (gst_decode_group_expose),
(gst_decode_group_hide), (gst_decode_group_free),
(gst_decode_group_set_complete), (source_pad_blocked_cb),
(source_pad_event_probe), (gst_decode_pad_new), (add_fakesink),
(remove_fakesink), (find_sink_pad), (gst_decode_bin_change_state),
(plugin_init):
New decodebin2 element.
Closes #370092
* gst/playback/gstplay-marshal.list:
Added marshallers for new signals in decodebin2
* gst/playback/gstplaybasebin.c: (setup_subtitle), (make_decoder):
Use decodebin2 if *and only if* the USE_DECODEBIN2 environment variable
is set.
2006-11-28 14:40:39 +00:00
|
|
|
|
2009-09-26 10:17:49 +00:00
|
|
|
/* FIXME: We should make sure that everything gets exposed now
|
|
|
|
* even if child chains are not complete because the will never
|
|
|
|
* be complete! Ignore any non-complete chains when exposing
|
|
|
|
* and never expose them later
|
|
|
|
*/
|
gst/playback/: New decodebin2 element.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstdecodebin2.c: (gst_decode_bin_get_type),
(_gst_boolean_accumulator), (gst_decode_bin_class_init),
(gst_decode_bin_factory_filter), (compare_ranks), (print_feature),
(gst_decode_bin_init), (gst_decode_bin_dispose),
(gst_decode_bin_finalize), (gst_decode_bin_set_property),
(gst_decode_bin_get_property), (gst_decode_bin_set_caps),
(gst_decode_bin_get_caps), (gst_decode_bin_autoplug_continue),
(gst_decode_bin_autoplug_sort), (analyze_new_pad), (connect_pad),
(connect_element), (expose_pad), (type_found),
(pad_added_group_cb), (pad_removed_group_cb),
(no_more_pads_group_cb), (pad_added_cb), (pad_removed_cb),
(no_more_pads_cb), (find_compatibles), (is_demuxer_element),
(are_raw_caps), (multi_queue_overrun_cb),
(multi_queue_underrun_cb), (gst_decode_group_new),
(get_current_group), (group_demuxer_event_probe),
(gst_decode_group_control_demuxer_pad),
(gst_decode_group_control_source_pad),
(gst_decode_group_check_if_blocked),
(gst_decode_group_check_if_drained), (gst_decode_group_expose),
(gst_decode_group_hide), (gst_decode_group_free),
(gst_decode_group_set_complete), (source_pad_blocked_cb),
(source_pad_event_probe), (gst_decode_pad_new), (add_fakesink),
(remove_fakesink), (find_sink_pad), (gst_decode_bin_change_state),
(plugin_init):
New decodebin2 element.
Closes #370092
* gst/playback/gstplay-marshal.list:
Added marshallers for new signals in decodebin2
* gst/playback/gstplaybasebin.c: (setup_subtitle), (make_decoder):
Use decodebin2 if *and only if* the USE_DECODEBIN2 environment variable
is set.
2006-11-28 14:40:39 +00:00
|
|
|
|
2009-09-26 10:17:49 +00:00
|
|
|
EXPOSE_LOCK (dbin);
|
2015-02-04 11:46:09 +00:00
|
|
|
if (dbin->decode_chain) {
|
|
|
|
if (gst_decode_chain_is_complete (dbin->decode_chain)) {
|
|
|
|
if (!gst_decode_bin_expose (dbin))
|
|
|
|
GST_WARNING_OBJECT (dbin, "Couldn't expose group");
|
|
|
|
}
|
2009-09-26 10:17:49 +00:00
|
|
|
}
|
2015-01-20 15:08:24 +00:00
|
|
|
EXPOSE_UNLOCK (dbin);
|
gst/playback/: New decodebin2 element.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstdecodebin2.c: (gst_decode_bin_get_type),
(_gst_boolean_accumulator), (gst_decode_bin_class_init),
(gst_decode_bin_factory_filter), (compare_ranks), (print_feature),
(gst_decode_bin_init), (gst_decode_bin_dispose),
(gst_decode_bin_finalize), (gst_decode_bin_set_property),
(gst_decode_bin_get_property), (gst_decode_bin_set_caps),
(gst_decode_bin_get_caps), (gst_decode_bin_autoplug_continue),
(gst_decode_bin_autoplug_sort), (analyze_new_pad), (connect_pad),
(connect_element), (expose_pad), (type_found),
(pad_added_group_cb), (pad_removed_group_cb),
(no_more_pads_group_cb), (pad_added_cb), (pad_removed_cb),
(no_more_pads_cb), (find_compatibles), (is_demuxer_element),
(are_raw_caps), (multi_queue_overrun_cb),
(multi_queue_underrun_cb), (gst_decode_group_new),
(get_current_group), (group_demuxer_event_probe),
(gst_decode_group_control_demuxer_pad),
(gst_decode_group_control_source_pad),
(gst_decode_group_check_if_blocked),
(gst_decode_group_check_if_drained), (gst_decode_group_expose),
(gst_decode_group_hide), (gst_decode_group_free),
(gst_decode_group_set_complete), (source_pad_blocked_cb),
(source_pad_event_probe), (gst_decode_pad_new), (add_fakesink),
(remove_fakesink), (find_sink_pad), (gst_decode_bin_change_state),
(plugin_init):
New decodebin2 element.
Closes #370092
* gst/playback/gstplay-marshal.list:
Added marshallers for new signals in decodebin2
* gst/playback/gstplaybasebin.c: (setup_subtitle), (make_decoder):
Use decodebin2 if *and only if* the USE_DECODEBIN2 environment variable
is set.
2006-11-28 14:40:39 +00:00
|
|
|
}
|
|
|
|
|
2009-09-26 10:17:49 +00:00
|
|
|
static void
|
|
|
|
gst_decode_group_free_internal (GstDecodeGroup * group, gboolean hide)
|
gst/playback/: New decodebin2 element.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstdecodebin2.c: (gst_decode_bin_get_type),
(_gst_boolean_accumulator), (gst_decode_bin_class_init),
(gst_decode_bin_factory_filter), (compare_ranks), (print_feature),
(gst_decode_bin_init), (gst_decode_bin_dispose),
(gst_decode_bin_finalize), (gst_decode_bin_set_property),
(gst_decode_bin_get_property), (gst_decode_bin_set_caps),
(gst_decode_bin_get_caps), (gst_decode_bin_autoplug_continue),
(gst_decode_bin_autoplug_sort), (analyze_new_pad), (connect_pad),
(connect_element), (expose_pad), (type_found),
(pad_added_group_cb), (pad_removed_group_cb),
(no_more_pads_group_cb), (pad_added_cb), (pad_removed_cb),
(no_more_pads_cb), (find_compatibles), (is_demuxer_element),
(are_raw_caps), (multi_queue_overrun_cb),
(multi_queue_underrun_cb), (gst_decode_group_new),
(get_current_group), (group_demuxer_event_probe),
(gst_decode_group_control_demuxer_pad),
(gst_decode_group_control_source_pad),
(gst_decode_group_check_if_blocked),
(gst_decode_group_check_if_drained), (gst_decode_group_expose),
(gst_decode_group_hide), (gst_decode_group_free),
(gst_decode_group_set_complete), (source_pad_blocked_cb),
(source_pad_event_probe), (gst_decode_pad_new), (add_fakesink),
(remove_fakesink), (find_sink_pad), (gst_decode_bin_change_state),
(plugin_init):
New decodebin2 element.
Closes #370092
* gst/playback/gstplay-marshal.list:
Added marshallers for new signals in decodebin2
* gst/playback/gstplaybasebin.c: (setup_subtitle), (make_decoder):
Use decodebin2 if *and only if* the USE_DECODEBIN2 environment variable
is set.
2006-11-28 14:40:39 +00:00
|
|
|
{
|
2009-09-26 10:17:49 +00:00
|
|
|
GList *l;
|
gst/playback/: New decodebin2 element.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstdecodebin2.c: (gst_decode_bin_get_type),
(_gst_boolean_accumulator), (gst_decode_bin_class_init),
(gst_decode_bin_factory_filter), (compare_ranks), (print_feature),
(gst_decode_bin_init), (gst_decode_bin_dispose),
(gst_decode_bin_finalize), (gst_decode_bin_set_property),
(gst_decode_bin_get_property), (gst_decode_bin_set_caps),
(gst_decode_bin_get_caps), (gst_decode_bin_autoplug_continue),
(gst_decode_bin_autoplug_sort), (analyze_new_pad), (connect_pad),
(connect_element), (expose_pad), (type_found),
(pad_added_group_cb), (pad_removed_group_cb),
(no_more_pads_group_cb), (pad_added_cb), (pad_removed_cb),
(no_more_pads_cb), (find_compatibles), (is_demuxer_element),
(are_raw_caps), (multi_queue_overrun_cb),
(multi_queue_underrun_cb), (gst_decode_group_new),
(get_current_group), (group_demuxer_event_probe),
(gst_decode_group_control_demuxer_pad),
(gst_decode_group_control_source_pad),
(gst_decode_group_check_if_blocked),
(gst_decode_group_check_if_drained), (gst_decode_group_expose),
(gst_decode_group_hide), (gst_decode_group_free),
(gst_decode_group_set_complete), (source_pad_blocked_cb),
(source_pad_event_probe), (gst_decode_pad_new), (add_fakesink),
(remove_fakesink), (find_sink_pad), (gst_decode_bin_change_state),
(plugin_init):
New decodebin2 element.
Closes #370092
* gst/playback/gstplay-marshal.list:
Added marshallers for new signals in decodebin2
* gst/playback/gstplaybasebin.c: (setup_subtitle), (make_decoder):
Use decodebin2 if *and only if* the USE_DECODEBIN2 environment variable
is set.
2006-11-28 14:40:39 +00:00
|
|
|
|
2009-09-26 10:17:49 +00:00
|
|
|
GST_DEBUG_OBJECT (group->dbin, "%s group %p", (hide ? "Hiding" : "Freeing"),
|
|
|
|
group);
|
|
|
|
for (l = group->children; l; l = l->next) {
|
|
|
|
GstDecodeChain *chain = (GstDecodeChain *) l->data;
|
gst/playback/: New decodebin2 element.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstdecodebin2.c: (gst_decode_bin_get_type),
(_gst_boolean_accumulator), (gst_decode_bin_class_init),
(gst_decode_bin_factory_filter), (compare_ranks), (print_feature),
(gst_decode_bin_init), (gst_decode_bin_dispose),
(gst_decode_bin_finalize), (gst_decode_bin_set_property),
(gst_decode_bin_get_property), (gst_decode_bin_set_caps),
(gst_decode_bin_get_caps), (gst_decode_bin_autoplug_continue),
(gst_decode_bin_autoplug_sort), (analyze_new_pad), (connect_pad),
(connect_element), (expose_pad), (type_found),
(pad_added_group_cb), (pad_removed_group_cb),
(no_more_pads_group_cb), (pad_added_cb), (pad_removed_cb),
(no_more_pads_cb), (find_compatibles), (is_demuxer_element),
(are_raw_caps), (multi_queue_overrun_cb),
(multi_queue_underrun_cb), (gst_decode_group_new),
(get_current_group), (group_demuxer_event_probe),
(gst_decode_group_control_demuxer_pad),
(gst_decode_group_control_source_pad),
(gst_decode_group_check_if_blocked),
(gst_decode_group_check_if_drained), (gst_decode_group_expose),
(gst_decode_group_hide), (gst_decode_group_free),
(gst_decode_group_set_complete), (source_pad_blocked_cb),
(source_pad_event_probe), (gst_decode_pad_new), (add_fakesink),
(remove_fakesink), (find_sink_pad), (gst_decode_bin_change_state),
(plugin_init):
New decodebin2 element.
Closes #370092
* gst/playback/gstplay-marshal.list:
Added marshallers for new signals in decodebin2
* gst/playback/gstplaybasebin.c: (setup_subtitle), (make_decoder):
Use decodebin2 if *and only if* the USE_DECODEBIN2 environment variable
is set.
2006-11-28 14:40:39 +00:00
|
|
|
|
2009-09-26 10:17:49 +00:00
|
|
|
gst_decode_chain_free_internal (chain, hide);
|
|
|
|
if (!hide)
|
|
|
|
l->data = NULL;
|
|
|
|
}
|
|
|
|
if (!hide) {
|
|
|
|
g_list_free (group->children);
|
|
|
|
group->children = NULL;
|
|
|
|
}
|
gst/playback/: New decodebin2 element.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstdecodebin2.c: (gst_decode_bin_get_type),
(_gst_boolean_accumulator), (gst_decode_bin_class_init),
(gst_decode_bin_factory_filter), (compare_ranks), (print_feature),
(gst_decode_bin_init), (gst_decode_bin_dispose),
(gst_decode_bin_finalize), (gst_decode_bin_set_property),
(gst_decode_bin_get_property), (gst_decode_bin_set_caps),
(gst_decode_bin_get_caps), (gst_decode_bin_autoplug_continue),
(gst_decode_bin_autoplug_sort), (analyze_new_pad), (connect_pad),
(connect_element), (expose_pad), (type_found),
(pad_added_group_cb), (pad_removed_group_cb),
(no_more_pads_group_cb), (pad_added_cb), (pad_removed_cb),
(no_more_pads_cb), (find_compatibles), (is_demuxer_element),
(are_raw_caps), (multi_queue_overrun_cb),
(multi_queue_underrun_cb), (gst_decode_group_new),
(get_current_group), (group_demuxer_event_probe),
(gst_decode_group_control_demuxer_pad),
(gst_decode_group_control_source_pad),
(gst_decode_group_check_if_blocked),
(gst_decode_group_check_if_drained), (gst_decode_group_expose),
(gst_decode_group_hide), (gst_decode_group_free),
(gst_decode_group_set_complete), (source_pad_blocked_cb),
(source_pad_event_probe), (gst_decode_pad_new), (add_fakesink),
(remove_fakesink), (find_sink_pad), (gst_decode_bin_change_state),
(plugin_init):
New decodebin2 element.
Closes #370092
* gst/playback/gstplay-marshal.list:
Added marshallers for new signals in decodebin2
* gst/playback/gstplaybasebin.c: (setup_subtitle), (make_decoder):
Use decodebin2 if *and only if* the USE_DECODEBIN2 environment variable
is set.
2006-11-28 14:40:39 +00:00
|
|
|
|
2009-09-26 10:17:49 +00:00
|
|
|
if (!hide) {
|
|
|
|
for (l = group->reqpads; l; l = l->next) {
|
|
|
|
GstPad *pad = l->data;
|
gst/playback/: New decodebin2 element.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstdecodebin2.c: (gst_decode_bin_get_type),
(_gst_boolean_accumulator), (gst_decode_bin_class_init),
(gst_decode_bin_factory_filter), (compare_ranks), (print_feature),
(gst_decode_bin_init), (gst_decode_bin_dispose),
(gst_decode_bin_finalize), (gst_decode_bin_set_property),
(gst_decode_bin_get_property), (gst_decode_bin_set_caps),
(gst_decode_bin_get_caps), (gst_decode_bin_autoplug_continue),
(gst_decode_bin_autoplug_sort), (analyze_new_pad), (connect_pad),
(connect_element), (expose_pad), (type_found),
(pad_added_group_cb), (pad_removed_group_cb),
(no_more_pads_group_cb), (pad_added_cb), (pad_removed_cb),
(no_more_pads_cb), (find_compatibles), (is_demuxer_element),
(are_raw_caps), (multi_queue_overrun_cb),
(multi_queue_underrun_cb), (gst_decode_group_new),
(get_current_group), (group_demuxer_event_probe),
(gst_decode_group_control_demuxer_pad),
(gst_decode_group_control_source_pad),
(gst_decode_group_check_if_blocked),
(gst_decode_group_check_if_drained), (gst_decode_group_expose),
(gst_decode_group_hide), (gst_decode_group_free),
(gst_decode_group_set_complete), (source_pad_blocked_cb),
(source_pad_event_probe), (gst_decode_pad_new), (add_fakesink),
(remove_fakesink), (find_sink_pad), (gst_decode_bin_change_state),
(plugin_init):
New decodebin2 element.
Closes #370092
* gst/playback/gstplay-marshal.list:
Added marshallers for new signals in decodebin2
* gst/playback/gstplaybasebin.c: (setup_subtitle), (make_decoder):
Use decodebin2 if *and only if* the USE_DECODEBIN2 environment variable
is set.
2006-11-28 14:40:39 +00:00
|
|
|
|
2009-09-26 10:17:49 +00:00
|
|
|
gst_element_release_request_pad (group->multiqueue, pad);
|
|
|
|
gst_object_unref (pad);
|
|
|
|
l->data = NULL;
|
|
|
|
}
|
|
|
|
g_list_free (group->reqpads);
|
|
|
|
group->reqpads = NULL;
|
|
|
|
}
|
|
|
|
|
|
|
|
if (group->multiqueue) {
|
|
|
|
if (group->overrunsig) {
|
|
|
|
g_signal_handler_disconnect (group->multiqueue, group->overrunsig);
|
|
|
|
group->overrunsig = 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
if (GST_OBJECT_PARENT (group->multiqueue) == GST_OBJECT_CAST (group->dbin))
|
|
|
|
gst_bin_remove (GST_BIN_CAST (group->dbin), group->multiqueue);
|
|
|
|
if (!hide) {
|
|
|
|
gst_element_set_state (group->multiqueue, GST_STATE_NULL);
|
|
|
|
gst_object_unref (group->multiqueue);
|
|
|
|
group->multiqueue = NULL;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2015-07-14 03:02:40 +00:00
|
|
|
GST_DEBUG_OBJECT (group->dbin, "%s group %p", (hide ? "Hid" : "Freed"),
|
2009-09-26 10:17:49 +00:00
|
|
|
group);
|
|
|
|
if (!hide)
|
|
|
|
g_slice_free (GstDecodeGroup, group);
|
gst/playback/: New decodebin2 element.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstdecodebin2.c: (gst_decode_bin_get_type),
(_gst_boolean_accumulator), (gst_decode_bin_class_init),
(gst_decode_bin_factory_filter), (compare_ranks), (print_feature),
(gst_decode_bin_init), (gst_decode_bin_dispose),
(gst_decode_bin_finalize), (gst_decode_bin_set_property),
(gst_decode_bin_get_property), (gst_decode_bin_set_caps),
(gst_decode_bin_get_caps), (gst_decode_bin_autoplug_continue),
(gst_decode_bin_autoplug_sort), (analyze_new_pad), (connect_pad),
(connect_element), (expose_pad), (type_found),
(pad_added_group_cb), (pad_removed_group_cb),
(no_more_pads_group_cb), (pad_added_cb), (pad_removed_cb),
(no_more_pads_cb), (find_compatibles), (is_demuxer_element),
(are_raw_caps), (multi_queue_overrun_cb),
(multi_queue_underrun_cb), (gst_decode_group_new),
(get_current_group), (group_demuxer_event_probe),
(gst_decode_group_control_demuxer_pad),
(gst_decode_group_control_source_pad),
(gst_decode_group_check_if_blocked),
(gst_decode_group_check_if_drained), (gst_decode_group_expose),
(gst_decode_group_hide), (gst_decode_group_free),
(gst_decode_group_set_complete), (source_pad_blocked_cb),
(source_pad_event_probe), (gst_decode_pad_new), (add_fakesink),
(remove_fakesink), (find_sink_pad), (gst_decode_bin_change_state),
(plugin_init):
New decodebin2 element.
Closes #370092
* gst/playback/gstplay-marshal.list:
Added marshallers for new signals in decodebin2
* gst/playback/gstplaybasebin.c: (setup_subtitle), (make_decoder):
Use decodebin2 if *and only if* the USE_DECODEBIN2 environment variable
is set.
2006-11-28 14:40:39 +00:00
|
|
|
}
|
|
|
|
|
2009-09-26 10:17:49 +00:00
|
|
|
/* gst_decode_group_free:
|
gst/playback/: New decodebin2 element.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstdecodebin2.c: (gst_decode_bin_get_type),
(_gst_boolean_accumulator), (gst_decode_bin_class_init),
(gst_decode_bin_factory_filter), (compare_ranks), (print_feature),
(gst_decode_bin_init), (gst_decode_bin_dispose),
(gst_decode_bin_finalize), (gst_decode_bin_set_property),
(gst_decode_bin_get_property), (gst_decode_bin_set_caps),
(gst_decode_bin_get_caps), (gst_decode_bin_autoplug_continue),
(gst_decode_bin_autoplug_sort), (analyze_new_pad), (connect_pad),
(connect_element), (expose_pad), (type_found),
(pad_added_group_cb), (pad_removed_group_cb),
(no_more_pads_group_cb), (pad_added_cb), (pad_removed_cb),
(no_more_pads_cb), (find_compatibles), (is_demuxer_element),
(are_raw_caps), (multi_queue_overrun_cb),
(multi_queue_underrun_cb), (gst_decode_group_new),
(get_current_group), (group_demuxer_event_probe),
(gst_decode_group_control_demuxer_pad),
(gst_decode_group_control_source_pad),
(gst_decode_group_check_if_blocked),
(gst_decode_group_check_if_drained), (gst_decode_group_expose),
(gst_decode_group_hide), (gst_decode_group_free),
(gst_decode_group_set_complete), (source_pad_blocked_cb),
(source_pad_event_probe), (gst_decode_pad_new), (add_fakesink),
(remove_fakesink), (find_sink_pad), (gst_decode_bin_change_state),
(plugin_init):
New decodebin2 element.
Closes #370092
* gst/playback/gstplay-marshal.list:
Added marshallers for new signals in decodebin2
* gst/playback/gstplaybasebin.c: (setup_subtitle), (make_decoder):
Use decodebin2 if *and only if* the USE_DECODEBIN2 environment variable
is set.
2006-11-28 14:40:39 +00:00
|
|
|
*
|
2009-09-26 10:17:49 +00:00
|
|
|
* Completely frees and removes the decode group and all
|
|
|
|
* it's children.
|
2007-01-25 11:48:10 +00:00
|
|
|
*
|
2009-09-26 10:17:49 +00:00
|
|
|
* Never call this from any streaming thread!
|
2009-03-19 18:19:38 +00:00
|
|
|
*
|
2009-09-26 10:17:49 +00:00
|
|
|
* Not MT-safe, call with parent's chain lock!
|
gst/playback/: New decodebin2 element.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstdecodebin2.c: (gst_decode_bin_get_type),
(_gst_boolean_accumulator), (gst_decode_bin_class_init),
(gst_decode_bin_factory_filter), (compare_ranks), (print_feature),
(gst_decode_bin_init), (gst_decode_bin_dispose),
(gst_decode_bin_finalize), (gst_decode_bin_set_property),
(gst_decode_bin_get_property), (gst_decode_bin_set_caps),
(gst_decode_bin_get_caps), (gst_decode_bin_autoplug_continue),
(gst_decode_bin_autoplug_sort), (analyze_new_pad), (connect_pad),
(connect_element), (expose_pad), (type_found),
(pad_added_group_cb), (pad_removed_group_cb),
(no_more_pads_group_cb), (pad_added_cb), (pad_removed_cb),
(no_more_pads_cb), (find_compatibles), (is_demuxer_element),
(are_raw_caps), (multi_queue_overrun_cb),
(multi_queue_underrun_cb), (gst_decode_group_new),
(get_current_group), (group_demuxer_event_probe),
(gst_decode_group_control_demuxer_pad),
(gst_decode_group_control_source_pad),
(gst_decode_group_check_if_blocked),
(gst_decode_group_check_if_drained), (gst_decode_group_expose),
(gst_decode_group_hide), (gst_decode_group_free),
(gst_decode_group_set_complete), (source_pad_blocked_cb),
(source_pad_event_probe), (gst_decode_pad_new), (add_fakesink),
(remove_fakesink), (find_sink_pad), (gst_decode_bin_change_state),
(plugin_init):
New decodebin2 element.
Closes #370092
* gst/playback/gstplay-marshal.list:
Added marshallers for new signals in decodebin2
* gst/playback/gstplaybasebin.c: (setup_subtitle), (make_decoder):
Use decodebin2 if *and only if* the USE_DECODEBIN2 environment variable
is set.
2006-11-28 14:40:39 +00:00
|
|
|
*/
|
2009-09-26 10:17:49 +00:00
|
|
|
static void
|
|
|
|
gst_decode_group_free (GstDecodeGroup * group)
|
|
|
|
{
|
|
|
|
gst_decode_group_free_internal (group, FALSE);
|
|
|
|
}
|
|
|
|
|
|
|
|
/* gst_decode_group_hide:
|
|
|
|
*
|
|
|
|
* Hide the decode group only, this means that
|
2011-06-14 22:51:29 +00:00
|
|
|
* all child endpads are removed from decodebin
|
2009-09-26 10:17:49 +00:00
|
|
|
* and all signals are unconnected.
|
|
|
|
*
|
|
|
|
* No element is set to NULL state and completely
|
2009-11-04 17:31:09 +00:00
|
|
|
* unrefed here.
|
2009-09-26 10:17:49 +00:00
|
|
|
*
|
|
|
|
* Can be called from streaming threads.
|
2011-01-25 16:03:23 +00:00
|
|
|
*
|
2009-09-26 10:17:49 +00:00
|
|
|
* Not MT-safe, call with parent's chain lock!
|
|
|
|
*/
|
|
|
|
static void
|
|
|
|
gst_decode_group_hide (GstDecodeGroup * group)
|
|
|
|
{
|
|
|
|
gst_decode_group_free_internal (group, TRUE);
|
|
|
|
}
|
|
|
|
|
2015-01-16 15:21:14 +00:00
|
|
|
/* gst_decode_chain_free_hidden_groups:
|
|
|
|
*
|
|
|
|
* Frees any decode groups that were hidden previously.
|
|
|
|
* This allows keeping memory use from ballooning when
|
|
|
|
* switching chains repeatedly.
|
|
|
|
*
|
|
|
|
* A new throwaway thread will be created to free the
|
|
|
|
* groups, so any delay does not block the setup of a
|
|
|
|
* new group.
|
|
|
|
*
|
|
|
|
* Not MT-safe, call with parent's chain lock!
|
|
|
|
*/
|
|
|
|
static void
|
|
|
|
gst_decode_chain_free_hidden_groups (GList * old_groups)
|
|
|
|
{
|
|
|
|
GList *l;
|
|
|
|
|
|
|
|
for (l = old_groups; l; l = l->next) {
|
|
|
|
GstDecodeGroup *group = l->data;
|
|
|
|
|
|
|
|
gst_decode_group_free (group);
|
|
|
|
}
|
|
|
|
g_list_free (old_groups);
|
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
|
|
|
gst_decode_chain_start_free_hidden_groups_thread (GstDecodeChain * chain)
|
|
|
|
{
|
|
|
|
GThread *thread;
|
|
|
|
GError *error = NULL;
|
|
|
|
GList *old_groups;
|
2017-11-10 13:54:12 +00:00
|
|
|
GstDecodeBin *dbin = chain->dbin;
|
2015-01-16 15:21:14 +00:00
|
|
|
|
|
|
|
old_groups = chain->old_groups;
|
|
|
|
if (!old_groups)
|
|
|
|
return;
|
|
|
|
|
2017-11-10 13:54:12 +00:00
|
|
|
/* If we already have a thread running, wait for it to finish */
|
|
|
|
g_mutex_lock (&dbin->cleanup_lock);
|
|
|
|
if (dbin->cleanup_thread) {
|
|
|
|
g_thread_join (dbin->cleanup_thread);
|
|
|
|
dbin->cleanup_thread = NULL;
|
|
|
|
}
|
|
|
|
|
2015-01-16 15:21:14 +00:00
|
|
|
chain->old_groups = NULL;
|
2017-11-16 17:22:20 +00:00
|
|
|
|
|
|
|
if (dbin->shutdown) {
|
|
|
|
/* If we're shutting down, add the groups to be cleaned up in the
|
|
|
|
* state change handler (which *is* another thread). Also avoids
|
|
|
|
* playing racy games with the state change handler */
|
|
|
|
dbin->cleanup_groups = g_list_concat (dbin->cleanup_groups, old_groups);
|
|
|
|
g_mutex_unlock (&dbin->cleanup_lock);
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
2015-01-16 15:21:14 +00:00
|
|
|
thread = g_thread_try_new ("free-hidden-groups",
|
|
|
|
(GThreadFunc) gst_decode_chain_free_hidden_groups, old_groups, &error);
|
|
|
|
if (!thread || error) {
|
|
|
|
GST_ERROR ("Failed to start free-hidden-groups thread: %s",
|
|
|
|
error ? error->message : "unknown reason");
|
|
|
|
g_clear_error (&error);
|
|
|
|
chain->old_groups = old_groups;
|
2017-11-10 13:54:12 +00:00
|
|
|
g_mutex_unlock (&dbin->cleanup_lock);
|
2015-01-16 15:21:14 +00:00
|
|
|
return;
|
|
|
|
}
|
2017-11-10 13:54:12 +00:00
|
|
|
|
|
|
|
dbin->cleanup_thread = thread;
|
|
|
|
g_mutex_unlock (&dbin->cleanup_lock);
|
|
|
|
|
2015-01-16 15:21:14 +00:00
|
|
|
GST_DEBUG_OBJECT (chain->dbin, "Started free-hidden-groups thread");
|
|
|
|
}
|
|
|
|
|
2009-10-23 15:31:47 +00:00
|
|
|
static void
|
|
|
|
decodebin_set_queue_size (GstDecodeBin * dbin, GstElement * multiqueue,
|
2015-08-18 15:47:21 +00:00
|
|
|
gboolean preroll, gboolean seekable)
|
2009-10-23 15:31:47 +00:00
|
|
|
{
|
2013-03-04 15:19:18 +00:00
|
|
|
gboolean use_buffering;
|
2009-10-23 15:31:47 +00:00
|
|
|
|
2013-03-04 15:19:18 +00:00
|
|
|
/* get the current config from the multiqueue */
|
|
|
|
g_object_get (multiqueue, "use-buffering", &use_buffering, NULL);
|
|
|
|
|
2015-02-15 23:25:03 +00:00
|
|
|
decodebin_set_queue_size_full (dbin, multiqueue, use_buffering, preroll,
|
2015-08-18 15:47:21 +00:00
|
|
|
seekable);
|
2015-02-15 23:25:03 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/* configure queue sizes, this depends on the buffering method and if we are
|
|
|
|
* playing or prerolling. */
|
|
|
|
static void
|
|
|
|
decodebin_set_queue_size_full (GstDecodeBin * dbin, GstElement * multiqueue,
|
2015-08-18 15:47:21 +00:00
|
|
|
gboolean use_buffering, gboolean preroll, gboolean seekable)
|
2015-02-15 23:25:03 +00:00
|
|
|
{
|
|
|
|
guint max_bytes, max_buffers;
|
|
|
|
guint64 max_time;
|
|
|
|
|
2015-08-18 15:47:22 +00:00
|
|
|
GST_DEBUG_OBJECT (multiqueue, "use buffering %d", use_buffering);
|
2013-03-04 15:19:18 +00:00
|
|
|
|
|
|
|
if (preroll || use_buffering) {
|
2009-10-23 15:31:47 +00:00
|
|
|
/* takes queue limits, initially we only queue up up to the max bytes limit,
|
|
|
|
* with a default of 2MB. we use the same values for buffering mode. */
|
2014-02-20 14:38:48 +00:00
|
|
|
if (preroll || (max_bytes = dbin->max_size_bytes) == 0)
|
2015-08-18 15:47:18 +00:00
|
|
|
max_bytes = AUTO_PREROLL_SIZE_BYTES;
|
2014-02-20 14:38:48 +00:00
|
|
|
if (preroll || (max_buffers = dbin->max_size_buffers) == 0)
|
2009-10-23 15:31:47 +00:00
|
|
|
max_buffers = AUTO_PREROLL_SIZE_BUFFERS;
|
2014-03-07 16:09:24 +00:00
|
|
|
if (preroll || (max_time = dbin->max_size_time) == 0) {
|
|
|
|
if (dbin->use_buffering && !preroll)
|
|
|
|
max_time = 5 * GST_SECOND;
|
|
|
|
else
|
|
|
|
max_time = seekable ? AUTO_PREROLL_SEEKABLE_SIZE_TIME :
|
|
|
|
AUTO_PREROLL_NOT_SEEKABLE_SIZE_TIME;
|
|
|
|
}
|
2009-10-23 15:31:47 +00:00
|
|
|
} else {
|
|
|
|
/* update runtime limits. At runtime, we try to keep the amount of buffers
|
|
|
|
* in the queues as low as possible (but at least 5 buffers). */
|
2013-03-06 15:44:45 +00:00
|
|
|
if (dbin->use_buffering)
|
|
|
|
max_bytes = 0;
|
|
|
|
else if ((max_bytes = dbin->max_size_bytes) == 0)
|
2009-10-23 15:31:47 +00:00
|
|
|
max_bytes = AUTO_PLAY_SIZE_BYTES;
|
|
|
|
if ((max_buffers = dbin->max_size_buffers) == 0)
|
2014-04-09 14:03:15 +00:00
|
|
|
max_buffers = AUTO_PLAY_SIZE_BUFFERS;
|
2013-03-04 15:19:18 +00:00
|
|
|
/* this is a multiqueue with disabled buffering, don't limit max_time */
|
2017-05-31 09:30:40 +00:00
|
|
|
if (dbin->use_buffering)
|
2013-03-04 15:19:18 +00:00
|
|
|
max_time = 0;
|
|
|
|
else if ((max_time = dbin->max_size_time) == 0)
|
2009-10-23 15:31:47 +00:00
|
|
|
max_time = AUTO_PLAY_SIZE_TIME;
|
|
|
|
}
|
|
|
|
|
2013-03-04 15:19:18 +00:00
|
|
|
GST_DEBUG_OBJECT (multiqueue, "setting limits %u bytes, %u buffers, "
|
2014-07-29 17:20:42 +00:00
|
|
|
"%" G_GUINT64_FORMAT " time", max_bytes, max_buffers, max_time);
|
2009-10-23 15:31:47 +00:00
|
|
|
g_object_set (multiqueue,
|
|
|
|
"max-size-bytes", max_bytes, "max-size-time", max_time,
|
|
|
|
"max-size-buffers", max_buffers, NULL);
|
|
|
|
}
|
|
|
|
|
2009-09-26 10:17:49 +00:00
|
|
|
/* gst_decode_group_new:
|
|
|
|
* @dbin: Parent decodebin
|
|
|
|
* @parent: Parent chain or %NULL
|
|
|
|
*
|
|
|
|
* Creates a new GstDecodeGroup. It is up to the caller to add it to the list
|
|
|
|
* of groups.
|
|
|
|
*/
|
|
|
|
static GstDecodeGroup *
|
|
|
|
gst_decode_group_new (GstDecodeBin * dbin, GstDecodeChain * parent)
|
|
|
|
{
|
|
|
|
GstDecodeGroup *group = g_slice_new0 (GstDecodeGroup);
|
|
|
|
GstElement *mq;
|
2011-11-08 13:55:58 +00:00
|
|
|
gboolean seekable;
|
2009-09-26 10:17:49 +00:00
|
|
|
|
|
|
|
GST_DEBUG_OBJECT (dbin, "Creating new group %p with parent chain %p", group,
|
|
|
|
parent);
|
|
|
|
|
|
|
|
group->dbin = dbin;
|
|
|
|
group->parent = parent;
|
|
|
|
|
|
|
|
mq = group->multiqueue = gst_element_factory_make ("multiqueue", NULL);
|
2009-10-23 15:08:50 +00:00
|
|
|
if (G_UNLIKELY (!group->multiqueue))
|
|
|
|
goto missing_multiqueue;
|
2009-09-26 10:17:49 +00:00
|
|
|
|
2009-10-23 15:31:47 +00:00
|
|
|
/* configure queue sizes for preroll */
|
2011-11-08 13:55:58 +00:00
|
|
|
seekable = FALSE;
|
|
|
|
if (parent && parent->demuxer) {
|
|
|
|
GstElement *element =
|
|
|
|
((GstDecodeElement *) parent->elements->data)->element;
|
|
|
|
GstPad *pad = gst_element_get_static_pad (element, "sink");
|
|
|
|
if (pad) {
|
2011-11-25 10:08:58 +00:00
|
|
|
seekable = parent->seekable = check_upstream_seekable (dbin, pad);
|
2011-11-08 13:55:58 +00:00
|
|
|
gst_object_unref (pad);
|
|
|
|
}
|
|
|
|
}
|
2015-08-18 15:47:21 +00:00
|
|
|
decodebin_set_queue_size_full (dbin, mq, FALSE, TRUE, seekable);
|
2009-09-26 10:17:49 +00:00
|
|
|
|
2013-05-22 15:29:17 +00:00
|
|
|
group->overrunsig = g_signal_connect (mq, "overrun",
|
2009-09-26 10:17:49 +00:00
|
|
|
G_CALLBACK (multi_queue_overrun_cb), group);
|
|
|
|
|
|
|
|
gst_element_set_state (mq, GST_STATE_PAUSED);
|
2013-05-24 11:41:46 +00:00
|
|
|
gst_bin_add (GST_BIN (dbin), gst_object_ref (mq));
|
2009-09-26 10:17:49 +00:00
|
|
|
|
|
|
|
return group;
|
2009-10-23 15:08:50 +00:00
|
|
|
|
|
|
|
/* ERRORS */
|
|
|
|
missing_multiqueue:
|
|
|
|
{
|
|
|
|
gst_element_post_message (GST_ELEMENT_CAST (dbin),
|
|
|
|
gst_missing_element_message_new (GST_ELEMENT_CAST (dbin),
|
|
|
|
"multiqueue"));
|
|
|
|
GST_ELEMENT_ERROR (dbin, CORE, MISSING_PLUGIN, (NULL), ("no multiqueue!"));
|
|
|
|
g_slice_free (GstDecodeGroup, group);
|
|
|
|
return NULL;
|
|
|
|
}
|
2009-09-26 10:17:49 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/* gst_decode_group_control_demuxer_pad
|
|
|
|
*
|
|
|
|
* Adds a new demuxer srcpad to the given group.
|
|
|
|
*
|
|
|
|
* Returns the srcpad of the multiqueue corresponding the given pad.
|
|
|
|
* Returns NULL if there was an error.
|
|
|
|
*/
|
|
|
|
static GstPad *
|
|
|
|
gst_decode_group_control_demuxer_pad (GstDecodeGroup * group, GstPad * pad)
|
gst/playback/: New decodebin2 element.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstdecodebin2.c: (gst_decode_bin_get_type),
(_gst_boolean_accumulator), (gst_decode_bin_class_init),
(gst_decode_bin_factory_filter), (compare_ranks), (print_feature),
(gst_decode_bin_init), (gst_decode_bin_dispose),
(gst_decode_bin_finalize), (gst_decode_bin_set_property),
(gst_decode_bin_get_property), (gst_decode_bin_set_caps),
(gst_decode_bin_get_caps), (gst_decode_bin_autoplug_continue),
(gst_decode_bin_autoplug_sort), (analyze_new_pad), (connect_pad),
(connect_element), (expose_pad), (type_found),
(pad_added_group_cb), (pad_removed_group_cb),
(no_more_pads_group_cb), (pad_added_cb), (pad_removed_cb),
(no_more_pads_cb), (find_compatibles), (is_demuxer_element),
(are_raw_caps), (multi_queue_overrun_cb),
(multi_queue_underrun_cb), (gst_decode_group_new),
(get_current_group), (group_demuxer_event_probe),
(gst_decode_group_control_demuxer_pad),
(gst_decode_group_control_source_pad),
(gst_decode_group_check_if_blocked),
(gst_decode_group_check_if_drained), (gst_decode_group_expose),
(gst_decode_group_hide), (gst_decode_group_free),
(gst_decode_group_set_complete), (source_pad_blocked_cb),
(source_pad_event_probe), (gst_decode_pad_new), (add_fakesink),
(remove_fakesink), (find_sink_pad), (gst_decode_bin_change_state),
(plugin_init):
New decodebin2 element.
Closes #370092
* gst/playback/gstplay-marshal.list:
Added marshallers for new signals in decodebin2
* gst/playback/gstplaybasebin.c: (setup_subtitle), (make_decoder):
Use decodebin2 if *and only if* the USE_DECODEBIN2 environment variable
is set.
2006-11-28 14:40:39 +00:00
|
|
|
{
|
2009-04-14 09:34:49 +00:00
|
|
|
GstDecodeBin *dbin;
|
2009-09-26 10:17:49 +00:00
|
|
|
GstPad *srcpad, *sinkpad;
|
2009-09-26 10:47:53 +00:00
|
|
|
GstIterator *it = NULL;
|
2011-05-05 14:03:52 +00:00
|
|
|
GValue item = { 0, };
|
gst/playback/: New decodebin2 element.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstdecodebin2.c: (gst_decode_bin_get_type),
(_gst_boolean_accumulator), (gst_decode_bin_class_init),
(gst_decode_bin_factory_filter), (compare_ranks), (print_feature),
(gst_decode_bin_init), (gst_decode_bin_dispose),
(gst_decode_bin_finalize), (gst_decode_bin_set_property),
(gst_decode_bin_get_property), (gst_decode_bin_set_caps),
(gst_decode_bin_get_caps), (gst_decode_bin_autoplug_continue),
(gst_decode_bin_autoplug_sort), (analyze_new_pad), (connect_pad),
(connect_element), (expose_pad), (type_found),
(pad_added_group_cb), (pad_removed_group_cb),
(no_more_pads_group_cb), (pad_added_cb), (pad_removed_cb),
(no_more_pads_cb), (find_compatibles), (is_demuxer_element),
(are_raw_caps), (multi_queue_overrun_cb),
(multi_queue_underrun_cb), (gst_decode_group_new),
(get_current_group), (group_demuxer_event_probe),
(gst_decode_group_control_demuxer_pad),
(gst_decode_group_control_source_pad),
(gst_decode_group_check_if_blocked),
(gst_decode_group_check_if_drained), (gst_decode_group_expose),
(gst_decode_group_hide), (gst_decode_group_free),
(gst_decode_group_set_complete), (source_pad_blocked_cb),
(source_pad_event_probe), (gst_decode_pad_new), (add_fakesink),
(remove_fakesink), (find_sink_pad), (gst_decode_bin_change_state),
(plugin_init):
New decodebin2 element.
Closes #370092
* gst/playback/gstplay-marshal.list:
Added marshallers for new signals in decodebin2
* gst/playback/gstplaybasebin.c: (setup_subtitle), (make_decoder):
Use decodebin2 if *and only if* the USE_DECODEBIN2 environment variable
is set.
2006-11-28 14:40:39 +00:00
|
|
|
|
2009-04-14 09:34:49 +00:00
|
|
|
dbin = group->dbin;
|
|
|
|
|
2009-09-26 10:17:49 +00:00
|
|
|
GST_LOG_OBJECT (dbin, "group:%p pad %s:%s", group, GST_DEBUG_PAD_NAME (pad));
|
gst/playback/: New decodebin2 element.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstdecodebin2.c: (gst_decode_bin_get_type),
(_gst_boolean_accumulator), (gst_decode_bin_class_init),
(gst_decode_bin_factory_filter), (compare_ranks), (print_feature),
(gst_decode_bin_init), (gst_decode_bin_dispose),
(gst_decode_bin_finalize), (gst_decode_bin_set_property),
(gst_decode_bin_get_property), (gst_decode_bin_set_caps),
(gst_decode_bin_get_caps), (gst_decode_bin_autoplug_continue),
(gst_decode_bin_autoplug_sort), (analyze_new_pad), (connect_pad),
(connect_element), (expose_pad), (type_found),
(pad_added_group_cb), (pad_removed_group_cb),
(no_more_pads_group_cb), (pad_added_cb), (pad_removed_cb),
(no_more_pads_cb), (find_compatibles), (is_demuxer_element),
(are_raw_caps), (multi_queue_overrun_cb),
(multi_queue_underrun_cb), (gst_decode_group_new),
(get_current_group), (group_demuxer_event_probe),
(gst_decode_group_control_demuxer_pad),
(gst_decode_group_control_source_pad),
(gst_decode_group_check_if_blocked),
(gst_decode_group_check_if_drained), (gst_decode_group_expose),
(gst_decode_group_hide), (gst_decode_group_free),
(gst_decode_group_set_complete), (source_pad_blocked_cb),
(source_pad_event_probe), (gst_decode_pad_new), (add_fakesink),
(remove_fakesink), (find_sink_pad), (gst_decode_bin_change_state),
(plugin_init):
New decodebin2 element.
Closes #370092
* gst/playback/gstplay-marshal.list:
Added marshallers for new signals in decodebin2
* gst/playback/gstplaybasebin.c: (setup_subtitle), (make_decoder):
Use decodebin2 if *and only if* the USE_DECODEBIN2 environment variable
is set.
2006-11-28 14:40:39 +00:00
|
|
|
|
2009-09-26 10:17:49 +00:00
|
|
|
srcpad = NULL;
|
|
|
|
|
|
|
|
if (G_UNLIKELY (!group->multiqueue))
|
|
|
|
return NULL;
|
|
|
|
|
2011-11-03 16:58:57 +00:00
|
|
|
if (!(sinkpad = gst_element_get_request_pad (group->multiqueue, "sink_%u"))) {
|
2009-09-26 10:17:49 +00:00
|
|
|
GST_ERROR_OBJECT (dbin, "Couldn't get sinkpad from multiqueue");
|
|
|
|
return NULL;
|
gst/playback/: New decodebin2 element.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstdecodebin2.c: (gst_decode_bin_get_type),
(_gst_boolean_accumulator), (gst_decode_bin_class_init),
(gst_decode_bin_factory_filter), (compare_ranks), (print_feature),
(gst_decode_bin_init), (gst_decode_bin_dispose),
(gst_decode_bin_finalize), (gst_decode_bin_set_property),
(gst_decode_bin_get_property), (gst_decode_bin_set_caps),
(gst_decode_bin_get_caps), (gst_decode_bin_autoplug_continue),
(gst_decode_bin_autoplug_sort), (analyze_new_pad), (connect_pad),
(connect_element), (expose_pad), (type_found),
(pad_added_group_cb), (pad_removed_group_cb),
(no_more_pads_group_cb), (pad_added_cb), (pad_removed_cb),
(no_more_pads_cb), (find_compatibles), (is_demuxer_element),
(are_raw_caps), (multi_queue_overrun_cb),
(multi_queue_underrun_cb), (gst_decode_group_new),
(get_current_group), (group_demuxer_event_probe),
(gst_decode_group_control_demuxer_pad),
(gst_decode_group_control_source_pad),
(gst_decode_group_check_if_blocked),
(gst_decode_group_check_if_drained), (gst_decode_group_expose),
(gst_decode_group_hide), (gst_decode_group_free),
(gst_decode_group_set_complete), (source_pad_blocked_cb),
(source_pad_event_probe), (gst_decode_pad_new), (add_fakesink),
(remove_fakesink), (find_sink_pad), (gst_decode_bin_change_state),
(plugin_init):
New decodebin2 element.
Closes #370092
* gst/playback/gstplay-marshal.list:
Added marshallers for new signals in decodebin2
* gst/playback/gstplaybasebin.c: (setup_subtitle), (make_decoder):
Use decodebin2 if *and only if* the USE_DECODEBIN2 environment variable
is set.
2006-11-28 14:40:39 +00:00
|
|
|
}
|
|
|
|
|
2015-01-13 22:25:52 +00:00
|
|
|
if ((gst_pad_link_full (pad, sinkpad,
|
|
|
|
GST_PAD_LINK_CHECK_NOTHING) != GST_PAD_LINK_OK)) {
|
2009-09-26 10:17:49 +00:00
|
|
|
GST_ERROR_OBJECT (dbin, "Couldn't link demuxer and multiqueue");
|
2009-09-26 10:47:53 +00:00
|
|
|
goto error;
|
2009-09-26 10:17:49 +00:00
|
|
|
}
|
gst/playback/: New decodebin2 element.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstdecodebin2.c: (gst_decode_bin_get_type),
(_gst_boolean_accumulator), (gst_decode_bin_class_init),
(gst_decode_bin_factory_filter), (compare_ranks), (print_feature),
(gst_decode_bin_init), (gst_decode_bin_dispose),
(gst_decode_bin_finalize), (gst_decode_bin_set_property),
(gst_decode_bin_get_property), (gst_decode_bin_set_caps),
(gst_decode_bin_get_caps), (gst_decode_bin_autoplug_continue),
(gst_decode_bin_autoplug_sort), (analyze_new_pad), (connect_pad),
(connect_element), (expose_pad), (type_found),
(pad_added_group_cb), (pad_removed_group_cb),
(no_more_pads_group_cb), (pad_added_cb), (pad_removed_cb),
(no_more_pads_cb), (find_compatibles), (is_demuxer_element),
(are_raw_caps), (multi_queue_overrun_cb),
(multi_queue_underrun_cb), (gst_decode_group_new),
(get_current_group), (group_demuxer_event_probe),
(gst_decode_group_control_demuxer_pad),
(gst_decode_group_control_source_pad),
(gst_decode_group_check_if_blocked),
(gst_decode_group_check_if_drained), (gst_decode_group_expose),
(gst_decode_group_hide), (gst_decode_group_free),
(gst_decode_group_set_complete), (source_pad_blocked_cb),
(source_pad_event_probe), (gst_decode_pad_new), (add_fakesink),
(remove_fakesink), (find_sink_pad), (gst_decode_bin_change_state),
(plugin_init):
New decodebin2 element.
Closes #370092
* gst/playback/gstplay-marshal.list:
Added marshallers for new signals in decodebin2
* gst/playback/gstplaybasebin.c: (setup_subtitle), (make_decoder):
Use decodebin2 if *and only if* the USE_DECODEBIN2 environment variable
is set.
2006-11-28 14:40:39 +00:00
|
|
|
|
2009-09-26 10:47:53 +00:00
|
|
|
it = gst_pad_iterate_internal_links (sinkpad);
|
2009-09-26 10:17:49 +00:00
|
|
|
|
2011-05-05 14:03:52 +00:00
|
|
|
if (!it || (gst_iterator_next (it, &item)) != GST_ITERATOR_OK
|
|
|
|
|| ((srcpad = g_value_dup_object (&item)) == NULL)) {
|
2009-09-26 10:47:53 +00:00
|
|
|
GST_ERROR_OBJECT (dbin,
|
|
|
|
"Couldn't get srcpad from multiqueue for sinkpad %" GST_PTR_FORMAT,
|
|
|
|
sinkpad);
|
|
|
|
goto error;
|
gst/playback/: New decodebin2 element.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstdecodebin2.c: (gst_decode_bin_get_type),
(_gst_boolean_accumulator), (gst_decode_bin_class_init),
(gst_decode_bin_factory_filter), (compare_ranks), (print_feature),
(gst_decode_bin_init), (gst_decode_bin_dispose),
(gst_decode_bin_finalize), (gst_decode_bin_set_property),
(gst_decode_bin_get_property), (gst_decode_bin_set_caps),
(gst_decode_bin_get_caps), (gst_decode_bin_autoplug_continue),
(gst_decode_bin_autoplug_sort), (analyze_new_pad), (connect_pad),
(connect_element), (expose_pad), (type_found),
(pad_added_group_cb), (pad_removed_group_cb),
(no_more_pads_group_cb), (pad_added_cb), (pad_removed_cb),
(no_more_pads_cb), (find_compatibles), (is_demuxer_element),
(are_raw_caps), (multi_queue_overrun_cb),
(multi_queue_underrun_cb), (gst_decode_group_new),
(get_current_group), (group_demuxer_event_probe),
(gst_decode_group_control_demuxer_pad),
(gst_decode_group_control_source_pad),
(gst_decode_group_check_if_blocked),
(gst_decode_group_check_if_drained), (gst_decode_group_expose),
(gst_decode_group_hide), (gst_decode_group_free),
(gst_decode_group_set_complete), (source_pad_blocked_cb),
(source_pad_event_probe), (gst_decode_pad_new), (add_fakesink),
(remove_fakesink), (find_sink_pad), (gst_decode_bin_change_state),
(plugin_init):
New decodebin2 element.
Closes #370092
* gst/playback/gstplay-marshal.list:
Added marshallers for new signals in decodebin2
* gst/playback/gstplaybasebin.c: (setup_subtitle), (make_decoder):
Use decodebin2 if *and only if* the USE_DECODEBIN2 environment variable
is set.
2006-11-28 14:40:39 +00:00
|
|
|
}
|
2015-04-29 13:56:39 +00:00
|
|
|
gst_pad_add_probe (sinkpad, GST_PAD_PROBE_TYPE_EVENT_UPSTREAM,
|
|
|
|
sink_pad_event_probe, group, NULL);
|
|
|
|
gst_pad_add_probe (sinkpad, GST_PAD_PROBE_TYPE_QUERY_UPSTREAM,
|
|
|
|
sink_pad_query_probe, group, NULL);
|
|
|
|
|
2009-09-26 10:47:53 +00:00
|
|
|
CHAIN_MUTEX_LOCK (group->parent);
|
|
|
|
group->reqpads = g_list_prepend (group->reqpads, gst_object_ref (sinkpad));
|
2009-09-26 10:17:49 +00:00
|
|
|
CHAIN_MUTEX_UNLOCK (group->parent);
|
gst/playback/: New decodebin2 element.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstdecodebin2.c: (gst_decode_bin_get_type),
(_gst_boolean_accumulator), (gst_decode_bin_class_init),
(gst_decode_bin_factory_filter), (compare_ranks), (print_feature),
(gst_decode_bin_init), (gst_decode_bin_dispose),
(gst_decode_bin_finalize), (gst_decode_bin_set_property),
(gst_decode_bin_get_property), (gst_decode_bin_set_caps),
(gst_decode_bin_get_caps), (gst_decode_bin_autoplug_continue),
(gst_decode_bin_autoplug_sort), (analyze_new_pad), (connect_pad),
(connect_element), (expose_pad), (type_found),
(pad_added_group_cb), (pad_removed_group_cb),
(no_more_pads_group_cb), (pad_added_cb), (pad_removed_cb),
(no_more_pads_cb), (find_compatibles), (is_demuxer_element),
(are_raw_caps), (multi_queue_overrun_cb),
(multi_queue_underrun_cb), (gst_decode_group_new),
(get_current_group), (group_demuxer_event_probe),
(gst_decode_group_control_demuxer_pad),
(gst_decode_group_control_source_pad),
(gst_decode_group_check_if_blocked),
(gst_decode_group_check_if_drained), (gst_decode_group_expose),
(gst_decode_group_hide), (gst_decode_group_free),
(gst_decode_group_set_complete), (source_pad_blocked_cb),
(source_pad_event_probe), (gst_decode_pad_new), (add_fakesink),
(remove_fakesink), (find_sink_pad), (gst_decode_bin_change_state),
(plugin_init):
New decodebin2 element.
Closes #370092
* gst/playback/gstplay-marshal.list:
Added marshallers for new signals in decodebin2
* gst/playback/gstplaybasebin.c: (setup_subtitle), (make_decoder):
Use decodebin2 if *and only if* the USE_DECODEBIN2 environment variable
is set.
2006-11-28 14:40:39 +00:00
|
|
|
|
2009-09-26 10:17:49 +00:00
|
|
|
beach:
|
2013-02-14 10:17:31 +00:00
|
|
|
if (G_IS_VALUE (&item))
|
|
|
|
g_value_unset (&item);
|
2009-09-26 10:47:53 +00:00
|
|
|
if (it)
|
|
|
|
gst_iterator_free (it);
|
2009-09-26 10:17:49 +00:00
|
|
|
gst_object_unref (sinkpad);
|
|
|
|
return srcpad;
|
2009-09-26 10:47:53 +00:00
|
|
|
|
|
|
|
error:
|
|
|
|
gst_element_release_request_pad (group->multiqueue, sinkpad);
|
|
|
|
goto beach;
|
2009-03-19 18:19:38 +00:00
|
|
|
}
|
|
|
|
|
2009-09-26 10:17:49 +00:00
|
|
|
/* gst_decode_group_is_complete:
|
|
|
|
*
|
|
|
|
* Checks if the group is complete, this means that
|
|
|
|
* a) overrun of the multiqueue or no-more-pads happened
|
|
|
|
* b) all child chains are complete
|
2009-03-19 18:19:38 +00:00
|
|
|
*
|
2009-09-26 10:17:49 +00:00
|
|
|
* Not MT-safe, always call with decodebin expose lock
|
2009-03-19 18:19:38 +00:00
|
|
|
*/
|
|
|
|
static gboolean
|
2009-09-26 10:17:49 +00:00
|
|
|
gst_decode_group_is_complete (GstDecodeGroup * group)
|
2009-03-19 18:19:38 +00:00
|
|
|
{
|
2009-09-26 10:17:49 +00:00
|
|
|
GList *l;
|
|
|
|
gboolean complete = TRUE;
|
2009-03-19 18:19:38 +00:00
|
|
|
|
2009-09-26 10:17:49 +00:00
|
|
|
if (!group->overrun && !group->no_more_pads) {
|
|
|
|
complete = FALSE;
|
|
|
|
goto out;
|
|
|
|
}
|
2009-03-19 18:19:38 +00:00
|
|
|
|
2009-09-26 10:17:49 +00:00
|
|
|
for (l = group->children; l; l = l->next) {
|
|
|
|
GstDecodeChain *chain = l->data;
|
2009-03-19 18:19:38 +00:00
|
|
|
|
2009-09-26 10:17:49 +00:00
|
|
|
if (!gst_decode_chain_is_complete (chain)) {
|
|
|
|
complete = FALSE;
|
|
|
|
goto out;
|
|
|
|
}
|
|
|
|
}
|
gst/playback/: New decodebin2 element.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstdecodebin2.c: (gst_decode_bin_get_type),
(_gst_boolean_accumulator), (gst_decode_bin_class_init),
(gst_decode_bin_factory_filter), (compare_ranks), (print_feature),
(gst_decode_bin_init), (gst_decode_bin_dispose),
(gst_decode_bin_finalize), (gst_decode_bin_set_property),
(gst_decode_bin_get_property), (gst_decode_bin_set_caps),
(gst_decode_bin_get_caps), (gst_decode_bin_autoplug_continue),
(gst_decode_bin_autoplug_sort), (analyze_new_pad), (connect_pad),
(connect_element), (expose_pad), (type_found),
(pad_added_group_cb), (pad_removed_group_cb),
(no_more_pads_group_cb), (pad_added_cb), (pad_removed_cb),
(no_more_pads_cb), (find_compatibles), (is_demuxer_element),
(are_raw_caps), (multi_queue_overrun_cb),
(multi_queue_underrun_cb), (gst_decode_group_new),
(get_current_group), (group_demuxer_event_probe),
(gst_decode_group_control_demuxer_pad),
(gst_decode_group_control_source_pad),
(gst_decode_group_check_if_blocked),
(gst_decode_group_check_if_drained), (gst_decode_group_expose),
(gst_decode_group_hide), (gst_decode_group_free),
(gst_decode_group_set_complete), (source_pad_blocked_cb),
(source_pad_event_probe), (gst_decode_pad_new), (add_fakesink),
(remove_fakesink), (find_sink_pad), (gst_decode_bin_change_state),
(plugin_init):
New decodebin2 element.
Closes #370092
* gst/playback/gstplay-marshal.list:
Added marshallers for new signals in decodebin2
* gst/playback/gstplaybasebin.c: (setup_subtitle), (make_decoder):
Use decodebin2 if *and only if* the USE_DECODEBIN2 environment variable
is set.
2006-11-28 14:40:39 +00:00
|
|
|
|
2009-09-26 10:17:49 +00:00
|
|
|
out:
|
|
|
|
GST_DEBUG_OBJECT (group->dbin, "Group %p is complete: %d", group, complete);
|
|
|
|
return complete;
|
|
|
|
}
|
2009-03-19 18:19:38 +00:00
|
|
|
|
2009-09-26 10:17:49 +00:00
|
|
|
/* gst_decode_chain_is_complete:
|
|
|
|
*
|
|
|
|
* Returns TRUE if the chain is complete, this means either
|
|
|
|
* a) This chain is a dead end, i.e. we have no suitable plugins
|
2009-09-26 10:56:36 +00:00
|
|
|
* b) This chain ends in an endpad and this is blocked or exposed
|
2009-09-26 10:17:49 +00:00
|
|
|
*
|
|
|
|
* Not MT-safe, always call with decodebin expose lock
|
|
|
|
*/
|
|
|
|
static gboolean
|
|
|
|
gst_decode_chain_is_complete (GstDecodeChain * chain)
|
|
|
|
{
|
|
|
|
gboolean complete = FALSE;
|
|
|
|
|
2010-01-15 18:52:29 +00:00
|
|
|
CHAIN_MUTEX_LOCK (chain);
|
2013-05-15 12:51:16 +00:00
|
|
|
if (chain->dbin->shutdown)
|
|
|
|
goto out;
|
|
|
|
|
2009-09-26 10:56:36 +00:00
|
|
|
if (chain->deadend) {
|
|
|
|
complete = TRUE;
|
|
|
|
goto out;
|
|
|
|
}
|
|
|
|
|
2016-05-04 01:33:50 +00:00
|
|
|
if (chain->endpad && gst_decode_pad_is_exposable (chain->endpad)) {
|
2009-09-26 10:17:49 +00:00
|
|
|
complete = TRUE;
|
|
|
|
goto out;
|
|
|
|
}
|
|
|
|
|
|
|
|
if (chain->demuxer) {
|
|
|
|
if (chain->active_group
|
|
|
|
&& gst_decode_group_is_complete (chain->active_group)) {
|
|
|
|
complete = TRUE;
|
|
|
|
goto out;
|
|
|
|
}
|
2009-03-19 18:19:38 +00:00
|
|
|
}
|
|
|
|
|
2009-09-26 10:17:49 +00:00
|
|
|
out:
|
2010-01-15 18:52:29 +00:00
|
|
|
CHAIN_MUTEX_UNLOCK (chain);
|
2009-09-26 10:17:49 +00:00
|
|
|
GST_DEBUG_OBJECT (chain->dbin, "Chain %p is complete: %d", chain, complete);
|
|
|
|
return complete;
|
gst/playback/: New decodebin2 element.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstdecodebin2.c: (gst_decode_bin_get_type),
(_gst_boolean_accumulator), (gst_decode_bin_class_init),
(gst_decode_bin_factory_filter), (compare_ranks), (print_feature),
(gst_decode_bin_init), (gst_decode_bin_dispose),
(gst_decode_bin_finalize), (gst_decode_bin_set_property),
(gst_decode_bin_get_property), (gst_decode_bin_set_caps),
(gst_decode_bin_get_caps), (gst_decode_bin_autoplug_continue),
(gst_decode_bin_autoplug_sort), (analyze_new_pad), (connect_pad),
(connect_element), (expose_pad), (type_found),
(pad_added_group_cb), (pad_removed_group_cb),
(no_more_pads_group_cb), (pad_added_cb), (pad_removed_cb),
(no_more_pads_cb), (find_compatibles), (is_demuxer_element),
(are_raw_caps), (multi_queue_overrun_cb),
(multi_queue_underrun_cb), (gst_decode_group_new),
(get_current_group), (group_demuxer_event_probe),
(gst_decode_group_control_demuxer_pad),
(gst_decode_group_control_source_pad),
(gst_decode_group_check_if_blocked),
(gst_decode_group_check_if_drained), (gst_decode_group_expose),
(gst_decode_group_hide), (gst_decode_group_free),
(gst_decode_group_set_complete), (source_pad_blocked_cb),
(source_pad_event_probe), (gst_decode_pad_new), (add_fakesink),
(remove_fakesink), (find_sink_pad), (gst_decode_bin_change_state),
(plugin_init):
New decodebin2 element.
Closes #370092
* gst/playback/gstplay-marshal.list:
Added marshallers for new signals in decodebin2
* gst/playback/gstplaybasebin.c: (setup_subtitle), (make_decoder):
Use decodebin2 if *and only if* the USE_DECODEBIN2 environment variable
is set.
2006-11-28 14:40:39 +00:00
|
|
|
}
|
|
|
|
|
2015-05-04 09:19:28 +00:00
|
|
|
/* Flushing group/chains */
|
|
|
|
static void
|
|
|
|
flush_group (GstDecodeGroup * group, gboolean flushing)
|
|
|
|
{
|
|
|
|
GList *tmp;
|
|
|
|
|
|
|
|
GST_DEBUG ("group %p flushing:%d", group, flushing);
|
|
|
|
|
|
|
|
if (group->drained == flushing)
|
|
|
|
return;
|
|
|
|
for (tmp = group->children; tmp; tmp = tmp->next) {
|
|
|
|
GstDecodeChain *chain = (GstDecodeChain *) tmp->data;
|
|
|
|
flush_chain (chain, flushing);
|
|
|
|
}
|
|
|
|
GST_DEBUG ("Setting group %p to drained:%d", group, flushing);
|
|
|
|
group->drained = flushing;
|
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
|
|
|
flush_chain (GstDecodeChain * chain, gboolean flushing)
|
|
|
|
{
|
|
|
|
GList *tmp;
|
|
|
|
GstDecodeBin *dbin = chain->dbin;
|
|
|
|
|
|
|
|
GST_DEBUG_OBJECT (dbin, "chain %p (pad %s:%s) flushing:%d", chain,
|
|
|
|
GST_DEBUG_PAD_NAME (chain->pad), flushing);
|
|
|
|
if (chain->drained == flushing)
|
|
|
|
return;
|
|
|
|
/* if unflushing, check if we should switch to last group */
|
|
|
|
if (flushing == FALSE && chain->next_groups) {
|
|
|
|
GstDecodeGroup *target_group =
|
|
|
|
(GstDecodeGroup *) g_list_last (chain->next_groups)->data;
|
|
|
|
gst_decode_chain_start_free_hidden_groups_thread (chain);
|
|
|
|
/* Hide active group (we're sure it's not that one we'll be using) */
|
|
|
|
GST_DEBUG_OBJECT (dbin, "Switching from active group %p to group %p",
|
|
|
|
chain->active_group, target_group);
|
|
|
|
gst_decode_group_hide (chain->active_group);
|
|
|
|
chain->old_groups = g_list_prepend (chain->old_groups, chain->active_group);
|
|
|
|
chain->active_group = target_group;
|
|
|
|
/* Hide all groups but the target_group */
|
|
|
|
for (tmp = chain->next_groups; tmp; tmp = tmp->next) {
|
|
|
|
GstDecodeGroup *group = (GstDecodeGroup *) tmp->data;
|
|
|
|
if (group != target_group) {
|
|
|
|
gst_decode_group_hide (group);
|
|
|
|
chain->old_groups = g_list_prepend (chain->old_groups, group);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
/* Clear next groups */
|
|
|
|
g_list_free (chain->next_groups);
|
|
|
|
chain->next_groups = NULL;
|
|
|
|
}
|
|
|
|
/* Mark all groups as flushing */
|
|
|
|
if (chain->active_group)
|
|
|
|
flush_group (chain->active_group, flushing);
|
|
|
|
for (tmp = chain->next_groups; tmp; tmp = tmp->next) {
|
|
|
|
GstDecodeGroup *group = (GstDecodeGroup *) tmp->data;
|
|
|
|
flush_group (group, flushing);
|
|
|
|
}
|
|
|
|
GST_DEBUG ("Setting chain %p to drained:%d", chain, flushing);
|
|
|
|
chain->drained = flushing;
|
|
|
|
}
|
|
|
|
|
2011-07-25 08:41:04 +00:00
|
|
|
static gboolean
|
2011-07-28 16:44:33 +00:00
|
|
|
drain_and_switch_chains (GstDecodeChain * chain, GstDecodePad * drainpad,
|
|
|
|
gboolean * last_group, gboolean * drained, gboolean * switched);
|
|
|
|
/* drain_and_switch_chains/groups:
|
2011-01-25 16:03:23 +00:00
|
|
|
*
|
2011-07-28 16:44:33 +00:00
|
|
|
* CALL WITH CHAIN LOCK (or group parent) TAKEN !
|
2009-09-26 10:17:49 +00:00
|
|
|
*
|
2011-07-28 16:44:33 +00:00
|
|
|
* Goes down the chains/groups until it finds the chain
|
|
|
|
* to which the drainpad belongs.
|
2009-09-26 10:17:49 +00:00
|
|
|
*
|
2011-07-28 16:44:33 +00:00
|
|
|
* It marks that pad/chain as drained and then will figure
|
|
|
|
* out which group to switch to or not.
|
2011-07-25 08:41:04 +00:00
|
|
|
*
|
2011-07-28 16:44:33 +00:00
|
|
|
* last_chain will be set to TRUE if the group to which the
|
|
|
|
* pad belongs is the last one.
|
|
|
|
*
|
|
|
|
* drained will be set to TRUE if the chain/group is drained.
|
|
|
|
*
|
|
|
|
* Returns: TRUE if the chain contained the target pad */
|
2011-07-25 08:41:04 +00:00
|
|
|
static gboolean
|
2011-07-28 16:44:33 +00:00
|
|
|
drain_and_switch_group (GstDecodeGroup * group, GstDecodePad * drainpad,
|
|
|
|
gboolean * last_group, gboolean * drained, gboolean * switched)
|
2009-09-26 10:17:49 +00:00
|
|
|
{
|
2011-07-28 16:44:33 +00:00
|
|
|
gboolean handled = FALSE;
|
|
|
|
GList *tmp;
|
|
|
|
|
|
|
|
GST_DEBUG ("Checking group %p (target pad %s:%s)",
|
|
|
|
group, GST_DEBUG_PAD_NAME (drainpad));
|
|
|
|
|
|
|
|
/* Definitely can't be in drained groups */
|
|
|
|
if (G_UNLIKELY (group->drained)) {
|
|
|
|
goto beach;
|
|
|
|
}
|
2009-03-19 18:19:38 +00:00
|
|
|
|
2011-07-28 16:44:33 +00:00
|
|
|
/* Figure out if all our chains are drained with the
|
|
|
|
* new information */
|
2012-10-11 09:36:54 +00:00
|
|
|
group->drained = TRUE;
|
2011-07-28 16:44:33 +00:00
|
|
|
for (tmp = group->children; tmp; tmp = tmp->next) {
|
|
|
|
GstDecodeChain *chain = (GstDecodeChain *) tmp->data;
|
2011-08-18 15:13:23 +00:00
|
|
|
gboolean subdrained = FALSE;
|
2011-07-28 16:44:33 +00:00
|
|
|
|
|
|
|
handled |=
|
|
|
|
drain_and_switch_chains (chain, drainpad, last_group, &subdrained,
|
|
|
|
switched);
|
|
|
|
if (!subdrained)
|
2012-10-11 09:36:54 +00:00
|
|
|
group->drained = FALSE;
|
2011-07-28 16:44:33 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
beach:
|
|
|
|
GST_DEBUG ("group %p (last_group:%d, drained:%d, switched:%d, handled:%d)",
|
2012-10-11 09:36:54 +00:00
|
|
|
group, *last_group, group->drained, *switched, handled);
|
|
|
|
*drained = group->drained;
|
2011-07-28 16:44:33 +00:00
|
|
|
return handled;
|
|
|
|
}
|
|
|
|
|
|
|
|
static gboolean
|
|
|
|
drain_and_switch_chains (GstDecodeChain * chain, GstDecodePad * drainpad,
|
|
|
|
gboolean * last_group, gboolean * drained, gboolean * switched)
|
|
|
|
{
|
|
|
|
gboolean handled = FALSE;
|
|
|
|
GstDecodeBin *dbin = chain->dbin;
|
2009-03-19 18:19:38 +00:00
|
|
|
|
2014-07-14 15:29:50 +00:00
|
|
|
GST_DEBUG ("Checking chain %p %s:%s (target pad %s:%s)",
|
|
|
|
chain, GST_DEBUG_PAD_NAME (chain->pad), GST_DEBUG_PAD_NAME (drainpad));
|
2008-06-20 16:56:18 +00:00
|
|
|
|
2009-09-26 10:17:49 +00:00
|
|
|
CHAIN_MUTEX_LOCK (chain);
|
2008-06-20 16:56:18 +00:00
|
|
|
|
2017-05-03 15:02:19 +00:00
|
|
|
if (chain->pad_probe_id) {
|
|
|
|
gst_pad_remove_probe (chain->pad, chain->pad_probe_id);
|
|
|
|
chain->pad_probe_id = 0;
|
|
|
|
}
|
|
|
|
|
2012-10-11 09:36:54 +00:00
|
|
|
/* Definitely can't be in drained chains */
|
|
|
|
if (G_UNLIKELY (chain->drained)) {
|
|
|
|
goto beach;
|
|
|
|
}
|
2012-11-22 12:06:14 +00:00
|
|
|
|
2011-07-28 16:44:33 +00:00
|
|
|
if (chain->endpad) {
|
|
|
|
/* Check if we're reached the target endchain */
|
2014-07-14 15:29:50 +00:00
|
|
|
if (drainpad != NULL && chain == drainpad->chain) {
|
2011-07-28 16:44:33 +00:00
|
|
|
GST_DEBUG ("Found the target chain");
|
|
|
|
drainpad->drained = TRUE;
|
|
|
|
handled = TRUE;
|
2009-09-26 10:17:49 +00:00
|
|
|
}
|
2011-07-28 16:44:33 +00:00
|
|
|
|
2012-10-11 09:36:54 +00:00
|
|
|
chain->drained = chain->endpad->drained;
|
2011-07-28 16:44:33 +00:00
|
|
|
goto beach;
|
2009-09-26 10:17:49 +00:00
|
|
|
}
|
|
|
|
|
2011-07-28 16:44:33 +00:00
|
|
|
/* We known there are groups to switch to */
|
|
|
|
if (chain->next_groups)
|
|
|
|
*last_group = FALSE;
|
|
|
|
|
|
|
|
/* Check the active group */
|
|
|
|
if (chain->active_group) {
|
|
|
|
gboolean subdrained = FALSE;
|
|
|
|
handled = drain_and_switch_group (chain->active_group, drainpad,
|
|
|
|
last_group, &subdrained, switched);
|
|
|
|
|
|
|
|
/* The group is drained, see if we can switch to another */
|
2014-07-14 15:29:50 +00:00
|
|
|
if ((handled || drainpad == NULL) && subdrained && !*switched) {
|
2011-07-28 16:44:33 +00:00
|
|
|
if (chain->next_groups) {
|
|
|
|
/* Switch to next group */
|
|
|
|
GST_DEBUG_OBJECT (dbin, "Hiding current group %p", chain->active_group);
|
|
|
|
gst_decode_group_hide (chain->active_group);
|
|
|
|
chain->old_groups =
|
|
|
|
g_list_prepend (chain->old_groups, chain->active_group);
|
|
|
|
GST_DEBUG_OBJECT (dbin, "Switching to next group %p",
|
|
|
|
chain->next_groups->data);
|
|
|
|
chain->active_group = chain->next_groups->data;
|
|
|
|
chain->next_groups =
|
|
|
|
g_list_delete_link (chain->next_groups, chain->next_groups);
|
2015-09-29 04:42:28 +00:00
|
|
|
gst_decode_chain_start_free_hidden_groups_thread (chain);
|
2011-07-28 16:44:33 +00:00
|
|
|
*switched = TRUE;
|
2012-10-11 09:36:54 +00:00
|
|
|
chain->drained = FALSE;
|
2011-07-28 16:44:33 +00:00
|
|
|
} else {
|
|
|
|
GST_DEBUG ("Group %p was the last in chain %p", chain->active_group,
|
|
|
|
chain);
|
2012-11-22 12:06:14 +00:00
|
|
|
chain->drained = TRUE;
|
2011-07-28 16:44:33 +00:00
|
|
|
/* We're drained ! */
|
|
|
|
}
|
2013-01-09 21:39:49 +00:00
|
|
|
} else {
|
|
|
|
if (subdrained && !chain->next_groups)
|
|
|
|
*drained = TRUE;
|
2011-07-28 16:44:33 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
beach:
|
|
|
|
CHAIN_MUTEX_UNLOCK (chain);
|
|
|
|
|
|
|
|
GST_DEBUG ("Chain %p (handled:%d, last_group:%d, drained:%d, switched:%d)",
|
2012-10-11 09:36:54 +00:00
|
|
|
chain, handled, *last_group, chain->drained, *switched);
|
|
|
|
|
|
|
|
*drained = chain->drained;
|
2011-07-28 16:44:33 +00:00
|
|
|
|
2014-12-15 08:45:43 +00:00
|
|
|
if (*drained)
|
2011-10-07 16:41:32 +00:00
|
|
|
g_signal_emit (dbin, gst_decode_bin_signals[SIGNAL_DRAINED], 0, NULL);
|
|
|
|
|
2011-07-28 16:44:33 +00:00
|
|
|
return handled;
|
|
|
|
}
|
|
|
|
|
|
|
|
/* check if the group is drained, meaning all pads have seen an EOS
|
|
|
|
* event. */
|
|
|
|
static gboolean
|
|
|
|
gst_decode_pad_handle_eos (GstDecodePad * pad)
|
|
|
|
{
|
|
|
|
gboolean last_group = TRUE;
|
|
|
|
gboolean switched = FALSE;
|
|
|
|
gboolean drained = FALSE;
|
|
|
|
GstDecodeChain *chain = pad->chain;
|
|
|
|
GstDecodeBin *dbin = chain->dbin;
|
2016-03-20 03:37:03 +00:00
|
|
|
GstEvent *tmp;
|
2011-07-28 16:44:33 +00:00
|
|
|
|
|
|
|
GST_LOG_OBJECT (dbin, "pad %p", pad);
|
2016-03-20 03:37:03 +00:00
|
|
|
|
|
|
|
/* Send a stream-group-done event in case downstream needs
|
|
|
|
* to unblock before we can drain */
|
|
|
|
tmp = gst_pad_get_sticky_event (GST_PAD (pad), GST_EVENT_STREAM_START, 0);
|
|
|
|
if (tmp) {
|
|
|
|
guint group_id;
|
|
|
|
if (gst_event_parse_group_id (tmp, &group_id)) {
|
|
|
|
GstPad *peer = gst_pad_get_peer (GST_PAD (pad));
|
|
|
|
|
|
|
|
if (peer) {
|
|
|
|
GST_DEBUG_OBJECT (dbin,
|
|
|
|
"Sending stream-group-done for group %u to pad %"
|
|
|
|
GST_PTR_FORMAT, group_id, pad);
|
|
|
|
gst_pad_send_event (peer, gst_event_new_stream_group_done (group_id));
|
|
|
|
gst_object_unref (peer);
|
|
|
|
}
|
|
|
|
} else {
|
|
|
|
GST_DEBUG_OBJECT (dbin,
|
|
|
|
"No group ID to send stream-group-done on pad %" GST_PTR_FORMAT, pad);
|
|
|
|
}
|
|
|
|
gst_event_unref (tmp);
|
|
|
|
}
|
|
|
|
|
2015-02-04 11:46:09 +00:00
|
|
|
EXPOSE_LOCK (dbin);
|
2015-02-23 17:24:52 +00:00
|
|
|
if (dbin->decode_chain) {
|
|
|
|
drain_and_switch_chains (dbin->decode_chain, pad, &last_group, &drained,
|
|
|
|
&switched);
|
2011-07-28 16:44:33 +00:00
|
|
|
|
2015-02-23 17:24:52 +00:00
|
|
|
if (switched) {
|
|
|
|
/* If we resulted in a group switch, expose what's needed */
|
2015-02-04 11:46:09 +00:00
|
|
|
if (gst_decode_chain_is_complete (dbin->decode_chain))
|
|
|
|
gst_decode_bin_expose (dbin);
|
|
|
|
}
|
2009-09-26 10:17:49 +00:00
|
|
|
}
|
2015-02-04 11:46:09 +00:00
|
|
|
EXPOSE_UNLOCK (dbin);
|
2011-07-25 08:41:04 +00:00
|
|
|
|
2011-07-28 16:44:33 +00:00
|
|
|
return last_group;
|
2009-09-26 10:17:49 +00:00
|
|
|
}
|
gst/playback/: New decodebin2 element.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstdecodebin2.c: (gst_decode_bin_get_type),
(_gst_boolean_accumulator), (gst_decode_bin_class_init),
(gst_decode_bin_factory_filter), (compare_ranks), (print_feature),
(gst_decode_bin_init), (gst_decode_bin_dispose),
(gst_decode_bin_finalize), (gst_decode_bin_set_property),
(gst_decode_bin_get_property), (gst_decode_bin_set_caps),
(gst_decode_bin_get_caps), (gst_decode_bin_autoplug_continue),
(gst_decode_bin_autoplug_sort), (analyze_new_pad), (connect_pad),
(connect_element), (expose_pad), (type_found),
(pad_added_group_cb), (pad_removed_group_cb),
(no_more_pads_group_cb), (pad_added_cb), (pad_removed_cb),
(no_more_pads_cb), (find_compatibles), (is_demuxer_element),
(are_raw_caps), (multi_queue_overrun_cb),
(multi_queue_underrun_cb), (gst_decode_group_new),
(get_current_group), (group_demuxer_event_probe),
(gst_decode_group_control_demuxer_pad),
(gst_decode_group_control_source_pad),
(gst_decode_group_check_if_blocked),
(gst_decode_group_check_if_drained), (gst_decode_group_expose),
(gst_decode_group_hide), (gst_decode_group_free),
(gst_decode_group_set_complete), (source_pad_blocked_cb),
(source_pad_event_probe), (gst_decode_pad_new), (add_fakesink),
(remove_fakesink), (find_sink_pad), (gst_decode_bin_change_state),
(plugin_init):
New decodebin2 element.
Closes #370092
* gst/playback/gstplay-marshal.list:
Added marshallers for new signals in decodebin2
* gst/playback/gstplaybasebin.c: (setup_subtitle), (make_decoder):
Use decodebin2 if *and only if* the USE_DECODEBIN2 environment variable
is set.
2006-11-28 14:40:39 +00:00
|
|
|
|
2009-09-26 10:17:49 +00:00
|
|
|
/* gst_decode_group_is_drained:
|
|
|
|
*
|
|
|
|
* Check is this group is drained and cache this result.
|
|
|
|
* The group is drained if all child chains are drained.
|
|
|
|
*
|
|
|
|
* Not MT-safe, call with group->parent's lock */
|
|
|
|
static gboolean
|
|
|
|
gst_decode_group_is_drained (GstDecodeGroup * group)
|
|
|
|
{
|
|
|
|
GList *l;
|
|
|
|
gboolean drained = TRUE;
|
gst/playback/: New decodebin2 element.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstdecodebin2.c: (gst_decode_bin_get_type),
(_gst_boolean_accumulator), (gst_decode_bin_class_init),
(gst_decode_bin_factory_filter), (compare_ranks), (print_feature),
(gst_decode_bin_init), (gst_decode_bin_dispose),
(gst_decode_bin_finalize), (gst_decode_bin_set_property),
(gst_decode_bin_get_property), (gst_decode_bin_set_caps),
(gst_decode_bin_get_caps), (gst_decode_bin_autoplug_continue),
(gst_decode_bin_autoplug_sort), (analyze_new_pad), (connect_pad),
(connect_element), (expose_pad), (type_found),
(pad_added_group_cb), (pad_removed_group_cb),
(no_more_pads_group_cb), (pad_added_cb), (pad_removed_cb),
(no_more_pads_cb), (find_compatibles), (is_demuxer_element),
(are_raw_caps), (multi_queue_overrun_cb),
(multi_queue_underrun_cb), (gst_decode_group_new),
(get_current_group), (group_demuxer_event_probe),
(gst_decode_group_control_demuxer_pad),
(gst_decode_group_control_source_pad),
(gst_decode_group_check_if_blocked),
(gst_decode_group_check_if_drained), (gst_decode_group_expose),
(gst_decode_group_hide), (gst_decode_group_free),
(gst_decode_group_set_complete), (source_pad_blocked_cb),
(source_pad_event_probe), (gst_decode_pad_new), (add_fakesink),
(remove_fakesink), (find_sink_pad), (gst_decode_bin_change_state),
(plugin_init):
New decodebin2 element.
Closes #370092
* gst/playback/gstplay-marshal.list:
Added marshallers for new signals in decodebin2
* gst/playback/gstplaybasebin.c: (setup_subtitle), (make_decoder):
Use decodebin2 if *and only if* the USE_DECODEBIN2 environment variable
is set.
2006-11-28 14:40:39 +00:00
|
|
|
|
2009-09-26 10:17:49 +00:00
|
|
|
if (group->drained) {
|
|
|
|
drained = TRUE;
|
|
|
|
goto out;
|
|
|
|
}
|
|
|
|
|
|
|
|
for (l = group->children; l; l = l->next) {
|
|
|
|
GstDecodeChain *chain = l->data;
|
|
|
|
|
|
|
|
CHAIN_MUTEX_LOCK (chain);
|
|
|
|
if (!gst_decode_chain_is_drained (chain))
|
gst/playback/: New decodebin2 element.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstdecodebin2.c: (gst_decode_bin_get_type),
(_gst_boolean_accumulator), (gst_decode_bin_class_init),
(gst_decode_bin_factory_filter), (compare_ranks), (print_feature),
(gst_decode_bin_init), (gst_decode_bin_dispose),
(gst_decode_bin_finalize), (gst_decode_bin_set_property),
(gst_decode_bin_get_property), (gst_decode_bin_set_caps),
(gst_decode_bin_get_caps), (gst_decode_bin_autoplug_continue),
(gst_decode_bin_autoplug_sort), (analyze_new_pad), (connect_pad),
(connect_element), (expose_pad), (type_found),
(pad_added_group_cb), (pad_removed_group_cb),
(no_more_pads_group_cb), (pad_added_cb), (pad_removed_cb),
(no_more_pads_cb), (find_compatibles), (is_demuxer_element),
(are_raw_caps), (multi_queue_overrun_cb),
(multi_queue_underrun_cb), (gst_decode_group_new),
(get_current_group), (group_demuxer_event_probe),
(gst_decode_group_control_demuxer_pad),
(gst_decode_group_control_source_pad),
(gst_decode_group_check_if_blocked),
(gst_decode_group_check_if_drained), (gst_decode_group_expose),
(gst_decode_group_hide), (gst_decode_group_free),
(gst_decode_group_set_complete), (source_pad_blocked_cb),
(source_pad_event_probe), (gst_decode_pad_new), (add_fakesink),
(remove_fakesink), (find_sink_pad), (gst_decode_bin_change_state),
(plugin_init):
New decodebin2 element.
Closes #370092
* gst/playback/gstplay-marshal.list:
Added marshallers for new signals in decodebin2
* gst/playback/gstplaybasebin.c: (setup_subtitle), (make_decoder):
Use decodebin2 if *and only if* the USE_DECODEBIN2 environment variable
is set.
2006-11-28 14:40:39 +00:00
|
|
|
drained = FALSE;
|
2009-09-26 10:17:49 +00:00
|
|
|
CHAIN_MUTEX_UNLOCK (chain);
|
|
|
|
if (!drained)
|
|
|
|
goto out;
|
gst/playback/: New decodebin2 element.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstdecodebin2.c: (gst_decode_bin_get_type),
(_gst_boolean_accumulator), (gst_decode_bin_class_init),
(gst_decode_bin_factory_filter), (compare_ranks), (print_feature),
(gst_decode_bin_init), (gst_decode_bin_dispose),
(gst_decode_bin_finalize), (gst_decode_bin_set_property),
(gst_decode_bin_get_property), (gst_decode_bin_set_caps),
(gst_decode_bin_get_caps), (gst_decode_bin_autoplug_continue),
(gst_decode_bin_autoplug_sort), (analyze_new_pad), (connect_pad),
(connect_element), (expose_pad), (type_found),
(pad_added_group_cb), (pad_removed_group_cb),
(no_more_pads_group_cb), (pad_added_cb), (pad_removed_cb),
(no_more_pads_cb), (find_compatibles), (is_demuxer_element),
(are_raw_caps), (multi_queue_overrun_cb),
(multi_queue_underrun_cb), (gst_decode_group_new),
(get_current_group), (group_demuxer_event_probe),
(gst_decode_group_control_demuxer_pad),
(gst_decode_group_control_source_pad),
(gst_decode_group_check_if_blocked),
(gst_decode_group_check_if_drained), (gst_decode_group_expose),
(gst_decode_group_hide), (gst_decode_group_free),
(gst_decode_group_set_complete), (source_pad_blocked_cb),
(source_pad_event_probe), (gst_decode_pad_new), (add_fakesink),
(remove_fakesink), (find_sink_pad), (gst_decode_bin_change_state),
(plugin_init):
New decodebin2 element.
Closes #370092
* gst/playback/gstplay-marshal.list:
Added marshallers for new signals in decodebin2
* gst/playback/gstplaybasebin.c: (setup_subtitle), (make_decoder):
Use decodebin2 if *and only if* the USE_DECODEBIN2 environment variable
is set.
2006-11-28 14:40:39 +00:00
|
|
|
}
|
|
|
|
group->drained = drained;
|
2009-09-26 10:17:49 +00:00
|
|
|
|
|
|
|
out:
|
|
|
|
GST_DEBUG_OBJECT (group->dbin, "Group %p is drained: %d", group, drained);
|
|
|
|
return drained;
|
|
|
|
}
|
|
|
|
|
|
|
|
/* gst_decode_chain_is_drained:
|
|
|
|
*
|
|
|
|
* Check is the chain is drained, which means that
|
|
|
|
* either
|
|
|
|
*
|
|
|
|
* a) it's endpad is drained
|
|
|
|
* b) there are no pending pads, the active group is drained
|
|
|
|
* and there are no next groups
|
|
|
|
*
|
|
|
|
* Not MT-safe, call with chain lock
|
|
|
|
*/
|
|
|
|
static gboolean
|
|
|
|
gst_decode_chain_is_drained (GstDecodeChain * chain)
|
|
|
|
{
|
|
|
|
gboolean drained = FALSE;
|
|
|
|
|
|
|
|
if (chain->endpad) {
|
|
|
|
drained = chain->endpad->drained;
|
|
|
|
goto out;
|
gst/playback/: New decodebin2 element.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstdecodebin2.c: (gst_decode_bin_get_type),
(_gst_boolean_accumulator), (gst_decode_bin_class_init),
(gst_decode_bin_factory_filter), (compare_ranks), (print_feature),
(gst_decode_bin_init), (gst_decode_bin_dispose),
(gst_decode_bin_finalize), (gst_decode_bin_set_property),
(gst_decode_bin_get_property), (gst_decode_bin_set_caps),
(gst_decode_bin_get_caps), (gst_decode_bin_autoplug_continue),
(gst_decode_bin_autoplug_sort), (analyze_new_pad), (connect_pad),
(connect_element), (expose_pad), (type_found),
(pad_added_group_cb), (pad_removed_group_cb),
(no_more_pads_group_cb), (pad_added_cb), (pad_removed_cb),
(no_more_pads_cb), (find_compatibles), (is_demuxer_element),
(are_raw_caps), (multi_queue_overrun_cb),
(multi_queue_underrun_cb), (gst_decode_group_new),
(get_current_group), (group_demuxer_event_probe),
(gst_decode_group_control_demuxer_pad),
(gst_decode_group_control_source_pad),
(gst_decode_group_check_if_blocked),
(gst_decode_group_check_if_drained), (gst_decode_group_expose),
(gst_decode_group_hide), (gst_decode_group_free),
(gst_decode_group_set_complete), (source_pad_blocked_cb),
(source_pad_event_probe), (gst_decode_pad_new), (add_fakesink),
(remove_fakesink), (find_sink_pad), (gst_decode_bin_change_state),
(plugin_init):
New decodebin2 element.
Closes #370092
* gst/playback/gstplay-marshal.list:
Added marshallers for new signals in decodebin2
* gst/playback/gstplaybasebin.c: (setup_subtitle), (make_decoder):
Use decodebin2 if *and only if* the USE_DECODEBIN2 environment variable
is set.
2006-11-28 14:40:39 +00:00
|
|
|
}
|
2008-06-20 16:56:18 +00:00
|
|
|
|
2009-09-26 10:17:49 +00:00
|
|
|
if (chain->pending_pads) {
|
|
|
|
drained = FALSE;
|
|
|
|
goto out;
|
gst/playback/gstdecodebin2.c: Add drained signal fired when decodebin finishes decoding the data.
Original commit message from CVS:
* gst/playback/gstdecodebin2.c: (gst_decode_bin_class_init),
(gst_decode_group_check_if_drained), (source_pad_event_probe),
(remove_fakesink):
Add drained signal fired when decodebin finishes decoding the data.
Remove deprecated STATE_DIRTY message.
* gst/playback/gsturidecodebin.c: (gst_uri_decode_bin_class_init),
(unknown_type_cb), (new_decoded_pad_cb), (pad_removed_cb),
(analyse_source), (proxy_drained_signal), (make_decoder),
(source_new_pad), (value_list_append_structure_list),
(handle_redirect_message), (handle_message):
Proxy the new drained signal.
Handle pad removed from decodebin.
Handle redirect messages by sorting multiple redirections based on the
connection speed.
2007-11-16 12:51:44 +00:00
|
|
|
}
|
2009-09-26 10:17:49 +00:00
|
|
|
|
|
|
|
if (chain->active_group && gst_decode_group_is_drained (chain->active_group)
|
|
|
|
&& !chain->next_groups) {
|
|
|
|
drained = TRUE;
|
|
|
|
goto out;
|
|
|
|
}
|
|
|
|
|
|
|
|
out:
|
|
|
|
GST_DEBUG_OBJECT (chain->dbin, "Chain %p is drained: %d", chain, drained);
|
|
|
|
return drained;
|
gst/playback/: New decodebin2 element.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstdecodebin2.c: (gst_decode_bin_get_type),
(_gst_boolean_accumulator), (gst_decode_bin_class_init),
(gst_decode_bin_factory_filter), (compare_ranks), (print_feature),
(gst_decode_bin_init), (gst_decode_bin_dispose),
(gst_decode_bin_finalize), (gst_decode_bin_set_property),
(gst_decode_bin_get_property), (gst_decode_bin_set_caps),
(gst_decode_bin_get_caps), (gst_decode_bin_autoplug_continue),
(gst_decode_bin_autoplug_sort), (analyze_new_pad), (connect_pad),
(connect_element), (expose_pad), (type_found),
(pad_added_group_cb), (pad_removed_group_cb),
(no_more_pads_group_cb), (pad_added_cb), (pad_removed_cb),
(no_more_pads_cb), (find_compatibles), (is_demuxer_element),
(are_raw_caps), (multi_queue_overrun_cb),
(multi_queue_underrun_cb), (gst_decode_group_new),
(get_current_group), (group_demuxer_event_probe),
(gst_decode_group_control_demuxer_pad),
(gst_decode_group_control_source_pad),
(gst_decode_group_check_if_blocked),
(gst_decode_group_check_if_drained), (gst_decode_group_expose),
(gst_decode_group_hide), (gst_decode_group_free),
(gst_decode_group_set_complete), (source_pad_blocked_cb),
(source_pad_event_probe), (gst_decode_pad_new), (add_fakesink),
(remove_fakesink), (find_sink_pad), (gst_decode_bin_change_state),
(plugin_init):
New decodebin2 element.
Closes #370092
* gst/playback/gstplay-marshal.list:
Added marshallers for new signals in decodebin2
* gst/playback/gstplaybasebin.c: (setup_subtitle), (make_decoder):
Use decodebin2 if *and only if* the USE_DECODEBIN2 environment variable
is set.
2006-11-28 14:40:39 +00:00
|
|
|
}
|
|
|
|
|
2013-02-06 11:41:19 +00:00
|
|
|
static gboolean
|
|
|
|
gst_decode_group_reset_buffering (GstDecodeGroup * group)
|
|
|
|
{
|
|
|
|
GList *l;
|
|
|
|
gboolean ret = TRUE;
|
|
|
|
|
|
|
|
GST_DEBUG_OBJECT (group->dbin, "Group reset buffering %p %s", group,
|
|
|
|
GST_ELEMENT_NAME (group->multiqueue));
|
|
|
|
for (l = group->children; l; l = l->next) {
|
|
|
|
GstDecodeChain *chain = l->data;
|
|
|
|
|
|
|
|
CHAIN_MUTEX_LOCK (chain);
|
|
|
|
if (!gst_decode_chain_reset_buffering (chain)) {
|
|
|
|
ret = FALSE;
|
|
|
|
}
|
|
|
|
CHAIN_MUTEX_UNLOCK (chain);
|
|
|
|
}
|
|
|
|
|
2015-02-15 23:25:03 +00:00
|
|
|
decodebin_set_queue_size_full (group->dbin, group->multiqueue, !ret,
|
2015-08-18 15:47:21 +00:00
|
|
|
FALSE, (group->parent ? group->parent->seekable : TRUE));
|
2015-02-15 23:25:03 +00:00
|
|
|
|
2013-02-06 11:41:19 +00:00
|
|
|
if (ret) {
|
|
|
|
/* all chains are buffering already, no need to do it here */
|
|
|
|
g_object_set (group->multiqueue, "use-buffering", FALSE, NULL);
|
|
|
|
} else {
|
2014-02-20 14:07:26 +00:00
|
|
|
g_object_set (group->multiqueue, "use-buffering", TRUE,
|
|
|
|
"low-percent", group->dbin->low_percent,
|
|
|
|
"high-percent", group->dbin->high_percent, NULL);
|
2013-02-06 11:41:19 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
GST_DEBUG_OBJECT (group->dbin, "Setting %s buffering to %d",
|
|
|
|
GST_ELEMENT_NAME (group->multiqueue), !ret);
|
|
|
|
return TRUE;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2007-02-20 11:20:52 +00:00
|
|
|
/* sort_end_pads:
|
|
|
|
* GCompareFunc to use with lists of GstPad.
|
|
|
|
* Sorts pads by mime type.
|
|
|
|
* First video (raw, then non-raw), then audio (raw, then non-raw),
|
|
|
|
* then others.
|
|
|
|
*
|
|
|
|
* Return: negative if a<b, 0 if a==b, positive if a>b
|
|
|
|
*/
|
2008-11-21 00:04:48 +00:00
|
|
|
static gint
|
|
|
|
sort_end_pads (GstDecodePad * da, GstDecodePad * db)
|
2007-02-20 11:20:52 +00:00
|
|
|
{
|
|
|
|
gint va, vb;
|
|
|
|
GstCaps *capsa, *capsb;
|
|
|
|
GstStructure *sa, *sb;
|
|
|
|
const gchar *namea, *nameb;
|
2013-01-19 13:03:03 +00:00
|
|
|
gchar *ida, *idb;
|
|
|
|
gint ret;
|
2007-02-20 11:20:52 +00:00
|
|
|
|
2010-06-28 08:53:57 +00:00
|
|
|
capsa = get_pad_caps (GST_PAD_CAST (da));
|
|
|
|
capsb = get_pad_caps (GST_PAD_CAST (db));
|
2007-02-20 11:20:52 +00:00
|
|
|
|
|
|
|
sa = gst_caps_get_structure ((const GstCaps *) capsa, 0);
|
|
|
|
sb = gst_caps_get_structure ((const GstCaps *) capsb, 0);
|
|
|
|
|
|
|
|
namea = gst_structure_get_name (sa);
|
|
|
|
nameb = gst_structure_get_name (sb);
|
|
|
|
|
2011-06-16 10:48:33 +00:00
|
|
|
if (g_strrstr (namea, "video/x-raw"))
|
2007-02-20 11:20:52 +00:00
|
|
|
va = 0;
|
|
|
|
else if (g_strrstr (namea, "video/"))
|
|
|
|
va = 1;
|
|
|
|
else if (g_strrstr (namea, "audio/x-raw"))
|
|
|
|
va = 2;
|
|
|
|
else if (g_strrstr (namea, "audio/"))
|
|
|
|
va = 3;
|
|
|
|
else
|
|
|
|
va = 4;
|
|
|
|
|
2011-06-16 10:48:33 +00:00
|
|
|
if (g_strrstr (nameb, "video/x-raw"))
|
2007-02-20 11:20:52 +00:00
|
|
|
vb = 0;
|
|
|
|
else if (g_strrstr (nameb, "video/"))
|
|
|
|
vb = 1;
|
|
|
|
else if (g_strrstr (nameb, "audio/x-raw"))
|
|
|
|
vb = 2;
|
|
|
|
else if (g_strrstr (nameb, "audio/"))
|
|
|
|
vb = 3;
|
|
|
|
else
|
|
|
|
vb = 4;
|
|
|
|
|
|
|
|
gst_caps_unref (capsa);
|
|
|
|
gst_caps_unref (capsb);
|
|
|
|
|
2013-01-19 13:03:03 +00:00
|
|
|
if (va != vb)
|
|
|
|
return va - vb;
|
|
|
|
|
|
|
|
/* if otherwise the same, sort by stream-id */
|
|
|
|
ida = gst_pad_get_stream_id (GST_PAD_CAST (da));
|
|
|
|
idb = gst_pad_get_stream_id (GST_PAD_CAST (db));
|
|
|
|
ret = (ida) ? ((idb) ? strcmp (ida, idb) : -1) : 1;
|
|
|
|
g_free (ida);
|
|
|
|
g_free (idb);
|
|
|
|
|
|
|
|
return ret;
|
2007-02-20 11:20:52 +00:00
|
|
|
}
|
|
|
|
|
2009-10-15 11:13:43 +00:00
|
|
|
static GstCaps *
|
2011-11-03 12:10:31 +00:00
|
|
|
_gst_element_get_linked_caps (GstElement * src, GstElement * sink,
|
2016-12-17 19:34:40 +00:00
|
|
|
GstElement * capsfilter, GstPad ** srcpad)
|
2009-10-15 11:13:43 +00:00
|
|
|
{
|
|
|
|
GstIterator *it;
|
|
|
|
GstElement *parent;
|
|
|
|
GstPad *pad, *peer;
|
|
|
|
gboolean done = FALSE;
|
|
|
|
GstCaps *caps = NULL;
|
2011-05-05 14:03:52 +00:00
|
|
|
GValue item = { 0, };
|
2009-10-15 11:13:43 +00:00
|
|
|
|
|
|
|
it = gst_element_iterate_src_pads (src);
|
|
|
|
while (!done) {
|
2011-05-05 14:03:52 +00:00
|
|
|
switch (gst_iterator_next (it, &item)) {
|
2009-10-15 11:13:43 +00:00
|
|
|
case GST_ITERATOR_OK:
|
2011-05-05 14:03:52 +00:00
|
|
|
pad = g_value_get_object (&item);
|
2009-10-15 11:13:43 +00:00
|
|
|
peer = gst_pad_get_peer (pad);
|
|
|
|
if (peer) {
|
|
|
|
parent = gst_pad_get_parent_element (peer);
|
2016-12-17 19:34:40 +00:00
|
|
|
if (parent == sink || (capsfilter != NULL && parent == capsfilter)) {
|
2011-08-15 10:18:15 +00:00
|
|
|
caps = gst_pad_get_current_caps (pad);
|
2016-12-17 19:34:40 +00:00
|
|
|
*srcpad = gst_object_ref (pad);
|
2009-10-15 11:13:43 +00:00
|
|
|
done = TRUE;
|
|
|
|
}
|
|
|
|
|
|
|
|
if (parent)
|
|
|
|
gst_object_unref (parent);
|
|
|
|
gst_object_unref (peer);
|
|
|
|
}
|
2011-05-05 14:03:52 +00:00
|
|
|
g_value_reset (&item);
|
2009-10-15 11:13:43 +00:00
|
|
|
break;
|
|
|
|
case GST_ITERATOR_RESYNC:
|
|
|
|
gst_iterator_resync (it);
|
|
|
|
break;
|
|
|
|
case GST_ITERATOR_ERROR:
|
|
|
|
case GST_ITERATOR_DONE:
|
|
|
|
done = TRUE;
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
2011-05-05 14:03:52 +00:00
|
|
|
g_value_unset (&item);
|
2009-10-15 11:13:43 +00:00
|
|
|
gst_iterator_free (it);
|
|
|
|
|
|
|
|
return caps;
|
|
|
|
}
|
|
|
|
|
|
|
|
static GQuark topology_structure_name = 0;
|
|
|
|
static GQuark topology_caps = 0;
|
|
|
|
static GQuark topology_next = 0;
|
|
|
|
static GQuark topology_pad = 0;
|
2011-11-03 12:10:31 +00:00
|
|
|
static GQuark topology_element_srcpad = 0;
|
2009-10-15 11:13:43 +00:00
|
|
|
|
|
|
|
/* FIXME: Invent gst_structure_take_structure() to prevent all the
|
|
|
|
* structure copying for nothing
|
|
|
|
*/
|
|
|
|
static GstStructure *
|
|
|
|
gst_decode_chain_get_topology (GstDecodeChain * chain)
|
|
|
|
{
|
|
|
|
GstStructure *s, *u;
|
|
|
|
GList *l;
|
|
|
|
GstCaps *caps;
|
|
|
|
|
2010-09-24 14:02:42 +00:00
|
|
|
if (G_UNLIKELY ((chain->endpad || chain->deadend)
|
|
|
|
&& (chain->endcaps == NULL))) {
|
|
|
|
GST_WARNING ("End chain without valid caps !");
|
|
|
|
return NULL;
|
|
|
|
}
|
|
|
|
|
2011-10-29 07:03:07 +00:00
|
|
|
u = gst_structure_new_id_empty (topology_structure_name);
|
2009-10-15 11:13:43 +00:00
|
|
|
|
|
|
|
/* Now at the last element */
|
2011-10-03 12:51:56 +00:00
|
|
|
if ((chain->elements || !chain->active_group) &&
|
|
|
|
(chain->endpad || chain->deadend)) {
|
2016-12-17 19:35:24 +00:00
|
|
|
GstPad *srcpad;
|
|
|
|
|
2011-10-29 07:03:07 +00:00
|
|
|
s = gst_structure_new_id_empty (topology_structure_name);
|
2009-10-15 11:13:43 +00:00
|
|
|
gst_structure_id_set (u, topology_caps, GST_TYPE_CAPS, chain->endcaps,
|
|
|
|
NULL);
|
|
|
|
|
2011-11-03 12:10:31 +00:00
|
|
|
if (chain->endpad) {
|
2009-10-15 11:13:43 +00:00
|
|
|
gst_structure_id_set (u, topology_pad, GST_TYPE_PAD, chain->endpad, NULL);
|
2016-12-17 19:35:24 +00:00
|
|
|
|
|
|
|
srcpad = gst_ghost_pad_get_target (GST_GHOST_PAD_CAST (chain->endpad));
|
2011-11-03 12:10:31 +00:00
|
|
|
gst_structure_id_set (u, topology_element_srcpad, GST_TYPE_PAD,
|
2016-12-17 19:35:24 +00:00
|
|
|
srcpad, NULL);
|
|
|
|
|
|
|
|
gst_object_unref (srcpad);
|
2011-11-03 12:10:31 +00:00
|
|
|
}
|
2016-12-17 19:35:24 +00:00
|
|
|
|
2009-10-15 11:13:43 +00:00
|
|
|
gst_structure_id_set (s, topology_next, GST_TYPE_STRUCTURE, u, NULL);
|
|
|
|
gst_structure_free (u);
|
|
|
|
u = s;
|
|
|
|
} else if (chain->active_group) {
|
|
|
|
GValue list = { 0, };
|
|
|
|
GValue item = { 0, };
|
|
|
|
|
|
|
|
g_value_init (&list, GST_TYPE_LIST);
|
|
|
|
g_value_init (&item, GST_TYPE_STRUCTURE);
|
|
|
|
for (l = chain->active_group->children; l; l = l->next) {
|
|
|
|
s = gst_decode_chain_get_topology (l->data);
|
2010-09-24 14:02:42 +00:00
|
|
|
if (s) {
|
|
|
|
gst_value_set_structure (&item, s);
|
|
|
|
gst_value_list_append_value (&list, &item);
|
|
|
|
g_value_reset (&item);
|
|
|
|
gst_structure_free (s);
|
|
|
|
}
|
2009-10-15 11:13:43 +00:00
|
|
|
}
|
|
|
|
gst_structure_id_set_value (u, topology_next, &list);
|
|
|
|
g_value_unset (&list);
|
|
|
|
g_value_unset (&item);
|
|
|
|
}
|
|
|
|
|
|
|
|
/* Get caps between all elements in this chain */
|
2010-01-26 15:47:40 +00:00
|
|
|
l = (chain->elements && chain->elements->next) ? chain->elements : NULL;
|
2009-10-15 11:13:43 +00:00
|
|
|
for (; l && l->next; l = l->next) {
|
2011-06-26 13:40:17 +00:00
|
|
|
GstDecodeElement *delem, *delem_next;
|
2016-12-17 19:34:40 +00:00
|
|
|
GstElement *elem, *capsfilter, *elem_next;
|
2011-06-26 13:40:17 +00:00
|
|
|
GstCaps *caps;
|
2011-11-03 12:10:31 +00:00
|
|
|
GstPad *srcpad;
|
2011-06-26 13:40:17 +00:00
|
|
|
|
|
|
|
delem = l->data;
|
|
|
|
elem = delem->element;
|
|
|
|
delem_next = l->next->data;
|
|
|
|
elem_next = delem_next->element;
|
2016-12-17 19:34:40 +00:00
|
|
|
capsfilter = delem_next->capsfilter;
|
2011-11-03 12:10:31 +00:00
|
|
|
srcpad = NULL;
|
2011-06-26 13:40:17 +00:00
|
|
|
|
2016-12-17 19:34:40 +00:00
|
|
|
caps = _gst_element_get_linked_caps (elem_next, elem, capsfilter, &srcpad);
|
2009-10-15 11:13:43 +00:00
|
|
|
|
2011-02-08 10:31:34 +00:00
|
|
|
if (caps) {
|
2011-10-29 07:03:07 +00:00
|
|
|
s = gst_structure_new_id_empty (topology_structure_name);
|
2011-02-08 10:31:34 +00:00
|
|
|
gst_structure_id_set (u, topology_caps, GST_TYPE_CAPS, caps, NULL);
|
|
|
|
gst_caps_unref (caps);
|
2009-10-15 11:13:43 +00:00
|
|
|
|
2011-02-08 10:31:34 +00:00
|
|
|
gst_structure_id_set (s, topology_next, GST_TYPE_STRUCTURE, u, NULL);
|
|
|
|
gst_structure_free (u);
|
|
|
|
u = s;
|
|
|
|
}
|
2011-11-03 12:10:31 +00:00
|
|
|
|
|
|
|
if (srcpad) {
|
|
|
|
gst_structure_id_set (u, topology_element_srcpad, GST_TYPE_PAD, srcpad,
|
|
|
|
NULL);
|
|
|
|
gst_object_unref (srcpad);
|
|
|
|
}
|
2009-10-15 11:13:43 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/* Caps that resulted in this chain */
|
2015-11-23 06:06:02 +00:00
|
|
|
caps = get_pad_caps (chain->pad);
|
|
|
|
if (G_UNLIKELY (!caps)) {
|
|
|
|
GST_WARNING_OBJECT (chain->pad, "Couldn't get the caps of decode chain");
|
|
|
|
return u;
|
2009-10-20 07:00:28 +00:00
|
|
|
}
|
2011-10-20 10:04:52 +00:00
|
|
|
gst_structure_id_set (u, topology_caps, GST_TYPE_CAPS, caps, NULL);
|
2011-11-03 12:10:31 +00:00
|
|
|
gst_structure_id_set (u, topology_element_srcpad, GST_TYPE_PAD, chain->pad,
|
|
|
|
NULL);
|
2009-10-15 11:13:43 +00:00
|
|
|
gst_caps_unref (caps);
|
|
|
|
|
|
|
|
return u;
|
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
|
|
|
gst_decode_bin_post_topology_message (GstDecodeBin * dbin)
|
|
|
|
{
|
|
|
|
GstStructure *s;
|
|
|
|
GstMessage *msg;
|
|
|
|
|
|
|
|
s = gst_decode_chain_get_topology (dbin->decode_chain);
|
|
|
|
|
2015-11-23 06:06:02 +00:00
|
|
|
if (G_UNLIKELY (s == NULL))
|
|
|
|
return;
|
2009-10-15 11:13:43 +00:00
|
|
|
msg = gst_message_new_element (GST_OBJECT (dbin), s);
|
|
|
|
gst_element_post_message (GST_ELEMENT (dbin), msg);
|
|
|
|
}
|
|
|
|
|
2013-04-04 12:53:32 +00:00
|
|
|
static gboolean
|
|
|
|
debug_sticky_event (GstPad * pad, GstEvent ** event, gpointer user_data)
|
|
|
|
{
|
2015-04-09 03:44:15 +00:00
|
|
|
GST_DEBUG_OBJECT (pad, "sticky event %s (%p)", GST_EVENT_TYPE_NAME (*event),
|
|
|
|
*event);
|
2013-04-04 12:53:32 +00:00
|
|
|
return TRUE;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2009-09-26 10:17:49 +00:00
|
|
|
/* Must only be called if the toplevel chain is complete and blocked! */
|
|
|
|
/* Not MT-safe, call with decodebin expose lock! */
|
2008-11-21 00:04:48 +00:00
|
|
|
static gboolean
|
2009-09-26 10:17:49 +00:00
|
|
|
gst_decode_bin_expose (GstDecodeBin * dbin)
|
gst/playback/: New decodebin2 element.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstdecodebin2.c: (gst_decode_bin_get_type),
(_gst_boolean_accumulator), (gst_decode_bin_class_init),
(gst_decode_bin_factory_filter), (compare_ranks), (print_feature),
(gst_decode_bin_init), (gst_decode_bin_dispose),
(gst_decode_bin_finalize), (gst_decode_bin_set_property),
(gst_decode_bin_get_property), (gst_decode_bin_set_caps),
(gst_decode_bin_get_caps), (gst_decode_bin_autoplug_continue),
(gst_decode_bin_autoplug_sort), (analyze_new_pad), (connect_pad),
(connect_element), (expose_pad), (type_found),
(pad_added_group_cb), (pad_removed_group_cb),
(no_more_pads_group_cb), (pad_added_cb), (pad_removed_cb),
(no_more_pads_cb), (find_compatibles), (is_demuxer_element),
(are_raw_caps), (multi_queue_overrun_cb),
(multi_queue_underrun_cb), (gst_decode_group_new),
(get_current_group), (group_demuxer_event_probe),
(gst_decode_group_control_demuxer_pad),
(gst_decode_group_control_source_pad),
(gst_decode_group_check_if_blocked),
(gst_decode_group_check_if_drained), (gst_decode_group_expose),
(gst_decode_group_hide), (gst_decode_group_free),
(gst_decode_group_set_complete), (source_pad_blocked_cb),
(source_pad_event_probe), (gst_decode_pad_new), (add_fakesink),
(remove_fakesink), (find_sink_pad), (gst_decode_bin_change_state),
(plugin_init):
New decodebin2 element.
Closes #370092
* gst/playback/gstplay-marshal.list:
Added marshallers for new signals in decodebin2
* gst/playback/gstplaybasebin.c: (setup_subtitle), (make_decoder):
Use decodebin2 if *and only if* the USE_DECODEBIN2 environment variable
is set.
2006-11-28 14:40:39 +00:00
|
|
|
{
|
2014-08-25 13:22:46 +00:00
|
|
|
GList *tmp, *endpads;
|
|
|
|
gboolean missing_plugin;
|
2014-08-25 17:59:40 +00:00
|
|
|
GString *missing_plugin_details;
|
2014-08-25 13:22:46 +00:00
|
|
|
gboolean already_exposed;
|
|
|
|
gboolean last_group;
|
gst/playback/: New decodebin2 element.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstdecodebin2.c: (gst_decode_bin_get_type),
(_gst_boolean_accumulator), (gst_decode_bin_class_init),
(gst_decode_bin_factory_filter), (compare_ranks), (print_feature),
(gst_decode_bin_init), (gst_decode_bin_dispose),
(gst_decode_bin_finalize), (gst_decode_bin_set_property),
(gst_decode_bin_get_property), (gst_decode_bin_set_caps),
(gst_decode_bin_get_caps), (gst_decode_bin_autoplug_continue),
(gst_decode_bin_autoplug_sort), (analyze_new_pad), (connect_pad),
(connect_element), (expose_pad), (type_found),
(pad_added_group_cb), (pad_removed_group_cb),
(no_more_pads_group_cb), (pad_added_cb), (pad_removed_cb),
(no_more_pads_cb), (find_compatibles), (is_demuxer_element),
(are_raw_caps), (multi_queue_overrun_cb),
(multi_queue_underrun_cb), (gst_decode_group_new),
(get_current_group), (group_demuxer_event_probe),
(gst_decode_group_control_demuxer_pad),
(gst_decode_group_control_source_pad),
(gst_decode_group_check_if_blocked),
(gst_decode_group_check_if_drained), (gst_decode_group_expose),
(gst_decode_group_hide), (gst_decode_group_free),
(gst_decode_group_set_complete), (source_pad_blocked_cb),
(source_pad_event_probe), (gst_decode_pad_new), (add_fakesink),
(remove_fakesink), (find_sink_pad), (gst_decode_bin_change_state),
(plugin_init):
New decodebin2 element.
Closes #370092
* gst/playback/gstplay-marshal.list:
Added marshallers for new signals in decodebin2
* gst/playback/gstplaybasebin.c: (setup_subtitle), (make_decoder):
Use decodebin2 if *and only if* the USE_DECODEBIN2 environment variable
is set.
2006-11-28 14:40:39 +00:00
|
|
|
|
2014-07-14 15:29:50 +00:00
|
|
|
retry:
|
2014-08-25 13:22:46 +00:00
|
|
|
endpads = NULL;
|
|
|
|
missing_plugin = FALSE;
|
|
|
|
already_exposed = TRUE;
|
|
|
|
last_group = TRUE;
|
|
|
|
|
2014-08-25 17:59:40 +00:00
|
|
|
missing_plugin_details = g_string_new ("");
|
|
|
|
|
2009-09-26 10:17:49 +00:00
|
|
|
GST_DEBUG_OBJECT (dbin, "Exposing currently active chains/groups");
|
gst/playback/: New decodebin2 element.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstdecodebin2.c: (gst_decode_bin_get_type),
(_gst_boolean_accumulator), (gst_decode_bin_class_init),
(gst_decode_bin_factory_filter), (compare_ranks), (print_feature),
(gst_decode_bin_init), (gst_decode_bin_dispose),
(gst_decode_bin_finalize), (gst_decode_bin_set_property),
(gst_decode_bin_get_property), (gst_decode_bin_set_caps),
(gst_decode_bin_get_caps), (gst_decode_bin_autoplug_continue),
(gst_decode_bin_autoplug_sort), (analyze_new_pad), (connect_pad),
(connect_element), (expose_pad), (type_found),
(pad_added_group_cb), (pad_removed_group_cb),
(no_more_pads_group_cb), (pad_added_cb), (pad_removed_cb),
(no_more_pads_cb), (find_compatibles), (is_demuxer_element),
(are_raw_caps), (multi_queue_overrun_cb),
(multi_queue_underrun_cb), (gst_decode_group_new),
(get_current_group), (group_demuxer_event_probe),
(gst_decode_group_control_demuxer_pad),
(gst_decode_group_control_source_pad),
(gst_decode_group_check_if_blocked),
(gst_decode_group_check_if_drained), (gst_decode_group_expose),
(gst_decode_group_hide), (gst_decode_group_free),
(gst_decode_group_set_complete), (source_pad_blocked_cb),
(source_pad_event_probe), (gst_decode_pad_new), (add_fakesink),
(remove_fakesink), (find_sink_pad), (gst_decode_bin_change_state),
(plugin_init):
New decodebin2 element.
Closes #370092
* gst/playback/gstplay-marshal.list:
Added marshallers for new signals in decodebin2
* gst/playback/gstplaybasebin.c: (setup_subtitle), (make_decoder):
Use decodebin2 if *and only if* the USE_DECODEBIN2 environment variable
is set.
2006-11-28 14:40:39 +00:00
|
|
|
|
2009-10-20 06:52:36 +00:00
|
|
|
/* Don't expose if we're currently shutting down */
|
|
|
|
DYN_LOCK (dbin);
|
2014-11-28 13:28:06 +00:00
|
|
|
if (G_UNLIKELY (dbin->shutdown)) {
|
2009-10-20 06:52:36 +00:00
|
|
|
GST_WARNING_OBJECT (dbin, "Currently, shutting down, aborting exposing");
|
|
|
|
DYN_UNLOCK (dbin);
|
|
|
|
return FALSE;
|
|
|
|
}
|
|
|
|
DYN_UNLOCK (dbin);
|
|
|
|
|
2009-09-26 10:17:49 +00:00
|
|
|
/* Get the pads that we're going to expose and mark things as exposed */
|
2014-07-14 15:29:50 +00:00
|
|
|
if (!gst_decode_chain_expose (dbin->decode_chain, &endpads, &missing_plugin,
|
2014-08-25 17:59:40 +00:00
|
|
|
missing_plugin_details, &last_group)) {
|
2009-09-26 10:17:49 +00:00
|
|
|
g_list_foreach (endpads, (GFunc) gst_object_unref, NULL);
|
|
|
|
g_list_free (endpads);
|
2014-08-25 17:59:40 +00:00
|
|
|
g_string_free (missing_plugin_details, TRUE);
|
2017-11-02 06:55:16 +00:00
|
|
|
/* Failures could be due to the fact that we are currently shutting down (recheck) */
|
|
|
|
DYN_LOCK (dbin);
|
|
|
|
if (G_UNLIKELY (dbin->shutdown)) {
|
|
|
|
GST_WARNING_OBJECT (dbin, "Currently, shutting down, aborting exposing");
|
|
|
|
DYN_UNLOCK (dbin);
|
|
|
|
return FALSE;
|
|
|
|
}
|
|
|
|
DYN_UNLOCK (dbin);
|
2009-09-26 10:17:49 +00:00
|
|
|
GST_ERROR_OBJECT (dbin, "Broken chain/group tree");
|
|
|
|
g_return_val_if_reached (FALSE);
|
2007-02-20 11:20:52 +00:00
|
|
|
return FALSE;
|
|
|
|
}
|
2009-09-26 10:17:49 +00:00
|
|
|
if (endpads == NULL) {
|
2009-11-19 17:51:33 +00:00
|
|
|
if (missing_plugin) {
|
2014-08-25 17:59:40 +00:00
|
|
|
if (missing_plugin_details->len > 0) {
|
|
|
|
gchar *details = g_string_free (missing_plugin_details, FALSE);
|
|
|
|
GST_ELEMENT_ERROR (dbin, CORE, MISSING_PLUGIN, (NULL),
|
|
|
|
("no suitable plugins found:\n%s", details));
|
|
|
|
g_free (details);
|
|
|
|
} else {
|
|
|
|
g_string_free (missing_plugin_details, TRUE);
|
|
|
|
GST_ELEMENT_ERROR (dbin, CORE, MISSING_PLUGIN, (NULL),
|
|
|
|
("no suitable plugins found"));
|
|
|
|
}
|
2009-11-19 17:51:33 +00:00
|
|
|
} else {
|
|
|
|
/* in this case, the stream ended without buffers,
|
|
|
|
* just post a warning */
|
2014-08-25 17:59:40 +00:00
|
|
|
g_string_free (missing_plugin_details, TRUE);
|
|
|
|
|
2014-07-14 15:29:50 +00:00
|
|
|
GST_WARNING_OBJECT (dbin, "All streams finished without buffers. "
|
|
|
|
"Last group: %d", last_group);
|
|
|
|
if (last_group) {
|
|
|
|
GST_ELEMENT_ERROR (dbin, STREAM, FAILED, (NULL),
|
|
|
|
("all streams without buffers"));
|
|
|
|
} else {
|
|
|
|
gboolean switched = FALSE;
|
|
|
|
gboolean drained = FALSE;
|
|
|
|
|
|
|
|
drain_and_switch_chains (dbin->decode_chain, NULL, &last_group,
|
|
|
|
&drained, &switched);
|
|
|
|
GST_ELEMENT_WARNING (dbin, STREAM, FAILED, (NULL),
|
|
|
|
("all streams without buffers"));
|
2015-07-14 03:03:10 +00:00
|
|
|
if (switched) {
|
|
|
|
if (gst_decode_chain_is_complete (dbin->decode_chain))
|
|
|
|
goto retry;
|
|
|
|
else
|
|
|
|
return FALSE;
|
|
|
|
}
|
2014-07-14 15:29:50 +00:00
|
|
|
}
|
2009-11-19 17:51:33 +00:00
|
|
|
}
|
2014-06-04 12:14:14 +00:00
|
|
|
|
|
|
|
do_async_done (dbin);
|
2009-09-26 10:17:49 +00:00
|
|
|
return FALSE;
|
gst/playback/gstdecodebin2.c: Remove fakesink hack, we can now implement this more elegantly.
Original commit message from CVS:
* gst/playback/gstdecodebin2.c: (gst_decode_bin_class_init),
(gst_decode_bin_init), (gst_decode_bin_dispose),
(gst_decode_bin_set_sink_caps), (gst_decode_bin_get_sink_caps),
(gst_decode_bin_set_property), (gst_decode_bin_get_property),
(analyze_new_pad), (connect_pad), (expose_pad),
(gst_decode_group_new), (gst_decode_group_control_demuxer_pad),
(gst_decode_group_expose), (gst_decode_group_free),
(do_async_start), (do_async_done), (gst_decode_bin_change_state):
Remove fakesink hack, we can now implement this more elegantly.
Added property to bypass typefinding.
Removed underrun callback and demuxer pad probe, we now use the srcpad
probe to expose groups.
API::sink-caps property
* gst/playback/gstplaybin2.c: (no_more_pads_cb):
Guard against multiple emissions of the no_more_pads signal, which
happens when we are dealing with chained oggs.
* gst/playback/gsturidecodebin.c: (remove_decoders),
(make_decoder), (type_found), (setup_streaming), (source_new_pad),
(setup_source):
For streams, use our own typefind element and plug our queue after it.
We will need this to determine the type of buffering to use for the
queue soon.
2008-04-03 12:16:04 +00:00
|
|
|
}
|
gst/playback/: New decodebin2 element.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstdecodebin2.c: (gst_decode_bin_get_type),
(_gst_boolean_accumulator), (gst_decode_bin_class_init),
(gst_decode_bin_factory_filter), (compare_ranks), (print_feature),
(gst_decode_bin_init), (gst_decode_bin_dispose),
(gst_decode_bin_finalize), (gst_decode_bin_set_property),
(gst_decode_bin_get_property), (gst_decode_bin_set_caps),
(gst_decode_bin_get_caps), (gst_decode_bin_autoplug_continue),
(gst_decode_bin_autoplug_sort), (analyze_new_pad), (connect_pad),
(connect_element), (expose_pad), (type_found),
(pad_added_group_cb), (pad_removed_group_cb),
(no_more_pads_group_cb), (pad_added_cb), (pad_removed_cb),
(no_more_pads_cb), (find_compatibles), (is_demuxer_element),
(are_raw_caps), (multi_queue_overrun_cb),
(multi_queue_underrun_cb), (gst_decode_group_new),
(get_current_group), (group_demuxer_event_probe),
(gst_decode_group_control_demuxer_pad),
(gst_decode_group_control_source_pad),
(gst_decode_group_check_if_blocked),
(gst_decode_group_check_if_drained), (gst_decode_group_expose),
(gst_decode_group_hide), (gst_decode_group_free),
(gst_decode_group_set_complete), (source_pad_blocked_cb),
(source_pad_event_probe), (gst_decode_pad_new), (add_fakesink),
(remove_fakesink), (find_sink_pad), (gst_decode_bin_change_state),
(plugin_init):
New decodebin2 element.
Closes #370092
* gst/playback/gstplay-marshal.list:
Added marshallers for new signals in decodebin2
* gst/playback/gstplaybasebin.c: (setup_subtitle), (make_decoder):
Use decodebin2 if *and only if* the USE_DECODEBIN2 environment variable
is set.
2006-11-28 14:40:39 +00:00
|
|
|
|
2014-08-25 17:59:40 +00:00
|
|
|
g_string_free (missing_plugin_details, TRUE);
|
|
|
|
|
2009-09-26 10:17:49 +00:00
|
|
|
/* Check if this was called when everything was exposed already */
|
|
|
|
for (tmp = endpads; tmp && already_exposed; tmp = tmp->next) {
|
|
|
|
GstDecodePad *dpad = tmp->data;
|
2007-06-28 09:46:11 +00:00
|
|
|
|
2009-09-26 10:17:49 +00:00
|
|
|
already_exposed &= dpad->exposed;
|
|
|
|
if (!already_exposed)
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
if (already_exposed) {
|
|
|
|
GST_DEBUG_OBJECT (dbin, "Everything was exposed already!");
|
|
|
|
g_list_foreach (endpads, (GFunc) gst_object_unref, NULL);
|
|
|
|
g_list_free (endpads);
|
gst/playback/gstdecodebin2.c: Remove fakesink hack, we can now implement this more elegantly.
Original commit message from CVS:
* gst/playback/gstdecodebin2.c: (gst_decode_bin_class_init),
(gst_decode_bin_init), (gst_decode_bin_dispose),
(gst_decode_bin_set_sink_caps), (gst_decode_bin_get_sink_caps),
(gst_decode_bin_set_property), (gst_decode_bin_get_property),
(analyze_new_pad), (connect_pad), (expose_pad),
(gst_decode_group_new), (gst_decode_group_control_demuxer_pad),
(gst_decode_group_expose), (gst_decode_group_free),
(do_async_start), (do_async_done), (gst_decode_bin_change_state):
Remove fakesink hack, we can now implement this more elegantly.
Added property to bypass typefinding.
Removed underrun callback and demuxer pad probe, we now use the srcpad
probe to expose groups.
API::sink-caps property
* gst/playback/gstplaybin2.c: (no_more_pads_cb):
Guard against multiple emissions of the no_more_pads signal, which
happens when we are dealing with chained oggs.
* gst/playback/gsturidecodebin.c: (remove_decoders),
(make_decoder), (type_found), (setup_streaming), (source_new_pad),
(setup_source):
For streams, use our own typefind element and plug our queue after it.
We will need this to determine the type of buffering to use for the
queue soon.
2008-04-03 12:16:04 +00:00
|
|
|
return TRUE;
|
|
|
|
}
|
|
|
|
|
2013-02-06 11:41:19 +00:00
|
|
|
/* going to expose something, reset buffering */
|
|
|
|
gst_decode_bin_reset_buffering (dbin);
|
|
|
|
|
2009-09-26 10:17:49 +00:00
|
|
|
/* Set all already exposed pads to blocked */
|
|
|
|
for (tmp = endpads; tmp; tmp = tmp->next) {
|
|
|
|
GstDecodePad *dpad = tmp->data;
|
gst/playback/gstdecodebin2.c: Remove fakesink hack, we can now implement this more elegantly.
Original commit message from CVS:
* gst/playback/gstdecodebin2.c: (gst_decode_bin_class_init),
(gst_decode_bin_init), (gst_decode_bin_dispose),
(gst_decode_bin_set_sink_caps), (gst_decode_bin_get_sink_caps),
(gst_decode_bin_set_property), (gst_decode_bin_get_property),
(analyze_new_pad), (connect_pad), (expose_pad),
(gst_decode_group_new), (gst_decode_group_control_demuxer_pad),
(gst_decode_group_expose), (gst_decode_group_free),
(do_async_start), (do_async_done), (gst_decode_bin_change_state):
Remove fakesink hack, we can now implement this more elegantly.
Added property to bypass typefinding.
Removed underrun callback and demuxer pad probe, we now use the srcpad
probe to expose groups.
API::sink-caps property
* gst/playback/gstplaybin2.c: (no_more_pads_cb):
Guard against multiple emissions of the no_more_pads signal, which
happens when we are dealing with chained oggs.
* gst/playback/gsturidecodebin.c: (remove_decoders),
(make_decoder), (type_found), (setup_streaming), (source_new_pad),
(setup_source):
For streams, use our own typefind element and plug our queue after it.
We will need this to determine the type of buffering to use for the
queue soon.
2008-04-03 12:16:04 +00:00
|
|
|
|
2009-12-16 10:43:27 +00:00
|
|
|
if (dpad->exposed) {
|
|
|
|
GST_DEBUG_OBJECT (dpad, "blocking exposed pad");
|
2009-09-26 10:17:49 +00:00
|
|
|
gst_decode_pad_set_blocked (dpad, TRUE);
|
2009-12-16 10:43:27 +00:00
|
|
|
}
|
2009-09-26 10:17:49 +00:00
|
|
|
}
|
gst/playback/gstdecodebin2.c: Remove fakesink hack, we can now implement this more elegantly.
Original commit message from CVS:
* gst/playback/gstdecodebin2.c: (gst_decode_bin_class_init),
(gst_decode_bin_init), (gst_decode_bin_dispose),
(gst_decode_bin_set_sink_caps), (gst_decode_bin_get_sink_caps),
(gst_decode_bin_set_property), (gst_decode_bin_get_property),
(analyze_new_pad), (connect_pad), (expose_pad),
(gst_decode_group_new), (gst_decode_group_control_demuxer_pad),
(gst_decode_group_expose), (gst_decode_group_free),
(do_async_start), (do_async_done), (gst_decode_bin_change_state):
Remove fakesink hack, we can now implement this more elegantly.
Added property to bypass typefinding.
Removed underrun callback and demuxer pad probe, we now use the srcpad
probe to expose groups.
API::sink-caps property
* gst/playback/gstplaybin2.c: (no_more_pads_cb):
Guard against multiple emissions of the no_more_pads signal, which
happens when we are dealing with chained oggs.
* gst/playback/gsturidecodebin.c: (remove_decoders),
(make_decoder), (type_found), (setup_streaming), (source_new_pad),
(setup_source):
For streams, use our own typefind element and plug our queue after it.
We will need this to determine the type of buffering to use for the
queue soon.
2008-04-03 12:16:04 +00:00
|
|
|
|
2007-02-20 11:20:52 +00:00
|
|
|
/* re-order pads : video, then audio, then others */
|
2009-09-26 10:17:49 +00:00
|
|
|
endpads = g_list_sort (endpads, (GCompareFunc) sort_end_pads);
|
2007-02-20 11:20:52 +00:00
|
|
|
|
2017-11-14 12:38:42 +00:00
|
|
|
/* Don't add pads if we are shutting down */
|
|
|
|
DYN_LOCK (dbin);
|
|
|
|
if (G_UNLIKELY (dbin->shutdown)) {
|
|
|
|
GST_WARNING_OBJECT (dbin, "Currently, shutting down, aborting exposing");
|
|
|
|
DYN_UNLOCK (dbin);
|
|
|
|
return FALSE;
|
|
|
|
}
|
|
|
|
|
gst/playback/: New decodebin2 element.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstdecodebin2.c: (gst_decode_bin_get_type),
(_gst_boolean_accumulator), (gst_decode_bin_class_init),
(gst_decode_bin_factory_filter), (compare_ranks), (print_feature),
(gst_decode_bin_init), (gst_decode_bin_dispose),
(gst_decode_bin_finalize), (gst_decode_bin_set_property),
(gst_decode_bin_get_property), (gst_decode_bin_set_caps),
(gst_decode_bin_get_caps), (gst_decode_bin_autoplug_continue),
(gst_decode_bin_autoplug_sort), (analyze_new_pad), (connect_pad),
(connect_element), (expose_pad), (type_found),
(pad_added_group_cb), (pad_removed_group_cb),
(no_more_pads_group_cb), (pad_added_cb), (pad_removed_cb),
(no_more_pads_cb), (find_compatibles), (is_demuxer_element),
(are_raw_caps), (multi_queue_overrun_cb),
(multi_queue_underrun_cb), (gst_decode_group_new),
(get_current_group), (group_demuxer_event_probe),
(gst_decode_group_control_demuxer_pad),
(gst_decode_group_control_source_pad),
(gst_decode_group_check_if_blocked),
(gst_decode_group_check_if_drained), (gst_decode_group_expose),
(gst_decode_group_hide), (gst_decode_group_free),
(gst_decode_group_set_complete), (source_pad_blocked_cb),
(source_pad_event_probe), (gst_decode_pad_new), (add_fakesink),
(remove_fakesink), (find_sink_pad), (gst_decode_bin_change_state),
(plugin_init):
New decodebin2 element.
Closes #370092
* gst/playback/gstplay-marshal.list:
Added marshallers for new signals in decodebin2
* gst/playback/gstplaybasebin.c: (setup_subtitle), (make_decoder):
Use decodebin2 if *and only if* the USE_DECODEBIN2 environment variable
is set.
2006-11-28 14:40:39 +00:00
|
|
|
/* Expose pads */
|
2009-09-26 10:17:49 +00:00
|
|
|
for (tmp = endpads; tmp; tmp = tmp->next) {
|
gst/playback/: New decodebin2 element.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstdecodebin2.c: (gst_decode_bin_get_type),
(_gst_boolean_accumulator), (gst_decode_bin_class_init),
(gst_decode_bin_factory_filter), (compare_ranks), (print_feature),
(gst_decode_bin_init), (gst_decode_bin_dispose),
(gst_decode_bin_finalize), (gst_decode_bin_set_property),
(gst_decode_bin_get_property), (gst_decode_bin_set_caps),
(gst_decode_bin_get_caps), (gst_decode_bin_autoplug_continue),
(gst_decode_bin_autoplug_sort), (analyze_new_pad), (connect_pad),
(connect_element), (expose_pad), (type_found),
(pad_added_group_cb), (pad_removed_group_cb),
(no_more_pads_group_cb), (pad_added_cb), (pad_removed_cb),
(no_more_pads_cb), (find_compatibles), (is_demuxer_element),
(are_raw_caps), (multi_queue_overrun_cb),
(multi_queue_underrun_cb), (gst_decode_group_new),
(get_current_group), (group_demuxer_event_probe),
(gst_decode_group_control_demuxer_pad),
(gst_decode_group_control_source_pad),
(gst_decode_group_check_if_blocked),
(gst_decode_group_check_if_drained), (gst_decode_group_expose),
(gst_decode_group_hide), (gst_decode_group_free),
(gst_decode_group_set_complete), (source_pad_blocked_cb),
(source_pad_event_probe), (gst_decode_pad_new), (add_fakesink),
(remove_fakesink), (find_sink_pad), (gst_decode_bin_change_state),
(plugin_init):
New decodebin2 element.
Closes #370092
* gst/playback/gstplay-marshal.list:
Added marshallers for new signals in decodebin2
* gst/playback/gstplaybasebin.c: (setup_subtitle), (make_decoder):
Use decodebin2 if *and only if* the USE_DECODEBIN2 environment variable
is set.
2006-11-28 14:40:39 +00:00
|
|
|
GstDecodePad *dpad = (GstDecodePad *) tmp->data;
|
|
|
|
gchar *padname;
|
|
|
|
|
gst/playback/gstdecodebin2.c (struct _GstDecodePad): Change to be a subclass of GstGhostPad.
Original commit message from CVS:
2008-10-08 Andy Wingo <wingo@pobox.com>
* gst/playback/gstdecodebin2.c (struct _GstDecodePad): Change to
be a subclass of GstGhostPad.
(analyze_new_pad): So, when emitting the signals that determine
how we do autoplugging, already create the ghost pad and use it as
the pad in the signal arguments. This allows applications to make
a connection between the pad passed in e.g. autoplug-continue, and
the pad passed in new-decoded-pad.
(connect_pad, expose_pad): Update to receive the ghosted decode
pad in the args, retargetting it as necessary if we have to plug
the target pad through a multiqueue.
(gst_decode_group_control_source_pad): Adapt to receive an
already-ghosted pad that just needs activation, blocking, and
drain notification.
(sort_end_pads): Adapt for decode pads actually being pads.
(gst_decode_group_expose): Adapt for decode pads actually being
pads. Rewrite the decode pad names so they appear in order. Adds a
new error case if we couldn't set the name.
(gst_decode_group_free, gst_decode_group_hide): Adapt cleanup
logic.
(gst_decode_pad_set_blocked, gst_decode_pad_add_drained_check):
New API for the decode pad, needed because we shouldn't do these
things inside gst_decode_pad_new(), but after.
(gst_decode_pad_new): Change to actually make the real pad, and
delay the blocking/drainage bits.
2008-10-08 12:49:40 +00:00
|
|
|
/* 1. rewrite name */
|
2011-11-04 09:48:50 +00:00
|
|
|
padname = g_strdup_printf ("src_%u", dbin->nbpads);
|
gst/playback/gstdecodebin2.c: Remove fakesink hack, we can now implement this more elegantly.
Original commit message from CVS:
* gst/playback/gstdecodebin2.c: (gst_decode_bin_class_init),
(gst_decode_bin_init), (gst_decode_bin_dispose),
(gst_decode_bin_set_sink_caps), (gst_decode_bin_get_sink_caps),
(gst_decode_bin_set_property), (gst_decode_bin_get_property),
(analyze_new_pad), (connect_pad), (expose_pad),
(gst_decode_group_new), (gst_decode_group_control_demuxer_pad),
(gst_decode_group_expose), (gst_decode_group_free),
(do_async_start), (do_async_done), (gst_decode_bin_change_state):
Remove fakesink hack, we can now implement this more elegantly.
Added property to bypass typefinding.
Removed underrun callback and demuxer pad probe, we now use the srcpad
probe to expose groups.
API::sink-caps property
* gst/playback/gstplaybin2.c: (no_more_pads_cb):
Guard against multiple emissions of the no_more_pads signal, which
happens when we are dealing with chained oggs.
* gst/playback/gsturidecodebin.c: (remove_decoders),
(make_decoder), (type_found), (setup_streaming), (source_new_pad),
(setup_source):
For streams, use our own typefind element and plug our queue after it.
We will need this to determine the type of buffering to use for the
queue soon.
2008-04-03 12:16:04 +00:00
|
|
|
dbin->nbpads++;
|
gst/playback/gstdecodebin2.c (struct _GstDecodePad): Change to be a subclass of GstGhostPad.
Original commit message from CVS:
2008-10-08 Andy Wingo <wingo@pobox.com>
* gst/playback/gstdecodebin2.c (struct _GstDecodePad): Change to
be a subclass of GstGhostPad.
(analyze_new_pad): So, when emitting the signals that determine
how we do autoplugging, already create the ghost pad and use it as
the pad in the signal arguments. This allows applications to make
a connection between the pad passed in e.g. autoplug-continue, and
the pad passed in new-decoded-pad.
(connect_pad, expose_pad): Update to receive the ghosted decode
pad in the args, retargetting it as necessary if we have to plug
the target pad through a multiqueue.
(gst_decode_group_control_source_pad): Adapt to receive an
already-ghosted pad that just needs activation, blocking, and
drain notification.
(sort_end_pads): Adapt for decode pads actually being pads.
(gst_decode_group_expose): Adapt for decode pads actually being
pads. Rewrite the decode pad names so they appear in order. Adds a
new error case if we couldn't set the name.
(gst_decode_group_free, gst_decode_group_hide): Adapt cleanup
logic.
(gst_decode_pad_set_blocked, gst_decode_pad_add_drained_check):
New API for the decode pad, needed because we shouldn't do these
things inside gst_decode_pad_new(), but after.
(gst_decode_pad_new): Change to actually make the real pad, and
delay the blocking/drainage bits.
2008-10-08 12:49:40 +00:00
|
|
|
GST_DEBUG_OBJECT (dbin, "About to expose dpad %s as %s",
|
|
|
|
GST_OBJECT_NAME (dpad), padname);
|
|
|
|
gst_object_set_name (GST_OBJECT (dpad), padname);
|
gst/playback/: New decodebin2 element.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstdecodebin2.c: (gst_decode_bin_get_type),
(_gst_boolean_accumulator), (gst_decode_bin_class_init),
(gst_decode_bin_factory_filter), (compare_ranks), (print_feature),
(gst_decode_bin_init), (gst_decode_bin_dispose),
(gst_decode_bin_finalize), (gst_decode_bin_set_property),
(gst_decode_bin_get_property), (gst_decode_bin_set_caps),
(gst_decode_bin_get_caps), (gst_decode_bin_autoplug_continue),
(gst_decode_bin_autoplug_sort), (analyze_new_pad), (connect_pad),
(connect_element), (expose_pad), (type_found),
(pad_added_group_cb), (pad_removed_group_cb),
(no_more_pads_group_cb), (pad_added_cb), (pad_removed_cb),
(no_more_pads_cb), (find_compatibles), (is_demuxer_element),
(are_raw_caps), (multi_queue_overrun_cb),
(multi_queue_underrun_cb), (gst_decode_group_new),
(get_current_group), (group_demuxer_event_probe),
(gst_decode_group_control_demuxer_pad),
(gst_decode_group_control_source_pad),
(gst_decode_group_check_if_blocked),
(gst_decode_group_check_if_drained), (gst_decode_group_expose),
(gst_decode_group_hide), (gst_decode_group_free),
(gst_decode_group_set_complete), (source_pad_blocked_cb),
(source_pad_event_probe), (gst_decode_pad_new), (add_fakesink),
(remove_fakesink), (find_sink_pad), (gst_decode_bin_change_state),
(plugin_init):
New decodebin2 element.
Closes #370092
* gst/playback/gstplay-marshal.list:
Added marshallers for new signals in decodebin2
* gst/playback/gstplaybasebin.c: (setup_subtitle), (make_decoder):
Use decodebin2 if *and only if* the USE_DECODEBIN2 environment variable
is set.
2006-11-28 14:40:39 +00:00
|
|
|
g_free (padname);
|
gst/playback/gstdecodebin2.c (struct _GstDecodePad): Change to be a subclass of GstGhostPad.
Original commit message from CVS:
2008-10-08 Andy Wingo <wingo@pobox.com>
* gst/playback/gstdecodebin2.c (struct _GstDecodePad): Change to
be a subclass of GstGhostPad.
(analyze_new_pad): So, when emitting the signals that determine
how we do autoplugging, already create the ghost pad and use it as
the pad in the signal arguments. This allows applications to make
a connection between the pad passed in e.g. autoplug-continue, and
the pad passed in new-decoded-pad.
(connect_pad, expose_pad): Update to receive the ghosted decode
pad in the args, retargetting it as necessary if we have to plug
the target pad through a multiqueue.
(gst_decode_group_control_source_pad): Adapt to receive an
already-ghosted pad that just needs activation, blocking, and
drain notification.
(sort_end_pads): Adapt for decode pads actually being pads.
(gst_decode_group_expose): Adapt for decode pads actually being
pads. Rewrite the decode pad names so they appear in order. Adds a
new error case if we couldn't set the name.
(gst_decode_group_free, gst_decode_group_hide): Adapt cleanup
logic.
(gst_decode_pad_set_blocked, gst_decode_pad_add_drained_check):
New API for the decode pad, needed because we shouldn't do these
things inside gst_decode_pad_new(), but after.
(gst_decode_pad_new): Change to actually make the real pad, and
delay the blocking/drainage bits.
2008-10-08 12:49:40 +00:00
|
|
|
|
2013-04-04 12:53:32 +00:00
|
|
|
gst_pad_sticky_events_foreach (GST_PAD_CAST (dpad), debug_sticky_event,
|
|
|
|
dpad);
|
|
|
|
|
gst/playback/gstdecodebin2.c (struct _GstDecodePad): Change to be a subclass of GstGhostPad.
Original commit message from CVS:
2008-10-08 Andy Wingo <wingo@pobox.com>
* gst/playback/gstdecodebin2.c (struct _GstDecodePad): Change to
be a subclass of GstGhostPad.
(analyze_new_pad): So, when emitting the signals that determine
how we do autoplugging, already create the ghost pad and use it as
the pad in the signal arguments. This allows applications to make
a connection between the pad passed in e.g. autoplug-continue, and
the pad passed in new-decoded-pad.
(connect_pad, expose_pad): Update to receive the ghosted decode
pad in the args, retargetting it as necessary if we have to plug
the target pad through a multiqueue.
(gst_decode_group_control_source_pad): Adapt to receive an
already-ghosted pad that just needs activation, blocking, and
drain notification.
(sort_end_pads): Adapt for decode pads actually being pads.
(gst_decode_group_expose): Adapt for decode pads actually being
pads. Rewrite the decode pad names so they appear in order. Adds a
new error case if we couldn't set the name.
(gst_decode_group_free, gst_decode_group_hide): Adapt cleanup
logic.
(gst_decode_pad_set_blocked, gst_decode_pad_add_drained_check):
New API for the decode pad, needed because we shouldn't do these
things inside gst_decode_pad_new(), but after.
(gst_decode_pad_new): Change to actually make the real pad, and
delay the blocking/drainage bits.
2008-10-08 12:49:40 +00:00
|
|
|
/* 2. activate and add */
|
2013-03-29 17:27:03 +00:00
|
|
|
if (!dpad->exposed) {
|
|
|
|
dpad->exposed = TRUE;
|
|
|
|
if (!gst_element_add_pad (GST_ELEMENT (dbin), GST_PAD_CAST (dpad))) {
|
|
|
|
/* not really fatal, we can try to add the other pads */
|
|
|
|
g_warning ("error adding pad to decodebin");
|
|
|
|
dpad->exposed = FALSE;
|
|
|
|
continue;
|
|
|
|
}
|
2009-03-19 19:31:01 +00:00
|
|
|
}
|
2009-03-09 14:46:21 +00:00
|
|
|
|
gst/playback/gstdecodebin2.c (struct _GstDecodePad): Change to be a subclass of GstGhostPad.
Original commit message from CVS:
2008-10-08 Andy Wingo <wingo@pobox.com>
* gst/playback/gstdecodebin2.c (struct _GstDecodePad): Change to
be a subclass of GstGhostPad.
(analyze_new_pad): So, when emitting the signals that determine
how we do autoplugging, already create the ghost pad and use it as
the pad in the signal arguments. This allows applications to make
a connection between the pad passed in e.g. autoplug-continue, and
the pad passed in new-decoded-pad.
(connect_pad, expose_pad): Update to receive the ghosted decode
pad in the args, retargetting it as necessary if we have to plug
the target pad through a multiqueue.
(gst_decode_group_control_source_pad): Adapt to receive an
already-ghosted pad that just needs activation, blocking, and
drain notification.
(sort_end_pads): Adapt for decode pads actually being pads.
(gst_decode_group_expose): Adapt for decode pads actually being
pads. Rewrite the decode pad names so they appear in order. Adds a
new error case if we couldn't set the name.
(gst_decode_group_free, gst_decode_group_hide): Adapt cleanup
logic.
(gst_decode_pad_set_blocked, gst_decode_pad_add_drained_check):
New API for the decode pad, needed because we shouldn't do these
things inside gst_decode_pad_new(), but after.
(gst_decode_pad_new): Change to actually make the real pad, and
delay the blocking/drainage bits.
2008-10-08 12:49:40 +00:00
|
|
|
/* 3. emit signal */
|
2011-06-14 23:32:23 +00:00
|
|
|
GST_INFO_OBJECT (dpad, "added new decoded pad");
|
2007-10-30 15:07:58 +00:00
|
|
|
}
|
2017-11-14 12:38:42 +00:00
|
|
|
DYN_UNLOCK (dbin);
|
2007-10-30 15:07:58 +00:00
|
|
|
|
2009-10-15 11:13:43 +00:00
|
|
|
/* 4. Signal no-more-pads. This allows the application to hook stuff to the
|
2007-10-30 15:07:58 +00:00
|
|
|
* exposed pads */
|
2011-09-13 19:10:43 +00:00
|
|
|
GST_LOG_OBJECT (dbin, "signaling no-more-pads");
|
gst/playback/gstdecodebin2.c: Remove fakesink hack, we can now implement this more elegantly.
Original commit message from CVS:
* gst/playback/gstdecodebin2.c: (gst_decode_bin_class_init),
(gst_decode_bin_init), (gst_decode_bin_dispose),
(gst_decode_bin_set_sink_caps), (gst_decode_bin_get_sink_caps),
(gst_decode_bin_set_property), (gst_decode_bin_get_property),
(analyze_new_pad), (connect_pad), (expose_pad),
(gst_decode_group_new), (gst_decode_group_control_demuxer_pad),
(gst_decode_group_expose), (gst_decode_group_free),
(do_async_start), (do_async_done), (gst_decode_bin_change_state):
Remove fakesink hack, we can now implement this more elegantly.
Added property to bypass typefinding.
Removed underrun callback and demuxer pad probe, we now use the srcpad
probe to expose groups.
API::sink-caps property
* gst/playback/gstplaybin2.c: (no_more_pads_cb):
Guard against multiple emissions of the no_more_pads signal, which
happens when we are dealing with chained oggs.
* gst/playback/gsturidecodebin.c: (remove_decoders),
(make_decoder), (type_found), (setup_streaming), (source_new_pad),
(setup_source):
For streams, use our own typefind element and plug our queue after it.
We will need this to determine the type of buffering to use for the
queue soon.
2008-04-03 12:16:04 +00:00
|
|
|
gst_element_no_more_pads (GST_ELEMENT (dbin));
|
2007-10-30 15:07:58 +00:00
|
|
|
|
2009-10-15 11:13:43 +00:00
|
|
|
/* 5. Send a custom element message with the stream topology */
|
2009-11-06 16:01:04 +00:00
|
|
|
if (dbin->post_stream_topology)
|
|
|
|
gst_decode_bin_post_topology_message (dbin);
|
2009-10-15 11:13:43 +00:00
|
|
|
|
|
|
|
/* 6. Unblock internal pads. The application should have connected stuff now
|
2007-10-30 15:07:58 +00:00
|
|
|
* so that streaming can continue. */
|
2009-09-26 10:17:49 +00:00
|
|
|
for (tmp = endpads; tmp; tmp = tmp->next) {
|
2007-10-30 15:07:58 +00:00
|
|
|
GstDecodePad *dpad = (GstDecodePad *) tmp->data;
|
|
|
|
|
gst/playback/gstdecodebin2.c (struct _GstDecodePad): Change to be a subclass of GstGhostPad.
Original commit message from CVS:
2008-10-08 Andy Wingo <wingo@pobox.com>
* gst/playback/gstdecodebin2.c (struct _GstDecodePad): Change to
be a subclass of GstGhostPad.
(analyze_new_pad): So, when emitting the signals that determine
how we do autoplugging, already create the ghost pad and use it as
the pad in the signal arguments. This allows applications to make
a connection between the pad passed in e.g. autoplug-continue, and
the pad passed in new-decoded-pad.
(connect_pad, expose_pad): Update to receive the ghosted decode
pad in the args, retargetting it as necessary if we have to plug
the target pad through a multiqueue.
(gst_decode_group_control_source_pad): Adapt to receive an
already-ghosted pad that just needs activation, blocking, and
drain notification.
(sort_end_pads): Adapt for decode pads actually being pads.
(gst_decode_group_expose): Adapt for decode pads actually being
pads. Rewrite the decode pad names so they appear in order. Adds a
new error case if we couldn't set the name.
(gst_decode_group_free, gst_decode_group_hide): Adapt cleanup
logic.
(gst_decode_pad_set_blocked, gst_decode_pad_add_drained_check):
New API for the decode pad, needed because we shouldn't do these
things inside gst_decode_pad_new(), but after.
(gst_decode_pad_new): Change to actually make the real pad, and
delay the blocking/drainage bits.
2008-10-08 12:49:40 +00:00
|
|
|
GST_DEBUG_OBJECT (dpad, "unblocking");
|
2008-10-08 14:00:07 +00:00
|
|
|
gst_decode_pad_unblock (dpad);
|
gst/playback/gstdecodebin2.c (struct _GstDecodePad): Change to be a subclass of GstGhostPad.
Original commit message from CVS:
2008-10-08 Andy Wingo <wingo@pobox.com>
* gst/playback/gstdecodebin2.c (struct _GstDecodePad): Change to
be a subclass of GstGhostPad.
(analyze_new_pad): So, when emitting the signals that determine
how we do autoplugging, already create the ghost pad and use it as
the pad in the signal arguments. This allows applications to make
a connection between the pad passed in e.g. autoplug-continue, and
the pad passed in new-decoded-pad.
(connect_pad, expose_pad): Update to receive the ghosted decode
pad in the args, retargetting it as necessary if we have to plug
the target pad through a multiqueue.
(gst_decode_group_control_source_pad): Adapt to receive an
already-ghosted pad that just needs activation, blocking, and
drain notification.
(sort_end_pads): Adapt for decode pads actually being pads.
(gst_decode_group_expose): Adapt for decode pads actually being
pads. Rewrite the decode pad names so they appear in order. Adds a
new error case if we couldn't set the name.
(gst_decode_group_free, gst_decode_group_hide): Adapt cleanup
logic.
(gst_decode_pad_set_blocked, gst_decode_pad_add_drained_check):
New API for the decode pad, needed because we shouldn't do these
things inside gst_decode_pad_new(), but after.
(gst_decode_pad_new): Change to actually make the real pad, and
delay the blocking/drainage bits.
2008-10-08 12:49:40 +00:00
|
|
|
GST_DEBUG_OBJECT (dpad, "unblocked");
|
2009-09-26 10:17:49 +00:00
|
|
|
gst_object_unref (dpad);
|
gst/playback/: New decodebin2 element.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstdecodebin2.c: (gst_decode_bin_get_type),
(_gst_boolean_accumulator), (gst_decode_bin_class_init),
(gst_decode_bin_factory_filter), (compare_ranks), (print_feature),
(gst_decode_bin_init), (gst_decode_bin_dispose),
(gst_decode_bin_finalize), (gst_decode_bin_set_property),
(gst_decode_bin_get_property), (gst_decode_bin_set_caps),
(gst_decode_bin_get_caps), (gst_decode_bin_autoplug_continue),
(gst_decode_bin_autoplug_sort), (analyze_new_pad), (connect_pad),
(connect_element), (expose_pad), (type_found),
(pad_added_group_cb), (pad_removed_group_cb),
(no_more_pads_group_cb), (pad_added_cb), (pad_removed_cb),
(no_more_pads_cb), (find_compatibles), (is_demuxer_element),
(are_raw_caps), (multi_queue_overrun_cb),
(multi_queue_underrun_cb), (gst_decode_group_new),
(get_current_group), (group_demuxer_event_probe),
(gst_decode_group_control_demuxer_pad),
(gst_decode_group_control_source_pad),
(gst_decode_group_check_if_blocked),
(gst_decode_group_check_if_drained), (gst_decode_group_expose),
(gst_decode_group_hide), (gst_decode_group_free),
(gst_decode_group_set_complete), (source_pad_blocked_cb),
(source_pad_event_probe), (gst_decode_pad_new), (add_fakesink),
(remove_fakesink), (find_sink_pad), (gst_decode_bin_change_state),
(plugin_init):
New decodebin2 element.
Closes #370092
* gst/playback/gstplay-marshal.list:
Added marshallers for new signals in decodebin2
* gst/playback/gstplaybasebin.c: (setup_subtitle), (make_decoder):
Use decodebin2 if *and only if* the USE_DECODEBIN2 environment variable
is set.
2006-11-28 14:40:39 +00:00
|
|
|
}
|
2009-09-26 10:17:49 +00:00
|
|
|
g_list_free (endpads);
|
gst/playback/: New decodebin2 element.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstdecodebin2.c: (gst_decode_bin_get_type),
(_gst_boolean_accumulator), (gst_decode_bin_class_init),
(gst_decode_bin_factory_filter), (compare_ranks), (print_feature),
(gst_decode_bin_init), (gst_decode_bin_dispose),
(gst_decode_bin_finalize), (gst_decode_bin_set_property),
(gst_decode_bin_get_property), (gst_decode_bin_set_caps),
(gst_decode_bin_get_caps), (gst_decode_bin_autoplug_continue),
(gst_decode_bin_autoplug_sort), (analyze_new_pad), (connect_pad),
(connect_element), (expose_pad), (type_found),
(pad_added_group_cb), (pad_removed_group_cb),
(no_more_pads_group_cb), (pad_added_cb), (pad_removed_cb),
(no_more_pads_cb), (find_compatibles), (is_demuxer_element),
(are_raw_caps), (multi_queue_overrun_cb),
(multi_queue_underrun_cb), (gst_decode_group_new),
(get_current_group), (group_demuxer_event_probe),
(gst_decode_group_control_demuxer_pad),
(gst_decode_group_control_source_pad),
(gst_decode_group_check_if_blocked),
(gst_decode_group_check_if_drained), (gst_decode_group_expose),
(gst_decode_group_hide), (gst_decode_group_free),
(gst_decode_group_set_complete), (source_pad_blocked_cb),
(source_pad_event_probe), (gst_decode_pad_new), (add_fakesink),
(remove_fakesink), (find_sink_pad), (gst_decode_bin_change_state),
(plugin_init):
New decodebin2 element.
Closes #370092
* gst/playback/gstplay-marshal.list:
Added marshallers for new signals in decodebin2
* gst/playback/gstplaybasebin.c: (setup_subtitle), (make_decoder):
Use decodebin2 if *and only if* the USE_DECODEBIN2 environment variable
is set.
2006-11-28 14:40:39 +00:00
|
|
|
|
gst/playback/gstdecodebin2.c: Remove fakesink hack, we can now implement this more elegantly.
Original commit message from CVS:
* gst/playback/gstdecodebin2.c: (gst_decode_bin_class_init),
(gst_decode_bin_init), (gst_decode_bin_dispose),
(gst_decode_bin_set_sink_caps), (gst_decode_bin_get_sink_caps),
(gst_decode_bin_set_property), (gst_decode_bin_get_property),
(analyze_new_pad), (connect_pad), (expose_pad),
(gst_decode_group_new), (gst_decode_group_control_demuxer_pad),
(gst_decode_group_expose), (gst_decode_group_free),
(do_async_start), (do_async_done), (gst_decode_bin_change_state):
Remove fakesink hack, we can now implement this more elegantly.
Added property to bypass typefinding.
Removed underrun callback and demuxer pad probe, we now use the srcpad
probe to expose groups.
API::sink-caps property
* gst/playback/gstplaybin2.c: (no_more_pads_cb):
Guard against multiple emissions of the no_more_pads signal, which
happens when we are dealing with chained oggs.
* gst/playback/gsturidecodebin.c: (remove_decoders),
(make_decoder), (type_found), (setup_streaming), (source_new_pad),
(setup_source):
For streams, use our own typefind element and plug our queue after it.
We will need this to determine the type of buffering to use for the
queue soon.
2008-04-03 12:16:04 +00:00
|
|
|
do_async_done (dbin);
|
2009-09-26 10:17:49 +00:00
|
|
|
GST_DEBUG_OBJECT (dbin, "Exposed everything");
|
gst/playback/: New decodebin2 element.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstdecodebin2.c: (gst_decode_bin_get_type),
(_gst_boolean_accumulator), (gst_decode_bin_class_init),
(gst_decode_bin_factory_filter), (compare_ranks), (print_feature),
(gst_decode_bin_init), (gst_decode_bin_dispose),
(gst_decode_bin_finalize), (gst_decode_bin_set_property),
(gst_decode_bin_get_property), (gst_decode_bin_set_caps),
(gst_decode_bin_get_caps), (gst_decode_bin_autoplug_continue),
(gst_decode_bin_autoplug_sort), (analyze_new_pad), (connect_pad),
(connect_element), (expose_pad), (type_found),
(pad_added_group_cb), (pad_removed_group_cb),
(no_more_pads_group_cb), (pad_added_cb), (pad_removed_cb),
(no_more_pads_cb), (find_compatibles), (is_demuxer_element),
(are_raw_caps), (multi_queue_overrun_cb),
(multi_queue_underrun_cb), (gst_decode_group_new),
(get_current_group), (group_demuxer_event_probe),
(gst_decode_group_control_demuxer_pad),
(gst_decode_group_control_source_pad),
(gst_decode_group_check_if_blocked),
(gst_decode_group_check_if_drained), (gst_decode_group_expose),
(gst_decode_group_hide), (gst_decode_group_free),
(gst_decode_group_set_complete), (source_pad_blocked_cb),
(source_pad_event_probe), (gst_decode_pad_new), (add_fakesink),
(remove_fakesink), (find_sink_pad), (gst_decode_bin_change_state),
(plugin_init):
New decodebin2 element.
Closes #370092
* gst/playback/gstplay-marshal.list:
Added marshallers for new signals in decodebin2
* gst/playback/gstplaybasebin.c: (setup_subtitle), (make_decoder):
Use decodebin2 if *and only if* the USE_DECODEBIN2 environment variable
is set.
2006-11-28 14:40:39 +00:00
|
|
|
return TRUE;
|
|
|
|
}
|
|
|
|
|
2009-09-26 10:17:49 +00:00
|
|
|
/* gst_decode_chain_expose:
|
|
|
|
*
|
|
|
|
* Check if the chain can be exposed and add all endpads
|
|
|
|
* to the endpads list.
|
|
|
|
*
|
|
|
|
* Also update the active group's multiqueue to the
|
|
|
|
* runtime limits.
|
|
|
|
*
|
|
|
|
* Not MT-safe, call with decodebin expose lock! *
|
|
|
|
*/
|
|
|
|
static gboolean
|
2009-11-19 17:51:33 +00:00
|
|
|
gst_decode_chain_expose (GstDecodeChain * chain, GList ** endpads,
|
2014-08-25 17:59:40 +00:00
|
|
|
gboolean * missing_plugin, GString * missing_plugin_details,
|
|
|
|
gboolean * last_group)
|
2007-01-22 17:37:38 +00:00
|
|
|
{
|
2009-09-26 10:17:49 +00:00
|
|
|
GstDecodeGroup *group;
|
|
|
|
GList *l;
|
2009-10-23 15:02:40 +00:00
|
|
|
GstDecodeBin *dbin;
|
2007-04-03 11:10:52 +00:00
|
|
|
|
2009-11-19 17:51:33 +00:00
|
|
|
if (chain->deadend) {
|
2014-08-25 17:59:40 +00:00
|
|
|
if (chain->endcaps) {
|
|
|
|
if (chain->deadend_details) {
|
|
|
|
g_string_append (missing_plugin_details, chain->deadend_details);
|
|
|
|
g_string_append_c (missing_plugin_details, '\n');
|
2014-09-02 09:59:18 +00:00
|
|
|
} else {
|
|
|
|
gchar *desc = gst_pb_utils_get_codec_description (chain->endcaps);
|
2014-09-02 12:37:38 +00:00
|
|
|
gchar *caps_str = gst_caps_to_string (chain->endcaps);
|
|
|
|
g_string_append_printf (missing_plugin_details,
|
|
|
|
"Missing decoder: %s (%s)\n", desc, caps_str);
|
|
|
|
g_free (caps_str);
|
2014-09-02 09:59:18 +00:00
|
|
|
g_free (desc);
|
2014-08-25 17:59:40 +00:00
|
|
|
}
|
2009-11-19 17:51:33 +00:00
|
|
|
*missing_plugin = TRUE;
|
2014-08-25 17:59:40 +00:00
|
|
|
}
|
2009-09-26 10:17:49 +00:00
|
|
|
return TRUE;
|
2009-11-19 17:51:33 +00:00
|
|
|
}
|
2007-01-22 17:37:38 +00:00
|
|
|
|
2009-09-26 10:17:49 +00:00
|
|
|
if (chain->endpad) {
|
2016-05-04 01:33:50 +00:00
|
|
|
if (!gst_decode_pad_is_exposable (chain->endpad) && !chain->endpad->exposed)
|
2009-09-26 10:17:49 +00:00
|
|
|
return FALSE;
|
|
|
|
*endpads = g_list_prepend (*endpads, gst_object_ref (chain->endpad));
|
|
|
|
return TRUE;
|
2007-01-22 17:37:38 +00:00
|
|
|
}
|
|
|
|
|
2014-07-14 15:29:50 +00:00
|
|
|
if (chain->next_groups)
|
|
|
|
*last_group = FALSE;
|
|
|
|
|
2009-09-26 10:17:49 +00:00
|
|
|
group = chain->active_group;
|
|
|
|
if (!group)
|
|
|
|
return FALSE;
|
|
|
|
if (!group->no_more_pads && !group->overrun)
|
|
|
|
return FALSE;
|
2009-03-09 14:46:21 +00:00
|
|
|
|
2009-10-23 15:02:40 +00:00
|
|
|
dbin = group->dbin;
|
|
|
|
|
2009-09-26 10:17:49 +00:00
|
|
|
/* we can now disconnect any overrun signal, which is used to expose the
|
|
|
|
* group. */
|
|
|
|
if (group->overrunsig) {
|
2009-10-23 15:02:40 +00:00
|
|
|
GST_LOG_OBJECT (dbin, "Disconnecting overrun");
|
2009-09-26 10:17:49 +00:00
|
|
|
g_signal_handler_disconnect (group->multiqueue, group->overrunsig);
|
|
|
|
group->overrunsig = 0;
|
2009-03-09 14:46:21 +00:00
|
|
|
}
|
2007-11-09 15:54:45 +00:00
|
|
|
|
2009-09-26 10:17:49 +00:00
|
|
|
for (l = group->children; l; l = l->next) {
|
|
|
|
GstDecodeChain *childchain = l->data;
|
gst/playback/: New decodebin2 element.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstdecodebin2.c: (gst_decode_bin_get_type),
(_gst_boolean_accumulator), (gst_decode_bin_class_init),
(gst_decode_bin_factory_filter), (compare_ranks), (print_feature),
(gst_decode_bin_init), (gst_decode_bin_dispose),
(gst_decode_bin_finalize), (gst_decode_bin_set_property),
(gst_decode_bin_get_property), (gst_decode_bin_set_caps),
(gst_decode_bin_get_caps), (gst_decode_bin_autoplug_continue),
(gst_decode_bin_autoplug_sort), (analyze_new_pad), (connect_pad),
(connect_element), (expose_pad), (type_found),
(pad_added_group_cb), (pad_removed_group_cb),
(no_more_pads_group_cb), (pad_added_cb), (pad_removed_cb),
(no_more_pads_cb), (find_compatibles), (is_demuxer_element),
(are_raw_caps), (multi_queue_overrun_cb),
(multi_queue_underrun_cb), (gst_decode_group_new),
(get_current_group), (group_demuxer_event_probe),
(gst_decode_group_control_demuxer_pad),
(gst_decode_group_control_source_pad),
(gst_decode_group_check_if_blocked),
(gst_decode_group_check_if_drained), (gst_decode_group_expose),
(gst_decode_group_hide), (gst_decode_group_free),
(gst_decode_group_set_complete), (source_pad_blocked_cb),
(source_pad_event_probe), (gst_decode_pad_new), (add_fakesink),
(remove_fakesink), (find_sink_pad), (gst_decode_bin_change_state),
(plugin_init):
New decodebin2 element.
Closes #370092
* gst/playback/gstplay-marshal.list:
Added marshallers for new signals in decodebin2
* gst/playback/gstplaybasebin.c: (setup_subtitle), (make_decoder):
Use decodebin2 if *and only if* the USE_DECODEBIN2 environment variable
is set.
2006-11-28 14:40:39 +00:00
|
|
|
|
2014-07-14 15:29:50 +00:00
|
|
|
if (!gst_decode_chain_expose (childchain, endpads, missing_plugin,
|
2014-08-25 17:59:40 +00:00
|
|
|
missing_plugin_details, last_group))
|
2009-09-26 10:17:49 +00:00
|
|
|
return FALSE;
|
2007-09-10 12:05:34 +00:00
|
|
|
}
|
2009-03-19 18:35:15 +00:00
|
|
|
|
2009-09-26 10:17:49 +00:00
|
|
|
return TRUE;
|
gst/playback/: New decodebin2 element.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstdecodebin2.c: (gst_decode_bin_get_type),
(_gst_boolean_accumulator), (gst_decode_bin_class_init),
(gst_decode_bin_factory_filter), (compare_ranks), (print_feature),
(gst_decode_bin_init), (gst_decode_bin_dispose),
(gst_decode_bin_finalize), (gst_decode_bin_set_property),
(gst_decode_bin_get_property), (gst_decode_bin_set_caps),
(gst_decode_bin_get_caps), (gst_decode_bin_autoplug_continue),
(gst_decode_bin_autoplug_sort), (analyze_new_pad), (connect_pad),
(connect_element), (expose_pad), (type_found),
(pad_added_group_cb), (pad_removed_group_cb),
(no_more_pads_group_cb), (pad_added_cb), (pad_removed_cb),
(no_more_pads_cb), (find_compatibles), (is_demuxer_element),
(are_raw_caps), (multi_queue_overrun_cb),
(multi_queue_underrun_cb), (gst_decode_group_new),
(get_current_group), (group_demuxer_event_probe),
(gst_decode_group_control_demuxer_pad),
(gst_decode_group_control_source_pad),
(gst_decode_group_check_if_blocked),
(gst_decode_group_check_if_drained), (gst_decode_group_expose),
(gst_decode_group_hide), (gst_decode_group_free),
(gst_decode_group_set_complete), (source_pad_blocked_cb),
(source_pad_event_probe), (gst_decode_pad_new), (add_fakesink),
(remove_fakesink), (find_sink_pad), (gst_decode_bin_change_state),
(plugin_init):
New decodebin2 element.
Closes #370092
* gst/playback/gstplay-marshal.list:
Added marshallers for new signals in decodebin2
* gst/playback/gstplaybasebin.c: (setup_subtitle), (make_decoder):
Use decodebin2 if *and only if* the USE_DECODEBIN2 environment variable
is set.
2006-11-28 14:40:39 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/*************************
|
|
|
|
* GstDecodePad functions
|
|
|
|
*************************/
|
|
|
|
|
2008-11-21 00:04:48 +00:00
|
|
|
static void
|
|
|
|
gst_decode_pad_class_init (GstDecodePadClass * klass)
|
gst/playback/gstdecodebin2.c (struct _GstDecodePad): Change to be a subclass of GstGhostPad.
Original commit message from CVS:
2008-10-08 Andy Wingo <wingo@pobox.com>
* gst/playback/gstdecodebin2.c (struct _GstDecodePad): Change to
be a subclass of GstGhostPad.
(analyze_new_pad): So, when emitting the signals that determine
how we do autoplugging, already create the ghost pad and use it as
the pad in the signal arguments. This allows applications to make
a connection between the pad passed in e.g. autoplug-continue, and
the pad passed in new-decoded-pad.
(connect_pad, expose_pad): Update to receive the ghosted decode
pad in the args, retargetting it as necessary if we have to plug
the target pad through a multiqueue.
(gst_decode_group_control_source_pad): Adapt to receive an
already-ghosted pad that just needs activation, blocking, and
drain notification.
(sort_end_pads): Adapt for decode pads actually being pads.
(gst_decode_group_expose): Adapt for decode pads actually being
pads. Rewrite the decode pad names so they appear in order. Adds a
new error case if we couldn't set the name.
(gst_decode_group_free, gst_decode_group_hide): Adapt cleanup
logic.
(gst_decode_pad_set_blocked, gst_decode_pad_add_drained_check):
New API for the decode pad, needed because we shouldn't do these
things inside gst_decode_pad_new(), but after.
(gst_decode_pad_new): Change to actually make the real pad, and
delay the blocking/drainage bits.
2008-10-08 12:49:40 +00:00
|
|
|
{
|
|
|
|
}
|
|
|
|
|
2008-11-21 00:04:48 +00:00
|
|
|
static void
|
|
|
|
gst_decode_pad_init (GstDecodePad * pad)
|
gst/playback/: New decodebin2 element.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstdecodebin2.c: (gst_decode_bin_get_type),
(_gst_boolean_accumulator), (gst_decode_bin_class_init),
(gst_decode_bin_factory_filter), (compare_ranks), (print_feature),
(gst_decode_bin_init), (gst_decode_bin_dispose),
(gst_decode_bin_finalize), (gst_decode_bin_set_property),
(gst_decode_bin_get_property), (gst_decode_bin_set_caps),
(gst_decode_bin_get_caps), (gst_decode_bin_autoplug_continue),
(gst_decode_bin_autoplug_sort), (analyze_new_pad), (connect_pad),
(connect_element), (expose_pad), (type_found),
(pad_added_group_cb), (pad_removed_group_cb),
(no_more_pads_group_cb), (pad_added_cb), (pad_removed_cb),
(no_more_pads_cb), (find_compatibles), (is_demuxer_element),
(are_raw_caps), (multi_queue_overrun_cb),
(multi_queue_underrun_cb), (gst_decode_group_new),
(get_current_group), (group_demuxer_event_probe),
(gst_decode_group_control_demuxer_pad),
(gst_decode_group_control_source_pad),
(gst_decode_group_check_if_blocked),
(gst_decode_group_check_if_drained), (gst_decode_group_expose),
(gst_decode_group_hide), (gst_decode_group_free),
(gst_decode_group_set_complete), (source_pad_blocked_cb),
(source_pad_event_probe), (gst_decode_pad_new), (add_fakesink),
(remove_fakesink), (find_sink_pad), (gst_decode_bin_change_state),
(plugin_init):
New decodebin2 element.
Closes #370092
* gst/playback/gstplay-marshal.list:
Added marshallers for new signals in decodebin2
* gst/playback/gstplaybasebin.c: (setup_subtitle), (make_decoder):
Use decodebin2 if *and only if* the USE_DECODEBIN2 environment variable
is set.
2006-11-28 14:40:39 +00:00
|
|
|
{
|
2009-09-26 10:17:49 +00:00
|
|
|
pad->chain = NULL;
|
gst/playback/gstdecodebin2.c (struct _GstDecodePad): Change to be a subclass of GstGhostPad.
Original commit message from CVS:
2008-10-08 Andy Wingo <wingo@pobox.com>
* gst/playback/gstdecodebin2.c (struct _GstDecodePad): Change to
be a subclass of GstGhostPad.
(analyze_new_pad): So, when emitting the signals that determine
how we do autoplugging, already create the ghost pad and use it as
the pad in the signal arguments. This allows applications to make
a connection between the pad passed in e.g. autoplug-continue, and
the pad passed in new-decoded-pad.
(connect_pad, expose_pad): Update to receive the ghosted decode
pad in the args, retargetting it as necessary if we have to plug
the target pad through a multiqueue.
(gst_decode_group_control_source_pad): Adapt to receive an
already-ghosted pad that just needs activation, blocking, and
drain notification.
(sort_end_pads): Adapt for decode pads actually being pads.
(gst_decode_group_expose): Adapt for decode pads actually being
pads. Rewrite the decode pad names so they appear in order. Adds a
new error case if we couldn't set the name.
(gst_decode_group_free, gst_decode_group_hide): Adapt cleanup
logic.
(gst_decode_pad_set_blocked, gst_decode_pad_add_drained_check):
New API for the decode pad, needed because we shouldn't do these
things inside gst_decode_pad_new(), but after.
(gst_decode_pad_new): Change to actually make the real pad, and
delay the blocking/drainage bits.
2008-10-08 12:49:40 +00:00
|
|
|
pad->blocked = FALSE;
|
2009-09-26 10:17:49 +00:00
|
|
|
pad->exposed = FALSE;
|
2009-03-20 14:47:47 +00:00
|
|
|
pad->drained = FALSE;
|
2010-12-07 10:31:30 +00:00
|
|
|
gst_object_ref_sink (pad);
|
gst/playback/gstdecodebin2.c (struct _GstDecodePad): Change to be a subclass of GstGhostPad.
Original commit message from CVS:
2008-10-08 Andy Wingo <wingo@pobox.com>
* gst/playback/gstdecodebin2.c (struct _GstDecodePad): Change to
be a subclass of GstGhostPad.
(analyze_new_pad): So, when emitting the signals that determine
how we do autoplugging, already create the ghost pad and use it as
the pad in the signal arguments. This allows applications to make
a connection between the pad passed in e.g. autoplug-continue, and
the pad passed in new-decoded-pad.
(connect_pad, expose_pad): Update to receive the ghosted decode
pad in the args, retargetting it as necessary if we have to plug
the target pad through a multiqueue.
(gst_decode_group_control_source_pad): Adapt to receive an
already-ghosted pad that just needs activation, blocking, and
drain notification.
(sort_end_pads): Adapt for decode pads actually being pads.
(gst_decode_group_expose): Adapt for decode pads actually being
pads. Rewrite the decode pad names so they appear in order. Adds a
new error case if we couldn't set the name.
(gst_decode_group_free, gst_decode_group_hide): Adapt cleanup
logic.
(gst_decode_pad_set_blocked, gst_decode_pad_add_drained_check):
New API for the decode pad, needed because we shouldn't do these
things inside gst_decode_pad_new(), but after.
(gst_decode_pad_new): Change to actually make the real pad, and
delay the blocking/drainage bits.
2008-10-08 12:49:40 +00:00
|
|
|
}
|
|
|
|
|
2011-11-01 00:34:28 +00:00
|
|
|
static GstPadProbeReturn
|
2011-11-08 10:07:18 +00:00
|
|
|
source_pad_blocked_cb (GstPad * pad, GstPadProbeInfo * info, gpointer user_data)
|
gst/playback/gstdecodebin2.c (struct _GstDecodePad): Change to be a subclass of GstGhostPad.
Original commit message from CVS:
2008-10-08 Andy Wingo <wingo@pobox.com>
* gst/playback/gstdecodebin2.c (struct _GstDecodePad): Change to
be a subclass of GstGhostPad.
(analyze_new_pad): So, when emitting the signals that determine
how we do autoplugging, already create the ghost pad and use it as
the pad in the signal arguments. This allows applications to make
a connection between the pad passed in e.g. autoplug-continue, and
the pad passed in new-decoded-pad.
(connect_pad, expose_pad): Update to receive the ghosted decode
pad in the args, retargetting it as necessary if we have to plug
the target pad through a multiqueue.
(gst_decode_group_control_source_pad): Adapt to receive an
already-ghosted pad that just needs activation, blocking, and
drain notification.
(sort_end_pads): Adapt for decode pads actually being pads.
(gst_decode_group_expose): Adapt for decode pads actually being
pads. Rewrite the decode pad names so they appear in order. Adds a
new error case if we couldn't set the name.
(gst_decode_group_free, gst_decode_group_hide): Adapt cleanup
logic.
(gst_decode_pad_set_blocked, gst_decode_pad_add_drained_check):
New API for the decode pad, needed because we shouldn't do these
things inside gst_decode_pad_new(), but after.
(gst_decode_pad_new): Change to actually make the real pad, and
delay the blocking/drainage bits.
2008-10-08 12:49:40 +00:00
|
|
|
{
|
2011-06-01 17:34:54 +00:00
|
|
|
GstDecodePad *dpad = user_data;
|
2009-09-26 10:17:49 +00:00
|
|
|
GstDecodeChain *chain;
|
2009-03-19 18:19:38 +00:00
|
|
|
GstDecodeBin *dbin;
|
2013-04-04 13:00:52 +00:00
|
|
|
GstPadProbeReturn ret = GST_PAD_PROBE_OK;
|
2009-03-19 18:19:38 +00:00
|
|
|
|
2012-07-24 08:45:58 +00:00
|
|
|
if (GST_PAD_PROBE_INFO_TYPE (info) & GST_PAD_PROBE_TYPE_EVENT_DOWNSTREAM) {
|
2013-04-04 12:37:15 +00:00
|
|
|
GstEvent *event = GST_PAD_PROBE_INFO_EVENT (info);
|
2013-02-08 07:46:25 +00:00
|
|
|
|
2013-04-04 12:37:15 +00:00
|
|
|
GST_LOG_OBJECT (pad, "Seeing event '%s'", GST_EVENT_TYPE_NAME (event));
|
|
|
|
|
2013-04-04 13:00:52 +00:00
|
|
|
if (!GST_EVENT_IS_SERIALIZED (event)) {
|
2012-07-24 08:45:58 +00:00
|
|
|
/* do not block on sticky or out of band events otherwise the allocation query
|
|
|
|
from demuxer might block the loop thread */
|
2013-04-04 13:00:52 +00:00
|
|
|
GST_LOG_OBJECT (pad, "Letting OOB event through");
|
2012-07-24 08:45:58 +00:00
|
|
|
return GST_PAD_PROBE_PASS;
|
|
|
|
}
|
2013-04-04 13:00:52 +00:00
|
|
|
|
2013-05-06 13:47:34 +00:00
|
|
|
if (GST_EVENT_IS_STICKY (event) && GST_EVENT_TYPE (event) != GST_EVENT_EOS) {
|
2013-04-04 13:00:52 +00:00
|
|
|
/* manually push sticky events to ghost pad to avoid exposing pads
|
2013-05-06 13:47:34 +00:00
|
|
|
* that don't have the sticky events. Handle EOS separately as we
|
|
|
|
* want to block the pad on it if we didn't get any buffers before
|
|
|
|
* EOS and expose the pad then. */
|
2013-04-04 13:00:52 +00:00
|
|
|
gst_pad_push_event (GST_PAD_CAST (dpad), gst_event_ref (event));
|
|
|
|
|
|
|
|
/* let the sticky events pass */
|
|
|
|
ret = GST_PAD_PROBE_PASS;
|
|
|
|
|
|
|
|
/* we only want to try to expose on CAPS events */
|
|
|
|
if (GST_EVENT_TYPE (event) != GST_EVENT_CAPS) {
|
|
|
|
GST_LOG_OBJECT (pad, "Letting sticky non-CAPS event through");
|
|
|
|
goto done;
|
|
|
|
}
|
|
|
|
}
|
2013-05-28 11:06:15 +00:00
|
|
|
} else if (GST_PAD_PROBE_INFO_TYPE (info) &
|
|
|
|
GST_PAD_PROBE_TYPE_QUERY_DOWNSTREAM) {
|
|
|
|
GstQuery *query = GST_PAD_PROBE_INFO_QUERY (info);
|
|
|
|
|
|
|
|
if (!GST_QUERY_IS_SERIALIZED (query)) {
|
|
|
|
/* do not block on non-serialized queries */
|
|
|
|
GST_LOG_OBJECT (pad, "Letting non-serialized query through");
|
|
|
|
return GST_PAD_PROBE_PASS;
|
|
|
|
}
|
2013-06-06 13:57:49 +00:00
|
|
|
if (!gst_pad_has_current_caps (pad)) {
|
|
|
|
/* do not block on allocation queries before we have caps,
|
|
|
|
* this would deadlock because we are doing no autoplugging
|
|
|
|
* without caps.
|
|
|
|
* TODO: Try to do autoplugging based on the query caps
|
|
|
|
*/
|
|
|
|
GST_LOG_OBJECT (pad, "Letting serialized query before caps through");
|
|
|
|
return GST_PAD_PROBE_PASS;
|
|
|
|
}
|
2012-04-16 11:43:41 +00:00
|
|
|
}
|
2009-09-26 10:17:49 +00:00
|
|
|
chain = dpad->chain;
|
|
|
|
dbin = chain->dbin;
|
gst/playback/: New decodebin2 element.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstdecodebin2.c: (gst_decode_bin_get_type),
(_gst_boolean_accumulator), (gst_decode_bin_class_init),
(gst_decode_bin_factory_filter), (compare_ranks), (print_feature),
(gst_decode_bin_init), (gst_decode_bin_dispose),
(gst_decode_bin_finalize), (gst_decode_bin_set_property),
(gst_decode_bin_get_property), (gst_decode_bin_set_caps),
(gst_decode_bin_get_caps), (gst_decode_bin_autoplug_continue),
(gst_decode_bin_autoplug_sort), (analyze_new_pad), (connect_pad),
(connect_element), (expose_pad), (type_found),
(pad_added_group_cb), (pad_removed_group_cb),
(no_more_pads_group_cb), (pad_added_cb), (pad_removed_cb),
(no_more_pads_cb), (find_compatibles), (is_demuxer_element),
(are_raw_caps), (multi_queue_overrun_cb),
(multi_queue_underrun_cb), (gst_decode_group_new),
(get_current_group), (group_demuxer_event_probe),
(gst_decode_group_control_demuxer_pad),
(gst_decode_group_control_source_pad),
(gst_decode_group_check_if_blocked),
(gst_decode_group_check_if_drained), (gst_decode_group_expose),
(gst_decode_group_hide), (gst_decode_group_free),
(gst_decode_group_set_complete), (source_pad_blocked_cb),
(source_pad_event_probe), (gst_decode_pad_new), (add_fakesink),
(remove_fakesink), (find_sink_pad), (gst_decode_bin_change_state),
(plugin_init):
New decodebin2 element.
Closes #370092
* gst/playback/gstplay-marshal.list:
Added marshallers for new signals in decodebin2
* gst/playback/gstplaybasebin.c: (setup_subtitle), (make_decoder):
Use decodebin2 if *and only if* the USE_DECODEBIN2 environment variable
is set.
2006-11-28 14:40:39 +00:00
|
|
|
|
2011-05-30 16:36:14 +00:00
|
|
|
GST_LOG_OBJECT (dpad, "blocked: dpad->chain:%p", chain);
|
2009-03-19 18:19:38 +00:00
|
|
|
|
2011-05-30 16:36:14 +00:00
|
|
|
dpad->blocked = TRUE;
|
gst/playback/: New decodebin2 element.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstdecodebin2.c: (gst_decode_bin_get_type),
(_gst_boolean_accumulator), (gst_decode_bin_class_init),
(gst_decode_bin_factory_filter), (compare_ranks), (print_feature),
(gst_decode_bin_init), (gst_decode_bin_dispose),
(gst_decode_bin_finalize), (gst_decode_bin_set_property),
(gst_decode_bin_get_property), (gst_decode_bin_set_caps),
(gst_decode_bin_get_caps), (gst_decode_bin_autoplug_continue),
(gst_decode_bin_autoplug_sort), (analyze_new_pad), (connect_pad),
(connect_element), (expose_pad), (type_found),
(pad_added_group_cb), (pad_removed_group_cb),
(no_more_pads_group_cb), (pad_added_cb), (pad_removed_cb),
(no_more_pads_cb), (find_compatibles), (is_demuxer_element),
(are_raw_caps), (multi_queue_overrun_cb),
(multi_queue_underrun_cb), (gst_decode_group_new),
(get_current_group), (group_demuxer_event_probe),
(gst_decode_group_control_demuxer_pad),
(gst_decode_group_control_source_pad),
(gst_decode_group_check_if_blocked),
(gst_decode_group_check_if_drained), (gst_decode_group_expose),
(gst_decode_group_hide), (gst_decode_group_free),
(gst_decode_group_set_complete), (source_pad_blocked_cb),
(source_pad_event_probe), (gst_decode_pad_new), (add_fakesink),
(remove_fakesink), (find_sink_pad), (gst_decode_bin_change_state),
(plugin_init):
New decodebin2 element.
Closes #370092
* gst/playback/gstplay-marshal.list:
Added marshallers for new signals in decodebin2
* gst/playback/gstplaybasebin.c: (setup_subtitle), (make_decoder):
Use decodebin2 if *and only if* the USE_DECODEBIN2 environment variable
is set.
2006-11-28 14:40:39 +00:00
|
|
|
|
2011-05-30 16:36:14 +00:00
|
|
|
EXPOSE_LOCK (dbin);
|
2015-02-04 11:46:09 +00:00
|
|
|
if (dbin->decode_chain) {
|
|
|
|
if (gst_decode_chain_is_complete (dbin->decode_chain)) {
|
|
|
|
if (!gst_decode_bin_expose (dbin))
|
|
|
|
GST_WARNING_OBJECT (dbin, "Couldn't expose group");
|
|
|
|
}
|
gst/playback/: New decodebin2 element.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstdecodebin2.c: (gst_decode_bin_get_type),
(_gst_boolean_accumulator), (gst_decode_bin_class_init),
(gst_decode_bin_factory_filter), (compare_ranks), (print_feature),
(gst_decode_bin_init), (gst_decode_bin_dispose),
(gst_decode_bin_finalize), (gst_decode_bin_set_property),
(gst_decode_bin_get_property), (gst_decode_bin_set_caps),
(gst_decode_bin_get_caps), (gst_decode_bin_autoplug_continue),
(gst_decode_bin_autoplug_sort), (analyze_new_pad), (connect_pad),
(connect_element), (expose_pad), (type_found),
(pad_added_group_cb), (pad_removed_group_cb),
(no_more_pads_group_cb), (pad_added_cb), (pad_removed_cb),
(no_more_pads_cb), (find_compatibles), (is_demuxer_element),
(are_raw_caps), (multi_queue_overrun_cb),
(multi_queue_underrun_cb), (gst_decode_group_new),
(get_current_group), (group_demuxer_event_probe),
(gst_decode_group_control_demuxer_pad),
(gst_decode_group_control_source_pad),
(gst_decode_group_check_if_blocked),
(gst_decode_group_check_if_drained), (gst_decode_group_expose),
(gst_decode_group_hide), (gst_decode_group_free),
(gst_decode_group_set_complete), (source_pad_blocked_cb),
(source_pad_event_probe), (gst_decode_pad_new), (add_fakesink),
(remove_fakesink), (find_sink_pad), (gst_decode_bin_change_state),
(plugin_init):
New decodebin2 element.
Closes #370092
* gst/playback/gstplay-marshal.list:
Added marshallers for new signals in decodebin2
* gst/playback/gstplaybasebin.c: (setup_subtitle), (make_decoder):
Use decodebin2 if *and only if* the USE_DECODEBIN2 environment variable
is set.
2006-11-28 14:40:39 +00:00
|
|
|
}
|
2011-05-30 16:36:14 +00:00
|
|
|
EXPOSE_UNLOCK (dbin);
|
2011-06-01 17:34:54 +00:00
|
|
|
|
2013-04-04 13:00:52 +00:00
|
|
|
done:
|
|
|
|
return ret;
|
gst/playback/: New decodebin2 element.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstdecodebin2.c: (gst_decode_bin_get_type),
(_gst_boolean_accumulator), (gst_decode_bin_class_init),
(gst_decode_bin_factory_filter), (compare_ranks), (print_feature),
(gst_decode_bin_init), (gst_decode_bin_dispose),
(gst_decode_bin_finalize), (gst_decode_bin_set_property),
(gst_decode_bin_get_property), (gst_decode_bin_set_caps),
(gst_decode_bin_get_caps), (gst_decode_bin_autoplug_continue),
(gst_decode_bin_autoplug_sort), (analyze_new_pad), (connect_pad),
(connect_element), (expose_pad), (type_found),
(pad_added_group_cb), (pad_removed_group_cb),
(no_more_pads_group_cb), (pad_added_cb), (pad_removed_cb),
(no_more_pads_cb), (find_compatibles), (is_demuxer_element),
(are_raw_caps), (multi_queue_overrun_cb),
(multi_queue_underrun_cb), (gst_decode_group_new),
(get_current_group), (group_demuxer_event_probe),
(gst_decode_group_control_demuxer_pad),
(gst_decode_group_control_source_pad),
(gst_decode_group_check_if_blocked),
(gst_decode_group_check_if_drained), (gst_decode_group_expose),
(gst_decode_group_hide), (gst_decode_group_free),
(gst_decode_group_set_complete), (source_pad_blocked_cb),
(source_pad_event_probe), (gst_decode_pad_new), (add_fakesink),
(remove_fakesink), (find_sink_pad), (gst_decode_bin_change_state),
(plugin_init):
New decodebin2 element.
Closes #370092
* gst/playback/gstplay-marshal.list:
Added marshallers for new signals in decodebin2
* gst/playback/gstplaybasebin.c: (setup_subtitle), (make_decoder):
Use decodebin2 if *and only if* the USE_DECODEBIN2 environment variable
is set.
2006-11-28 14:40:39 +00:00
|
|
|
}
|
|
|
|
|
2011-11-01 00:34:28 +00:00
|
|
|
static GstPadProbeReturn
|
2011-11-08 10:07:18 +00:00
|
|
|
source_pad_event_probe (GstPad * pad, GstPadProbeInfo * info,
|
2011-06-01 17:34:54 +00:00
|
|
|
gpointer user_data)
|
gst/playback/: New decodebin2 element.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstdecodebin2.c: (gst_decode_bin_get_type),
(_gst_boolean_accumulator), (gst_decode_bin_class_init),
(gst_decode_bin_factory_filter), (compare_ranks), (print_feature),
(gst_decode_bin_init), (gst_decode_bin_dispose),
(gst_decode_bin_finalize), (gst_decode_bin_set_property),
(gst_decode_bin_get_property), (gst_decode_bin_set_caps),
(gst_decode_bin_get_caps), (gst_decode_bin_autoplug_continue),
(gst_decode_bin_autoplug_sort), (analyze_new_pad), (connect_pad),
(connect_element), (expose_pad), (type_found),
(pad_added_group_cb), (pad_removed_group_cb),
(no_more_pads_group_cb), (pad_added_cb), (pad_removed_cb),
(no_more_pads_cb), (find_compatibles), (is_demuxer_element),
(are_raw_caps), (multi_queue_overrun_cb),
(multi_queue_underrun_cb), (gst_decode_group_new),
(get_current_group), (group_demuxer_event_probe),
(gst_decode_group_control_demuxer_pad),
(gst_decode_group_control_source_pad),
(gst_decode_group_check_if_blocked),
(gst_decode_group_check_if_drained), (gst_decode_group_expose),
(gst_decode_group_hide), (gst_decode_group_free),
(gst_decode_group_set_complete), (source_pad_blocked_cb),
(source_pad_event_probe), (gst_decode_pad_new), (add_fakesink),
(remove_fakesink), (find_sink_pad), (gst_decode_bin_change_state),
(plugin_init):
New decodebin2 element.
Closes #370092
* gst/playback/gstplay-marshal.list:
Added marshallers for new signals in decodebin2
* gst/playback/gstplaybasebin.c: (setup_subtitle), (make_decoder):
Use decodebin2 if *and only if* the USE_DECODEBIN2 environment variable
is set.
2006-11-28 14:40:39 +00:00
|
|
|
{
|
2011-11-08 10:07:18 +00:00
|
|
|
GstEvent *event = GST_PAD_PROBE_INFO_EVENT (info);
|
2011-06-01 17:34:54 +00:00
|
|
|
GstDecodePad *dpad = user_data;
|
2011-07-25 08:41:04 +00:00
|
|
|
gboolean res = TRUE;
|
2011-06-01 17:34:54 +00:00
|
|
|
|
gst/playback/: New decodebin2 element.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstdecodebin2.c: (gst_decode_bin_get_type),
(_gst_boolean_accumulator), (gst_decode_bin_class_init),
(gst_decode_bin_factory_filter), (compare_ranks), (print_feature),
(gst_decode_bin_init), (gst_decode_bin_dispose),
(gst_decode_bin_finalize), (gst_decode_bin_set_property),
(gst_decode_bin_get_property), (gst_decode_bin_set_caps),
(gst_decode_bin_get_caps), (gst_decode_bin_autoplug_continue),
(gst_decode_bin_autoplug_sort), (analyze_new_pad), (connect_pad),
(connect_element), (expose_pad), (type_found),
(pad_added_group_cb), (pad_removed_group_cb),
(no_more_pads_group_cb), (pad_added_cb), (pad_removed_cb),
(no_more_pads_cb), (find_compatibles), (is_demuxer_element),
(are_raw_caps), (multi_queue_overrun_cb),
(multi_queue_underrun_cb), (gst_decode_group_new),
(get_current_group), (group_demuxer_event_probe),
(gst_decode_group_control_demuxer_pad),
(gst_decode_group_control_source_pad),
(gst_decode_group_check_if_blocked),
(gst_decode_group_check_if_drained), (gst_decode_group_expose),
(gst_decode_group_hide), (gst_decode_group_free),
(gst_decode_group_set_complete), (source_pad_blocked_cb),
(source_pad_event_probe), (gst_decode_pad_new), (add_fakesink),
(remove_fakesink), (find_sink_pad), (gst_decode_bin_change_state),
(plugin_init):
New decodebin2 element.
Closes #370092
* gst/playback/gstplay-marshal.list:
Added marshallers for new signals in decodebin2
* gst/playback/gstplaybasebin.c: (setup_subtitle), (make_decoder):
Use decodebin2 if *and only if* the USE_DECODEBIN2 environment variable
is set.
2006-11-28 14:40:39 +00:00
|
|
|
GST_LOG_OBJECT (pad, "%s dpad:%p", GST_EVENT_TYPE_NAME (event), dpad);
|
|
|
|
|
|
|
|
if (GST_EVENT_TYPE (event) == GST_EVENT_EOS) {
|
gst/playback/gstdecodebin2.c: Add drained signal fired when decodebin finishes decoding the data.
Original commit message from CVS:
* gst/playback/gstdecodebin2.c: (gst_decode_bin_class_init),
(gst_decode_group_check_if_drained), (source_pad_event_probe),
(remove_fakesink):
Add drained signal fired when decodebin finishes decoding the data.
Remove deprecated STATE_DIRTY message.
* gst/playback/gsturidecodebin.c: (gst_uri_decode_bin_class_init),
(unknown_type_cb), (new_decoded_pad_cb), (pad_removed_cb),
(analyse_source), (proxy_drained_signal), (make_decoder),
(source_new_pad), (value_list_append_structure_list),
(handle_redirect_message), (handle_message):
Proxy the new drained signal.
Handle pad removed from decodebin.
Handle redirect messages by sorting multiple redirections based on the
connection speed.
2007-11-16 12:51:44 +00:00
|
|
|
GST_DEBUG_OBJECT (pad, "we received EOS");
|
|
|
|
|
2011-07-25 08:41:04 +00:00
|
|
|
/* Check if all pads are drained.
|
|
|
|
* * If there is no next group, we will let the EOS go through.
|
|
|
|
* * If there is a next group but the current group isn't completely
|
|
|
|
* drained, we will drop the EOS event.
|
|
|
|
* * If there is a next group to expose and this was the last non-drained
|
|
|
|
* pad for that group, we will remove the ghostpad of the current group
|
|
|
|
* first, which unlinks the peer and so drops the EOS. */
|
|
|
|
res = gst_decode_pad_handle_eos (dpad);
|
gst/playback/: New decodebin2 element.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstdecodebin2.c: (gst_decode_bin_get_type),
(_gst_boolean_accumulator), (gst_decode_bin_class_init),
(gst_decode_bin_factory_filter), (compare_ranks), (print_feature),
(gst_decode_bin_init), (gst_decode_bin_dispose),
(gst_decode_bin_finalize), (gst_decode_bin_set_property),
(gst_decode_bin_get_property), (gst_decode_bin_set_caps),
(gst_decode_bin_get_caps), (gst_decode_bin_autoplug_continue),
(gst_decode_bin_autoplug_sort), (analyze_new_pad), (connect_pad),
(connect_element), (expose_pad), (type_found),
(pad_added_group_cb), (pad_removed_group_cb),
(no_more_pads_group_cb), (pad_added_cb), (pad_removed_cb),
(no_more_pads_cb), (find_compatibles), (is_demuxer_element),
(are_raw_caps), (multi_queue_overrun_cb),
(multi_queue_underrun_cb), (gst_decode_group_new),
(get_current_group), (group_demuxer_event_probe),
(gst_decode_group_control_demuxer_pad),
(gst_decode_group_control_source_pad),
(gst_decode_group_check_if_blocked),
(gst_decode_group_check_if_drained), (gst_decode_group_expose),
(gst_decode_group_hide), (gst_decode_group_free),
(gst_decode_group_set_complete), (source_pad_blocked_cb),
(source_pad_event_probe), (gst_decode_pad_new), (add_fakesink),
(remove_fakesink), (find_sink_pad), (gst_decode_bin_change_state),
(plugin_init):
New decodebin2 element.
Closes #370092
* gst/playback/gstplay-marshal.list:
Added marshallers for new signals in decodebin2
* gst/playback/gstplaybasebin.c: (setup_subtitle), (make_decoder):
Use decodebin2 if *and only if* the USE_DECODEBIN2 environment variable
is set.
2006-11-28 14:40:39 +00:00
|
|
|
}
|
2011-08-16 16:01:14 +00:00
|
|
|
if (res)
|
2011-11-01 00:34:28 +00:00
|
|
|
return GST_PAD_PROBE_OK;
|
2011-08-16 16:01:14 +00:00
|
|
|
else
|
2011-11-01 00:34:28 +00:00
|
|
|
return GST_PAD_PROBE_DROP;
|
gst/playback/: New decodebin2 element.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstdecodebin2.c: (gst_decode_bin_get_type),
(_gst_boolean_accumulator), (gst_decode_bin_class_init),
(gst_decode_bin_factory_filter), (compare_ranks), (print_feature),
(gst_decode_bin_init), (gst_decode_bin_dispose),
(gst_decode_bin_finalize), (gst_decode_bin_set_property),
(gst_decode_bin_get_property), (gst_decode_bin_set_caps),
(gst_decode_bin_get_caps), (gst_decode_bin_autoplug_continue),
(gst_decode_bin_autoplug_sort), (analyze_new_pad), (connect_pad),
(connect_element), (expose_pad), (type_found),
(pad_added_group_cb), (pad_removed_group_cb),
(no_more_pads_group_cb), (pad_added_cb), (pad_removed_cb),
(no_more_pads_cb), (find_compatibles), (is_demuxer_element),
(are_raw_caps), (multi_queue_overrun_cb),
(multi_queue_underrun_cb), (gst_decode_group_new),
(get_current_group), (group_demuxer_event_probe),
(gst_decode_group_control_demuxer_pad),
(gst_decode_group_control_source_pad),
(gst_decode_group_check_if_blocked),
(gst_decode_group_check_if_drained), (gst_decode_group_expose),
(gst_decode_group_hide), (gst_decode_group_free),
(gst_decode_group_set_complete), (source_pad_blocked_cb),
(source_pad_event_probe), (gst_decode_pad_new), (add_fakesink),
(remove_fakesink), (find_sink_pad), (gst_decode_bin_change_state),
(plugin_init):
New decodebin2 element.
Closes #370092
* gst/playback/gstplay-marshal.list:
Added marshallers for new signals in decodebin2
* gst/playback/gstplaybasebin.c: (setup_subtitle), (make_decoder):
Use decodebin2 if *and only if* the USE_DECODEBIN2 environment variable
is set.
2006-11-28 14:40:39 +00:00
|
|
|
}
|
|
|
|
|
2008-11-21 00:04:48 +00:00
|
|
|
static void
|
|
|
|
gst_decode_pad_set_blocked (GstDecodePad * dpad, gboolean blocked)
|
gst/playback/gstdecodebin2.c (struct _GstDecodePad): Change to be a subclass of GstGhostPad.
Original commit message from CVS:
2008-10-08 Andy Wingo <wingo@pobox.com>
* gst/playback/gstdecodebin2.c (struct _GstDecodePad): Change to
be a subclass of GstGhostPad.
(analyze_new_pad): So, when emitting the signals that determine
how we do autoplugging, already create the ghost pad and use it as
the pad in the signal arguments. This allows applications to make
a connection between the pad passed in e.g. autoplug-continue, and
the pad passed in new-decoded-pad.
(connect_pad, expose_pad): Update to receive the ghosted decode
pad in the args, retargetting it as necessary if we have to plug
the target pad through a multiqueue.
(gst_decode_group_control_source_pad): Adapt to receive an
already-ghosted pad that just needs activation, blocking, and
drain notification.
(sort_end_pads): Adapt for decode pads actually being pads.
(gst_decode_group_expose): Adapt for decode pads actually being
pads. Rewrite the decode pad names so they appear in order. Adds a
new error case if we couldn't set the name.
(gst_decode_group_free, gst_decode_group_hide): Adapt cleanup
logic.
(gst_decode_pad_set_blocked, gst_decode_pad_add_drained_check):
New API for the decode pad, needed because we shouldn't do these
things inside gst_decode_pad_new(), but after.
(gst_decode_pad_new): Change to actually make the real pad, and
delay the blocking/drainage bits.
2008-10-08 12:49:40 +00:00
|
|
|
{
|
2009-03-06 18:28:37 +00:00
|
|
|
GstDecodeBin *dbin = dpad->dbin;
|
2009-09-26 10:10:21 +00:00
|
|
|
GstPad *opad;
|
2009-03-06 18:28:37 +00:00
|
|
|
|
2009-09-26 10:17:49 +00:00
|
|
|
DYN_LOCK (dbin);
|
2009-12-16 10:43:27 +00:00
|
|
|
|
|
|
|
GST_DEBUG_OBJECT (dpad, "blocking pad: %d", blocked);
|
|
|
|
|
2009-09-26 10:10:21 +00:00
|
|
|
opad = gst_ghost_pad_get_target (GST_GHOST_PAD_CAST (dpad));
|
|
|
|
if (!opad)
|
|
|
|
goto out;
|
|
|
|
|
2010-01-14 17:26:03 +00:00
|
|
|
/* do not block if shutting down.
|
|
|
|
* we do not consider/expect it blocked further below, but use other trick */
|
2011-05-30 16:36:14 +00:00
|
|
|
if (!blocked || !dbin->shutdown) {
|
|
|
|
if (blocked) {
|
2011-06-01 17:34:54 +00:00
|
|
|
if (dpad->block_id == 0)
|
2011-11-07 16:10:48 +00:00
|
|
|
dpad->block_id =
|
2013-05-28 11:06:15 +00:00
|
|
|
gst_pad_add_probe (opad,
|
|
|
|
GST_PAD_PROBE_TYPE_BLOCK_DOWNSTREAM |
|
|
|
|
GST_PAD_PROBE_TYPE_QUERY_DOWNSTREAM, source_pad_blocked_cb,
|
|
|
|
gst_object_ref (dpad), (GDestroyNotify) gst_object_unref);
|
2011-05-30 16:36:14 +00:00
|
|
|
} else {
|
2011-06-01 17:34:54 +00:00
|
|
|
if (dpad->block_id != 0) {
|
|
|
|
gst_pad_remove_probe (opad, dpad->block_id);
|
|
|
|
dpad->block_id = 0;
|
|
|
|
}
|
2011-05-30 16:36:14 +00:00
|
|
|
dpad->blocked = FALSE;
|
|
|
|
}
|
|
|
|
}
|
2009-12-23 17:18:03 +00:00
|
|
|
|
2009-03-06 18:28:37 +00:00
|
|
|
if (blocked) {
|
|
|
|
if (dbin->shutdown) {
|
|
|
|
/* deactivate to force flushing state to prevent NOT_LINKED errors */
|
2009-12-23 17:18:03 +00:00
|
|
|
gst_pad_set_active (GST_PAD_CAST (dpad), FALSE);
|
2010-01-14 17:26:03 +00:00
|
|
|
/* note that deactivating the target pad would have no effect here,
|
|
|
|
* since elements are typically connected first (and pads exposed),
|
|
|
|
* and only then brought to PAUSED state (so pads activated) */
|
2009-03-06 18:28:37 +00:00
|
|
|
} else {
|
|
|
|
gst_object_ref (dpad);
|
|
|
|
dbin->blocked_pads = g_list_prepend (dbin->blocked_pads, dpad);
|
|
|
|
}
|
|
|
|
} else {
|
2009-09-26 10:17:49 +00:00
|
|
|
GList *l;
|
|
|
|
|
|
|
|
if ((l = g_list_find (dbin->blocked_pads, dpad))) {
|
2009-03-06 18:28:37 +00:00
|
|
|
gst_object_unref (dpad);
|
2009-09-26 10:17:49 +00:00
|
|
|
dbin->blocked_pads = g_list_delete_link (dbin->blocked_pads, l);
|
|
|
|
}
|
2009-03-06 18:28:37 +00:00
|
|
|
}
|
2009-09-26 10:10:21 +00:00
|
|
|
gst_object_unref (opad);
|
|
|
|
out:
|
2009-09-26 10:17:49 +00:00
|
|
|
DYN_UNLOCK (dbin);
|
gst/playback/gstdecodebin2.c (struct _GstDecodePad): Change to be a subclass of GstGhostPad.
Original commit message from CVS:
2008-10-08 Andy Wingo <wingo@pobox.com>
* gst/playback/gstdecodebin2.c (struct _GstDecodePad): Change to
be a subclass of GstGhostPad.
(analyze_new_pad): So, when emitting the signals that determine
how we do autoplugging, already create the ghost pad and use it as
the pad in the signal arguments. This allows applications to make
a connection between the pad passed in e.g. autoplug-continue, and
the pad passed in new-decoded-pad.
(connect_pad, expose_pad): Update to receive the ghosted decode
pad in the args, retargetting it as necessary if we have to plug
the target pad through a multiqueue.
(gst_decode_group_control_source_pad): Adapt to receive an
already-ghosted pad that just needs activation, blocking, and
drain notification.
(sort_end_pads): Adapt for decode pads actually being pads.
(gst_decode_group_expose): Adapt for decode pads actually being
pads. Rewrite the decode pad names so they appear in order. Adds a
new error case if we couldn't set the name.
(gst_decode_group_free, gst_decode_group_hide): Adapt cleanup
logic.
(gst_decode_pad_set_blocked, gst_decode_pad_add_drained_check):
New API for the decode pad, needed because we shouldn't do these
things inside gst_decode_pad_new(), but after.
(gst_decode_pad_new): Change to actually make the real pad, and
delay the blocking/drainage bits.
2008-10-08 12:49:40 +00:00
|
|
|
}
|
|
|
|
|
2008-11-21 00:04:48 +00:00
|
|
|
static void
|
|
|
|
gst_decode_pad_add_drained_check (GstDecodePad * dpad)
|
gst/playback/gstdecodebin2.c (struct _GstDecodePad): Change to be a subclass of GstGhostPad.
Original commit message from CVS:
2008-10-08 Andy Wingo <wingo@pobox.com>
* gst/playback/gstdecodebin2.c (struct _GstDecodePad): Change to
be a subclass of GstGhostPad.
(analyze_new_pad): So, when emitting the signals that determine
how we do autoplugging, already create the ghost pad and use it as
the pad in the signal arguments. This allows applications to make
a connection between the pad passed in e.g. autoplug-continue, and
the pad passed in new-decoded-pad.
(connect_pad, expose_pad): Update to receive the ghosted decode
pad in the args, retargetting it as necessary if we have to plug
the target pad through a multiqueue.
(gst_decode_group_control_source_pad): Adapt to receive an
already-ghosted pad that just needs activation, blocking, and
drain notification.
(sort_end_pads): Adapt for decode pads actually being pads.
(gst_decode_group_expose): Adapt for decode pads actually being
pads. Rewrite the decode pad names so they appear in order. Adds a
new error case if we couldn't set the name.
(gst_decode_group_free, gst_decode_group_hide): Adapt cleanup
logic.
(gst_decode_pad_set_blocked, gst_decode_pad_add_drained_check):
New API for the decode pad, needed because we shouldn't do these
things inside gst_decode_pad_new(), but after.
(gst_decode_pad_new): Change to actually make the real pad, and
delay the blocking/drainage bits.
2008-10-08 12:49:40 +00:00
|
|
|
{
|
2011-11-07 16:10:48 +00:00
|
|
|
gst_pad_add_probe (GST_PAD_CAST (dpad), GST_PAD_PROBE_TYPE_EVENT_DOWNSTREAM,
|
2011-06-01 17:34:54 +00:00
|
|
|
source_pad_event_probe, dpad, NULL);
|
gst/playback/gstdecodebin2.c (struct _GstDecodePad): Change to be a subclass of GstGhostPad.
Original commit message from CVS:
2008-10-08 Andy Wingo <wingo@pobox.com>
* gst/playback/gstdecodebin2.c (struct _GstDecodePad): Change to
be a subclass of GstGhostPad.
(analyze_new_pad): So, when emitting the signals that determine
how we do autoplugging, already create the ghost pad and use it as
the pad in the signal arguments. This allows applications to make
a connection between the pad passed in e.g. autoplug-continue, and
the pad passed in new-decoded-pad.
(connect_pad, expose_pad): Update to receive the ghosted decode
pad in the args, retargetting it as necessary if we have to plug
the target pad through a multiqueue.
(gst_decode_group_control_source_pad): Adapt to receive an
already-ghosted pad that just needs activation, blocking, and
drain notification.
(sort_end_pads): Adapt for decode pads actually being pads.
(gst_decode_group_expose): Adapt for decode pads actually being
pads. Rewrite the decode pad names so they appear in order. Adds a
new error case if we couldn't set the name.
(gst_decode_group_free, gst_decode_group_hide): Adapt cleanup
logic.
(gst_decode_pad_set_blocked, gst_decode_pad_add_drained_check):
New API for the decode pad, needed because we shouldn't do these
things inside gst_decode_pad_new(), but after.
(gst_decode_pad_new): Change to actually make the real pad, and
delay the blocking/drainage bits.
2008-10-08 12:49:40 +00:00
|
|
|
}
|
|
|
|
|
2008-10-08 14:00:07 +00:00
|
|
|
static void
|
2009-09-26 10:17:49 +00:00
|
|
|
gst_decode_pad_activate (GstDecodePad * dpad, GstDecodeChain * chain)
|
2008-10-08 14:00:07 +00:00
|
|
|
{
|
2009-09-26 10:17:49 +00:00
|
|
|
g_return_if_fail (chain != NULL);
|
2008-10-08 14:00:07 +00:00
|
|
|
|
2009-09-26 10:17:49 +00:00
|
|
|
dpad->chain = chain;
|
2009-12-23 17:18:03 +00:00
|
|
|
gst_pad_set_active (GST_PAD_CAST (dpad), TRUE);
|
2008-10-08 14:00:07 +00:00
|
|
|
gst_decode_pad_set_blocked (dpad, TRUE);
|
|
|
|
gst_decode_pad_add_drained_check (dpad);
|
|
|
|
}
|
|
|
|
|
2008-11-21 00:04:48 +00:00
|
|
|
static void
|
|
|
|
gst_decode_pad_unblock (GstDecodePad * dpad)
|
2008-10-08 14:00:07 +00:00
|
|
|
{
|
|
|
|
gst_decode_pad_set_blocked (dpad, FALSE);
|
|
|
|
}
|
|
|
|
|
2015-10-27 13:44:06 +00:00
|
|
|
static gboolean
|
|
|
|
gst_decode_pad_event (GstPad * pad, GstObject * parent, GstEvent * event)
|
|
|
|
{
|
|
|
|
GstDecodeBin *dbin = GST_DECODE_BIN (parent);
|
|
|
|
|
|
|
|
if (GST_EVENT_TYPE (event) == GST_EVENT_SEEK && dbin && dbin->decode_chain) {
|
|
|
|
GstElement *demuxer = NULL;
|
|
|
|
|
|
|
|
/* For adaptive demuxers we send the seek event directly to the demuxer.
|
|
|
|
* See https://bugzilla.gnome.org/show_bug.cgi?id=606382
|
|
|
|
*/
|
|
|
|
CHAIN_MUTEX_LOCK (dbin->decode_chain);
|
|
|
|
if (dbin->decode_chain->adaptive_demuxer) {
|
|
|
|
GstDecodeElement *delem = dbin->decode_chain->elements->data;
|
|
|
|
demuxer = gst_object_ref (delem->element);
|
|
|
|
}
|
|
|
|
CHAIN_MUTEX_UNLOCK (dbin->decode_chain);
|
|
|
|
|
|
|
|
if (demuxer) {
|
|
|
|
gboolean ret;
|
|
|
|
|
|
|
|
GST_DEBUG_OBJECT (dbin,
|
|
|
|
"Sending SEEK event directly to adaptive streaming demuxer %s",
|
|
|
|
GST_OBJECT_NAME (demuxer));
|
|
|
|
ret = gst_element_send_event (demuxer, event);
|
|
|
|
gst_object_unref (demuxer);
|
|
|
|
return ret;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
return gst_pad_event_default (pad, parent, event);
|
|
|
|
}
|
|
|
|
|
2013-03-29 17:27:03 +00:00
|
|
|
static gboolean
|
|
|
|
gst_decode_pad_query (GstPad * pad, GstObject * parent, GstQuery * query)
|
|
|
|
{
|
|
|
|
GstDecodePad *dpad = GST_DECODE_PAD (parent);
|
|
|
|
gboolean ret = FALSE;
|
|
|
|
|
2013-05-28 09:40:51 +00:00
|
|
|
CHAIN_MUTEX_LOCK (dpad->chain);
|
2013-05-28 11:32:23 +00:00
|
|
|
if (!dpad->exposed && !dpad->dbin->shutdown && !dpad->chain->deadend
|
|
|
|
&& dpad->chain->elements) {
|
2013-05-28 11:08:00 +00:00
|
|
|
GstDecodeElement *delem = dpad->chain->elements->data;
|
|
|
|
|
2013-03-29 17:27:03 +00:00
|
|
|
ret = FALSE;
|
2013-05-28 10:03:49 +00:00
|
|
|
GST_DEBUG_OBJECT (dpad->dbin,
|
|
|
|
"calling autoplug-query for %s (element %s): %" GST_PTR_FORMAT,
|
2013-05-28 11:08:00 +00:00
|
|
|
GST_PAD_NAME (dpad), GST_ELEMENT_NAME (delem->element), query);
|
2013-03-29 17:27:03 +00:00
|
|
|
g_signal_emit (G_OBJECT (dpad->dbin),
|
2013-05-28 10:03:49 +00:00
|
|
|
gst_decode_bin_signals[SIGNAL_AUTOPLUG_QUERY], 0, dpad, delem->element,
|
|
|
|
query, &ret);
|
|
|
|
|
2013-05-28 11:08:00 +00:00
|
|
|
if (ret)
|
|
|
|
GST_DEBUG_OBJECT (dpad->dbin,
|
|
|
|
"autoplug-query returned %d: %" GST_PTR_FORMAT, ret, query);
|
|
|
|
else
|
|
|
|
GST_DEBUG_OBJECT (dpad->dbin, "autoplug-query returned %d", ret);
|
2013-03-29 17:27:03 +00:00
|
|
|
}
|
2013-05-28 09:40:51 +00:00
|
|
|
CHAIN_MUTEX_UNLOCK (dpad->chain);
|
2013-03-29 17:27:03 +00:00
|
|
|
|
|
|
|
/* If exposed or nothing handled the query use the default handler */
|
|
|
|
if (!ret)
|
|
|
|
ret = gst_pad_query_default (pad, parent, query);
|
|
|
|
|
|
|
|
return ret;
|
|
|
|
}
|
|
|
|
|
2016-05-04 01:33:50 +00:00
|
|
|
static gboolean
|
|
|
|
gst_decode_pad_is_exposable (GstDecodePad * endpad)
|
|
|
|
{
|
|
|
|
if (endpad->blocked || endpad->exposed)
|
|
|
|
return TRUE;
|
|
|
|
|
|
|
|
return gst_pad_has_current_caps (GST_PAD_CAST (endpad));
|
|
|
|
}
|
|
|
|
|
2007-03-02 12:59:15 +00:00
|
|
|
/*gst_decode_pad_new:
|
gst/playback/: New decodebin2 element.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstdecodebin2.c: (gst_decode_bin_get_type),
(_gst_boolean_accumulator), (gst_decode_bin_class_init),
(gst_decode_bin_factory_filter), (compare_ranks), (print_feature),
(gst_decode_bin_init), (gst_decode_bin_dispose),
(gst_decode_bin_finalize), (gst_decode_bin_set_property),
(gst_decode_bin_get_property), (gst_decode_bin_set_caps),
(gst_decode_bin_get_caps), (gst_decode_bin_autoplug_continue),
(gst_decode_bin_autoplug_sort), (analyze_new_pad), (connect_pad),
(connect_element), (expose_pad), (type_found),
(pad_added_group_cb), (pad_removed_group_cb),
(no_more_pads_group_cb), (pad_added_cb), (pad_removed_cb),
(no_more_pads_cb), (find_compatibles), (is_demuxer_element),
(are_raw_caps), (multi_queue_overrun_cb),
(multi_queue_underrun_cb), (gst_decode_group_new),
(get_current_group), (group_demuxer_event_probe),
(gst_decode_group_control_demuxer_pad),
(gst_decode_group_control_source_pad),
(gst_decode_group_check_if_blocked),
(gst_decode_group_check_if_drained), (gst_decode_group_expose),
(gst_decode_group_hide), (gst_decode_group_free),
(gst_decode_group_set_complete), (source_pad_blocked_cb),
(source_pad_event_probe), (gst_decode_pad_new), (add_fakesink),
(remove_fakesink), (find_sink_pad), (gst_decode_bin_change_state),
(plugin_init):
New decodebin2 element.
Closes #370092
* gst/playback/gstplay-marshal.list:
Added marshallers for new signals in decodebin2
* gst/playback/gstplaybasebin.c: (setup_subtitle), (make_decoder):
Use decodebin2 if *and only if* the USE_DECODEBIN2 environment variable
is set.
2006-11-28 14:40:39 +00:00
|
|
|
*
|
|
|
|
* Creates a new GstDecodePad for the given pad.
|
|
|
|
*/
|
2008-11-21 00:04:48 +00:00
|
|
|
static GstDecodePad *
|
2013-03-29 17:27:03 +00:00
|
|
|
gst_decode_pad_new (GstDecodeBin * dbin, GstDecodeChain * chain)
|
gst/playback/: New decodebin2 element.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstdecodebin2.c: (gst_decode_bin_get_type),
(_gst_boolean_accumulator), (gst_decode_bin_class_init),
(gst_decode_bin_factory_filter), (compare_ranks), (print_feature),
(gst_decode_bin_init), (gst_decode_bin_dispose),
(gst_decode_bin_finalize), (gst_decode_bin_set_property),
(gst_decode_bin_get_property), (gst_decode_bin_set_caps),
(gst_decode_bin_get_caps), (gst_decode_bin_autoplug_continue),
(gst_decode_bin_autoplug_sort), (analyze_new_pad), (connect_pad),
(connect_element), (expose_pad), (type_found),
(pad_added_group_cb), (pad_removed_group_cb),
(no_more_pads_group_cb), (pad_added_cb), (pad_removed_cb),
(no_more_pads_cb), (find_compatibles), (is_demuxer_element),
(are_raw_caps), (multi_queue_overrun_cb),
(multi_queue_underrun_cb), (gst_decode_group_new),
(get_current_group), (group_demuxer_event_probe),
(gst_decode_group_control_demuxer_pad),
(gst_decode_group_control_source_pad),
(gst_decode_group_check_if_blocked),
(gst_decode_group_check_if_drained), (gst_decode_group_expose),
(gst_decode_group_hide), (gst_decode_group_free),
(gst_decode_group_set_complete), (source_pad_blocked_cb),
(source_pad_event_probe), (gst_decode_pad_new), (add_fakesink),
(remove_fakesink), (find_sink_pad), (gst_decode_bin_change_state),
(plugin_init):
New decodebin2 element.
Closes #370092
* gst/playback/gstplay-marshal.list:
Added marshallers for new signals in decodebin2
* gst/playback/gstplaybasebin.c: (setup_subtitle), (make_decoder):
Use decodebin2 if *and only if* the USE_DECODEBIN2 environment variable
is set.
2006-11-28 14:40:39 +00:00
|
|
|
{
|
|
|
|
GstDecodePad *dpad;
|
2013-03-29 17:27:03 +00:00
|
|
|
GstProxyPad *ppad;
|
2010-11-17 08:14:59 +00:00
|
|
|
GstPadTemplate *pad_tmpl;
|
gst/playback/: New decodebin2 element.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstdecodebin2.c: (gst_decode_bin_get_type),
(_gst_boolean_accumulator), (gst_decode_bin_class_init),
(gst_decode_bin_factory_filter), (compare_ranks), (print_feature),
(gst_decode_bin_init), (gst_decode_bin_dispose),
(gst_decode_bin_finalize), (gst_decode_bin_set_property),
(gst_decode_bin_get_property), (gst_decode_bin_set_caps),
(gst_decode_bin_get_caps), (gst_decode_bin_autoplug_continue),
(gst_decode_bin_autoplug_sort), (analyze_new_pad), (connect_pad),
(connect_element), (expose_pad), (type_found),
(pad_added_group_cb), (pad_removed_group_cb),
(no_more_pads_group_cb), (pad_added_cb), (pad_removed_cb),
(no_more_pads_cb), (find_compatibles), (is_demuxer_element),
(are_raw_caps), (multi_queue_overrun_cb),
(multi_queue_underrun_cb), (gst_decode_group_new),
(get_current_group), (group_demuxer_event_probe),
(gst_decode_group_control_demuxer_pad),
(gst_decode_group_control_source_pad),
(gst_decode_group_check_if_blocked),
(gst_decode_group_check_if_drained), (gst_decode_group_expose),
(gst_decode_group_hide), (gst_decode_group_free),
(gst_decode_group_set_complete), (source_pad_blocked_cb),
(source_pad_event_probe), (gst_decode_pad_new), (add_fakesink),
(remove_fakesink), (find_sink_pad), (gst_decode_bin_change_state),
(plugin_init):
New decodebin2 element.
Closes #370092
* gst/playback/gstplay-marshal.list:
Added marshallers for new signals in decodebin2
* gst/playback/gstplaybasebin.c: (setup_subtitle), (make_decoder):
Use decodebin2 if *and only if* the USE_DECODEBIN2 environment variable
is set.
2006-11-28 14:40:39 +00:00
|
|
|
|
2009-12-23 17:18:03 +00:00
|
|
|
GST_DEBUG_OBJECT (dbin, "making new decodepad");
|
2010-11-17 08:14:59 +00:00
|
|
|
pad_tmpl = gst_static_pad_template_get (&decoder_bin_src_template);
|
gst/playback/gstdecodebin2.c (struct _GstDecodePad): Change to be a subclass of GstGhostPad.
Original commit message from CVS:
2008-10-08 Andy Wingo <wingo@pobox.com>
* gst/playback/gstdecodebin2.c (struct _GstDecodePad): Change to
be a subclass of GstGhostPad.
(analyze_new_pad): So, when emitting the signals that determine
how we do autoplugging, already create the ghost pad and use it as
the pad in the signal arguments. This allows applications to make
a connection between the pad passed in e.g. autoplug-continue, and
the pad passed in new-decoded-pad.
(connect_pad, expose_pad): Update to receive the ghosted decode
pad in the args, retargetting it as necessary if we have to plug
the target pad through a multiqueue.
(gst_decode_group_control_source_pad): Adapt to receive an
already-ghosted pad that just needs activation, blocking, and
drain notification.
(sort_end_pads): Adapt for decode pads actually being pads.
(gst_decode_group_expose): Adapt for decode pads actually being
pads. Rewrite the decode pad names so they appear in order. Adds a
new error case if we couldn't set the name.
(gst_decode_group_free, gst_decode_group_hide): Adapt cleanup
logic.
(gst_decode_pad_set_blocked, gst_decode_pad_add_drained_check):
New API for the decode pad, needed because we shouldn't do these
things inside gst_decode_pad_new(), but after.
(gst_decode_pad_new): Change to actually make the real pad, and
delay the blocking/drainage bits.
2008-10-08 12:49:40 +00:00
|
|
|
dpad =
|
2013-03-29 17:27:03 +00:00
|
|
|
g_object_new (GST_TYPE_DECODE_PAD, "direction", GST_PAD_SRC,
|
2010-11-22 00:54:35 +00:00
|
|
|
"template", pad_tmpl, NULL);
|
2009-12-23 17:18:03 +00:00
|
|
|
gst_ghost_pad_construct (GST_GHOST_PAD_CAST (dpad));
|
2009-09-26 10:17:49 +00:00
|
|
|
dpad->chain = chain;
|
2009-03-06 18:28:37 +00:00
|
|
|
dpad->dbin = dbin;
|
2010-11-17 08:14:59 +00:00
|
|
|
gst_object_unref (pad_tmpl);
|
gst/playback/: New decodebin2 element.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstdecodebin2.c: (gst_decode_bin_get_type),
(_gst_boolean_accumulator), (gst_decode_bin_class_init),
(gst_decode_bin_factory_filter), (compare_ranks), (print_feature),
(gst_decode_bin_init), (gst_decode_bin_dispose),
(gst_decode_bin_finalize), (gst_decode_bin_set_property),
(gst_decode_bin_get_property), (gst_decode_bin_set_caps),
(gst_decode_bin_get_caps), (gst_decode_bin_autoplug_continue),
(gst_decode_bin_autoplug_sort), (analyze_new_pad), (connect_pad),
(connect_element), (expose_pad), (type_found),
(pad_added_group_cb), (pad_removed_group_cb),
(no_more_pads_group_cb), (pad_added_cb), (pad_removed_cb),
(no_more_pads_cb), (find_compatibles), (is_demuxer_element),
(are_raw_caps), (multi_queue_overrun_cb),
(multi_queue_underrun_cb), (gst_decode_group_new),
(get_current_group), (group_demuxer_event_probe),
(gst_decode_group_control_demuxer_pad),
(gst_decode_group_control_source_pad),
(gst_decode_group_check_if_blocked),
(gst_decode_group_check_if_drained), (gst_decode_group_expose),
(gst_decode_group_hide), (gst_decode_group_free),
(gst_decode_group_set_complete), (source_pad_blocked_cb),
(source_pad_event_probe), (gst_decode_pad_new), (add_fakesink),
(remove_fakesink), (find_sink_pad), (gst_decode_bin_change_state),
(plugin_init):
New decodebin2 element.
Closes #370092
* gst/playback/gstplay-marshal.list:
Added marshallers for new signals in decodebin2
* gst/playback/gstplaybasebin.c: (setup_subtitle), (make_decoder):
Use decodebin2 if *and only if* the USE_DECODEBIN2 environment variable
is set.
2006-11-28 14:40:39 +00:00
|
|
|
|
2013-03-29 17:27:03 +00:00
|
|
|
ppad = gst_proxy_pad_get_internal (GST_PROXY_PAD (dpad));
|
|
|
|
gst_pad_set_query_function (GST_PAD_CAST (ppad), gst_decode_pad_query);
|
2015-10-27 13:44:06 +00:00
|
|
|
gst_pad_set_event_function (GST_PAD_CAST (dpad), gst_decode_pad_event);
|
2013-03-29 17:27:03 +00:00
|
|
|
gst_object_unref (ppad);
|
|
|
|
|
gst/playback/: New decodebin2 element.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstdecodebin2.c: (gst_decode_bin_get_type),
(_gst_boolean_accumulator), (gst_decode_bin_class_init),
(gst_decode_bin_factory_filter), (compare_ranks), (print_feature),
(gst_decode_bin_init), (gst_decode_bin_dispose),
(gst_decode_bin_finalize), (gst_decode_bin_set_property),
(gst_decode_bin_get_property), (gst_decode_bin_set_caps),
(gst_decode_bin_get_caps), (gst_decode_bin_autoplug_continue),
(gst_decode_bin_autoplug_sort), (analyze_new_pad), (connect_pad),
(connect_element), (expose_pad), (type_found),
(pad_added_group_cb), (pad_removed_group_cb),
(no_more_pads_group_cb), (pad_added_cb), (pad_removed_cb),
(no_more_pads_cb), (find_compatibles), (is_demuxer_element),
(are_raw_caps), (multi_queue_overrun_cb),
(multi_queue_underrun_cb), (gst_decode_group_new),
(get_current_group), (group_demuxer_event_probe),
(gst_decode_group_control_demuxer_pad),
(gst_decode_group_control_source_pad),
(gst_decode_group_check_if_blocked),
(gst_decode_group_check_if_drained), (gst_decode_group_expose),
(gst_decode_group_hide), (gst_decode_group_free),
(gst_decode_group_set_complete), (source_pad_blocked_cb),
(source_pad_event_probe), (gst_decode_pad_new), (add_fakesink),
(remove_fakesink), (find_sink_pad), (gst_decode_bin_change_state),
(plugin_init):
New decodebin2 element.
Closes #370092
* gst/playback/gstplay-marshal.list:
Added marshallers for new signals in decodebin2
* gst/playback/gstplaybasebin.c: (setup_subtitle), (make_decoder):
Use decodebin2 if *and only if* the USE_DECODEBIN2 environment variable
is set.
2006-11-28 14:40:39 +00:00
|
|
|
return dpad;
|
|
|
|
}
|
|
|
|
|
2009-11-19 17:51:33 +00:00
|
|
|
static void
|
|
|
|
gst_pending_pad_free (GstPendingPad * ppad)
|
|
|
|
{
|
|
|
|
g_assert (ppad);
|
|
|
|
g_assert (ppad->pad);
|
|
|
|
|
|
|
|
if (ppad->event_probe_id != 0)
|
2011-06-01 17:34:54 +00:00
|
|
|
gst_pad_remove_probe (ppad->pad, ppad->event_probe_id);
|
2013-05-22 15:29:17 +00:00
|
|
|
if (ppad->notify_caps_id)
|
|
|
|
g_signal_handler_disconnect (ppad->pad, ppad->notify_caps_id);
|
2009-11-19 17:51:33 +00:00
|
|
|
gst_object_unref (ppad->pad);
|
|
|
|
g_slice_free (GstPendingPad, ppad);
|
|
|
|
}
|
gst/playback/: New decodebin2 element.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstdecodebin2.c: (gst_decode_bin_get_type),
(_gst_boolean_accumulator), (gst_decode_bin_class_init),
(gst_decode_bin_factory_filter), (compare_ranks), (print_feature),
(gst_decode_bin_init), (gst_decode_bin_dispose),
(gst_decode_bin_finalize), (gst_decode_bin_set_property),
(gst_decode_bin_get_property), (gst_decode_bin_set_caps),
(gst_decode_bin_get_caps), (gst_decode_bin_autoplug_continue),
(gst_decode_bin_autoplug_sort), (analyze_new_pad), (connect_pad),
(connect_element), (expose_pad), (type_found),
(pad_added_group_cb), (pad_removed_group_cb),
(no_more_pads_group_cb), (pad_added_cb), (pad_removed_cb),
(no_more_pads_cb), (find_compatibles), (is_demuxer_element),
(are_raw_caps), (multi_queue_overrun_cb),
(multi_queue_underrun_cb), (gst_decode_group_new),
(get_current_group), (group_demuxer_event_probe),
(gst_decode_group_control_demuxer_pad),
(gst_decode_group_control_source_pad),
(gst_decode_group_check_if_blocked),
(gst_decode_group_check_if_drained), (gst_decode_group_expose),
(gst_decode_group_hide), (gst_decode_group_free),
(gst_decode_group_set_complete), (source_pad_blocked_cb),
(source_pad_event_probe), (gst_decode_pad_new), (add_fakesink),
(remove_fakesink), (find_sink_pad), (gst_decode_bin_change_state),
(plugin_init):
New decodebin2 element.
Closes #370092
* gst/playback/gstplay-marshal.list:
Added marshallers for new signals in decodebin2
* gst/playback/gstplaybasebin.c: (setup_subtitle), (make_decoder):
Use decodebin2 if *and only if* the USE_DECODEBIN2 environment variable
is set.
2006-11-28 14:40:39 +00:00
|
|
|
|
|
|
|
/*****
|
|
|
|
* Element add/remove
|
|
|
|
*****/
|
|
|
|
|
2008-11-21 00:04:48 +00:00
|
|
|
static void
|
|
|
|
do_async_start (GstDecodeBin * dbin)
|
gst/playback/: New decodebin2 element.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstdecodebin2.c: (gst_decode_bin_get_type),
(_gst_boolean_accumulator), (gst_decode_bin_class_init),
(gst_decode_bin_factory_filter), (compare_ranks), (print_feature),
(gst_decode_bin_init), (gst_decode_bin_dispose),
(gst_decode_bin_finalize), (gst_decode_bin_set_property),
(gst_decode_bin_get_property), (gst_decode_bin_set_caps),
(gst_decode_bin_get_caps), (gst_decode_bin_autoplug_continue),
(gst_decode_bin_autoplug_sort), (analyze_new_pad), (connect_pad),
(connect_element), (expose_pad), (type_found),
(pad_added_group_cb), (pad_removed_group_cb),
(no_more_pads_group_cb), (pad_added_cb), (pad_removed_cb),
(no_more_pads_cb), (find_compatibles), (is_demuxer_element),
(are_raw_caps), (multi_queue_overrun_cb),
(multi_queue_underrun_cb), (gst_decode_group_new),
(get_current_group), (group_demuxer_event_probe),
(gst_decode_group_control_demuxer_pad),
(gst_decode_group_control_source_pad),
(gst_decode_group_check_if_blocked),
(gst_decode_group_check_if_drained), (gst_decode_group_expose),
(gst_decode_group_hide), (gst_decode_group_free),
(gst_decode_group_set_complete), (source_pad_blocked_cb),
(source_pad_event_probe), (gst_decode_pad_new), (add_fakesink),
(remove_fakesink), (find_sink_pad), (gst_decode_bin_change_state),
(plugin_init):
New decodebin2 element.
Closes #370092
* gst/playback/gstplay-marshal.list:
Added marshallers for new signals in decodebin2
* gst/playback/gstplaybasebin.c: (setup_subtitle), (make_decoder):
Use decodebin2 if *and only if* the USE_DECODEBIN2 environment variable
is set.
2006-11-28 14:40:39 +00:00
|
|
|
{
|
gst/playback/gstdecodebin2.c: Remove fakesink hack, we can now implement this more elegantly.
Original commit message from CVS:
* gst/playback/gstdecodebin2.c: (gst_decode_bin_class_init),
(gst_decode_bin_init), (gst_decode_bin_dispose),
(gst_decode_bin_set_sink_caps), (gst_decode_bin_get_sink_caps),
(gst_decode_bin_set_property), (gst_decode_bin_get_property),
(analyze_new_pad), (connect_pad), (expose_pad),
(gst_decode_group_new), (gst_decode_group_control_demuxer_pad),
(gst_decode_group_expose), (gst_decode_group_free),
(do_async_start), (do_async_done), (gst_decode_bin_change_state):
Remove fakesink hack, we can now implement this more elegantly.
Added property to bypass typefinding.
Removed underrun callback and demuxer pad probe, we now use the srcpad
probe to expose groups.
API::sink-caps property
* gst/playback/gstplaybin2.c: (no_more_pads_cb):
Guard against multiple emissions of the no_more_pads signal, which
happens when we are dealing with chained oggs.
* gst/playback/gsturidecodebin.c: (remove_decoders),
(make_decoder), (type_found), (setup_streaming), (source_new_pad),
(setup_source):
For streams, use our own typefind element and plug our queue after it.
We will need this to determine the type of buffering to use for the
queue soon.
2008-04-03 12:16:04 +00:00
|
|
|
GstMessage *message;
|
2007-06-28 09:46:11 +00:00
|
|
|
|
gst/playback/gstdecodebin2.c: Remove fakesink hack, we can now implement this more elegantly.
Original commit message from CVS:
* gst/playback/gstdecodebin2.c: (gst_decode_bin_class_init),
(gst_decode_bin_init), (gst_decode_bin_dispose),
(gst_decode_bin_set_sink_caps), (gst_decode_bin_get_sink_caps),
(gst_decode_bin_set_property), (gst_decode_bin_get_property),
(analyze_new_pad), (connect_pad), (expose_pad),
(gst_decode_group_new), (gst_decode_group_control_demuxer_pad),
(gst_decode_group_expose), (gst_decode_group_free),
(do_async_start), (do_async_done), (gst_decode_bin_change_state):
Remove fakesink hack, we can now implement this more elegantly.
Added property to bypass typefinding.
Removed underrun callback and demuxer pad probe, we now use the srcpad
probe to expose groups.
API::sink-caps property
* gst/playback/gstplaybin2.c: (no_more_pads_cb):
Guard against multiple emissions of the no_more_pads signal, which
happens when we are dealing with chained oggs.
* gst/playback/gsturidecodebin.c: (remove_decoders),
(make_decoder), (type_found), (setup_streaming), (source_new_pad),
(setup_source):
For streams, use our own typefind element and plug our queue after it.
We will need this to determine the type of buffering to use for the
queue soon.
2008-04-03 12:16:04 +00:00
|
|
|
dbin->async_pending = TRUE;
|
gst/playback/: New decodebin2 element.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstdecodebin2.c: (gst_decode_bin_get_type),
(_gst_boolean_accumulator), (gst_decode_bin_class_init),
(gst_decode_bin_factory_filter), (compare_ranks), (print_feature),
(gst_decode_bin_init), (gst_decode_bin_dispose),
(gst_decode_bin_finalize), (gst_decode_bin_set_property),
(gst_decode_bin_get_property), (gst_decode_bin_set_caps),
(gst_decode_bin_get_caps), (gst_decode_bin_autoplug_continue),
(gst_decode_bin_autoplug_sort), (analyze_new_pad), (connect_pad),
(connect_element), (expose_pad), (type_found),
(pad_added_group_cb), (pad_removed_group_cb),
(no_more_pads_group_cb), (pad_added_cb), (pad_removed_cb),
(no_more_pads_cb), (find_compatibles), (is_demuxer_element),
(are_raw_caps), (multi_queue_overrun_cb),
(multi_queue_underrun_cb), (gst_decode_group_new),
(get_current_group), (group_demuxer_event_probe),
(gst_decode_group_control_demuxer_pad),
(gst_decode_group_control_source_pad),
(gst_decode_group_check_if_blocked),
(gst_decode_group_check_if_drained), (gst_decode_group_expose),
(gst_decode_group_hide), (gst_decode_group_free),
(gst_decode_group_set_complete), (source_pad_blocked_cb),
(source_pad_event_probe), (gst_decode_pad_new), (add_fakesink),
(remove_fakesink), (find_sink_pad), (gst_decode_bin_change_state),
(plugin_init):
New decodebin2 element.
Closes #370092
* gst/playback/gstplay-marshal.list:
Added marshallers for new signals in decodebin2
* gst/playback/gstplaybasebin.c: (setup_subtitle), (make_decoder):
Use decodebin2 if *and only if* the USE_DECODEBIN2 environment variable
is set.
2006-11-28 14:40:39 +00:00
|
|
|
|
2011-06-08 11:43:28 +00:00
|
|
|
message = gst_message_new_async_start (GST_OBJECT_CAST (dbin));
|
gst/playback/gstdecodebin2.c: Remove fakesink hack, we can now implement this more elegantly.
Original commit message from CVS:
* gst/playback/gstdecodebin2.c: (gst_decode_bin_class_init),
(gst_decode_bin_init), (gst_decode_bin_dispose),
(gst_decode_bin_set_sink_caps), (gst_decode_bin_get_sink_caps),
(gst_decode_bin_set_property), (gst_decode_bin_get_property),
(analyze_new_pad), (connect_pad), (expose_pad),
(gst_decode_group_new), (gst_decode_group_control_demuxer_pad),
(gst_decode_group_expose), (gst_decode_group_free),
(do_async_start), (do_async_done), (gst_decode_bin_change_state):
Remove fakesink hack, we can now implement this more elegantly.
Added property to bypass typefinding.
Removed underrun callback and demuxer pad probe, we now use the srcpad
probe to expose groups.
API::sink-caps property
* gst/playback/gstplaybin2.c: (no_more_pads_cb):
Guard against multiple emissions of the no_more_pads signal, which
happens when we are dealing with chained oggs.
* gst/playback/gsturidecodebin.c: (remove_decoders),
(make_decoder), (type_found), (setup_streaming), (source_new_pad),
(setup_source):
For streams, use our own typefind element and plug our queue after it.
We will need this to determine the type of buffering to use for the
queue soon.
2008-04-03 12:16:04 +00:00
|
|
|
parent_class->handle_message (GST_BIN_CAST (dbin), message);
|
gst/playback/: New decodebin2 element.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstdecodebin2.c: (gst_decode_bin_get_type),
(_gst_boolean_accumulator), (gst_decode_bin_class_init),
(gst_decode_bin_factory_filter), (compare_ranks), (print_feature),
(gst_decode_bin_init), (gst_decode_bin_dispose),
(gst_decode_bin_finalize), (gst_decode_bin_set_property),
(gst_decode_bin_get_property), (gst_decode_bin_set_caps),
(gst_decode_bin_get_caps), (gst_decode_bin_autoplug_continue),
(gst_decode_bin_autoplug_sort), (analyze_new_pad), (connect_pad),
(connect_element), (expose_pad), (type_found),
(pad_added_group_cb), (pad_removed_group_cb),
(no_more_pads_group_cb), (pad_added_cb), (pad_removed_cb),
(no_more_pads_cb), (find_compatibles), (is_demuxer_element),
(are_raw_caps), (multi_queue_overrun_cb),
(multi_queue_underrun_cb), (gst_decode_group_new),
(get_current_group), (group_demuxer_event_probe),
(gst_decode_group_control_demuxer_pad),
(gst_decode_group_control_source_pad),
(gst_decode_group_check_if_blocked),
(gst_decode_group_check_if_drained), (gst_decode_group_expose),
(gst_decode_group_hide), (gst_decode_group_free),
(gst_decode_group_set_complete), (source_pad_blocked_cb),
(source_pad_event_probe), (gst_decode_pad_new), (add_fakesink),
(remove_fakesink), (find_sink_pad), (gst_decode_bin_change_state),
(plugin_init):
New decodebin2 element.
Closes #370092
* gst/playback/gstplay-marshal.list:
Added marshallers for new signals in decodebin2
* gst/playback/gstplaybasebin.c: (setup_subtitle), (make_decoder):
Use decodebin2 if *and only if* the USE_DECODEBIN2 environment variable
is set.
2006-11-28 14:40:39 +00:00
|
|
|
}
|
|
|
|
|
2008-11-21 00:04:48 +00:00
|
|
|
static void
|
|
|
|
do_async_done (GstDecodeBin * dbin)
|
gst/playback/: New decodebin2 element.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstdecodebin2.c: (gst_decode_bin_get_type),
(_gst_boolean_accumulator), (gst_decode_bin_class_init),
(gst_decode_bin_factory_filter), (compare_ranks), (print_feature),
(gst_decode_bin_init), (gst_decode_bin_dispose),
(gst_decode_bin_finalize), (gst_decode_bin_set_property),
(gst_decode_bin_get_property), (gst_decode_bin_set_caps),
(gst_decode_bin_get_caps), (gst_decode_bin_autoplug_continue),
(gst_decode_bin_autoplug_sort), (analyze_new_pad), (connect_pad),
(connect_element), (expose_pad), (type_found),
(pad_added_group_cb), (pad_removed_group_cb),
(no_more_pads_group_cb), (pad_added_cb), (pad_removed_cb),
(no_more_pads_cb), (find_compatibles), (is_demuxer_element),
(are_raw_caps), (multi_queue_overrun_cb),
(multi_queue_underrun_cb), (gst_decode_group_new),
(get_current_group), (group_demuxer_event_probe),
(gst_decode_group_control_demuxer_pad),
(gst_decode_group_control_source_pad),
(gst_decode_group_check_if_blocked),
(gst_decode_group_check_if_drained), (gst_decode_group_expose),
(gst_decode_group_hide), (gst_decode_group_free),
(gst_decode_group_set_complete), (source_pad_blocked_cb),
(source_pad_event_probe), (gst_decode_pad_new), (add_fakesink),
(remove_fakesink), (find_sink_pad), (gst_decode_bin_change_state),
(plugin_init):
New decodebin2 element.
Closes #370092
* gst/playback/gstplay-marshal.list:
Added marshallers for new signals in decodebin2
* gst/playback/gstplaybasebin.c: (setup_subtitle), (make_decoder):
Use decodebin2 if *and only if* the USE_DECODEBIN2 environment variable
is set.
2006-11-28 14:40:39 +00:00
|
|
|
{
|
gst/playback/gstdecodebin2.c: Remove fakesink hack, we can now implement this more elegantly.
Original commit message from CVS:
* gst/playback/gstdecodebin2.c: (gst_decode_bin_class_init),
(gst_decode_bin_init), (gst_decode_bin_dispose),
(gst_decode_bin_set_sink_caps), (gst_decode_bin_get_sink_caps),
(gst_decode_bin_set_property), (gst_decode_bin_get_property),
(analyze_new_pad), (connect_pad), (expose_pad),
(gst_decode_group_new), (gst_decode_group_control_demuxer_pad),
(gst_decode_group_expose), (gst_decode_group_free),
(do_async_start), (do_async_done), (gst_decode_bin_change_state):
Remove fakesink hack, we can now implement this more elegantly.
Added property to bypass typefinding.
Removed underrun callback and demuxer pad probe, we now use the srcpad
probe to expose groups.
API::sink-caps property
* gst/playback/gstplaybin2.c: (no_more_pads_cb):
Guard against multiple emissions of the no_more_pads signal, which
happens when we are dealing with chained oggs.
* gst/playback/gsturidecodebin.c: (remove_decoders),
(make_decoder), (type_found), (setup_streaming), (source_new_pad),
(setup_source):
For streams, use our own typefind element and plug our queue after it.
We will need this to determine the type of buffering to use for the
queue soon.
2008-04-03 12:16:04 +00:00
|
|
|
GstMessage *message;
|
gst/playback/: New decodebin2 element.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstdecodebin2.c: (gst_decode_bin_get_type),
(_gst_boolean_accumulator), (gst_decode_bin_class_init),
(gst_decode_bin_factory_filter), (compare_ranks), (print_feature),
(gst_decode_bin_init), (gst_decode_bin_dispose),
(gst_decode_bin_finalize), (gst_decode_bin_set_property),
(gst_decode_bin_get_property), (gst_decode_bin_set_caps),
(gst_decode_bin_get_caps), (gst_decode_bin_autoplug_continue),
(gst_decode_bin_autoplug_sort), (analyze_new_pad), (connect_pad),
(connect_element), (expose_pad), (type_found),
(pad_added_group_cb), (pad_removed_group_cb),
(no_more_pads_group_cb), (pad_added_cb), (pad_removed_cb),
(no_more_pads_cb), (find_compatibles), (is_demuxer_element),
(are_raw_caps), (multi_queue_overrun_cb),
(multi_queue_underrun_cb), (gst_decode_group_new),
(get_current_group), (group_demuxer_event_probe),
(gst_decode_group_control_demuxer_pad),
(gst_decode_group_control_source_pad),
(gst_decode_group_check_if_blocked),
(gst_decode_group_check_if_drained), (gst_decode_group_expose),
(gst_decode_group_hide), (gst_decode_group_free),
(gst_decode_group_set_complete), (source_pad_blocked_cb),
(source_pad_event_probe), (gst_decode_pad_new), (add_fakesink),
(remove_fakesink), (find_sink_pad), (gst_decode_bin_change_state),
(plugin_init):
New decodebin2 element.
Closes #370092
* gst/playback/gstplay-marshal.list:
Added marshallers for new signals in decodebin2
* gst/playback/gstplaybasebin.c: (setup_subtitle), (make_decoder):
Use decodebin2 if *and only if* the USE_DECODEBIN2 environment variable
is set.
2006-11-28 14:40:39 +00:00
|
|
|
|
gst/playback/gstdecodebin2.c: Remove fakesink hack, we can now implement this more elegantly.
Original commit message from CVS:
* gst/playback/gstdecodebin2.c: (gst_decode_bin_class_init),
(gst_decode_bin_init), (gst_decode_bin_dispose),
(gst_decode_bin_set_sink_caps), (gst_decode_bin_get_sink_caps),
(gst_decode_bin_set_property), (gst_decode_bin_get_property),
(analyze_new_pad), (connect_pad), (expose_pad),
(gst_decode_group_new), (gst_decode_group_control_demuxer_pad),
(gst_decode_group_expose), (gst_decode_group_free),
(do_async_start), (do_async_done), (gst_decode_bin_change_state):
Remove fakesink hack, we can now implement this more elegantly.
Added property to bypass typefinding.
Removed underrun callback and demuxer pad probe, we now use the srcpad
probe to expose groups.
API::sink-caps property
* gst/playback/gstplaybin2.c: (no_more_pads_cb):
Guard against multiple emissions of the no_more_pads signal, which
happens when we are dealing with chained oggs.
* gst/playback/gsturidecodebin.c: (remove_decoders),
(make_decoder), (type_found), (setup_streaming), (source_new_pad),
(setup_source):
For streams, use our own typefind element and plug our queue after it.
We will need this to determine the type of buffering to use for the
queue soon.
2008-04-03 12:16:04 +00:00
|
|
|
if (dbin->async_pending) {
|
2012-06-13 09:04:21 +00:00
|
|
|
message =
|
|
|
|
gst_message_new_async_done (GST_OBJECT_CAST (dbin),
|
|
|
|
GST_CLOCK_TIME_NONE);
|
gst/playback/gstdecodebin2.c: Remove fakesink hack, we can now implement this more elegantly.
Original commit message from CVS:
* gst/playback/gstdecodebin2.c: (gst_decode_bin_class_init),
(gst_decode_bin_init), (gst_decode_bin_dispose),
(gst_decode_bin_set_sink_caps), (gst_decode_bin_get_sink_caps),
(gst_decode_bin_set_property), (gst_decode_bin_get_property),
(analyze_new_pad), (connect_pad), (expose_pad),
(gst_decode_group_new), (gst_decode_group_control_demuxer_pad),
(gst_decode_group_expose), (gst_decode_group_free),
(do_async_start), (do_async_done), (gst_decode_bin_change_state):
Remove fakesink hack, we can now implement this more elegantly.
Added property to bypass typefinding.
Removed underrun callback and demuxer pad probe, we now use the srcpad
probe to expose groups.
API::sink-caps property
* gst/playback/gstplaybin2.c: (no_more_pads_cb):
Guard against multiple emissions of the no_more_pads signal, which
happens when we are dealing with chained oggs.
* gst/playback/gsturidecodebin.c: (remove_decoders),
(make_decoder), (type_found), (setup_streaming), (source_new_pad),
(setup_source):
For streams, use our own typefind element and plug our queue after it.
We will need this to determine the type of buffering to use for the
queue soon.
2008-04-03 12:16:04 +00:00
|
|
|
parent_class->handle_message (GST_BIN_CAST (dbin), message);
|
gst/playback/: New decodebin2 element.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstdecodebin2.c: (gst_decode_bin_get_type),
(_gst_boolean_accumulator), (gst_decode_bin_class_init),
(gst_decode_bin_factory_filter), (compare_ranks), (print_feature),
(gst_decode_bin_init), (gst_decode_bin_dispose),
(gst_decode_bin_finalize), (gst_decode_bin_set_property),
(gst_decode_bin_get_property), (gst_decode_bin_set_caps),
(gst_decode_bin_get_caps), (gst_decode_bin_autoplug_continue),
(gst_decode_bin_autoplug_sort), (analyze_new_pad), (connect_pad),
(connect_element), (expose_pad), (type_found),
(pad_added_group_cb), (pad_removed_group_cb),
(no_more_pads_group_cb), (pad_added_cb), (pad_removed_cb),
(no_more_pads_cb), (find_compatibles), (is_demuxer_element),
(are_raw_caps), (multi_queue_overrun_cb),
(multi_queue_underrun_cb), (gst_decode_group_new),
(get_current_group), (group_demuxer_event_probe),
(gst_decode_group_control_demuxer_pad),
(gst_decode_group_control_source_pad),
(gst_decode_group_check_if_blocked),
(gst_decode_group_check_if_drained), (gst_decode_group_expose),
(gst_decode_group_hide), (gst_decode_group_free),
(gst_decode_group_set_complete), (source_pad_blocked_cb),
(source_pad_event_probe), (gst_decode_pad_new), (add_fakesink),
(remove_fakesink), (find_sink_pad), (gst_decode_bin_change_state),
(plugin_init):
New decodebin2 element.
Closes #370092
* gst/playback/gstplay-marshal.list:
Added marshallers for new signals in decodebin2
* gst/playback/gstplaybasebin.c: (setup_subtitle), (make_decoder):
Use decodebin2 if *and only if* the USE_DECODEBIN2 environment variable
is set.
2006-11-28 14:40:39 +00:00
|
|
|
|
gst/playback/gstdecodebin2.c: Remove fakesink hack, we can now implement this more elegantly.
Original commit message from CVS:
* gst/playback/gstdecodebin2.c: (gst_decode_bin_class_init),
(gst_decode_bin_init), (gst_decode_bin_dispose),
(gst_decode_bin_set_sink_caps), (gst_decode_bin_get_sink_caps),
(gst_decode_bin_set_property), (gst_decode_bin_get_property),
(analyze_new_pad), (connect_pad), (expose_pad),
(gst_decode_group_new), (gst_decode_group_control_demuxer_pad),
(gst_decode_group_expose), (gst_decode_group_free),
(do_async_start), (do_async_done), (gst_decode_bin_change_state):
Remove fakesink hack, we can now implement this more elegantly.
Added property to bypass typefinding.
Removed underrun callback and demuxer pad probe, we now use the srcpad
probe to expose groups.
API::sink-caps property
* gst/playback/gstplaybin2.c: (no_more_pads_cb):
Guard against multiple emissions of the no_more_pads signal, which
happens when we are dealing with chained oggs.
* gst/playback/gsturidecodebin.c: (remove_decoders),
(make_decoder), (type_found), (setup_streaming), (source_new_pad),
(setup_source):
For streams, use our own typefind element and plug our queue after it.
We will need this to determine the type of buffering to use for the
queue soon.
2008-04-03 12:16:04 +00:00
|
|
|
dbin->async_pending = FALSE;
|
|
|
|
}
|
gst/playback/: New decodebin2 element.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstdecodebin2.c: (gst_decode_bin_get_type),
(_gst_boolean_accumulator), (gst_decode_bin_class_init),
(gst_decode_bin_factory_filter), (compare_ranks), (print_feature),
(gst_decode_bin_init), (gst_decode_bin_dispose),
(gst_decode_bin_finalize), (gst_decode_bin_set_property),
(gst_decode_bin_get_property), (gst_decode_bin_set_caps),
(gst_decode_bin_get_caps), (gst_decode_bin_autoplug_continue),
(gst_decode_bin_autoplug_sort), (analyze_new_pad), (connect_pad),
(connect_element), (expose_pad), (type_found),
(pad_added_group_cb), (pad_removed_group_cb),
(no_more_pads_group_cb), (pad_added_cb), (pad_removed_cb),
(no_more_pads_cb), (find_compatibles), (is_demuxer_element),
(are_raw_caps), (multi_queue_overrun_cb),
(multi_queue_underrun_cb), (gst_decode_group_new),
(get_current_group), (group_demuxer_event_probe),
(gst_decode_group_control_demuxer_pad),
(gst_decode_group_control_source_pad),
(gst_decode_group_check_if_blocked),
(gst_decode_group_check_if_drained), (gst_decode_group_expose),
(gst_decode_group_hide), (gst_decode_group_free),
(gst_decode_group_set_complete), (source_pad_blocked_cb),
(source_pad_event_probe), (gst_decode_pad_new), (add_fakesink),
(remove_fakesink), (find_sink_pad), (gst_decode_bin_change_state),
(plugin_init):
New decodebin2 element.
Closes #370092
* gst/playback/gstplay-marshal.list:
Added marshallers for new signals in decodebin2
* gst/playback/gstplaybasebin.c: (setup_subtitle), (make_decoder):
Use decodebin2 if *and only if* the USE_DECODEBIN2 environment variable
is set.
2006-11-28 14:40:39 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/*****
|
|
|
|
* convenience functions
|
|
|
|
*****/
|
|
|
|
|
2007-03-02 12:59:15 +00:00
|
|
|
/* find_sink_pad
|
gst/playback/: New decodebin2 element.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstdecodebin2.c: (gst_decode_bin_get_type),
(_gst_boolean_accumulator), (gst_decode_bin_class_init),
(gst_decode_bin_factory_filter), (compare_ranks), (print_feature),
(gst_decode_bin_init), (gst_decode_bin_dispose),
(gst_decode_bin_finalize), (gst_decode_bin_set_property),
(gst_decode_bin_get_property), (gst_decode_bin_set_caps),
(gst_decode_bin_get_caps), (gst_decode_bin_autoplug_continue),
(gst_decode_bin_autoplug_sort), (analyze_new_pad), (connect_pad),
(connect_element), (expose_pad), (type_found),
(pad_added_group_cb), (pad_removed_group_cb),
(no_more_pads_group_cb), (pad_added_cb), (pad_removed_cb),
(no_more_pads_cb), (find_compatibles), (is_demuxer_element),
(are_raw_caps), (multi_queue_overrun_cb),
(multi_queue_underrun_cb), (gst_decode_group_new),
(get_current_group), (group_demuxer_event_probe),
(gst_decode_group_control_demuxer_pad),
(gst_decode_group_control_source_pad),
(gst_decode_group_check_if_blocked),
(gst_decode_group_check_if_drained), (gst_decode_group_expose),
(gst_decode_group_hide), (gst_decode_group_free),
(gst_decode_group_set_complete), (source_pad_blocked_cb),
(source_pad_event_probe), (gst_decode_pad_new), (add_fakesink),
(remove_fakesink), (find_sink_pad), (gst_decode_bin_change_state),
(plugin_init):
New decodebin2 element.
Closes #370092
* gst/playback/gstplay-marshal.list:
Added marshallers for new signals in decodebin2
* gst/playback/gstplaybasebin.c: (setup_subtitle), (make_decoder):
Use decodebin2 if *and only if* the USE_DECODEBIN2 environment variable
is set.
2006-11-28 14:40:39 +00:00
|
|
|
*
|
|
|
|
* Returns the first sink pad of the given element, or NULL if it doesn't have
|
|
|
|
* any.
|
|
|
|
*/
|
|
|
|
|
2008-11-21 00:04:48 +00:00
|
|
|
static GstPad *
|
|
|
|
find_sink_pad (GstElement * element)
|
gst/playback/: New decodebin2 element.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstdecodebin2.c: (gst_decode_bin_get_type),
(_gst_boolean_accumulator), (gst_decode_bin_class_init),
(gst_decode_bin_factory_filter), (compare_ranks), (print_feature),
(gst_decode_bin_init), (gst_decode_bin_dispose),
(gst_decode_bin_finalize), (gst_decode_bin_set_property),
(gst_decode_bin_get_property), (gst_decode_bin_set_caps),
(gst_decode_bin_get_caps), (gst_decode_bin_autoplug_continue),
(gst_decode_bin_autoplug_sort), (analyze_new_pad), (connect_pad),
(connect_element), (expose_pad), (type_found),
(pad_added_group_cb), (pad_removed_group_cb),
(no_more_pads_group_cb), (pad_added_cb), (pad_removed_cb),
(no_more_pads_cb), (find_compatibles), (is_demuxer_element),
(are_raw_caps), (multi_queue_overrun_cb),
(multi_queue_underrun_cb), (gst_decode_group_new),
(get_current_group), (group_demuxer_event_probe),
(gst_decode_group_control_demuxer_pad),
(gst_decode_group_control_source_pad),
(gst_decode_group_check_if_blocked),
(gst_decode_group_check_if_drained), (gst_decode_group_expose),
(gst_decode_group_hide), (gst_decode_group_free),
(gst_decode_group_set_complete), (source_pad_blocked_cb),
(source_pad_event_probe), (gst_decode_pad_new), (add_fakesink),
(remove_fakesink), (find_sink_pad), (gst_decode_bin_change_state),
(plugin_init):
New decodebin2 element.
Closes #370092
* gst/playback/gstplay-marshal.list:
Added marshallers for new signals in decodebin2
* gst/playback/gstplaybasebin.c: (setup_subtitle), (make_decoder):
Use decodebin2 if *and only if* the USE_DECODEBIN2 environment variable
is set.
2006-11-28 14:40:39 +00:00
|
|
|
{
|
|
|
|
GstIterator *it;
|
|
|
|
GstPad *pad = NULL;
|
2011-05-05 14:03:52 +00:00
|
|
|
GValue item = { 0, };
|
gst/playback/: New decodebin2 element.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstdecodebin2.c: (gst_decode_bin_get_type),
(_gst_boolean_accumulator), (gst_decode_bin_class_init),
(gst_decode_bin_factory_filter), (compare_ranks), (print_feature),
(gst_decode_bin_init), (gst_decode_bin_dispose),
(gst_decode_bin_finalize), (gst_decode_bin_set_property),
(gst_decode_bin_get_property), (gst_decode_bin_set_caps),
(gst_decode_bin_get_caps), (gst_decode_bin_autoplug_continue),
(gst_decode_bin_autoplug_sort), (analyze_new_pad), (connect_pad),
(connect_element), (expose_pad), (type_found),
(pad_added_group_cb), (pad_removed_group_cb),
(no_more_pads_group_cb), (pad_added_cb), (pad_removed_cb),
(no_more_pads_cb), (find_compatibles), (is_demuxer_element),
(are_raw_caps), (multi_queue_overrun_cb),
(multi_queue_underrun_cb), (gst_decode_group_new),
(get_current_group), (group_demuxer_event_probe),
(gst_decode_group_control_demuxer_pad),
(gst_decode_group_control_source_pad),
(gst_decode_group_check_if_blocked),
(gst_decode_group_check_if_drained), (gst_decode_group_expose),
(gst_decode_group_hide), (gst_decode_group_free),
(gst_decode_group_set_complete), (source_pad_blocked_cb),
(source_pad_event_probe), (gst_decode_pad_new), (add_fakesink),
(remove_fakesink), (find_sink_pad), (gst_decode_bin_change_state),
(plugin_init):
New decodebin2 element.
Closes #370092
* gst/playback/gstplay-marshal.list:
Added marshallers for new signals in decodebin2
* gst/playback/gstplaybasebin.c: (setup_subtitle), (make_decoder):
Use decodebin2 if *and only if* the USE_DECODEBIN2 environment variable
is set.
2006-11-28 14:40:39 +00:00
|
|
|
|
|
|
|
it = gst_element_iterate_sink_pads (element);
|
|
|
|
|
2011-05-05 14:03:52 +00:00
|
|
|
if ((gst_iterator_next (it, &item)) == GST_ITERATOR_OK)
|
|
|
|
pad = g_value_dup_object (&item);
|
|
|
|
g_value_unset (&item);
|
gst/playback/: New decodebin2 element.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstdecodebin2.c: (gst_decode_bin_get_type),
(_gst_boolean_accumulator), (gst_decode_bin_class_init),
(gst_decode_bin_factory_filter), (compare_ranks), (print_feature),
(gst_decode_bin_init), (gst_decode_bin_dispose),
(gst_decode_bin_finalize), (gst_decode_bin_set_property),
(gst_decode_bin_get_property), (gst_decode_bin_set_caps),
(gst_decode_bin_get_caps), (gst_decode_bin_autoplug_continue),
(gst_decode_bin_autoplug_sort), (analyze_new_pad), (connect_pad),
(connect_element), (expose_pad), (type_found),
(pad_added_group_cb), (pad_removed_group_cb),
(no_more_pads_group_cb), (pad_added_cb), (pad_removed_cb),
(no_more_pads_cb), (find_compatibles), (is_demuxer_element),
(are_raw_caps), (multi_queue_overrun_cb),
(multi_queue_underrun_cb), (gst_decode_group_new),
(get_current_group), (group_demuxer_event_probe),
(gst_decode_group_control_demuxer_pad),
(gst_decode_group_control_source_pad),
(gst_decode_group_check_if_blocked),
(gst_decode_group_check_if_drained), (gst_decode_group_expose),
(gst_decode_group_hide), (gst_decode_group_free),
(gst_decode_group_set_complete), (source_pad_blocked_cb),
(source_pad_event_probe), (gst_decode_pad_new), (add_fakesink),
(remove_fakesink), (find_sink_pad), (gst_decode_bin_change_state),
(plugin_init):
New decodebin2 element.
Closes #370092
* gst/playback/gstplay-marshal.list:
Added marshallers for new signals in decodebin2
* gst/playback/gstplaybasebin.c: (setup_subtitle), (make_decoder):
Use decodebin2 if *and only if* the USE_DECODEBIN2 environment variable
is set.
2006-11-28 14:40:39 +00:00
|
|
|
gst_iterator_free (it);
|
|
|
|
|
|
|
|
return pad;
|
|
|
|
}
|
|
|
|
|
2009-03-06 18:28:37 +00:00
|
|
|
/* call with dyn_lock held */
|
|
|
|
static void
|
|
|
|
unblock_pads (GstDecodeBin * dbin)
|
|
|
|
{
|
2009-12-23 17:18:03 +00:00
|
|
|
GST_LOG_OBJECT (dbin, "unblocking pads");
|
|
|
|
|
2017-11-14 12:34:48 +00:00
|
|
|
while (dbin->blocked_pads) {
|
|
|
|
GList *tmp = dbin->blocked_pads;
|
2009-03-06 18:28:37 +00:00
|
|
|
GstDecodePad *dpad = (GstDecodePad *) tmp->data;
|
2009-12-23 17:18:03 +00:00
|
|
|
GstPad *opad;
|
2009-03-06 18:28:37 +00:00
|
|
|
|
2017-11-14 12:34:48 +00:00
|
|
|
dbin->blocked_pads = g_list_delete_link (dbin->blocked_pads, tmp);
|
2009-12-23 17:18:03 +00:00
|
|
|
opad = gst_ghost_pad_get_target (GST_GHOST_PAD_CAST (dpad));
|
2017-01-18 03:59:18 +00:00
|
|
|
if (opad) {
|
2009-03-06 18:28:37 +00:00
|
|
|
|
2017-01-18 03:59:18 +00:00
|
|
|
GST_DEBUG_OBJECT (dpad, "unblocking");
|
|
|
|
if (dpad->block_id != 0) {
|
|
|
|
gst_pad_remove_probe (opad, dpad->block_id);
|
|
|
|
dpad->block_id = 0;
|
|
|
|
}
|
|
|
|
gst_object_unref (opad);
|
2011-06-01 17:34:54 +00:00
|
|
|
}
|
2017-01-18 03:59:18 +00:00
|
|
|
|
2011-05-30 16:36:14 +00:00
|
|
|
dpad->blocked = FALSE;
|
2017-11-14 12:34:48 +00:00
|
|
|
|
|
|
|
/* We release the dyn lock since we want to allow the streaming threads
|
|
|
|
* to properly stop and not be blocked in our various probes */
|
|
|
|
DYN_UNLOCK (dbin);
|
2009-03-06 18:28:37 +00:00
|
|
|
/* make flushing, prevent NOT_LINKED */
|
2015-11-06 18:31:47 +00:00
|
|
|
gst_pad_set_active (GST_PAD_CAST (dpad), FALSE);
|
2017-11-14 12:34:48 +00:00
|
|
|
DYN_LOCK (dbin);
|
|
|
|
|
2009-03-06 18:28:37 +00:00
|
|
|
GST_DEBUG_OBJECT (dpad, "unblocked");
|
2017-11-14 12:34:48 +00:00
|
|
|
gst_object_unref (dpad);
|
2009-03-06 18:28:37 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2016-03-14 15:06:53 +00:00
|
|
|
static void
|
|
|
|
gst_decode_chain_stop (GstDecodeBin * dbin, GstDecodeChain * chain,
|
|
|
|
GQueue * elements)
|
|
|
|
{
|
|
|
|
GQueue *internal_elements, internal_elements_ = G_QUEUE_INIT;
|
|
|
|
GList *l;
|
|
|
|
|
|
|
|
CHAIN_MUTEX_LOCK (chain);
|
|
|
|
if (elements) {
|
|
|
|
internal_elements = elements;
|
|
|
|
} else {
|
|
|
|
internal_elements = &internal_elements_;
|
|
|
|
}
|
|
|
|
|
|
|
|
for (l = chain->next_groups; l; l = l->next) {
|
|
|
|
GstDecodeGroup *group = l->data;
|
|
|
|
GList *m;
|
|
|
|
|
|
|
|
for (m = group->children; m; m = m->next) {
|
|
|
|
GstDecodeChain *chain2 = m->data;
|
|
|
|
gst_decode_chain_stop (dbin, chain2, internal_elements);
|
|
|
|
}
|
|
|
|
if (group->multiqueue)
|
|
|
|
g_queue_push_head (internal_elements, gst_object_ref (group->multiqueue));
|
|
|
|
}
|
|
|
|
|
|
|
|
if (chain->active_group) {
|
|
|
|
for (l = chain->active_group->children; l; l = l->next) {
|
|
|
|
GstDecodeChain *chain2 = l->data;
|
|
|
|
gst_decode_chain_stop (dbin, chain2, internal_elements);
|
|
|
|
}
|
|
|
|
if (chain->active_group->multiqueue)
|
|
|
|
g_queue_push_head (internal_elements,
|
|
|
|
gst_object_ref (chain->active_group->multiqueue));
|
|
|
|
}
|
|
|
|
|
|
|
|
for (l = chain->old_groups; l; l = l->next) {
|
|
|
|
GstDecodeGroup *group = l->data;
|
|
|
|
GList *m;
|
|
|
|
|
|
|
|
for (m = group->children; m; m = m->next) {
|
|
|
|
GstDecodeChain *chain2 = m->data;
|
|
|
|
gst_decode_chain_stop (dbin, chain2, internal_elements);
|
|
|
|
}
|
|
|
|
if (group->multiqueue)
|
|
|
|
g_queue_push_head (internal_elements, gst_object_ref (group->multiqueue));
|
|
|
|
}
|
|
|
|
|
|
|
|
for (l = chain->elements; l; l = l->next) {
|
|
|
|
GstDecodeElement *delem = l->data;
|
|
|
|
|
|
|
|
if (delem->capsfilter)
|
|
|
|
g_queue_push_head (internal_elements, gst_object_ref (delem->capsfilter));
|
|
|
|
g_queue_push_head (internal_elements, gst_object_ref (delem->element));
|
|
|
|
}
|
|
|
|
|
|
|
|
CHAIN_MUTEX_UNLOCK (chain);
|
|
|
|
|
|
|
|
if (!elements) {
|
|
|
|
GstElement *element;
|
|
|
|
|
|
|
|
EXPOSE_UNLOCK (dbin);
|
|
|
|
/* Shut down from bottom to top */
|
|
|
|
while ((element = g_queue_pop_tail (internal_elements))) {
|
|
|
|
/* The bin must never ever change the state of this element anymore */
|
|
|
|
gst_element_set_locked_state (element, TRUE);
|
|
|
|
gst_element_set_state (element, GST_STATE_NULL);
|
|
|
|
gst_object_unref (element);
|
|
|
|
}
|
|
|
|
g_queue_clear (internal_elements);
|
|
|
|
EXPOSE_LOCK (dbin);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
gst/playback/: New decodebin2 element.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstdecodebin2.c: (gst_decode_bin_get_type),
(_gst_boolean_accumulator), (gst_decode_bin_class_init),
(gst_decode_bin_factory_filter), (compare_ranks), (print_feature),
(gst_decode_bin_init), (gst_decode_bin_dispose),
(gst_decode_bin_finalize), (gst_decode_bin_set_property),
(gst_decode_bin_get_property), (gst_decode_bin_set_caps),
(gst_decode_bin_get_caps), (gst_decode_bin_autoplug_continue),
(gst_decode_bin_autoplug_sort), (analyze_new_pad), (connect_pad),
(connect_element), (expose_pad), (type_found),
(pad_added_group_cb), (pad_removed_group_cb),
(no_more_pads_group_cb), (pad_added_cb), (pad_removed_cb),
(no_more_pads_cb), (find_compatibles), (is_demuxer_element),
(are_raw_caps), (multi_queue_overrun_cb),
(multi_queue_underrun_cb), (gst_decode_group_new),
(get_current_group), (group_demuxer_event_probe),
(gst_decode_group_control_demuxer_pad),
(gst_decode_group_control_source_pad),
(gst_decode_group_check_if_blocked),
(gst_decode_group_check_if_drained), (gst_decode_group_expose),
(gst_decode_group_hide), (gst_decode_group_free),
(gst_decode_group_set_complete), (source_pad_blocked_cb),
(source_pad_event_probe), (gst_decode_pad_new), (add_fakesink),
(remove_fakesink), (find_sink_pad), (gst_decode_bin_change_state),
(plugin_init):
New decodebin2 element.
Closes #370092
* gst/playback/gstplay-marshal.list:
Added marshallers for new signals in decodebin2
* gst/playback/gstplaybasebin.c: (setup_subtitle), (make_decoder):
Use decodebin2 if *and only if* the USE_DECODEBIN2 environment variable
is set.
2006-11-28 14:40:39 +00:00
|
|
|
static GstStateChangeReturn
|
2008-11-21 00:04:48 +00:00
|
|
|
gst_decode_bin_change_state (GstElement * element, GstStateChange transition)
|
gst/playback/: New decodebin2 element.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstdecodebin2.c: (gst_decode_bin_get_type),
(_gst_boolean_accumulator), (gst_decode_bin_class_init),
(gst_decode_bin_factory_filter), (compare_ranks), (print_feature),
(gst_decode_bin_init), (gst_decode_bin_dispose),
(gst_decode_bin_finalize), (gst_decode_bin_set_property),
(gst_decode_bin_get_property), (gst_decode_bin_set_caps),
(gst_decode_bin_get_caps), (gst_decode_bin_autoplug_continue),
(gst_decode_bin_autoplug_sort), (analyze_new_pad), (connect_pad),
(connect_element), (expose_pad), (type_found),
(pad_added_group_cb), (pad_removed_group_cb),
(no_more_pads_group_cb), (pad_added_cb), (pad_removed_cb),
(no_more_pads_cb), (find_compatibles), (is_demuxer_element),
(are_raw_caps), (multi_queue_overrun_cb),
(multi_queue_underrun_cb), (gst_decode_group_new),
(get_current_group), (group_demuxer_event_probe),
(gst_decode_group_control_demuxer_pad),
(gst_decode_group_control_source_pad),
(gst_decode_group_check_if_blocked),
(gst_decode_group_check_if_drained), (gst_decode_group_expose),
(gst_decode_group_hide), (gst_decode_group_free),
(gst_decode_group_set_complete), (source_pad_blocked_cb),
(source_pad_event_probe), (gst_decode_pad_new), (add_fakesink),
(remove_fakesink), (find_sink_pad), (gst_decode_bin_change_state),
(plugin_init):
New decodebin2 element.
Closes #370092
* gst/playback/gstplay-marshal.list:
Added marshallers for new signals in decodebin2
* gst/playback/gstplaybasebin.c: (setup_subtitle), (make_decoder):
Use decodebin2 if *and only if* the USE_DECODEBIN2 environment variable
is set.
2006-11-28 14:40:39 +00:00
|
|
|
{
|
gst/playback/gstdecodebin2.c: Remove fakesink hack, we can now implement this more elegantly.
Original commit message from CVS:
* gst/playback/gstdecodebin2.c: (gst_decode_bin_class_init),
(gst_decode_bin_init), (gst_decode_bin_dispose),
(gst_decode_bin_set_sink_caps), (gst_decode_bin_get_sink_caps),
(gst_decode_bin_set_property), (gst_decode_bin_get_property),
(analyze_new_pad), (connect_pad), (expose_pad),
(gst_decode_group_new), (gst_decode_group_control_demuxer_pad),
(gst_decode_group_expose), (gst_decode_group_free),
(do_async_start), (do_async_done), (gst_decode_bin_change_state):
Remove fakesink hack, we can now implement this more elegantly.
Added property to bypass typefinding.
Removed underrun callback and demuxer pad probe, we now use the srcpad
probe to expose groups.
API::sink-caps property
* gst/playback/gstplaybin2.c: (no_more_pads_cb):
Guard against multiple emissions of the no_more_pads signal, which
happens when we are dealing with chained oggs.
* gst/playback/gsturidecodebin.c: (remove_decoders),
(make_decoder), (type_found), (setup_streaming), (source_new_pad),
(setup_source):
For streams, use our own typefind element and plug our queue after it.
We will need this to determine the type of buffering to use for the
queue soon.
2008-04-03 12:16:04 +00:00
|
|
|
GstStateChangeReturn ret = GST_STATE_CHANGE_SUCCESS;
|
gst/playback/: New decodebin2 element.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstdecodebin2.c: (gst_decode_bin_get_type),
(_gst_boolean_accumulator), (gst_decode_bin_class_init),
(gst_decode_bin_factory_filter), (compare_ranks), (print_feature),
(gst_decode_bin_init), (gst_decode_bin_dispose),
(gst_decode_bin_finalize), (gst_decode_bin_set_property),
(gst_decode_bin_get_property), (gst_decode_bin_set_caps),
(gst_decode_bin_get_caps), (gst_decode_bin_autoplug_continue),
(gst_decode_bin_autoplug_sort), (analyze_new_pad), (connect_pad),
(connect_element), (expose_pad), (type_found),
(pad_added_group_cb), (pad_removed_group_cb),
(no_more_pads_group_cb), (pad_added_cb), (pad_removed_cb),
(no_more_pads_cb), (find_compatibles), (is_demuxer_element),
(are_raw_caps), (multi_queue_overrun_cb),
(multi_queue_underrun_cb), (gst_decode_group_new),
(get_current_group), (group_demuxer_event_probe),
(gst_decode_group_control_demuxer_pad),
(gst_decode_group_control_source_pad),
(gst_decode_group_check_if_blocked),
(gst_decode_group_check_if_drained), (gst_decode_group_expose),
(gst_decode_group_hide), (gst_decode_group_free),
(gst_decode_group_set_complete), (source_pad_blocked_cb),
(source_pad_event_probe), (gst_decode_pad_new), (add_fakesink),
(remove_fakesink), (find_sink_pad), (gst_decode_bin_change_state),
(plugin_init):
New decodebin2 element.
Closes #370092
* gst/playback/gstplay-marshal.list:
Added marshallers for new signals in decodebin2
* gst/playback/gstplaybasebin.c: (setup_subtitle), (make_decoder):
Use decodebin2 if *and only if* the USE_DECODEBIN2 environment variable
is set.
2006-11-28 14:40:39 +00:00
|
|
|
GstDecodeBin *dbin = GST_DECODE_BIN (element);
|
2015-02-03 17:06:43 +00:00
|
|
|
GstDecodeChain *chain_to_free = NULL;
|
gst/playback/: New decodebin2 element.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstdecodebin2.c: (gst_decode_bin_get_type),
(_gst_boolean_accumulator), (gst_decode_bin_class_init),
(gst_decode_bin_factory_filter), (compare_ranks), (print_feature),
(gst_decode_bin_init), (gst_decode_bin_dispose),
(gst_decode_bin_finalize), (gst_decode_bin_set_property),
(gst_decode_bin_get_property), (gst_decode_bin_set_caps),
(gst_decode_bin_get_caps), (gst_decode_bin_autoplug_continue),
(gst_decode_bin_autoplug_sort), (analyze_new_pad), (connect_pad),
(connect_element), (expose_pad), (type_found),
(pad_added_group_cb), (pad_removed_group_cb),
(no_more_pads_group_cb), (pad_added_cb), (pad_removed_cb),
(no_more_pads_cb), (find_compatibles), (is_demuxer_element),
(are_raw_caps), (multi_queue_overrun_cb),
(multi_queue_underrun_cb), (gst_decode_group_new),
(get_current_group), (group_demuxer_event_probe),
(gst_decode_group_control_demuxer_pad),
(gst_decode_group_control_source_pad),
(gst_decode_group_check_if_blocked),
(gst_decode_group_check_if_drained), (gst_decode_group_expose),
(gst_decode_group_hide), (gst_decode_group_free),
(gst_decode_group_set_complete), (source_pad_blocked_cb),
(source_pad_event_probe), (gst_decode_pad_new), (add_fakesink),
(remove_fakesink), (find_sink_pad), (gst_decode_bin_change_state),
(plugin_init):
New decodebin2 element.
Closes #370092
* gst/playback/gstplay-marshal.list:
Added marshallers for new signals in decodebin2
* gst/playback/gstplaybasebin.c: (setup_subtitle), (make_decoder):
Use decodebin2 if *and only if* the USE_DECODEBIN2 environment variable
is set.
2006-11-28 14:40:39 +00:00
|
|
|
|
|
|
|
switch (transition) {
|
2006-12-16 12:22:57 +00:00
|
|
|
case GST_STATE_CHANGE_NULL_TO_READY:
|
2007-02-09 13:16:27 +00:00
|
|
|
if (dbin->typefind == NULL)
|
|
|
|
goto missing_typefind;
|
2006-12-16 12:22:57 +00:00
|
|
|
break;
|
gst/playback/gstdecodebin2.c: Remove fakesink hack, we can now implement this more elegantly.
Original commit message from CVS:
* gst/playback/gstdecodebin2.c: (gst_decode_bin_class_init),
(gst_decode_bin_init), (gst_decode_bin_dispose),
(gst_decode_bin_set_sink_caps), (gst_decode_bin_get_sink_caps),
(gst_decode_bin_set_property), (gst_decode_bin_get_property),
(analyze_new_pad), (connect_pad), (expose_pad),
(gst_decode_group_new), (gst_decode_group_control_demuxer_pad),
(gst_decode_group_expose), (gst_decode_group_free),
(do_async_start), (do_async_done), (gst_decode_bin_change_state):
Remove fakesink hack, we can now implement this more elegantly.
Added property to bypass typefinding.
Removed underrun callback and demuxer pad probe, we now use the srcpad
probe to expose groups.
API::sink-caps property
* gst/playback/gstplaybin2.c: (no_more_pads_cb):
Guard against multiple emissions of the no_more_pads signal, which
happens when we are dealing with chained oggs.
* gst/playback/gsturidecodebin.c: (remove_decoders),
(make_decoder), (type_found), (setup_streaming), (source_new_pad),
(setup_source):
For streams, use our own typefind element and plug our queue after it.
We will need this to determine the type of buffering to use for the
queue soon.
2008-04-03 12:16:04 +00:00
|
|
|
case GST_STATE_CHANGE_READY_TO_PAUSED:
|
2010-06-26 15:55:12 +00:00
|
|
|
/* Make sure we've cleared all existing chains */
|
2013-05-15 12:47:53 +00:00
|
|
|
EXPOSE_LOCK (dbin);
|
2010-06-26 15:55:12 +00:00
|
|
|
if (dbin->decode_chain) {
|
|
|
|
gst_decode_chain_free (dbin->decode_chain);
|
|
|
|
dbin->decode_chain = NULL;
|
|
|
|
}
|
2013-05-15 12:47:53 +00:00
|
|
|
EXPOSE_UNLOCK (dbin);
|
2009-09-26 10:17:49 +00:00
|
|
|
DYN_LOCK (dbin);
|
2009-03-06 18:28:37 +00:00
|
|
|
GST_LOG_OBJECT (dbin, "clearing shutdown flag");
|
|
|
|
dbin->shutdown = FALSE;
|
2009-09-26 10:17:49 +00:00
|
|
|
DYN_UNLOCK (dbin);
|
2007-10-08 17:12:32 +00:00
|
|
|
dbin->have_type = FALSE;
|
gst/playback/gstdecodebin2.c: Remove fakesink hack, we can now implement this more elegantly.
Original commit message from CVS:
* gst/playback/gstdecodebin2.c: (gst_decode_bin_class_init),
(gst_decode_bin_init), (gst_decode_bin_dispose),
(gst_decode_bin_set_sink_caps), (gst_decode_bin_get_sink_caps),
(gst_decode_bin_set_property), (gst_decode_bin_get_property),
(analyze_new_pad), (connect_pad), (expose_pad),
(gst_decode_group_new), (gst_decode_group_control_demuxer_pad),
(gst_decode_group_expose), (gst_decode_group_free),
(do_async_start), (do_async_done), (gst_decode_bin_change_state):
Remove fakesink hack, we can now implement this more elegantly.
Added property to bypass typefinding.
Removed underrun callback and demuxer pad probe, we now use the srcpad
probe to expose groups.
API::sink-caps property
* gst/playback/gstplaybin2.c: (no_more_pads_cb):
Guard against multiple emissions of the no_more_pads signal, which
happens when we are dealing with chained oggs.
* gst/playback/gsturidecodebin.c: (remove_decoders),
(make_decoder), (type_found), (setup_streaming), (source_new_pad),
(setup_source):
For streams, use our own typefind element and plug our queue after it.
We will need this to determine the type of buffering to use for the
queue soon.
2008-04-03 12:16:04 +00:00
|
|
|
ret = GST_STATE_CHANGE_ASYNC;
|
|
|
|
do_async_start (dbin);
|
2013-05-22 11:49:18 +00:00
|
|
|
|
|
|
|
|
|
|
|
/* connect a signal to find out when the typefind element found
|
|
|
|
* a type */
|
|
|
|
dbin->have_type_id =
|
|
|
|
g_signal_connect (dbin->typefind, "have-type",
|
|
|
|
G_CALLBACK (type_found), dbin);
|
gst/playback/: New decodebin2 element.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstdecodebin2.c: (gst_decode_bin_get_type),
(_gst_boolean_accumulator), (gst_decode_bin_class_init),
(gst_decode_bin_factory_filter), (compare_ranks), (print_feature),
(gst_decode_bin_init), (gst_decode_bin_dispose),
(gst_decode_bin_finalize), (gst_decode_bin_set_property),
(gst_decode_bin_get_property), (gst_decode_bin_set_caps),
(gst_decode_bin_get_caps), (gst_decode_bin_autoplug_continue),
(gst_decode_bin_autoplug_sort), (analyze_new_pad), (connect_pad),
(connect_element), (expose_pad), (type_found),
(pad_added_group_cb), (pad_removed_group_cb),
(no_more_pads_group_cb), (pad_added_cb), (pad_removed_cb),
(no_more_pads_cb), (find_compatibles), (is_demuxer_element),
(are_raw_caps), (multi_queue_overrun_cb),
(multi_queue_underrun_cb), (gst_decode_group_new),
(get_current_group), (group_demuxer_event_probe),
(gst_decode_group_control_demuxer_pad),
(gst_decode_group_control_source_pad),
(gst_decode_group_check_if_blocked),
(gst_decode_group_check_if_drained), (gst_decode_group_expose),
(gst_decode_group_hide), (gst_decode_group_free),
(gst_decode_group_set_complete), (source_pad_blocked_cb),
(source_pad_event_probe), (gst_decode_pad_new), (add_fakesink),
(remove_fakesink), (find_sink_pad), (gst_decode_bin_change_state),
(plugin_init):
New decodebin2 element.
Closes #370092
* gst/playback/gstplay-marshal.list:
Added marshallers for new signals in decodebin2
* gst/playback/gstplaybasebin.c: (setup_subtitle), (make_decoder):
Use decodebin2 if *and only if* the USE_DECODEBIN2 environment variable
is set.
2006-11-28 14:40:39 +00:00
|
|
|
break;
|
2009-03-06 18:28:37 +00:00
|
|
|
case GST_STATE_CHANGE_PAUSED_TO_READY:
|
2017-01-18 03:59:18 +00:00
|
|
|
case GST_STATE_CHANGE_READY_TO_NULL:
|
2013-05-22 11:49:18 +00:00
|
|
|
if (dbin->have_type_id)
|
|
|
|
g_signal_handler_disconnect (dbin->typefind, dbin->have_type_id);
|
|
|
|
dbin->have_type_id = 0;
|
2009-09-26 10:17:49 +00:00
|
|
|
DYN_LOCK (dbin);
|
2009-03-06 18:28:37 +00:00
|
|
|
GST_LOG_OBJECT (dbin, "setting shutdown flag");
|
|
|
|
dbin->shutdown = TRUE;
|
|
|
|
unblock_pads (dbin);
|
2009-09-26 10:17:49 +00:00
|
|
|
DYN_UNLOCK (dbin);
|
2017-11-16 05:39:41 +00:00
|
|
|
|
|
|
|
/* Make sure we don't have cleanup races where
|
|
|
|
* we might be trying to deactivate pads (in the cleanup thread)
|
|
|
|
* at the same time as the default element deactivation
|
|
|
|
* (in PAUSED=>READY) */
|
|
|
|
g_mutex_lock (&dbin->cleanup_lock);
|
|
|
|
if (dbin->cleanup_thread) {
|
|
|
|
g_thread_join (dbin->cleanup_thread);
|
|
|
|
dbin->cleanup_thread = NULL;
|
|
|
|
}
|
|
|
|
g_mutex_unlock (&dbin->cleanup_lock);
|
gst/playback/: New decodebin2 element.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstdecodebin2.c: (gst_decode_bin_get_type),
(_gst_boolean_accumulator), (gst_decode_bin_class_init),
(gst_decode_bin_factory_filter), (compare_ranks), (print_feature),
(gst_decode_bin_init), (gst_decode_bin_dispose),
(gst_decode_bin_finalize), (gst_decode_bin_set_property),
(gst_decode_bin_get_property), (gst_decode_bin_set_caps),
(gst_decode_bin_get_caps), (gst_decode_bin_autoplug_continue),
(gst_decode_bin_autoplug_sort), (analyze_new_pad), (connect_pad),
(connect_element), (expose_pad), (type_found),
(pad_added_group_cb), (pad_removed_group_cb),
(no_more_pads_group_cb), (pad_added_cb), (pad_removed_cb),
(no_more_pads_cb), (find_compatibles), (is_demuxer_element),
(are_raw_caps), (multi_queue_overrun_cb),
(multi_queue_underrun_cb), (gst_decode_group_new),
(get_current_group), (group_demuxer_event_probe),
(gst_decode_group_control_demuxer_pad),
(gst_decode_group_control_source_pad),
(gst_decode_group_check_if_blocked),
(gst_decode_group_check_if_drained), (gst_decode_group_expose),
(gst_decode_group_hide), (gst_decode_group_free),
(gst_decode_group_set_complete), (source_pad_blocked_cb),
(source_pad_event_probe), (gst_decode_pad_new), (add_fakesink),
(remove_fakesink), (find_sink_pad), (gst_decode_bin_change_state),
(plugin_init):
New decodebin2 element.
Closes #370092
* gst/playback/gstplay-marshal.list:
Added marshallers for new signals in decodebin2
* gst/playback/gstplaybasebin.c: (setup_subtitle), (make_decoder):
Use decodebin2 if *and only if* the USE_DECODEBIN2 environment variable
is set.
2006-11-28 14:40:39 +00:00
|
|
|
default:
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
gst/playback/gstdecodebin2.c: Remove fakesink hack, we can now implement this more elegantly.
Original commit message from CVS:
* gst/playback/gstdecodebin2.c: (gst_decode_bin_class_init),
(gst_decode_bin_init), (gst_decode_bin_dispose),
(gst_decode_bin_set_sink_caps), (gst_decode_bin_get_sink_caps),
(gst_decode_bin_set_property), (gst_decode_bin_get_property),
(analyze_new_pad), (connect_pad), (expose_pad),
(gst_decode_group_new), (gst_decode_group_control_demuxer_pad),
(gst_decode_group_expose), (gst_decode_group_free),
(do_async_start), (do_async_done), (gst_decode_bin_change_state):
Remove fakesink hack, we can now implement this more elegantly.
Added property to bypass typefinding.
Removed underrun callback and demuxer pad probe, we now use the srcpad
probe to expose groups.
API::sink-caps property
* gst/playback/gstplaybin2.c: (no_more_pads_cb):
Guard against multiple emissions of the no_more_pads signal, which
happens when we are dealing with chained oggs.
* gst/playback/gsturidecodebin.c: (remove_decoders),
(make_decoder), (type_found), (setup_streaming), (source_new_pad),
(setup_source):
For streams, use our own typefind element and plug our queue after it.
We will need this to determine the type of buffering to use for the
queue soon.
2008-04-03 12:16:04 +00:00
|
|
|
{
|
|
|
|
GstStateChangeReturn bret;
|
gst/playback/: New decodebin2 element.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstdecodebin2.c: (gst_decode_bin_get_type),
(_gst_boolean_accumulator), (gst_decode_bin_class_init),
(gst_decode_bin_factory_filter), (compare_ranks), (print_feature),
(gst_decode_bin_init), (gst_decode_bin_dispose),
(gst_decode_bin_finalize), (gst_decode_bin_set_property),
(gst_decode_bin_get_property), (gst_decode_bin_set_caps),
(gst_decode_bin_get_caps), (gst_decode_bin_autoplug_continue),
(gst_decode_bin_autoplug_sort), (analyze_new_pad), (connect_pad),
(connect_element), (expose_pad), (type_found),
(pad_added_group_cb), (pad_removed_group_cb),
(no_more_pads_group_cb), (pad_added_cb), (pad_removed_cb),
(no_more_pads_cb), (find_compatibles), (is_demuxer_element),
(are_raw_caps), (multi_queue_overrun_cb),
(multi_queue_underrun_cb), (gst_decode_group_new),
(get_current_group), (group_demuxer_event_probe),
(gst_decode_group_control_demuxer_pad),
(gst_decode_group_control_source_pad),
(gst_decode_group_check_if_blocked),
(gst_decode_group_check_if_drained), (gst_decode_group_expose),
(gst_decode_group_hide), (gst_decode_group_free),
(gst_decode_group_set_complete), (source_pad_blocked_cb),
(source_pad_event_probe), (gst_decode_pad_new), (add_fakesink),
(remove_fakesink), (find_sink_pad), (gst_decode_bin_change_state),
(plugin_init):
New decodebin2 element.
Closes #370092
* gst/playback/gstplay-marshal.list:
Added marshallers for new signals in decodebin2
* gst/playback/gstplaybasebin.c: (setup_subtitle), (make_decoder):
Use decodebin2 if *and only if* the USE_DECODEBIN2 environment variable
is set.
2006-11-28 14:40:39 +00:00
|
|
|
|
gst/playback/gstdecodebin2.c: Remove fakesink hack, we can now implement this more elegantly.
Original commit message from CVS:
* gst/playback/gstdecodebin2.c: (gst_decode_bin_class_init),
(gst_decode_bin_init), (gst_decode_bin_dispose),
(gst_decode_bin_set_sink_caps), (gst_decode_bin_get_sink_caps),
(gst_decode_bin_set_property), (gst_decode_bin_get_property),
(analyze_new_pad), (connect_pad), (expose_pad),
(gst_decode_group_new), (gst_decode_group_control_demuxer_pad),
(gst_decode_group_expose), (gst_decode_group_free),
(do_async_start), (do_async_done), (gst_decode_bin_change_state):
Remove fakesink hack, we can now implement this more elegantly.
Added property to bypass typefinding.
Removed underrun callback and demuxer pad probe, we now use the srcpad
probe to expose groups.
API::sink-caps property
* gst/playback/gstplaybin2.c: (no_more_pads_cb):
Guard against multiple emissions of the no_more_pads signal, which
happens when we are dealing with chained oggs.
* gst/playback/gsturidecodebin.c: (remove_decoders),
(make_decoder), (type_found), (setup_streaming), (source_new_pad),
(setup_source):
For streams, use our own typefind element and plug our queue after it.
We will need this to determine the type of buffering to use for the
queue soon.
2008-04-03 12:16:04 +00:00
|
|
|
bret = GST_ELEMENT_CLASS (parent_class)->change_state (element, transition);
|
|
|
|
if (G_UNLIKELY (bret == GST_STATE_CHANGE_FAILURE))
|
|
|
|
goto activate_failed;
|
2009-03-25 18:01:45 +00:00
|
|
|
else if (G_UNLIKELY (bret == GST_STATE_CHANGE_NO_PREROLL)) {
|
|
|
|
do_async_done (dbin);
|
|
|
|
ret = bret;
|
|
|
|
}
|
gst/playback/gstdecodebin2.c: Remove fakesink hack, we can now implement this more elegantly.
Original commit message from CVS:
* gst/playback/gstdecodebin2.c: (gst_decode_bin_class_init),
(gst_decode_bin_init), (gst_decode_bin_dispose),
(gst_decode_bin_set_sink_caps), (gst_decode_bin_get_sink_caps),
(gst_decode_bin_set_property), (gst_decode_bin_get_property),
(analyze_new_pad), (connect_pad), (expose_pad),
(gst_decode_group_new), (gst_decode_group_control_demuxer_pad),
(gst_decode_group_expose), (gst_decode_group_free),
(do_async_start), (do_async_done), (gst_decode_bin_change_state):
Remove fakesink hack, we can now implement this more elegantly.
Added property to bypass typefinding.
Removed underrun callback and demuxer pad probe, we now use the srcpad
probe to expose groups.
API::sink-caps property
* gst/playback/gstplaybin2.c: (no_more_pads_cb):
Guard against multiple emissions of the no_more_pads signal, which
happens when we are dealing with chained oggs.
* gst/playback/gsturidecodebin.c: (remove_decoders),
(make_decoder), (type_found), (setup_streaming), (source_new_pad),
(setup_source):
For streams, use our own typefind element and plug our queue after it.
We will need this to determine the type of buffering to use for the
queue soon.
2008-04-03 12:16:04 +00:00
|
|
|
}
|
|
|
|
switch (transition) {
|
|
|
|
case GST_STATE_CHANGE_PAUSED_TO_READY:
|
|
|
|
do_async_done (dbin);
|
2013-05-15 12:47:53 +00:00
|
|
|
EXPOSE_LOCK (dbin);
|
2009-09-26 10:17:49 +00:00
|
|
|
if (dbin->decode_chain) {
|
2016-03-14 15:06:53 +00:00
|
|
|
gst_decode_chain_stop (dbin, dbin->decode_chain, NULL);
|
2015-02-03 17:06:43 +00:00
|
|
|
chain_to_free = dbin->decode_chain;
|
|
|
|
gst_decode_chain_free_internal (dbin->decode_chain, TRUE);
|
2009-09-26 10:17:49 +00:00
|
|
|
dbin->decode_chain = NULL;
|
|
|
|
}
|
2013-05-15 12:47:53 +00:00
|
|
|
EXPOSE_UNLOCK (dbin);
|
2015-02-03 17:06:43 +00:00
|
|
|
if (chain_to_free)
|
|
|
|
gst_decode_chain_free (chain_to_free);
|
2014-03-16 17:27:30 +00:00
|
|
|
g_list_free_full (dbin->buffering_status,
|
|
|
|
(GDestroyNotify) gst_message_unref);
|
|
|
|
dbin->buffering_status = NULL;
|
2017-11-16 17:22:20 +00:00
|
|
|
/* Let's do a final check of leftover groups to free */
|
|
|
|
g_mutex_lock (&dbin->cleanup_lock);
|
|
|
|
if (dbin->cleanup_groups) {
|
|
|
|
gst_decode_chain_free_hidden_groups (dbin->cleanup_groups);
|
|
|
|
dbin->cleanup_groups = NULL;
|
|
|
|
}
|
|
|
|
g_mutex_unlock (&dbin->cleanup_lock);
|
2009-03-25 18:01:45 +00:00
|
|
|
break;
|
|
|
|
case GST_STATE_CHANGE_READY_TO_NULL:
|
2017-11-16 17:22:20 +00:00
|
|
|
/* Let's do a final check of leftover groups to free */
|
|
|
|
g_mutex_lock (&dbin->cleanup_lock);
|
|
|
|
if (dbin->cleanup_groups) {
|
|
|
|
gst_decode_chain_free_hidden_groups (dbin->cleanup_groups);
|
|
|
|
dbin->cleanup_groups = NULL;
|
|
|
|
}
|
|
|
|
g_mutex_unlock (&dbin->cleanup_lock);
|
|
|
|
break;
|
gst/playback/gstdecodebin2.c: Remove fakesink hack, we can now implement this more elegantly.
Original commit message from CVS:
* gst/playback/gstdecodebin2.c: (gst_decode_bin_class_init),
(gst_decode_bin_init), (gst_decode_bin_dispose),
(gst_decode_bin_set_sink_caps), (gst_decode_bin_get_sink_caps),
(gst_decode_bin_set_property), (gst_decode_bin_get_property),
(analyze_new_pad), (connect_pad), (expose_pad),
(gst_decode_group_new), (gst_decode_group_control_demuxer_pad),
(gst_decode_group_expose), (gst_decode_group_free),
(do_async_start), (do_async_done), (gst_decode_bin_change_state):
Remove fakesink hack, we can now implement this more elegantly.
Added property to bypass typefinding.
Removed underrun callback and demuxer pad probe, we now use the srcpad
probe to expose groups.
API::sink-caps property
* gst/playback/gstplaybin2.c: (no_more_pads_cb):
Guard against multiple emissions of the no_more_pads signal, which
happens when we are dealing with chained oggs.
* gst/playback/gsturidecodebin.c: (remove_decoders),
(make_decoder), (type_found), (setup_streaming), (source_new_pad),
(setup_source):
For streams, use our own typefind element and plug our queue after it.
We will need this to determine the type of buffering to use for the
queue soon.
2008-04-03 12:16:04 +00:00
|
|
|
default:
|
|
|
|
break;
|
|
|
|
}
|
gst/playback/: New decodebin2 element.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstdecodebin2.c: (gst_decode_bin_get_type),
(_gst_boolean_accumulator), (gst_decode_bin_class_init),
(gst_decode_bin_factory_filter), (compare_ranks), (print_feature),
(gst_decode_bin_init), (gst_decode_bin_dispose),
(gst_decode_bin_finalize), (gst_decode_bin_set_property),
(gst_decode_bin_get_property), (gst_decode_bin_set_caps),
(gst_decode_bin_get_caps), (gst_decode_bin_autoplug_continue),
(gst_decode_bin_autoplug_sort), (analyze_new_pad), (connect_pad),
(connect_element), (expose_pad), (type_found),
(pad_added_group_cb), (pad_removed_group_cb),
(no_more_pads_group_cb), (pad_added_cb), (pad_removed_cb),
(no_more_pads_cb), (find_compatibles), (is_demuxer_element),
(are_raw_caps), (multi_queue_overrun_cb),
(multi_queue_underrun_cb), (gst_decode_group_new),
(get_current_group), (group_demuxer_event_probe),
(gst_decode_group_control_demuxer_pad),
(gst_decode_group_control_source_pad),
(gst_decode_group_check_if_blocked),
(gst_decode_group_check_if_drained), (gst_decode_group_expose),
(gst_decode_group_hide), (gst_decode_group_free),
(gst_decode_group_set_complete), (source_pad_blocked_cb),
(source_pad_event_probe), (gst_decode_pad_new), (add_fakesink),
(remove_fakesink), (find_sink_pad), (gst_decode_bin_change_state),
(plugin_init):
New decodebin2 element.
Closes #370092
* gst/playback/gstplay-marshal.list:
Added marshallers for new signals in decodebin2
* gst/playback/gstplaybasebin.c: (setup_subtitle), (make_decoder):
Use decodebin2 if *and only if* the USE_DECODEBIN2 environment variable
is set.
2006-11-28 14:40:39 +00:00
|
|
|
|
|
|
|
return ret;
|
2007-02-09 13:16:27 +00:00
|
|
|
|
|
|
|
/* ERRORS */
|
|
|
|
missing_typefind:
|
|
|
|
{
|
|
|
|
gst_element_post_message (element,
|
|
|
|
gst_missing_element_message_new (element, "typefind"));
|
|
|
|
GST_ELEMENT_ERROR (dbin, CORE, MISSING_PLUGIN, (NULL), ("no typefind!"));
|
|
|
|
return GST_STATE_CHANGE_FAILURE;
|
|
|
|
}
|
gst/playback/gstdecodebin2.c: Remove fakesink hack, we can now implement this more elegantly.
Original commit message from CVS:
* gst/playback/gstdecodebin2.c: (gst_decode_bin_class_init),
(gst_decode_bin_init), (gst_decode_bin_dispose),
(gst_decode_bin_set_sink_caps), (gst_decode_bin_get_sink_caps),
(gst_decode_bin_set_property), (gst_decode_bin_get_property),
(analyze_new_pad), (connect_pad), (expose_pad),
(gst_decode_group_new), (gst_decode_group_control_demuxer_pad),
(gst_decode_group_expose), (gst_decode_group_free),
(do_async_start), (do_async_done), (gst_decode_bin_change_state):
Remove fakesink hack, we can now implement this more elegantly.
Added property to bypass typefinding.
Removed underrun callback and demuxer pad probe, we now use the srcpad
probe to expose groups.
API::sink-caps property
* gst/playback/gstplaybin2.c: (no_more_pads_cb):
Guard against multiple emissions of the no_more_pads signal, which
happens when we are dealing with chained oggs.
* gst/playback/gsturidecodebin.c: (remove_decoders),
(make_decoder), (type_found), (setup_streaming), (source_new_pad),
(setup_source):
For streams, use our own typefind element and plug our queue after it.
We will need this to determine the type of buffering to use for the
queue soon.
2008-04-03 12:16:04 +00:00
|
|
|
activate_failed:
|
2007-02-09 13:16:27 +00:00
|
|
|
{
|
gst/playback/gstdecodebin2.c: Remove fakesink hack, we can now implement this more elegantly.
Original commit message from CVS:
* gst/playback/gstdecodebin2.c: (gst_decode_bin_class_init),
(gst_decode_bin_init), (gst_decode_bin_dispose),
(gst_decode_bin_set_sink_caps), (gst_decode_bin_get_sink_caps),
(gst_decode_bin_set_property), (gst_decode_bin_get_property),
(analyze_new_pad), (connect_pad), (expose_pad),
(gst_decode_group_new), (gst_decode_group_control_demuxer_pad),
(gst_decode_group_expose), (gst_decode_group_free),
(do_async_start), (do_async_done), (gst_decode_bin_change_state):
Remove fakesink hack, we can now implement this more elegantly.
Added property to bypass typefinding.
Removed underrun callback and demuxer pad probe, we now use the srcpad
probe to expose groups.
API::sink-caps property
* gst/playback/gstplaybin2.c: (no_more_pads_cb):
Guard against multiple emissions of the no_more_pads signal, which
happens when we are dealing with chained oggs.
* gst/playback/gsturidecodebin.c: (remove_decoders),
(make_decoder), (type_found), (setup_streaming), (source_new_pad),
(setup_source):
For streams, use our own typefind element and plug our queue after it.
We will need this to determine the type of buffering to use for the
queue soon.
2008-04-03 12:16:04 +00:00
|
|
|
GST_DEBUG_OBJECT (element,
|
|
|
|
"element failed to change states -- activation problem?");
|
2015-10-17 19:25:22 +00:00
|
|
|
do_async_done (dbin);
|
2007-02-09 13:16:27 +00:00
|
|
|
return GST_STATE_CHANGE_FAILURE;
|
|
|
|
}
|
gst/playback/: New decodebin2 element.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstdecodebin2.c: (gst_decode_bin_get_type),
(_gst_boolean_accumulator), (gst_decode_bin_class_init),
(gst_decode_bin_factory_filter), (compare_ranks), (print_feature),
(gst_decode_bin_init), (gst_decode_bin_dispose),
(gst_decode_bin_finalize), (gst_decode_bin_set_property),
(gst_decode_bin_get_property), (gst_decode_bin_set_caps),
(gst_decode_bin_get_caps), (gst_decode_bin_autoplug_continue),
(gst_decode_bin_autoplug_sort), (analyze_new_pad), (connect_pad),
(connect_element), (expose_pad), (type_found),
(pad_added_group_cb), (pad_removed_group_cb),
(no_more_pads_group_cb), (pad_added_cb), (pad_removed_cb),
(no_more_pads_cb), (find_compatibles), (is_demuxer_element),
(are_raw_caps), (multi_queue_overrun_cb),
(multi_queue_underrun_cb), (gst_decode_group_new),
(get_current_group), (group_demuxer_event_probe),
(gst_decode_group_control_demuxer_pad),
(gst_decode_group_control_source_pad),
(gst_decode_group_check_if_blocked),
(gst_decode_group_check_if_drained), (gst_decode_group_expose),
(gst_decode_group_hide), (gst_decode_group_free),
(gst_decode_group_set_complete), (source_pad_blocked_cb),
(source_pad_event_probe), (gst_decode_pad_new), (add_fakesink),
(remove_fakesink), (find_sink_pad), (gst_decode_bin_change_state),
(plugin_init):
New decodebin2 element.
Closes #370092
* gst/playback/gstplay-marshal.list:
Added marshallers for new signals in decodebin2
* gst/playback/gstplaybasebin.c: (setup_subtitle), (make_decoder):
Use decodebin2 if *and only if* the USE_DECODEBIN2 environment variable
is set.
2006-11-28 14:40:39 +00:00
|
|
|
}
|
|
|
|
|
2011-10-13 15:34:49 +00:00
|
|
|
static void
|
|
|
|
gst_decode_bin_handle_message (GstBin * bin, GstMessage * msg)
|
|
|
|
{
|
|
|
|
GstDecodeBin *dbin = GST_DECODE_BIN (bin);
|
|
|
|
gboolean drop = FALSE;
|
|
|
|
|
|
|
|
if (GST_MESSAGE_TYPE (msg) == GST_MESSAGE_ERROR) {
|
2017-01-02 15:23:43 +00:00
|
|
|
/* Don't pass errors when shutting down. Sometimes,
|
|
|
|
* elements can generate spurious errors because we set the
|
|
|
|
* output pads to flushing, and they can't detect that if they
|
|
|
|
* send an event at exactly the wrong moment */
|
|
|
|
DYN_LOCK (dbin);
|
|
|
|
drop = dbin->shutdown;
|
|
|
|
DYN_UNLOCK (dbin);
|
|
|
|
|
|
|
|
if (!drop) {
|
|
|
|
GST_OBJECT_LOCK (dbin);
|
|
|
|
drop = (g_list_find (dbin->filtered, GST_MESSAGE_SRC (msg)) != NULL);
|
|
|
|
if (drop)
|
|
|
|
dbin->filtered_errors =
|
|
|
|
g_list_prepend (dbin->filtered_errors, gst_message_ref (msg));
|
|
|
|
GST_OBJECT_UNLOCK (dbin);
|
|
|
|
}
|
2014-03-16 17:27:30 +00:00
|
|
|
} else if (GST_MESSAGE_TYPE (msg) == GST_MESSAGE_BUFFERING) {
|
|
|
|
gint perc, msg_perc;
|
|
|
|
gint smaller_perc = 100;
|
|
|
|
GstMessage *smaller = NULL;
|
|
|
|
GList *found = NULL;
|
|
|
|
GList *iter;
|
|
|
|
|
|
|
|
/* buffering messages must be aggregated as there might be multiple
|
|
|
|
* multiqueue in the pipeline and their independent buffering messages
|
|
|
|
* will confuse the application
|
|
|
|
*
|
|
|
|
* decodebin keeps a list of messages received from elements that are
|
|
|
|
* buffering.
|
|
|
|
* Rules are:
|
|
|
|
* 1) Always post the smaller buffering %
|
|
|
|
* 2) If an element posts a 100% buffering message, remove it from the list
|
|
|
|
* 3) When there are no more messages on the list, post 100% message
|
|
|
|
* 4) When an element posts a new buffering message, update the one
|
|
|
|
* on the list to this new value
|
|
|
|
*/
|
|
|
|
|
2015-12-02 14:16:22 +00:00
|
|
|
BUFFERING_LOCK (dbin);
|
2014-03-16 17:27:30 +00:00
|
|
|
gst_message_parse_buffering (msg, &msg_perc);
|
|
|
|
|
2016-03-24 03:59:48 +00:00
|
|
|
GST_DEBUG_OBJECT (dbin, "Got buffering msg %" GST_PTR_FORMAT, msg);
|
|
|
|
|
|
|
|
g_mutex_lock (&dbin->buffering_post_lock);
|
|
|
|
|
2014-03-16 17:27:30 +00:00
|
|
|
/*
|
|
|
|
* Single loop for 2 things:
|
|
|
|
* 1) Look for a message with the same source
|
|
|
|
* 1.1) If the received message is 100%, remove it from the list
|
|
|
|
* 2) Find the minimum buffering from the list
|
|
|
|
*/
|
|
|
|
for (iter = dbin->buffering_status; iter;) {
|
|
|
|
GstMessage *bufstats = iter->data;
|
|
|
|
if (GST_MESSAGE_SRC (bufstats) == GST_MESSAGE_SRC (msg)) {
|
|
|
|
found = iter;
|
|
|
|
if (msg_perc < 100) {
|
2016-03-24 03:59:48 +00:00
|
|
|
GST_DEBUG_OBJECT (dbin, "Replacing old buffering msg %"
|
|
|
|
GST_PTR_FORMAT, iter->data);
|
2014-03-16 17:27:30 +00:00
|
|
|
gst_message_unref (iter->data);
|
|
|
|
bufstats = iter->data = gst_message_ref (msg);
|
|
|
|
} else {
|
|
|
|
GList *current = iter;
|
|
|
|
|
|
|
|
/* remove the element here and avoid confusing the loop */
|
|
|
|
iter = g_list_next (iter);
|
|
|
|
|
2016-03-24 03:59:48 +00:00
|
|
|
GST_DEBUG_OBJECT (dbin, "Deleting old buffering msg %"
|
|
|
|
GST_PTR_FORMAT, current->data);
|
|
|
|
|
2014-03-16 17:27:30 +00:00
|
|
|
gst_message_unref (current->data);
|
|
|
|
dbin->buffering_status =
|
|
|
|
g_list_delete_link (dbin->buffering_status, current);
|
|
|
|
|
|
|
|
continue;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
gst_message_parse_buffering (bufstats, &perc);
|
|
|
|
if (perc < smaller_perc) {
|
|
|
|
smaller_perc = perc;
|
|
|
|
smaller = bufstats;
|
|
|
|
}
|
|
|
|
iter = g_list_next (iter);
|
|
|
|
}
|
|
|
|
|
|
|
|
if (found == NULL && msg_perc < 100) {
|
|
|
|
if (msg_perc < smaller_perc) {
|
|
|
|
smaller_perc = msg_perc;
|
|
|
|
smaller = msg;
|
|
|
|
}
|
2016-03-24 03:59:48 +00:00
|
|
|
GST_DEBUG_OBJECT (dbin, "Storing buffering msg %" GST_PTR_FORMAT, msg);
|
2014-03-16 17:27:30 +00:00
|
|
|
dbin->buffering_status =
|
|
|
|
g_list_prepend (dbin->buffering_status, gst_message_ref (msg));
|
|
|
|
}
|
|
|
|
|
|
|
|
/* now compute the buffering message that should be posted */
|
|
|
|
if (smaller_perc == 100) {
|
|
|
|
g_assert (dbin->buffering_status == NULL);
|
|
|
|
/* we are posting the original received msg */
|
|
|
|
} else {
|
|
|
|
gst_message_replace (&msg, smaller);
|
|
|
|
}
|
2015-12-02 14:16:22 +00:00
|
|
|
BUFFERING_UNLOCK (dbin);
|
2016-03-24 03:59:48 +00:00
|
|
|
|
|
|
|
GST_DEBUG_OBJECT (dbin, "Forwarding buffering msg %" GST_PTR_FORMAT, msg);
|
|
|
|
GST_BIN_CLASS (parent_class)->handle_message (bin, msg);
|
|
|
|
|
|
|
|
g_mutex_unlock (&dbin->buffering_post_lock);
|
|
|
|
return;
|
2011-10-13 15:34:49 +00:00
|
|
|
}
|
|
|
|
|
2016-03-24 03:59:48 +00:00
|
|
|
if (drop) {
|
2011-10-13 15:34:49 +00:00
|
|
|
gst_message_unref (msg);
|
2016-03-24 03:59:48 +00:00
|
|
|
} else {
|
|
|
|
GST_DEBUG_OBJECT (dbin, "Forwarding msg %" GST_PTR_FORMAT, msg);
|
2011-10-13 15:34:49 +00:00
|
|
|
GST_BIN_CLASS (parent_class)->handle_message (bin, msg);
|
2016-03-24 03:59:48 +00:00
|
|
|
}
|
2011-10-13 15:34:49 +00:00
|
|
|
}
|
|
|
|
|
2015-12-02 14:16:22 +00:00
|
|
|
static gboolean
|
|
|
|
gst_decode_bin_remove_element (GstBin * bin, GstElement * element)
|
|
|
|
{
|
|
|
|
GstDecodeBin *dbin = GST_DECODE_BIN (bin);
|
|
|
|
gboolean removed = FALSE, post = FALSE;
|
|
|
|
GList *iter;
|
|
|
|
|
|
|
|
BUFFERING_LOCK (bin);
|
2017-03-17 14:10:54 +00:00
|
|
|
g_mutex_lock (&dbin->buffering_post_lock);
|
2015-12-02 14:16:22 +00:00
|
|
|
for (iter = dbin->buffering_status; iter; iter = iter->next) {
|
|
|
|
GstMessage *bufstats = iter->data;
|
|
|
|
|
|
|
|
if (GST_MESSAGE_SRC (bufstats) == GST_OBJECT_CAST (element) ||
|
|
|
|
gst_object_has_as_ancestor (GST_MESSAGE_SRC (bufstats),
|
|
|
|
GST_OBJECT_CAST (element))) {
|
|
|
|
gst_message_unref (bufstats);
|
|
|
|
dbin->buffering_status =
|
|
|
|
g_list_delete_link (dbin->buffering_status, iter);
|
|
|
|
removed = TRUE;
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
if (removed && dbin->buffering_status == NULL)
|
|
|
|
post = TRUE;
|
|
|
|
BUFFERING_UNLOCK (bin);
|
|
|
|
|
|
|
|
if (post) {
|
|
|
|
gst_element_post_message (GST_ELEMENT_CAST (bin),
|
|
|
|
gst_message_new_buffering (GST_OBJECT_CAST (dbin), 100));
|
|
|
|
}
|
2017-03-17 14:10:54 +00:00
|
|
|
g_mutex_unlock (&dbin->buffering_post_lock);
|
2015-12-02 14:16:22 +00:00
|
|
|
|
|
|
|
return GST_BIN_CLASS (parent_class)->remove_element (bin, element);
|
|
|
|
}
|
|
|
|
|
2008-11-21 00:04:48 +00:00
|
|
|
gboolean
|
|
|
|
gst_decode_bin_plugin_init (GstPlugin * plugin)
|
|
|
|
{
|
2011-06-14 22:51:29 +00:00
|
|
|
GST_DEBUG_CATEGORY_INIT (gst_decode_bin_debug, "decodebin", 0, "decoder bin");
|
gst/playback/: New decodebin2 element.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstdecodebin2.c: (gst_decode_bin_get_type),
(_gst_boolean_accumulator), (gst_decode_bin_class_init),
(gst_decode_bin_factory_filter), (compare_ranks), (print_feature),
(gst_decode_bin_init), (gst_decode_bin_dispose),
(gst_decode_bin_finalize), (gst_decode_bin_set_property),
(gst_decode_bin_get_property), (gst_decode_bin_set_caps),
(gst_decode_bin_get_caps), (gst_decode_bin_autoplug_continue),
(gst_decode_bin_autoplug_sort), (analyze_new_pad), (connect_pad),
(connect_element), (expose_pad), (type_found),
(pad_added_group_cb), (pad_removed_group_cb),
(no_more_pads_group_cb), (pad_added_cb), (pad_removed_cb),
(no_more_pads_cb), (find_compatibles), (is_demuxer_element),
(are_raw_caps), (multi_queue_overrun_cb),
(multi_queue_underrun_cb), (gst_decode_group_new),
(get_current_group), (group_demuxer_event_probe),
(gst_decode_group_control_demuxer_pad),
(gst_decode_group_control_source_pad),
(gst_decode_group_check_if_blocked),
(gst_decode_group_check_if_drained), (gst_decode_group_expose),
(gst_decode_group_hide), (gst_decode_group_free),
(gst_decode_group_set_complete), (source_pad_blocked_cb),
(source_pad_event_probe), (gst_decode_pad_new), (add_fakesink),
(remove_fakesink), (find_sink_pad), (gst_decode_bin_change_state),
(plugin_init):
New decodebin2 element.
Closes #370092
* gst/playback/gstplay-marshal.list:
Added marshallers for new signals in decodebin2
* gst/playback/gstplaybasebin.c: (setup_subtitle), (make_decoder):
Use decodebin2 if *and only if* the USE_DECODEBIN2 environment variable
is set.
2006-11-28 14:40:39 +00:00
|
|
|
|
2009-10-15 11:13:43 +00:00
|
|
|
/* Register some quarks here for the stream topology message */
|
|
|
|
topology_structure_name = g_quark_from_static_string ("stream-topology");
|
|
|
|
topology_caps = g_quark_from_static_string ("caps");
|
|
|
|
topology_next = g_quark_from_static_string ("next");
|
|
|
|
topology_pad = g_quark_from_static_string ("pad");
|
2011-11-03 12:10:31 +00:00
|
|
|
topology_element_srcpad = g_quark_from_static_string ("element-srcpad");
|
2009-10-15 11:13:43 +00:00
|
|
|
|
2011-06-14 22:51:29 +00:00
|
|
|
return gst_element_register (plugin, "decodebin", GST_RANK_NONE,
|
gst/playback/: New decodebin2 element.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstdecodebin2.c: (gst_decode_bin_get_type),
(_gst_boolean_accumulator), (gst_decode_bin_class_init),
(gst_decode_bin_factory_filter), (compare_ranks), (print_feature),
(gst_decode_bin_init), (gst_decode_bin_dispose),
(gst_decode_bin_finalize), (gst_decode_bin_set_property),
(gst_decode_bin_get_property), (gst_decode_bin_set_caps),
(gst_decode_bin_get_caps), (gst_decode_bin_autoplug_continue),
(gst_decode_bin_autoplug_sort), (analyze_new_pad), (connect_pad),
(connect_element), (expose_pad), (type_found),
(pad_added_group_cb), (pad_removed_group_cb),
(no_more_pads_group_cb), (pad_added_cb), (pad_removed_cb),
(no_more_pads_cb), (find_compatibles), (is_demuxer_element),
(are_raw_caps), (multi_queue_overrun_cb),
(multi_queue_underrun_cb), (gst_decode_group_new),
(get_current_group), (group_demuxer_event_probe),
(gst_decode_group_control_demuxer_pad),
(gst_decode_group_control_source_pad),
(gst_decode_group_check_if_blocked),
(gst_decode_group_check_if_drained), (gst_decode_group_expose),
(gst_decode_group_hide), (gst_decode_group_free),
(gst_decode_group_set_complete), (source_pad_blocked_cb),
(source_pad_event_probe), (gst_decode_pad_new), (add_fakesink),
(remove_fakesink), (find_sink_pad), (gst_decode_bin_change_state),
(plugin_init):
New decodebin2 element.
Closes #370092
* gst/playback/gstplay-marshal.list:
Added marshallers for new signals in decodebin2
* gst/playback/gstplaybasebin.c: (setup_subtitle), (make_decoder):
Use decodebin2 if *and only if* the USE_DECODEBIN2 environment variable
is set.
2006-11-28 14:40:39 +00:00
|
|
|
GST_TYPE_DECODE_BIN);
|
|
|
|
}
|