X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=gst%2Fgstcontext.h;h=f55e84c3d5b6082e4a61d51fb0e8078c83fb274b;hb=dc5a62f70234f729c0f3443ab725e9f0232cc1fe;hp=4c3699cafd745deec68bf673ec59aa6e85659a34;hpb=0d6440b8d93b9d05ea73e3f0fa8ae223fcd9dd71;p=platform%2Fupstream%2Fgstreamer.git diff --git a/gst/gstcontext.h b/gst/gstcontext.h index 4c3699c..f55e84c 100644 --- a/gst/gstcontext.h +++ b/gst/gstcontext.h @@ -1,6 +1,7 @@ /* GStreamer * Copyright (C) 2013 Collabora Ltd. * Author: Sebastian Dröge + * Copyright (C) 2013 Sebastian Dröge * * gstcontext.h: Header for GstContext subsystem * @@ -23,6 +24,8 @@ #ifndef __GST_CONTEXT_H__ #define __GST_CONTEXT_H__ +#include + G_BEGIN_DECLS typedef struct _GstContext GstContext; @@ -30,13 +33,16 @@ typedef struct _GstContext GstContext; #include #include -#define GST_TYPE_CONTEXT (gst_context_get_type()) +GST_API GType _gst_context_type; + +#define GST_TYPE_CONTEXT (_gst_context_type) #define GST_IS_CONTEXT(obj) (GST_IS_MINI_OBJECT_TYPE (obj, GST_TYPE_CONTEXT)) #define GST_CONTEXT_CAST(obj) ((GstContext*)(obj)) #define GST_CONTEXT(obj) (GST_CONTEXT_CAST(obj)) +GST_API GType gst_context_get_type (void); @@ -49,10 +55,6 @@ GType gst_context_get_type (void); * * Returns: @context (for convenience when doing assignments) */ -#ifdef _FOOL_GTK_DOC_ -G_INLINE_FUNC GstContext * gst_context_ref (GstContext * context); -#endif - static inline GstContext * gst_context_ref (GstContext * context) { @@ -66,10 +68,6 @@ gst_context_ref (GstContext * context) * Convenience macro to decrease the reference count of the context, possibly * freeing it. */ -#ifdef _FOOL_GTK_DOC_ -G_INLINE_FUNC void gst_context_unref (GstContext * context); -#endif - static inline void gst_context_unref (GstContext * context) { @@ -87,10 +85,6 @@ gst_context_unref (GstContext * context) * * MT safe */ -#ifdef _FOOL_GTK_DOC_ -G_INLINE_FUNC GstContext * gst_context_copy (const GstContext * context); -#endif - static inline GstContext * gst_context_copy (const GstContext * context) { @@ -129,23 +123,37 @@ gst_context_copy (const GstContext * context) * in some cases), and the reference counts are updated appropriately (the old * context is unreffed, the new one is reffed). * - * Either @new_context or the #GstContext pointed to by @old_context may be NULL. + * Either @new_context or the #GstContext pointed to by @old_context may be %NULL. * - * Returns: TRUE if @new_context was different from @old_context + * Returns: %TRUE if @new_context was different from @old_context */ -#ifdef _FOOL_GTK_DOC_ -G_INLINE_FUNC gboolean gst_context_replace (GstContext **old_context, GstContext *new_context); -#endif - static inline gboolean gst_context_replace (GstContext **old_context, GstContext *new_context) { return gst_mini_object_replace ((GstMiniObject **) old_context, (GstMiniObject *) new_context); } -GstContext * gst_context_new (void) G_GNUC_MALLOC; +GST_API +GstContext * gst_context_new (const gchar * context_type, + gboolean persistent) G_GNUC_MALLOC; +GST_API +const gchar * gst_context_get_context_type (const GstContext * context); + +GST_API +gboolean gst_context_has_context_type (const GstContext * context, const gchar * context_type); + +GST_API +const GstStructure * gst_context_get_structure (const GstContext * context); -GstStructure * gst_context_get_structure (GstContext *context); +GST_API +GstStructure * gst_context_writable_structure (GstContext * context); + +GST_API +gboolean gst_context_is_persistent (const GstContext * context); + +#ifdef G_DEFINE_AUTOPTR_CLEANUP_FUNC +G_DEFINE_AUTOPTR_CLEANUP_FUNC(GstContext, gst_context_unref) +#endif G_END_DECLS