• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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., 51 Franklin St, Fifth Floor,
19  * Boston, MA 02110-1301, 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  * @title: TunErnorm.h
31  * @short_description: Encapsulates information about the data format(s)
32  * for a #GstTunerChannel.
33  *
34  * 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  *
38  */
39 
40 enum
41 {
42   /* FILL ME */
43   LAST_SIGNAL
44 };
45 
46 G_DEFINE_TYPE (GstTunerNorm, gst_tuner_norm, G_TYPE_OBJECT);
47 
48 static void gst_tuner_norm_dispose (GObject * object);
49 
50 
51 /*static guint signals[LAST_SIGNAL] = { 0 };*/
52 
53 static void
gst_tuner_norm_class_init(GstTunerNormClass * klass)54 gst_tuner_norm_class_init (GstTunerNormClass * klass)
55 {
56   GObjectClass *object_klass = (GObjectClass *) klass;
57 
58 
59   object_klass->dispose = gst_tuner_norm_dispose;
60 }
61 
62 static void
gst_tuner_norm_init(GstTunerNorm * norm)63 gst_tuner_norm_init (GstTunerNorm * norm)
64 {
65   norm->label = NULL;
66   g_value_init (&norm->framerate, GST_TYPE_FRACTION);
67 }
68 
69 static void
gst_tuner_norm_dispose(GObject * object)70 gst_tuner_norm_dispose (GObject * object)
71 {
72   GstTunerNorm *norm = GST_TUNER_NORM (object);
73 
74   if (norm->label) {
75     g_free (norm->label);
76     norm->label = NULL;
77   }
78 
79   G_OBJECT_CLASS (gst_tuner_norm_parent_class)->dispose (object);
80 }
81