playback: ref the selector pad class inside input-selector
authorStefan Kost <ensonic@users.sf.net>
Mon, 6 Sep 2010 08:44:17 +0000 (11:44 +0300)
committerStefan Kost <ensonic@users.sf.net>
Mon, 6 Sep 2010 08:44:17 +0000 (11:44 +0300)
Minimizes the delta to original element in -bad and allows us to keep the
type static.

gst/playback/gstinputselector.c
gst/playback/gstinputselector.h
gst/playback/gstplaybin2.c

index 5ce5c33..cb76202 100644 (file)
@@ -146,7 +146,7 @@ static GstFlowReturn gst_selector_pad_chain (GstPad * pad, GstBuffer * buf);
 static GstFlowReturn gst_selector_pad_bufferalloc (GstPad * pad,
     guint64 offset, guint size, GstCaps * caps, GstBuffer ** buf);
 
-GType
+static GType
 gst_selector_pad_get_type (void)
 {
   static GType selector_pad_type = 0;
@@ -758,6 +758,9 @@ gst_input_selector_class_init (GstInputSelectorClass * klass)
 
   parent_class = g_type_class_peek_parent (klass);
 
+  /* FIXME: remove after confirming it is safe now */
+  g_type_class_ref (gst_selector_pad_get_type ());
+
   gobject_class->dispose = gst_input_selector_dispose;
 
   gobject_class->set_property = gst_input_selector_set_property;
index 83e0e54..58a671d 100644 (file)
@@ -78,7 +78,6 @@ struct _GstInputSelectorClass {
 };
 
 GType gst_input_selector_get_type (void);
-GType gst_selector_pad_get_type (void);
 
 G_END_DECLS
 
index 558b300..f1d5f88 100644 (file)
@@ -3552,7 +3552,6 @@ gst_play_bin2_plugin_init (GstPlugin * plugin)
   GST_DEBUG_CATEGORY_INIT (gst_play_bin_debug, "playbin2", 0, "play bin");
 
   g_type_class_ref (gst_input_selector_get_type ());
-  g_type_class_ref (gst_selector_pad_get_type ());
 
   return gst_element_register (plugin, "playbin2", GST_RANK_NONE,
       GST_TYPE_PLAY_BIN);