1 /* MP3 decoding plugin for GStreamer using the mpg123 library
2 * Copyright (C) 2012 Carlos Rafael Giani
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.
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.
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
19 #ifndef __GST_MPG123_AUDIO_DEC_H__
20 #define __GST_MPG123_AUDIO_DEC_H__
22 /* This is what the visual studio build in mpg123 does before including the
23 * original header file. Without this we get syntax errors in the
24 * replace_reader function declarations because it doesn't know ssize_t etc.
25 * It doesn't realy matter for us if the ssize_t typedef here is correct. */
29 #include <sys/types.h>
35 #include <gst/audio/gstaudiodecoder.h>
42 typedef struct _GstMpg123AudioDec GstMpg123AudioDec;
43 typedef struct _GstMpg123AudioDecClass GstMpg123AudioDecClass;
46 #define GST_TYPE_MPG123_AUDIO_DEC (gst_mpg123_audio_dec_get_type())
47 #define GST_MPG123_AUDIO_DEC(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), GST_TYPE_MPG123_AUDIO_DEC,GstMpg123AudioDec))
48 #define GST_MPG123_AUDIO_DEC_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass), GST_TYPE_MPG123_AUDIO_DEC,GstMpg123AudioDecClass))
49 #define GST_IS_MPG123_AUDIO_DEC(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), GST_TYPE_MPG123_AUDIO_DEC))
50 #define GST_IS_MPG123_AUDIO_DEC_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), GST_TYPE_MPG123_AUDIO_DEC))
52 struct _GstMpg123AudioDec
54 GstAudioDecoder parent;
56 mpg123_handle *handle;
58 GstAudioInfo next_audioinfo;
59 gboolean has_next_audioinfo;
65 struct _GstMpg123AudioDecClass
67 GstAudioDecoderClass parent_class;
70 G_GNUC_INTERNAL GType gst_mpg123_audio_dec_get_type (void);