gstpad: Probes that return HANDLED can reset the data info field
[platform/upstream/gstreamer.git] / gst / gstdevice.c
index 678fe14..786acfb 100644 (file)
@@ -21,6 +21,7 @@
 
 /**
  * SECTION:gstdevice
+ * @title: GstDevice
  * @short_description: Object representing a device
  * @see_also: #GstDeviceProvider
  *
@@ -67,7 +68,7 @@ struct _GstDevicePrivate
 
 static guint signals[LAST_SIGNAL];
 
-G_DEFINE_ABSTRACT_TYPE (GstDevice, gst_device, GST_TYPE_OBJECT);
+G_DEFINE_ABSTRACT_TYPE_WITH_PRIVATE (GstDevice, gst_device, GST_TYPE_OBJECT);
 
 static void gst_device_get_property (GObject * object, guint property_id,
     GValue * value, GParamSpec * pspec);
@@ -81,8 +82,6 @@ gst_device_class_init (GstDeviceClass * klass)
 {
   GObjectClass *object_class = G_OBJECT_CLASS (klass);
 
-  g_type_class_add_private (klass, sizeof (GstDevicePrivate));
-
   object_class->get_property = gst_device_get_property;
   object_class->set_property = gst_device_set_property;
   object_class->finalize = gst_device_finalize;
@@ -111,8 +110,7 @@ gst_device_class_init (GstDeviceClass * klass)
 static void
 gst_device_init (GstDevice * device)
 {
-  device->priv = G_TYPE_INSTANCE_GET_PRIVATE (device, GST_TYPE_DEVICE,
-      GstDevicePrivate);
+  device->priv = gst_device_get_instance_private (device);
 }
 
 static void
@@ -198,7 +196,8 @@ gst_device_set_property (GObject * object, guint prop_id,
  * Creates the element with all of the required parameters set to use
  * this device.
  *
- * Returns: (transfer full): a new #GstElement configured to use this device
+ * Returns: (transfer full) (nullable): a new #GstElement configured to use
+ * this device
  *
  * Since: 1.4
  */
@@ -221,7 +220,7 @@ gst_device_create_element (GstDevice * device, const gchar * name)
  *
  * Getter for the #GstCaps that this device supports.
  *
- * Returns: The #GstCaps supported by this device. Unref with
+ * Returns: (nullable): The #GstCaps supported by this device. Unref with
  * gst_caps_unref() when done.
  *
  * Since: 1.4
@@ -285,7 +284,7 @@ gst_device_get_device_class (GstDevice * device)
  *
  * Gets the extra properties of a device.
  *
- * Returns: The extra properties or %NULL when there are none.
+ * Returns: (nullable): The extra properties or %NULL when there are none.
  *          Free with gst_structure_free() after use.
  *
  * Since: 1.6