permissions: add Since tags and example for new API
authorMathieu Duponchelle <mathieu@centricular.com>
Fri, 2 Mar 2018 15:24:23 +0000 (16:24 +0100)
committerMathieu Duponchelle <mathieu@centricular.com>
Fri, 2 Mar 2018 15:24:23 +0000 (16:24 +0100)
gst/rtsp-server/rtsp-media-factory.c
gst/rtsp-server/rtsp-permissions.c

index b7ba295..5987d1b 100644 (file)
@@ -500,6 +500,8 @@ gst_rtsp_media_factory_add_role (GstRTSPMediaFactory * factory,
  * A convenience wrapper around gst_rtsp_permissions_add_role_from_structure().
  * If @factory had no permissions, new permissions will be created and the
  * role will be added to it.
+ *
+ * Since: 1.14
  */
 void
 gst_rtsp_media_factory_add_role_from_structure (GstRTSPMediaFactory * factory,
index 9575048..1667db7 100644 (file)
@@ -250,7 +250,15 @@ gst_rtsp_permissions_add_role_valist (GstRTSPPermissions * permissions,
 /**
  * gst_rtsp_permissions_add_role_from_structure:
  *
- * Add a new role to @permissions based on @structure
+ * Add a new role to @permissions based on @structure, for example
+ * given a role named `tester`, which should be granted a permission named
+ * `permission1`, the structure could be created with:
+ *
+ * ```
+ * gst_structure_new ("tester", "permission1", G_TYPE_BOOLEAN, TRUE, NULL);
+ * ```
+ *
+ * Since: 1.14
  */
 void
 gst_rtsp_permissions_add_role_from_structure (GstRTSPPermissions * permissions,