mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-04 05:22:30 +00:00
pbutils: use GObject as the base class
We can't subclass miniobject so use GObject as the base class,
This commit is contained in:
parent
65ba216b8c
commit
b967bf531b
8 changed files with 74 additions and 80 deletions
|
@ -133,7 +133,7 @@
|
||||||
|
|
||||||
struct _GstEncodingProfile
|
struct _GstEncodingProfile
|
||||||
{
|
{
|
||||||
GstMiniObject parent;
|
GObject parent;
|
||||||
|
|
||||||
/*< public > */
|
/*< public > */
|
||||||
gchar *name;
|
gchar *name;
|
||||||
|
@ -165,8 +165,7 @@ gst_encoding_profile_get_type (void)
|
||||||
static volatile gsize g_define_type_id__volatile = 0;
|
static volatile gsize g_define_type_id__volatile = 0;
|
||||||
|
|
||||||
if (g_once_init_enter (&g_define_type_id__volatile)) {
|
if (g_once_init_enter (&g_define_type_id__volatile)) {
|
||||||
GType g_define_type_id =
|
GType g_define_type_id = g_type_register_static_simple (G_TYPE_OBJECT,
|
||||||
g_type_register_static_simple (GST_TYPE_MINI_OBJECT,
|
|
||||||
g_intern_static_string ("GstEncodingProfile"),
|
g_intern_static_string ("GstEncodingProfile"),
|
||||||
sizeof (GstEncodingProfileClass),
|
sizeof (GstEncodingProfileClass),
|
||||||
(GClassInitFunc) gst_encoding_profile_class_intern_init,
|
(GClassInitFunc) gst_encoding_profile_class_intern_init,
|
||||||
|
@ -194,8 +193,9 @@ gst_encoding_profile_get_type (void)
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
gst_encoding_profile_finalize (GstEncodingProfile * prof)
|
gst_encoding_profile_finalize (GObject * object)
|
||||||
{
|
{
|
||||||
|
GstEncodingProfile *prof = (GstEncodingProfile *) object;
|
||||||
if (prof->name)
|
if (prof->name)
|
||||||
g_free (prof->name);
|
g_free (prof->name);
|
||||||
if (prof->format)
|
if (prof->format)
|
||||||
|
@ -209,10 +209,9 @@ gst_encoding_profile_finalize (GstEncodingProfile * prof)
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
gst_encoding_profile_class_init (GstMiniObjectClass * klass)
|
gst_encoding_profile_class_init (GObjectClass * klass)
|
||||||
{
|
{
|
||||||
klass->finalize =
|
klass->finalize = gst_encoding_profile_finalize;
|
||||||
(GstMiniObjectFinalizeFunction) gst_encoding_profile_finalize;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -432,20 +431,21 @@ gst_encoding_container_profile_init (GstEncodingContainerProfile * prof)
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
gst_encoding_container_profile_finalize (GstEncodingContainerProfile * prof)
|
gst_encoding_container_profile_finalize (GObject * object)
|
||||||
{
|
{
|
||||||
|
GstEncodingContainerProfile *prof = (GstEncodingContainerProfile *) object;
|
||||||
|
|
||||||
g_list_foreach (prof->encodingprofiles, (GFunc) gst_mini_object_unref, NULL);
|
g_list_foreach (prof->encodingprofiles, (GFunc) gst_mini_object_unref, NULL);
|
||||||
g_list_free (prof->encodingprofiles);
|
g_list_free (prof->encodingprofiles);
|
||||||
|
|
||||||
GST_MINI_OBJECT_CLASS (gst_encoding_container_profile_parent_class)->finalize
|
G_OBJECT_CLASS (gst_encoding_container_profile_parent_class)->finalize
|
||||||
((GstMiniObject *) prof);
|
((GObject *) prof);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
gst_encoding_container_profile_class_init (GstMiniObjectClass * klass)
|
gst_encoding_container_profile_class_init (GObjectClass * klass)
|
||||||
{
|
{
|
||||||
klass->finalize =
|
klass->finalize = gst_encoding_container_profile_finalize;
|
||||||
(GstMiniObjectFinalizeFunction) gst_encoding_container_profile_finalize;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const GList *
|
const GList *
|
||||||
|
@ -475,7 +475,7 @@ gst_encoding_video_profile_init (GstEncodingVideoProfile * prof)
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
gst_encoding_video_profile_class_init (GstMiniObjectClass * klass)
|
gst_encoding_video_profile_class_init (GObjectClass * klass)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -562,7 +562,7 @@ gst_encoding_audio_profile_init (GstEncodingAudioProfile * prof)
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
gst_encoding_audio_profile_class_init (GstMiniObjectClass * klass)
|
gst_encoding_audio_profile_class_init (GObjectClass * klass)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -688,7 +688,7 @@ common_creation (GType objtype, GstCaps * format, const gchar * preset,
|
||||||
{
|
{
|
||||||
GstEncodingProfile *prof;
|
GstEncodingProfile *prof;
|
||||||
|
|
||||||
prof = (GstEncodingProfile *) gst_mini_object_new (objtype);
|
prof = (GstEncodingProfile *) g_object_new (objtype, NULL);
|
||||||
|
|
||||||
if (name)
|
if (name)
|
||||||
prof->name = g_strdup (name);
|
prof->name = g_strdup (name);
|
||||||
|
@ -947,7 +947,7 @@ string_to_profile_transform (const GValue * src_value, GValue * dest_value)
|
||||||
profile = combo_search (profilename);
|
profile = combo_search (profilename);
|
||||||
|
|
||||||
if (profile)
|
if (profile)
|
||||||
gst_value_take_mini_object (dest_value, (GstMiniObject *) profile);
|
g_value_take_object (dest_value, (GObject *) profile);
|
||||||
}
|
}
|
||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
|
@ -958,7 +958,7 @@ gst_encoding_profile_deserialize_valfunc (GValue * value, const gchar * s)
|
||||||
profile = combo_search (s);
|
profile = combo_search (s);
|
||||||
|
|
||||||
if (profile) {
|
if (profile) {
|
||||||
gst_value_take_mini_object (value, (GstMiniObject *) profile);
|
g_value_take_object (value, (GObject *) profile);
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -43,7 +43,7 @@ G_BEGIN_DECLS
|
||||||
#define GST_IS_ENCODING_PROFILE(obj) \
|
#define GST_IS_ENCODING_PROFILE(obj) \
|
||||||
(G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_ENCODING_PROFILE))
|
(G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_ENCODING_PROFILE))
|
||||||
typedef struct _GstEncodingProfile GstEncodingProfile;
|
typedef struct _GstEncodingProfile GstEncodingProfile;
|
||||||
typedef GstMiniObjectClass GstEncodingProfileClass;
|
typedef GObjectClass GstEncodingProfileClass;
|
||||||
GType gst_encoding_profile_get_type (void);
|
GType gst_encoding_profile_get_type (void);
|
||||||
|
|
||||||
|
|
||||||
|
@ -115,7 +115,7 @@ GType gst_encoding_audio_profile_get_type (void);
|
||||||
*
|
*
|
||||||
* Since: 0.10.32
|
* Since: 0.10.32
|
||||||
*/
|
*/
|
||||||
#define gst_encoding_profile_unref(profile) (gst_mini_object_unref ((GstMiniObject*) profile))
|
#define gst_encoding_profile_unref(profile) (g_object_unref ((GObject*) profile))
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* gst_encoding_profile_ref:
|
* gst_encoding_profile_ref:
|
||||||
|
@ -125,7 +125,7 @@ GType gst_encoding_audio_profile_get_type (void);
|
||||||
*
|
*
|
||||||
* Since: 0.10.32
|
* Since: 0.10.32
|
||||||
*/
|
*/
|
||||||
#define gst_encoding_profile_ref(profile) (gst_mini_object_ref ((GstMiniObject*) profile))
|
#define gst_encoding_profile_ref(profile) (g_object_ref ((GObject*) profile))
|
||||||
|
|
||||||
const gchar * gst_encoding_profile_get_name(GstEncodingProfile *profile);
|
const gchar * gst_encoding_profile_get_name(GstEncodingProfile *profile);
|
||||||
const gchar * gst_encoding_profile_get_description(GstEncodingProfile *profile);
|
const gchar * gst_encoding_profile_get_description(GstEncodingProfile *profile);
|
||||||
|
|
|
@ -74,7 +74,7 @@
|
||||||
|
|
||||||
struct _GstEncodingTarget
|
struct _GstEncodingTarget
|
||||||
{
|
{
|
||||||
GstMiniObject parent;
|
GObject parent;
|
||||||
|
|
||||||
gchar *name;
|
gchar *name;
|
||||||
gchar *category;
|
gchar *category;
|
||||||
|
@ -85,7 +85,7 @@ struct _GstEncodingTarget
|
||||||
gchar *keyfile;
|
gchar *keyfile;
|
||||||
};
|
};
|
||||||
|
|
||||||
G_DEFINE_TYPE (GstEncodingTarget, gst_encoding_target, GST_TYPE_MINI_OBJECT);
|
G_DEFINE_TYPE (GstEncodingTarget, gst_encoding_target, G_TYPE_OBJECT);
|
||||||
|
|
||||||
static void
|
static void
|
||||||
gst_encoding_target_init (GstEncodingTarget * target)
|
gst_encoding_target_init (GstEncodingTarget * target)
|
||||||
|
@ -94,8 +94,10 @@ gst_encoding_target_init (GstEncodingTarget * target)
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
gst_encoding_target_finalize (GstEncodingTarget * target)
|
gst_encoding_target_finalize (GObject * object)
|
||||||
{
|
{
|
||||||
|
GstEncodingTarget *target = (GstEncodingTarget *) object;
|
||||||
|
|
||||||
GST_DEBUG ("Finalizing");
|
GST_DEBUG ("Finalizing");
|
||||||
|
|
||||||
if (target->name)
|
if (target->name)
|
||||||
|
@ -110,10 +112,9 @@ gst_encoding_target_finalize (GstEncodingTarget * target)
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
gst_encoding_target_class_init (GstMiniObjectClass * klass)
|
gst_encoding_target_class_init (GObjectClass * klass)
|
||||||
{
|
{
|
||||||
klass->finalize =
|
klass->finalize = gst_encoding_target_finalize;
|
||||||
(GstMiniObjectFinalizeFunction) gst_encoding_target_finalize;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -281,7 +282,7 @@ gst_encoding_target_new (const gchar * name, const gchar * category,
|
||||||
if (!validate_name (category))
|
if (!validate_name (category))
|
||||||
goto invalid_category;
|
goto invalid_category;
|
||||||
|
|
||||||
res = (GstEncodingTarget *) gst_mini_object_new (GST_TYPE_ENCODING_TARGET);
|
res = (GstEncodingTarget *) g_object_new (GST_TYPE_ENCODING_TARGET, NULL);
|
||||||
res->name = g_strdup (name);
|
res->name = g_strdup (name);
|
||||||
res->category = g_strdup (category);
|
res->category = g_strdup (category);
|
||||||
res->description = g_strdup (description);
|
res->description = g_strdup (description);
|
||||||
|
|
|
@ -89,7 +89,7 @@ G_BEGIN_DECLS
|
||||||
(G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_ENCODING_TARGET))
|
(G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_ENCODING_TARGET))
|
||||||
|
|
||||||
typedef struct _GstEncodingTarget GstEncodingTarget;
|
typedef struct _GstEncodingTarget GstEncodingTarget;
|
||||||
typedef GstMiniObjectClass GstEncodingTargetClass;
|
typedef GObjectClass GstEncodingTargetClass;
|
||||||
|
|
||||||
GType gst_encoding_target_get_type (void);
|
GType gst_encoding_target_get_type (void);
|
||||||
|
|
||||||
|
@ -102,7 +102,7 @@ GType gst_encoding_target_get_type (void);
|
||||||
* Since: 0.10.32
|
* Since: 0.10.32
|
||||||
*/
|
*/
|
||||||
#define gst_encoding_target_unref(target) \
|
#define gst_encoding_target_unref(target) \
|
||||||
(gst_mini_object_unref ((GstMiniObject*) target))
|
(g_object_unref ((GObject*) target))
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* gst_encoding_target_ref:
|
* gst_encoding_target_ref:
|
||||||
|
@ -113,7 +113,7 @@ GType gst_encoding_target_get_type (void);
|
||||||
* Since: 0.10.32
|
* Since: 0.10.32
|
||||||
*/
|
*/
|
||||||
#define gst_encoding_target_ref(target) \
|
#define gst_encoding_target_ref(target) \
|
||||||
(gst_mini_object_ref ((GstMiniObject*) target))
|
(g_object_ref ((GObject*) target))
|
||||||
|
|
||||||
GstEncodingTarget *
|
GstEncodingTarget *
|
||||||
gst_encoding_target_new (const gchar *name, const gchar *category,
|
gst_encoding_target_new (const gchar *name, const gchar *category,
|
||||||
|
|
|
@ -42,7 +42,7 @@ static GstDiscovererVideoInfo
|
||||||
/* Per-stream information */
|
/* Per-stream information */
|
||||||
|
|
||||||
G_DEFINE_TYPE (GstDiscovererStreamInfo, gst_discoverer_stream_info,
|
G_DEFINE_TYPE (GstDiscovererStreamInfo, gst_discoverer_stream_info,
|
||||||
GST_TYPE_MINI_OBJECT);
|
G_TYPE_OBJECT);
|
||||||
|
|
||||||
static void
|
static void
|
||||||
gst_discoverer_stream_info_init (GstDiscovererStreamInfo * info)
|
gst_discoverer_stream_info_init (GstDiscovererStreamInfo * info)
|
||||||
|
@ -51,10 +51,12 @@ gst_discoverer_stream_info_init (GstDiscovererStreamInfo * info)
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
gst_discoverer_stream_info_finalize (GstDiscovererStreamInfo * info)
|
gst_discoverer_stream_info_finalize (GObject * object)
|
||||||
{
|
{
|
||||||
|
GstDiscovererStreamInfo *info = (GstDiscovererStreamInfo *) object;
|
||||||
|
|
||||||
if (info->next)
|
if (info->next)
|
||||||
gst_mini_object_unref ((GstMiniObject *) info->next);
|
g_object_unref ((GObject *) info->next);
|
||||||
|
|
||||||
if (info->caps)
|
if (info->caps)
|
||||||
gst_caps_unref (info->caps);
|
gst_caps_unref (info->caps);
|
||||||
|
@ -66,25 +68,17 @@ gst_discoverer_stream_info_finalize (GstDiscovererStreamInfo * info)
|
||||||
gst_structure_free (info->misc);
|
gst_structure_free (info->misc);
|
||||||
}
|
}
|
||||||
|
|
||||||
static GstDiscovererStreamInfo *
|
|
||||||
gst_discoverer_stream_info_copy (GstDiscovererStreamInfo * info)
|
|
||||||
{
|
|
||||||
return gst_discoverer_info_copy_int (info, NULL);
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
gst_discoverer_stream_info_class_init (GstMiniObjectClass * klass)
|
gst_discoverer_stream_info_class_init (GObjectClass * klass)
|
||||||
{
|
{
|
||||||
klass->finalize =
|
klass->finalize = gst_discoverer_stream_info_finalize;
|
||||||
(GstMiniObjectFinalizeFunction) gst_discoverer_stream_info_finalize;
|
|
||||||
klass->copy = (GstMiniObjectCopyFunction) gst_discoverer_stream_info_copy;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static GstDiscovererStreamInfo *
|
static GstDiscovererStreamInfo *
|
||||||
gst_discoverer_stream_info_new (void)
|
gst_discoverer_stream_info_new (void)
|
||||||
{
|
{
|
||||||
return (GstDiscovererStreamInfo *)
|
return (GstDiscovererStreamInfo *)
|
||||||
gst_mini_object_new (GST_TYPE_DISCOVERER_STREAM_INFO);
|
g_object_new (GST_TYPE_DISCOVERER_STREAM_INFO, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
static GstDiscovererStreamInfo *
|
static GstDiscovererStreamInfo *
|
||||||
|
@ -147,28 +141,28 @@ static GstDiscovererContainerInfo *
|
||||||
gst_discoverer_container_info_new (void)
|
gst_discoverer_container_info_new (void)
|
||||||
{
|
{
|
||||||
return (GstDiscovererContainerInfo *)
|
return (GstDiscovererContainerInfo *)
|
||||||
gst_mini_object_new (GST_TYPE_DISCOVERER_CONTAINER_INFO);
|
g_object_new (GST_TYPE_DISCOVERER_CONTAINER_INFO, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
gst_discoverer_container_info_finalize (GstDiscovererContainerInfo * info)
|
gst_discoverer_container_info_finalize (GObject * object)
|
||||||
{
|
{
|
||||||
|
GstDiscovererContainerInfo *info = (GstDiscovererContainerInfo *) object;
|
||||||
GList *tmp;
|
GList *tmp;
|
||||||
|
|
||||||
for (tmp = ((GstDiscovererContainerInfo *) info)->streams; tmp;
|
for (tmp = ((GstDiscovererContainerInfo *) info)->streams; tmp;
|
||||||
tmp = tmp->next)
|
tmp = tmp->next)
|
||||||
gst_mini_object_unref ((GstMiniObject *) tmp->data);
|
g_object_unref ((GObject *) tmp->data);
|
||||||
|
|
||||||
gst_discoverer_stream_info_list_free (info->streams);
|
gst_discoverer_stream_info_list_free (info->streams);
|
||||||
|
|
||||||
gst_discoverer_stream_info_finalize ((GstDiscovererStreamInfo *) info);
|
gst_discoverer_stream_info_finalize ((GObject *) info);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
gst_discoverer_container_info_class_init (GstMiniObjectClass * klass)
|
gst_discoverer_container_info_class_init (GObjectClass * klass)
|
||||||
{
|
{
|
||||||
klass->finalize =
|
klass->finalize = gst_discoverer_container_info_finalize;
|
||||||
(GstMiniObjectFinalizeFunction) gst_discoverer_container_info_finalize;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static GstDiscovererContainerInfo *
|
static GstDiscovererContainerInfo *
|
||||||
|
@ -214,7 +208,7 @@ static GstDiscovererAudioInfo *
|
||||||
gst_discoverer_audio_info_new (void)
|
gst_discoverer_audio_info_new (void)
|
||||||
{
|
{
|
||||||
return (GstDiscovererAudioInfo *)
|
return (GstDiscovererAudioInfo *)
|
||||||
gst_mini_object_new (GST_TYPE_DISCOVERER_AUDIO_INFO);
|
g_object_new (GST_TYPE_DISCOVERER_AUDIO_INFO, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
static GstDiscovererAudioInfo *
|
static GstDiscovererAudioInfo *
|
||||||
|
@ -238,7 +232,7 @@ G_DEFINE_TYPE (GstDiscovererVideoInfo, gst_discoverer_video_info,
|
||||||
GST_TYPE_DISCOVERER_STREAM_INFO);
|
GST_TYPE_DISCOVERER_STREAM_INFO);
|
||||||
|
|
||||||
static void
|
static void
|
||||||
gst_discoverer_video_info_class_init (GstMiniObjectClass * klass)
|
gst_discoverer_video_info_class_init (GObjectClass * klass)
|
||||||
{
|
{
|
||||||
/* Nothing to initialize */
|
/* Nothing to initialize */
|
||||||
}
|
}
|
||||||
|
@ -253,7 +247,7 @@ static GstDiscovererVideoInfo *
|
||||||
gst_discoverer_video_info_new (void)
|
gst_discoverer_video_info_new (void)
|
||||||
{
|
{
|
||||||
return (GstDiscovererVideoInfo *)
|
return (GstDiscovererVideoInfo *)
|
||||||
gst_mini_object_new (GST_TYPE_DISCOVERER_VIDEO_INFO);
|
g_object_new (GST_TYPE_DISCOVERER_VIDEO_INFO, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
static GstDiscovererVideoInfo *
|
static GstDiscovererVideoInfo *
|
||||||
|
@ -279,7 +273,7 @@ gst_discoverer_video_info_copy_int (GstDiscovererVideoInfo * ptr)
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Global stream information */
|
/* Global stream information */
|
||||||
G_DEFINE_TYPE (GstDiscovererInfo, gst_discoverer_info, GST_TYPE_MINI_OBJECT);
|
G_DEFINE_TYPE (GstDiscovererInfo, gst_discoverer_info, G_TYPE_OBJECT);
|
||||||
|
|
||||||
static void
|
static void
|
||||||
gst_discoverer_info_init (GstDiscovererInfo * info)
|
gst_discoverer_info_init (GstDiscovererInfo * info)
|
||||||
|
@ -288,12 +282,13 @@ gst_discoverer_info_init (GstDiscovererInfo * info)
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
gst_discoverer_info_finalize (GstDiscovererInfo * info)
|
gst_discoverer_info_finalize (GObject * object)
|
||||||
{
|
{
|
||||||
|
GstDiscovererInfo *info = (GstDiscovererInfo *) object;
|
||||||
g_free (info->uri);
|
g_free (info->uri);
|
||||||
|
|
||||||
if (info->stream_info)
|
if (info->stream_info)
|
||||||
gst_mini_object_unref ((GstMiniObject *) info->stream_info);
|
g_object_unref ((GObject *) info->stream_info);
|
||||||
|
|
||||||
if (info->misc)
|
if (info->misc)
|
||||||
gst_structure_free (info->misc);
|
gst_structure_free (info->misc);
|
||||||
|
@ -307,7 +302,7 @@ gst_discoverer_info_finalize (GstDiscovererInfo * info)
|
||||||
static GstDiscovererInfo *
|
static GstDiscovererInfo *
|
||||||
gst_discoverer_info_new (void)
|
gst_discoverer_info_new (void)
|
||||||
{
|
{
|
||||||
return (GstDiscovererInfo *) gst_mini_object_new (GST_TYPE_DISCOVERER_INFO);
|
return (GstDiscovererInfo *) g_object_new (GST_TYPE_DISCOVERER_INFO, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
GstDiscovererInfo *
|
GstDiscovererInfo *
|
||||||
|
@ -350,11 +345,9 @@ gst_discoverer_info_copy (GstDiscovererInfo * ptr)
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
gst_discoverer_info_class_init (GstMiniObjectClass * klass)
|
gst_discoverer_info_class_init (GObjectClass * klass)
|
||||||
{
|
{
|
||||||
klass->finalize =
|
klass->finalize = gst_discoverer_info_finalize;
|
||||||
(GstMiniObjectFinalizeFunction) gst_discoverer_info_finalize;
|
|
||||||
klass->copy = (GstMiniObjectCopyFunction) gst_discoverer_info_copy;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -597,7 +597,7 @@ collect_information (GstDiscoverer * dc, const GstStructure * st,
|
||||||
return parent;
|
return parent;
|
||||||
else
|
else
|
||||||
return (GstDiscovererStreamInfo *)
|
return (GstDiscovererStreamInfo *)
|
||||||
gst_mini_object_new (GST_TYPE_DISCOVERER_STREAM_INFO);
|
g_object_new (GST_TYPE_DISCOVERER_STREAM_INFO, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
gst_structure_id_get (st, _CAPS_QUARK, GST_TYPE_CAPS, &caps, NULL);
|
gst_structure_id_get (st, _CAPS_QUARK, GST_TYPE_CAPS, &caps, NULL);
|
||||||
|
@ -611,7 +611,7 @@ collect_information (GstDiscoverer * dc, const GstStructure * st,
|
||||||
info = (GstDiscovererAudioInfo *) parent;
|
info = (GstDiscovererAudioInfo *) parent;
|
||||||
else {
|
else {
|
||||||
info = (GstDiscovererAudioInfo *)
|
info = (GstDiscovererAudioInfo *)
|
||||||
gst_mini_object_new (GST_TYPE_DISCOVERER_AUDIO_INFO);
|
g_object_new (GST_TYPE_DISCOVERER_AUDIO_INFO, NULL);
|
||||||
info->parent.caps = caps;
|
info->parent.caps = caps;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -652,7 +652,7 @@ collect_information (GstDiscoverer * dc, const GstStructure * st,
|
||||||
info = (GstDiscovererVideoInfo *) parent;
|
info = (GstDiscovererVideoInfo *) parent;
|
||||||
else {
|
else {
|
||||||
info = (GstDiscovererVideoInfo *)
|
info = (GstDiscovererVideoInfo *)
|
||||||
gst_mini_object_new (GST_TYPE_DISCOVERER_VIDEO_INFO);
|
g_object_new (GST_TYPE_DISCOVERER_VIDEO_INFO, NULL);
|
||||||
info->parent.caps = caps;
|
info->parent.caps = caps;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -703,7 +703,7 @@ collect_information (GstDiscoverer * dc, const GstStructure * st,
|
||||||
info = parent;
|
info = parent;
|
||||||
else {
|
else {
|
||||||
info = (GstDiscovererStreamInfo *)
|
info = (GstDiscovererStreamInfo *)
|
||||||
gst_mini_object_new (GST_TYPE_DISCOVERER_STREAM_INFO);
|
g_object_new (GST_TYPE_DISCOVERER_STREAM_INFO, NULL);
|
||||||
info->caps = caps;
|
info->caps = caps;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -866,7 +866,7 @@ parse_stream_topology (GstDiscoverer * dc, const GstStructure * topology,
|
||||||
GST_DEBUG ("next is a list of %d entries", len);
|
GST_DEBUG ("next is a list of %d entries", len);
|
||||||
|
|
||||||
cont = (GstDiscovererContainerInfo *)
|
cont = (GstDiscovererContainerInfo *)
|
||||||
gst_mini_object_new (GST_TYPE_DISCOVERER_CONTAINER_INFO);
|
g_object_new (GST_TYPE_DISCOVERER_CONTAINER_INFO, NULL);
|
||||||
cont->parent.caps = caps;
|
cont->parent.caps = caps;
|
||||||
res = (GstDiscovererStreamInfo *) cont;
|
res = (GstDiscovererStreamInfo *) cont;
|
||||||
|
|
||||||
|
@ -1143,7 +1143,7 @@ _setup_locked (GstDiscoverer * dc)
|
||||||
|
|
||||||
/* Pop URI off the pending URI list */
|
/* Pop URI off the pending URI list */
|
||||||
dc->priv->current_info =
|
dc->priv->current_info =
|
||||||
(GstDiscovererInfo *) gst_mini_object_new (GST_TYPE_DISCOVERER_INFO);
|
(GstDiscovererInfo *) g_object_new (GST_TYPE_DISCOVERER_INFO, NULL);
|
||||||
dc->priv->current_info->uri = (gchar *) dc->priv->pending_uris->data;
|
dc->priv->current_info->uri = (gchar *) dc->priv->pending_uris->data;
|
||||||
dc->priv->pending_uris =
|
dc->priv->pending_uris =
|
||||||
g_list_delete_link (dc->priv->pending_uris, dc->priv->pending_uris);
|
g_list_delete_link (dc->priv->pending_uris, dc->priv->pending_uris);
|
||||||
|
|
|
@ -32,7 +32,7 @@ G_BEGIN_DECLS
|
||||||
#define GST_IS_DISCOVERER_STREAM_INFO(obj) \
|
#define GST_IS_DISCOVERER_STREAM_INFO(obj) \
|
||||||
(G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_DISCOVERER_STREAM_INFO))
|
(G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_DISCOVERER_STREAM_INFO))
|
||||||
typedef struct _GstDiscovererStreamInfo GstDiscovererStreamInfo;
|
typedef struct _GstDiscovererStreamInfo GstDiscovererStreamInfo;
|
||||||
typedef GstMiniObjectClass GstDiscovererStreamInfoClass;
|
typedef GObjectClass GstDiscovererStreamInfoClass;
|
||||||
GType gst_discoverer_stream_info_get_type (void);
|
GType gst_discoverer_stream_info_get_type (void);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -56,8 +56,8 @@ GType gst_discoverer_stream_info_get_type (void);
|
||||||
*
|
*
|
||||||
* Since: 0.10.31
|
* Since: 0.10.31
|
||||||
*/
|
*/
|
||||||
#define gst_discoverer_stream_info_ref(info) ((GstDiscovererStreamInfo*) gst_mini_object_ref((GstMiniObject*) info))
|
#define gst_discoverer_stream_info_ref(info) ((GstDiscovererStreamInfo*) g_object_ref((GObject*) info))
|
||||||
#define gst_discoverer_stream_info_unref(info) (gst_mini_object_unref((GstMiniObject*) info))
|
#define gst_discoverer_stream_info_unref(info) (g_object_unref((GObject*) info))
|
||||||
|
|
||||||
GstDiscovererStreamInfo* gst_discoverer_stream_info_get_previous(GstDiscovererStreamInfo* info);
|
GstDiscovererStreamInfo* gst_discoverer_stream_info_get_previous(GstDiscovererStreamInfo* info);
|
||||||
GstDiscovererStreamInfo* gst_discoverer_stream_info_get_next(GstDiscovererStreamInfo* info);
|
GstDiscovererStreamInfo* gst_discoverer_stream_info_get_next(GstDiscovererStreamInfo* info);
|
||||||
|
@ -80,7 +80,7 @@ const gchar * gst_discoverer_stream_info_get_stream_type_nick(GstDisc
|
||||||
#define GST_IS_DISCOVERER_CONTAINER_INFO(obj) \
|
#define GST_IS_DISCOVERER_CONTAINER_INFO(obj) \
|
||||||
(G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_DISCOVERER_CONTAINER_INFO))
|
(G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_DISCOVERER_CONTAINER_INFO))
|
||||||
typedef struct _GstDiscovererContainerInfo GstDiscovererContainerInfo;
|
typedef struct _GstDiscovererContainerInfo GstDiscovererContainerInfo;
|
||||||
typedef GstMiniObjectClass GstDiscovererContainerInfoClass;
|
typedef GObjectClass GstDiscovererContainerInfoClass;
|
||||||
|
|
||||||
GType gst_discoverer_container_info_get_type (void);
|
GType gst_discoverer_container_info_get_type (void);
|
||||||
|
|
||||||
|
@ -101,7 +101,7 @@ GList *gst_discoverer_container_info_get_streams(GstDiscovererContainerInfo *inf
|
||||||
#define GST_IS_DISCOVERER_AUDIO_INFO(obj) \
|
#define GST_IS_DISCOVERER_AUDIO_INFO(obj) \
|
||||||
(G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_DISCOVERER_AUDIO_INFO))
|
(G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_DISCOVERER_AUDIO_INFO))
|
||||||
typedef struct _GstDiscovererAudioInfo GstDiscovererAudioInfo;
|
typedef struct _GstDiscovererAudioInfo GstDiscovererAudioInfo;
|
||||||
typedef GstMiniObjectClass GstDiscovererAudioInfoClass;
|
typedef GObjectClass GstDiscovererAudioInfoClass;
|
||||||
|
|
||||||
GType gst_discoverer_audio_info_get_type (void);
|
GType gst_discoverer_audio_info_get_type (void);
|
||||||
|
|
||||||
|
@ -125,7 +125,7 @@ guint gst_discoverer_audio_info_get_max_bitrate(const GstDiscovererAudioInfo* in
|
||||||
#define GST_IS_DISCOVERER_VIDEO_INFO(obj) \
|
#define GST_IS_DISCOVERER_VIDEO_INFO(obj) \
|
||||||
(G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_DISCOVERER_VIDEO_INFO))
|
(G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_DISCOVERER_VIDEO_INFO))
|
||||||
typedef struct _GstDiscovererVideoInfo GstDiscovererVideoInfo;
|
typedef struct _GstDiscovererVideoInfo GstDiscovererVideoInfo;
|
||||||
typedef GstMiniObjectClass GstDiscovererVideoInfoClass;
|
typedef GObjectClass GstDiscovererVideoInfoClass;
|
||||||
GType gst_discoverer_video_info_get_type (void);
|
GType gst_discoverer_video_info_get_type (void);
|
||||||
|
|
||||||
guint gst_discoverer_video_info_get_width(const GstDiscovererVideoInfo* info);
|
guint gst_discoverer_video_info_get_width(const GstDiscovererVideoInfo* info);
|
||||||
|
@ -178,11 +178,11 @@ typedef struct _GstDiscovererInfo GstDiscovererInfo;
|
||||||
(G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_DISCOVERER_INFO, GstDiscovererInfo))
|
(G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_DISCOVERER_INFO, GstDiscovererInfo))
|
||||||
#define GST_IS_DISCOVERER_INFO(obj) \
|
#define GST_IS_DISCOVERER_INFO(obj) \
|
||||||
(G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_DISCOVERER_INFO))
|
(G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_DISCOVERER_INFO))
|
||||||
typedef GstMiniObjectClass GstDiscovererInfoClass;
|
typedef GObjectClass GstDiscovererInfoClass;
|
||||||
GType gst_discoverer_info_get_type (void);
|
GType gst_discoverer_info_get_type (void);
|
||||||
|
|
||||||
#define gst_discoverer_info_unref(info) (gst_mini_object_unref((GstMiniObject*)info))
|
#define gst_discoverer_info_unref(info) (g_object_unref((GObject*)info))
|
||||||
#define gst_discoverer_info_ref(info) (gst_mini_object_ref((GstMiniObject*)info))
|
#define gst_discoverer_info_ref(info) (g_object_ref((Gbject*)info))
|
||||||
|
|
||||||
GstDiscovererInfo* gst_discoverer_info_copy (GstDiscovererInfo * ptr);
|
GstDiscovererInfo* gst_discoverer_info_copy (GstDiscovererInfo * ptr);
|
||||||
|
|
||||||
|
|
|
@ -19,7 +19,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
struct _GstDiscovererStreamInfo {
|
struct _GstDiscovererStreamInfo {
|
||||||
GstMiniObject parent;
|
GObject parent;
|
||||||
|
|
||||||
GstDiscovererStreamInfo *previous; /* NULL for starting points */
|
GstDiscovererStreamInfo *previous; /* NULL for starting points */
|
||||||
GstDiscovererStreamInfo *next; /* NULL for containers */
|
GstDiscovererStreamInfo *next; /* NULL for containers */
|
||||||
|
@ -65,7 +65,7 @@ struct _GstDiscovererVideoInfo {
|
||||||
};
|
};
|
||||||
|
|
||||||
struct _GstDiscovererInfo {
|
struct _GstDiscovererInfo {
|
||||||
GstMiniObject parent;
|
GObject parent;
|
||||||
|
|
||||||
gchar *uri;
|
gchar *uri;
|
||||||
GstDiscovererResult result;
|
GstDiscovererResult result;
|
||||||
|
|
Loading…
Reference in a new issue