gstreamer_core/gst/gstchildproxy.c
changeset 8 4a7fac7dd34a
parent 0 0e761a78d257
child 30 7e817e7e631c
equal deleted inserted replaced
7:71e347f905f2 8:4a7fac7dd34a
   465 }
   465 }
   466 
   466 
   467 /**
   467 /**
   468  * gst_child_proxy_child_removed:
   468  * gst_child_proxy_child_removed:
   469  * @object: the parent object
   469  * @object: the parent object
   470  * @child: the newly added child
   470  * @child: the removed child
   471  *
   471  *
   472  * Emits the "child-removed" signal.
   472  * Emits the "child-removed" signal.
   473  */
   473  */
   474 #ifdef __SYMBIAN32__
   474 #ifdef __SYMBIAN32__
   475 EXPORT_C
   475 EXPORT_C
   495 	 * @child_proxy: the #GstChildProxy
   495 	 * @child_proxy: the #GstChildProxy
   496 	 * @object: the #GObject that was added
   496 	 * @object: the #GObject that was added
   497 	 *
   497 	 *
   498 	 * Will be emitted after the @object was added to the @child_proxy.
   498 	 * Will be emitted after the @object was added to the @child_proxy.
   499 	 */
   499 	 */
       
   500     /* FIXME 0.11: use GST_TYPE_OBJECT as GstChildProxy only
       
   501      * supports GstObjects */
   500     signals[CHILD_ADDED] =
   502     signals[CHILD_ADDED] =
   501         g_signal_new ("child-added", G_TYPE_FROM_CLASS (g_class),
   503         g_signal_new ("child-added", G_TYPE_FROM_CLASS (g_class),
   502         G_SIGNAL_RUN_FIRST, G_STRUCT_OFFSET (GstChildProxyInterface,
   504         G_SIGNAL_RUN_FIRST, G_STRUCT_OFFSET (GstChildProxyInterface,
   503             child_added), NULL, NULL, gst_marshal_VOID__OBJECT, G_TYPE_NONE, 1,
   505             child_added), NULL, NULL, gst_marshal_VOID__OBJECT, G_TYPE_NONE, 1,
   504         G_TYPE_OBJECT);
   506         G_TYPE_OBJECT);
   508 	 * @child_proxy: the #GstChildProxy
   510 	 * @child_proxy: the #GstChildProxy
   509 	 * @object: the #GObject that was removed
   511 	 * @object: the #GObject that was removed
   510 	 *
   512 	 *
   511 	 * Will be emitted after the @object was removed from the @child_proxy.
   513 	 * Will be emitted after the @object was removed from the @child_proxy.
   512 	 */
   514 	 */
       
   515     /* FIXME 0.11: use GST_TYPE_OBJECT as GstChildProxy only
       
   516      * supports GstObjects */
   513     signals[CHILD_REMOVED] =
   517     signals[CHILD_REMOVED] =
   514         g_signal_new ("child-removed", G_TYPE_FROM_CLASS (g_class),
   518         g_signal_new ("child-removed", G_TYPE_FROM_CLASS (g_class),
   515         G_SIGNAL_RUN_FIRST, G_STRUCT_OFFSET (GstChildProxyInterface,
   519         G_SIGNAL_RUN_FIRST, G_STRUCT_OFFSET (GstChildProxyInterface,
   516             child_removed), NULL, NULL, gst_marshal_VOID__OBJECT, G_TYPE_NONE,
   520             child_removed), NULL, NULL, gst_marshal_VOID__OBJECT, G_TYPE_NONE,
   517         1, G_TYPE_OBJECT);
   521         1, G_TYPE_OBJECT);
   525 
   529 
   526 
   530 
   527 GType
   531 GType
   528 gst_child_proxy_get_type (void)
   532 gst_child_proxy_get_type (void)
   529 {
   533 {
   530   static GType type = 0;
   534   static volatile gsize type = 0;
   531 
   535 
   532   if (G_UNLIKELY (type == 0)) {
   536   if (g_once_init_enter (&type)) {
       
   537     GType _type;
   533     static const GTypeInfo info = {
   538     static const GTypeInfo info = {
   534       sizeof (GstChildProxyInterface),
   539       sizeof (GstChildProxyInterface),
   535       gst_child_proxy_base_init,        /* base_init */
   540       gst_child_proxy_base_init,        /* base_init */
   536       NULL,                     /* base_finalize */
   541       NULL,                     /* base_finalize */
   537       NULL,                     /* class_init */
   542       NULL,                     /* class_init */
   539       NULL,                     /* class_data */
   544       NULL,                     /* class_data */
   540       0,
   545       0,
   541       0,                        /* n_preallocs */
   546       0,                        /* n_preallocs */
   542       NULL                      /* instance_init */
   547       NULL                      /* instance_init */
   543     };
   548     };
   544     type = g_type_register_static (G_TYPE_INTERFACE, "GstChildProxy", &info, 0);
   549 
   545 
   550     _type =
   546     g_type_interface_add_prerequisite (type, GST_TYPE_OBJECT);
   551         g_type_register_static (G_TYPE_INTERFACE, "GstChildProxy", &info, 0);
       
   552 
       
   553     g_type_interface_add_prerequisite (_type, GST_TYPE_OBJECT);
       
   554     g_once_init_leave (&type, (gsize) _type);
   547   }
   555   }
   548   return type;
   556   return type;
   549 }
   557 }