summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim-Philipp Müller <tim.muller@collabora.co.uk>2012-03-14 14:51:22 +0000
committerTim-Philipp Müller <tim.muller@collabora.co.uk>2012-03-20 10:51:53 +0000
commitdfb244fb507163c71bd99a78ad6b9e05a0f5030c (patch)
treea07d0bcf6db3a4f4b2759818d077a9d270a8b6f3
parentd455b29db4f8dc4a1cc6ad826822eeeb10fa9210 (diff)
downloadgstreamer-plugins-base-dfb244fb507163c71bd99a78ad6b9e05a0f5030c.tar.gz
pbutils: make encoding profile classes opaque
Don't typedef them to GObjectClass directly, but hide behind private structs. Fixes issues with gobject-introspection and GstEncodingProfileClass. https://bugzilla.gnome.org/show_bug.cgi?id=668542
-rw-r--r--gst-libs/gst/pbutils/encoding-profile.c36
-rw-r--r--gst-libs/gst/pbutils/encoding-profile.h8
2 files changed, 34 insertions, 10 deletions
diff --git a/gst-libs/gst/pbutils/encoding-profile.c b/gst-libs/gst/pbutils/encoding-profile.c
index 93cc58d6e..41a8b3442 100644
--- a/gst-libs/gst/pbutils/encoding-profile.c
+++ b/gst-libs/gst/pbutils/encoding-profile.c
@@ -144,6 +144,11 @@ struct _GstEncodingProfile
GstCaps *restriction;
};
+struct _GstEncodingProfileClass
+{
+ GObjectClass parent_class;
+};
+
static void string_to_profile_transform (const GValue * src_value,
GValue * dest_value);
static gboolean gst_encoding_profile_deserialize_valfunc (GValue * value,
@@ -209,9 +214,11 @@ gst_encoding_profile_finalize (GObject * object)
}
static void
-gst_encoding_profile_class_init (GObjectClass * klass)
+gst_encoding_profile_class_init (GstEncodingProfileClass * klass)
{
- klass->finalize = gst_encoding_profile_finalize;
+ GObjectClass *gobject_class = (GObjectClass *) klass;
+
+ gobject_class->finalize = gst_encoding_profile_finalize;
}
/**
@@ -422,6 +429,11 @@ struct _GstEncodingContainerProfile
GList *encodingprofiles;
};
+struct _GstEncodingContainerProfileClass
+{
+ GstEncodingProfileClass parent;
+};
+
G_DEFINE_TYPE (GstEncodingContainerProfile, gst_encoding_container_profile,
GST_TYPE_ENCODING_PROFILE);
@@ -444,9 +456,11 @@ gst_encoding_container_profile_finalize (GObject * object)
}
static void
-gst_encoding_container_profile_class_init (GObjectClass * klass)
+gst_encoding_container_profile_class_init (GstEncodingContainerProfileClass * k)
{
- klass->finalize = gst_encoding_container_profile_finalize;
+ GObjectClass *gobject_class = (GObjectClass *) k;
+
+ gobject_class->finalize = gst_encoding_container_profile_finalize;
}
/**
@@ -473,6 +487,11 @@ struct _GstEncodingVideoProfile
gboolean variableframerate;
};
+struct _GstEncodingVideoProfileClass
+{
+ GstEncodingProfileClass parent;
+};
+
G_DEFINE_TYPE (GstEncodingVideoProfile, gst_encoding_video_profile,
GST_TYPE_ENCODING_PROFILE);
@@ -483,7 +502,7 @@ gst_encoding_video_profile_init (GstEncodingVideoProfile * prof)
}
static void
-gst_encoding_video_profile_class_init (GObjectClass * klass)
+gst_encoding_video_profile_class_init (GstEncodingVideoProfileClass * klass)
{
}
@@ -562,6 +581,11 @@ struct _GstEncodingAudioProfile
GstEncodingProfile parent;
};
+struct _GstEncodingAudioProfileClass
+{
+ GstEncodingProfileClass parent;
+};
+
G_DEFINE_TYPE (GstEncodingAudioProfile, gst_encoding_audio_profile,
GST_TYPE_ENCODING_PROFILE);
@@ -572,7 +596,7 @@ gst_encoding_audio_profile_init (GstEncodingAudioProfile * prof)
}
static void
-gst_encoding_audio_profile_class_init (GObjectClass * klass)
+gst_encoding_audio_profile_class_init (GstEncodingAudioProfileClass * klass)
{
}
diff --git a/gst-libs/gst/pbutils/encoding-profile.h b/gst-libs/gst/pbutils/encoding-profile.h
index f227ffcb8..e8c5c9288 100644
--- a/gst-libs/gst/pbutils/encoding-profile.h
+++ b/gst-libs/gst/pbutils/encoding-profile.h
@@ -44,7 +44,7 @@ G_BEGIN_DECLS
#define GST_IS_ENCODING_PROFILE(obj) \
(G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_ENCODING_PROFILE))
typedef struct _GstEncodingProfile GstEncodingProfile;
-typedef GObjectClass GstEncodingProfileClass;
+typedef struct _GstEncodingProfileClass GstEncodingProfileClass;
GType gst_encoding_profile_get_type (void);
@@ -63,7 +63,7 @@ GType gst_encoding_profile_get_type (void);
#define GST_IS_ENCODING_CONTAINER_PROFILE(obj) \
(G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_ENCODING_CONTAINER_PROFILE))
typedef struct _GstEncodingContainerProfile GstEncodingContainerProfile;
-typedef GstEncodingProfileClass GstEncodingContainerProfileClass;
+typedef struct _GstEncodingContainerProfileClass GstEncodingContainerProfileClass;
GType gst_encoding_container_profile_get_type (void);
@@ -82,7 +82,7 @@ GType gst_encoding_container_profile_get_type (void);
#define GST_IS_ENCODING_VIDEO_PROFILE(obj) \
(G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_ENCODING_VIDEO_PROFILE))
typedef struct _GstEncodingVideoProfile GstEncodingVideoProfile;
-typedef GstEncodingProfileClass GstEncodingVideoProfileClass;
+typedef struct _GstEncodingVideoProfileClass GstEncodingVideoProfileClass;
GType gst_encoding_video_profile_get_type (void);
@@ -101,7 +101,7 @@ GType gst_encoding_video_profile_get_type (void);
#define GST_IS_ENCODING_AUDIO_PROFILE(obj) \
(G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_ENCODING_AUDIO_PROFILE))
typedef struct _GstEncodingAudioProfile GstEncodingAudioProfile;
-typedef GstEncodingProfileClass GstEncodingAudioProfileClass;
+typedef struct _GstEncodingAudioProfileClass GstEncodingAudioProfileClass;
GType gst_encoding_audio_profile_get_type (void);