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 #define GST_TYPE_MPG123_AUDIO_DEC (gst_mpg123_audio_dec_get_type()) 30 G_DECLARE_FINAL_TYPE (GstMpg123AudioDec, gst_mpg123_audio_dec, 31 GST, MPG123_AUDIO_DEC, GstAudioDecoder) 32 33 struct _GstMpg123AudioDec 34 { 35 GstAudioDecoder parent; 36 37 mpg123_handle *handle; 38 39 GstAudioInfo next_audioinfo; 40 gboolean has_next_audioinfo; 41 42 off_t frame_offset; 43 }; 44 45 GST_ELEMENT_REGISTER_DECLARE (mpg123audiodec); 46 47 G_END_DECLS 48 49 #endif 50