1 /* GStreamer 2 * Copyright (C) <1999> Erik Walthinsen <omega@cse.ogi.edu> 3 * Copyright (C) <2009> Sebastian Dröge <sebastian.droege@collabora.co.uk> 4 * 5 * This library is free software; you can redistribute it and/or 6 * modify it under the terms of the GNU Library General Public 7 * License as published by the Free Software Foundation; either 8 * version 2 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 * Library General Public License for more details. 14 * 15 * You should have received a copy of the GNU Library General Public 16 * License along with this library; if not, write to the 17 * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, 18 * Boston, MA 02110-1301, USA. 19 */ 20 21 22 #ifndef __GST_LAMEMP3ENC_H__ 23 #define __GST_LAMEMP3ENC_H__ 24 25 26 #include <gst/gst.h> 27 #include <gst/audio/gstaudioencoder.h> 28 #include <gst/base/gstadapter.h> 29 30 G_BEGIN_DECLS 31 32 #include <lame/lame.h> 33 34 #define GST_TYPE_LAMEMP3ENC \ 35 (gst_lamemp3enc_get_type()) 36 #define GST_LAMEMP3ENC(obj) \ 37 (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_LAMEMP3ENC,GstLameMP3Enc)) 38 #define GST_LAMEMP3ENC_CLASS(klass) \ 39 (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_LAMEMP3ENC,GstLameMP3EncClass)) 40 #define GST_IS_LAMEMP3ENC(obj) \ 41 (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_LAMEMP3ENC)) 42 #define GST_IS_LAMEMP3ENC_CLASS(klass) \ 43 (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_LAMEMP3ENC)) 44 45 typedef struct _GstLameMP3Enc GstLameMP3Enc; 46 typedef struct _GstLameMP3EncClass GstLameMP3EncClass; 47 48 /** 49 * GstLameMP3Enc: 50 * 51 * Opaque data structure. 52 */ 53 struct _GstLameMP3Enc { 54 GstAudioEncoder element; 55 56 /*< private >*/ 57 gint samplerate; 58 gint out_samplerate; 59 gint num_channels; 60 61 /* properties */ 62 gint target; 63 gint bitrate; 64 gboolean cbr; 65 gfloat quality; 66 gint encoding_engine_quality; 67 gboolean mono; 68 69 lame_global_flags *lgf; 70 71 GstAdapter *adapter; 72 }; 73 74 struct _GstLameMP3EncClass { 75 GstAudioEncoderClass parent_class; 76 }; 77 78 GType gst_lamemp3enc_get_type(void); 79 gboolean gst_lamemp3enc_register (GstPlugin * plugin); 80 81 G_END_DECLS 82 83 #endif /* __GST_LAMEMP3ENC_H__ */ 84