gst_plugins_symbian/gst/devsound/gstg729decoderinterface.c
changeset 2 5505e8908944
child 11 1373546e05c6
equal deleted inserted replaced
1:4c282e7dd6d3 2:5505e8908944
       
     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 "gstg729decoderinterface.h"
       
    28 
       
    29 #ifdef __SYMBIAN32__
       
    30 #include <glib_global.h>
       
    31 #include <gobject_global.h>
       
    32 
       
    33 #endif
       
    34 
       
    35 static guint g729_decoder_count = 0;
       
    36 static void gst_g729_decoder_base_init (gpointer g_class);
       
    37 static void gst_g729_decoder_base_finalize (gpointer g_class);
       
    38              
       
    39 EXPORT_C GType gst_g729_decoder_get_type(void)
       
    40 {
       
    41   static GType g729_decoder_type = 0;
       
    42 
       
    43   if (g729_decoder_type == 0) {
       
    44     static const GTypeInfo g729_decoder_info = {
       
    45       sizeof (GstG729DecoderIntfc), /* class_size */
       
    46       gst_g729_decoder_base_init,  /* base_init */
       
    47       gst_g729_decoder_base_finalize,  /* base_finalize */
       
    48       NULL,
       
    49       NULL,                     /* class_finalize */
       
    50       NULL,                     /* class_data */
       
    51       0,
       
    52       0,
       
    53       NULL
       
    54     };
       
    55 
       
    56   
       
    57     g729_decoder_type = g_type_register_static (G_TYPE_INTERFACE, "GstG729DecoderInterface",
       
    58         &g729_decoder_info, 0);
       
    59   
       
    60   }
       
    61 
       
    62   return g729_decoder_type;
       
    63 }
       
    64 
       
    65 
       
    66 static void gst_g729_decoder_base_init (gpointer g_class)
       
    67     {
       
    68     static gboolean initialized = FALSE;
       
    69     g729_decoder_count++;
       
    70     
       
    71     if (G_UNLIKELY (!initialized)) 
       
    72         {
       
    73         initialized = TRUE;
       
    74         }
       
    75     }
       
    76 
       
    77 static void gst_g729_decoder_base_finalize (gpointer g_class)
       
    78     {
       
    79     g729_decoder_count--;
       
    80      
       
    81     }
       
    82 
       
    83