mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-30 05:31:15 +00:00
make GstPropsEntry a boxed type
Original commit message from CVS: make GstPropsEntry a boxed type
This commit is contained in:
parent
4ec698fa6c
commit
0d3e4d08af
2 changed files with 15 additions and 5 deletions
|
@ -27,6 +27,7 @@
|
||||||
#include "gstprops.h"
|
#include "gstprops.h"
|
||||||
|
|
||||||
GType _gst_props_type;
|
GType _gst_props_type;
|
||||||
|
GType _gst_props_entry_type;
|
||||||
|
|
||||||
#define GST_PROPS_ENTRY_IS_VARIABLE(a) (((GstPropsEntry*)(a))->propstype > GST_PROPS_VAR_TYPE)
|
#define GST_PROPS_ENTRY_IS_VARIABLE(a) (((GstPropsEntry*)(a))->propstype > GST_PROPS_VAR_TYPE)
|
||||||
|
|
||||||
|
@ -133,6 +134,10 @@ _gst_props_initialize (void)
|
||||||
g_value_register_transform_func (_gst_props_type,
|
g_value_register_transform_func (_gst_props_type,
|
||||||
G_TYPE_STRING,
|
G_TYPE_STRING,
|
||||||
transform_func);
|
transform_func);
|
||||||
|
|
||||||
|
_gst_props_entry_type = g_boxed_type_register_static ("GstPropsEntry",
|
||||||
|
(GBoxedCopyFunc) gst_props_entry_copy,
|
||||||
|
(GBoxedFreeFunc) gst_props_entry_destroy);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
@ -304,7 +309,7 @@ gst_props_alloc_entry (void)
|
||||||
return entry;
|
return entry;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
void
|
||||||
gst_props_entry_destroy (GstPropsEntry *entry)
|
gst_props_entry_destroy (GstPropsEntry *entry)
|
||||||
{
|
{
|
||||||
switch (entry->propstype) {
|
switch (entry->propstype) {
|
||||||
|
@ -794,7 +799,7 @@ gst_props_destroy (GstProps *props)
|
||||||
/*
|
/*
|
||||||
* copy entries
|
* copy entries
|
||||||
*/
|
*/
|
||||||
static GstPropsEntry*
|
GstPropsEntry*
|
||||||
gst_props_entry_copy (GstPropsEntry *entry)
|
gst_props_entry_copy (GstPropsEntry *entry)
|
||||||
{
|
{
|
||||||
GstPropsEntry *newentry;
|
GstPropsEntry *newentry;
|
||||||
|
|
|
@ -79,6 +79,9 @@ typedef enum {
|
||||||
#define GST_PROPS_INT_ANY GST_PROPS_INT_RANGE(G_MININT,G_MAXINT)
|
#define GST_PROPS_INT_ANY GST_PROPS_INT_RANGE(G_MININT,G_MAXINT)
|
||||||
|
|
||||||
typedef struct _GstPropsEntry GstPropsEntry;
|
typedef struct _GstPropsEntry GstPropsEntry;
|
||||||
|
extern GType _gst_props_entry_type;
|
||||||
|
|
||||||
|
#define GST_TYPE_PROPS_ENTRY (_gst_props_entry_type)
|
||||||
|
|
||||||
struct _GstProps {
|
struct _GstProps {
|
||||||
gint refcount;
|
gint refcount;
|
||||||
|
@ -94,9 +97,9 @@ GstProps* gst_props_new (const gchar *firstname, ...);
|
||||||
GstProps* gst_props_newv (const gchar *firstname, va_list var_args);
|
GstProps* gst_props_newv (const gchar *firstname, va_list var_args);
|
||||||
GstProps* gst_props_empty_new (void);
|
GstProps* gst_props_empty_new (void);
|
||||||
|
|
||||||
void gst_props_unref (GstProps *props);
|
void gst_props_unref (GstProps *props);
|
||||||
void gst_props_ref (GstProps *props);
|
void gst_props_ref (GstProps *props);
|
||||||
void gst_props_destroy (GstProps *props);
|
void gst_props_destroy (GstProps *props);
|
||||||
|
|
||||||
void gst_props_debug (GstProps *props);
|
void gst_props_debug (GstProps *props);
|
||||||
|
|
||||||
|
@ -123,6 +126,8 @@ void gst_props_add_entry (GstProps *props, GstPropsEntry *entry);
|
||||||
/* working with props entries */
|
/* working with props entries */
|
||||||
GstPropsEntry* gst_props_entry_new (const gchar *name, ...);
|
GstPropsEntry* gst_props_entry_new (const gchar *name, ...);
|
||||||
|
|
||||||
|
void gst_props_entry_destroy (GstPropsEntry *entry);
|
||||||
|
GstPropsEntry* gst_props_entry_copy (GstPropsEntry *entry);
|
||||||
GstPropsType gst_props_entry_get_type (const GstPropsEntry *entry);
|
GstPropsType gst_props_entry_get_type (const GstPropsEntry *entry);
|
||||||
const gchar* gst_props_entry_get_name (const GstPropsEntry *entry);
|
const gchar* gst_props_entry_get_name (const GstPropsEntry *entry);
|
||||||
gboolean gst_props_entry_is_fixed (const GstPropsEntry *entry);
|
gboolean gst_props_entry_is_fixed (const GstPropsEntry *entry);
|
||||||
|
|
Loading…
Reference in a new issue