mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-27 04:01:08 +00:00
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
This commit is contained in:
parent
d455b29db4
commit
dfb244fb50
2 changed files with 34 additions and 10 deletions
|
@ -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)
|
||||
{
|
||||
}
|
||||
|
||||
|
|
|
@ -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);
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue