+2007-10-08 Wim Taymans <wim.taymans@gmail.com>
+
+ * gst/playback/gstdecodebin.c: (add_fakesink), (type_found):
+ * gst/playback/gstdecodebin2.c: (gst_decode_bin_init),
+ (type_found):
+ Unlink the signal handler when we found the type, we're not going to do
+ anything sensible with more type_found signals anyway.
+
2007-10-06 Tim-Philipp Müller <tim at centricular dot net>
* gst-libs/gst/tag/gsttagdemux.c:
/* hacky, remove sink flag, we don't want our decodebin to become a sink
* just because we add a fakesink element to make us ASYNC */
GST_OBJECT_FLAG_UNSET (decode_bin->fakesink, GST_ELEMENT_IS_SINK);
+
/* takes ownership */
if (!gst_bin_add (GST_BIN (decode_bin), decode_bin->fakesink)) {
g_warning ("Could not add fakesink element, decodebin will not work");
if (decode_bin->shutting_down)
goto shutting_down;
+ /* don't need the typefind anymore, we're not going to dynamically change
+ * elements anyway */
+ if (decode_bin->have_type_id)
+ g_signal_handler_disconnect (G_OBJECT (typefind), decode_bin->have_type_id);
+ decode_bin->have_type_id = 0;
+
GST_DEBUG_OBJECT (decode_bin, "typefind found caps %" GST_PTR_FORMAT, caps);
/* special-case text/plain: we only want to accept it as a raw type if it
GstCaps *caps; /* caps on which to stop decoding */
GList *factories; /* factories we can use for selecting elements */
+
+ guint have_type_id; /* signal id for have-type from typefind */
};
struct _GstDecodeBinClass
/* connect a signal to find out when the typefind element found
* a type */
- g_signal_connect (G_OBJECT (decode_bin->typefind), "have_type",
+ decode_bin->have_type_id =
+ g_signal_connect (G_OBJECT (decode_bin->typefind), "have-type",
G_CALLBACK (type_found), decode_bin);
}
GST_DEBUG_OBJECT (decode_bin, "typefind found caps %" GST_PTR_FORMAT, caps);
+ if (decode_bin->have_type_id)
+ g_signal_handler_disconnect (typefind, decode_bin->have_type_id);
+ decode_bin->have_type_id = 0;
+
pad = gst_element_get_static_pad (typefind, "src");
analyze_new_pad (decode_bin, typefind, pad, caps, NULL);