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