1 /* GStreamer SBC audio encoder 2 * Copyright (C) 2004-2010 Marcel Holtmann <marcel@holtmann.org> 3 * Copyright (C) 2013 Tim-Philipp Müller <tim centricular net> 4 * 5 * This library is free software; you can redistribute it and/or 6 * modify it under the terms of the GNU Lesser General Public 7 * License as published by the Free Software Foundation; either 8 * version 2.1 of the License, or (at your option) any later version. 9 * 10 * This library is distributed in the hope that it will be useful, 11 * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 * Lesser General Public License for more details. 14 * 15 * You should have received a copy of the GNU Lesser General Public 16 * License along with this library; if not, write to the Free Software 17 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 18 * 19 */ 20 21 #include <gst/gst.h> 22 #include <gst/audio/audio.h> 23 24 #include <sbc/sbc.h> 25 26 G_BEGIN_DECLS 27 28 #define GST_TYPE_SBC_ENC \ 29 (gst_sbc_enc_get_type()) 30 #define GST_SBC_ENC(obj) \ 31 (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_SBC_ENC,GstSbcEnc)) 32 #define GST_SBC_ENC_CLASS(klass) \ 33 (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_SBC_ENC,GstSbcEncClass)) 34 #define GST_IS_SBC_ENC(obj) \ 35 (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_SBC_ENC)) 36 #define GST_IS_SBC_ENC_CLASS(obj) \ 37 (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_SBC_ENC)) 38 39 typedef struct _GstSbcEnc GstSbcEnc; 40 typedef struct _GstSbcEncClass GstSbcEncClass; 41 42 struct _GstSbcEnc { 43 GstAudioEncoder audio_encoder; 44 45 /*< private >*/ 46 gint rate; 47 gint channels; 48 gint blocks; 49 gint subbands; 50 gint bitpool; 51 52 sbc_t sbc; 53 }; 54 55 struct _GstSbcEncClass { 56 GstAudioEncoderClass audio_encoder_class; 57 }; 58 59 GType gst_sbc_enc_get_type (void); 60 61 GST_ELEMENT_REGISTER_DECLARE (sbcenc); 62 63 G_END_DECLS 64