|
1 /* |
|
2 * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). All rights reserved. |
|
3 * |
|
4 * This library is free software; you can redistribute it and/or |
|
5 * modify it under the terms of the GNU Lesser General Public |
|
6 * License as published by the Free Software Foundation; either |
|
7 * version 2 of the License, or (at your option) any later version. |
|
8 * |
|
9 * This library is distributed in the hope that it will be useful, |
|
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
|
12 * Lesser General Public License for more details. |
|
13 * |
|
14 * You should have received a copy of the GNU Lesser General Public |
|
15 * License along with this library; if not, write to the |
|
16 * Free Software Foundation, Inc., 59 Temple Place - Suite 330, |
|
17 * Boston, MA 02111-1307, USA. |
|
18 * |
|
19 * Description: |
|
20 * |
|
21 */ |
|
22 |
|
23 #ifdef HAVE_CONFIG_H |
|
24 #include "config.h" |
|
25 #endif |
|
26 |
|
27 |
|
28 #include "gstg711decoderinterface.h" |
|
29 |
|
30 #ifdef __SYMBIAN32__ |
|
31 #include <glib_global.h> |
|
32 #include <gobject_global.h> |
|
33 |
|
34 #endif |
|
35 |
|
36 static guint g711_decoder_count = 0; |
|
37 static void gst_g711_decoder_base_init (gpointer g_class); |
|
38 static void gst_g711_decoder_base_finalize (gpointer g_class); |
|
39 |
|
40 EXPORT_C GType gst_g711_decoder_get_type(void) |
|
41 { |
|
42 static GType g711_decoder_type = 0; |
|
43 |
|
44 if (g711_decoder_type == 0) { |
|
45 static const GTypeInfo g711_decoder_info = { |
|
46 sizeof (GstG711DecoderIntfc), /* class_size */ |
|
47 gst_g711_decoder_base_init, /* base_init */ |
|
48 gst_g711_decoder_base_finalize, /* base_finalize */ |
|
49 NULL, |
|
50 NULL, /* class_finalize */ |
|
51 NULL, /* class_data */ |
|
52 0, |
|
53 0, |
|
54 NULL |
|
55 }; |
|
56 |
|
57 |
|
58 g711_decoder_type = g_type_register_static (G_TYPE_INTERFACE, "GstG711DecoderInterface", |
|
59 &g711_decoder_info, 0); |
|
60 |
|
61 } |
|
62 |
|
63 return g711_decoder_type; |
|
64 } |
|
65 |
|
66 |
|
67 static void gst_g711_decoder_base_init (gpointer g_class) |
|
68 { |
|
69 static gboolean initialized = FALSE; |
|
70 g711_decoder_count++; |
|
71 |
|
72 if (G_UNLIKELY (!initialized)) |
|
73 { |
|
74 initialized = TRUE; |
|
75 } |
|
76 } |
|
77 |
|
78 static void gst_g711_decoder_base_finalize (gpointer g_class) |
|
79 { |
|
80 g711_decoder_count--; |
|
81 |
|
82 } |
|
83 |
|
84 |