|
1 /* |
|
2 * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). |
|
3 * All rights reserved. |
|
4 * This component and the accompanying materials are made available |
|
5 * under the terms of "Eclipse Public License v1.0" |
|
6 * which accompanies this distribution, and is available |
|
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
8 * |
|
9 * Initial Contributors: |
|
10 * Nokia Corporation - initial contribution. |
|
11 * |
|
12 * Contributors: |
|
13 * |
|
14 * Description: |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifdef HAVE_CONFIG_H |
|
20 #include "config.h" |
|
21 #endif |
|
22 |
|
23 #include "gstilbcencoderinterface.h" |
|
24 |
|
25 #ifdef __SYMBIAN32__ |
|
26 #include <glib_global.h> |
|
27 #include <gobject_global.h> |
|
28 |
|
29 #endif |
|
30 |
|
31 static guint ilbc_encoder_count = 0; |
|
32 static void gst_ilbc_encoder_base_init (gpointer g_class); |
|
33 static void gst_ilbc_encoder_base_finalize (gpointer g_class); |
|
34 |
|
35 EXPORT_C GType gst_ilbc_encoder_get_type(void) |
|
36 { |
|
37 static GType ilbc_encoder_type = 0; |
|
38 |
|
39 if (ilbc_encoder_type == 0) { |
|
40 static const GTypeInfo ilbc_encoder_info = { |
|
41 sizeof (GstIlbcEncoderIntfc), /* class_size */ |
|
42 gst_ilbc_encoder_base_init, /* base_init */ |
|
43 gst_ilbc_encoder_base_finalize, /* base_finalize */ |
|
44 NULL, |
|
45 NULL, /* class_finalize */ |
|
46 NULL, /* class_data */ |
|
47 0, |
|
48 0, |
|
49 NULL |
|
50 }; |
|
51 |
|
52 |
|
53 ilbc_encoder_type = g_type_register_static (G_TYPE_INTERFACE, "GstIlbcEncoderInterface", |
|
54 &ilbc_encoder_info, 0); |
|
55 |
|
56 } |
|
57 |
|
58 return ilbc_encoder_type; |
|
59 } |
|
60 |
|
61 |
|
62 static void gst_ilbc_encoder_base_init (gpointer g_class) |
|
63 { |
|
64 static gboolean initialized = FALSE; |
|
65 ilbc_encoder_count++; |
|
66 |
|
67 if (G_UNLIKELY (!initialized)) |
|
68 { |
|
69 initialized = TRUE; |
|
70 } |
|
71 } |
|
72 |
|
73 static void gst_ilbc_encoder_base_finalize (gpointer g_class) |
|
74 { |
|
75 ilbc_encoder_count--; |
|
76 |
|
77 } |
|
78 |
|
79 |