mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-08 15:32:32 +00:00
gstcontext: Added gst_clear_context()
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5756>
This commit is contained in:
parent
ac6952e936
commit
4ec5de8784
3 changed files with 46 additions and 0 deletions
|
@ -49760,6 +49760,24 @@ reference count of the caps is decreased and the pointer is set to %NULL.</doc>
|
||||||
</parameter>
|
</parameter>
|
||||||
</parameters>
|
</parameters>
|
||||||
</function>
|
</function>
|
||||||
|
<function name="clear_context" c:identifier="gst_clear_context" version="1.24" introspectable="0">
|
||||||
|
<doc xml:space="preserve" filename="../subprojects/gstreamer/gst/gstcontext.c">Clears a reference to a #GstContext.
|
||||||
|
|
||||||
|
@context_ptr must not be `NULL`.
|
||||||
|
|
||||||
|
If the reference is `NULL` then this function does nothing. Otherwise, the
|
||||||
|
reference count of the context is decreased and the pointer is set to `NULL`.</doc>
|
||||||
|
<source-position filename="../subprojects/gstreamer/gst/gstcontext.h"/>
|
||||||
|
<return-value transfer-ownership="none">
|
||||||
|
<type name="none" c:type="void"/>
|
||||||
|
</return-value>
|
||||||
|
<parameters>
|
||||||
|
<parameter name="context_ptr" transfer-ownership="none">
|
||||||
|
<doc xml:space="preserve" filename="../subprojects/gstreamer/gst/gstcontext.c">a pointer to a #GstContext reference</doc>
|
||||||
|
<type name="Context" c:type="GstContext**"/>
|
||||||
|
</parameter>
|
||||||
|
</parameters>
|
||||||
|
</function>
|
||||||
<function name="clear_event" c:identifier="gst_clear_event" version="1.16" introspectable="0">
|
<function name="clear_event" c:identifier="gst_clear_event" version="1.16" introspectable="0">
|
||||||
<doc xml:space="preserve" filename="../subprojects/gstreamer/gst/gstevent.c">Clears a reference to a #GstEvent.
|
<doc xml:space="preserve" filename="../subprojects/gstreamer/gst/gstevent.c">Clears a reference to a #GstEvent.
|
||||||
|
|
||||||
|
|
|
@ -316,6 +316,25 @@ gst_context_unref (GstContext * context)
|
||||||
gst_mini_object_unref (GST_MINI_OBJECT_CAST (context));
|
gst_mini_object_unref (GST_MINI_OBJECT_CAST (context));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* gst_clear_context: (skip)
|
||||||
|
* @context_ptr: a pointer to a #GstContext reference
|
||||||
|
*
|
||||||
|
* Clears a reference to a #GstContext.
|
||||||
|
*
|
||||||
|
* @context_ptr must not be `NULL`.
|
||||||
|
*
|
||||||
|
* If the reference is `NULL` then this function does nothing. Otherwise, the
|
||||||
|
* reference count of the context is decreased and the pointer is set to `NULL`.
|
||||||
|
*
|
||||||
|
* Since: 1.24
|
||||||
|
*/
|
||||||
|
void
|
||||||
|
gst_clear_context (GstContext ** context_ptr)
|
||||||
|
{
|
||||||
|
gst_clear_mini_object ((GstMiniObject **) context_ptr);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* gst_context_copy:
|
* gst_context_copy:
|
||||||
* @context: the context to copy
|
* @context: the context to copy
|
||||||
|
|
|
@ -59,6 +59,12 @@ gst_context_unref (GstContext * context)
|
||||||
gst_mini_object_unref (GST_MINI_OBJECT_CAST (context));
|
gst_mini_object_unref (GST_MINI_OBJECT_CAST (context));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static inline void
|
||||||
|
gst_clear_context (GstContext ** context_ptr)
|
||||||
|
{
|
||||||
|
gst_clear_mini_object ((GstMiniObject **) context_ptr);
|
||||||
|
}
|
||||||
|
|
||||||
/* copy context */
|
/* copy context */
|
||||||
static inline GstContext *
|
static inline GstContext *
|
||||||
gst_context_copy (const GstContext * context)
|
gst_context_copy (const GstContext * context)
|
||||||
|
@ -72,6 +78,9 @@ GstContext * gst_context_ref (GstContext * context);
|
||||||
GST_API
|
GST_API
|
||||||
void gst_context_unref (GstContext * context);
|
void gst_context_unref (GstContext * context);
|
||||||
|
|
||||||
|
GST_API
|
||||||
|
void gst_clear_context (GstContext ** context_ptr);
|
||||||
|
|
||||||
GST_API
|
GST_API
|
||||||
GstContext * gst_context_copy (const GstContext * context);
|
GstContext * gst_context_copy (const GstContext * context);
|
||||||
#endif /* GST_DISABLE_MINIOBJECT_INLINE_FUNCTIONS */
|
#endif /* GST_DISABLE_MINIOBJECT_INLINE_FUNCTIONS */
|
||||||
|
|
Loading…
Reference in a new issue