1 /* MP3 decoding plugin for GStreamer using the mpg123 library 2 * Copyright (C) 2012 Carlos Rafael Giani 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.1 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 Free Software 16 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 17 */ 18 19 #ifndef __GST_MPG123_AUDIO_DEC_H__ 20 #define __GST_MPG123_AUDIO_DEC_H__ 21 22 #include <gst/gst.h> 23 #include <gst/audio/gstaudiodecoder.h> 24 #include <mpg123.h> 25 26 27 G_BEGIN_DECLS 28 29 30 typedef struct _GstMpg123AudioDec GstMpg123AudioDec; 31 typedef struct _GstMpg123AudioDecClass GstMpg123AudioDecClass; 32 33 34 #define GST_TYPE_MPG123_AUDIO_DEC (gst_mpg123_audio_dec_get_type()) 35 #define GST_MPG123_AUDIO_DEC(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), GST_TYPE_MPG123_AUDIO_DEC,GstMpg123AudioDec)) 36 #define GST_MPG123_AUDIO_DEC_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass), GST_TYPE_MPG123_AUDIO_DEC,GstMpg123AudioDecClass)) 37 #define GST_IS_MPG123_AUDIO_DEC(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), GST_TYPE_MPG123_AUDIO_DEC)) 38 #define GST_IS_MPG123_AUDIO_DEC_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), GST_TYPE_MPG123_AUDIO_DEC)) 39 40 struct _GstMpg123AudioDec 41 { 42 GstAudioDecoder parent; 43 44 mpg123_handle *handle; 45 46 GstAudioInfo next_audioinfo; 47 gboolean has_next_audioinfo; 48 49 off_t frame_offset; 50 }; 51 52 53 struct _GstMpg123AudioDecClass 54 { 55 GstAudioDecoderClass parent_class; 56 }; 57 58 G_GNUC_INTERNAL GType gst_mpg123_audio_dec_get_type (void); 59 60 G_END_DECLS 61 62 #endif 63