gl/gi: some annotation updates for called functions
authorMatthew Waters <matthew@centricular.com>
Thu, 3 Nov 2016 05:14:37 +0000 (16:14 +1100)
committerMatthew Waters <matthew@centricular.com>
Thu, 3 Nov 2016 05:16:12 +0000 (16:16 +1100)
With scope, closure, destroy annotations

gst-libs/gst/gl/gstglbasememory.c
gst-libs/gst/gl/gstglcontext.c
gst-libs/gst/gl/gstgldisplay.c
gst-libs/gst/gl/gstglfilter.c
gst-libs/gst/gl/gstglframebuffer.c
gst-libs/gst/gl/gstglmemory.c
gst-libs/gst/gl/gstglupload.c
gst-libs/gst/gl/gstglwindow.c

index 2d4c8c3..4c663f8 100644 (file)
@@ -636,8 +636,8 @@ gst_gl_allocation_params_init (GstGLAllocationParams * params,
  * gst_gl_allocation_params_copy:
  * @src: the #GstGLAllocationParams to initialize
  *
- * Returns: a copy of the #GstGLAllocationParams specified by @src or %NULL on
- *          failure
+ * Returns: (transfer full): a copy of the #GstGLAllocationParams specified by
+ *          @src or %NULL on failure
  *
  * Since: 1.8
  */
index b340494..85051ba 100644 (file)
@@ -916,7 +916,7 @@ gst_gl_context_set_window (GstGLContext * context, GstGLWindow * window)
  * gst_gl_context_get_window:
  * @context: a #GstGLContext
  *
- * Returns: the currently set window
+ * Returns: (transfer full) (nullable): the currently set window
  *
  * Since: 1.4
  */
@@ -1510,7 +1510,7 @@ _gst_gl_context_thread_run_generic (RunGenericData * data)
 /**
  * gst_gl_context_thread_add:
  * @context: a #GstGLContext
- * @func: a #GstGLContextThreadFunc
+ * @func: (scope call): a #GstGLContextThreadFunc
  * @data: (closure): user data to call @func with
  *
  * Execute @func in the OpenGL thread of @context with @data
@@ -1646,7 +1646,7 @@ gst_gl_context_check_feature (GstGLContext * context, const gchar * feature)
  *
  * See also gst_gl_context_activate().
  *
- * Returns: the #GstGLContext active in the current thread or %NULL
+ * Returns: (transfer none): the #GstGLContext active in the current thread or %NULL
  *
  * Since: 1.6
  */
index 061f003..b680940 100644 (file)
@@ -112,13 +112,13 @@ gst_gl_display_class_init (GstGLDisplayClass * klass)
   /**
    * GstGLDisplay::create-context:
    * @object: the #GstGLDisplay
-   * @context: other context to share resources with.
+   * @context: (transfer none): other context to share resources with.
    *
    * Overrides the @GstGLContext creation mechanism.
    * It can be called in any thread and it is emitted with
    * display's object lock held.
    *
-   * Returns: the new context.
+   * Returns: (transfer full): the new context.
    */
   gst_gl_display_signals[CREATE_CONTEXT] =
       g_signal_new ("create-context", G_TYPE_FROM_CLASS (klass),
@@ -378,9 +378,9 @@ gst_context_get_gl_display (GstContext * context, GstGLDisplay ** display)
 /**
  * gst_gl_display_create_context:
  * @display: a #GstGLDisplay
- * @other_context: other #GstGLContext to share resources with.
- * @p_context: resulting #GstGLContext
- * @error: resulting #GError
+ * @other_context: (transfer none): other #GstGLContext to share resources with.
+ * @p_context: (transfer full) (out): resulting #GstGLContext
+ * @error: (allow-none): resulting #GError
  *
  * It requires the display's object lock to be held.
  *
@@ -397,8 +397,7 @@ gst_gl_display_create_context (GstGLDisplay * display,
 
   g_return_val_if_fail (display != NULL, FALSE);
   g_return_val_if_fail (p_context != NULL, FALSE);
-  g_return_val_if_fail (error != NULL, FALSE);
-  g_return_val_if_fail (*error == NULL, FALSE);
+  g_return_val_if_fail (error == NULL || *error != NULL, FALSE);
 
   g_signal_emit (display, gst_gl_display_signals[CREATE_CONTEXT], 0,
       other_context, &context);
index 2dbdece..5d59791 100644 (file)
@@ -1028,8 +1028,8 @@ _glcb (gpointer data)
  * @filter: a #GstGLFilter
  * @input: the input texture
  * @output: the output texture
- * @func: the function to transform @input into @output. called with @data
- * @data: the data associated with @func
+ * @func: (scope call): the function to transform @input into @output. called with @data
+ * @data: (allow-none): the data associated with @func
  *
  * Transforms @input into @output using @func on through FBO.
  *
index 70c2e61..f628997 100644 (file)
@@ -248,7 +248,7 @@ gst_gl_framebuffer_new_with_default_depth (GstGLContext * context, guint width,
  * gst_gl_framebuffer_draw_to_texture:
  * @fb: a #GstGLFramebuffer
  * @mem: the #GstGLMemory to draw to
- * @func: the function to run
+ * @func: (scope call): the function to run
  * @user_data: data to pass to @func
  *
  * Perform the steps necessary to have the output of a glDraw* command in
index 84dd16d..31e102e 100644 (file)
@@ -1412,7 +1412,8 @@ gst_gl_memory_setup_buffer (GstGLMemoryAllocator * allocator,
  * gst_gl_memory_allocator_get_default:
  * @context: a #GstGLContext
  *
- * Returns: the default #GstGLMemoryAllocator supported by @context
+ * Returns: (transfer full): the default #GstGLMemoryAllocator supported by
+ *          @context
  *
  * Since: 1.8
  */
index f26fc88..d147cb3 100644 (file)
@@ -1405,8 +1405,6 @@ gst_gl_upload_set_caps (GstGLUpload * upload, GstCaps * in_caps,
  * @upload: a #GstGLUpload
  * @in_caps: (transfer full) (allow-none) (out): the input #GstCaps
  * @out_caps: (transfer full) (allow-none) (out): the output #GstCaps
- *
- * Returns: (transfer none): The #GstCaps set by gst_gl_upload_set_caps()
  */
 void
 gst_gl_upload_get_caps (GstGLUpload * upload, GstCaps ** in_caps,
index ba7981d..30687aa 100644 (file)
@@ -710,7 +710,7 @@ gst_gl_window_default_send_message_async (GstGLWindow * window,
  * @window: a #GstGLWindow
  * @callback: (scope async): function to invoke
  * @data: (closure): data to invoke @callback with
- * @destroy: (destroy): called when @data is not needed anymore
+ * @destroy: called when @data is not needed anymore
  *
  * Invoke @callback with @data on the window thread.  The callback may not
  * have been executed when this function returns.
@@ -736,7 +736,7 @@ gst_gl_window_send_message_async (GstGLWindow * window, GstGLWindowCB callback,
  * @window: a #GstGLWindow
  * @callback: (scope notified): function to invoke
  * @data: (closure): data to invoke @callback with
- * @destroy_notify: (destroy): called when @data is not needed any more
+ * @destroy_notify: called when @data is not needed any more
  *
  * Sets the draw callback called everytime gst_gl_window_draw() is called
  *
@@ -765,7 +765,7 @@ gst_gl_window_set_draw_callback (GstGLWindow * window, GstGLWindowCB callback,
  * @window: a #GstGLWindow
  * @callback: (scope notified): function to invoke
  * @data: (closure): data to invoke @callback with
- * @destroy_notify: (destroy): called when @data is not needed any more
+ * @destroy_notify: called when @data is not needed any more
  *
  * Sets the resize callback called everytime a resize of the window occurs.
  *
@@ -794,7 +794,7 @@ gst_gl_window_set_resize_callback (GstGLWindow * window,
  * @window: a #GstGLWindow
  * @callback: (scope notified): function to invoke
  * @data: (closure): data to invoke @callback with
- * @destroy_notify: (destroy): called when @data is not needed any more
+ * @destroy_notify: called when @data is not needed any more
  *
  * Sets the callback called when the window is about to close.
  *