mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-23 08:46:40 +00:00
gst/gstminiobject.*: Add GValue set/get functions.
Original commit message from CVS: * gst/gstminiobject.c: (gst_value_set_mini_object), (gst_value_take_mini_object), (gst_value_get_mini_object): * gst/gstminiobject.h: Add GValue set/get functions.
This commit is contained in:
parent
fbe9b20d09
commit
4c9d07cf22
3 changed files with 42 additions and 0 deletions
|
@ -1,3 +1,9 @@
|
||||||
|
2005-05-19 David Schleef <ds@schleef.org>
|
||||||
|
|
||||||
|
* gst/gstminiobject.c: (gst_value_set_mini_object),
|
||||||
|
(gst_value_take_mini_object), (gst_value_get_mini_object):
|
||||||
|
* gst/gstminiobject.h: Add GValue set/get functions.
|
||||||
|
|
||||||
2005-05-19 Wim Taymans <wim@fluendo.com>
|
2005-05-19 Wim Taymans <wim@fluendo.com>
|
||||||
|
|
||||||
* gst/gstbuffer.c: (gst_buffer_init), (gst_subbuffer_get_type),
|
* gst/gstbuffer.c: (gst_buffer_init), (gst_subbuffer_get_type),
|
||||||
|
|
|
@ -270,6 +270,35 @@ gst_value_mini_object_lcopy (const GValue * value, guint n_collect_values,
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
gst_value_set_mini_object (GValue * value, GstMiniObject * mini_object)
|
||||||
|
{
|
||||||
|
g_return_if_fail (GST_VALUE_HOLDS_MINI_OBJECT (value));
|
||||||
|
g_return_if_fail (mini_object == NULL || GST_IS_MINI_OBJECT (mini_object));
|
||||||
|
|
||||||
|
gst_mini_object_replace ((GstMiniObject **) & value->data[0].v_pointer,
|
||||||
|
mini_object);
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
gst_value_take_mini_object (GValue * value, GstMiniObject * mini_object)
|
||||||
|
{
|
||||||
|
g_return_if_fail (GST_VALUE_HOLDS_MINI_OBJECT (value));
|
||||||
|
g_return_if_fail (mini_object == NULL || GST_IS_MINI_OBJECT (mini_object));
|
||||||
|
|
||||||
|
gst_mini_object_replace ((GstMiniObject **) & value->data[0].v_pointer,
|
||||||
|
mini_object);
|
||||||
|
gst_mini_object_unref (mini_object);
|
||||||
|
}
|
||||||
|
|
||||||
|
GstMiniObject *
|
||||||
|
gst_value_get_mini_object (const GValue * value)
|
||||||
|
{
|
||||||
|
g_return_val_if_fail (GST_VALUE_HOLDS_MINI_OBJECT (value), NULL);
|
||||||
|
|
||||||
|
return value->data[0].v_pointer;
|
||||||
|
}
|
||||||
|
|
||||||
/* param spec */
|
/* param spec */
|
||||||
|
|
||||||
static GType gst_param_spec_mini_object_get_type (void);
|
static GType gst_param_spec_mini_object_get_type (void);
|
||||||
|
|
|
@ -46,6 +46,8 @@ typedef void (*GstMiniObjectFinalizeFunction) (GstMiniObject *);
|
||||||
#define GST_MINI_OBJECT_FLAG_SET(obj,flag) (GST_MINI_OBJECT_FLAGS (obj) |= (flag))
|
#define GST_MINI_OBJECT_FLAG_SET(obj,flag) (GST_MINI_OBJECT_FLAGS (obj) |= (flag))
|
||||||
#define GST_MINI_OBJECT_FLAG_UNSET(obj,flag) (GST_MINI_OBJECT_FLAGS (obj) &= ~(flag))
|
#define GST_MINI_OBJECT_FLAG_UNSET(obj,flag) (GST_MINI_OBJECT_FLAGS (obj) &= ~(flag))
|
||||||
|
|
||||||
|
#define GST_VALUE_HOLDS_MINI_OBJECT(value) (G_VALUE_HOLDS(value, GST_TYPE_MINI_OBJECT))
|
||||||
|
|
||||||
typedef enum
|
typedef enum
|
||||||
{
|
{
|
||||||
GST_MINI_OBJECT_FLAG_READONLY = (1<<0),
|
GST_MINI_OBJECT_FLAG_READONLY = (1<<0),
|
||||||
|
@ -86,6 +88,11 @@ void gst_mini_object_replace (GstMiniObject **olddata, GstMiniObject *newdata);
|
||||||
GParamSpec * gst_param_spec_mini_object (const char *name, const char *nick,
|
GParamSpec * gst_param_spec_mini_object (const char *name, const char *nick,
|
||||||
const char *blurb, GType object_type, GParamFlags flags);
|
const char *blurb, GType object_type, GParamFlags flags);
|
||||||
|
|
||||||
|
void gst_value_set_mini_object (GValue *value, GstMiniObject *mini_object);
|
||||||
|
void gst_value_take_mini_object (GValue *value, GstMiniObject *mini_object);
|
||||||
|
GstMiniObject * gst_value_get_mini_object (const GValue *value);
|
||||||
|
|
||||||
|
|
||||||
G_END_DECLS
|
G_END_DECLS
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in a new issue