diff options
author | Thomas Vander Stichele <thomas@apestaart.org> | 2004-03-14 22:34:33 +0000 |
---|---|---|
committer | Thomas Vander Stichele <thomas@apestaart.org> | 2004-03-14 22:34:33 +0000 |
commit | 7a778ee4b7ec09a1f5b2185c9cceee3910dfbdf2 (patch) | |
tree | f863b467dea9559a6ec9c48affbfae11f8104164 /gst-libs/gst/tuner | |
parent | a19db4bbdc4a15ea0d8f4d28e9a1302c9c3d1657 (diff) | |
download | gst-plugins-bad-7a778ee4b7ec09a1f5b2185c9cceee3910dfbdf2.tar.gz gst-plugins-bad-7a778ee4b7ec09a1f5b2185c9cceee3910dfbdf2.tar.bz2 gst-plugins-bad-7a778ee4b7ec09a1f5b2185c9cceee3910dfbdf2.zip |
gst-indent
Original commit message from CVS:
gst-indent
Diffstat (limited to 'gst-libs/gst/tuner')
-rw-r--r-- | gst-libs/gst/tuner/tuner.c | 133 | ||||
-rw-r--r-- | gst-libs/gst/tuner/tuner.h | 107 | ||||
-rw-r--r-- | gst-libs/gst/tuner/tunerchannel.c | 40 | ||||
-rw-r--r-- | gst-libs/gst/tuner/tunerchannel.h | 38 | ||||
-rw-r--r-- | gst-libs/gst/tuner/tunernorm.c | 19 | ||||
-rw-r--r-- | gst-libs/gst/tuner/tunernorm.h | 15 |
6 files changed, 151 insertions, 201 deletions
diff --git a/gst-libs/gst/tuner/tuner.c b/gst-libs/gst/tuner/tuner.c index 1181bc13..fd1c354f 100644 --- a/gst-libs/gst/tuner/tuner.c +++ b/gst-libs/gst/tuner/tuner.c @@ -28,7 +28,8 @@ #include <string.h> -enum { +enum +{ NORM_CHANGED, CHANNEL_CHANGED, FREQUENCY_CHANGED, @@ -36,7 +37,7 @@ enum { LAST_SIGNAL }; -static void gst_tuner_class_init (GstTunerClass *klass); +static void gst_tuner_class_init (GstTunerClass * klass); static guint gst_tuner_signals[LAST_SIGNAL] = { 0 }; @@ -59,49 +60,47 @@ gst_tuner_get_type (void) }; gst_tuner_type = g_type_register_static (G_TYPE_INTERFACE, - "GstTuner", - &gst_tuner_info, 0); + "GstTuner", &gst_tuner_info, 0); g_type_interface_add_prerequisite (gst_tuner_type, - GST_TYPE_IMPLEMENTS_INTERFACE); + GST_TYPE_IMPLEMENTS_INTERFACE); } return gst_tuner_type; } static void -gst_tuner_class_init (GstTunerClass *klass) +gst_tuner_class_init (GstTunerClass * klass) { static gboolean initialized = FALSE; if (!initialized) { gst_tuner_signals[NORM_CHANGED] = - g_signal_new ("norm-changed", - GST_TYPE_TUNER, G_SIGNAL_RUN_LAST, - G_STRUCT_OFFSET (GstTunerClass, norm_changed), - NULL, NULL, - g_cclosure_marshal_VOID__OBJECT, G_TYPE_NONE, 1, - GST_TYPE_TUNER_NORM); + g_signal_new ("norm-changed", + GST_TYPE_TUNER, G_SIGNAL_RUN_LAST, + G_STRUCT_OFFSET (GstTunerClass, norm_changed), + NULL, NULL, + g_cclosure_marshal_VOID__OBJECT, G_TYPE_NONE, 1, GST_TYPE_TUNER_NORM); gst_tuner_signals[CHANNEL_CHANGED] = - g_signal_new ("channel-changed", - GST_TYPE_TUNER, G_SIGNAL_RUN_LAST, - G_STRUCT_OFFSET (GstTunerClass, channel_changed), - NULL, NULL, - g_cclosure_marshal_VOID__OBJECT, G_TYPE_NONE, 1, - GST_TYPE_TUNER_CHANNEL); + g_signal_new ("channel-changed", + GST_TYPE_TUNER, G_SIGNAL_RUN_LAST, + G_STRUCT_OFFSET (GstTunerClass, channel_changed), + NULL, NULL, + g_cclosure_marshal_VOID__OBJECT, G_TYPE_NONE, 1, + GST_TYPE_TUNER_CHANNEL); gst_tuner_signals[FREQUENCY_CHANGED] = - g_signal_new ("frequency-changed", - GST_TYPE_TUNER, G_SIGNAL_RUN_LAST, - G_STRUCT_OFFSET (GstTunerClass, frequency_changed), - NULL, NULL, - gst_tuner_marshal_VOID__OBJECT_ULONG, G_TYPE_NONE, 2, - GST_TYPE_TUNER_CHANNEL, G_TYPE_ULONG); + g_signal_new ("frequency-changed", + GST_TYPE_TUNER, G_SIGNAL_RUN_LAST, + G_STRUCT_OFFSET (GstTunerClass, frequency_changed), + NULL, NULL, + gst_tuner_marshal_VOID__OBJECT_ULONG, G_TYPE_NONE, 2, + GST_TYPE_TUNER_CHANNEL, G_TYPE_ULONG); gst_tuner_signals[SIGNAL_CHANGED] = - g_signal_new ("signal-changed", - GST_TYPE_TUNER, G_SIGNAL_RUN_LAST, - G_STRUCT_OFFSET (GstTunerClass, signal_changed), - NULL, NULL, - gst_tuner_marshal_VOID__OBJECT_INT, G_TYPE_NONE, 2, - GST_TYPE_TUNER_CHANNEL, G_TYPE_INT); + g_signal_new ("signal-changed", + GST_TYPE_TUNER, G_SIGNAL_RUN_LAST, + G_STRUCT_OFFSET (GstTunerClass, signal_changed), + NULL, NULL, + gst_tuner_marshal_VOID__OBJECT_INT, G_TYPE_NONE, 2, + GST_TYPE_TUNER_CHANNEL, G_TYPE_INT); initialized = TRUE; } @@ -131,7 +130,7 @@ gst_tuner_class_init (GstTunerClass *klass) */ const GList * -gst_tuner_list_channels (GstTuner *tuner) +gst_tuner_list_channels (GstTuner * tuner) { GstTunerClass *klass = GST_TUNER_GET_CLASS (tuner); @@ -151,8 +150,7 @@ gst_tuner_list_channels (GstTuner *tuner) */ void -gst_tuner_set_channel (GstTuner *tuner, - GstTunerChannel *channel) +gst_tuner_set_channel (GstTuner * tuner, GstTunerChannel * channel) { GstTunerClass *klass = GST_TUNER_GET_CLASS (tuner); @@ -171,7 +169,7 @@ gst_tuner_set_channel (GstTuner *tuner, */ GstTunerChannel * -gst_tuner_get_channel (GstTuner *tuner) +gst_tuner_get_channel (GstTuner * tuner) { GstTunerClass *klass = GST_TUNER_GET_CLASS (tuner); @@ -194,7 +192,7 @@ gst_tuner_get_channel (GstTuner *tuner) */ const GList * -gst_tuner_list_norms (GstTuner *tuner) +gst_tuner_list_norms (GstTuner * tuner) { GstTunerClass *klass = GST_TUNER_GET_CLASS (tuner); @@ -214,8 +212,7 @@ gst_tuner_list_norms (GstTuner *tuner) */ void -gst_tuner_set_norm (GstTuner *tuner, - GstTunerNorm *norm) +gst_tuner_set_norm (GstTuner * tuner, GstTunerNorm * norm) { GstTunerClass *klass = GST_TUNER_GET_CLASS (tuner); @@ -235,7 +232,7 @@ gst_tuner_set_norm (GstTuner *tuner, */ GstTunerNorm * -gst_tuner_get_norm (GstTuner *tuner) +gst_tuner_get_norm (GstTuner * tuner) { GstTunerClass *klass = GST_TUNER_GET_CLASS (tuner); @@ -259,14 +256,13 @@ gst_tuner_get_norm (GstTuner *tuner) */ void -gst_tuner_set_frequency (GstTuner *tuner, - GstTunerChannel *channel, - gulong frequency) +gst_tuner_set_frequency (GstTuner * tuner, + GstTunerChannel * channel, gulong frequency) { GstTunerClass *klass = GST_TUNER_GET_CLASS (tuner); g_return_if_fail (GST_TUNER_CHANNEL_HAS_FLAG (channel, - GST_TUNER_CHANNEL_FREQUENCY)); + GST_TUNER_CHANNEL_FREQUENCY)); if (klass->set_frequency) { klass->set_frequency (tuner, channel, frequency); @@ -285,13 +281,12 @@ gst_tuner_set_frequency (GstTuner *tuner, */ gulong -gst_tuner_get_frequency (GstTuner *tuner, - GstTunerChannel *channel) +gst_tuner_get_frequency (GstTuner * tuner, GstTunerChannel * channel) { GstTunerClass *klass = GST_TUNER_GET_CLASS (tuner); g_return_val_if_fail (GST_TUNER_CHANNEL_HAS_FLAG (channel, - GST_TUNER_CHANNEL_FREQUENCY), 0); + GST_TUNER_CHANNEL_FREQUENCY), 0); if (klass->get_frequency) { return klass->get_frequency (tuner, channel); @@ -315,13 +310,12 @@ gst_tuner_get_frequency (GstTuner *tuner, */ gint -gst_tuner_signal_strength (GstTuner *tuner, - GstTunerChannel *channel) +gst_tuner_signal_strength (GstTuner * tuner, GstTunerChannel * channel) { GstTunerClass *klass = GST_TUNER_GET_CLASS (tuner); g_return_val_if_fail (GST_TUNER_CHANNEL_HAS_FLAG (channel, - GST_TUNER_CHANNEL_FREQUENCY), 0); + GST_TUNER_CHANNEL_FREQUENCY), 0); if (klass->signal_strength) { return klass->signal_strength (tuner, channel); @@ -331,8 +325,7 @@ gst_tuner_signal_strength (GstTuner *tuner, } GstTunerNorm * -gst_tuner_find_norm_by_name (GstTuner *tuner, - gchar *norm) +gst_tuner_find_norm_by_name (GstTuner * tuner, gchar * norm) { GList *walk; @@ -349,8 +342,7 @@ gst_tuner_find_norm_by_name (GstTuner *tuner, } GstTunerChannel * -gst_tuner_find_channel_by_name (GstTuner *tuner, - gchar *channel) +gst_tuner_find_channel_by_name (GstTuner * tuner, gchar * channel) { GList *walk; @@ -367,59 +359,46 @@ gst_tuner_find_channel_by_name (GstTuner *tuner, } void -gst_tuner_channel_changed (GstTuner *tuner, - GstTunerChannel *channel) +gst_tuner_channel_changed (GstTuner * tuner, GstTunerChannel * channel) { g_return_if_fail (GST_IS_TUNER (tuner)); g_return_if_fail (GST_IS_TUNER_CHANNEL (channel)); g_signal_emit (G_OBJECT (tuner), - gst_tuner_signals[CHANNEL_CHANGED], 0, - channel); + gst_tuner_signals[CHANNEL_CHANGED], 0, channel); } void -gst_tuner_norm_changed (GstTuner *tuner, - GstTunerNorm *norm) +gst_tuner_norm_changed (GstTuner * tuner, GstTunerNorm * norm) { g_return_if_fail (GST_IS_TUNER (tuner)); g_return_if_fail (GST_IS_TUNER_NORM (norm)); - g_signal_emit (G_OBJECT (tuner), - gst_tuner_signals[NORM_CHANGED], 0, - norm); + g_signal_emit (G_OBJECT (tuner), gst_tuner_signals[NORM_CHANGED], 0, norm); } void -gst_tuner_frequency_changed (GstTuner *tuner, - GstTunerChannel *channel, - gulong frequency) +gst_tuner_frequency_changed (GstTuner * tuner, + GstTunerChannel * channel, gulong frequency) { g_return_if_fail (GST_IS_TUNER (tuner)); g_return_if_fail (GST_IS_TUNER_CHANNEL (channel)); g_signal_emit (G_OBJECT (tuner), - gst_tuner_signals[FREQUENCY_CHANGED], 0, - channel, frequency); + gst_tuner_signals[FREQUENCY_CHANGED], 0, channel, frequency); - g_signal_emit_by_name (G_OBJECT (channel), - "frequency_changed", - frequency); + g_signal_emit_by_name (G_OBJECT (channel), "frequency_changed", frequency); } void -gst_tuner_signal_changed (GstTuner *tuner, - GstTunerChannel *channel, - gint signal) +gst_tuner_signal_changed (GstTuner * tuner, + GstTunerChannel * channel, gint signal) { g_return_if_fail (GST_IS_TUNER (tuner)); g_return_if_fail (GST_IS_TUNER_CHANNEL (channel)); g_signal_emit (G_OBJECT (tuner), - gst_tuner_signals[SIGNAL_CHANGED], 0, - channel, signal); + gst_tuner_signals[SIGNAL_CHANGED], 0, channel, signal); - g_signal_emit_by_name (G_OBJECT (channel), - "signal_changed", - signal); + g_signal_emit_by_name (G_OBJECT (channel), "signal_changed", signal); } diff --git a/gst-libs/gst/tuner/tuner.h b/gst-libs/gst/tuner/tuner.h index 8c935389..cab3541d 100644 --- a/gst-libs/gst/tuner/tuner.h +++ b/gst-libs/gst/tuner/tuner.h @@ -28,7 +28,6 @@ #include <gst/tuner/tuner-enumtypes.h> G_BEGIN_DECLS - #define GST_TYPE_TUNER \ (gst_tuner_get_type ()) #define GST_TUNER(obj) \ @@ -41,87 +40,65 @@ G_BEGIN_DECLS (G_TYPE_CHECK_CLASS_TYPE ((klass), GST_TYPE_TUNER)) #define GST_TUNER_GET_CLASS(inst) \ (G_TYPE_INSTANCE_GET_INTERFACE ((inst), GST_TYPE_TUNER, GstTunerClass)) - typedef struct _GstTuner GstTuner; -typedef struct _GstTunerClass { +typedef struct _GstTunerClass +{ GTypeInterface klass; /* virtual functions */ - const GList * (* list_channels) (GstTuner *tuner); - void (* set_channel) (GstTuner *tuner, - GstTunerChannel *channel); - GstTunerChannel * - (* get_channel) (GstTuner *tuner); - - const GList * (* list_norms) (GstTuner *tuner); - void (* set_norm) (GstTuner *tuner, - GstTunerNorm *norm); - GstTunerNorm *(* get_norm) (GstTuner *tuner); - - void (* set_frequency) (GstTuner *tuner, - GstTunerChannel *channel, - gulong frequency); - gulong (* get_frequency) (GstTuner *tuner, - GstTunerChannel *channel); - gint (* signal_strength) (GstTuner *tuner, - GstTunerChannel *channel); + const GList *(*list_channels) (GstTuner * tuner); + void (*set_channel) (GstTuner * tuner, GstTunerChannel * channel); + GstTunerChannel *(*get_channel) (GstTuner * tuner); + + const GList *(*list_norms) (GstTuner * tuner); + void (*set_norm) (GstTuner * tuner, GstTunerNorm * norm); + GstTunerNorm *(*get_norm) (GstTuner * tuner); + + void (*set_frequency) (GstTuner * tuner, + GstTunerChannel * channel, gulong frequency); + gulong (*get_frequency) (GstTuner * tuner, GstTunerChannel * channel); + gint (*signal_strength) (GstTuner * tuner, GstTunerChannel * channel); /* signals */ - void (*channel_changed) (GstTuner *tuner, - GstTunerChannel *channel); - void (*norm_changed) (GstTuner *tuner, - GstTunerNorm *norm); - void (*frequency_changed) (GstTuner *tuner, - GstTunerChannel *channel, - gulong frequency); - void (*signal_changed) (GstTuner *tuner, - GstTunerChannel *channel, - gint signal); + void (*channel_changed) (GstTuner * tuner, GstTunerChannel * channel); + void (*norm_changed) (GstTuner * tuner, GstTunerNorm * norm); + void (*frequency_changed) (GstTuner * tuner, + GstTunerChannel * channel, gulong frequency); + void (*signal_changed) (GstTuner * tuner, + GstTunerChannel * channel, gint signal); gpointer _gst_reserved[GST_PADDING]; } GstTunerClass; -GType gst_tuner_get_type (void); +GType gst_tuner_get_type (void); /* virtual class function wrappers */ -const GList * gst_tuner_list_channels (GstTuner *tuner); -void gst_tuner_set_channel (GstTuner *tuner, - GstTunerChannel *channel); -GstTunerChannel * - gst_tuner_get_channel (GstTuner *tuner); - -const GList * gst_tuner_list_norms (GstTuner *tuner); -void gst_tuner_set_norm (GstTuner *tuner, - GstTunerNorm *channel); -GstTunerNorm * gst_tuner_get_norm (GstTuner *tuner); - -void gst_tuner_set_frequency (GstTuner *tuner, - GstTunerChannel *channel, - gulong frequency); -gulong gst_tuner_get_frequency (GstTuner *tuner, - GstTunerChannel *channel); -gint gst_tuner_signal_strength (GstTuner *tuner, - GstTunerChannel *channel); +const GList *gst_tuner_list_channels (GstTuner * tuner); +void gst_tuner_set_channel (GstTuner * tuner, GstTunerChannel * channel); +GstTunerChannel *gst_tuner_get_channel (GstTuner * tuner); + +const GList *gst_tuner_list_norms (GstTuner * tuner); +void gst_tuner_set_norm (GstTuner * tuner, GstTunerNorm * channel); +GstTunerNorm *gst_tuner_get_norm (GstTuner * tuner); + +void gst_tuner_set_frequency (GstTuner * tuner, + GstTunerChannel * channel, gulong frequency); +gulong gst_tuner_get_frequency (GstTuner * tuner, GstTunerChannel * channel); +gint gst_tuner_signal_strength (GstTuner * tuner, GstTunerChannel * channel); /* helper functions */ -GstTunerNorm * gst_tuner_find_norm_by_name (GstTuner *tuner, - gchar *norm); -GstTunerChannel *gst_tuner_find_channel_by_name (GstTuner *tuner, - gchar *channel); +GstTunerNorm *gst_tuner_find_norm_by_name (GstTuner * tuner, gchar * norm); +GstTunerChannel *gst_tuner_find_channel_by_name (GstTuner * tuner, + gchar * channel); /* trigger signals */ -void gst_tuner_channel_changed (GstTuner *tuner, - GstTunerChannel *channel); -void gst_tuner_norm_changed (GstTuner *tuner, - GstTunerNorm *norm); -void gst_tuner_frequency_changed (GstTuner *tuner, - GstTunerChannel *channel, - gulong frequency); -void gst_tuner_signal_changed (GstTuner *tuner, - GstTunerChannel *channel, - gint signal); +void gst_tuner_channel_changed (GstTuner * tuner, GstTunerChannel * channel); +void gst_tuner_norm_changed (GstTuner * tuner, GstTunerNorm * norm); +void gst_tuner_frequency_changed (GstTuner * tuner, + GstTunerChannel * channel, gulong frequency); +void gst_tuner_signal_changed (GstTuner * tuner, + GstTunerChannel * channel, gint signal); G_END_DECLS - #endif /* __GST_TUNER_H__ */ diff --git a/gst-libs/gst/tuner/tunerchannel.c b/gst-libs/gst/tuner/tunerchannel.c index ffcfcd9d..af93f568 100644 --- a/gst-libs/gst/tuner/tunerchannel.c +++ b/gst-libs/gst/tuner/tunerchannel.c @@ -25,16 +25,17 @@ #include "tunerchannel.h" -enum { +enum +{ /* FILL ME */ SIGNAL_FREQUENCY_CHANGED, SIGNAL_SIGNAL_CHANGED, LAST_SIGNAL }; -static void gst_tuner_channel_class_init (GstTunerChannelClass *klass); -static void gst_tuner_channel_init (GstTunerChannel *channel); -static void gst_tuner_channel_dispose (GObject *object); +static void gst_tuner_channel_class_init (GstTunerChannelClass * klass); +static void gst_tuner_channel_init (GstTunerChannel * channel); +static void gst_tuner_channel_dispose (GObject * object); static GObjectClass *parent_class = NULL; static guint signals[LAST_SIGNAL] = { 0 }; @@ -60,40 +61,37 @@ gst_tuner_channel_get_type (void) gst_tuner_channel_type = g_type_register_static (G_TYPE_OBJECT, - "GstTunerChannel", - &tuner_channel_info, 0); + "GstTunerChannel", &tuner_channel_info, 0); } return gst_tuner_channel_type; } static void -gst_tuner_channel_class_init (GstTunerChannelClass *klass) +gst_tuner_channel_class_init (GstTunerChannelClass * klass) { GObjectClass *object_klass = (GObjectClass *) klass; parent_class = g_type_class_ref (G_TYPE_OBJECT); signals[SIGNAL_FREQUENCY_CHANGED] = - g_signal_new ("frequency-changed", G_TYPE_FROM_CLASS (klass), - G_SIGNAL_RUN_LAST, - G_STRUCT_OFFSET (GstTunerChannelClass, - frequency_changed), - NULL, NULL, g_cclosure_marshal_VOID__ULONG, - G_TYPE_NONE, 1, G_TYPE_ULONG); + g_signal_new ("frequency-changed", G_TYPE_FROM_CLASS (klass), + G_SIGNAL_RUN_LAST, + G_STRUCT_OFFSET (GstTunerChannelClass, + frequency_changed), + NULL, NULL, g_cclosure_marshal_VOID__ULONG, G_TYPE_NONE, 1, G_TYPE_ULONG); signals[SIGNAL_SIGNAL_CHANGED] = - g_signal_new ("signal-changed", G_TYPE_FROM_CLASS (klass), - G_SIGNAL_RUN_LAST, - G_STRUCT_OFFSET (GstTunerChannelClass, - signal_changed), - NULL, NULL, g_cclosure_marshal_VOID__INT, - G_TYPE_NONE, 1, G_TYPE_INT); + g_signal_new ("signal-changed", G_TYPE_FROM_CLASS (klass), + G_SIGNAL_RUN_LAST, + G_STRUCT_OFFSET (GstTunerChannelClass, + signal_changed), + NULL, NULL, g_cclosure_marshal_VOID__INT, G_TYPE_NONE, 1, G_TYPE_INT); object_klass->dispose = gst_tuner_channel_dispose; } static void -gst_tuner_channel_init (GstTunerChannel *channel) +gst_tuner_channel_init (GstTunerChannel * channel) { channel->label = NULL; channel->flags = 0; @@ -102,7 +100,7 @@ gst_tuner_channel_init (GstTunerChannel *channel) } static void -gst_tuner_channel_dispose (GObject *object) +gst_tuner_channel_dispose (GObject * object) { GstTunerChannel *channel = GST_TUNER_CHANNEL (object); diff --git a/gst-libs/gst/tuner/tunerchannel.h b/gst-libs/gst/tuner/tunerchannel.h index ee5654d0..663d682d 100644 --- a/gst-libs/gst/tuner/tunerchannel.h +++ b/gst-libs/gst/tuner/tunerchannel.h @@ -25,7 +25,6 @@ #include <gst/gst.h> G_BEGIN_DECLS - #define GST_TYPE_TUNER_CHANNEL \ (gst_tuner_channel_get_type ()) #define GST_TUNER_CHANNEL(obj) \ @@ -38,42 +37,39 @@ G_BEGIN_DECLS (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GST_TYPE_TUNER_CHANNEL)) #define GST_IS_TUNER_CHANNEL_CLASS(klass) \ (G_TYPE_CHECK_CLASS_TYPE ((klass), GST_TYPE_TUNER_CHANNEL)) - -typedef enum { - GST_TUNER_CHANNEL_INPUT = (1<<0), - GST_TUNER_CHANNEL_OUTPUT = (1<<1), - GST_TUNER_CHANNEL_FREQUENCY = (1<<2), - GST_TUNER_CHANNEL_AUDIO = (1<<3), + typedef enum +{ + GST_TUNER_CHANNEL_INPUT = (1 << 0), + GST_TUNER_CHANNEL_OUTPUT = (1 << 1), + GST_TUNER_CHANNEL_FREQUENCY = (1 << 2), + GST_TUNER_CHANNEL_AUDIO = (1 << 3), } GstTunerChannelFlags; #define GST_TUNER_CHANNEL_HAS_FLAG(channel, flag) \ ((channel)->flags & flag) -typedef struct _GstTunerChannel { - GObject parent; +typedef struct _GstTunerChannel +{ + GObject parent; - gchar *label; + gchar *label; GstTunerChannelFlags flags; - gulong min_frequency, - max_frequency; - gint min_signal, - max_signal; + gulong min_frequency, max_frequency; + gint min_signal, max_signal; } GstTunerChannel; -typedef struct _GstTunerChannelClass { +typedef struct _GstTunerChannelClass +{ GObjectClass parent; /* signals */ - void (*frequency_changed) (GstTunerChannel *channel, - gulong frequency); - void (*signal_changed) (GstTunerChannel *channel, - gint signal); + void (*frequency_changed) (GstTunerChannel * channel, gulong frequency); + void (*signal_changed) (GstTunerChannel * channel, gint signal); gpointer _gst_reserved[GST_PADDING]; } GstTunerChannelClass; -GType gst_tuner_channel_get_type (void); +GType gst_tuner_channel_get_type (void); G_END_DECLS - #endif /* __GST_TUNER_CHANNEL_H__ */ diff --git a/gst-libs/gst/tuner/tunernorm.c b/gst-libs/gst/tuner/tunernorm.c index 48d75de2..41927d2b 100644 --- a/gst-libs/gst/tuner/tunernorm.c +++ b/gst-libs/gst/tuner/tunernorm.c @@ -25,16 +25,18 @@ #include "tunernorm.h" -enum { +enum +{ /* FILL ME */ LAST_SIGNAL }; -static void gst_tuner_norm_class_init (GstTunerNormClass *klass); -static void gst_tuner_norm_init (GstTunerNorm *norm); -static void gst_tuner_norm_dispose (GObject *object); +static void gst_tuner_norm_class_init (GstTunerNormClass * klass); +static void gst_tuner_norm_init (GstTunerNorm * norm); +static void gst_tuner_norm_dispose (GObject * object); static GObjectClass *parent_class = NULL; + /*static guint signals[LAST_SIGNAL] = { 0 };*/ GType @@ -58,15 +60,14 @@ gst_tuner_norm_get_type (void) gst_tuner_norm_type = g_type_register_static (G_TYPE_OBJECT, - "GstTunerNorm", - &tuner_norm_info, 0); + "GstTunerNorm", &tuner_norm_info, 0); } return gst_tuner_norm_type; } static void -gst_tuner_norm_class_init (GstTunerNormClass *klass) +gst_tuner_norm_class_init (GstTunerNormClass * klass) { GObjectClass *object_klass = (GObjectClass *) klass; @@ -76,14 +77,14 @@ gst_tuner_norm_class_init (GstTunerNormClass *klass) } static void -gst_tuner_norm_init (GstTunerNorm *norm) +gst_tuner_norm_init (GstTunerNorm * norm) { norm->label = NULL; norm->fps = 0.; } static void -gst_tuner_norm_dispose (GObject *object) +gst_tuner_norm_dispose (GObject * object) { GstTunerNorm *norm = GST_TUNER_NORM (object); diff --git a/gst-libs/gst/tuner/tunernorm.h b/gst-libs/gst/tuner/tunernorm.h index cd89e1ee..94267b6e 100644 --- a/gst-libs/gst/tuner/tunernorm.h +++ b/gst-libs/gst/tuner/tunernorm.h @@ -25,7 +25,6 @@ #include <gst/gst.h> G_BEGIN_DECLS - #define GST_TYPE_TUNER_NORM \ (gst_tuner_norm_get_type ()) #define GST_TUNER_NORM(obj) \ @@ -36,22 +35,22 @@ G_BEGIN_DECLS (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GST_TYPE_TUNER_NORM)) #define GST_IS_TUNER_NORM_CLASS(klass) \ (G_TYPE_CHECK_CLASS_TYPE ((klass), GST_TYPE_TUNER_NORM)) - -typedef struct _GstTunerNorm { + typedef struct _GstTunerNorm +{ GObject parent; - gchar *label; - gfloat fps; + gchar *label; + gfloat fps; } GstTunerNorm; -typedef struct _GstTunerNormClass { +typedef struct _GstTunerNormClass +{ GObjectClass parent; gpointer _gst_reserved[GST_PADDING]; } GstTunerNormClass; -GType gst_tuner_norm_get_type (void); +GType gst_tuner_norm_get_type (void); G_END_DECLS - #endif /* __GST_TUNER_NORM_H__ */ |