Branch data Line data Source code
1 : : /* GStreamer Tuner
2 : : * Copyright (C) 2003 Ronald Bultje <rbultje@ronald.bitfreak.net>
3 : : *
4 : : * tunernorm.c: tuner norm object design
5 : : *
6 : : * This library is free software; you can redistribute it and/or
7 : : * modify it under the terms of the GNU Library General Public
8 : : * License as published by the Free Software Foundation; either
9 : : * version 2 of the License, or (at your option) any later version.
10 : : *
11 : : * This library is distributed in the hope that it will be useful,
12 : : * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 : : * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 : : * Library General Public License for more details.
15 : : *
16 : : * You should have received a copy of the GNU Library General Public
17 : : * License along with this library; if not, write to the
18 : : * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
19 : : * Boston, MA 02111-1307, USA.
20 : : */
21 : :
22 : : #ifdef HAVE_CONFIG_H
23 : : #include "config.h"
24 : : #endif
25 : :
26 : : #include "tunernorm.h"
27 : :
28 : : /**
29 : : * SECTION:gsttunernorm
30 : : * @short_description: Encapsulates information about the data format(s)
31 : : * for a #GstTunerChannel.
32 : : *
33 : : * <refsect2>
34 : : * <para>The #GstTunerNorm object is created by an element implementing the
35 : : * #GstTuner interface and encapsulates the selection of a capture/output format
36 : : * for a selected #GstTunerChannel.
37 : : * </para>
38 : : * </refsect2>
39 : : */
40 : :
41 : : enum
42 : : {
43 : : /* FILL ME */
44 : : LAST_SIGNAL
45 : : };
46 : :
47 : : static void gst_tuner_norm_class_init (GstTunerNormClass * klass);
48 : : static void gst_tuner_norm_init (GstTunerNorm * norm);
49 : : static void gst_tuner_norm_dispose (GObject * object);
50 : :
51 : : static GObjectClass *parent_class = NULL;
52 : :
53 : : /*static guint signals[LAST_SIGNAL] = { 0 };*/
54 : :
55 : : GType
56 : 11 : gst_tuner_norm_get_type (void)
57 : : {
58 : : static GType gst_tuner_norm_type = 0;
59 : :
60 [ + + ]: 11 : if (!gst_tuner_norm_type) {
61 : : static const GTypeInfo tuner_norm_info = {
62 : : sizeof (GstTunerNormClass),
63 : : NULL,
64 : : NULL,
65 : : (GClassInitFunc) gst_tuner_norm_class_init,
66 : : NULL,
67 : : NULL,
68 : : sizeof (GstTunerNorm),
69 : : 0,
70 : : (GInstanceInitFunc) gst_tuner_norm_init,
71 : : NULL
72 : : };
73 : :
74 : 9 : gst_tuner_norm_type =
75 : 9 : g_type_register_static (G_TYPE_OBJECT,
76 : : "GstTunerNorm", &tuner_norm_info, 0);
77 : : }
78 : :
79 : 11 : return gst_tuner_norm_type;
80 : : }
81 : :
82 : : static void
83 : 0 : gst_tuner_norm_class_init (GstTunerNormClass * klass)
84 : : {
85 : 0 : GObjectClass *object_klass = (GObjectClass *) klass;
86 : :
87 : 0 : parent_class = g_type_class_peek_parent (klass);
88 : :
89 : 0 : object_klass->dispose = gst_tuner_norm_dispose;
90 : 0 : }
91 : :
92 : : static void
93 : 0 : gst_tuner_norm_init (GstTunerNorm * norm)
94 : : {
95 : 0 : norm->label = NULL;
96 : 0 : g_value_init (&norm->framerate, GST_TYPE_FRACTION);
97 : 0 : }
98 : :
99 : : static void
100 : 0 : gst_tuner_norm_dispose (GObject * object)
101 : : {
102 : 0 : GstTunerNorm *norm = GST_TUNER_NORM (object);
103 : :
104 [ # # ]: 0 : if (norm->label) {
105 : 0 : g_free (norm->label);
106 : 0 : norm->label = NULL;
107 : : }
108 : :
109 [ # # ]: 0 : if (parent_class->dispose)
110 : 0 : parent_class->dispose (object);
111 : 0 : }
|