summaryrefslogtreecommitdiffstats
path: root/gst-libs/gst/tuner
diff options
context:
space:
mode:
Diffstat (limited to 'gst-libs/gst/tuner')
-rw-r--r--gst-libs/gst/tuner/tuner.h107
-rw-r--r--gst-libs/gst/tuner/tunerchannel.h38
-rw-r--r--gst-libs/gst/tuner/tunernorm.h15
3 files changed, 94 insertions, 66 deletions
diff --git a/gst-libs/gst/tuner/tuner.h b/gst-libs/gst/tuner/tuner.h
index cab3541d..8c935389 100644
--- a/gst-libs/gst/tuner/tuner.h
+++ b/gst-libs/gst/tuner/tuner.h
@@ -28,6 +28,7 @@
#include <gst/tuner/tuner-enumtypes.h>
G_BEGIN_DECLS
+
#define GST_TYPE_TUNER \
(gst_tuner_get_type ())
#define GST_TUNER(obj) \
@@ -40,65 +41,87 @@ 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.h b/gst-libs/gst/tuner/tunerchannel.h
index 663d682d..ee5654d0 100644
--- a/gst-libs/gst/tuner/tunerchannel.h
+++ b/gst-libs/gst/tuner/tunerchannel.h
@@ -25,6 +25,7 @@
#include <gst/gst.h>
G_BEGIN_DECLS
+
#define GST_TYPE_TUNER_CHANNEL \
(gst_tuner_channel_get_type ())
#define GST_TUNER_CHANNEL(obj) \
@@ -37,39 +38,42 @@ 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.h b/gst-libs/gst/tuner/tunernorm.h
index 94267b6e..cd89e1ee 100644
--- a/gst-libs/gst/tuner/tunernorm.h
+++ b/gst-libs/gst/tuner/tunernorm.h
@@ -25,6 +25,7 @@
#include <gst/gst.h>
G_BEGIN_DECLS
+
#define GST_TYPE_TUNER_NORM \
(gst_tuner_norm_get_type ())
#define GST_TUNER_NORM(obj) \
@@ -35,22 +36,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__ */