Home | History | Annotate | Download | only in audio
      1 /*
      2  *
      3  *  BlueZ - Bluetooth protocol stack for Linux
      4  *
      5  *  Copyright (C) 2004-2010  Marcel Holtmann <marcel (at) holtmann.org>
      6  *
      7  *
      8  *  This library is free software; you can redistribute it and/or
      9  *  modify it under the terms of the GNU Lesser General Public
     10  *  License as published by the Free Software Foundation; either
     11  *  version 2.1 of the License, or (at your option) any later version.
     12  *
     13  *  This library is distributed in the hope that it will be useful,
     14  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
     15  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
     16  *  Lesser General Public License for more details.
     17  *
     18  *  You should have received a copy of the GNU Lesser General Public
     19  *  License along with this library; if not, write to the Free Software
     20  *  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
     21  *
     22  */
     23 
     24 #include <gst/gst.h>
     25 #include <gst/base/gstadapter.h>
     26 
     27 #include "sbc.h"
     28 
     29 G_BEGIN_DECLS
     30 
     31 #define GST_TYPE_SBC_ENC \
     32 	(gst_sbc_enc_get_type())
     33 #define GST_SBC_ENC(obj) \
     34 	(G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_SBC_ENC,GstSbcEnc))
     35 #define GST_SBC_ENC_CLASS(klass) \
     36 	(G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_SBC_ENC,GstSbcEncClass))
     37 #define GST_IS_SBC_ENC(obj) \
     38 	(G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_SBC_ENC))
     39 #define GST_IS_SBC_ENC_CLASS(obj) \
     40 	(G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_SBC_ENC))
     41 
     42 typedef struct _GstSbcEnc GstSbcEnc;
     43 typedef struct _GstSbcEncClass GstSbcEncClass;
     44 
     45 struct _GstSbcEnc {
     46 	GstElement element;
     47 
     48 	GstPad *sinkpad;
     49 	GstPad *srcpad;
     50 	GstAdapter *adapter;
     51 
     52 	gint rate;
     53 	gint channels;
     54 	gint mode;
     55 	gint blocks;
     56 	gint allocation;
     57 	gint subbands;
     58 	gint bitpool;
     59 
     60 	guint codesize;
     61 	gint frame_length;
     62 	gint frame_duration;
     63 
     64 	sbc_t sbc;
     65 };
     66 
     67 struct _GstSbcEncClass {
     68 	GstElementClass parent_class;
     69 };
     70 
     71 GType gst_sbc_enc_get_type(void);
     72 
     73 gboolean gst_sbc_enc_plugin_init(GstPlugin *plugin);
     74 
     75 G_END_DECLS
     76