|
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 #include "gstilbcencoderinterface.h" |
|
28 |
|
29 #ifdef __SYMBIAN32__ |
|
30 #include <glib_global.h> |
|
31 #include <gobject_global.h> |
|
32 |
|
33 #endif |
|
34 |
|
35 static guint ilbc_encoder_count = 0; |
|
36 static void gst_ilbc_encoder_base_init (gpointer g_class); |
|
37 static void gst_ilbc_encoder_base_finalize (gpointer g_class); |
|
38 |
|
39 EXPORT_C GType gst_ilbc_encoder_get_type(void) |
|
40 { |
|
41 static GType ilbc_encoder_type = 0; |
|
42 |
|
43 if (ilbc_encoder_type == 0) { |
|
44 static const GTypeInfo ilbc_encoder_info = { |
|
45 sizeof (GstIlbcEncoderIntfc), /* class_size */ |
|
46 gst_ilbc_encoder_base_init, /* base_init */ |
|
47 gst_ilbc_encoder_base_finalize, /* base_finalize */ |
|
48 NULL, |
|
49 NULL, /* class_finalize */ |
|
50 NULL, /* class_data */ |
|
51 0, |
|
52 0, |
|
53 NULL |
|
54 }; |
|
55 |
|
56 |
|
57 ilbc_encoder_type = g_type_register_static (G_TYPE_INTERFACE, "GstIlbcEncoderInterface", |
|
58 &ilbc_encoder_info, 0); |
|
59 |
|
60 } |
|
61 |
|
62 return ilbc_encoder_type; |
|
63 } |
|
64 |
|
65 |
|
66 static void gst_ilbc_encoder_base_init (gpointer g_class) |
|
67 { |
|
68 static gboolean initialized = FALSE; |
|
69 ilbc_encoder_count++; |
|
70 |
|
71 if (G_UNLIKELY (!initialized)) |
|
72 { |
|
73 initialized = TRUE; |
|
74 } |
|
75 } |
|
76 |
|
77 static void gst_ilbc_encoder_base_finalize (gpointer g_class) |
|
78 { |
|
79 ilbc_encoder_count--; |
|
80 |
|
81 } |
|
82 |
|
83 |