preset: add gst_preset_is_editable()
[platform/upstream/gstreamer.git] / gst / gstcaps.h
index f229742..4b09b8e 100644 (file)
@@ -13,8 +13,8 @@
  *
  * You should have received a copy of the GNU Library General Public
  * License along with this library; if not, write to the
  *
  * You should have received a copy of the GNU Library General Public
  * License along with this library; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
+ * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
  */
 
 #ifndef __GST_CAPS_H__
  */
 
 #ifndef __GST_CAPS_H__
@@ -23,6 +23,7 @@
 #include <gst/gstconfig.h>
 #include <gst/gstminiobject.h>
 #include <gst/gststructure.h>
 #include <gst/gstconfig.h>
 #include <gst/gstminiobject.h>
 #include <gst/gststructure.h>
+#include <gst/gstcapsfeatures.h>
 #include <gst/glib-compat.h>
 
 G_BEGIN_DECLS
 #include <gst/glib-compat.h>
 
 G_BEGIN_DECLS
@@ -71,8 +72,6 @@ typedef enum {
  * another element's caps priority order when intersecting with its own caps.
  * Example: If caps1 is [A, B, C] and caps2 is [E, B, D, A], the result
  * would be [A, B], maintaining the first caps priority on the intersection.
  * another element's caps priority order when intersecting with its own caps.
  * Example: If caps1 is [A, B, C] and caps2 is [E, B, D, A], the result
  * would be [A, B], maintaining the first caps priority on the intersection.
- *
- * Since: 0.10.33
  */
 typedef enum {
   GST_CAPS_INTERSECT_ZIG_ZAG            =  0,
  */
 typedef enum {
   GST_CAPS_INTERSECT_ZIG_ZAG            =  0,
@@ -262,7 +261,7 @@ gst_caps_copy (const GstCaps * caps)
  * @caps: a #GstCaps
  *
  * Tests if you can safely modify @caps. It is only safe to modify caps when
  * @caps: a #GstCaps
  *
  * Tests if you can safely modify @caps. It is only safe to modify caps when
- * there is only one owner of the caps - ie, the refcount is 1.
+ * there is only one owner of the caps - ie, the object is writable.
  */
 #define         gst_caps_is_writable(caps)     gst_mini_object_is_writable (GST_MINI_OBJECT_CAST (caps))
 
  */
 #define         gst_caps_is_writable(caps)     gst_mini_object_is_writable (GST_MINI_OBJECT_CAST (caps))
 
@@ -289,19 +288,19 @@ gst_caps_copy (const GstCaps * caps)
 
 /**
  * gst_caps_replace:
 
 /**
  * gst_caps_replace:
- * @old_caps: (inout) (transfer full): pointer to a pointer to a #GstCaps to be
- *     replaced.
+ * @old_caps: (inout) (transfer full) (nullable): pointer to a pointer
+ *     to a #GstCaps to be replaced.
  * @new_caps: (transfer none) (allow-none): pointer to a #GstCaps that will
  * @new_caps: (transfer none) (allow-none): pointer to a #GstCaps that will
- *     replace the caps pointed to by @ocaps.
+ *     replace the caps pointed to by @old_caps.
  *
  * Modifies a pointer to a #GstCaps to point to a different #GstCaps. The
  * modification is done atomically (so this is useful for ensuring thread safety
  * in some cases), and the reference counts are updated appropriately (the old
  * caps is unreffed, the new is reffed).
  *
  *
  * Modifies a pointer to a #GstCaps to point to a different #GstCaps. The
  * modification is done atomically (so this is useful for ensuring thread safety
  * in some cases), and the reference counts are updated appropriately (the old
  * caps is unreffed, the new is reffed).
  *
- * Either @ncaps or the #GstCaps pointed to by @ocaps may be NULL.
+ * Either @new_caps or the #GstCaps pointed to by @old_caps may be %NULL.
  *
  *
- * Returns: TRUE if @new_caps was different from @old_caps
+ * Returns: %TRUE if @new_caps was different from @old_caps
  */
 #ifdef _FOOL_GTK_DOC_
 G_INLINE_FUNC gboolean gst_caps_replace (GstCaps **old_caps, GstCaps *new_caps);
  */
 #ifdef _FOOL_GTK_DOC_
 G_INLINE_FUNC gboolean gst_caps_replace (GstCaps **old_caps, GstCaps *new_caps);
@@ -318,13 +317,13 @@ gst_caps_replace (GstCaps **old_caps, GstCaps *new_caps)
  * @old_caps: (inout) (transfer full): pointer to a pointer to a #GstCaps to be
  *     replaced.
  * @new_caps: (transfer full) (allow-none): pointer to a #GstCaps that will
  * @old_caps: (inout) (transfer full): pointer to a pointer to a #GstCaps to be
  *     replaced.
  * @new_caps: (transfer full) (allow-none): pointer to a #GstCaps that will
- *     replace the caps pointed to by @ocaps.
+ *     replace the caps pointed to by @old_caps.
  *
  * Modifies a pointer to a #GstCaps to point to a different #GstCaps. This
  * function is similar to gst_caps_replace() except that it takes ownership
  * of @new_caps.
  *
  *
  * Modifies a pointer to a #GstCaps to point to a different #GstCaps. This
  * function is similar to gst_caps_replace() except that it takes ownership
  * of @new_caps.
  *
- * Returns: TRUE if @new_caps was different from @old_caps
+ * Returns: %TRUE if @new_caps was different from @old_caps
  */
 #ifdef _FOOL_GTK_DOC_
 G_INLINE_FUNC gboolean gst_caps_take (GstCaps **old_caps, GstCaps *new_caps);
  */
 #ifdef _FOOL_GTK_DOC_
 G_INLINE_FUNC gboolean gst_caps_take (GstCaps **old_caps, GstCaps *new_caps);
@@ -386,16 +385,27 @@ void              gst_caps_append                  (GstCaps       *caps1,
                                                     GstCaps       *caps2);
 void              gst_caps_append_structure        (GstCaps       *caps,
                                                     GstStructure  *structure);
                                                     GstCaps       *caps2);
 void              gst_caps_append_structure        (GstCaps       *caps,
                                                     GstStructure  *structure);
+void              gst_caps_append_structure_full   (GstCaps       *caps,
+                                                    GstStructure  *structure,
+                                                    GstCapsFeatures *features);
 void              gst_caps_remove_structure        (GstCaps       *caps, guint idx);
 GstCaps *         gst_caps_merge                   (GstCaps       *caps1,
                                                     GstCaps       *caps2) G_GNUC_WARN_UNUSED_RESULT;
 GstCaps *         gst_caps_merge_structure         (GstCaps       *caps,
                                                     GstStructure  *structure) G_GNUC_WARN_UNUSED_RESULT;
 void              gst_caps_remove_structure        (GstCaps       *caps, guint idx);
 GstCaps *         gst_caps_merge                   (GstCaps       *caps1,
                                                     GstCaps       *caps2) G_GNUC_WARN_UNUSED_RESULT;
 GstCaps *         gst_caps_merge_structure         (GstCaps       *caps,
                                                     GstStructure  *structure) G_GNUC_WARN_UNUSED_RESULT;
+GstCaps *         gst_caps_merge_structure_full    (GstCaps       *caps,
+                                                    GstStructure  *structure,
+                                                    GstCapsFeatures *features) G_GNUC_WARN_UNUSED_RESULT;
 guint             gst_caps_get_size                (const GstCaps *caps);
 GstStructure *    gst_caps_get_structure           (const GstCaps *caps,
                                                     guint          index);
 GstStructure *    gst_caps_steal_structure         (GstCaps       *caps,
                                                     guint          index) G_GNUC_WARN_UNUSED_RESULT;
 guint             gst_caps_get_size                (const GstCaps *caps);
 GstStructure *    gst_caps_get_structure           (const GstCaps *caps,
                                                     guint          index);
 GstStructure *    gst_caps_steal_structure         (GstCaps       *caps,
                                                     guint          index) G_GNUC_WARN_UNUSED_RESULT;
+void              gst_caps_set_features            (GstCaps *caps,
+                                                    guint          index,
+                                                    GstCapsFeatures * features);
+GstCapsFeatures * gst_caps_get_features            (const GstCaps *caps,
+                                                    guint          index);
 GstCaps *         gst_caps_copy_nth                (const GstCaps *caps, guint nth) G_GNUC_WARN_UNUSED_RESULT;
 GstCaps *         gst_caps_truncate                (GstCaps       *caps) G_GNUC_WARN_UNUSED_RESULT;
 void              gst_caps_set_value               (GstCaps       *caps,
 GstCaps *         gst_caps_copy_nth                (const GstCaps *caps, guint nth) G_GNUC_WARN_UNUSED_RESULT;
 GstCaps *         gst_caps_truncate                (GstCaps       *caps) G_GNUC_WARN_UNUSED_RESULT;
 void              gst_caps_set_value               (GstCaps       *caps,
@@ -417,6 +427,9 @@ gboolean          gst_caps_is_subset                   (const GstCaps *subset,
                                                    const GstCaps *superset);
 gboolean          gst_caps_is_subset_structure     (const GstCaps *caps,
                                                     const GstStructure *structure);
                                                    const GstCaps *superset);
 gboolean          gst_caps_is_subset_structure     (const GstCaps *caps,
                                                     const GstStructure *structure);
+gboolean          gst_caps_is_subset_structure_full (const GstCaps *caps,
+                                                     const GstStructure *structure,
+                                                     const GstCapsFeatures *features);
 gboolean          gst_caps_is_equal               (const GstCaps *caps1,
                                                    const GstCaps *caps2);
 gboolean          gst_caps_is_equal_fixed          (const GstCaps *caps1,
 gboolean          gst_caps_is_equal               (const GstCaps *caps1,
                                                    const GstCaps *caps2);
 gboolean          gst_caps_is_equal_fixed          (const GstCaps *caps1,