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