gst_plugins_symbian/gst/devsound/gstg729encoderinterface.c
changeset 0 0e761a78d257
equal deleted inserted replaced
-1:000000000000 0:0e761a78d257
       
     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 #ifdef HAVE_CONFIG_H
       
    19 #include "config.h"
       
    20 #endif
       
    21 
       
    22 #include "gstg729encoderinterface.h"
       
    23 
       
    24 #ifdef __SYMBIAN32__
       
    25 #include <glib_global.h>
       
    26 #include <gobject_global.h>
       
    27 
       
    28 #endif
       
    29 
       
    30 static guint g729_encoder_count = 0;
       
    31 static void gst_g729_encoder_base_init (gpointer g_class);
       
    32 static void gst_g729_encoder_base_finalize (gpointer g_class);
       
    33              
       
    34 EXPORT_C GType gst_g729_encoder_get_type(void)
       
    35 {
       
    36   static GType g729_encoder_type = 0;
       
    37 
       
    38   if (g729_encoder_type == 0) {
       
    39     static const GTypeInfo g729_encoder_info = {
       
    40       sizeof (GstG729EncoderIntfc), /* class_size */
       
    41       gst_g729_encoder_base_init,  /* base_init */
       
    42       gst_g729_encoder_base_finalize,  /* base_finalize */
       
    43       NULL,
       
    44       NULL,                     /* class_finalize */
       
    45       NULL,                     /* class_data */
       
    46       0,
       
    47       0,
       
    48       NULL
       
    49     };
       
    50 
       
    51   
       
    52     g729_encoder_type = g_type_register_static (G_TYPE_INTERFACE, "GstG729EncoderInterface",
       
    53         &g729_encoder_info, 0);
       
    54   
       
    55   }
       
    56 
       
    57   return g729_encoder_type;
       
    58 }
       
    59 
       
    60 
       
    61 static void gst_g729_encoder_base_init (gpointer g_class)
       
    62     {
       
    63     static gboolean initialized = FALSE;
       
    64     g729_encoder_count++;
       
    65     
       
    66     if (G_UNLIKELY (!initialized)) 
       
    67         {
       
    68         initialized = TRUE;
       
    69         }
       
    70     }
       
    71 
       
    72 static void gst_g729_encoder_base_finalize (gpointer g_class)
       
    73     {
       
    74     g729_encoder_count--;
       
    75      
       
    76     }
       
    77 
       
    78