parse: Make gst_parse_context_copy() public for bindings
authorSebastian Dröge <sebastian@centricular.com>
Sat, 20 May 2017 16:42:51 +0000 (19:42 +0300)
committerSebastian Dröge <sebastian@centricular.com>
Mon, 29 May 2017 07:55:16 +0000 (10:55 +0300)
docs/gst/gstreamer-sections.txt
gst/gstparse.c
gst/gstparse.h
win32/common/libgstreamer.def

index 18f106f..9533d6a 100644 (file)
@@ -2242,6 +2242,7 @@ gst_parse_bin_from_description
 gst_parse_bin_from_description_full
 <SUBSECTION>
 gst_parse_context_new
+gst_parse_context_copy
 gst_parse_context_free
 gst_parse_context_get_missing_elements
 <SUBSECTION Standard>
index 4838d5c..f1f0c22 100644 (file)
 #include "parse/types.h"
 #endif
 
-static GstParseContext *
-gst_parse_context_copy (const GstParseContext * context)
-{
-  GstParseContext *ret = NULL;
-#ifndef GST_DISABLE_PARSE
-
-  ret = gst_parse_context_new ();
-  if (context) {
-    GQueue missing_copy = G_QUEUE_INIT;
-    GList *l;
-
-    for (l = context->missing_elements; l != NULL; l = l->next)
-      g_queue_push_tail (&missing_copy, g_strdup ((const gchar *) l->data));
-
-    ret->missing_elements = missing_copy.head;
-  }
-#endif
-  return ret;
-}
-
 G_DEFINE_BOXED_TYPE (GstParseContext, gst_parse_context,
     (GBoxedCopyFunc) gst_parse_context_copy,
     (GBoxedFreeFunc) gst_parse_context_free);
@@ -114,6 +94,34 @@ gst_parse_context_new (void)
 }
 
 /**
+ * gst_parse_context_copy:
+ * @context: a #GstParseContext
+ *
+ * Copies the @context.
+ *
+ * Returns: (transfer full): A copied #GstParseContext
+ */
+GstParseContext *
+gst_parse_context_copy (const GstParseContext * context)
+{
+  GstParseContext *ret = NULL;
+#ifndef GST_DISABLE_PARSE
+
+  ret = gst_parse_context_new ();
+  if (context) {
+    GQueue missing_copy = G_QUEUE_INIT;
+    GList *l;
+
+    for (l = context->missing_elements; l != NULL; l = l->next)
+      g_queue_push_tail (&missing_copy, g_strdup ((const gchar *) l->data));
+
+    ret->missing_elements = missing_copy.head;
+  }
+#endif
+  return ret;
+}
+
+/**
  * gst_parse_context_free:
  * @context: (transfer full): a #GstParseContext
  *
index 55f28eb..e34f67d 100644 (file)
@@ -102,6 +102,9 @@ gchar          ** gst_parse_context_get_missing_elements (GstParseContext * cont
 
 void              gst_parse_context_free (GstParseContext * context);
 
+GST_EXPORT
+GstParseContext * gst_parse_context_copy (const GstParseContext * context);
+
 
 /* parse functions */
 
index bc4bd55..ee2861c 100644 (file)
@@ -975,6 +975,7 @@ EXPORTS
        gst_parent_buffer_meta_get_info
        gst_parse_bin_from_description
        gst_parse_bin_from_description_full
+       gst_parse_context_copy
        gst_parse_context_free
        gst_parse_context_get_missing_elements
        gst_parse_context_get_type